This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# include <Siv3D.hpp> | |
constexpr int field_sz = 4; | |
constexpr int sz = 80; | |
constexpr int padding = 10; | |
constexpr int xBias = (800 - (sz * field_sz + padding * (field_sz - 1))) / 2; | |
constexpr int yBias = (600 - (sz * field_sz + padding * (field_sz - 1))) / 2; | |
struct Field2048 { | |
int field[field_sz][field_sz]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cassert> | |
#include <cstdint> | |
#include <iostream> | |
#include <random> | |
#include <vector> | |
#include <bsoncxx/builder/basic/document.hpp> | |
#include <bsoncxx/json.hpp> | |
#include <mongocxx/client.hpp> | |
#include <mongocxx/instance.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <math.h> | |
#include "GUI_Paint.h" | |
#include "utils.h" | |
#include "world.h" | |
#define SCALE_L1 105 | |
#define SCALE_L2 120 | |
#define DISPLAY_CENTERX 120 | |
#define DISPLAY_CENTERY 120 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// based on demo code https://www.waveshare.com/wiki/RP2040-LCD-1.28#Demo | |
#include "DEV_Config.h" | |
#include "GUI_Paint.h" | |
#include "LCD_1in28.h" | |
#include <stdio.h> | |
uint16_t gen_rgb565(uint16_t r, uint16_t g, uint16_t b) { | |
uint16_t code = 0; | |
code |= (r & 0b11111); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <filesystem> | |
#include <fstream> | |
#include <iostream> | |
#include <random> | |
#include <vulkan/vulkan.hpp> | |
struct Param { | |
uint32_t matAH; | |
uint32_t matAWBH; | |
uint32_t matBW; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define STB_IMAGE_IMPLEMENTATION | |
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image.h" | |
#include "stb_image_write.h" | |
#include <glm/glm.hpp> | |
#include <glm/gtc/matrix_transform.hpp> | |
#include <vulkan/vulkan.hpp> | |
#include <filesystem> | |
#include <fstream> | |
#include <iostream> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define STB_IMAGE_WRITE_IMPLEMENTATION | |
#include "stb_image_write.h" | |
#include <vulkan/vulkan.hpp> | |
#include <fstream> | |
#include <filesystem> | |
#include <iostream> | |
#include <vector> | |
const uint32_t screenWidth = 640; | |
const uint32_t screenHeight = 480; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Write by Kiterai 2023 | |
// https://chaosplant.tech/tech-notes/page50 | |
// | |
// This source code is licensed under CC0 | |
// http://creativecommons.org/publicdomain/zero/1.0/deed.ja | |
// | |
#include <windows.h> | |
#include <ole2.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmake_minimum_required(VERSION 3.7) | |
project(stylus_test) | |
add_executable(test main.cpp) | |
find_package(SDL2 CONFIG REQUIRED) | |
target_link_libraries(test | |
PRIVATE | |
$<TARGET_NAME_IF_EXISTS:SDL2::SDL2main> | |
$<IF:$<TARGET_EXISTS:SDL2::SDL2>,SDL2::SDL2,SDL2::SDL2-static> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <algorithm> | |
using namespace std; | |
struct A | |
{ | |
long long a, b; | |
}; | |
const int len = 10; |
NewerOlder