Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
shoot 'em up

voidProc voidproc

👾
shoot 'em up
View GitHub Profile
@voidproc
voidproc / siv3d_custom_titlebar.cpp
Last active Aug 16, 2016
Siv3D custom titlebar & close button
View siv3d_custom_titlebar.cpp
#include <Siv3D.hpp>
class Titlebar
{
public:
Titlebar(
const int height = 24,
const int margin = 2,
const Color color = Palette::Mediumorchid,
const Color fontColor = Palette::White,
@voidproc
voidproc / siv3d_fade_frames.cpp
Last active Aug 17, 2016
Fade every frames in Siv3D
View siv3d_fade_frames.cpp
#include <Siv3D.hpp>
void Main()
{
const Size windowSize{ 640, 480 };
RenderTexture renderTexture{ windowSize, Palette::Black };
while (System::Update())
{
@voidproc
voidproc / imgcomb.cpp
Created Aug 20, 2016
Combine images with Siv3D
View imgcomb.cpp
#include <Siv3D.hpp>
#include <algorithm>
void Main()
{
Window::SetTitle(L"imgcomb");
Window::Resize(30 + 240 + 30 + 240 + 30, 500);
Graphics::SetBackground(Color(240));
@voidproc
voidproc / siv3d_scene.cpp
Last active Aug 21, 2016
Scene changing with ham::SceneManager
View siv3d_scene.cpp
#include <Siv3D.hpp>
#include <HamFramework.hpp>
// こちらで詳しい解説がされています:
// http://qiita.com/hamukun8686/items/4620d630b538c78a6e02
enum class SceneType
{
Empty,
Title,
@voidproc
voidproc / decodeimage.cpp
Last active Aug 24, 2016
Draw embedded Base64 image
View decodeimage.cpp
#include <Siv3D.hpp>
//#define ENCODE_IMAGES
String encodeFile(const FilePath& filepath)
{
return Base64::Encode(BinaryReader(filepath).readWhole());
}
void Main()
View nodraw_during_resize.cpp
#include <Siv3D.hpp>
#include <HamFramework.hpp>
void Main()
{
ScalableWindow::Setup(640, 480);
Graphics::SetBackground(Palette::White);
Stopwatch resizeWatch(true);
@voidproc
voidproc / luabridge_example.cpp
Last active Aug 29, 2016
Lua 5.2.4 + LuaBridge minimal example
View luabridge_example.cpp
// Siv3D : http://play-siv3d.hateblo.jp/
#include <Siv3D.hpp>
// Lua : https://www.lua.org/
#include <lua.hpp>
#pragma comment(lib, "lua52.lib")
// LuaBridge : https://github.com/vinniefalco/LuaBridge
#include <LuaBridge.h>
using namespace luabridge;
@voidproc
voidproc / s3dkun_blink.cpp
Last active Aug 31, 2016
Simple blinking effect using Siv3D PixelShader
View s3dkun_blink.cpp
@voidproc
voidproc / Main.cpp
Created Sep 11, 2016
Circle::drawFrame + RenderTexture
View Main.cpp
#include <Siv3D.hpp>
void Main()
{
const Size windowSize(640, 480);
const Color bg = Palette::Black;
RenderTexture renderTexture(windowSize.x / 2, windowSize.y, bg);
@voidproc
voidproc / entity.cpp
Created Sep 19, 2016
Simple game object container
View entity.cpp
#include <iostream>
#include <algorithm>
#include <memory>
#include <string>
#include <vector>
#include <list>
#include <unordered_map>
using namespace std;
You can’t perform that action at this time.