Skip to content

Instantly share code, notes, and snippets.

View marijnvdwerf's full-sized avatar

Marijn van der Werf marijnvdwerf

View GitHub Profile
void doesntCrash_1() {
log_error("⇢ %s",__FUNCTION__);
auto fs = FileStream("/nonexistant.png", FILE_MODE_WRITE);
UNUSED(fs);
log_error("⇠ %s",__FUNCTION__);
}
void doesntCrash_2() {
log_error("⇢ %s",__FUNCTION__);
auto fs = FileStream("/nonexistant.png", FILE_MODE_WRITE);
@marijnvdwerf
marijnvdwerf / getasm.php
Created April 17, 2017 19:45
ASM converter
<?php
if ($argc != 3) {
printf('Usage: %s <file> <function>' . PHP_EOL, __FILE__);
exit(1);
}
$filename = $argv[1];
$function = $argv[2];
@marijnvdwerf
marijnvdwerf / test
Created February 2, 2017 15:47
Android Studio shared code style
test
@marijnvdwerf
marijnvdwerf / progress.php
Created January 22, 2017 17:39
Pokemon ruby decompilation progress
#!/usr/bin/env php
<?php
$basedir = getcwd();
if (!file_exists($basedir . '/pokeruby.map')) {
die(sprintf("pokeruby.map couldn't be found in %s", $basedir));
}
$lines = file_get_contents($basedir . '/pokeruby.map');
$lines = explode("\n", $lines);
$base03: #002b36;
$base02: #073642;
$base01: #586e75;
$base00: #657b83;
$base0: #839496;
$base1: #93a1a1;
$base2: #eee8d5;
$base3: #fdf6e3;
$yellow: #b58900;
$orange: #cb4b16;

${CPP} -DVERSION=RUBY -DLOCALE=en -DREVISION=0

#define UNITS_METRIC 0
#define UNITS_IMPERIAL 1

#if !defined(LOCALE) || LOCALE == "en"
#define BUILD_LANGUAGE (LANGUAGE_ENGLISH)
#define BUILD_UNITS UNITS_IMPERIAL
bool8 sub_81472E4(u16 arg0);
bool8 sub_8147324(u16 arg0) {
u16 i2;
u16 i;
bool8 success;
i = 0;
while (TRUE) {
u32 next;

agb_flash

  • FlashTimerIntr
  • ReadFlash1
  • ReadFlash_Core
  • VerifyFlashSector_Core
  • VerifyFlashSector
  • VerifyFlashSectorNBytes

agb_flash_1m

enum {
SPR_BM_TRACK_ = 17146, // Flat[0], Flat[2], OnRidePhoto[0], OnRidePhoto[2]
SPR_BM_TRACK_ = 17147, // Flat[1], Flat[3], OnRidePhoto[1], OnRidePhoto[3]
SPR_BM_TRACK_ = 17148, // Brakes[0], Brakes[2]
SPR_BM_TRACK_ = 17149, // Brakes[1], Brakes[3]
SPR_BM_TRACK_ = 17150, // BlockBrakes[0], BlockBrakes[2]
SPR_BM_TRACK_ = 17151, // BlockBrakes[1], BlockBrakes[3]
SPR_BM_TRACK_ = 17156, // FlatToLeftBank[0], RightBankToFlat[2]
SPR_BM_TRACK_ = 17157, // FlatToLeftBank[1], RightBankToFlat[3]
#pragma region Copyright (c) 2014-2016 OpenRCT2 Developers
/*****************************************************************************
* OpenRCT2, an open source clone of Roller Coaster Tycoon 2.
*
* OpenRCT2 is the work of many authors, a full list can be found in contributors.md
* For more information, visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or