Skip to content

Instantly share code, notes, and snippets.

@SomeCrazyGuy
SomeCrazyGuy / mod_api.h
Created March 1, 2023 17:33
predicted Starloader public API
#ifndef MOD_API_H
#define MOD_API_H
#include <stdint.h>
/** (chatgpt generated documentation)
These macros define functions for extracting the different parts of a software version number.
The version number is assumed to be passed in as an unsigned 32 bit integer `VERSION`, where
each part of the version (major, minor, patch, and revision) is stored as one byte.
@SomeCrazyGuy
SomeCrazyGuy / d3d12_imgui_hook.cpp
Last active February 6, 2023 05:22
Example implementation of dxgi.dll hook to provide an imgui overlay on directx12
#define WIN32_LEAN_AND_MEAN
#define VC_EXTRA_LEAN
#define NOGDICAPMASKS //CC_ * , LC_*, PC_*, CP_*, TC_*, RC_
//#define NOVIRTUALKEYCODES //VK_ *
//#define NOWINMESSAGES //WM_ * , EM_*, LB_*, CB_*
//#define NOWINSTYLES //WS_ * , CS_*, ES_*, LBS_*, SBS_*, CBS_*
#define NOSYSMETRICS //SM_ *
#define NOMENUS //MF_ *
#define NOICONS //IDI_ *
@SomeCrazyGuy
SomeCrazyGuy / bash_game
Created April 6, 2016 04:53
A Platformer game written entirely in bash script without calling any external programs
#!/bin/bash --noprofile
#extra strict flags
set -euo pipefail
#screen buffer
declare -a level
#globals
declare -i lv_w=0 #width of level
@SomeCrazyGuy
SomeCrazyGuy / bash_pager.sh
Created April 1, 2016 01:25
A pager written entirely using bash 4 builtins, relies on no other system binaries.
#!/bin/bash --noprofile
# DO ALMOST ANYTHING PUBLIC LICENSE
# Everyone is permitted to copy and distribute verbatim or modified
# copies of this code for any purpose as long as any "Credit"
# lines are not removed.
#Credit: /u/linuxversion
#<your Credit line here, if you want>