Skip to content

Instantly share code, notes, and snippets.

View copyrat90's full-sized avatar

copyrat90

  • South Korea
  • 16:22 (UTC +09:00)
View GitHub Profile
@copyrat90
copyrat90 / gba audio registers.md
Last active November 3, 2023 10:58
GBA Audio Registers
@copyrat90
copyrat90 / butano-vscode-cpptools.md
Last active May 6, 2024 19:41
Setup intellisense for Butano project with VSCode C/C++ extension

Setup intellisense for Butano project with VSCode C/C++ extension

  1. Install C/C++ extension for VSCode
  2. Copy the snippet below, and paste it as <yourProjectRoot>/.vscode/c_cpp_properties.json
  3. Change the line "<yourPathToButano>/butano/include", to your location of Butano
    • For example, if you installed Butano to the C:/butano, it should be "C:/butano/butano/include",

Note

@copyrat90
copyrat90 / tomee-gba-link-cable-pin.md
Last active May 6, 2023 14:38
Wire colors for `Tomee 2 Player GBA Link Cable`
@copyrat90
copyrat90 / enum_as_flags.hpp
Last active January 10, 2023 00:59
enum_as_flags.hpp
#ifndef COPYRAT90_ENUM_AS_FLAGS_HPP
#define COPYRAT90_ENUM_AS_FLAGS_HPP
#include <type_traits>
#define ENUM_AS_FLAGS(Enum) \
static_assert(std::is_enum<Enum>::value, "Template argument for Enum is not an enum."); \
\
constexpr bool operator!(Enum a) { \
using Int = typename std::underlying_type<Enum>::type; \
@copyrat90
copyrat90 / problem.cpp
Last active February 20, 2021 08:43
std::function callback example (video game)
#include <iostream>
class Character
{
public:
Character(int maxHP) : m_maxHP(maxHP), m_currentHP(maxHP) {};
void Update()
{
if (m_isPoisoned)