Skip to content

Instantly share code, notes, and snippets.

View matcool's full-sized avatar
🌈
rainbow

mat matcool

🌈
rainbow
View GitHub Profile
@absoIute
absoIute / VersionDetect.cpp
Last active November 12, 2024 13:23
Geometry Dash Version Detect
#include "VersionDetect.h"
#include <Windows.h>
std::map<uint32_t, std::string> VersionDetect::s_buildMap =
{
{ 1419173053, "1.900" },
{ 1419880840, "1.910" },
{ 1421745341, "1.920" },
{ 1440638199, "2.000" },
{ 1440643927, "2.001" },
@altalk23
altalk23 / address of virtual.cpp
Last active December 19, 2023 02:56
Getting the address of a virtual function in c++, works both in msvc x86 and clang macos x64
#include <cstdlib>
#include <stddef.h>
#include <iostream>
#define CONCAT2(x, y) x##y
#define CONCAT(x, y) CONCAT2(x, y)
#if defined(_WIN64) || defined(__x86_64__)
#define NEST1(macro, begin) \
macro(CONCAT(begin, 0)) \
@absoIute
absoIute / blocks.h
Last active December 11, 2022 18:26
std::map<int, const char*> blocks = std::map<int, const char*>
{
{44, "checkpoint_01_001.png"}, // not setup in ObjectToolbox::init(), only initialised when placing a checkpoint
{1, "square_01_001"},
{2, "square_02_001"},
{3, "square_03_001"},
{4, "square_04_001"},
{5, "square_05_001"},
{6, "square_06_001"},
{7, "square_07_001"},
@Trass3r
Trass3r / dll2lib.bat
Last active August 25, 2024 04:17
generate import library from a dll
@echo off
REM Usage: dll2lib [32|64] some-file.dll
REM
REM Generates some-file.lib from some-file.dll, making an intermediate
REM some-file.def from the results of dumpbin /exports some-file.dll.
REM
REM Requires 'dumpbin' and 'lib' in PATH - run from VS developer prompt.
REM
REM Script inspired by http://stackoverflow.com/questions/9946322/how-to-generate-an-import-library-lib-file-from-a-dll