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
inputfile = r"path\to\ROM" | |
# Because ROM hacks might change the actual spells, I left out the names from the list, but here they are, along with vanilla costs: | |
""" | |
Vanilla costs: | |
Shield [32, 24, 24, 16, 16, 16, 16, 16] | |
Jump [48, 40, 32, 32, 20, 16, 12, 8] | |
Life [70, 70, 60, 60, 50, 50, 50, 50] | |
Fairy [80, 80, 60, 60, 40, 40, 40, 40] | |
Fire [120, 80, 60, 30, 16, 16, 16, 16] |
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
# Based on a simple python project from Al Sweigart's (twitter: @AlSweigart) Small Python Projects book, I thought I'd hack together a quick board generation and print routine. | |
# Allows for an arbitrary sized board. Only handles generation and printing, not the rest of the game. | |
import random | |
boardx = 7 | |
boardy = 3 | |
board = None | |
def drawboard(board): |
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 <stdio.h> | |
#include <fcntl.h> | |
#include <string.h> | |
#include <stdlib.h> | |
#include <sys/mman.h> | |
typedef void (*funcPtrType)(void); | |
int main(int argc, char** argv) |