This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef GUARD_TRAINERS_H | |
#define GUARD_TRAINERS_H | |
#define TRAINER_NONE 0 | |
#define TRAINER_SAWYER_1 1 | |
#define TRAINER_GRUNT_1 2 | |
#define TRAINER_GRUNT_2 3 | |
#define TRAINER_GRUNT_3 4 | |
#define TRAINER_GRUNT_4 5 | |
#define TRAINER_GRUNT_5 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <assert.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <stdlib.h> | |
#define FREEGLUT_STATIC | |
#include <GL/freeglut.h> | |
struct Vec3f | |
{ | |
float x; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne "2" ]; | |
then | |
echo "usage: $0 old_name new_name" | |
exit 1 | |
fi | |
grep -rl "$1" asm/*.s src/*.c include/*.h sym_*.txt data/*.s data/*.inc | xargs sed -i "s/\b$1\b/$2/g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# | |
# Created by Cameron Hall (camthesaxman) on July 9, 2017 | |
# | |
# This script calculates the decompilation progress of pokeruby by using the | |
# pokeruby.map file. | |
# | |
(@ARGV == 1) | |
or die "ERROR: no map file specified.\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
OBJDUMP="$DEVKITARM/bin/arm-none-eabi-objdump -D -bbinary -marmv4t -Mforce-thumb" | |
OPTIONS="--start-address=$(($1)) --stop-address=$(($1 + $2))" | |
$OBJDUMP $OPTIONS baserom.gba > baserom.dump | |
$OBJDUMP $OPTIONS pokeruby.gba > pokeruby.dump | |
diff baserom.dump pokeruby.dump |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template<sint32 image_type, sint32 zoom_level> | |
static void FASTCALL DrawRLESprite2(const uint8* RESTRICT source_bits_pointer, | |
uint8* RESTRICT dest_bits_pointer, | |
const uint8* RESTRICT palette_pointer, | |
const rct_drawpixelinfo *RESTRICT dpi, | |
sint32 source_y_start, | |
sint32 height, | |
sint32 source_x_start, | |
sint32 width) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2017 Cameron Hall (camthesaxman) | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is | |
* furnished to do so, subject to the following conditions: | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
# This script converts pokeruby data from assembly to C | |
# Usage: ./pokeruby-data.pl [file] [type] [line] | |
use strict; | |
use warnings; | |
use Switch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
# | |
# Converts REG_DISPCNT values to the appropriate flag constants | |
# | |
use strict; | |
use warnings; | |
sub usage { | |
print "Usage: $0 [dispcnt value]\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
# | |
# Converts REG_BGnCNT values to the appropriate flag constants | |
# | |
use strict; | |
use warnings; | |
my %screenSizes = ( | |
'text' => ['BGCNT_TXT256x256', 'BGCNT_TXT512x256', 'BGCNT_TXT256x512', 'BGCNT_TXT512x512'], |
NewerOlder