Skip to content

Instantly share code, notes, and snippets.

Avatar
👾
shoot 'em up

voidProc voidproc

👾
shoot 'em up
View GitHub Profile
View monday.cpp
#include <Siv3D.hpp>
class Bubble : public IEffect
{
public:
Bubble(const Vec2& pos, const Vec2& vel, const double r) : pos_(pos), vel_(vel), r_(r)
{
}
bool update(double t) override
View twinkle.cpp
#include <Siv3D.hpp>
struct Twinkle : IEffect
{
Vec2 pos;
double angle;
double scale;
Twinkle(const Vec2 pos) : pos(pos), angle(RandomSelect({ 0_deg, 45_deg })), scale(Random(0.2, 1.0))
{
View cutinfx.cpp
#include <Siv3D.hpp>
struct ScrollLines
{
Array<RectF> lines;
int frame = 0;
const int duration;
const int fade;
View entitylist2.cpp
#include <Siv3D.hpp>
#include <memory>
#include <list>
#include <unordered_map>
// ----------------------------------------
// Entity インスタンス間の共有データ
// ----------------------------------------
@voidproc
voidproc / intersect.cpp
Last active Sep 23, 2016
Collision detection for Shapes
View intersect.cpp
#include <Siv3D.hpp>
template <class T>
const bool intersect(const T& shape1, const Shape& shape2)
{
const Shape::Type type = shape2.type();
switch (type)
{
@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;
@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 / s3dkun_blink.cpp
Last active Aug 31, 2016
Simple blinking effect using Siv3D PixelShader
View s3dkun_blink.cpp
@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;
View nodraw_during_resize.cpp
#include <Siv3D.hpp>
#include <HamFramework.hpp>
void Main()
{
ScalableWindow::Setup(640, 480);
Graphics::SetBackground(Palette::White);
Stopwatch resizeWatch(true);