Skip to content

Instantly share code, notes, and snippets.

View mwpenny's full-sized avatar

Matt Penny mwpenny

View GitHub Profile
@mwpenny
mwpenny / extract_vvvvvv_scripts.py
Created September 14, 2021 00:51
Script to extract hard-coded VVVVVV scripts into separate .vsc files
#!/usr/bin/python3
import os
import re
import sys
SCRIPT_REGEX = re.compile('if \(.+?"(.+?)".+?\).+?lines\[\] = {\n(.+?)}', re.MULTILINE | re.DOTALL)
LINE_CONTENT_REGEX = re.compile('^\s{8}(\S)', re.MULTILINE)
if len(sys.argv) < 3:
print(f'Usage: {sys.argv[0]} <input c++ file> <output directory>')
@mwpenny
mwpenny / PSPToolchain.cmake
Last active June 16, 2020 22:54
PSP CMake toolchain
# Based on PSP.cmake by @take-cheeze (https://gist.github.com/take-cheeze/1078147)
set(CMAKE_SYSTEM_NAME Generic)
set(PSP TRUE)
add_definitions(-D__PSP__)
# Prevent "relocation truncated to fit" errors
set(CMAKE_C_FLAGS -G0)
set(CMAKE_CXX_FLAGS -G0)
set(CMAKE_EXE_LINKER_FLAGS -G0)