mirror of https://github.com/pmret/papermario.git
Added starrod_to_c.py to /tools (as well as sub_folders to hold SR enums and generated header files)
This commit is contained in:
parent
01ef8bbc3d
commit
f19ffb98ee
|
@ -0,0 +1,367 @@
|
||||||
|
#ifndef _ITEM_
|
||||||
|
#define _ITEM_
|
||||||
|
|
||||||
|
#include "ultra64.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
typedef enum Item {
|
||||||
|
JUMP = 0x00000001,
|
||||||
|
SPIN_JUMP = 0x00000002,
|
||||||
|
TORNADO_JUMP = 0x00000003,
|
||||||
|
HAMMER = 0x00000004,
|
||||||
|
SUPER_HAMMER = 0x00000005,
|
||||||
|
ULTRA_HAMMER = 0x00000006,
|
||||||
|
LUCKY_STAR = 0x00000007,
|
||||||
|
MAP = 0x00000008,
|
||||||
|
BIG_MAP = 0x00000009,
|
||||||
|
FIRST_DEGREE_CARD = 0x0000000A,
|
||||||
|
SECOND_DEGREE_CARD = 0x0000000B,
|
||||||
|
THIRD_DEGREE_CARD = 0x0000000C,
|
||||||
|
FOURTH_DEGREE_CARD = 0x0000000D,
|
||||||
|
DIPLOMA = 0x0000000E,
|
||||||
|
ULTRA_STONE = 0x0000000F,
|
||||||
|
FORTRESS_KEY = 0x00000010,
|
||||||
|
RUINS_KEY = 0x00000011,
|
||||||
|
PULSE_STONE = 0x00000012,
|
||||||
|
CASTLE_KEY1 = 0x00000013,
|
||||||
|
PALACE_KEY = 0x00000014,
|
||||||
|
LUNAR_STONE = 0x00000015,
|
||||||
|
PYRAMID_STONE = 0x00000016,
|
||||||
|
DIAMOND_STONE = 0x00000017,
|
||||||
|
GOLDEN_VASE = 0x00000018,
|
||||||
|
KOOPERS_SHELL = 0x00000019,
|
||||||
|
CASTLE_KEY2 = 0x0000001A,
|
||||||
|
FOREST_PASS = 0x0000001B,
|
||||||
|
WEIGHT = 0x0000001C,
|
||||||
|
BOOS_PORTRAIT = 0x0000001D,
|
||||||
|
CRYSTAL_BERRY = 0x0000001E,
|
||||||
|
MYSTICAL_KEY = 0x0000001F,
|
||||||
|
STOREROOM_KEY = 0x00000020,
|
||||||
|
TOY_TRAIN = 0x00000021,
|
||||||
|
RECORD = 0x00000022,
|
||||||
|
FRYING_PAN = 0x00000023,
|
||||||
|
DICTIONARY = 0x00000024,
|
||||||
|
MYSTERY_NOTE = 0x00000025,
|
||||||
|
SUSPICIOUS_NOTE = 0x00000026,
|
||||||
|
CRYSTAL_BALL = 0x00000027,
|
||||||
|
SCREWDRIVER = 0x00000028,
|
||||||
|
COOKBOOK = 0x00000029,
|
||||||
|
JADE_RAVEN = 0x0000002A,
|
||||||
|
MAGICAL_SEED1 = 0x0000002B,
|
||||||
|
MAGICAL_SEED2 = 0x0000002C,
|
||||||
|
MAGICAL_SEED3 = 0x0000002D,
|
||||||
|
MAGICAL_SEED4 = 0x0000002E,
|
||||||
|
TOAD_DOLL = 0x0000002F,
|
||||||
|
CALCULATOR = 0x00000030,
|
||||||
|
BUCKET = 0x00000031,
|
||||||
|
SCARF = 0x00000032,
|
||||||
|
RED_KEY = 0x00000033,
|
||||||
|
BLUE_KEY = 0x00000034,
|
||||||
|
LETTER01 = 0x00000036,
|
||||||
|
LETTER02 = 0x00000037,
|
||||||
|
LETTER03 = 0x00000038,
|
||||||
|
LETTER04 = 0x00000039,
|
||||||
|
LETTER05 = 0x0000003A,
|
||||||
|
LETTER06 = 0x0000003B,
|
||||||
|
LETTER07 = 0x0000003C,
|
||||||
|
LETTER08 = 0x0000003D,
|
||||||
|
LETTER09 = 0x0000003E,
|
||||||
|
LETTER10 = 0x00000040,
|
||||||
|
LETTER11 = 0x00000041,
|
||||||
|
LETTER12 = 0x00000045,
|
||||||
|
LETTER13 = 0x00000046,
|
||||||
|
LETTER14 = 0x00000047,
|
||||||
|
LETTER15 = 0x00000048,
|
||||||
|
LETTER16 = 0x00000049,
|
||||||
|
LETTER17 = 0x0000004A,
|
||||||
|
LETTER18 = 0x0000004B,
|
||||||
|
LETTER19 = 0x0000004C,
|
||||||
|
LETTER20 = 0x0000004E,
|
||||||
|
LETTER21 = 0x0000004F,
|
||||||
|
LETTER22 = 0x00000050,
|
||||||
|
LETTER23 = 0x00000051,
|
||||||
|
LETTER24 = 0x00000052,
|
||||||
|
ARTIFACT = 0x00000053,
|
||||||
|
LETTER25 = 0x00000054,
|
||||||
|
DOLLY = 0x00000056,
|
||||||
|
WATER_STONE = 0x00000057,
|
||||||
|
MAGICAL_BEAN = 0x00000058,
|
||||||
|
FERTILE_SOIL = 0x00000059,
|
||||||
|
MIRACLE_WATER = 0x0000005A,
|
||||||
|
VOLCANO_VASE = 0x0000005B,
|
||||||
|
TAPE = 0x0000005C,
|
||||||
|
SUGAR = 0x0000005D,
|
||||||
|
SALT = 0x0000005E,
|
||||||
|
EGG1 = 0x0000005F,
|
||||||
|
CREAM = 0x00000060,
|
||||||
|
STRAWBERRY = 0x00000061,
|
||||||
|
BUTTER = 0x00000062,
|
||||||
|
CLEANSER = 0x00000063,
|
||||||
|
WATER = 0x00000064,
|
||||||
|
FLOUR = 0x00000065,
|
||||||
|
MILK = 0x00000066,
|
||||||
|
LYRICS = 0x00000067,
|
||||||
|
MELODY = 0x00000068,
|
||||||
|
MAILBAG = 0x00000069,
|
||||||
|
CASTLE_KEY3 = 0x0000006A,
|
||||||
|
ODD_KEY = 0x0000006B,
|
||||||
|
STAR_STONE = 0x0000006C,
|
||||||
|
SNEAKY_PARASOL = 0x0000006D,
|
||||||
|
KOOPA_LEGENDS = 0x0000006E,
|
||||||
|
AUTOGRAPH1 = 0x0000006F,
|
||||||
|
EMPTY_WALLET = 0x00000070,
|
||||||
|
AUTOGRAPH2 = 0x00000071,
|
||||||
|
KOOPA_SHELL = 0x00000072,
|
||||||
|
OLD_PHOTO = 0x00000073,
|
||||||
|
GLASSES = 0x00000074,
|
||||||
|
PHOTOGRAPH = 0x00000075,
|
||||||
|
PACKAGE = 0x00000076,
|
||||||
|
RED_JAR = 0x00000077,
|
||||||
|
CASTLE_KEY4 = 0x00000078,
|
||||||
|
WAREHOUSE_KEY = 0x00000079,
|
||||||
|
PRISON_KEY1 = 0x0000007A,
|
||||||
|
SILVER_CREDIT = 0x0000007B,
|
||||||
|
GOLD_CREDIT = 0x0000007C,
|
||||||
|
PRISON_KEY2 = 0x0000007D,
|
||||||
|
PRISON_KEY3 = 0x0000007E,
|
||||||
|
PRISON_KEY4 = 0x0000007F,
|
||||||
|
FIRE_FLOWER = 0x00000080,
|
||||||
|
SNOWMAN_DOLL = 0x00000081,
|
||||||
|
THUNDER_RAGE = 0x00000082,
|
||||||
|
SHOOTING_STAR = 0x00000083,
|
||||||
|
THUNDER_BOLT = 0x00000084,
|
||||||
|
PEBBLE = 0x00000085,
|
||||||
|
DUSTY_HAMMER = 0x00000086,
|
||||||
|
INSECTICIDE_HERB = 0x00000087,
|
||||||
|
STONE_CAP = 0x00000088,
|
||||||
|
TASTY_TONIC = 0x00000089,
|
||||||
|
MUSHROOM = 0x0000008A,
|
||||||
|
VOLT_SHROOM = 0x0000008B,
|
||||||
|
SUPER_SHROOM = 0x0000008C,
|
||||||
|
DRIED_SHROOM = 0x0000008D,
|
||||||
|
ULTRA_SHROOM = 0x0000008E,
|
||||||
|
SLEEPY_SHEEP = 0x0000008F,
|
||||||
|
P_O_W_BLOCK = 0x00000090,
|
||||||
|
HUSTLE_DRINK = 0x00000091,
|
||||||
|
STOP_WATCH = 0x00000092,
|
||||||
|
WHACKAS_BUMP = 0x00000093,
|
||||||
|
APPLE = 0x00000094,
|
||||||
|
LIFE_SHROOM = 0x00000095,
|
||||||
|
MYSTERY = 0x00000096,
|
||||||
|
REPEL_GEL = 0x00000097,
|
||||||
|
FRIGHT_JAR = 0x00000098,
|
||||||
|
PLEASE_COME_BACK = 0x00000099,
|
||||||
|
DIZZY_DIAL = 0x0000009A,
|
||||||
|
SUPER_SODA = 0x0000009B,
|
||||||
|
LEMON = 0x0000009C,
|
||||||
|
LIME = 0x0000009D,
|
||||||
|
BLUE_BERRY = 0x0000009E,
|
||||||
|
RED_BERRY = 0x0000009F,
|
||||||
|
YELLOW_BERRY = 0x000000A0,
|
||||||
|
BUBBLE_BERRY = 0x000000A1,
|
||||||
|
JAMMIN_JELLY = 0x000000A2,
|
||||||
|
MAPLE_SYRUP = 0x000000A3,
|
||||||
|
HONEY_SYRUP = 0x000000A4,
|
||||||
|
GOOMNUT = 0x000000A5,
|
||||||
|
KOOPA_LEAF = 0x000000A6,
|
||||||
|
DRIED_PASTA = 0x000000A7,
|
||||||
|
DRIED_FRUIT = 0x000000A8,
|
||||||
|
STRANGE_LEAF = 0x000000A9,
|
||||||
|
CAKE_MIX = 0x000000AA,
|
||||||
|
EGG2 = 0x000000AB,
|
||||||
|
COCONUT = 0x000000AC,
|
||||||
|
MELON = 0x000000AD,
|
||||||
|
STINKY_HERB = 0x000000AE,
|
||||||
|
ICED_POTATO = 0x000000AF,
|
||||||
|
SPICY_SOUP = 0x000000B0,
|
||||||
|
APPLE_PIE = 0x000000B1,
|
||||||
|
HONEY_ULTRA = 0x000000B2,
|
||||||
|
MAPLE_ULTRA = 0x000000B3,
|
||||||
|
JELLY_ULTRA = 0x000000B4,
|
||||||
|
KOOPASTA = 0x000000B5,
|
||||||
|
FRIED_SHROOM = 0x000000B6,
|
||||||
|
SHROOM_CAKE = 0x000000B7,
|
||||||
|
SHROOM_STEAK = 0x000000B8,
|
||||||
|
HOT_SHROOM = 0x000000B9,
|
||||||
|
SWEET_SHROOM = 0x000000BA,
|
||||||
|
YUMMY_MEAL = 0x000000BB,
|
||||||
|
HEALTHY_JUICE = 0x000000BC,
|
||||||
|
BLAND_MEAL = 0x000000BD,
|
||||||
|
DELUXE_FEAST = 0x000000BE,
|
||||||
|
SPECIAL_SHAKE = 0x000000BF,
|
||||||
|
BIG_COOKIE = 0x000000C0,
|
||||||
|
CAKE = 0x000000C1,
|
||||||
|
MISTAKE = 0x000000C2,
|
||||||
|
KOOPA_TEA = 0x000000C3,
|
||||||
|
HONEY_SUPER = 0x000000C4,
|
||||||
|
MAPLE_SUPER = 0x000000C5,
|
||||||
|
JELLY_SUPER = 0x000000C6,
|
||||||
|
SPAGHETTI = 0x000000C7,
|
||||||
|
EGG_MISSILE = 0x000000C8,
|
||||||
|
FRIED_EGG = 0x000000C9,
|
||||||
|
HONEY_SHROOM = 0x000000CA,
|
||||||
|
HONEY_CANDY = 0x000000CB,
|
||||||
|
ELECTRO_POP = 0x000000CC,
|
||||||
|
FIRE_POP = 0x000000CD,
|
||||||
|
LIME_CANDY = 0x000000CE,
|
||||||
|
COCO_POP = 0x000000CF,
|
||||||
|
LEMON_CANDY = 0x000000D0,
|
||||||
|
JELLY_POP = 0x000000D1,
|
||||||
|
STRANGE_CAKE = 0x000000D2,
|
||||||
|
KOOKY_COOKIE = 0x000000D3,
|
||||||
|
FROZEN_FRIES = 0x000000D4,
|
||||||
|
POTATO_SALAD = 0x000000D5,
|
||||||
|
NUTTY_CAKE = 0x000000D6,
|
||||||
|
MAPLE_SHROOM = 0x000000D7,
|
||||||
|
BOILED_EGG = 0x000000D8,
|
||||||
|
YOSHI_COOKIE = 0x000000D9,
|
||||||
|
JELLY_SHROOM1 = 0x000000DA,
|
||||||
|
JELLY_SHROOM2 = 0x000000DB,
|
||||||
|
JELLY_SHROOM3 = 0x000000DC,
|
||||||
|
JELLY_SHROOM4 = 0x000000DD,
|
||||||
|
JELLY_SHROOM5 = 0x000000DE,
|
||||||
|
JELLY_SHROOM6 = 0x000000DF,
|
||||||
|
SPIN_SMASH = 0x000000E0,
|
||||||
|
MULTIBOUNCE = 0x000000E1,
|
||||||
|
POWER_PLUS_A = 0x000000E2,
|
||||||
|
DODGE_MASTER = 0x000000E3,
|
||||||
|
POWER_BOUNCE = 0x000000E4,
|
||||||
|
SPIKE_SHIELD = 0x000000E5,
|
||||||
|
FIRST_ATTACK = 0x000000E6,
|
||||||
|
H_P_PLUS_A = 0x000000E7,
|
||||||
|
QUAKE_HAMMER = 0x000000E8,
|
||||||
|
DOUBLE_DIP = 0x000000E9,
|
||||||
|
MYSTERY_SCROLL = 0x000000EA,
|
||||||
|
SLEEP_STOMP = 0x000000EB,
|
||||||
|
FIRE_SHIELD = 0x000000EC,
|
||||||
|
QUICK_CHANGE = 0x000000ED,
|
||||||
|
D_DOWN_POUND = 0x000000EE,
|
||||||
|
DIZZY_STOMP = 0x000000EF,
|
||||||
|
SMASH_CHARGE0 = 0x000000F0,
|
||||||
|
PRETTY_LUCKY = 0x000000F1,
|
||||||
|
FEELING_FINE = 0x000000F2,
|
||||||
|
ATTACK_F_X_A = 0x000000F3,
|
||||||
|
ALLOR_NOTHING = 0x000000F4,
|
||||||
|
H_P_DRAIN = 0x000000F5,
|
||||||
|
JUMP_CHARGE0 = 0x000000F6,
|
||||||
|
SLOW_GO = 0x000000F7,
|
||||||
|
F_P_PLUS_A = 0x000000F8,
|
||||||
|
MEGA_RUSH = 0x000000F9,
|
||||||
|
ICE_POWER = 0x000000FA,
|
||||||
|
DEFEND_PLUS_A = 0x000000FB,
|
||||||
|
PAY_OFF = 0x000000FC,
|
||||||
|
MONEY_MONEY = 0x000000FD,
|
||||||
|
CHILL_OUT = 0x000000FE,
|
||||||
|
HAPPY_HEART_A = 0x000000FF,
|
||||||
|
ZAP_TAP = 0x00000100,
|
||||||
|
BERSERKER = 0x00000101,
|
||||||
|
RIGHT_ON = 0x00000102,
|
||||||
|
RUNAWAY_PAY = 0x00000103,
|
||||||
|
REFUND = 0x00000104,
|
||||||
|
FLOWER_SAVER_A = 0x00000105,
|
||||||
|
TRIPLE_DIP = 0x00000106,
|
||||||
|
HAMMER_THROW = 0x00000107,
|
||||||
|
MEGA_QUAKE = 0x00000108,
|
||||||
|
SMASH_CHARGE = 0x00000109,
|
||||||
|
JUMP_CHARGE = 0x0000010A,
|
||||||
|
S_SMASH_CHG = 0x0000010B,
|
||||||
|
S_JUMP_CHG = 0x0000010C,
|
||||||
|
POWER_RUSH = 0x0000010D,
|
||||||
|
AUTO_JUMP = 0x0000010E,
|
||||||
|
AUTO_SMASH = 0x0000010F,
|
||||||
|
CRAZY_HEART = 0x00000110,
|
||||||
|
LAST_STAND = 0x00000111,
|
||||||
|
CLOSE_CALL = 0x00000112,
|
||||||
|
P_UP_D_DOWN = 0x00000113,
|
||||||
|
LUCKY_DAY = 0x00000114,
|
||||||
|
MEGA_H_P_DRAIN = 0x00000115,
|
||||||
|
P_DOWN_D_UP = 0x00000116,
|
||||||
|
POWER_QUAKE = 0x00000117,
|
||||||
|
AUTO_MULTIBOUNCE = 0x00000118,
|
||||||
|
FLOWER_FANATIC = 0x00000119,
|
||||||
|
HEART_FINDER = 0x0000011A,
|
||||||
|
FLOWER_FINDER = 0x0000011B,
|
||||||
|
SPIN_ATTACK = 0x0000011C,
|
||||||
|
DIZZY_ATTACK = 0x0000011D,
|
||||||
|
I_SPY = 0x0000011E,
|
||||||
|
SPEEDY_SPIN = 0x0000011F,
|
||||||
|
BUMP_ATTACK = 0x00000120,
|
||||||
|
POWER_JUMP = 0x00000121,
|
||||||
|
SUPER_JUMP = 0x00000122,
|
||||||
|
MEGA_JUMP = 0x00000123,
|
||||||
|
POWER_SMASH1 = 0x00000124,
|
||||||
|
SUPER_SMASH = 0x00000125,
|
||||||
|
MEGA_SMASH = 0x00000126,
|
||||||
|
POWER_SMASH2 = 0x00000127,
|
||||||
|
POWER_SMASH3 = 0x00000128,
|
||||||
|
DEEP_FOCUS1 = 0x00000129,
|
||||||
|
SUPER_FOCUS = 0x0000012A,
|
||||||
|
SHRINK_SMASH = 0x0000012B,
|
||||||
|
SHELL_CRACK = 0x0000012C,
|
||||||
|
KAIDEN = 0x0000012D,
|
||||||
|
D_DOWN_JUMP = 0x0000012E,
|
||||||
|
SHRINK_STOMP = 0x0000012F,
|
||||||
|
DAMAGE_DODGE_A = 0x00000130,
|
||||||
|
EARTHQUAKE_JUMP = 0x00000131,
|
||||||
|
DEEP_FOCUS2 = 0x00000132,
|
||||||
|
DEEP_FOCUS3 = 0x00000133,
|
||||||
|
H_P_PLUS_B = 0x00000134,
|
||||||
|
F_P_PLUS_B = 0x00000135,
|
||||||
|
HAPPY_HEART_B = 0x00000136,
|
||||||
|
HAPPY_HEART_X = 0x00000137,
|
||||||
|
FLOWER_SAVER_B = 0x00000138,
|
||||||
|
FLOWER_SAVER_X = 0x00000139,
|
||||||
|
DAMAGE_DODGE_B = 0x0000013A,
|
||||||
|
DAMAGE_DODGE_X = 0x0000013B,
|
||||||
|
POWER_PLUS_B = 0x0000013C,
|
||||||
|
POWER_PLUS_X = 0x0000013D,
|
||||||
|
DEFEND_PLUS_X = 0x0000013E,
|
||||||
|
DEFEND_PLUS_Y = 0x0000013F,
|
||||||
|
HAPPY_FLOWER_A = 0x00000140,
|
||||||
|
HAPPY_FLOWER_B = 0x00000141,
|
||||||
|
HAPPY_FLOWER_X = 0x00000142,
|
||||||
|
GROUP_FOCUS = 0x00000143,
|
||||||
|
PEEKABOO = 0x00000144,
|
||||||
|
ATTACK_F_X_D = 0x00000145,
|
||||||
|
ATTACK_F_X_B = 0x00000146,
|
||||||
|
ATTACK_F_X_E = 0x00000147,
|
||||||
|
ATTACK_F_X_C = 0x00000148,
|
||||||
|
ATTACK_F_X_F = 0x00000149,
|
||||||
|
H_P_PLUS_C = 0x0000014A,
|
||||||
|
H_P_PLUS_X = 0x0000014B,
|
||||||
|
H_P_PLUS_Y = 0x0000014C,
|
||||||
|
F_P_PLUS_C = 0x0000014D,
|
||||||
|
F_P_PLUS_X = 0x0000014E,
|
||||||
|
F_P_PLUS_Y = 0x0000014F,
|
||||||
|
HEALTHY_HEALTHY = 0x00000150,
|
||||||
|
ATTACK_F_X_F2 = 0x00000151,
|
||||||
|
ATTACK_F_X_F3 = 0x00000152,
|
||||||
|
ATTACK_F_X_F4 = 0x00000153,
|
||||||
|
ATTACK_F_X_F5 = 0x00000154,
|
||||||
|
PARTNER_ATTACK = 0x00000155,
|
||||||
|
HEART = 0x00000156,
|
||||||
|
COIN = 0x00000157,
|
||||||
|
HEART_PIECE = 0x00000158,
|
||||||
|
STAR_POINT = 0x00000159,
|
||||||
|
FULL_HEAL = 0x0000015A,
|
||||||
|
FLOWER = 0x0000015B,
|
||||||
|
STAR_PIECE = 0x0000015C,
|
||||||
|
PRESENT = 0x0000015D,
|
||||||
|
COMPLETE_CAKE = 0x0000015E,
|
||||||
|
BARE_CAKE = 0x0000015F,
|
||||||
|
EMPTY_CAKE_PAN = 0x00000160,
|
||||||
|
FULL_CAKE_PAN = 0x00000161,
|
||||||
|
EMPTY_MIXING_BOWL = 0x00000162,
|
||||||
|
FULL_MIXING_BOWL = 0x00000163,
|
||||||
|
CAKE_WITH_ICING = 0x00000164,
|
||||||
|
CAKE_WITH_BERRIES = 0x00000165,
|
||||||
|
HAMMER1_ICON = 0x00000166,
|
||||||
|
HAMMER2_ICON = 0x00000167,
|
||||||
|
HAMMER3_ICON = 0x00000168,
|
||||||
|
BOOTS1_ICON = 0x00000169,
|
||||||
|
BOOTS2_ICON = 0x0000016A,
|
||||||
|
BOOTS3_ICON = 0x0000016B,
|
||||||
|
ITEMS_ICON = 0x0000016C
|
||||||
|
} Item;
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,361 @@
|
||||||
|
Item % namespace
|
||||||
|
itemID % library name
|
||||||
|
true % reversed
|
||||||
|
|
||||||
|
Jump = 00000001
|
||||||
|
SpinJump = 00000002
|
||||||
|
TornadoJump = 00000003
|
||||||
|
Hammer = 00000004
|
||||||
|
SuperHammer = 00000005
|
||||||
|
UltraHammer = 00000006
|
||||||
|
LuckyStar = 00000007
|
||||||
|
Map = 00000008 % unused
|
||||||
|
BigMap = 00000009 % unused
|
||||||
|
FirstDegreeCard = 0000000A
|
||||||
|
SecondDegreeCard = 0000000B
|
||||||
|
ThirdDegreeCard = 0000000C
|
||||||
|
FourthDegreeCard = 0000000D
|
||||||
|
Diploma = 0000000E
|
||||||
|
UltraStone = 0000000F
|
||||||
|
FortressKey = 00000010
|
||||||
|
RuinsKey = 00000011
|
||||||
|
PulseStone = 00000012
|
||||||
|
CastleKey1 = 00000013
|
||||||
|
PalaceKey = 00000014
|
||||||
|
LunarStone = 00000015
|
||||||
|
PyramidStone = 00000016
|
||||||
|
DiamondStone = 00000017
|
||||||
|
GoldenVase = 00000018 % unused
|
||||||
|
KoopersShell = 00000019
|
||||||
|
CastleKey2 = 0000001A
|
||||||
|
ForestPass = 0000001B % unused
|
||||||
|
Weight = 0000001C
|
||||||
|
BoosPortrait = 0000001D
|
||||||
|
CrystalBerry = 0000001E
|
||||||
|
MysticalKey = 0000001F
|
||||||
|
StoreroomKey = 00000020
|
||||||
|
ToyTrain = 00000021
|
||||||
|
Record = 00000022
|
||||||
|
FryingPan = 00000023
|
||||||
|
Dictionary = 00000024
|
||||||
|
MysteryNote = 00000025
|
||||||
|
SuspiciousNote = 00000026 % unused
|
||||||
|
CrystalBall = 00000027
|
||||||
|
Screwdriver = 00000028 % unused
|
||||||
|
Cookbook = 00000029
|
||||||
|
JadeRaven = 0000002A
|
||||||
|
MagicalSeed1 = 0000002B
|
||||||
|
MagicalSeed2 = 0000002C
|
||||||
|
MagicalSeed3 = 0000002D
|
||||||
|
MagicalSeed4 = 0000002E
|
||||||
|
ToadDoll = 0000002F % unused
|
||||||
|
Calculator = 00000030
|
||||||
|
Bucket = 00000031
|
||||||
|
Scarf = 00000032
|
||||||
|
RedKey = 00000033
|
||||||
|
BlueKey = 00000034
|
||||||
|
Letter01 = 00000036
|
||||||
|
Letter02 = 00000037
|
||||||
|
Letter03 = 00000038
|
||||||
|
Letter04 = 00000039
|
||||||
|
Letter05 = 0000003A
|
||||||
|
Letter06 = 0000003B
|
||||||
|
Letter07 = 0000003C
|
||||||
|
Letter08 = 0000003D
|
||||||
|
Letter09 = 0000003E
|
||||||
|
Letter10 = 00000040
|
||||||
|
Letter11 = 00000041
|
||||||
|
Letter12 = 00000045
|
||||||
|
Letter13 = 00000046
|
||||||
|
Letter14 = 00000047
|
||||||
|
Letter15 = 00000048
|
||||||
|
Letter16 = 00000049
|
||||||
|
Letter17 = 0000004A
|
||||||
|
Letter18 = 0000004B
|
||||||
|
Letter19 = 0000004C
|
||||||
|
Letter20 = 0000004E
|
||||||
|
Letter21 = 0000004F
|
||||||
|
Letter22 = 00000050
|
||||||
|
Letter23 = 00000051
|
||||||
|
Letter24 = 00000052
|
||||||
|
Artifact = 00000053
|
||||||
|
Letter25 = 00000054
|
||||||
|
Dolly = 00000056
|
||||||
|
WaterStone = 00000057
|
||||||
|
MagicalBean = 00000058
|
||||||
|
FertileSoil = 00000059
|
||||||
|
MiracleWater = 0000005A
|
||||||
|
VolcanoVase = 0000005B
|
||||||
|
Tape = 0000005C
|
||||||
|
Sugar = 0000005D
|
||||||
|
Salt = 0000005E
|
||||||
|
Egg1 = 0000005F
|
||||||
|
Cream = 00000060
|
||||||
|
Strawberry = 00000061
|
||||||
|
Butter = 00000062
|
||||||
|
Cleanser = 00000063
|
||||||
|
Water = 00000064
|
||||||
|
Flour = 00000065
|
||||||
|
Milk = 00000066
|
||||||
|
Lyrics = 00000067
|
||||||
|
Melody = 00000068
|
||||||
|
Mailbag = 00000069
|
||||||
|
CastleKey3 = 0000006A
|
||||||
|
OddKey = 0000006B
|
||||||
|
StarStone = 0000006C
|
||||||
|
SneakyParasol = 0000006D
|
||||||
|
KoopaLegends = 0000006E
|
||||||
|
Autograph1 = 0000006F
|
||||||
|
EmptyWallet = 00000070
|
||||||
|
Autograph2 = 00000071
|
||||||
|
KoopaShell = 00000072 % unused
|
||||||
|
OldPhoto = 00000073
|
||||||
|
Glasses = 00000074
|
||||||
|
Photograph = 00000075 % unused
|
||||||
|
Package = 00000076
|
||||||
|
RedJar = 00000077
|
||||||
|
CastleKey4 = 00000078
|
||||||
|
WarehouseKey = 00000079
|
||||||
|
PrisonKey1 = 0000007A
|
||||||
|
SilverCredit = 0000007B
|
||||||
|
GoldCredit = 0000007C
|
||||||
|
PrisonKey2 = 0000007D % unused
|
||||||
|
PrisonKey3 = 0000007E % unused
|
||||||
|
PrisonKey4 = 0000007F % unused
|
||||||
|
FireFlower = 00000080
|
||||||
|
SnowmanDoll = 00000081
|
||||||
|
ThunderRage = 00000082
|
||||||
|
ShootingStar = 00000083
|
||||||
|
ThunderBolt = 00000084
|
||||||
|
Pebble = 00000085
|
||||||
|
DustyHammer = 00000086
|
||||||
|
InsecticideHerb = 00000087
|
||||||
|
StoneCap = 00000088
|
||||||
|
TastyTonic = 00000089
|
||||||
|
Mushroom = 0000008A
|
||||||
|
VoltShroom = 0000008B
|
||||||
|
SuperShroom = 0000008C
|
||||||
|
DriedShroom = 0000008D
|
||||||
|
UltraShroom = 0000008E
|
||||||
|
SleepySheep = 0000008F
|
||||||
|
POWBlock = 00000090
|
||||||
|
HustleDrink = 00000091
|
||||||
|
StopWatch = 00000092
|
||||||
|
WhackasBump = 00000093
|
||||||
|
Apple = 00000094
|
||||||
|
LifeShroom = 00000095
|
||||||
|
Mystery = 00000096
|
||||||
|
RepelGel = 00000097
|
||||||
|
FrightJar = 00000098
|
||||||
|
PleaseComeBack = 00000099
|
||||||
|
DizzyDial = 0000009A
|
||||||
|
SuperSoda = 0000009B
|
||||||
|
Lemon = 0000009C
|
||||||
|
Lime = 0000009D
|
||||||
|
BlueBerry = 0000009E
|
||||||
|
RedBerry = 0000009F
|
||||||
|
YellowBerry = 000000A0
|
||||||
|
BubbleBerry = 000000A1
|
||||||
|
JamminJelly = 000000A2
|
||||||
|
MapleSyrup = 000000A3
|
||||||
|
HoneySyrup = 000000A4
|
||||||
|
Goomnut = 000000A5
|
||||||
|
KoopaLeaf = 000000A6
|
||||||
|
DriedPasta = 000000A7
|
||||||
|
DriedFruit = 000000A8
|
||||||
|
StrangeLeaf = 000000A9
|
||||||
|
CakeMix = 000000AA
|
||||||
|
Egg2 = 000000AB
|
||||||
|
Coconut = 000000AC
|
||||||
|
Melon = 000000AD
|
||||||
|
StinkyHerb = 000000AE
|
||||||
|
IcedPotato = 000000AF
|
||||||
|
SpicySoup = 000000B0
|
||||||
|
ApplePie = 000000B1
|
||||||
|
HoneyUltra = 000000B2
|
||||||
|
MapleUltra = 000000B3
|
||||||
|
JellyUltra = 000000B4
|
||||||
|
Koopasta = 000000B5
|
||||||
|
FriedShroom = 000000B6
|
||||||
|
ShroomCake = 000000B7
|
||||||
|
ShroomSteak = 000000B8
|
||||||
|
HotShroom = 000000B9
|
||||||
|
SweetShroom = 000000BA
|
||||||
|
YummyMeal = 000000BB
|
||||||
|
HealthyJuice = 000000BC
|
||||||
|
BlandMeal = 000000BD
|
||||||
|
DeluxeFeast = 000000BE
|
||||||
|
SpecialShake = 000000BF
|
||||||
|
BigCookie = 000000C0
|
||||||
|
Cake = 000000C1
|
||||||
|
Mistake = 000000C2
|
||||||
|
KoopaTea = 000000C3
|
||||||
|
HoneySuper = 000000C4
|
||||||
|
MapleSuper = 000000C5
|
||||||
|
JellySuper = 000000C6
|
||||||
|
Spaghetti = 000000C7
|
||||||
|
EggMissile = 000000C8
|
||||||
|
FriedEgg = 000000C9
|
||||||
|
HoneyShroom = 000000CA
|
||||||
|
HoneyCandy = 000000CB
|
||||||
|
ElectroPop = 000000CC
|
||||||
|
FirePop = 000000CD
|
||||||
|
LimeCandy = 000000CE
|
||||||
|
CocoPop = 000000CF
|
||||||
|
LemonCandy = 000000D0
|
||||||
|
JellyPop = 000000D1
|
||||||
|
StrangeCake = 000000D2
|
||||||
|
KookyCookie = 000000D3
|
||||||
|
FrozenFries = 000000D4
|
||||||
|
PotatoSalad = 000000D5
|
||||||
|
NuttyCake = 000000D6
|
||||||
|
MapleShroom = 000000D7
|
||||||
|
BoiledEgg = 000000D8
|
||||||
|
YoshiCookie = 000000D9
|
||||||
|
JellyShroom1 = 000000DA
|
||||||
|
JellyShroom2 = 000000DB
|
||||||
|
JellyShroom3 = 000000DC
|
||||||
|
JellyShroom4 = 000000DD
|
||||||
|
JellyShroom5 = 000000DE
|
||||||
|
JellyShroom6 = 000000DF
|
||||||
|
SpinSmash = 000000E0
|
||||||
|
Multibounce = 000000E1
|
||||||
|
PowerPlusA = 000000E2
|
||||||
|
DodgeMaster = 000000E3
|
||||||
|
PowerBounce = 000000E4
|
||||||
|
SpikeShield = 000000E5
|
||||||
|
FirstAttack = 000000E6
|
||||||
|
HPPlusA = 000000E7
|
||||||
|
QuakeHammer = 000000E8
|
||||||
|
DoubleDip = 000000E9
|
||||||
|
MysteryScroll = 000000EA % unused
|
||||||
|
SleepStomp = 000000EB
|
||||||
|
FireShield = 000000EC
|
||||||
|
QuickChange = 000000ED
|
||||||
|
DDownPound = 000000EE
|
||||||
|
DizzyStomp = 000000EF
|
||||||
|
SmashCharge0 = 000000F0 % unused
|
||||||
|
PrettyLucky = 000000F1
|
||||||
|
FeelingFine = 000000F2
|
||||||
|
AttackFXA = 000000F3
|
||||||
|
AllorNothing = 000000F4
|
||||||
|
HPDrain = 000000F5
|
||||||
|
JumpCharge0 = 000000F6 % unused
|
||||||
|
SlowGo = 000000F7
|
||||||
|
FPPlusA = 000000F8
|
||||||
|
MegaRush = 000000F9
|
||||||
|
IcePower = 000000FA
|
||||||
|
DefendPlusA = 000000FB
|
||||||
|
PayOff = 000000FC
|
||||||
|
MoneyMoney = 000000FD
|
||||||
|
ChillOut = 000000FE
|
||||||
|
HappyHeartA = 000000FF
|
||||||
|
ZapTap = 00000100
|
||||||
|
Berserker = 00000101 % unused
|
||||||
|
RightOn = 00000102 % unused
|
||||||
|
RunawayPay = 00000103
|
||||||
|
Refund = 00000104
|
||||||
|
FlowerSaverA = 00000105
|
||||||
|
TripleDip = 00000106
|
||||||
|
HammerThrow = 00000107
|
||||||
|
MegaQuake = 00000108
|
||||||
|
SmashCharge = 00000109
|
||||||
|
JumpCharge = 0000010A
|
||||||
|
SSmashChg = 0000010B
|
||||||
|
SJumpChg = 0000010C
|
||||||
|
PowerRush = 0000010D
|
||||||
|
AutoJump = 0000010E % unused
|
||||||
|
AutoSmash = 0000010F % unused
|
||||||
|
CrazyHeart = 00000110 % unused
|
||||||
|
LastStand = 00000111
|
||||||
|
CloseCall = 00000112
|
||||||
|
PUpDDown = 00000113
|
||||||
|
LuckyDay = 00000114
|
||||||
|
MegaHPDrain = 00000115 % unused
|
||||||
|
PDownDUp = 00000116
|
||||||
|
PowerQuake = 00000117
|
||||||
|
AutoMultibounce = 00000118 % unused
|
||||||
|
FlowerFanatic = 00000119 % unused
|
||||||
|
HeartFinder = 0000011A
|
||||||
|
FlowerFinder = 0000011B
|
||||||
|
SpinAttack = 0000011C
|
||||||
|
DizzyAttack = 0000011D
|
||||||
|
ISpy = 0000011E
|
||||||
|
SpeedySpin = 0000011F
|
||||||
|
BumpAttack = 00000120
|
||||||
|
PowerJump = 00000121
|
||||||
|
SuperJump = 00000122 % unused
|
||||||
|
MegaJump = 00000123
|
||||||
|
PowerSmash1 = 00000124
|
||||||
|
SuperSmash = 00000125 % unused
|
||||||
|
MegaSmash = 00000126
|
||||||
|
PowerSmash2 = 00000127
|
||||||
|
PowerSmash3 = 00000128
|
||||||
|
DeepFocus1 = 00000129
|
||||||
|
SuperFocus = 0000012A % unused
|
||||||
|
ShrinkSmash = 0000012B
|
||||||
|
ShellCrack = 0000012C % unused
|
||||||
|
Kaiden = 0000012D % unused
|
||||||
|
DDownJump = 0000012E
|
||||||
|
ShrinkStomp = 0000012F
|
||||||
|
DamageDodgeA = 00000130
|
||||||
|
EarthquakeJump = 00000131
|
||||||
|
DeepFocus2 = 00000132
|
||||||
|
DeepFocus3 = 00000133
|
||||||
|
HPPlusB = 00000134
|
||||||
|
FPPlusB = 00000135
|
||||||
|
HappyHeartB = 00000136
|
||||||
|
HappyHeartX = 00000137
|
||||||
|
FlowerSaverB = 00000138
|
||||||
|
FlowerSaverX = 00000139
|
||||||
|
DamageDodgeB = 0000013A
|
||||||
|
DamageDodgeX = 0000013B
|
||||||
|
PowerPlusB = 0000013C
|
||||||
|
PowerPlusX = 0000013D
|
||||||
|
DefendPlusX = 0000013E
|
||||||
|
DefendPlusY = 0000013F
|
||||||
|
HappyFlowerA = 00000140
|
||||||
|
HappyFlowerB = 00000141
|
||||||
|
HappyFlowerX = 00000142
|
||||||
|
GroupFocus = 00000143
|
||||||
|
Peekaboo = 00000144
|
||||||
|
AttackFXD = 00000145
|
||||||
|
AttackFXB = 00000146
|
||||||
|
AttackFXE = 00000147
|
||||||
|
AttackFXC = 00000148
|
||||||
|
AttackFXF = 00000149
|
||||||
|
HPPlusC = 0000014A
|
||||||
|
HPPlusX = 0000014B
|
||||||
|
HPPlusY = 0000014C
|
||||||
|
FPPlusC = 0000014D
|
||||||
|
FPPlusX = 0000014E
|
||||||
|
FPPlusY = 0000014F
|
||||||
|
HealthyHealthy = 00000150
|
||||||
|
AttackFXF2 = 00000151
|
||||||
|
AttackFXF3 = 00000152
|
||||||
|
AttackFXF4 = 00000153
|
||||||
|
AttackFXF5 = 00000154
|
||||||
|
PartnerAttack = 00000155 % placeholder with partner attack icon
|
||||||
|
Heart = 00000156
|
||||||
|
Coin = 00000157
|
||||||
|
HeartPiece = 00000158 % unused, NOT functional
|
||||||
|
StarPoint = 00000159 % unused, functional, makes coin sound
|
||||||
|
FullHeal = 0000015A % unused, functional, item inside healing block
|
||||||
|
Flower = 0000015B
|
||||||
|
StarPiece = 0000015C
|
||||||
|
Present = 0000015D
|
||||||
|
CompleteCake = 0000015E
|
||||||
|
BareCake = 0000015F
|
||||||
|
EmptyCakePan = 00000160
|
||||||
|
FullCakePan = 00000161
|
||||||
|
EmptyMixingBowl = 00000162
|
||||||
|
FullMixingBowl = 00000163
|
||||||
|
CakeWithIcing = 00000164
|
||||||
|
CakeWithBerries = 00000165
|
||||||
|
Hammer1Icon = 00000166
|
||||||
|
Hammer2Icon = 00000167
|
||||||
|
Hammer3Icon = 00000168
|
||||||
|
Boots1Icon = 00000169
|
||||||
|
Boots2Icon = 0000016A
|
||||||
|
Boots3Icon = 0000016B
|
||||||
|
ItemsIcon = 0000016C
|
|
@ -0,0 +1,60 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import stringcase
|
||||||
|
|
||||||
|
|
||||||
|
files = [filename for filename in os.listdir("./sr_enums") if filename.endswith(".enum")]
|
||||||
|
for filename in files:
|
||||||
|
with open(f"./sr_enums/{filename}", "r") as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
|
||||||
|
# Get enum attributes
|
||||||
|
namespace = re.match(r"[^ \t]*", lines[0]).group(0)
|
||||||
|
library_name = re.match(r"[^ \t]*", lines[1]).group(0)
|
||||||
|
reverse = True if re.match(r"[^ \t]*", lines[2]).group(0) == "true" else False
|
||||||
|
|
||||||
|
# Get a list of tuples containing (name, value)
|
||||||
|
items = []
|
||||||
|
comment = False
|
||||||
|
for line in lines[4:]:
|
||||||
|
line = line.rstrip("\n")
|
||||||
|
if not comment and not line.startswith("%") and "=" in line:
|
||||||
|
m = re.match(r"[ \t]*?([^ \t]*)[ \t]*=[ \t]*([^ \t]*)", line)
|
||||||
|
if m:
|
||||||
|
if reverse:
|
||||||
|
name = m.group(1)
|
||||||
|
value = int(m.group(2), 16)
|
||||||
|
else:
|
||||||
|
name = m.group(2)
|
||||||
|
value = int(m.group(1), 16)
|
||||||
|
if value < 0:
|
||||||
|
str_value = "-0x" + f"{value*-1:08x}".upper()
|
||||||
|
else:
|
||||||
|
str_value = "0x" + f"{value:08x}".upper()
|
||||||
|
items.append((name, str_value))
|
||||||
|
elif "/%" in line:
|
||||||
|
comment = True
|
||||||
|
elif "%/" in line:
|
||||||
|
comment = False
|
||||||
|
|
||||||
|
# Create a header file for this enum
|
||||||
|
with open(f"./c_enums/{namespace}.h", "w") as file:
|
||||||
|
header = f"_{stringcase.constcase(namespace)}_"
|
||||||
|
file.write(f"#ifndef {header}\n#define {header}\n")
|
||||||
|
file.write("\n")
|
||||||
|
file.write("#include \"ultra64.h\"\n#include \"types.h\"\n")
|
||||||
|
file.write("\n")
|
||||||
|
file.write(f"typedef enum {namespace} {'{'}\n")
|
||||||
|
for i,(name,value) in enumerate(items):
|
||||||
|
name_const = stringcase.constcase(name)
|
||||||
|
if i < len(items) - 1:
|
||||||
|
file.write(f"\t{name_const} = {value},\n")
|
||||||
|
else:
|
||||||
|
file.write(f"\t{name_const} = {value}\n")
|
||||||
|
file.write(f"{'}'} {namespace};\n\n")
|
||||||
|
file.write("#endif")
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue