Skip to content

Instantly share code, notes, and snippets.

Avatar

azaika azaika

View GitHub Profile
View live-game-day1.cpp
#include <Siv3D.hpp>
void Main() {
Graphics::SetTargetFrameRateHz(60);
Window::SetTitle(U"五月祭 TSGLIVE 5! day-1 ライブゲームプログラミング");
Scene::SetBackground(Palette::Lightblue);
Window::Resize({ 500, 800 });
constexpr double timeDelta = 1 / 60.0;
View s3dJSONdev.cpp
# include <Siv3D.hpp> // OpenSiv3D v0.4.2
# include "JSON.hpp"
# include "boost/ut.hpp"
JSON MakeDummy()
{
JSON json;
json[U"Dummy"][U"title"] = U"My title";
json[U"Dummy"][U"width"] = 640;
json[U"Dummy"][U"height"] = 480;
View JSONData.hpp
# pragma once
# include <memory>
# include <variant>
# include "Fwd.hpp"
# include "TextReader.hpp"
# include "TextWriter.hpp"
# include "Array.hpp"
namespace s3d
View MyPlayingCard.hpp
//-----------------------------------------------
//
// This file is part of the HamFramework for Siv3D.
//
// Copyright (C) 2014-2017 HAMSTRO
// Copyright (c) 2017 OpenSiv3D Project
//
// Licensed under the MIT License.
//
//-----------------------------------------------
@azaika
azaika / Main.cpp
Created Aug 19, 2017
TOMLReader実装案
View Main.cpp
# include <Siv3D.hpp> // OpenSiv3D v0.1.6
# include "cpptoml.h"
namespace toml
{
class TOMLValue;
}
namespace s3d
{
@azaika
azaika / makeDividedTexture.cpp
Created Apr 2, 2017
Siv3DでDxLibのLoadDivGraph関数っぽいやつ
View makeDividedTexture.cpp
#include <Siv3D.hpp>
// image を大きさ size の画像に分割
Array<Texture> makeDividedTexture(const Image& image, const Size& size) {
// 分割数
const Size numDiv{ image.size.x / size.x, image.size.y / size.y };
Array<Texture> result;
result.reserve(numDiv.x * numDiv.y);
View tetris.cpp
#include <Siv3D.hpp>
#include <array>
#include <vector>
#include <algorithm>
using ShapeType = std::array<std::array<bool, 4>, 4>;
struct TetrominoInfo {
ShapeType shape;
Color color;
};
View pasolib.cpp
#include <stdexcept>
#include <string>
#include <tuple>
#include "Pasolib.hpp"
#include "felicalib.h"
#pragma comment(lib, "felicalib.lib")
namespace pasolib {
View sc16burdens_q.cpp
#include <string.h>
#include <stdbool.h>
#include "sc1.h"
#define DELTA_X 1
#define DELTA_Y N
#define NUM_OF_LINE (N + N + 2)
#define LINE_SUM 111
#define HOLE_NUM 15
You can’t perform that action at this time.