diff --git a/include/enums.h b/include/enums.h index 0b37b57f..afc42fd1 100644 --- a/include/enums.h +++ b/include/enums.h @@ -93,14 +93,14 @@ enum file_progress_e { FILEPROG_54_CCW_PUZZLE_PODIUM_ACTIVE, FILEPROG_55_FF_BK_SQUARE_INSTRUCTIONS, FILEPROG_56_FF_PICTURE_SQUARE_INSTRUCTIONS, - FILEPROG_57_FF_MUSIC_SQAURE_INSTRUCTIONS, - FILEPROG_58_FF_MINIGAME_SQAURE_INSTRUCTIONS, - FILEPROG_59_FF_GRUNTY_SQAURE_INSTRUCTIONS, - FILEPROG_5A_FF_DEATH_SQAURE_INSTRUCTIONS, - FILEPROG_5B_FF_JOKER_SQAURE_INSTRUCTIONS, + FILEPROG_57_FF_MUSIC_SQUARE_INSTRUCTIONS, + FILEPROG_58_FF_MINIGAME_SQUARE_INSTRUCTIONS, + FILEPROG_59_FF_GRUNTY_SQUARE_INSTRUCTIONS, + FILEPROG_5A_FF_DEATH_SQUARE_INSTRUCTIONS, + FILEPROG_5B_FF_JOKER_SQUARE_INSTRUCTIONS, FILEPROG_5C_FF_PATTERN_SET, FILEPROG_5D_MM_PUZZLE_PIECES_PLACED = 0x5D, //1 bit - FILEPROG_5E_TCC_PUZZLE_PIECES_PLACED = 0x5E, //2 bit + FILEPROG_5E_TTC_PUZZLE_PIECES_PLACED = 0x5E, //2 bit FILEPROG_60_CC_PUZZLE_PIECES_PLACED = 0x60, //3 bit FILEPROG_63_BGS_PUZZLE_PIECES_PLACED = 0x63, //3 bit FILEPROG_66_FP_PUZZLE_PIECES_PLACED = 0x66, //4 bit @@ -387,7 +387,7 @@ enum volatile_flags_e { VOLATILE_FLAG_AF_BGS_MAZE_JIGGY_MISSED, VOLATILE_FLAG_B0_NOT_ENOUGH_NOTES, VOLATILE_FLAG_B1, // unused - VOLATILE_FLAG_B2, // ccw related + VOLATILE_FLAG_B2_HAS_COLLECTED_CATERPILLAR, // ccw related VOLATILE_FLAG_B3, // boggy2 related VOLATILE_FLAG_B4, // fp related VOLATILE_FLAG_B5, // ccw related @@ -426,7 +426,7 @@ enum level_flags_e LEVEL_FLAG_D_MM_UNKNOWN, LEVEL_FLAG_E_CC_UNKNOWN, - LEVEL_FLAG_10_CCW_UNKNOWN = 0x10, + LEVEL_FLAG_10_CCW_BREAK_ZUBBA_DOOR = 0x10, LEVEL_FLAG_11_FP_UNKNOWN, LEVEL_FLAG_12_FP_UNKNOWN, LEVEL_FLAG_13_FP_UNKNOWN, @@ -961,9 +961,9 @@ enum sfx_e // egg pooping ? SFX_3E_POOP_NOISE, // higher pitch - SFX_3F_CAULDRON_SQEAK_1, + SFX_3F_CAULDRON_SQUEAK_1, // lower pitch - SFX_40_CAULDRON_SQEAK_2, + SFX_40_CAULDRON_SQUEAK_2, // waking up SFX_41_MUMBO_ERGHHH, // short and dull @@ -1789,6 +1789,12 @@ enum actor_e ACTOR_17_PLAYER_SHADOW = 0x17, + ACTOR_19_FRAMERATE_60 = 0x19, + ACTOR_1A_FRAMERATE_30, + ACTOR_1B_FRAMERATE_20, + ACTOR_1C_FRAMERATE_15, + ACTOR_1D_FRAMERATE_12, + ACTOR_1E_LEAKY = 0x1E, ACTOR_25_CEMETARY_POT = 0x25, @@ -1828,9 +1834,7 @@ enum actor_e ACTOR_4D_STEAM_2, ACTOR_4E_WADING_BOOTS_TOUCH_SPARKLE, ACTOR_4F_TURBO_TRAINERS_TOUCH_SPARKLE, - - - ACTOR_50_HONEYCOMB = 0x50, + ACTOR_50_HONEYCOMB, ACTOR_51_MUSIC_NOTE, ACTOR_52_BLUE_EGG, ACTOR_53_RED_ARROW, @@ -1839,8 +1843,7 @@ enum actor_e ACTOR_56_SHRAPNEL, ACTOR_57_ORANGE_PAD, ACTOR_58_STEAM_3, - - ACTOR_59_JUJU = 0x59, + ACTOR_59_JUJU, ACTOR_5A_JIGSAW_DANCE, ACTOR_5B_PINK_EGG_LARGEST, @@ -2002,13 +2005,19 @@ enum actor_e ACTOR_15F_XMAS_TREE = 0x15F, ACTOR_160_BOGGY_1, - - ACTOR_163_BAT = 0x163, + ACTOR_161_BOGGY_RACE_FLAG, + ACTOR_162_BOGGY_RACE_FLAG, + ACTOR_163_BAT, ACTOR_164_COLLYWOBBLE_THE_CAULIFLOWER_A, ACTOR_165_BAWL_THE_ONION_A, ACTOR_166_TOPPER_THE_CARROT_A, ACTOR_167_ATTACK_TUTORIAL, - + ACTOR_168_CCW_WINTER_SWITCH, + ACTOR_169_CCW_WINTER_SEASON_DOOR, + ACTOR_16A_CCW_AUTUMN_SWITCH, + ACTOR_16B_CCW_AUTUMN_SEASON_DOOR, + ACTOR_16C_CCW_SUMMER_SWITCH, + ACTOR_16D_CCW_SUMMER_SEASON_DOOR, ACTOR_16E_UNKNOWN = 0x16E, ACTOR_16F_QUARRIE, @@ -2043,8 +2052,7 @@ enum actor_e ACTOR_1C8_SNORKEL, ACTOR_1C9_ANCHOR, - - ACTOR_1CC_GRILL_CHOMPA = 0x1CC, + ACTOR_1CC_GRILLE_CHOMPA = 0x1CC, ACTOR_1CD_UNKNOWN, ACTOR_1CE_UNKNOWN, ACTOR_1CF_UNKNOWN, @@ -2060,7 +2068,9 @@ enum actor_e ACTOR_1DE_PRESS_START_OVERLAY, ACTOR_1DF_NO_CONTROLLER_OVERLAY, - ACTOR_1E4_TOOTS = 0x1E4, + ACTOR_1E2_CCW_SPRING_SWITCH = 0x1E2, + ACTOR_1E3_CCW_SPRING_SEASON_DOOR, + ACTOR_1E4_TOOTS, ACTOR_1E9_SNARE_BEAR = 0x1E9, ACTOR_1EA_POLAR_BEAR_CUB_BLUE, @@ -2086,7 +2096,8 @@ enum actor_e ACTOR_1FF_SPENT_RED_FEATHER, ACTOR_200_SPENT_GOLD_FEATHER, - ACTOR_204_MM_WITCH_SWITCH = 0x204, + ACTOR_203_NOTE_DOOR = 0x203, + ACTOR_204_MM_WITCH_SWITCH, ACTOR_206_MMM_WITCH_SWITCH = 0x206, @@ -2098,7 +2109,7 @@ enum actor_e ACTOR_20E_MM_ENTRANCE_DOOR, ACTOR_20F_RBB_ENTRANCE_DOOR, ACTOR_210_BGS_ENTRANCE_DOOR, - ACTOR_211_TCC_ENTRANCE_CHEST_LID, //CC ENTRANCE + ACTOR_211_TTC_ENTRANCE_CHEST_LID, //CC ENTRANCE ACTOR_212_CC_ENTRANCE_BARS, //TTC_ENTRANCE ACTOR_21C_CABIN_CLOSET_DOOR = 0x21C, @@ -2122,7 +2133,8 @@ enum actor_e ACTOR_23F_CRACKED_SKYLIGHT = 0x23F, - ACTOR_243_GV_SNS_CHAMBER_DOOR = 0x243, + ACTOR_242_FF_TELEPORT_PAD = 0x242, + ACTOR_243_GV_SNS_CHAMBER_DOOR, ACTOR_244_GV_SNS_SARCOPHAGUS, ACTOR_245_GV_SNS_SWITCH = 0x245, @@ -2155,22 +2167,28 @@ enum actor_e ACTOR_283_BOSS_BOOM_BOX_MEDIUM, ACTOR_284_BOSS_BOOM_BOX_SMALL, - ACTOR_28A_CLANKER_WHIPCRACK = 0x28A, + ACTOR_289_BETA_VENT = 0x289, + ACTOR_28A_CLANKER_WHIPCRACK, ACTOR_28B_SOUND_SOURCE, - ACTOR_290_CLANKER_SAWBLADE_PROPELLOR_7 = 0x290, + ACTOR_28F_BETA_VENT = 0x28F, + ACTOR_290_CLANKER_SAWBLADE_PROPELLOR_7, ACTOR_291_CLANKER_SAWBLADE_PROPELLOR_8, ACTOR_292_CLANKER_SAWBLADE_PROPELLOR_9, ACTOR_293_CLANKER_SAWBLADE_PROPELLOR_10, ACTOR_294_CLANKER_SAWBLADE_PROPELLOR_11, ACTOR_295_CLANKER_SAWBLADE_PROPELLOR_12, - ACTOR_29B_ZUBBA = 0x29B, + ACTOR_298_ZUBBA_DOOR = 0x298, - ACTOR_29E_CCW_GOBI = 0x29E, - ACTOR_29F_CLUCKER = 0x29F, + ACTOR_29A_ZUBBA_DOOR = 0x29A, + ACTOR_29B_ZUBBA, - ACTOR_2A1_EEYRIE_BABY = 0x2A1, + ACTOR_29D_CCW_BEANSTALK = 0x29D, + ACTOR_29E_CCW_GOBI, + ACTOR_29F_CLUCKER, + ACTOR_2A0_EAGLE_EGG, + ACTOR_2A1_EEYRIE_BABY, ACTOR_2A2_CATERPILLAR, ACTOR_2A4_BOOM_BOX_SLOW = 0x2A4, @@ -2178,6 +2196,8 @@ enum actor_e ACTOR_2A8_NABNUT = 0x2A8, ACTOR_2A9_ACORN, + ACTOR_2AC_GNAWTY_BOULDER = 0x2AC, + ACTOR_2DB_DINGPOT = 0x2DB, ACTOR_2DF_LIGHTHOUSE_B = 0x2DF, @@ -2194,9 +2214,15 @@ enum actor_e ACTOR_2F4_FISHBOWL = 0x2F4, ACTOR_2F5_CUCKOO_CLOCK, + ACTOR_2FA_BANJOS_HOUSE_ROYSTEN = 0x2FA, + ACTOR_30D_BOOM_BOX_FAST = 0x30D, ACTOR_30F_WHIPCRACK = 0x30f, + ACTOR_310_NABNUT_HOUSE_PILE_OF_ACORNS, + + ACTOR_313_NABNUT_BED = 0x313, + ACTOR_314_NABNUT_IN_AUTUMN_HOUSE, ACTOR_319_GV_MAZE_CTRL = 0x319, @@ -2223,7 +2249,8 @@ enum actor_e ACTOR_33F_WOZZA_IN_CAVE = 0x33F, ACTOR_340_XMAS_TREE_ICE, - ACTOR_349_UNKNOWN = 0x349, + ACTOR_348_BRENTILDA = 0x348, + ACTOR_349_UNKNOWN, ACTOR_34D_BEE_SWARM = 0x34D, ACTOR_34E_LIMBO, @@ -2292,6 +2319,7 @@ enum actor_e ACTOR_3BA_UNKNOWN, ACTOR_3BD_SM_UNKNOWN = 0x3BD, + ACTOR_3BE_LAIR_UNKNOWN, ACTOR_3BF_GRUNTLING_BLUE = 0x3BF, ACTOR_3C0_GRUNTLING_BLACK, @@ -2301,8 +2329,8 @@ enum actor_e ACTOR_3C4_FF_PRIZE_WASHING_CAULDRON = 0x3C4, ACTOR_3C7_FF_PRIZE_GRUNTY_DOLL = 0x3C7, - ACTOR_3C8_FF_PRIZE_TOOTY = 0x3C8, - + ACTOR_3C8_FF_PRIZE_TOOTY, + ACTOR_3C9_FURNACE_FUN_PICK_PRICE, ACTOR_3CA_ROCK_TRAPPING_GRUNTY = 0x3CA, ACTOR_3CB_UNKNOWN }; @@ -2607,6 +2635,11 @@ enum mmm_specific_flags { MMM_SPECIFIC_FLAG_7_UNKNOWN }; +enum lair_specific_flags { + LAIR_SPECIFIC_FLAG_7_UKNOWN = 0x7, + LAIR_SPECIFIC_FLAG_9_UKNOWN = 0x9 +}; + enum item_e { ITEM_0_HOURGLASS_TIMER = 0x0, @@ -3106,7 +3139,7 @@ enum asset_e // 2da TTC Palm Tree // 2db RBB Grey Toxic Barrel // 2dc RBB Yellow Toxic Barrel - // 2dd Shock Jump Pad + ASSET_2DD_MODEL_SHOCK_JUMP_PAD = 0x2DD, // Unused // 2df TTC Light Crate // 2e0 TTC Dark Crate @@ -3228,8 +3261,7 @@ enum asset_e ASSET_354_MODEL_SMALL_BULL, ASSET_355_MODEL_CONCERT_BANJO, ASSET_356_MODEL_BANJO_WISHYWASHY = 0x356, - // Unused - // 358 TTC Snippet + // 357 Unused ASSET_358_SNIPPET = 0x358, ASSET_359_MODEL_BANJO_WALRUS, ASSET_35A_MODEL_CONCERT_TOOTY, @@ -3282,8 +3314,8 @@ enum asset_e ASSET_388_MODEL_MOLEHILL, // Unused ASSET_38A_MODEL_BOGGY_1 = 0x38A, - // 38b Boggy Race Red Flag - ASSET_38C_MODEL_CRAB_CLAW = 0x38c, + ASSET_38B_MODEL_BOGGY_RACE_FLAG, + ASSET_38C_MODEL_CRAB_CLAW, ASSET_38D_MODEL_CRAB_LEG, ASSET_38E_MODEL_CRAB_HEAD, ASSET_38F_MODEL_MUTIE_SNIPPET, @@ -3321,7 +3353,7 @@ enum asset_e // 3af (Green Plank?) ASSET_3B0_SNACKER = 0x3B0, // 3b1 Concert Mumbo - // 3b2 (Two Poles?) + ASSET_3B2_MODEL_TWO_ICE_POLES_NEAR_CHEATO_3 = 0x3B2, // 3b3 Mumbo's Hut // Unused // Unused @@ -3353,9 +3385,8 @@ enum asset_e ASSET_3CF_MODEL_CELLAR_HATCH, ASSET_3D0_MODEL_CHURCH_GATE_LEFT_LOCK, ASSET_3D1_MODEL_HEDGE_GATE_RIGHT_LOCK_1, - ASSET_3D2_MODEL_BLUBBER_SHIP_TOP_HATCH, + ASSET_3D2_MODEL_BLUBBER_SHIP_TOP_HATCH = 0x3d2, ASSET_3D3_MODEL_CHURCH_DOOR, - // 3d4 Lockup ASSET_3D4_MODEL_LOCKUP = 0x3d4, ASSET_3D5_MODEL_NIPPER, ASSET_3D6_MODEL_LIGHTHOUSE_DOOR, @@ -3405,8 +3436,8 @@ enum asset_e ASSET_401_MODEL_FLOTSAM, ASSET_402_MODEL_EGG_TOLL, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER, - // 404 RBB Green Propeller Switch (Stop Propellers) - // 405 RBB Grey Propeller Switch (Stop Propellers) + ASSET_404_MODEL_RBB_GREEN_PROPELLER_SWITCH, + ASSET_405_MODEL_RBB_GREY_PROPELLER_SWITCH, // 406 RBB Thin Shaft // 407 RBB Double Shaft 1 // 408 RBB Double Shaft 2 @@ -3419,11 +3450,11 @@ enum asset_e ASSET_40F_MODEL_ENGINE_ROOM_PROPELLER_1 = 0x40f, ASSET_410_MODEL_ENGINE_ROOM_PROPELLER_2, ASSET_411_MODEL_ENGINE_ROOM_PROPELLER_3, - // 412 RBB Grey Propeller Switch (Slow Fans) - // 413 RBB 1 Switch - // 414 RBB 2 Switch - // 415 RBB 3 Switch - ASSET_416_MODEL_WHISTLE = 0x416, + ASSET_412_MODEL_RBB_GREY_PROPELLER_SWITCH, + ASSET_413_MODEL_WHISTLE_SWITCH_1, + ASSET_414_MODEL_WHISTLE_SWITCH_2, + ASSET_415_MODEL_WHISTLE_SWITCH_3, + ASSET_416_MODEL_WHISTLE, // 417 RBB Whistle 2 (Gold) // 418 RBB Whistle 3 (Blue) ASSET_419_MODEL_GRIMLET = 0x419, @@ -3450,13 +3481,13 @@ enum asset_e // 42d SM Quarrie // 42e SM Quarrie Fragment ASSET_42F_MODEL_RBB_HONEYCOMB_SWITCH = 0x42F, - ASSET_430_MODEL_GRILL_CHOMPA, - // 431 Beta Vent + ASSET_430_MODEL_GRILLE_CHOMPA, + ASSET_431_MODEL_BETA_VENT, ASSET_432_MODEL_CLANKER_WHIPCRACK = 0x432, // Unused ASSET_434_MODEL_TOOTS = 0x434, - // 435 CC Green Grate - // 436 CC Teal Grate + ASSET_435_MODEL_CC_GREEN_GRATE, + ASSET_436_MODEL_CC_TEAL_GRATE, // 437 (Unknown?) ASSET_438_MODEL_HONEYCOMB_SWITCH = 0x438, // 439 (Unknown?) @@ -3470,10 +3501,10 @@ enum asset_e // 441 (Sir Slush Snowball?) ASSET_442_MODEL_TWINKLY_BOX = 0x442, // 443 CCW Zubba Honey Lump - // 444 (CCW Zubba Entrance Lid?) - // 445 (CCW Zubba Entrance Lid?) - ASSET_446_MODEL_ZUBBA = 0x446, - // 447 CCW Beanstalk + ASSET_444_MODEL_CCW_ZUBBA_DOOR = 0x444, + ASSET_445_MODEL_CCW_ZUBBA_DOOR, + ASSET_446_MODEL_ZUBBA, + ASSET_447_MODEL_CCW_BEANSTALK, ASSET_448_MODEL_TWINKLY_BLUE = 0x448, ASSET_449_MODEL_TWINKLY_GREEN, ASSET_44A_MODEL_TWINKLY_ORANGE, @@ -3546,12 +3577,12 @@ enum asset_e ASSET_48C_MODEL_BOOM_BOX, // 48d Nabnut Eating Acorns ASSET_48E_MODEL_ACORN = 0x48E, - // 48f Gnawty - // 490 Gnawty's Boulder - // 491 Note Door - ASSET_492_MODEL_CABIN_CLOSET_DOOR = 0x492, + ASSET_48F_MODEL_GNAWTY, + ASSET_490_MODEL_GNAWTY_BOULDER, + ASSET_491_MODEL_NOTE_DOOR, + ASSET_492_MODEL_CABIN_CLOSET_DOOR, ASSET_493_MODEL_ENGINE_ROOM_DOOR, - ASSET_494_MODEL_WOZZA = 0x494, + ASSET_494_MODEL_WOZZA, ASSET_495_MODEL_WOZZAS_JIGGY, ASSET_496_MODEL_TWINKLY_MUNCHER, ASSET_497_MODEL_TWINKLY_SHARD_BLUE, @@ -3565,36 +3596,36 @@ enum asset_e // 49f 2D Glowing Bee (Beta) ASSET_4A0_SPRITE_EXPLOSION = 0x4A0, ASSET_4A1_MODEL_BREAKABLE_BRICK_WALL, - // 4a2 Mumbo's Mountain Door Entrance - // 4a3 TTC Entrance Chest Lid - // 4a4 Clanker's Entrance Long Pipe (Green) - // 4a5 Clanker's Entrance Long Pipe (Blue) - // 4a6 Clanker's Entrance Short Pipe - // 4a7 Clanker's Entrance Iron Bars - // 4a8 Bubblegloop Swamp Puzzle Grate - // 4a9 Raise Pipe Switch (Path To CC) - // 4aa Raise Pipe Switch (Path To Brentilda) - // 4ab Raise Grate To BGS Puzzle - // 4ac Iron Bars Under Gruntilda Statue - // 4ad Gruntilda Statue Hat Top - // 4ae Bubblegloop Swamp Entrance Door - // 4af (Ice Ball?) - // 4b0 Level 3 Water Switch - // 4b1 Grate To Level 3 Water Switch - // 4b2 Level 2 Water Switch - // 4b3 Rareware Box (To Hide Water Switch?) - // 4b4 Rusty Bucket Bay Entrance Door - // 4b5 Level 1 Water Switch - // 4b6 Grate Between MMM and RBB Puzzles - // 4b7 Grate To RBB Puzzle - // 4b8 CCW Puzzle Switch + ASSET_4A2_MODEL_GL_MM_DOOR_ENTRANCE, + ASSET_4A3_MODEL_GL_TTC_ENTRANCE_CHEST_LID, + ASSET_4A4_MODEL_GL_CC_ENTRANCE_LONG_PIPE_GREEN, + ASSET_4A5_MODEL_GL_CC_ENTRANCE_LONG_PIPE_BLUE, + ASSET_4A6_MODEL_GL_CC_ENTRANCE_SHORT_PIPE, + ASSET_4A7_MODEL_GL_CC_IRON_BARS_ENTRANCE, + ASSET_4A8_MODEL_GL_BGS_PUZZLE_GRATE, + ASSET_4A9_MODEL_RAISE_PIPE_TO_CC_ENTRANCE_SWITCH, + ASSET_4AA_MODEL_RAISE_PIPE_TO_BRENTILDA_SWITCH, + ASSET_4AB_MODEL_RAISE_GRATE_TO_BGS_PUZZLE_SWITCH, + ASSET_4AC_MODEL_IRON_BARS_UNDER_GRUNTY_STATUE, + ASSET_4AD_MODEL_GRUNTY_STATUE_BREAKABLE_HAT_TOP, + ASSET_4AE_MODEL_GL_BGS_DOOR_ENTRANCE, + ASSET_4AF_MODEL_ICE_BALL_TO_CHEATO, + ASSET_4B0_MODEL_LEVEL_3_WATER_SWITCH, + ASSET_4B1_MODEL_GRATE_TO_LEVEL_3_WATER_SWITCH, + ASSET_4B2_MODEL_LEVEL_2_WATER_SWITCH, + ASSET_4B3_MODEL_RAREWARE_BOX, + ASSET_4B4_MODEL_GL_RBB_DOOR_ENTRANCE, + ASSET_4B5_MODEL_LEVEL_1_WATER_SWITCH, + ASSET_4B6_MODEL_GRATE_BETWEEN_MMM_AND_RBB_PUZZLES, + ASSET_4B7_MODEL_GRATE_TO_RBB_PUZZLE, + ASSET_4B8_MODEL_CCW_PUZZLE_SWITCH, // 4b9 (Jiggy Switch Beta?) ASSET_4BA_MODEL_SHIP_SHADOW_WINDOW = 0x4BA, ASSET_4BB_MODEL_SHIP_SUNNY_WINDOW, - // 4bc GV Entrance Door - ASSET_4BD_MODEL_GLASS_EYE = 0x4BD, - // 4be MMM Entrance Door - ASSET_4BF_MODEL_FLOOR_COBWEB = 0x4BF, + ASSET_4BC_MODEL_GL_GV_DOOR_ENTRANCE, + ASSET_4BD_MODEL_GLASS_EYE, + ASSET_4BE_MODEL_GL_MMM_DOOR_ENTRANCE, + ASSET_4BF_MODEL_FLOOR_COBWEB, ASSET_4C0_MODEL_WINDOW, ASSET_4C1_MODEL_WIDE_WINDOW, ASSET_4C2_MODEL_TALL_WINDOW, @@ -3619,18 +3650,18 @@ enum asset_e ASSET_4D3_MODEL_XMAS_ICE_FRAGMENT = 0x4D3, ASSET_4D4_MODEL_TWINKLY_BOX_PAPER_SHARD, ASSET_4D5_MODEL_WALL_COBWEB, - // 4d6 Click Clock Wood Entrance Door - // 4d7 Freezeezy Peak Entrance Left Door - // 4d8 Freezeezy Peak Entrance Right Door - // 4d9 Freezeezy Peak Entrance Hatch Door - ASSET_4DA_MODEL_DINING_DOOR = 0x4DA, + ASSET_4D6_MODEL_GL_CCW_DOOR_ENTRANCE, + ASSET_4D7_MODEL_GL_FP_DOOR_ENTRANCE_LEFT, + ASSET_4D8_MODEL_GL_FP_DOOR_ENTRANCE_LEFT, + ASSET_4D9_MODEL_GL_ADVENT_CALENDAR_HATCH_DOOR, + ASSET_4DA_MODEL_DINING_DOOR, ASSET_4DB_MODEL_SUNNY_LIFEBOAT, ASSET_4DC_MODEL_WITCH_SWITCH, // 4dd Mumbo Skull Switch ASSET_4DE_MODEL_SHADOW_LIFEBOAT = 0x4DE, ASSET_4DF_MODEL_WARP_CAULDRON, // 4e0 CCW Season Door - // 4e1 GL Wooden Coffin + ASSET_4E1_MODEL_GL_WOODEN_COFFIN_NO_LID = 0x4E1, ASSET_4E2_MODEL_CRACKED_SKYLIGHT = 0x4E2, // 4e3 CCW Dead Beanstalk // 4e4 Snore 'Z' @@ -3650,15 +3681,15 @@ enum asset_e ASSET_4F2_MODEL_COLLIWOBBLE_LARGE_DEATH, ASSET_4F3_MODEL_COLLIWOBBLE_SMALL_DEATH, ASSET_4F4_MODEL_COLLIWOBBLE_STEM_DEATH, - // 4f5 CCW Spring Switch - // 4f6 CCW Summer Switch - // 4f7 CCW Autumn Switch - // 4f8 CCW Winter Switch - // 4f9 CCW Nabnut's Window (Season?) - // 4fa CCW Nabnut's Window (Season?) - // 4fb CCW Nabnut's Window (Winter) - // 4fc CCW Nabnut's Window (Season?) - ASSET_4FD_MODEL_WHIPCRACK = 0x4fd, + ASSET_4F5_MODEL_CCW_SPRING_SWITCH, + ASSET_4F6_MODEL_CCW_SUMMER_SWITCH, + ASSET_4F7_MODEL_CCW_AUTUMN_SWITCH, + ASSET_4F8_MODEL_CCW_WINTER_SWITCH, + ASSET_4F9_MODEL_CCW_UNKNOWN_NABNUT_WINDOW, + ASSET_4FA_MODEL_CCW_AUTUMN_NABNUT_WINDOW, + ASSET_4FB_MODEL_CCW_WINTER_NABNUT_WINDOW, + ASSET_4FC_MODEL_CCW_UNKNOWN_NABNUT_WINDOW, + ASSET_4FD_MODEL_WHIPCRACK, ASSET_4FE_MODEL_WHIPCRACK_PART_1, ASSET_4FF_MODEL_WHIPCRACK_PART_2, ASSET_500_MODEL_WHIPCRACK_PART_3, @@ -3668,22 +3699,23 @@ enum asset_e ASSET_504_MODEL_ICECUBE = 0x504, ASSET_505_MODEL_ICECUBE_CHUNK, // 506 CCW Dead Snarebear (Venus Flytrap) - // 507 GL Grunty Floor Picture Eye 1 - // 508 GL Grunty Floor Picture Eye 2 - // 509 GL Jinxy Sarcophagus - ASSET_50A_MODEL_SHARKFOOD_ISLAND = 0x50A, + ASSET_507_MODEL_GL_GRUNTY_FLOOR_PICTURE_EYE_1 = 0x507, + ASSET_508_MODEL_GL_GRUNTY_FLOOR_PICTURE_EYE_2, + ASSET_509_MODEL_GL_SARCOPHAGUS, + ASSET_50A_MODEL_SHARKFOOD_ISLAND, ASSET_50B_MODEL_X_BARREL_TOP, - ASSET_50C_MODEL_ICE_KEY = 0x50C, + ASSET_50C_MODEL_ICE_KEY, ASSET_50D_MODEL_SNS_EGG, - // 511 GL Wooden Coffin Lid + + ASSET_511_MODEL_CRYPT_COFFIN_LID = 0x511, // 512 (Piece Of Glass Panel Blocking Ice Key 1?) // 513 (Piece Of Glass Panel Blocking Ice Key 2?) ASSET_514_MODEL_GV_SNS_CHAMBER_DOOR = 0x514, ASSET_515_MODEL_GV_SNS_SWITCH, // 516 (Wooden Plank?) - // 517 Iron Gate (No Lock) - // 518 CCW Wooden Door (To Whipcrack Room) - ASSET_519_MODEL_LOGGO = 0x519, + ASSET_517_MODEL_IRON_GATE_NO_LOCK = 0x517, + ASSET_518_MODEL_CCW_WHIPCRACK_ROOM_DOOR, + ASSET_519_MODEL_LOGGO, ASSET_51A_MODEL_LEAKY, ASSET_51B_MODEL_SCARAB_BEETLE, ASSET_51C_MODEL_SCARAB_BEETLE_PART_1, @@ -3704,42 +3736,42 @@ enum asset_e ASSET_52B_MODEL_PORTRAIT_OF_MINION, ASSET_52C_MODEL_GRUBLIN_HOOD, ASSET_52D_MODEL_GRUBLIN_HOOD_HAT, - // 52e (CCW Season Door?) - ASSET_52F_BANJOS_CHAIR = 0x52F, - ASSET_530_BANJOS_BED, + ASSET_52E_MODEL_CCW_SEASON_DOOR, + ASSET_52F_MODEL_BANJOS_CHAIR, + ASSET_530_MODEL_BANJOS_BED, // 531 Gnawty's Den - // 532 Banjo & Kazooie (Gameboy/Beer/Sunglasses/Chair) + ASSET_532_MODEL_BANJO_KAZOOIE_CUTSCENES = 0x532, // (Gameboy/Beer/Sunglasses/Chair) // 533 CCW Nabnut's Door - // 534 GL Flight Pad Switch + ASSET_534_MODEL_FLIGHT_PAD_SWITCH = 0x534, // 535 Flight Pad Blue Fragment // 536 Flight Pad Red Fragment // 537 Flight Pad Yellow Fragment // 538 Jiggy Podium (Beta?) - // 539 Brentilda - ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE = 0x53A, + ASSET_539_MODEL_BRENTILDA = 0x539, + ASSET_53A_MODEL_SHRAPNAL_PIECE_EYE, ASSET_53B_MODEL_SHRAPNAL_PIECE_SPIKE, ASSET_53C_MODEL_SHRAPNAL_PIECE_PLATE, ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, - // 53e Gnawty's Bed - // 53f Gnawty's Shelves - // 540 GL Shock Jump Pad Switch - ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK = 0x541, + ASSET_53E_MODEL_GNAWTY_BED, + ASSET_53F_MODEL_GNAWTY_SHELVES, + ASSET_540_MODEL_SHOCK_JUMP_PAD_SWITCH, + ASSET_541_SPRITE_FIREBALL_SPELL_ATTACK, // 542 (Shadow?) ASSET_543_MODEL_JINJO_STATUE_BASE = 0x543, ASSET_544_MODEL_JINJONATOR_STATUE_BASE, ASSET_545_MODEL_STONE_JINJO, ASSET_546_MODEL_GRUNTY_SPELL_BARRIER, - // 547 GL Blue Egg Refill Pillow - // 548 GL Red Feather Refill Pillow - // 549 GL Gold Feather Refill Pillow + ASSET_547_MODEL_BLUE_EGG_REFILL_PILLOW, + ASSET_548_MODEL_RED_FEATHER_REFILL_PILLOW, + ASSET_549_MODEL_GOLD_FEATHER_REFILL_PILLOW, ASSET_54A_MODEL_GRUNTLING_RED = 0x54A, // 54b (Big Fireball?) ASSET_54C_MODEL_GAME_OVER = 0x54C, - // 54d Banjo-Kazooie Sign - ASSET_54E_MODEL_COPYRIGHT_OVERLAY = 0x54E, - // 54f Cheato - // 550 Large Door To Final Battle - ASSET_551_MODEL_JINJONATOR = 0x551, + ASSET_54D_MODEL_BANJO_KAZOOIE_SIGN, + ASSET_54E_MODEL_COPYRIGHT_OVERLAY, + ASSET_54F_MODEL_CHEATO, + ASSET_550_MODEL_LARGE_DOOR_TO_FINAL_BATTLE, + ASSET_551_MODEL_JINJONATOR, ASSET_552_MODEL_BROOMSTICK_PIECE_HEAD, ASSET_553_MODEL_BROOMSTICK_PIECE_SHORT, ASSET_554_MODEL_BROOMSTICK_PIECE_LONG, @@ -3748,29 +3780,29 @@ enum asset_e ASSET_557_MODEL_ORANGE_JINJO_BLAST, ASSET_558_MODEL_GREEN_JINJO_BLAST, ASSET_559_MODEL_PINK_JINJO_BLAST, - // 55a BK World Entry/Exit Pad - // 55b FP Boggy's Igloo - ASSET_55C_MODEL_PRESS_START_OVERLAY = 0x55C, + ASSET_55A_MODEL_WORLD_EXIT_PAD, + ASSET_55B_MODEL_BOGGY_IGLOO, + ASSET_55C_MODEL_PRESS_START_OVERLAY, ASSET_55D_MODEL_NO_CONTROLLER_OVERLAY, ASSET_55E_MODEL_NAPPER, ASSET_55F_MODEL_FF_PRIZE_WASHING_CAULDRON, ASSET_560_MODEL_FF_PRIZE_GRUNTY_DOLL, - ASSET_561_MODEL_GRUNTLING_BLUE = 0x561, + ASSET_561_MODEL_GRUNTLING_BLUE, ASSET_562_MODEL_GRUNTLING_BLACK, - // 563 Level Entry Signs - ASSET_564_MODEL_PURPLE_TEEHEE = 0x564, + ASSET_563_MODEL_LEVEL_ENTRY_SIGNS, + ASSET_564_MODEL_PURPLE_TEEHEE, // 565 Bottles Game Banjo's Hand ASSET_566_MODEL_BLACK_SNIPPET = 0x566, ASSET_567_MODEL_BLACK_CRAB_HEAD, ASSET_568_MODEL_BLACK_CRAB_LEG, ASSET_569_MODEL_BLACK_CRAB_CLAW, - // 56a FP Chimney - ASSET_56B_MODEL_SANDYBUTT_PYRAMID = 0x56B, - // 56c The End Sign - ASSET_56D_MUMBOS_HAND_WITH_PICTURE = 0x56D, // Mumbo's Hand with SNS pictures - // 56e Hammerhead Beach Scenery - // Unused - // Unused + ASSET_56A_MODEL_FP_HOUSE_CHIMNEY, + ASSET_56B_MODEL_SANDYBUTT_PYRAMID, + ASSET_56C_MODEL_THE_END_SIGN, + ASSET_56D_MUMBOS_HAND_WITH_PICTURE, // Mumbo's Hand with SNS pictures + // 56E Hammerhead Beach Scenery + // 56F Unused + // 570 Unused // Unused // 572 Palm Tree (2D) // Unused @@ -4119,7 +4151,8 @@ enum asset_e ASSET_6D1_SPRITE_GOLDFEATHER = 0x6d1, - ASSET_6D6_MODEL_MUSIC_NOTE = 0x6d6, + ASSET_6D6_SPRITE_MUSIC_NOTE = 0x6d6, + ASSET_6D7_SPRITE_BLUE_EGGS, ASSET_6D9_SPRITE_PROPELLOR_TIMER = 0x6d9, ASSET_6DA_SPRITE_HOURGLASS, @@ -4704,6 +4737,15 @@ enum asset_e ASSET_FC0_DIALOG_GRUNTY_DOOR_HAVE_JIGGIES = 0xFC0, + // ASSET_101E_UNUSED + ASSET_101F_DIALOG_FF_BK_TILE_DIALOG = 0x101F, + ASSET_1020_DIALOG_FF_PICTURE_TILE_DIALOG, + ASSET_1021_DIALOG_FF_MUSIC_TILE_DIALOG, + ASSET_1022_DIALOG_FF_MINIGAME_TILE_DIALOG, + ASSET_1023_DIALOG_FF_GRUNTY_TILE_DIALOG, + ASSET_1024_DIALOG_FF_DEATH_TILE_DIALOG, + ASSET_1025_DIALOG_FF_JOKER_TILE_DIALOG, + ASSET_1032_DIALOG_FF_FIRST_ANSWER_CORRECT = 0x1032, ASSET_1033_DIALOG_FF_NEXT_ANSWER_CORRECT, ASSET_1034_DIALOG_FF_GRUNTY_ANSWER_CORRECT, @@ -4717,6 +4759,8 @@ enum asset_e ASSET_103C_DIALOG_FF_LOW_HEALTH, ASSET_103D_DIALOG_FF_LOW_HEALTH_ON_SKULL, + ASSET_1040_DIALOG_FURNACE_FUN_PICK_PRICE = 0x1040, + ASSET_10A1_DIALOG_BRENTILDA_MEET = 0x10A1, ASSET_10A2_DIALOG_BRENTILDA_HEAL, @@ -5171,7 +5215,7 @@ enum marker_e{ MARKER_A_CHIMPY, MARKER_C_ORANGE_PROJECTILE = 0xC, - + // MARKER_E MARKER_11_WADING_BOOTS = 0x11, MARKER_13_SNIPPET = 0x13, @@ -5188,10 +5232,9 @@ enum marker_e{ MARKER_25_CONCERT_FROG, MARKER_26_CONCERT_BIGBUTT, - MARKER_28_CLANKER_SAWBLADE = 0x28, - - MARKER_2A_WHISTLE_1_YELLOW = 0x2A, + MARKER_29_GRILLE_CHOMPA, + MARKER_2A_WHISTLE_1_YELLOW, MARKER_2B_WHISTLE_2_YELLOW, MARKER_2C_WHISTLE_3_YELLOW, MARKER_2D_WHISTLE_CTRL, @@ -5199,7 +5242,7 @@ enum marker_e{ MARKER_2F_ANCHOR_SWITCH, MARKER_30_SNORKEL, MARKER_31_ANCHOR, - MARKER_32_PLAYER_SHADOW = 0x32, + MARKER_32_PLAYER_SHADOW, MARKER_33_LEAKY, MARKER_34_CEMETARY_POT, @@ -5221,13 +5264,13 @@ enum marker_e{ MARKER_4D_CLANKER_JIGGY_TOOTH_EXT, MARKER_4E_CLANKER_TOKEN_TOOTH, MARKER_4F_CLANKER_JIGGY_TOOTH, - MARKER_50_BEEHIVE = 0x50, + MARKER_50_BEEHIVE, MARKER_51_MM_HUT, MARKER_52_JIGGY, MARKER_53_EMPTY_HONEYCOMB, MARKER_55_HONEYCOMB = 0x55, - + MARKER_57_STEAM = 0x57, MARKER_58_WADING_BOOTS_TOUCH_SPARKLE, MARKER_59_TURBO_TRAINERS_TOUCH_SPARKLE, @@ -5294,7 +5337,7 @@ enum marker_e{ MARKER_B7_TUTORIAL_BOTTLES = 0xB7, MARKER_B8_MOLEHILL, - MARKER_B9_FP_SNOWMAN_BUTTON = 0xB9, + MARKER_B9_FP_SNOWMAN_BUTTON, MARKER_BA_XMAS_TREE, MARKER_BB_UNKNOWN, MARKER_BC_GOBI_1, @@ -5328,8 +5371,10 @@ enum marker_e{ MARKER_E1_BANJOS_BED = 0xE1, MARKER_E2_BANJOS_CHAIR, MARKER_E3_BANJOS_STOVE, - - MARKER_E7_DINING_DOOR = 0xE7, + MARKER_E4_CS_BK_SLEEPING, + MARKER_E5_CS_BK_GAMEBOY, + MARKER_E6_CS_BK_COOKING, + MARKER_E7_DINING_DOOR, MARKER_EA_LIGHTHOUSE_DOOR = 0xEA, MARKER_EB_GV_BANJO_DOOR, @@ -5352,33 +5397,45 @@ enum marker_e{ MARKER_FD_BGS_MAZE_SWITCH, MARKER_FE_MMM_CLOCK_SWITCH, MARKER_FF_HEDGE_GATE_RIGHT_LOCK_2, - - MARKER_100_SPENT_RED_FEATHER = 0x100, + MARKER_100_SPENT_RED_FEATHER, MARKER_101_SPENT_GOLD_FEATHER, - - MARKER_103_MM_WITCH_SWITCH = 0x103, + MARKER_102_NOTE_DOOR, + MARKER_103_MM_WITCH_SWITCH, MARKER_104_MMM_WITCH_SWITCH, MARKER_105_TTC_WITCH_SWITCH, MARKER_106_RBB_WITCH_SWITCH, MARKER_107_ENGINE_ROOM_DOOR, MARKER_108_CABIN_CLOSET_DOOR, - MARKER_109_BREAKABLE_BRICK_WALL = 0x109, + MARKER_109_BREAKABLE_BRICK_WALL, - MARKER_11B_WATER_LEVEL_SWITCH_1 = 0x11B, + MARKER_118_GRATE_TO_LEVEL_3_WATER_SWITCH = 0x118, + MARKER_119_GRATE_BETWEEN_MMM_AND_RBB_PUZZLES, + MARKER_11A_GRATE_TO_RBB_PUZZLE, + MARKER_11B_WATER_LEVEL_SWITCH_1, MARKER_11C_WATER_LEVEL_SWITCH_2, MARKER_11D_WATER_LEVEL_SWITCH_3, + MARKER_11E_ICE_BALL_TO_CHEATO, + MARKER_11F_RAREWARE_BOX, MARKER_121_GLASS_EYE = 0x121, MARKER_123_WINDOW = 0x123, MARKER_124_BOGGY_1, - - MARKER_127_BAT = 0x127, + MARKER_125_BOGGY_RACE_FLAG, + MARKER_126_BOGGY_RACE_FLAG, + MARKER_127_BAT, MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, MARKER_129_BAWL_THE_ONION_A, MARKER_12A_TOPPER_THE_CARROT_A, MARKER_12B_ATTACK_TUTORIAL, - + MARKER_12C_CCW_WINTER_SWITCH, + MARKER_12D_CCW_WINTER_SEASON_DOOR, + MARKER_12E_CCW_AUTUMN_SWITCH, + MARKER_12F_CCW_AUTUMN_SEASON_DOOR, + MARKER_130_CCW_SUMMER_SWITCH, + MARKER_131_CCW_SUMMER_SEASON_DOOR, + MARKER_132_CCW_SPRING_SWITCH, + MARKER_133_CCW_SPRING_SEASON_DOOR, MARKER_134_UNKNOWN = 0x134, MARKER_135_QUARRIE, @@ -5386,32 +5443,48 @@ enum marker_e{ MARKER_13E_CUCKOO_CLOCK, MARKER_15F_RBB_HONEYCOMB_SWITCH = 0x15F, - - MARKER_161_GV_WITCH_SWITCH = 0x161, + MARKER_160_GL_SARCOPHAGUS, + MARKER_161_GV_WITCH_SWITCH, MARKER_162_BGS_WITCH_SWITCH, - - MARKER_166_CC_WITCH_SWITCH = 0x166, + MARKER_163_CRYPT_COFFIN_LID, + MARKER_164_GL_GRUNTY_FLOOR_PICTURE_EYE_1, + MARKER_165_GL_GRUNTY_FLOOR_PICTURE_EYE_2, + MARKER_166_CC_WITCH_SWITCH, MARKER_167_SHARKFOOD_ISLAND, MARKER_168_ICE_KEY, MARKER_169_SNS_EGG, MARKER_16B_SNIPPET_UPSIDEDOWN = 0x16B, MARKER_16C_NIPPER, - - MARKER_173_CHUMP_FISH_2 = 0x173, - MARKER_174_GAME_OVER = 0x174, + MARKER_16D_CHEATO_1, + MARKER_16E_CHEATO_2, + MARKER_16F_CHEATO_3, + MARKER_170_BLUE_EGG_REFILL_PILLOW, + MARKER_171_RED_FEATHER_REFILL_PILLOW, + MARKER_172_GOLD_FEATHER_REFILL_PILLOW, + MARKER_173_CHUMP_FISH_2, + MARKER_174_GAME_OVER, MARKER_176_COPYRIGHT_OVERLAY = 0x176, MARKER_177_PRESS_START_OVERLAY, MARKER_178_NO_CONTROLLER_OVERLAY, - MARKER_182_RBB_EGG_TOLL = 0x182, + MARKER_17D_IRON_GATE_NO_LOCK = 0x17D, - MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER = 0x185, + MARKER_182_RBB_EGG_TOLL = 0x182, + MARKER_183_RBB_EGG_TOLL, + MARKER_184_RBB_EGG_TOLL, + + MARKER_185_RBB_REAR_PROPELLER = 0x185, + MARKER_186_RBB_GREEN_PROPELLER_SWITCH, MARKER_191_ENGINE_ROOM_PROPELLOR_1 = 0x191, MARKER_192_ENGINE_ROOM_PROPELLOR_2, MARKER_193_ENGINE_ROOM_PROPELLOR_3, + MARKER_194_RBB_GREY_PROPELLER_SWITCH, + MARKER_195_WHISTLE_SWITCH_1, + MARKER_196_WHISTLE_SWITCH_2, + MARKER_197_WHISTLE_SWITCH_3, MARKER_19A_TIPTUP = 0x19A, MARKER_19B_CHOIR_TURTLE_YELLOW, @@ -5424,32 +5497,42 @@ enum marker_e{ MARKER_1A2_BOSS_BOOM_BOX_LARGE, MARKER_1A3_BOSS_BOOM_BOX_MEDIUM , MARKER_1A4_BOSS_BOOM_BOX_SMALL, + MARKER_1A5_SANDYBUTT_EGG_TOLL, + MARKER_1A6_BETA_VENT, + MARKER_1A7_CLANKER_WHIPCRACK, - MARKER_1A7_CLANKER_WHIPCRACK = 0x1A7, + MARKER_1A9_CC_BREAKABLE_GRATES = 0x1A9, + + MARKER_1AC_ZUBBA_DOOR = 0x1AC, MARKER_1AE_ZUBBA = 0x1AE, - MARKER_1B1_CCW_GOBI = 0x1B1, + MARKER_1B0_CCW_BEANSTALK = 0x1B0, + MARKER_1B1_CCW_GOBI, MARKER_1B2_CLUCKER_A, - - MARKER_1B4_EEYRIE_BABY = 0x1B4, + MARKER_1B3_EAGLE_EGG, + MARKER_1B4_EEYRIE_BABY, MARKER_1B5_CATERPILLAR, MARKER_1B7_BOOM_BOX = 0x1B7, MARKER_1BB_NABNUT = 0x1BB, + MARKER_1BF_GNAWTY_BOULDER = 0x1BF, + MARKER_1C5_WHIPCRACK = 0x1C5, MARKER_1CD_GV_MAZE_CTRL = 0x1CD, - MARKER_1D0_CLUCKER_B = 0x1D0, + MARKER_1CF_GRILLE_CHOMPA_ATTACKING = 0x1CF, + MARKER_1D0_CLUCKER_B, MARKER_1D1_PORTRAIT_CHOMPA_B, MARKER_1D4_SANDYBUTT_PYRAMID = 0x1D4, MARKER_1D5_PALM_TREE, - MARKER_1E1_FF_MINIGAME = 0x1E1, + MARKER_1E0_BRENTILDA = 0x1E0, + MARKER_1E1_FF_MINIGAME, MARKER_1E2_GRUBLIN_HOOD, MARKER_1E3_VACATION_TEXT_TRIGGER, @@ -5508,12 +5591,13 @@ enum marker_e{ MARKER_22E_SHIP_SUNNY_WINDOW, MARKER_22F_SUNNY_LIFEBOAT, MARKER_230_SHADOW_LIFEBOAT, - - - MARKER_231_WARP_CAULDRON = 0x231, + MARKER_231_WARP_CAULDRON, MARKER_235_CRACKED_SKYLIGHT = 0x235, - + MARKER_236_CCW_UNKNOWN_NABNUT_WINDOW, + MARKER_237_CCW_AUTUMN_NABNUT_WINDOW, + MARKER_238_CCW_WINTER_NABNUT_WINDOW, + MARKER_239_CCW_UNKNOWN_NABNUT_WINDOW, MARKER_23A_GV_SNS_CHAMBER_DOOR = 0x23A, MARKER_23B_GV_SNS_SARCOPHAGUS, MARKER_23C_GV_SNS_SWITCH, @@ -5538,10 +5622,12 @@ enum marker_e{ MARKER_25B_PORTRAIT_OF_MINION, MARKER_25C_GRUNTY_SPELL_FIREBALL, MARKER_25D_GREEN_BLAST, - MARKER_25E_GRUNTILDA_FINAL_BOSS, + MARKER_25E_GRUNTILDA_FINAL_BOSS_VULNERABLE, MARKER_25F_ICECUBE_B, + MARKER_260_GRUNTY_PHASE_1_2_MOVING, + MARKER_261_FIGHT_FLIGHT_PAD, - MARKER_261_FIGHT_FLIGHT_PAD = 0x261, + MARKER_263_CCW_WHIPCRACK_ROOM_DOOR = 0x263, MARKER_267_LIGHTHOUSE_A = 0x267, MARKER_268_STAIRS_1, @@ -5558,8 +5644,10 @@ enum marker_e{ MARKER_27F_JINJONATOR_STATUE_BASE, MARKER_280_GRUNTY_SPELL_GREEN_ATTACK = 0x280, - - MARKER_284_GRUNTY_SPELL_BARRIER = 0x284, + MARKER_281_GRUNTY_PHASE_2_VULNERABLE, + MARKER_282_GRUNTY_PHASE_3_FLIGHT, + MARKER_283_GRUNTY_PHASE_4_5_INVULNERABLE, + MARKER_284_GRUNTY_SPELL_BARRIER, MARKER_285_JINJONATOR, MARKER_288_GRUNTY_SHADOW = 0x288, @@ -5571,7 +5659,9 @@ enum marker_e{ MARKER_29A_FF_PRIZE = 0x29A, - MARKER_29D_ROCK_TRAPPING_GRUNTY = 0x29D + MARKER_29C_FURNACE_FUN_PICK_PRICE = 0x29C, + MARKER_29D_ROCK_TRAPPING_GRUNTY, + MARKER_29E_BIGBUTT_KNOCKED_DOWN }; enum hitbox_e{ diff --git a/include/functions.h b/include/functions.h index ec716a68..20d6bd4e 100644 --- a/include/functions.h +++ b/include/functions.h @@ -493,7 +493,7 @@ extern void spawnableActorList_addIfMapVisited(ActorInfo *arg0, Actor *(*arg1)(s extern void marker_setActorUpdateFunc(ActorMarker *marker, ActorUpdateFunc method); extern void marker_setActorUpdate2Func(ActorMarker *marker, ActorUpdateFunc method); extern void marker_callCollisionFunc(ActorMarker *, ActorMarker *, enum marker_collision_func_type_e); -extern enum marker_collision_func_type_e func_8033D574(struct5Cs *arg0); +extern enum marker_collision_func_type_e collision_getNextState(CollisionParams *arg0); extern s32 volatileFlag_get(enum volatile_flags_e); extern s32 volatileFlag_getN(enum volatile_flags_e index, s32 numBits); extern s32 volatileFlag_getAndSet(enum volatile_flags_e index, s32 arg1); diff --git a/include/prop.h b/include/prop.h index fa4b26f2..5a7b24d7 100644 --- a/include/prop.h +++ b/include/prop.h @@ -9,57 +9,87 @@ #include "core2/skeletalanim.h" typedef struct sprite_prop_s{ - u32 sprite_index:0xC; - u32 unk0_19:0x1; - u32 r:0x3; - u32 b:0x3; - u32 g:0x3; - u32 scale:0x8; - u32 mirrored:0x1; - s16 unk4[3]; + u32 spriteId:12; + u32 unk0_19:1; + u32 rgb_remove_red:3; + u32 rgb_remove_green:3; + u32 rgb_remove_blue:3; + u32 scale:8; + u32 isMirrored:1; + u32 pad0_0: 1; + union + { + s16 position[3]; + struct { + s16 position_x; + s16 position_y; + s16 position_z; + }; + }; u16 frame: 5; u16 unk8_10: 5; - u16 unk8_5: 1; - u16 unk8_4: 1; - u16 unk8_3: 1; - u16 unk8_2: 1; - u16 is_3d:1; - u16 is_actor:1; + u16 unk8_5: 1; // other structs use this to determine whether it's mirrored, however for sprites another bit address is used + u16 isNotFeatherEggOrNote: 1; + u16 unk8_3: 1; // is initialized? + u16 isCollisionResolved: 1; + u16 isModelProp:1; // always false for this struct + u16 isActorProp:1; // always false for this struct } SpriteProp; +#define SPRITE_ASSET_OFFSET 0x572 + typedef struct model_prop_s{ union{ u16 unk0; struct{ - u16 model_index:12; + u16 modelId:12; u16 pad0_19:4; }; }; u8 yaw; u8 roll; - s16 position[3]; + union + { + s16 position[3]; + struct { + s16 position_x; + s16 position_y; + s16 position_z; + }; + }; u8 scale; - u8 padB_7 :2; - u8 unkB_5 :1; - u8 unkB_4 :1; - u8 padB_3 :4; + u8 padB_7:2; + u8 unkB_5:1; + u8 unkB_4:1; + u8 unk8_3:1; // is initialized? + u8 isCollisionResolved:1; + u8 isModelProp:1; // always true for this struct + u8 isActorProp:1; // always false for this struct } ModelProp; +#define MODEL_ASSET_OFFSET 0x2D1 + typedef struct actor_prop_s{ union { struct { struct actorMarker_s* marker; - s16 x; - s16 y; - s16 z; - u16 unk8_15:5; + union + { + s16 position[3]; // position_ + struct { + s16 position_x; + s16 position_y; + s16 position_z; + }; + }; + u16 frame:5; u16 unk8_10:5; - u16 unk8_5:1; - u16 unk8_4:1; - u16 unk8_3:1; - u16 unk8_2:1; - u16 is_3d:1; - u16 is_actor:1; + u16 isMirrored:1; + u16 isNotFeatherEggOrNote:1; + u16 unk8_3:1; // is initialized? + u16 isCollisionResolved:1; + u16 isModelProp:1; // always false for this struct + u16 isActorProp:1; // always true for this struct }; s32 words[3]; }; @@ -326,36 +356,49 @@ typedef union prop_s ModelProp modelProp; struct{ u32 pad0; - s16 unk4[3]; - // s16 unk6; - s16 pad8_15: 10; - u16 unk8_5: 1; - u16 unk8_4: 1; - u16 unk8_3: 1; - u16 unk8_2: 1; - u16 is_3d: 1; - u16 is_actor: 1; + union + { + s16 position[3]; + struct { + s16 position_x; + s16 position_y; + s16 position_z; + }; + }; + s16 pad8_15:10; + u16 isMirrored:1; + u16 isNotFeatherEggOrNote:1; + u16 unk8_3:1; // is initialized? + u16 isCollisionResolved:1; + u16 isModelProp:1; + u16 isActorProp:1; }; } Prop; typedef struct { - s16 x; - s16 y; - s16 z; - u16 radius: 9; // selector / volume / diameter? - u16 bit6: 6; // category? - u16 bit0: 1; - u16 unk8; //actor_id? - u8 unkA; //marker_id + union + { + s16 position[3]; + struct { + s16 position_x; + s16 position_y; + s16 position_z; + }; + }; + u16 selector_or_radius:9; // selector / volume / diameter? + u16 category:6; + u16 bit0:1; + u16 actorId; + u8 markerId; u8 padB; - u32 yaw: 9; // unkC_31 - u32 scale: 23; // unkC_22 - u32 unk10_31: 12; // unk10_31 and unk10_19 seem to be related - u32 unk10_19: 12; // unk10_31 and unk10_19 seem to be related - u32 pad10_7: 1; - u32 unk10_6: 1; // isInitialized flag? - u32 pad10_5: 4; - u32 unk10_0: 2; // is only for used in func_803303B8 + u32 yaw:9; + u32 scale:23; + u32 unk10_31:12; // unk10_31 and unk10_19 seem to be related + u32 unk10_19:12; // unk10_31 and unk10_19 seem to be related + u32 pad10_7:1; + u32 unk10_6:1; // isInitialized flag? + u32 pad10_5:4; + u32 unk10_0:2; // is only for used in func_803303B8 } NodeProp; // size = 20 (0x14) bytes typedef struct { diff --git a/include/structs.h b/include/structs.h index 743e36d1..8d28d2f1 100644 --- a/include/structs.h +++ b/include/structs.h @@ -501,13 +501,13 @@ typedef struct { }struct5Bs; typedef struct{ - u16 unk0_15 : 4; - u16 unk0_11 : 2; - u16 unk0_9 : 3; - u16 unk0_6 : 2; - u16 unk0_4 : 3; - u16 unk0_1 : 2; -}struct5Cs; + u16 playerInteraction:4; + u16 nextState:2; + u16 unkBit7:3; + u16 damageToPlayer:2; + u16 hitsToTrigger:3; // 1 / hitsToTrigger = % of health of enemy taken away + u16 dropBundleNum:2; +}CollisionParams; typedef struct struct_5d_s{ s32 unk0; diff --git a/manual_syms.pal.txt b/manual_syms.pal.txt index 75aac873..bda303c9 100644 --- a/manual_syms.pal.txt +++ b/manual_syms.pal.txt @@ -395,10 +395,10 @@ savedata_8033CA9C = 0x8033ceec; savedata_8033CE40 = 0x8033d15c; func_8033D2F4 = 0x8033d744; func_8033D410 = 0x8033d860; -func_8033D564 = 0x8033d9b4; -func_8033D574 = 0x8033d9c4; -func_8033D594 = 0x8033d9e4; -func_8033D5A4 = 0x8033d9f4; +collision_getPlayerInteraction = 0x8033d9b4; +collision_getNextState = 0x8033d9c4; +collision_getDamageToPlayer = 0x8033d9e4; +collision_getHitsToTrigger = 0x8033d9f4; time_setDeltaReal_frames = 0x8033e154; time_getDeltaReal_frames = 0x8033e1e0; time_getDelta = 0x8033e1ec; diff --git a/src/BGS/ch/croctus.c b/src/BGS/ch/croctus.c index 909042d6..dd4ab026 100644 --- a/src/BGS/ch/croctus.c +++ b/src/BGS/ch/croctus.c @@ -94,7 +94,7 @@ void func_80387E68(ActorMarker *caller, enum asset_e text_id, s32 arg2){ func_80324D2C(4.5f, COMUSIC_43_ENTER_LEVEL_GLITTER); subaddie_set_state_with_direction(this, 5, 0.79f, 1); func_80326310(this); //did not disappear when moved, after cutscene still there with collision but broken - bgs_D_803907B8[this->actorTypeSpecificField]->propPtr->unk8_4 = TRUE; + bgs_D_803907B8[this->actorTypeSpecificField]->propPtr->isNotFeatherEggOrNote = TRUE; timedFunc_set_1(1.1f, (GenFunction_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->actorTypeSpecificField])); timed_setStaticCameraToNode(0.8f, 9); func_80324DBC(3.4f, ASSET_C87_DIALOG_CROCTUS_SECOND_SPAWN, 0xE, NULL, NULL, func_80387E68, NULL); @@ -119,7 +119,7 @@ void chCroctus_updat(Actor *this){ bgs_D_803907B8[this->actorTypeSpecificField - 1] = this->marker; for(j = this->actorTypeSpecificField; j < 6; j++){ if(bgs_D_803907B8[j] != NULL){ - bgs_D_803907B8[j]->propPtr->unk8_4 = FALSE; + bgs_D_803907B8[j]->propPtr->isNotFeatherEggOrNote = FALSE; actor_setOpacity(marker_getActor(bgs_D_803907B8[j]), 0); } }//L803880C8 @@ -128,7 +128,7 @@ void chCroctus_updat(Actor *this){ if(j >= 0){ - this->marker->propPtr->unk8_4 = FALSE; + this->marker->propPtr->isNotFeatherEggOrNote = FALSE; actor_setOpacity(this, 0); } this->marker->propPtr->unk8_3 = TRUE; @@ -157,7 +157,7 @@ void chCroctus_updat(Actor *this){ func_80326310(this); } if (this->actorTypeSpecificField < 5) { - bgs_D_803907B8[this->actorTypeSpecificField]->propPtr->unk8_4 = TRUE; + bgs_D_803907B8[this->actorTypeSpecificField]->propPtr->isNotFeatherEggOrNote = TRUE; timedFunc_set_1(1.1f, (GenFunction_1)func_80387E00, reinterpret_cast(s32, bgs_D_803907B8[this->actorTypeSpecificField])); gcStaticCamera_activate(D_803907B0[this->actorTypeSpecificField-1]); } else { diff --git a/src/CC/code_3400.c b/src/CC/code_3400.c index 1dd6ffe3..345b43a5 100644 --- a/src/CC/code_3400.c +++ b/src/CC/code_3400.c @@ -13,21 +13,21 @@ void func_80389900(Actor *this); u8 D_80389E40[] = {3, 3, 2, 0}; ActorInfo D_80389E44 = { - 0x1A9, 0x28C, 0x435, + MARKER_1A9_CC_BREAKABLE_GRATES, 0x28C, ASSET_435_MODEL_CC_GREEN_GRATE, 0, NULL, func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389E68 = { - 0x1A9, 0x28D, 0x436, + MARKER_1A9_CC_BREAKABLE_GRATES, 0x28D, ASSET_436_MODEL_CC_TEAL_GRATE, 0, NULL, func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80389E8C = { - 0x1A9, 0x28E, 0x437, + MARKER_1A9_CC_BREAKABLE_GRATES, 0x28E, 0x437, 0, NULL, func_80389900, NULL, actor_draw, 0, 0, 0.0f, 0 diff --git a/src/CCW/ch/grublinhood.c b/src/CCW/ch/grublinhood.c index d726154e..4d2a7701 100644 --- a/src/CCW/ch/grublinhood.c +++ b/src/CCW/ch/grublinhood.c @@ -23,7 +23,7 @@ typedef struct { u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 season:28; s16 unk10; @@ -120,7 +120,7 @@ void __chgrublinhood_initialize(Actor *this){ local->unk9 = 0xC; local->unkA = 0x10; local->unkB = 8; - local->unkC_31 = 1; + local->yaw = 1; local->unk10 = 0x29; local->unk12 = 25000; local->unkC_28 = 1; diff --git a/src/CCW/code_0.c b/src/CCW/code_0.c index 48e2c3a9..9084afa1 100644 --- a/src/CCW/code_0.c +++ b/src/CCW/code_0.c @@ -4,14 +4,25 @@ void func_803864B8(Actor *this); -ActorInfo D_8038EB50 = { 0x1AC, 0x298, 0x444, 0x0, NULL, func_803864B8, NULL, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_8038EB74 = { 0x1AC, 0x29A, 0x445, 0x0, NULL, func_803864B8, NULL, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038EB50 = { + MARKER_1AC_ZUBBA_DOOR, ACTOR_298_ZUBBA_DOOR, ASSET_444_MODEL_CCW_ZUBBA_DOOR, + 0x0, NULL, + func_803864B8, NULL, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038EB74 = { + MARKER_1AC_ZUBBA_DOOR, ACTOR_29A_ZUBBA_DOOR, ASSET_445_MODEL_CCW_ZUBBA_DOOR, + 0x0, NULL, + func_803864B8, NULL, actor_draw, + 0, 0, 0.0f, 0 +}; /* .code */ void CCW_func_803863F0(Actor *this, s32 next_state){ if(next_state == 2){ sfx_playFadeShorthandDefault(SFX_2F_ORANGE_SPLAT, 1.0f, 32000, this->position, 500, 3000); - levelSpecificFlags_set(LEVEL_FLAG_10_CCW_UNKNOWN, TRUE); + levelSpecificFlags_set(LEVEL_FLAG_10_CCW_BREAK_ZUBBA_DOOR, TRUE); marker_despawn(this->marker); } this->state = next_state; @@ -31,7 +42,7 @@ void func_803864B8(Actor *this){ marker_setCollisionScripts(this->marker, NULL, NULL, func_80386468); CCW_func_803863F0(this, 1); - if (levelSpecificFlags_get(LEVEL_FLAG_10_CCW_UNKNOWN)) { + if (levelSpecificFlags_get(LEVEL_FLAG_10_CCW_BREAK_ZUBBA_DOOR)) { marker_despawn(this->marker); } } diff --git a/src/CCW/code_1B20.c b/src/CCW/code_1B20.c index 9765553d..ea8ca908 100644 --- a/src/CCW/code_1B20.c +++ b/src/CCW/code_1B20.c @@ -28,7 +28,13 @@ Struct_CCW_1B20_0 D_8038EC40[4] ={ {0x183, 1, 1, 0x000, 0x000, 0x00, 0} }; -ActorInfo D_8038EC70 = { 0x1B0, 0x29D, 0x447, 0x0, NULL, func_80388478, NULL, CCW_func_803882F4, 0, 0, 1.0f, 0}; +ActorInfo D_8038EC70 = { + MARKER_1B0_CCW_BEANSTALK, ACTOR_29D_CCW_BEANSTALK, ASSET_447_MODEL_CCW_BEANSTALK, + 0x0, NULL, + func_80388478, NULL, CCW_func_803882F4, + 0, 0, 1.0f, 0 +}; + f32 D_8038EC94[3] = {200.0f, 2120.0f, -5570.0f}; /* .code */ diff --git a/src/CCW/code_2B00.c b/src/CCW/code_2B00.c index 7e8eb07a..70198550 100644 --- a/src/CCW/code_2B00.c +++ b/src/CCW/code_2B00.c @@ -29,14 +29,61 @@ ActorAnimationInfo D_8038ED20[] = { {ASSET_D4_ANIM_SWITCH_DOWN, 100000000.0f} }; -ActorInfo D_8038ED50 = { 0x133, 0x1E3, 0x52E, 0x1, NULL, func_80389268, actor_update_func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038ED74 = { 0x132, 0x1E2, 0x4F5, 0x5, D_8038ED20, func_80388FD4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_8038ED98 = { 0x131, 0x16D, 0x52E, 0x1, NULL, func_80389268, actor_update_func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EDBC = { 0x130, 0x16C, 0x4F6, 0x5, D_8038ED20, func_80388FD4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_8038EDE0 = { 0x12F, 0x16B, 0x52E, 0x1, NULL, func_80389268, actor_update_func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EE04 = { 0x12E, 0x16A, 0x4F7, 0x5, D_8038ED20, func_80388FD4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_8038EE28 = { 0x12D, 0x169, 0x52E, 0x1, NULL, func_80389268, actor_update_func_80326224, actor_drawFullDepth, 0, 0x4000, 0.0f, 0}; -ActorInfo D_8038EE4C = { 0x12C, 0x168, 0x4F8, 0x5, D_8038ED20, func_80388FD4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; +ActorInfo D_8038ED50 = { + MARKER_133_CCW_SPRING_SEASON_DOOR, ACTOR_1E3_CCW_SPRING_SEASON_DOOR, ASSET_52E_MODEL_CCW_SEASON_DOOR, + 0x1, NULL, + func_80389268, actor_update_func_80326224, actor_drawFullDepth, + 0, 0x4000, 0.0f, 0 +}; + +ActorInfo D_8038ED74 = { + MARKER_132_CCW_SPRING_SWITCH, ACTOR_1E2_CCW_SPRING_SWITCH, ASSET_4F5_MODEL_CCW_SPRING_SWITCH, + 0x5, D_8038ED20, + func_80388FD4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038ED98 = { + MARKER_131_CCW_SUMMER_SEASON_DOOR, ACTOR_16D_CCW_SUMMER_SEASON_DOOR, ASSET_52E_MODEL_CCW_SEASON_DOOR, + 0x1, NULL, + func_80389268, actor_update_func_80326224, actor_drawFullDepth, + 0, 0x4000, 0.0f, 0 +}; + +ActorInfo D_8038EDBC = { + MARKER_130_CCW_SUMMER_SWITCH, ACTOR_16C_CCW_SUMMER_SWITCH, ASSET_4F6_MODEL_CCW_SUMMER_SWITCH, + 0x5, D_8038ED20, + func_80388FD4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038EDE0 = { + MARKER_12F_CCW_AUTUMN_SEASON_DOOR, ACTOR_16B_CCW_AUTUMN_SEASON_DOOR, ASSET_52E_MODEL_CCW_SEASON_DOOR, + 0x1, NULL, + func_80389268, actor_update_func_80326224, actor_drawFullDepth, + 0, 0x4000, 0.0f, 0 +}; + +ActorInfo D_8038EE04 = { + MARKER_12E_CCW_AUTUMN_SWITCH, ACTOR_16A_CCW_AUTUMN_SWITCH, ASSET_4F7_MODEL_CCW_AUTUMN_SWITCH, + 0x5, D_8038ED20, + func_80388FD4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038EE28 = { + MARKER_12D_CCW_WINTER_SEASON_DOOR, ACTOR_169_CCW_WINTER_SEASON_DOOR, ASSET_52E_MODEL_CCW_SEASON_DOOR, + 0x1, NULL, + func_80389268, actor_update_func_80326224, actor_drawFullDepth, + 0, 0x4000, 0.0f, 0 +}; + +ActorInfo D_8038EE4C = { + MARKER_12C_CCW_WINTER_SWITCH, ACTOR_168_CCW_WINTER_SWITCH, ASSET_4F8_MODEL_CCW_WINTER_SWITCH, + 0x5, D_8038ED20, + func_80388FD4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; /* .code */ s32 func_80388EF0(Actor *this){ diff --git a/src/CCW/code_3050.c b/src/CCW/code_3050.c index c0e777eb..7d523fdb 100644 --- a/src/CCW/code_3050.c +++ b/src/CCW/code_3050.c @@ -6,7 +6,12 @@ Actor *CCW_func_8038954C(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void func_803895F4(Actor *this); /* .data */ -ActorInfo D_8038EE70 = { 0x1B3, 0x2A0, 0x483, 0x0, NULL, func_803895F4, NULL, CCW_func_8038954C, 0, 0, 0.0f, 0}; +ActorInfo D_8038EE70 = { + MARKER_1B3_EAGLE_EGG, ACTOR_2A0_EAGLE_EGG, ASSET_483_MODEL_EAGLE_EGG, + 0x0, NULL, + func_803895F4, NULL, CCW_func_8038954C, + 0, 0, 0.0f, 0 +}; /* .code */ void func_80389440(Actor *this, s32 next_state) { diff --git a/src/CCW/code_3DA0.c b/src/CCW/code_3DA0.c index 4e33312a..3ba64db4 100644 --- a/src/CCW/code_3DA0.c +++ b/src/CCW/code_3DA0.c @@ -152,9 +152,9 @@ void chcaterpillar_update(Actor *this){ if(ml_vec3f_distance(this->position, sp74) < 50.0f){ func_8028F030(ACTOR_2A2_CATERPILLAR); - if(!volatileFlag_get(VOLATILE_FLAG_B2)){ + if(!volatileFlag_get(VOLATILE_FLAG_B2_HAS_COLLECTED_CATERPILLAR)){ gcdialog_showDialog(ASSET_CC7_DIALOG_CATERPILLAR_COLLECT, 4, NULL, NULL, NULL, NULL); - volatileFlag_set(VOLATILE_FLAG_B2, TRUE); + volatileFlag_set(VOLATILE_FLAG_B2_HAS_COLLECTED_CATERPILLAR, TRUE); } sfx_playFadeShorthandDefault(SFX_C5_TWINKLY_POP, 1.0f, 25000, this->position, 0x1f4, 0x9c4); marker_despawn(this->marker); diff --git a/src/CCW/code_7120.c b/src/CCW/code_7120.c index ce018c04..925f7656 100644 --- a/src/CCW/code_7120.c +++ b/src/CCW/code_7120.c @@ -10,7 +10,7 @@ void func_8038D85C(Actor *this); /* .data */ ActorInfo D_8038F640 = { - 0x1BF, 0x2AC, 0x490, + MARKER_1BF_GNAWTY_BOULDER, ACTOR_2AC_GNAWTY_BOULDER, ASSET_490_MODEL_GNAWTY_BOULDER, 0x0, NULL, func_8038D85C, NULL, actor_draw, 0, 0, 2.2f, 0 diff --git a/src/CCW/code_76C0.c b/src/CCW/code_76C0.c index 434b6978..4f9d0127 100644 --- a/src/CCW/code_76C0.c +++ b/src/CCW/code_76C0.c @@ -65,17 +65,82 @@ void CCW_func_8038DB0C(Actor *this); void func_8038DAB0(Actor *this); /* .data */ -ActorInfo D_8038F720 = { 0x239, 0x25F, 0x4FC, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F744 = { 0x236, 0x260, 0x4F9, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F768 = { 0x237, 0x261, 0x4FA, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F78C = { 0x238, 0x262, 0x4FB, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7B0 = { 0x243, 0x2E6, 0x533, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7D4 = { 0x263, 0x2E7, 0x518, 0x1, NULL, func_8038DAB0, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F7F8 = { 0x21E, 0x233, 0x3B3, 0x1, NULL, func_802D3D74, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F81C = { 0x26B, 0x2DE, 0x531, 0x1, NULL, CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F840 = { 0x26C, 0x2DD, 0x53E, 0x1, NULL, CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F864 = { 0x26D, 0x2DC, 0x53F, 0x1, NULL, CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8038F888 = { 0x1CC, 0x318, 0x0, 0x0, NULL, func_80325F84, NULL, func_80325340, 0, 0, 0.0f, 0}; +ActorInfo D_8038F720 = { + MARKER_239_CCW_UNKNOWN_NABNUT_WINDOW, 0x25F, ASSET_4FC_MODEL_CCW_UNKNOWN_NABNUT_WINDOW, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F744 = { + MARKER_236_CCW_UNKNOWN_NABNUT_WINDOW, 0x260, ASSET_4F9_MODEL_CCW_UNKNOWN_NABNUT_WINDOW, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F768 = { + MARKER_237_CCW_AUTUMN_NABNUT_WINDOW, 0x261, ASSET_4FA_MODEL_CCW_AUTUMN_NABNUT_WINDOW, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F78C = { + MARKER_238_CCW_WINTER_NABNUT_WINDOW, 0x262, ASSET_4FB_MODEL_CCW_WINTER_NABNUT_WINDOW, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F7B0 = { + 0x243, 0x2E6, 0x533, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F7D4 = { + MARKER_263_CCW_WHIPCRACK_ROOM_DOOR, 0x2E7, ASSET_518_MODEL_CCW_WHIPCRACK_ROOM_DOOR, + 0x1, NULL, + func_8038DAB0, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F7F8 = { + 0x21E, 0x233, 0x3B3, + 0x1, NULL, + func_802D3D74, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F81C = { + 0x26B, 0x2DE, 0x531, + 0x1, NULL, + CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F840 = { + 0x26C, 0x2DD, 0x53E, + 0x1, NULL, + CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F864 = { + 0x26D, 0x2DC, 0x53F, + 0x1, NULL, + CCW_func_8038DB0C, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8038F888 = { + 0x1CC, 0x318, 0x0, + 0x0, NULL, + func_80325F84, NULL, func_80325340, + 0, 0, 0.0f, 0 +}; /* .code */ diff --git a/src/CCW/code_7BC0.c b/src/CCW/code_7BC0.c index c8dbfcfb..bc031dc3 100644 --- a/src/CCW/code_7BC0.c +++ b/src/CCW/code_7BC0.c @@ -10,7 +10,8 @@ ActorAnimationInfo D_8038F8B0[] = { {0x234, 2.0f} }; -ActorInfo D_8038F8C0 = { 0x251, 0x37E, 0x506, +ActorInfo D_8038F8C0 = { + 0x251, 0x37E, 0x506, 0x1, D_8038F8B0, func_8038DFB0, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0 diff --git a/src/FP/ch/boggy2.c b/src/FP/ch/boggy2.c index 136a9d60..9a2e3688 100644 --- a/src/FP/ch/boggy2.c +++ b/src/FP/ch/boggy2.c @@ -53,7 +53,7 @@ ActorInfo gChBoggySled = { MARKER_97_BOGGY_2, ACTOR_C8_BOGGY_2, ASSET_38A_MODEL_ }; /* .bss */ -s32 D_80392F20[3]; +s32 D_80392F20[3]; // last position of Boggy (in race) /* .code */ Actor *func_80388740(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ @@ -322,43 +322,46 @@ void func_803890DC(Actor *this, u8 arg1){ } } -void func_803893E4(Actor *this, f32 arg1, u8 arg2){ +void func_803893E4(Actor *this, f32 arg1, u8 gameNumber){ ActorLocal_FP_2350 *local = (ActorLocal_FP_2350 *)&this->local; - f32 sp30; - f32 sp2C; - f32 sp28; - if((u8)arg2 != 2){ - sp30 = 575.0f; - sp2C = 780.0f; - sp28 = 1.7f; + f32 min_velocity; + f32 max_velocity; + f32 rubberband_factor; + if((u8)gameNumber != 2){ + min_velocity = 575.0f; + max_velocity = 780.0f; + rubberband_factor = 1.7f; } else{ - sp30 = 700.0f; - sp2C = 1100.0f; - sp28 = 2.3f; + min_velocity = 700.0f; + max_velocity = 1100.0f; + rubberband_factor = 2.3f; } func_80343DEC(this); if(this->state == 7){ + // Increase/decrease speed on downwards/upwards slopes this->unk4C += ((f32)D_80392F20[1] - this->position_y)*0.02; } else{ - this->unk4C += ((f32)D_80392F20[1] - this->position_y)*0.03 + sp28*maSlalom_compareBoggyToPlayer(this->position); + // Increase/decrease speed on downwards/upwards slopes + rubberbanding + this->unk4C += ((f32)D_80392F20[1] - this->position_y)*0.03 + rubberband_factor*maSlalom_compareBoggyToPlayer(this->position); } - if(this->unk4C < sp30){ - this->unk4C = sp30; + if(this->unk4C < min_velocity){ + this->unk4C = min_velocity; } - if(sp2C < this->unk4C){ - this->unk4C = sp2C; + if(max_velocity < this->unk4C){ + this->unk4C = max_velocity; } - if((u8)arg2 == 2 && player_movementGroup() != BSGROUP_6_TURBO_TALON_TRAINERS){ + if((u8)gameNumber == 2 && player_movementGroup() != BSGROUP_6_TURBO_TALON_TRAINERS){ + // Fixed high velocity if second minigame runs but player doesn't wear the turbo trainers. this->unk4C = 1200.0f; } - local->unk8 = ((this->unk4C - sp30)/(sp2C - sp30))*(0.6000000000000001) + 0.7; - func_803890DC(this, (u8)(arg2)); + local->unk8 = ((this->unk4C - min_velocity)/(max_velocity - min_velocity))*(0.6000000000000001) + 0.7; + func_803890DC(this, (u8)(gameNumber)); } void func_803895E0(void){ @@ -387,7 +390,7 @@ void func_803895E0(void){ : cubeList_findNodePropByActorIdAndPosition_s32(D_80391DB8[i].unk0, D_80391DAC); nodeprop_getPosition(s0, sp64); - f20 = (f32)nodeprop_getYaw(s0); + f20 = (f32)nodeProp_getYaw(s0); f8 = (f32)nodeprop_getScale(s0); f22 = f8*0.01; actor = actor_spawnWithYaw_f32(D_80391DB8[i].actor_id, sp64, (s32)f20); diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index 4aaa1235..a90fb0bd 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -66,9 +66,9 @@ Actor *func_8038C0B0(ActorMarker *marker, UNK_TYPE(s32) arg1, f32 arg2, UNK_TYPE f32 sp40[3]; f32 sp3C; - sp4C[0] = (f32)marker->propPtr->x; - sp4C[1] = (f32)marker->propPtr->y; - sp4C[2] = (f32)marker->propPtr->z; + sp4C[0] = (f32)marker->propPtr->position_x; + sp4C[1] = (f32)marker->propPtr->position_y; + sp4C[2] = (f32)marker->propPtr->position_z; sp40[0] = (f32)marker->pitch; sp40[1] = this->lifetime_value; diff --git a/src/FP/ch/twinklymuncher.c b/src/FP/ch/twinklymuncher.c index 71769b4c..7e0e45dc 100644 --- a/src/FP/ch/twinklymuncher.c +++ b/src/FP/ch/twinklymuncher.c @@ -76,7 +76,7 @@ Actor *func_8038DF34(Actor *this){ this->marker->unk38[2] = sp18[2] - this->position[2]; prop = func_80320EB0(this->marker, 75.0f, 1); - if(prop && prop->is_actor){ + if(prop && prop->isActorProp){ other = marker_getActor(prop->marker); marker_id = other->marker->id; if( marker_id == MARKER_200_TWINKLY_BLUE diff --git a/src/FP/ch/wozza.c b/src/FP/ch/wozza.c index bb9efc74..c38b6608 100644 --- a/src/FP/ch/wozza.c +++ b/src/FP/ch/wozza.c @@ -10,6 +10,8 @@ typedef struct { u8 unk30; } ActorLocal_Wozza; +Actor *chWozza_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); +void chWozza_update(Actor *this); Actor *chWozza_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); void chWozza_update(Actor *this); @@ -100,7 +102,10 @@ void chWozza_returnFromCave(Actor *this){ } void chWozza_firstContact(Actor *this){ - if(!mapSpecificFlags_get(FP_SPECIFIC_FLAG_7_WOZZA_FIRST_CONTACT) && player_movementGroup() != BSGROUP_A_FLYING && subaddie_playerIsWithinSphereAndActive(this, 1000) ){ + if(!mapSpecificFlags_get(FP_SPECIFIC_FLAG_7_WOZZA_FIRST_CONTACT) && + player_movementGroup() != BSGROUP_A_FLYING && + subaddie_playerIsWithinSphereAndActive(this, 1000)) + { mapSpecificFlags_set(FP_SPECIFIC_FLAG_7_WOZZA_FIRST_CONTACT, TRUE); subaddie_set_state(this, 2); actor_loopAnimation(this); diff --git a/src/FP/code_19E0.c b/src/FP/code_19E0.c index 8e1576d0..5d0c01e6 100644 --- a/src/FP/code_19E0.c +++ b/src/FP/code_19E0.c @@ -21,7 +21,7 @@ ActorAnimationInfo D_80391C00[] = { }; ActorInfo D_80391C18 = { - 0x125, 0x161, 0x38b, + MARKER_125_BOGGY_RACE_FLAG, ACTOR_161_BOGGY_RACE_FLAG, ASSET_38B_MODEL_BOGGY_RACE_FLAG, 0x1, D_80391C00, func_803881AC, actor_update_func_80326224, func_80387DD0, 0, 0, 0.35f, 0 diff --git a/src/FP/code_1FF0.c b/src/FP/code_1FF0.c index 69ea8d95..4e62ec4c 100644 --- a/src/FP/code_1FF0.c +++ b/src/FP/code_1FF0.c @@ -16,7 +16,7 @@ ActorAnimationInfo D_80391C40[] = { }; ActorInfo D_80391C58 = { - 0x126, 0x162, 0x38B, + MARKER_126_BOGGY_RACE_FLAG, ACTOR_162_BOGGY_RACE_FLAG, ASSET_38B_MODEL_BOGGY_RACE_FLAG, 0x1, D_80391C40, func_80388584, actor_update_func_80326224, func_803883E0, 0, 0, 0.35f, 0 diff --git a/src/FP/code_ABD0.c b/src/FP/code_ABD0.c index b07627ea..2c8a3403 100644 --- a/src/FP/code_ABD0.c +++ b/src/FP/code_ABD0.c @@ -212,7 +212,7 @@ void func_80391744(Actor *this, Actor* other){ f32 tmp_f0; sp24 = nodeprop_findByActorIdAndActorPosition(0x22A, this); - tmp_f0 = (f32)nodeprop_getYaw(sp24); + tmp_f0 = (f32)nodeProp_getYaw(sp24); other->yaw = tmp_f0; this->yaw = tmp_f0; ml_vec3f_yaw_rotate_copy(sp28, sp34, tmp_f0); diff --git a/src/GV/ch/ancientone.c b/src/GV/ch/ancientone.c index 9093e569..d01c6ca7 100644 --- a/src/GV/ch/ancientone.c +++ b/src/GV/ch/ancientone.c @@ -126,7 +126,7 @@ void chAncientOne_update(Actor *this){ this->position_y -= 1100.0f; D_80390C28[this->actorTypeSpecificField - 1] = this->marker; if(this->actorTypeSpecificField != 1){ - this->marker->propPtr->unk8_4 = FALSE; + this->marker->propPtr->isNotFeatherEggOrNote = FALSE; } this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); @@ -166,7 +166,7 @@ void chAncientOne_update(Actor *this){ actor_playAnimationOnce(this); if(this->actorTypeSpecificField < 5){ - D_80390C28[this->actorTypeSpecificField]->propPtr->unk8_4 = TRUE; + D_80390C28[this->actorTypeSpecificField]->propPtr->isNotFeatherEggOrNote = TRUE; gcStaticCamera_activate(GV_D_80390C20[this->actorTypeSpecificField - 1]); core1_7090_initSfxSource(2, 0x86, 0x7ff8, 0.3f); timedFunc_set_0(0.45f, func_8038678C); @@ -208,7 +208,7 @@ void chAncientOne_update(Actor *this){ this->position_y -= 10.0; } else{ - this->marker->propPtr->unk8_4 = FALSE; + this->marker->propPtr->isNotFeatherEggOrNote = FALSE; } break; }//L80386E60 diff --git a/src/GV/code_6F80.c b/src/GV/code_6F80.c index cd4d1641..6130eff6 100644 --- a/src/GV/code_6F80.c +++ b/src/GV/code_6F80.c @@ -5,7 +5,8 @@ void func_8038D3AC(Actor *this); /* .data */ -ActorInfo D_80391260 = { 0x1A5, 0x288, 0x402, +ActorInfo D_80391260 = { + MARKER_1A5_SANDYBUTT_EGG_TOLL, 0x288, ASSET_402_MODEL_EGG_TOLL, 0, NULL, func_8038D3AC, NULL, func_80325340, 0, 0, 0.0f, 0 diff --git a/src/GV/code_7FF0.c b/src/GV/code_7FF0.c index 6e99016b..b3695328 100644 --- a/src/GV/code_7FF0.c +++ b/src/GV/code_7FF0.c @@ -445,9 +445,9 @@ void func_8038F028(UNK_TYPE(s32) arg0, ActorMarker *arg1, s32 arg2, s32 arg3){ if(mapSpecificFlags_get(arg2) == FALSE){ mapSpecificFlags_set(arg2, 1); - sp24[0] = (f32)arg1->propPtr->x; - sp24[1] = (f32)arg1->propPtr->y; - sp24[2] = (f32)arg1->propPtr->z; + sp24[0] = (f32)arg1->propPtr->position_x; + sp24[1] = (f32)arg1->propPtr->position_y; + sp24[2] = (f32)arg1->propPtr->position_z; __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0x4e, reinterpret_cast(s32, sp24[0]), reinterpret_cast(s32, sp24[1]), reinterpret_cast(s32, sp24[2])); coMusicPlayer_playMusic(COMUSIC_2B_DING_B, 22000); if(mapSpecificFlags_get(arg3)){ diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index 78916e88..ea7d3121 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -193,7 +193,7 @@ void __chConga_sendOrangeProjectile(ActorMarker *congaMarker){ orangePtr->velocity_y = (60.0)*((conga_state == 7) ? 0.5: 1.0); orangePtr->velocity_z = plyr.pos_z - orangePtr->position_z; - if(SQ(plyr.pos_z - m->propPtr->z) + SQ(plyr.pos_x - m->propPtr->x) < 40000.0f ){ + if(SQ(plyr.pos_z - m->propPtr->position_z) + SQ(plyr.pos_x - m->propPtr->position_x) < 40000.0f ){ temp_f20 = randf2(2.4f, 4.4f); temp_f22 = randf2(2.4f, 4.4f); //f22 orangePtr->velocity[0] *= (randf() < 0.5)? temp_f20 : -temp_f20; orangePtr->velocity[1] = randf2(1.8f, 2.2f) * 60.0; diff --git a/src/MM/ch/grublin.c b/src/MM/ch/grublin.c index 016c1530..a960f523 100644 --- a/src/MM/ch/grublin.c +++ b/src/MM/ch/grublin.c @@ -10,7 +10,7 @@ typedef struct chgrublin_s{ u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 padC_27:28; s16 unk10; @@ -64,7 +64,7 @@ void func_80388A04(Actor *this){ local->unk4 = 2.3f; local->unk8 = 5; local->unk9 = 7; - local->unkC_31 = 2; + local->yaw = 2; local->unkA = 9; local->unkB = 9; local->unk10 = 0x29; diff --git a/src/MM/ch/jujuhitbox.c b/src/MM/ch/jujuhitbox.c index 66fcda0a..d4bca993 100644 --- a/src/MM/ch/jujuhitbox.c +++ b/src/MM/ch/jujuhitbox.c @@ -58,9 +58,9 @@ void func_80388BEC(NodeProp *node, ActorMarker *marker) { Actor *temp_v0; f32 position[3]; - position[0] = (f32) node->x; - position[1] = (f32) node->y; - position[2] = (f32) node->z; + position[0] = (f32) node->position_x; + position[1] = (f32) node->position_y; + position[2] = (f32) node->position_z; closest_actor = actorArray_findClosestActorFromActorId(position, ACTOR_11_JUJU_CTRL, -1, &distance_to_closest_actor); diff --git a/src/MM/ch/orangepad.c b/src/MM/ch/orangepad.c index d39acd46..3dc8b8d0 100644 --- a/src/MM/ch/orangepad.c +++ b/src/MM/ch/orangepad.c @@ -32,9 +32,9 @@ void handleOrangeCollision(ActorMarker *marker) { ParticleEmitter *p_ctrl; s32 camera_id; - position[0] = marker->propPtr->x; - position[1] = marker->propPtr->y; - position[2] = marker->propPtr->z; + position[0] = marker->propPtr->position_x; + position[1] = marker->propPtr->position_y; + position[2] = marker->propPtr->position_z; closest_orange_pad = actorArray_findClosestActorFromActorId(position, ACTOR_57_ORANGE_PAD, ORANGE_PAD_STATE_HIT, &distance_to_orange_pad); diff --git a/src/MMM/ch/loggo.c b/src/MMM/ch/loggo.c index 34f69d79..7d2bcaa3 100644 --- a/src/MMM/ch/loggo.c +++ b/src/MMM/ch/loggo.c @@ -102,12 +102,12 @@ void chLoggo_update(Actor *this) { } if (actor_animationIsAt(this, 0.6f)) { - func_8030E878(SFX_3F_CAULDRON_SQEAK_1, randf2(0.975f, 1.025f), MAX(0, 7000 - sp34), this->position, 400.0f, 1000.0f); + func_8030E878(SFX_3F_CAULDRON_SQUEAK_1, randf2(0.975f, 1.025f), MAX(0, 7000 - sp34), this->position, 400.0f, 1000.0f); break; } if (actor_animationIsAt(this, 0.16f)) { - func_8030E878(SFX_40_CAULDRON_SQEAK_2, randf2(0.975f, 1.025f), MAX(0, 7000 - sp34), this->position, 400.0f, 1000.0f); + func_8030E878(SFX_40_CAULDRON_SQUEAK_2, randf2(0.975f, 1.025f), MAX(0, 7000 - sp34), this->position, 400.0f, 1000.0f); break; } break; diff --git a/src/MMM/code_2040.c b/src/MMM/code_2040.c index 962521f7..351a0b9c 100644 --- a/src/MMM/code_2040.c +++ b/src/MMM/code_2040.c @@ -76,7 +76,7 @@ ActorInfo D_8038BC4C = { }; ActorInfo D_8038BC70 = { - MARKER_9A_1881_BARREL_TOP, ACTOR_CB_1881_BARREL_TOP, ASSET_3CC_MODEL_1881_BARREL_TOP, + MARKER_9A_1881_BARREL_TOP, ACTOR_CB_1881_BARREL_TOP, ASSET_3CC_MODEL_1881_BARREL_TOP, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 diff --git a/src/RBB/ch/anchor.c b/src/RBB/ch/anchor.c index 716a50ae..c83c3009 100644 --- a/src/RBB/ch/anchor.c +++ b/src/RBB/ch/anchor.c @@ -6,7 +6,8 @@ void func_8038BF28(Actor *this); /* .data */ ActorInfo RBB_D_80390AE0 = { - MARKER_31_ANCHOR, ACTOR_1C9_ANCHOR, ASSET_41D_MODEL_ANCHOR, 0x0, NULL, + MARKER_31_ANCHOR, ACTOR_1C9_ANCHOR, ASSET_41D_MODEL_ANCHOR, + 0x0, NULL, func_8038BF28, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/anchorswitch.c b/src/RBB/ch/anchorswitch.c index 31013066..ae701d6c 100644 --- a/src/RBB/ch/anchorswitch.c +++ b/src/RBB/ch/anchorswitch.c @@ -6,7 +6,8 @@ void chAnchorSwitch_update(Actor *this); /* .data */ ActorInfo D_80390A80 = { - MARKER_2F_ANCHOR_SWITCH, ACTOR_1C7_ANCHOR_SWITCH, ASSET_41B_MODEL_ANCHOR_SWITCH, 0x0, NULL, + MARKER_2F_ANCHOR_SWITCH, ACTOR_1C7_ANCHOR_SWITCH, ASSET_41B_MODEL_ANCHOR_SWITCH, + 0x0, NULL, chAnchorSwitch_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/dolphin.c b/src/RBB/ch/dolphin.c index 5626aecb..82b445e2 100644 --- a/src/RBB/ch/dolphin.c +++ b/src/RBB/ch/dolphin.c @@ -8,7 +8,8 @@ void func_8038B900(Actor *this); /* .data */ ActorInfo RBB_D_80390AB0 = { - MARKER_30_SNORKEL, ACTOR_1C8_SNORKEL, ASSET_41C_MODEL_SNORKEL, 0x0, NULL, + MARKER_30_SNORKEL, ACTOR_1C8_SNORKEL, ASSET_41C_MODEL_SNORKEL, + 0x0, NULL, NULL, func_8038B900, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/enginefanswitch.c b/src/RBB/ch/enginefanswitch.c index dc4740fb..8ae5ee6e 100644 --- a/src/RBB/ch/enginefanswitch.c +++ b/src/RBB/ch/enginefanswitch.c @@ -6,7 +6,8 @@ void chEngineFanSwitch_update(Actor *this); /* .data */ ActorInfo D_803906B0 = { - 0x194, 0x1BE, 0x412, 0x0, NULL, + MARKER_194_RBB_GREY_PROPELLER_SWITCH, 0x1BE, ASSET_412_MODEL_RBB_GREY_PROPELLER_SWITCH, + 0x0, NULL, chEngineFanSwitch_update, NULL, actor_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/propellor.c b/src/RBB/ch/propellor.c index 627396c9..28ce8725 100644 --- a/src/RBB/ch/propellor.c +++ b/src/RBB/ch/propellor.c @@ -14,7 +14,7 @@ void chPropellor_update(Actor *this); /* .data */ ActorInfo D_803906E0 = { - MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER, + MARKER_185_RBB_REAR_PROPELLER, ACTOR_175_MODEL_RUSTY_BUCKET_REAR_PROPELLER, ASSET_403_MODEL_RUSTY_BUCKET_REAR_PROPELLER, 0x0, NULL, chPropellor_update, NULL, actor_draw, 0, 0, 0.0f, 0 diff --git a/src/RBB/ch/propellorswitch.c b/src/RBB/ch/propellorswitch.c index fa292111..dd907291 100644 --- a/src/RBB/ch/propellorswitch.c +++ b/src/RBB/ch/propellorswitch.c @@ -28,7 +28,8 @@ Struct_RBB_3CB0 D_80390720[2] = { }; ActorInfo D_80390738 = { - 0x186, 0x176, 0x404, 0x0, NULL, + MARKER_186_RBB_GREEN_PROPELLER_SWITCH, 0x176, ASSET_404_MODEL_RBB_GREEN_PROPELLER_SWITCH, + 0x0, NULL, chPropellorSwitch_update, NULL, chPropellorSwitch_draw, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/whistle.c b/src/RBB/ch/whistle.c index e3ca3123..68a7d096 100644 --- a/src/RBB/ch/whistle.c +++ b/src/RBB/ch/whistle.c @@ -29,19 +29,22 @@ Struct_RBB_4C70 D_80390950[] = { }; ActorInfo D_803909B0 = { - MARKER_2A_WHISTLE_1_YELLOW, ACTOR_1C2_WHISTLE_1, ASSET_416_MODEL_WHISTLE, 0x0, NULL, + MARKER_2A_WHISTLE_1_YELLOW, ACTOR_1C2_WHISTLE_1, ASSET_416_MODEL_WHISTLE, + 0x0, NULL, func_8038B340, NULL, func_8038B230, 0, 0, 0.0f, 0 }; ActorInfo D_803909D4 = { - MARKER_2B_WHISTLE_2_YELLOW, ACTOR_1C3_WHISTLE_2, ASSET_416_MODEL_WHISTLE, 0x0, NULL, + MARKER_2B_WHISTLE_2_YELLOW, ACTOR_1C3_WHISTLE_2, ASSET_416_MODEL_WHISTLE, + 0x0, NULL, func_8038B340, NULL, func_8038B230, 0, 0, 0.0f, 0 }; ActorInfo RBB_D_803909F8 = { - MARKER_2C_WHISTLE_3_YELLOW, ACTOR_1C4_WHISTLE_3, ASSET_416_MODEL_WHISTLE, 0x0, NULL, + MARKER_2C_WHISTLE_3_YELLOW, ACTOR_1C4_WHISTLE_3, ASSET_416_MODEL_WHISTLE, + 0x0, NULL, func_8038B340, NULL, func_8038B230, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/whistlectrl.c b/src/RBB/ch/whistlectrl.c index 1cc7eaf1..fc7d1537 100644 --- a/src/RBB/ch/whistlectrl.c +++ b/src/RBB/ch/whistlectrl.c @@ -14,7 +14,8 @@ void chWhistleCtrl_update(Actor * this); /* .data */ ActorInfo D_80390A50 = { - MARKER_2D_WHISTLE_CTRL, ACTOR_1C5_WHISTLE_CTRL, 0x0, 0x0, NULL, + MARKER_2D_WHISTLE_CTRL, ACTOR_1C5_WHISTLE_CTRL, 0x0, + 0x0, NULL, chWhistleCtrl_update, NULL, func_80325340, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/ch/whistleswitch.c b/src/RBB/ch/whistleswitch.c index 68d4754f..6892b504 100644 --- a/src/RBB/ch/whistleswitch.c +++ b/src/RBB/ch/whistleswitch.c @@ -34,18 +34,21 @@ Struct_RBB_47D0 D_80390870[4] = { }; extern ActorInfo D_803908C0 = { - 0x195, 0x1BF, 0x413, 0x0, NULL, + MARKER_195_WHISTLE_SWITCH_1, 0x1BF, ASSET_413_MODEL_WHISTLE_SWITCH_1, + 0x0, NULL, func_8038AEB8, NULL, func_8038AD9C, 0, 0, 0.0f, 0 }; extern ActorInfo D_803908E4 = { - 0x196, 0x1C0, 0x414, 0x0, NULL, + MARKER_196_WHISTLE_SWITCH_2, 0x1C0, ASSET_414_MODEL_WHISTLE_SWITCH_2, + 0x0, NULL, func_8038AEB8, NULL, func_8038AD9C, 0, 0, 0.0f, 0 }; extern ActorInfo D_80390908 = { - 0x197, 0x1C1, 0x415, 0x0, NULL, + MARKER_197_WHISTLE_SWITCH_3, 0x1C1, ASSET_415_MODEL_WHISTLE_SWITCH_3, + 0x0, NULL, func_8038AEB8, NULL, func_8038AD9C, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/code_1570.c b/src/RBB/code_1570.c index 8bae5777..ba1487c5 100644 --- a/src/RBB/code_1570.c +++ b/src/RBB/code_1570.c @@ -12,7 +12,8 @@ void RBB_func_803882F4(Actor *this); /* .data */ ActorInfo D_80390270 = { - 0x184, 0x174, 0x402, 0x0, NULL, + MARKER_184_RBB_EGG_TOLL, 0x174, ASSET_402_MODEL_EGG_TOLL, + 0x0, NULL, RBB_func_803882F4, NULL, func_80325340, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/code_640.c b/src/RBB/code_640.c index b3640e6b..64d0d4bb 100644 --- a/src/RBB/code_640.c +++ b/src/RBB/code_640.c @@ -77,49 +77,57 @@ ActorAnimationInfo D_803900C0[4] = { }; ActorInfo D_803900E0 = { - MARKER_107_ENGINE_ROOM_DOOR, ACTOR_21D_ENGINE_ROOM_DOOR, ASSET_493_MODEL_ENGINE_ROOM_DOOR, 0x1, NULL, + MARKER_107_ENGINE_ROOM_DOOR, ACTOR_21D_ENGINE_ROOM_DOOR, ASSET_493_MODEL_ENGINE_ROOM_DOOR, + 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390104 = { - MARKER_108_CABIN_CLOSET_DOOR, ACTOR_21C_CABIN_CLOSET_DOOR, ASSET_492_MODEL_CABIN_CLOSET_DOOR, 0x1, NULL, + MARKER_108_CABIN_CLOSET_DOOR, ACTOR_21C_CABIN_CLOSET_DOOR, ASSET_492_MODEL_CABIN_CLOSET_DOOR, + 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390128 = { - MARKER_22D_SHIP_SHADOW_WINDOW, ACTOR_266_SHIP_SHADOW_WINDOW, ASSET_4BA_MODEL_SHIP_SHADOW_WINDOW, 0x1, NULL, + MARKER_22D_SHIP_SHADOW_WINDOW, ACTOR_266_SHIP_SHADOW_WINDOW, ASSET_4BA_MODEL_SHIP_SHADOW_WINDOW, + 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_8039014C = { - MARKER_22E_SHIP_SUNNY_WINDOW, ACTOR_267_SHIP_SUNNY_WINDOW, ASSET_4BB_MODEL_SHIP_SUNNY_WINDOW, 0x1, NULL, + MARKER_22E_SHIP_SUNNY_WINDOW, ACTOR_267_SHIP_SUNNY_WINDOW, ASSET_4BB_MODEL_SHIP_SUNNY_WINDOW, + 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390170 = { - MARKER_235_CRACKED_SKYLIGHT, ACTOR_23F_CRACKED_SKYLIGHT, ASSET_4E2_MODEL_CRACKED_SKYLIGHT, 0x1, NULL, + MARKER_235_CRACKED_SKYLIGHT, ACTOR_23F_CRACKED_SKYLIGHT, ASSET_4E2_MODEL_CRACKED_SKYLIGHT, + 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0 }; ActorInfo D_80390194 = { - MARKER_15F_RBB_HONEYCOMB_SWITCH, ACTOR_18F_RBB_HONEYCOMB_SWITCH, ASSET_42F_MODEL_RBB_HONEYCOMB_SWITCH, 0x1, D_803900C0, + MARKER_15F_RBB_HONEYCOMB_SWITCH, ACTOR_18F_RBB_HONEYCOMB_SWITCH, ASSET_42F_MODEL_RBB_HONEYCOMB_SWITCH, + 0x1, D_803900C0, func_80386BF8, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_803901B8 = { - MARKER_22F_SUNNY_LIFEBOAT, ACTOR_263_SUNNY_LIFEBOAT, ASSET_4DB_MODEL_SUNNY_LIFEBOAT, 0x1, NULL, + MARKER_22F_SUNNY_LIFEBOAT, ACTOR_263_SUNNY_LIFEBOAT, ASSET_4DB_MODEL_SUNNY_LIFEBOAT, + 0x1, NULL, func_80386A7C, actor_update_func_80326224, func_80386B9C, 0, 0, 0.0f, 0 }; ActorInfo D_803901DC = { - MARKER_230_SHADOW_LIFEBOAT, ACTOR_264_SHADOW_LIFEBOAT, ASSET_4DE_MODEL_SHADOW_LIFEBOAT, 0x1, NULL, + MARKER_230_SHADOW_LIFEBOAT, ACTOR_264_SHADOW_LIFEBOAT, ASSET_4DE_MODEL_SHADOW_LIFEBOAT, + 0x1, NULL, func_80386A7C, actor_update_func_80326224, func_80386B9C, 0, 0, 0.0f, 0 }; diff --git a/src/RBB/code_CA0.c b/src/RBB/code_CA0.c index eb3e9d92..e3612239 100644 --- a/src/RBB/code_CA0.c +++ b/src/RBB/code_CA0.c @@ -9,7 +9,8 @@ void func_8038756C(Actor *this, s32 arg1); /* .data */ ActorInfo D_80390200 = { - 0x183, 0x173, 0x402, 0x0, NULL, + MARKER_183_RBB_EGG_TOLL, 0x173, ASSET_402_MODEL_EGG_TOLL, + 0x0, NULL, func_803878B0, NULL, func_80325340, 0, 0, 0.0f, 0 }; diff --git a/src/SM/code_3FC0.c b/src/SM/code_3FC0.c index 1bd2a593..fd624015 100644 --- a/src/SM/code_3FC0.c +++ b/src/SM/code_3FC0.c @@ -15,7 +15,7 @@ ActorAnimationInfo D_8038AFF0[3] = { }; ActorInfo gBanjosBed = { - MARKER_E1_BANJOS_BED, ACTOR_198_BANJOS_BED, ASSET_530_BANJOS_BED, + MARKER_E1_BANJOS_BED, ACTOR_198_BANJOS_BED, ASSET_530_MODEL_BANJOS_BED, 2, D_8038AFF0, func_8038A3B0, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0 @@ -28,7 +28,7 @@ ActorAnimationInfo D_8038B02C[3] = { };//chBanjosChairAnimations ActorInfo gBanjosChair ={ - MARKER_E2_BANJOS_CHAIR, ACTOR_199_BANJOS_CHAIR, ASSET_52F_BANJOS_CHAIR, + MARKER_E2_BANJOS_CHAIR, ACTOR_199_BANJOS_CHAIR, ASSET_52F_MODEL_BANJOS_CHAIR, 2, D_8038B02C, func_8038A3B0, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0 diff --git a/src/SM/code_44D0.c b/src/SM/code_44D0.c index 6fe5d6b3..346d8408 100644 --- a/src/SM/code_44D0.c +++ b/src/SM/code_44D0.c @@ -29,7 +29,7 @@ void func_8038A8F8(Actor *this){ NodeProp *other; if(!this->volatile_initialized){ - other = nodeprop_findByActorIdAndActorPosition(0x3be, this); + other = nodeprop_findByActorIdAndActorPosition(ACTOR_3BE_LAIR_UNKNOWN, this); if(!other){ this->unk1C_x = this->position_x; this->unk1C_y = this->position_y; diff --git a/src/TTC/ch/blubber.c b/src/TTC/ch/blubber.c index 735bd02f..4cae9dd4 100644 --- a/src/TTC/ch/blubber.c +++ b/src/TTC/ch/blubber.c @@ -45,7 +45,7 @@ ActorInfo gChBlubber = { }; /* .code */ -static void __chBlubber_initiliaze(Actor *this){ +static void __chBlubber_initialize(Actor *this){ ActorLocal_Blubber *local = (ActorLocal_Blubber *)&this->local; anctrl_setTransitionDuration(this->anctrl, 0.2f); @@ -177,7 +177,7 @@ static void __chBlubber_updateFunc(Actor *this){ case CH_BLUBBER_STATE_1_UNKNOWN: if(!this->initialized){ actor_collisionOff(this); - __chBlubber_initiliaze(this); + __chBlubber_initialize(this); } __func_80387774(&this); diff --git a/src/TTC/ch/treasurehunt.c b/src/TTC/ch/treasurehunt.c index 56198414..6b488130 100644 --- a/src/TTC/ch/treasurehunt.c +++ b/src/TTC/ch/treasurehunt.c @@ -153,9 +153,9 @@ void chTreasurehunt_checkStepProgress5(NodeProp *this, ActorMarker *arg1){ static f32 particleTargetPosition[3]; if(chtreasureHunt_puzzleCurrentStep == 5 && __chTreasurehunt_isActiveHitboxBeakBusterHitbox()){ - particleTargetPosition[0] = (f32)this->x; - particleTargetPosition[1] = (f32)this->y; - particleTargetPosition[2] = (f32)this->z; + particleTargetPosition[0] = (f32)this->position_x; + particleTargetPosition[1] = (f32)this->position_y; + particleTargetPosition[2] = (f32)this->position_z; particleTargetPosition[1] = mapModel_getFloorY(particleTargetPosition); __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_f32, 0xF4, reinterpret_cast(s32, particleTargetPosition[0]), reinterpret_cast(s32, particleTargetPosition[1]), reinterpret_cast(s32, particleTargetPosition[2])); particleEmitter = partEmitMgr_newEmitter(3); diff --git a/src/core1/defragmanager.c b/src/core1/defragmanager.c index a4673590..277ec0d1 100644 --- a/src/core1/defragmanager.c +++ b/src/core1/defragmanager.c @@ -52,5 +52,5 @@ static void defragThread_entry(void *args) { } while ((sDefragThreadPauseSyncQueue.validCount == 0) && defrag_flag); } osRecvMesg(&sDefragThreadPauseSyncQueue, NULL, OS_MESG_BLOCK); - } while(1); + } while(TRUE); } diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index 7c3f519a..a825ef3e 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -21,7 +21,7 @@ extern void progressDialog_showDialogMaskFour(s32 arg0); extern void func_80291634(ActorMarker *, ActorMarker *); extern void func_80291610(ActorMarker *, ActorMarker *); extern Actor *baModel_80291AAC(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx); -extern void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, struct5Cs *collision_flags); +extern void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, CollisionParams *collision_flags); extern void func_80320ED8(ActorMarker *, f32, s32); extern NodeProp *cubeList_findNodePropByActorIdAndPosition_s32(enum actor_e actor_id, s32 position[3]); @@ -179,7 +179,7 @@ void __baMarker_resolveMusicNoteCollision(Prop *arg0) { coMusicPlayer_playMusic(COMUSIC_9_NOTE_COLLECTED, 16000); timedFunc_set_1(0.75f, progressDialog_showDialogMaskZero, FILEPROG_3_MUSIC_NOTE_TEXT); } - fxSparkle_musicNote(arg0->unk4); + fxSparkle_musicNote(arg0->position); } void __baMarker_8028BAB0(enum jiggy_e jiggy_id, s32 arg1, s32 arg2, s32 arg3){ @@ -558,7 +558,10 @@ void __baMarker_resolveCollision(Prop *other_prop){ __baMarker_8028B8DC(); } - __spawnQueue_add_4((GenFunction_4)__baMarker_8028B904, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z), jiggy_id); + __spawnQueue_add_4((GenFunction_4)__baMarker_8028B904, + reinterpret_cast(u32, other_prop->actorProp.position_x), + reinterpret_cast(u32, other_prop->actorProp.position_y), + reinterpret_cast(u32, other_prop->actorProp.position_z), jiggy_id); marker_despawn(marker); } } @@ -579,7 +582,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ if(!(item_getCount(ITEM_13_EMPTY_HONEYCOMB) < 6)){ gcpausemenu_80314AC8(0); } - fxSparkle_emptyHoneycomb(&other_prop->actorProp.x); + fxSparkle_emptyHoneycomb(&other_prop->actorProp.position_x); marker_despawn(marker); } } @@ -588,7 +591,10 @@ void __baMarker_resolveCollision(Prop *other_prop){ case 0x54: //L8028C820 coMusicPlayer_playMusic(COMUSIC_19_LOW_PITCH_FLUTES, 28000); func_803012F8(); - __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, + reinterpret_cast(u32, other_prop->actorProp.position_x), + reinterpret_cast(u32, other_prop->actorProp.position_y), + reinterpret_cast(u32, other_prop->actorProp.position_z)); marker_despawn(marker); break; @@ -607,7 +613,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ coMusicPlayer_playMusic(COMUSIC_16_HONEYCOMB_COLLECTED, 28000); timedFunc_set_1(0.75f, progressDialog_showDialogMaskZero, FILEPROG_A_HONEYCOMB_TEXT); item_inc(ITEM_14_HEALTH); - fxSparkle_honeycomb(&other_prop->actorProp.x); + fxSparkle_honeycomb(&other_prop->actorProp.position_x); marker_despawn(marker); break; @@ -649,12 +655,12 @@ void __baMarker_resolveCollision(Prop *other_prop){ for(i = 0 ; i < 3; i++){ sp88[i] = D_8036366C[tmp_v0_2 + i]; } - func_802EE354(actor, 0x3ED, 0x23, sp78, 0.2f, tmp_f0, 3.0f, sp88, 0, &sp64); + func_802EE354(actor, 0x3ED, 0x23, sp78, 0.2f, tmp_f0, 3.0f, (f32*)sp88, 0, (f32*)&sp64); for(i = 0 ; i < 3; i++){ sp88[i] = 0xFF; } - func_802EE354(actor, 0x3ED, 0xe, sp78, 0.2f, tmp_f0, 3.0f, sp88, 0, &sp64); + func_802EE354(actor, 0x3ED, 0xe, sp78, 0.2f, tmp_f0, 3.0f, (f32*)sp88, 0, (f32*)&sp64); sp78 += 0x32; tmp_f0 += -0.15; @@ -717,7 +723,7 @@ void __baMarker_resolveCollision(Prop *other_prop){ } coMusicPlayer_playMusic(COMUSIC_15_EXTRA_LIFE_COLLECTED, 0x7FFF); timedFunc_set_1(1.5f, progressDialog_showDialogMaskFour, FILEPROG_C_EXTRA_LIFE_TEXT); - fxSparkle_extraLife(&other_prop->actorProp.x); + fxSparkle_extraLife(&other_prop->actorProp.position_x); item_inc(ITEM_16_LIFE); marker_despawn(marker); break; @@ -761,7 +767,10 @@ void __baMarker_resolveCollision(Prop *other_prop){ baflag_set(BA_FLAG_E_TOUCHING_WADING_BOOTS); func_802A6388(chwadingboots_802D6E4C(actor)); bs_checkInterrupt(BS_INTR_1B); - __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, + reinterpret_cast(u32, other_prop->actorProp.position_x), + reinterpret_cast(u32, other_prop->actorProp.position_y), + reinterpret_cast(u32, other_prop->actorProp.position_z)); chwadingboots_802D6E54(actor); break; @@ -785,7 +794,10 @@ void __baMarker_resolveCollision(Prop *other_prop){ baflag_set(BA_FLAG_10_TOUCHING_TURBO_TRAINERS); set_turbo_duration(chtrainers_getDuration(actor)); bs_checkInterrupt(BS_INTR_1A); - __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, reinterpret_cast(u32, other_prop->actorProp.x), reinterpret_cast(u32, other_prop->actorProp.y), reinterpret_cast(u32, other_prop->actorProp.z)); + __spawnQueue_add_4((GenFunction_4)spawnQueue_actor_s16, 0x4E, + reinterpret_cast(u32, other_prop->actorProp.position_x), + reinterpret_cast(u32, other_prop->actorProp.position_y), + reinterpret_cast(u32, other_prop->actorProp.position_z)); chtrainers_pickup(actor); break; @@ -820,9 +832,9 @@ void __baMarker_resolveCollision(Prop *other_prop){ func_8032B258(actor, obj_collision_type); } } - else if(other_prop->is_3d)//L8028D0B0 //ModelProp + else if(other_prop->isModelProp)//L8028D0B0 //ModelProp { - tmp2 = other_prop->modelProp.model_index + 0x2D1; + tmp2 = other_prop->modelProp.modelId + MODEL_ASSET_OFFSET; switch (tmp2) { case 0x2E8: @@ -837,30 +849,30 @@ void __baMarker_resolveCollision(Prop *other_prop){ } } else{//L8028D10C //SpriteProp - tmp3 = other_prop->spriteProp.sprite_index + 0x572; + tmp3 = other_prop->spriteProp.spriteId + SPRITE_ASSET_OFFSET; switch (tmp3) { - case 0x6D6: //L8028D144 + case ASSET_6D6_SPRITE_MUSIC_NOTE: //L8028D144 if(!__baMarker_8028BC60()){ - other_prop->spriteProp.unk8_4 = 0; + other_prop->spriteProp.isNotFeatherEggOrNote = 0; __baMarker_resolveMusicNoteCollision(other_prop); } break; - case 0x6D7: //L8028D16C + case ASSET_6D7_SPRITE_BLUE_EGGS: //L8028D16C if(!__baMarker_8028BC60()){ - other_prop->spriteProp.unk8_4 = 0; + other_prop->spriteProp.isNotFeatherEggOrNote = 0; chCollectible_collectEgg(other_prop); } break; case ASSET_580_SPRITE_RED_FEATHER: //L8028D194 if(!__baMarker_8028BC60()){ - other_prop->spriteProp.unk8_4 = 0; + other_prop->spriteProp.isNotFeatherEggOrNote = 0; chCollectible_collectRedFeather(other_prop); } break; case ASSET_6D1_SPRITE_GOLDFEATHER: //L8028D1BC if(!__baMarker_8028BC60()){ - other_prop->spriteProp.unk8_4 = 0; + other_prop->spriteProp.isNotFeatherEggOrNote = 0; chCollectible_collectGoldFeather(other_prop); } break; @@ -926,12 +938,12 @@ void baMarker_update(void){ playerMarker->unk38[2] = sp174[2] - sp168[2]; func_80320ED8(playerMarker, temp_s0_2[i], 1); while(other_prop = func_8032F528()){//L8028D480 - if(!other_prop->unk8_2){ - if(!D_8037BF8C && other_prop->is_actor && other_prop->is_3d){ + if(!other_prop->isCollisionResolved){ + if(!D_8037BF8C && other_prop->isActorProp && other_prop->isModelProp){ D_8037BF8C = other_prop->actorProp.marker; } __baMarker_resolveCollision(other_prop); - other_prop->unk8_2 = 1; + other_prop->isCollisionResolved = 1; sp58[temp_s2] = other_prop; temp_s2++; }//L8028D4E0 @@ -940,7 +952,7 @@ void baMarker_update(void){ D_8037BF90 = 0xff; for(j = 0; j < temp_s2; j++){//L8028D55C - sp58[j]->unk8_2 = 0; + sp58[j]->isCollisionResolved = 0; } } } @@ -1020,32 +1032,32 @@ void baMarker_8028D71C(void){ dustEmitter_emit(sp3C, 0, D_80363680, 1, 0.75f, 0.0f, 0x7d, 0xfa, DUST_EMITTER_TYPE_DUST); } -void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, struct5Cs *collision_flags){ +void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, CollisionParams *collision_flags){ s32 sp24; - s32 sp20 = func_8033D594(collision_flags); + s32 sp20 = collision_getDamageToPlayer(collision_flags); s32 sp1C = 0; Actor *actor = marker_getActor(arg1); s32 tmp_v0; - if(func_8033D5A4(collision_flags)) + if(collision_getHitsToTrigger(collision_flags)) baflag_set(BA_FLAG_8); if((baiFrame_getState() != 3 && func_8028F1E0()) || !sp20){ if(!func_8028F25C()){ - sp24 = func_8033D564(collision_flags); + sp24 = collision_getPlayerInteraction(collision_flags); if(0 < sp24 && sp24 < 6){ sp1C = 2; sp20 = MAX(0, sp20 - 1); }//L8028D884 if(6 < sp24 && sp24 < 0xC){ - if(!(1 < func_8033D5A4(collision_flags)) || (func_8033D574(collision_flags) != -1 && actor->unk164[func_8033D574(collision_flags)])){ + if(!(1 < collision_getHitsToTrigger(collision_flags)) || (collision_getNextState(collision_flags) != -1 && actor->unk164[collision_getNextState(collision_flags)])){ sp1C = 1; }//L8028D8E8 }//L8028D8E8 if(sp20){ - if(func_8033D594(collision_flags) == 3){ + if(collision_getDamageToPlayer(collision_flags) == 3){ item_adjustByDiffWithHud(ITEM_14_HEALTH, -item_getCount(ITEM_14_HEALTH)); } else{//L8028D92C diff --git a/src/core2/bastick.c b/src/core2/bastick.c index a73fbcd9..b3bb2bf8 100644 --- a/src/core2/bastick.c +++ b/src/core2/bastick.c @@ -78,7 +78,7 @@ void bastick_reset(void) { } void bastick_update(void) { - controller_getJoystick(0, &bastick.value); + controller_getJoystick(0, (f32*)&bastick.value); if (bastick.locked_at_zero) { bastick.value[0] = bastick.value[1] = 0.0f; } diff --git a/src/core2/bs/bTrot.c b/src/core2/bs/bTrot.c index 6e394cc8..6f5675f2 100644 --- a/src/core2/bs/bTrot.c +++ b/src/core2/bs/bTrot.c @@ -8,23 +8,23 @@ #include "core2/statetimer.h" /* .data */ -f32 D_80364A90 = 30.0f; -f32 D_80364A94 = 700.0f; -f32 D_80364A98 = 80.0f; -f32 D_80364A9C = 1000.0f; -f32 D_80364AA0 = 300.0f; -f32 D_80364AA4 = 0.56f; -f32 D_80364AA8 = 0.34f; -f32 D_80364AAC = 0.51f; -f32 D_80364AB0 = 0.29f; -f32 D_80364AB4 = 0.8f; -f32 D_80364AB8 = 0.7f; -f32 D_80364ABC = 693.5f; -f32 D_80364AC0 = -1200.0f; +f32 gBsbTrotMinWalkVelocity = 30.0f; +f32 gBsbTrotMaxWalkVelocity = 700.0f; +f32 gBsbTrotMinTurboVelocity = 80.0f; +f32 gBsbTrotMaxTurboVelocity = 1000.0f; +f32 gBsbTrotMaxTrudgeVelocity = 300.0f; // max velocity on dangerous ground +f32 gBsbTrotSlowestWalkDuration = 0.56f; +f32 gBsbTrotFastestWalkDuration = 0.34f; +f32 gBsbTrotSlowestTurboDuration = 0.51f; +f32 gBsbTrotFastestTurboDuration = 0.29f; +f32 gBsbTrotSlowestTrudgeDuration = 0.8f; +f32 gBsbTrotFastestTrudgeDuration = 0.7f; +f32 gBsbTrotInitialJumpVelocity = 693.5f; +f32 gBsbTrotGravity = -1200.0f; // jump gravity /* .bss */ -f32 D_8037D3A0; -u8 D_8037D3A4; +f32 D_8037D3A0; /* timer for jumps while sliding? */ +u8 D_8037D3A4; /* jump state? */ void func_802A87C0(void){ if(stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)) @@ -50,51 +50,51 @@ void func_802A8850(void){ } -f32 func_802A88B0(void){ +f32 bsbtrot_getMaxTargetVelocity(void){ if(player_isOnDangerousGround()) - return D_80364AA0; + return gBsbTrotMaxTrudgeVelocity; if(stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)) - return D_80364A9C; + return gBsbTrotMaxTurboVelocity; - return D_80364A94; + return gBsbTrotMaxWalkVelocity; } -f32 func_802A8900(void){ +f32 bsbtrot_getMinTargetVelocity(void){ if(stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)) - return D_80364A98; + return gBsbTrotMinTurboVelocity; - return D_80364A90; + return gBsbTrotMinWalkVelocity; } -f32 func_802A8934(void){ +f32 bsbtrot_getFastestDuration(void){ if(player_isOnDangerousGround()) - return D_80364AB8; + return gBsbTrotFastestTrudgeDuration; if(stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)) - return D_80364AB0; + return gBsbTrotFastestTurboDuration; - return D_80364AA8; + return gBsbTrotFastestWalkDuration; } -f32 func_802A8984(void){ +f32 bsbtrot_getSlowestDuration(void){ if(player_isOnDangerousGround()) - return D_80364AB4; + return gBsbTrotSlowestTrudgeDuration; if(stateTimer_isActive(STATE_TIMER_3_TURBO_TALON)) - return D_80364AAC; + return gBsbTrotSlowestTurboDuration; - return D_80364AA4; + return gBsbTrotSlowestWalkDuration; } -void func_802A89D4(void){ - f32 sp24 = bastick_getZonePosition(); +void bsbtrot_walkUpdateTargetVelocity(void){ + f32 zone_pos = bastick_getZonePosition(); if(!bastick_getZone()){ baphysics_set_target_horizontal_velocity(0.0f); } else{ - baphysics_set_target_horizontal_velocity(ml_interpolate_f(sp24, func_802A8900(), func_802A88B0())); + baphysics_set_target_horizontal_velocity(ml_interpolate_f(zone_pos, bsbtrot_getMinTargetVelocity(), bsbtrot_getMaxTargetVelocity())); } } @@ -271,7 +271,7 @@ enum asset_e func_802A9030(void){ void func_802A9054(void){ f32 tmp = 1.0f; - baanim_setVelocityMapRanges(func_802A8900(), func_802A88B0(), func_802A8984(), func_802A8934()); + baanim_setVelocityMapRanges(bsbtrot_getMinTargetVelocity(), bsbtrot_getMaxTargetVelocity(), bsbtrot_getSlowestDuration(), bsbtrot_getFastestDuration()); if(func_8028B394()){ tmp = ml_map_f(baphysics_get_horizontal_velocity_percentage(), 0.0f, 1.0f, 0.6f, 0.9f); baanim_scaleDuration(tmp); @@ -297,7 +297,7 @@ void bsbtrot_walk_update(void){ func_802A8AD8(); _bsbtrot_802A8C98(aCtrl, func_802A9030()); func_80299628(1); - func_802A89D4(); + bsbtrot_walkUpdateTargetVelocity(); if(anctrl_isAt(aCtrl, 0.2781f)) func_802A880C(1); @@ -361,10 +361,10 @@ void bsbtrot_jump_init(void){ yaw_setIdeal(bastick_getAngleRelativeToBanjo()); baphysics_set_target_yaw(yaw_getIdeal()); - func_802A89D4(); + bsbtrot_walkUpdateTargetVelocity(); baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity()); - baphysics_set_vertical_velocity(D_80364ABC); - baphysics_set_gravity(D_80364AC0); + baphysics_set_vertical_velocity(gBsbTrotInitialJumpVelocity); + baphysics_set_gravity(gBsbTrotGravity); sfxsource_playHighPriority(SFX_48_KAZOOIE_RUUH); D_8037D3A4 = 0; } @@ -380,7 +380,7 @@ void bsbtrot_jump_update(void){ if(baflag_isTrue(BA_FLAG_F)) baphysics_reset_horizontal_velocity(); else - func_802A89D4(); + bsbtrot_walkUpdateTargetVelocity(); baphysics_get_velocity(sp1C); if(bakey_released(BUTTON_A) && 0.0f < sp1C[1]) @@ -575,7 +575,7 @@ void bsbtrot_fall_init(void){ func_802A8A40(); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); baphysics_set_target_yaw(yaw_getIdeal()); - func_802A89D4(); + bsbtrot_walkUpdateTargetVelocity(); baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity()); D_8037D3A4 = 0; } @@ -591,7 +591,7 @@ void bsbtrot_fall_update(void){ if(baflag_isTrue(BA_FLAG_F)) baphysics_reset_horizontal_velocity(); else - func_802A89D4(); + bsbtrot_walkUpdateTargetVelocity(); baphysics_get_velocity(sp1C); switch (D_8037D3A4){ diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 4525845c..0dddb067 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -26,13 +26,15 @@ ActorAnimationInfo D_80366010[] ={ }; -ActorInfo D_80366090 = {MARKER_3_BIGBUTT, ACTOR_4_BIGBUTT, ASSET_353_MODEL_BIGBUTT, +ActorInfo D_80366090 = { + MARKER_3_BIGBUTT, ACTOR_4_BIGBUTT, ASSET_353_MODEL_BIGBUTT, 1, D_80366010, func_802C6240, actor_update_func_80326224, func_802C6E84, 3200, 0, 0.0f, 0 }; -ActorInfo D_803660B4 = {MARKER_9_SMALL_BULL, ACTOR_E_SMALL_BULL, ASSET_354_MODEL_SMALL_BULL, +ActorInfo D_803660B4 = { + MARKER_9_SMALL_BULL, ACTOR_E_SMALL_BULL, ASSET_354_MODEL_SMALL_BULL, 1, D_80366010, func_802C6240, actor_update_func_80326224, func_802C6E84, 3200, 0, 0.0f, 0 @@ -315,8 +317,8 @@ void func_802C6240(Actor *this){ break; }//L802C6D1C if(this->state == 0xe){ - if(this->marker->id != 0x29e) - this->marker->id = 0x29e; + if(this->marker->id != MARKER_29E_BIGBUTT_KNOCKED_DOWN) + this->marker->id = MARKER_29E_BIGBUTT_KNOCKED_DOWN; }else{//L802C6D60 if(this->marker->id != 3) this->marker->id = 3; diff --git a/src/core2/ch/code_CFA60.c b/src/core2/ch/code_CFA60.c index d73e860e..826dc67b 100644 --- a/src/core2/ch/code_CFA60.c +++ b/src/core2/ch/code_CFA60.c @@ -12,7 +12,7 @@ typedef struct{ /* .data */ ActorInfo D_80372840 = { - 0x29, ACTOR_1CC_GRILL_CHOMPA, ASSET_430_MODEL_GRILL_CHOMPA, + MARKER_29_GRILLE_CHOMPA, ACTOR_1CC_GRILLE_CHOMPA, ASSET_430_MODEL_GRILLE_CHOMPA, 0, NULL, func_80356CCC, NULL, func_80356C50, 0, 0, 0.0f, 0 @@ -22,7 +22,7 @@ ActorInfo D_80372840 = { void func_803569F0(Actor *this, s32 next_state){ ActorLocal_Core2_CFA60 *local = (ActorLocal_Core2_CFA60 *)&this->local; - this->marker->id = 0x1cf; + this->marker->id = MARKER_1CF_GRILLE_CHOMPA_ATTACKING; actor_collisionOff(this); if(next_state == 1 || next_state == 2){ skeletalAnim_set(this->unk148, ASSET_15A_ANIM_GRILL_CHOMPA_ATTACK, 0, 2.5f); @@ -123,7 +123,7 @@ void func_80356CCC(Actor *this){ if(this->state == 4){ skeletalAnim_getProgressRange(this->unk148, &sp4C, &sp48); if(sp4C < 0.59 && 0.59 <= sp48){ - this->marker->id = 0x1cf; + this->marker->id = MARKER_1CF_GRILLE_CHOMPA_ATTACKING; } if(sp4C < 0.5 && 0.5 <= sp48){ func_8030E760(SFX_2_CLAW_SWIPE, 0.9f, 32000); diff --git a/src/core2/ch/collectible.c b/src/core2/ch/collectible.c index 670de584..dbd7a646 100644 --- a/src/core2/ch/collectible.c +++ b/src/core2/ch/collectible.c @@ -96,8 +96,8 @@ bool chCollectible_collectItem(Actor* actor, enum file_progress_e arg1, enum ass s32 chCollectible_collectEgg(ActorProp *arg0){ Actor *actPtr = NULL; if(arg0 != NULL){ - fxSparkle_blueEgg(&arg0->x); - if(arg0->is_actor) + fxSparkle_blueEgg(&arg0->position_x); + if(arg0->isActorProp) actPtr = marker_getActor(arg0->marker); } chCollectible_collectItem(actPtr, FILEPROG_5_BLUE_EGG_TEXT, 0xD9E, COMUSIC_C_EGG_COLLECTED, 0xD, 2.0f); @@ -105,16 +105,16 @@ s32 chCollectible_collectEgg(ActorProp *arg0){ void chCollectible_collectRedFeather(ActorProp *arg0){ Actor *actPtr = NULL; - fxSparkle_redFeather(&arg0->x); - if(arg0->is_actor) + fxSparkle_redFeather(&arg0->position_x); + if(arg0->isActorProp) actPtr = marker_getActor(arg0->marker); chCollectible_collectItem(actPtr, FILEPROG_6_RED_FEATHER_TEXT, 0xD9F, COMUSIC_B_RED_FEATHER_COLLECTED, 0xF, 4.0f); } void chCollectible_collectGoldFeather(ActorProp *arg0){ Actor *actPtr = NULL; - fxSparkle_goldFeather(&arg0->x); - if(arg0->is_actor) + fxSparkle_goldFeather(&arg0->position_x); + if(arg0->isActorProp) actPtr = marker_getActor(arg0->marker); chCollectible_collectItem(actPtr, FILEPROG_7_GOLD_FEATHER_TEXT, 0xDA0, COMUSIC_14_GOLD_FEATHER_COLLECTED, ITEM_10_GOLD_FEATHER, 6.0f); } diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index 63b7395c..05ba4ec3 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -397,6 +397,24 @@ void chCrab_update(Actor *this) { } /* .data */ -ActorInfo D_803670B8 = { MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, 0x1, chCrabAnimations, chCrab_update, actor_update_func_80326224, actor_draw, 1900, 0, 0.8f, 0}; -ActorInfo D_803670DC = { MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, 0x1, chCrabAnimations, chCrab_update, actor_update_func_80326224, actor_draw, 1900, 0, 0.8f, 0}; -ActorInfo D_80367100 = { MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, 0x1, chCrabMutantAnimations, chCrab_update, actor_update_func_80326224, actor_draw, 1900, 0, 0.8f, 0}; + +ActorInfo D_803670B8 = { + MARKER_13_SNIPPET, ACTOR_67_SNIPPET, ASSET_358_SNIPPET, + 0x1, chCrabAnimations, + chCrab_update, actor_update_func_80326224, actor_draw, + 1900, 0, 0.8f, 0 +}; + +ActorInfo D_803670DC = { + MARKER_DD_BLACK_SNIPPET, ACTOR_F2_BLACK_SNIPPET, ASSET_566_MODEL_BLACK_SNIPPET, + 0x1, chCrabAnimations, + chCrab_update, actor_update_func_80326224, actor_draw, + 1900, 0, 0.8f, 0 +}; + +ActorInfo D_80367100 = { + MARKER_13_SNIPPET, ACTOR_F5_MUTIE_SNIPPET, ASSET_38F_MODEL_MUTIE_SNIPPET, + 0x1, chCrabMutantAnimations, + chCrab_update, actor_update_func_80326224, actor_draw, + 1900, 0, 0.8f, 0 +}; \ No newline at end of file diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index 55d83376..b4895779 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -57,7 +57,12 @@ ActorAnimationInfo banjoSleepingAnimations[] = { { 0x24F, 0.6f }, { 0x24D, 2.0f } }; -ActorInfo gameSelect_banjoSleeping = { 0xE4, 0x195, 0x532, 0x1, banjoSleepingAnimations, gameSelect_initAndUpdate, actor_update_func_80326224, gameSelect_zoomboxDraw, 0, 0, 0.0f, 0 }; +ActorInfo gameSelect_banjoSleeping = { + MARKER_E4_CS_BK_SLEEPING, 0x195, ASSET_532_MODEL_BANJO_KAZOOIE_CUTSCENES, + 0x1, banjoSleepingAnimations, + gameSelect_initAndUpdate, actor_update_func_80326224, gameSelect_zoomboxDraw, + 0, 0, 0.0f, 0 +}; ActorAnimationInfo banjoGameboyAnimations[] = { { 0x000, 0.0f }, @@ -67,7 +72,12 @@ ActorAnimationInfo banjoGameboyAnimations[] = { { 0x252, 0.67f }, { 0x250, 4.5f } }; -ActorInfo gameSelect_banjoGameboy = { 0xE5, 0x196, 0x532, 0x1, banjoGameboyAnimations, gameSelect_update, actor_update_func_80326224, gameSelect_draw, 0, 0, 0.0f, 0 }; +ActorInfo gameSelect_banjoGameboy = { + MARKER_E5_CS_BK_GAMEBOY, 0x196, ASSET_532_MODEL_BANJO_KAZOOIE_CUTSCENES, + 0x1, banjoGameboyAnimations, + gameSelect_update, actor_update_func_80326224, gameSelect_draw, + 0, 0, 0.0f, 0 +}; ActorAnimationInfo banjoCookingAnimations[] = { { 0x000, 0.0f }, @@ -77,7 +87,12 @@ ActorAnimationInfo banjoCookingAnimations[] = { { 0x24C, 1.0f }, { 0x24A, 1.0f } }; -ActorInfo gameSelect_banjoCooking = { 0xE6, 0x197, 0x532, 0x1, banjoCookingAnimations, gameSelect_update, actor_update_func_80326224, gameSelect_draw, 0, 0, 0.0f, 0 }; +ActorInfo gameSelect_banjoCooking = { + MARKER_E6_CS_BK_COOKING, 0x197, ASSET_532_MODEL_BANJO_KAZOOIE_CUTSCENES, + 0x1, banjoCookingAnimations, + gameSelect_update, actor_update_func_80326224, gameSelect_draw, + 0, 0, 0.0f, 0 +}; /* .bss */ // Fun level specific things- why would the devs define these here? diff --git a/src/core2/ch/jigsawdance.c b/src/core2/ch/jigsawdance.c index 2b5f7037..a383f9f9 100644 --- a/src/core2/ch/jigsawdance.c +++ b/src/core2/ch/jigsawdance.c @@ -72,7 +72,7 @@ void __chJigsawDance_update(Actor * this){ anctrl_start(this->anctrl, "chjigsawdance.c", 0x6e); break; case 5: - this->marker->propPtr->unk8_4 = 0; + this->marker->propPtr->isNotFeatherEggOrNote = 0; break; } } @@ -101,7 +101,7 @@ void chJigsawDance_setState(Actor * this, u32 arg1){ break; case 5: subaddie_set_state(this, 5); - this->marker->propPtr->unk8_4 = 0; + this->marker->propPtr->isNotFeatherEggOrNote = 0; break; } } diff --git a/src/core2/ch/musicnote.c b/src/core2/ch/musicnote.c index fb1f546e..61f18508 100644 --- a/src/core2/ch/musicnote.c +++ b/src/core2/ch/musicnote.c @@ -8,7 +8,7 @@ void musicNote_update(Actor* this); ActorInfo sumusicNote = { MARKER_5F_MUSIC_NOTE, ACTOR_51_MUSIC_NOTE, - ASSET_6D6_MODEL_MUSIC_NOTE, + ASSET_6D6_SPRITE_MUSIC_NOTE, 0, NULL, musicNote_update, diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index 6d05d59a..8b47e8da 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -171,7 +171,7 @@ int __chSnowman_isPlayerInAttackRange(Actor *this, s32 min_distance, s32 max_dis int __chSnowman_func_802E1F70(ActorMarker *marker, s32 arg1){ if(marker->unk40_31 == 0xB){ - marker->id = 0x287; + marker->id = 0x287; // check collision_table for clues? } else{ marker->id = MARKER_B1_SIR_SLUSH; diff --git a/src/core2/code_34790.c b/src/core2/code_34790.c index 30770aae..e3ff9f56 100644 --- a/src/core2/code_34790.c +++ b/src/core2/code_34790.c @@ -64,7 +64,7 @@ bool func_802BB720(s32 arg0, f32 arg1[3], f32 arg2[3], s32 *arg3) { if (temp_v0 != NULL) { nodeprop_getPosition(temp_v0, arg1); *arg3 = nodeprop_getScale(temp_v0); - temp_f6 = (f32) nodeprop_getYaw(temp_v0) - 180.0f; + temp_f6 = (f32) nodeProp_getYaw(temp_v0) - 180.0f; arg2[0] = 0.0f;\ arg2[1] = mlNormalizeAngle(temp_f6);\ arg2[2] = 0.0f; diff --git a/src/core2/code_3EAD0.c b/src/core2/code_3EAD0.c index 59f39326..fa22812a 100644 --- a/src/core2/code_3EAD0.c +++ b/src/core2/code_3EAD0.c @@ -41,12 +41,12 @@ void func_802C5A60(Actor *this){ suSetSpriteScale(this, 0.4f); break; } - this->marker->propPtr->unk8_5 = 0.5 < randf(); + this->marker->propPtr->isMirrored = 0.5 < randf(); this->position_y += 100.0*this->scale; actor_collisionOff(this); this->initialized = TRUE; }//L802C5B60 - this->marker->propPtr->unk8_15 = D_80365F30[local->unk0]; + this->marker->propPtr->frame = D_80365F30[local->unk0]; local->unk0++; if(local->unk0 >= 0xC) marker_despawn(this->marker); diff --git a/src/core2/code_41460.c b/src/core2/code_41460.c index 561bab3e..a78d70b3 100644 --- a/src/core2/code_41460.c +++ b/src/core2/code_41460.c @@ -55,7 +55,7 @@ void func_802C83F0(Actor *actor) { Struct25s *phi_a1; Struct24s *phi_s0; - phi_a1 = actor->unk40; + phi_a1 = (Struct25s*)actor->unk40; for( phi_s0 = phi_a1->begin; phi_s0 < phi_a1->current; phi_s0++){ if (phi_s0->model_bin != NULL) { assetcache_release(phi_s0->model_bin); @@ -65,7 +65,7 @@ void func_802C83F0(Actor *actor) { } phi_s0->unk3C = NULL; } - free(actor->unk40); + free((s32*)actor->unk40); } Actor *func_802C8484(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { @@ -77,7 +77,7 @@ Actor *func_802C8484(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { s32 phi_s4; sp58 = marker_getActorAndRotation(marker, &sp5C); - temp_s1 = sp58->unk40; + temp_s1 = (Struct25s*)sp58->unk40; phi_s4 = FALSE; for(phi_s0 = temp_s1->begin; phi_s0 < temp_s1->current; phi_s0++){ if ((phi_s0->unk0 != 0) && (phi_s0->model_bin != NULL)) { @@ -147,7 +147,7 @@ Actor *func_802C8580(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ break; case 0: // 802C883C if(0.5 < randf()) - s0->model_bin = (BKModelBin *) assetcache_get(0x2d1); + s0->model_bin = (BKModelBin *) assetcache_get(MODEL_ASSET_OFFSET); else s0->model_bin = (BKModelBin *) assetcache_get(0x2e5); @@ -168,7 +168,7 @@ Actor *func_802C8580(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ sp68[2] = (f32)position[2]; sp68[0] += s0->unk30[0]*3.0f; - s0->unk50 = mapModel_getFloorY(&sp68); + s0->unk50 = mapModel_getFloorY((f32*)&sp68); s0->unk14[2] = 0.0f; s0->unk14[1] = 0.0f; @@ -178,14 +178,14 @@ Actor *func_802C8580(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ s0->unk20[1] = randf2(0.05f, 0.4f); s0->unk20[2] = randf2(0.05f, 0.4f); - ml_vec3f_yaw_rotate_copy(&s0->unk8, &s0->unk8, f24); + ml_vec3f_yaw_rotate_copy((f32*)&s0->unk8, (f32*)&s0->unk8, f24); s0->unk8[0] += actor->position_x; s0->unk8[1] += actor->position_y; s0->unk8[2] += actor->position_z; - ml_vec3f_yaw_rotate_copy(&s0->unk30, &s0->unk30, randf2(15.0f, 90.0f) + f24); + ml_vec3f_yaw_rotate_copy((f32*)&s0->unk30, (f32*)&s0->unk30, randf2(15.0f, 90.0f) + f24); }//L802C8A08 - actor->unk40 = s1; + actor->unk40 = (s32)s1; marker_setFreeMethod(actor->marker, func_802C83F0); return actor; } @@ -254,7 +254,7 @@ void func_802C8C5C(Actor *actor) { f32 sp94[3]; f32 temp_f0 = time_getDelta(); f32 sp84[3]; - Struct25s *temp_s2 = actor->unk40; + Struct25s *temp_s2 = (Struct25s*)actor->unk40; Struct24s *phi_s0; s32 sp70[3] = D_80366418; @@ -280,9 +280,9 @@ void func_802C8C5C(Actor *actor) { if (phi_s0->unk8[1] <= phi_s0->unk50) { phi_s0->unk0 = 1; - phi_s0->unk3C = dustEmitter_returnGiven(1); + phi_s0->unk3C = (ParticleEmitter*)dustEmitter_returnGiven(1); if (phi_s0->unk3C != 0) { - dustEmitter_emit(phi_s0->unk8, sp70, phi_s0->unk40, 1, D_80366330, D_80366334, (s32)D_80366338, (s32)D_8036633C, DUST_EMITTER_TYPE_BREAK_DUST); + dustEmitter_emit(phi_s0->unk8, (f32*)sp70, phi_s0->unk40, 1, D_80366330, D_80366334, (s32)D_80366338, (s32)D_8036633C, DUST_EMITTER_TYPE_BREAK_DUST); } } } diff --git a/src/core2/code_41FB0.c b/src/core2/code_41FB0.c index e1505adb..64193721 100644 --- a/src/core2/code_41FB0.c +++ b/src/core2/code_41FB0.c @@ -50,45 +50,45 @@ enum bundle_state_e { // #define 41FB0_FLAG_SET_YAW 0x0020 BundleInfo gBundle_array[] = { - {0x0021, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_52_BLUE_EGG, 5, SFX_21_EGG_BOUNCE_1, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_6_GRUBLIN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 0.0f, 0.0f, 550.0f, 250.0f, 200.0f, 0.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_62_JINJO_GREEN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 16000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_49_EXTRA_LIFE, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.6f, 0.0f}, - {0x0049, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 300.0f, 0.0f, 0.5f, 0.0f}, - {0x002D, ACTOR_B_SHOCKSPRING_PAD, 1, 0, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.2f, 315.0f}, - {0x0005, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 75.0f, 0.0f, 725.0f, 0.0f, 75.0f, 0.0f, 0.6f, 0.0f}, - {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, - {0x0009, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 300.0f, 0.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_52_BLUE_EGG, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_129_RED_FEATHER, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, - {0x0005, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.75f, 0.0f}, - {0x0005, ACTOR_6A_UNKNOWN, 1, 0, 0, 0, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0009, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 650.0f, 0.0f, 950.0f, 0.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_51_MUSIC_NOTE, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, - {0x0001, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x0065, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.7f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 250.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 2, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f}, - {0x0129, ACTOR_352_UNKNOWN, 1, SFX_3F2_BOING, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f}, - {0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, - {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} + {0x0021, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, // BUNDLE_0_MM_HUT_MUSIC_NOTE + {0x0021, ACTOR_52_BLUE_EGG, 5, SFX_21_EGG_BOUNCE_1, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, // BUNDLE_1_MM_HUT_BLUE_EGG + {0x0021, ACTOR_6_GRUBLIN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 0.0f, 0.0f, 550.0f, 250.0f, 200.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_2_MM_HUT_GRUBLIN + {0x0021, ACTOR_62_JINJO_GREEN, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, // BUNDLE_3_MM_HUT_JINJO_GREEN + {0x0021, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, // BUNDLE_4_MM_HUT_JIGGY + {0x0001, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 16000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, // BUNDLE_5__HONEYCOMB + {0x0021, ACTOR_49_EXTRA_LIFE, 1, SFX_3E9_UNKNOWN, 1, 16000, 100.0f, 50.0f, 500.0f, 250.0f, 100.0f, 50.0f, 0.6f, 0.0f}, // BUNDLE_6_MM_HUT_EXTRA_LIFE + {0x0001, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_7__JIGGY + {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_8__JIGGY + {0x0049, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 300.0f, 0.0f, 0.5f, 0.0f}, // BUNDLE_9__JIGGY + {0x002D, ACTOR_B_SHOCKSPRING_PAD, 1, 0, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.2f, 315.0f}, // BUNDLE_A_BGS_HUT_SHOCKSPRING_PAD + {0x0005, ACTOR_51_MUSIC_NOTE, 5, SFX_3E9_UNKNOWN, 1, 16000, 75.0f, 0.0f, 725.0f, 0.0f, 75.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_B_BGS_HUT_MUSIC_NOTE + {0x0005, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 1000.0f, 0.0f, 0.0f, 0.0f, 0.5f, 0.0f}, // BUNDLE_C_BGS_HUT_JIGGY + {0x0009, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 200.0f, 0.0f, 300.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_D__EMPTY_HONEYCOMB + {0x0001, ACTOR_52_BLUE_EGG, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, // BUNDLE_E_YUMYUM_BLUE_EGG + {0x0001, ACTOR_129_RED_FEATHER, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 0.0f, 350.0f, 500.0f, 500.0f, 0.0f, 350.0f, 0.6f, 0.0f}, // BUNDLE_F_YUMYUM_RED_FEATHER + {0x0005, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 100.0f, 0.0f, 0.0f, 0.0f, 0.75f, 0.0f}, // BUNDLE_10__JIGGY + {0x0005, ACTOR_6A_UNKNOWN, 1, 0, 0, 0, 0.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_11__UNKNOWN + {0x0009, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 0.0f, 0.0f, 650.0f, 0.0f, 950.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_12__JIGGY + {0x0001, ACTOR_51_MUSIC_NOTE, 1, SFX_21_EGG_BOUNCE_1, 1, 16000, 125.0f, 25.0f, 725.0f, 125.0f, 125.0f, 25.0f, 0.6f, 0.0f}, // BUNDLE_13__MUSIC_NOTE + {0x0001, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, // BUNDLE_14__HONEYCOMB + {0x0065, ACTOR_46_JIGGY, 1, SFX_3E9_UNKNOWN, 1, 16000, 90.0f, 0.0f, 930.0f, 0.0f, 100.0f, 0.0f, 0.7f, 0.0f}, // BUNDLE_15__JIGGY + {0x0021, ACTOR_50_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 250.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_16__HONEYCOMB + {0x0021, ACTOR_50_HONEYCOMB, 2, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, // BUNDLE_17__HONEYCOMB + {0x0021, ACTOR_50_HONEYCOMB, 3, SFX_3E9_UNKNOWN, 1, 18000, 50.0f, 150.0f, 500.0f, 250.0f, 50.0f, 150.0f, 0.6f, 0.0f}, // BUNDLE_18__HONEYCOMB + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_19__HONEYCOMB + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_1A__HONEYCOMB + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_1B__HONEYCOMB + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_1C__HONEYCOMB + {0x00A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_1D__HONEYCOMB + {0x0021, ACTOR_46_JIGGY, 1, 0, 0, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // BUNDLE_1E__JIGGY + {0x0025, ACTOR_47_EMPTY_HONEYCOMB, 1, SFX_3E9_UNKNOWN, 1, 18000, 0.0f, 0.0f, 750.0f, 500.0f, 0.0f, 0.0f, 0.6f, 0.0f}, // BUNDLE_1F_SM_EMPTY_HONEYCOMB + {0x0129, ACTOR_352_UNKNOWN, 1, SFX_3F2_BOING, 1, 16000, 0.0f, 0.0f, 2500.0f, 0.0f, 0.0f, 0.0f, 0.4f, 0.0f}, // BUNDLE_20__UNKNOWN + {0x0081, ACTOR_3A0_ICECUBE_B, 1, SFX_116_DEAF_RUSTLING, 1, 32000, 220.0f, 100.0f, 350.0f, 200.0f, 220.0f, 100.0f, 0.6f, 0.0f}, // BUNDLE_21__ICECUBE_B + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 250.0f, 0.0f, 200.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // BUNDLE_22__HONEYCOMB + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 350.0f, 0.0f, 350.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // BUNDLE_23__HONEYCOMB + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 450.0f, 0.0f, 400.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // BUNDLE_24__HONEYCOMB + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 550.0f, 0.0f, 450.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f}, // BUNDLE_25__HONEYCOMB + {0x02A1, ACTOR_50_HONEYCOMB, 1, SFX_8_BANJO_LANDING_04, 1, 20000, 650.0f, 0.0f, 500.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f} // BUNDLE_26__HONEYCOMB }; /* .bss */ diff --git a/src/core2/code_42CB0.c b/src/core2/code_42CB0.c index fd980a90..4d296544 100644 --- a/src/core2/code_42CB0.c +++ b/src/core2/code_42CB0.c @@ -88,7 +88,7 @@ void func_802C9D80(void){ } } } - fxSparkle_honeycomb(&s5->propPtr->x); + fxSparkle_honeycomb(&s5->propPtr->position_x); marker_despawn(s5); } diff --git a/src/core2/code_43250.c b/src/core2/code_43250.c index b7b8e3e9..6e92d8c7 100644 --- a/src/core2/code_43250.c +++ b/src/core2/code_43250.c @@ -29,10 +29,10 @@ ActorInfo D_80366CD0 = { Struct_Core2_43250_1 D_80366CF4 [16]= { {SFX_6B_LOCKUP_OPENING, 0x40, 0xFF}, {SFX_6C_LOCKUP_CLOSING, 0x80, 0xFA}, - {SFX_3F_CAULDRON_SQEAK_1, 0x99, 0x65}, - {SFX_40_CAULDRON_SQEAK_2, 0x99, 0x65}, - {SFX_3F_CAULDRON_SQEAK_1, 0x99, 0x65}, - {SFX_40_CAULDRON_SQEAK_2, 0x99, 0x65}, + {SFX_3F_CAULDRON_SQUEAK_1, 0x99, 0x65}, + {SFX_40_CAULDRON_SQUEAK_2, 0x99, 0x65}, + {SFX_3F_CAULDRON_SQUEAK_1, 0x99, 0x65}, + {SFX_40_CAULDRON_SQUEAK_2, 0x99, 0x65}, {SFX_AD_CATERPILLAR_SQUEAK, 0x80, 0x75}, {SFX_AD_CATERPILLAR_SQUEAK, 0x8C, 0x94}, {SFX_C5_TWINKLY_POP, 0x80, 0xFA}, @@ -156,7 +156,7 @@ void func_802CA1E0(Actor *this){ if(!this->volatile_initialized){ this->volatile_initialized = TRUE; tmp_v1 = (s32)this->yaw; - this->unk154 = D_80366E64[tmp_v1].unk0; + this->unk154 = (u32)D_80366E64[tmp_v1].unk0; reinterpret_cast(s32, this->unkBC[4]) = D_80366E64[tmp_v1].unk4; reinterpret_cast(s32, this->unkBC[0]) = 0; } diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index 46221995..cee765e4 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -1032,7 +1032,7 @@ void func_802D5628(void){ func_802D5178(LEVEL_FLAG_1C_MM_OPEN, 0x28, 0x30, MAP_69_GL_MM_LOBBY, 0x8, 0xA, ACTOR_20E_MM_ENTRANCE_DOOR, 0x28); func_802D5178(LEVEL_FLAG_21_GV_OPEN, 0x2D, 0x31, MAP_6E_GL_GV_LOBBY, 0xA, 0xA, ACTOR_226_GV_ENTRANCE, 0x12); func_802D5178(LEVEL_FLAG_1E_CC_OPEN, 0x2A, 0x32, MAP_70_GL_CC_LOBBY, 0xE, 0xA, ACTOR_212_CC_ENTRANCE_BARS, 0xA); - func_802D5178(LEVEL_FLAG_1D_TTC_OPEN, 0x29, 0x33, MAP_6D_GL_TTC_LOBBY, 0x9, 0xB, ACTOR_211_TCC_ENTRANCE_CHEST_LID, 0xA); + func_802D5178(LEVEL_FLAG_1D_TTC_OPEN, 0x29, 0x33, MAP_6D_GL_TTC_LOBBY, 0x9, 0xB, ACTOR_211_TTC_ENTRANCE_CHEST_LID, 0xA); func_802D5178(LEVEL_FLAG_1F_BGS_OPEN, 0x2B, 0x34, MAP_72_GL_BGS_LOBBY, 0xB, 0xB, ACTOR_210_BGS_ENTRANCE_DOOR, 0xA); func_802D5178(LEVEL_FLAG_23_RBB_OPEN, 0x2F, 0x35, MAP_77_GL_RBB_LOBBY, 0xD, 0x5, ACTOR_20F_RBB_ENTRANCE_DOOR, 0xA); func_802D5178(LEVEL_FLAG_22_MMM_OPEN, 0x2E, 0x36, MAP_75_GL_MMM_LOBBY, 0xC, 0x6, ACTOR_228_MMM_ENTRANCE_DOOR, 0xA); @@ -1230,7 +1230,7 @@ void func_802D6494(void){ FUNC_8030E624(SFX_6B_LOCKUP_OPENING, 0.6f, 32000); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); break; - case ACTOR_211_TCC_ENTRANCE_CHEST_LID:// L802D6530 + case ACTOR_211_TTC_ENTRANCE_CHEST_LID:// L802D6530 FUNC_8030E624(SFX_6B_LOCKUP_OPENING, 0.6f, 32000); coMusicPlayer_playMusicWeak(COMUSIC_64_WORLD_OPENING_A, 32000); break; diff --git a/src/core2/code_53C10.c b/src/core2/code_53C10.c index de2649c4..f9887049 100644 --- a/src/core2/code_53C10.c +++ b/src/core2/code_53C10.c @@ -9,7 +9,7 @@ typedef struct { u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 padC_27:28; s16 unk10; //sfx_id @@ -305,7 +305,7 @@ void func_802DB5A0(Actor *this) { this->yaw_ideal = (f32) subaddie_getYawToPlayer(this); subaddie_turnToYaw(this, 4.0f); if (func_80329480(this)) { - this->unk10_12 = local->unkC_31; + this->unk10_12 = local->yaw; subaddie_set_state(this, 4); func_802DB2AC(this); } @@ -322,8 +322,8 @@ void func_802DB5A0(Actor *this) { break; case 4://L802DB990 - if (this->unk10_12 < local->unkC_31) { - anctrl_setDuration(this->anctrl, this->unk18[4].duration - ((local->unkC_31 - this->unk10_12) * 0.1)); + if (this->unk10_12 < local->yaw) { + anctrl_setDuration(this->anctrl, this->unk18[4].duration - ((local->yaw - this->unk10_12) * 0.1)); } this->yaw_ideal = (f32) subaddie_getYawToPlayer(this); if (!func_803294B4(this, 0x21)) { @@ -336,7 +336,7 @@ void func_802DB5A0(Actor *this) { } } if( (this->unk10_12 == 0) - || (this->unk10_12 < local->unkC_31 && subaddie_playerIsWithinSphereAndActive(this, 0xFA)) + || (this->unk10_12 < local->yaw && subaddie_playerIsWithinSphereAndActive(this, 0xFA)) ) { subaddie_set_state(this, 7); this->actor_specific_1_f = (f32) local->unkA; diff --git a/src/core2/code_59A80.c b/src/core2/code_59A80.c index e03323d3..0b909389 100644 --- a/src/core2/code_59A80.c +++ b/src/core2/code_59A80.c @@ -30,7 +30,7 @@ void chMumboToken_collect(ActorMarker *marker, ActorMarker *other_marker){ mumboscore_set(func_802E0CB0(this), TRUE); func_8030E760(0x401, 1.0f, 0x7fff); timedFunc_set_1(0.75f, progressDialog_showDialogMaskZero, FILEPROG_4_MUMBO_TOKEN_TEXT); - fxSparkle_mumboToken(&marker->propPtr->x); + fxSparkle_mumboToken(&marker->propPtr->position_x); item_inc(ITEM_1C_MUMBO_TOKEN); marker_despawn(marker); diff --git a/src/core2/code_7060.c b/src/core2/code_7060.c index bea48807..f4d84e0d 100644 --- a/src/core2/code_7060.c +++ b/src/core2/code_7060.c @@ -227,7 +227,8 @@ void func_8028E644(void){ D_8037BFBA = 0; //player_present } -void func_8028E668(f32 arg0[3], f32 arg1, f32 arg2, f32 arg3) { //something related to collision around Wozza in cave +//something related to collision around Wozza in cave +void func_8028E668(f32 arg0[3], f32 arg1, f32 arg2, f32 arg3) { func_8029B73C(arg0, arg1, arg2, arg3, 1000.0f); } diff --git a/src/core2/code_73640.c b/src/core2/code_73640.c index 66f6e41a..24969646 100644 --- a/src/core2/code_73640.c +++ b/src/core2/code_73640.c @@ -235,7 +235,7 @@ void itemPrint_init(void){ D_80381428[i] = assetcache_get(D_803692E0[i]); } for(i = 0; D_803692EC[i] != -1; i++){ - D_80381450[i] = func_8033B6C4(D_803692EC[i], &sp40); + D_80381450[i] = codeB3A80_getSprite(D_803692EC[i], &sp40); } } diff --git a/src/core2/code_956B0.c b/src/core2/code_956B0.c index af7f48af..558aaa09 100644 --- a/src/core2/code_956B0.c +++ b/src/core2/code_956B0.c @@ -209,15 +209,15 @@ void func_8031CE70(f32 *arg0, enum map_e arg1, s32 arg2) { if (phi_s0 != NULL) { nodeprop_getPosition(phi_s0, sp38); phi_f2 = 500.0f; - if (phi_s0->unk8 == 0x186) { + if (phi_s0->actorId == 0x186) { phi_f2 = 1000.0f; } if (ml_vec3f_distance(arg0, sp38) < phi_f2) { - if (phi_s0->unk8 == 0x184) { + if (phi_s0->actorId == 0x184) { ncDynamicCamera_setUpdateEnabled(0); func_8031CB50(arg1, arg2, 1); player_walkToPosition(sp38, 1.0f, NULL, NULL); - } else if (phi_s0->unk8 == 0x185) { + } else if (phi_s0->actorId == 0x185) { func_8031CD44(arg1, arg2, sp38[1], (f32) phi_s0->yaw, phi_s0->scale); } else { func_8031CD44(arg1, arg2, playerPos[1], (f32) phi_s0->yaw, phi_s0->scale); @@ -735,8 +735,8 @@ void func_8031E204(NodeProp *node, s32 arg1, s32 arg2){ f32 sp28[3]; f32 sp1C[3]; - nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_154_UNKNOWN, &node->x), sp34); - nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_155_UNKNOWN, &node->x), sp28); + nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_154_UNKNOWN, &node->position_x), sp34); + nodeprop_getPosition(nodeprop_findByActorIdAndPosition_s16(ACTOR_155_UNKNOWN, &node->position_x), sp28); player_getPosition(sp1C); if(sp28[1] < sp1C[1]){ sp1C[1] = sp28[1]; diff --git a/src/core2/code_9B180.c b/src/core2/code_9B180.c index 28284645..2e5693f7 100644 --- a/src/core2/code_9B180.c +++ b/src/core2/code_9B180.c @@ -126,7 +126,7 @@ void func_8032236C(s32 arg0, s32 arg1, s32 *arg2) { void func_803223AC(void) { Struct_core2_9B180_0 *i_ptr; - s32 sp28; + s32 frame_divisor; func_80244A98(1); for(i_ptr = D_8036DE00; i_ptr != &D_8036DE00[6]; i_ptr++){ @@ -136,14 +136,14 @@ void func_803223AC(void) { } } - sp28 = 0; - func_8032236C(0x19, 1, &sp28); - func_8032236C(0x1A, 2, &sp28); - func_8032236C(0x1B, 3, &sp28); - func_8032236C(0x1C, 4, &sp28); - func_8032236C(0x1D, 5, &sp28); - sp28 = (sp28 == 0) ? 2 : sp28; - viMgr_func_8024BF94(sp28); + frame_divisor = 0; + func_8032236C(ACTOR_19_FRAMERATE_60, 1, &frame_divisor); + func_8032236C(ACTOR_1A_FRAMERATE_30, 2, &frame_divisor); + func_8032236C(ACTOR_1B_FRAMERATE_20, 3, &frame_divisor); + func_8032236C(ACTOR_1C_FRAMERATE_15, 4, &frame_divisor); + func_8032236C(ACTOR_1D_FRAMERATE_12, 5, &frame_divisor); + frame_divisor = (frame_divisor == 0) ? 2 : frame_divisor; + viMgr_func_8024BF94(frame_divisor); } void func_80322490(void) { diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index 146b41b5..15b621bc 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -27,16 +27,16 @@ extern void __spawnQueue_add_5(GenFunction_5, s32, s32, s32, s32, s32); void func_8032A6A8(Actor *arg0); void func_8032ACA8(Actor *arg0); -void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2); +void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, CollisionParams *arg2); void subaddie_set_state_with_direction(Actor * this, s32 arg1, f32 arg2, s32 arg3); void func_8032BB88(Actor *this, s32 arg1, s32 arg2); int subaddie_playerIsWithinSphere(Actor *this, s32 dist); extern void func_8033A4A0(enum asset_e mode_id, f32, f32); -extern void func_80338338(s32, s32, s32); +extern void codeAEDA0_setPrimaryColorRGB(s32, s32, s32); extern void func_803382FC(s32); -extern void func_803382E4(s32); -extern void func_8033687C(Gfx **); -extern void func_80335D30(Gfx **); +extern void codeAEDA0_setSpriteDrawMode(s32); +extern void codeAEDA0_postDrawSprite(Gfx **); +extern void codeAEDA0_drawSprite(Gfx **); extern void func_80344138(s32, s32, s32, f32[3], f32[3], Gfx **, Mtx **); extern BKVertexList *vtxList_clone(BKVertexList *vtxList); @@ -236,19 +236,19 @@ Actor *fxTouchSparkle_draw(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) this->position[1] -= D_8036E58C[1]; this->position[2] -= D_8036E58C[2]; } - func_80338338(0xFF, 0xFF, 0xFF); + codeAEDA0_setPrimaryColorRGB(0xFF, 0xFF, 0xFF); if (this->unk124_11 != 0) { func_803382FC(this->alpha_124_19); - func_803382E4(0xC); - } else if (func_80344C20(sp3C) & 0xB00) { - func_803382E4(0xB); + codeAEDA0_setSpriteDrawMode(0xC); + } else if (codeBD100_getSpriteType(sp3C) & 0xB00) { + codeAEDA0_setSpriteDrawMode(0xB); } else { - func_803382E4(0xE); + codeAEDA0_setSpriteDrawMode(0xE); } func_80344C38(&func_803257A4, marker); - func_80335D30(gfx); - func_80344138(sp3C, marker->propPtr->unk8_15, marker->propPtr->unk8_5, this->position, scale, gfx, mtx); - func_8033687C(gfx); + codeAEDA0_drawSprite(gfx); + func_80344138(sp3C, marker->propPtr->frame, marker->propPtr->isMirrored, this->position, scale, gfx, mtx); + codeAEDA0_postDrawSprite(gfx); if (this->unk104 != NULL) { this->position[0] = this->position[0] + D_8036E58C[0]; this->position[1] = this->position[1] + D_8036E58C[1]; @@ -274,19 +274,19 @@ Actor *func_80325AE0(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx) { this->position[1] -= D_8036E58C[1]; this->position[2] -= D_8036E58C[2]; } - func_80338338(0xFF, 0xFF, 0xFF); + codeAEDA0_setPrimaryColorRGB(0xFF, 0xFF, 0xFF); if (this->unk124_11 != 0) { func_803382FC(this->alpha_124_19); - func_803382E4(0xC); - } else if (func_80344C20(sp40) & 0xB00) { - func_803382E4(0xB); + codeAEDA0_setSpriteDrawMode(0xC); + } else if (codeBD100_getSpriteType(sp40) & 0xB00) { + codeAEDA0_setSpriteDrawMode(0xB); } else { - func_803382E4(0xE); + codeAEDA0_setSpriteDrawMode(0xE); } func_80344C38(&func_803257A4, marker); - func_80335D30(gfx); - func_80344720(sp40, marker->propPtr->unk8_15, marker->propPtr->unk8_5, this->position, rotation, &scale, gfx, mtx); - func_8033687C(gfx); + codeAEDA0_drawSprite(gfx); + func_80344720(sp40, marker->propPtr->frame, marker->propPtr->isMirrored, this->position, rotation, &scale, gfx, mtx); + codeAEDA0_postDrawSprite(gfx); if (this->unk104 != NULL) { this->position[0] = this->position[0] + D_8036E58C[0]; this->position[1] = this->position[1] + D_8036E58C[1]; @@ -311,20 +311,20 @@ Actor *func_80325CAC(ActorMarker *marker, Gfx **gfx, Gfx **mtx, Vtx **vtx) { } viewport_getRotation_vec3f(rotation); rotation[2] += this->roll; - func_80338338(0xFF, 0xFF, 0xFF); + codeAEDA0_setPrimaryColorRGB(0xFF, 0xFF, 0xFF); if (this->unk124_11 != 0) { func_803382FC(this->alpha_124_19); - func_803382E4(0xC); - } else if ((func_80344C20(sp40) & 0xB00) != 0) { - func_803382E4(0xB); + codeAEDA0_setSpriteDrawMode(0xC); + } else if ((codeBD100_getSpriteType(sp40) & 0xB00) != 0) { + codeAEDA0_setSpriteDrawMode(0xB); } else { - func_803382E4(0xE); + codeAEDA0_setSpriteDrawMode(0xE); } func_80344C38(&func_803257A4, marker); - func_80335D30(gfx); - func_80344720(sp40, marker->propPtr->unk8_15, marker->propPtr->unk8_5, this->position, rotation, scale, gfx, mtx); + codeAEDA0_drawSprite(gfx); + func_80344720(sp40, marker->propPtr->frame, marker->propPtr->isMirrored, this->position, rotation, scale, gfx, mtx); - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); if (this->unk104 != NULL) { this->position[0] = this->position[0] + D_8036E58C[0]; this->position[1] = this->position[1] + D_8036E58C[1]; @@ -535,7 +535,7 @@ void func_803268B4(void) { marker = actor->marker; anim_ctrl = actor->anctrl; temp_s1 = actor->actor_info->unk18; - if (marker->propPtr->unk8_4) { + if (marker->propPtr->isNotFeatherEggOrNote) { if(sp54){ if ( actor->actor_info->unk20 && volatileFlag_get( actor->actor_info->unk20)) { marker_despawn(marker); @@ -1666,7 +1666,7 @@ void func_803299B4(Actor *arg0) { arg0->marker->actorFreeFunc = arg0->backupFreeFunc; arg0->marker->unk5C = arg0->unk16C_31; arg0->marker->propPtr->unk8_3 = arg0->unkF4_28; - arg0->marker->propPtr->unk8_2 = arg0->unkF4_27; + arg0->marker->propPtr->isCollisionResolved = arg0->unkF4_27; arg0->marker->unk2C_1 = arg0->unkF4_26; arg0->marker->collidable = arg0->stored_marker_collidable; @@ -1761,7 +1761,7 @@ void *actors_appendToSavestate(void * begin, u32 end){ s0->unkF4_26 = s1->marker->unk2C_1; s0->stored_marker_collidable = s1->marker->collidable; s0->unkF4_28 = s1->marker->propPtr->unk8_3; - s0->unkF4_27 = s1->marker->propPtr->unk8_2; + s0->unkF4_27 = s1->marker->propPtr->isCollisionResolved; //80329F94 if(s0->anctrl){ s0->stored_anctrl_index = anctrl_getIndex(s0->anctrl); @@ -1936,7 +1936,7 @@ void func_8032A82C(Actor *arg0, s32 arg1) { sp1C = &arg0->local; sp24 = nodeprop_findByActorIdAndActorPosition(arg1, arg0); if (sp24 != NULL) { - sp1C->unkC = nodeprop_getYaw(sp24); + sp1C->unkC = nodeProp_getYaw(sp24); nodeprop_getPosition(sp24, sp1C->unk0); sp1C->unkE = func_80341EC4(sp1C); } @@ -2197,7 +2197,7 @@ void func_8032B258(Actor *this, enum collision_e arg1) { } bool func_8032B38C(NodeProp *node, s32 arg1){ - return node->unk8 == 0xF7; + return node->actorId == 0xF7; } void func_8032B3A0(Actor *this, ActorMarker *arg1) { @@ -2234,13 +2234,13 @@ void func_8032B4DC(Actor *this, ActorMarker *arg1, s32 arg2) { } } -void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { +void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, CollisionParams *arg2) { Actor *this; - s32 sp70; - s32 sp6C; - s32 sp68; + s32 drop_bundle_num; + s32 unk_bit_7; + s32 hits_to_trigger; enum marker_collision_func_type_e sp64; - s32 var_v0; + s32 remaining_health; f32 player_yaw; f32 sp50[3]; s32 sp4C; @@ -2250,39 +2250,41 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { s32 pad; this = marker_getActor(arg0); - sp70 = func_8033D5B4(arg2); - sp6C = func_8033D584(arg2); - sp68 = func_8033D5A4(arg2); - sp64 = func_8033D574(arg2); - if (((baiFrame_getState() != 3) && func_8028F1E0()) || (func_8033D594(arg2) == 0)) { + drop_bundle_num = collision_getDropBundleNum(arg2); + unk_bit_7 = collision_getUnkBit7(arg2); + hits_to_trigger = collision_getHitsToTrigger(arg2); + sp64 = collision_getNextState(arg2); + if (((baiFrame_getState() != 3) && func_8028F1E0()) || (collision_getDamageToPlayer(arg2) == 0)) { if (sp64 == 0) { - if ((sp68 != 0) || (arg1->id == 0)) { - if (sp68 <= 0) { - sp68 = 1; + if ((hits_to_trigger != 0) || (arg1->id == 0)) { + if (hits_to_trigger <= 0) { + hits_to_trigger = 1; } } else{ return; } } - if (sp68 != 0) { - var_v0 = MAX(0 , (this->unk164[sp64] - (100 / sp68))); - if ((this->unk164[sp64] = var_v0) && (sp68 >= 2)) { - sp6C /= 2; + if (hits_to_trigger != 0) { + remaining_health = MAX(0 , (this->unk164[sp64] - (100 / hits_to_trigger))); + if ((this->unk164[sp64] = remaining_health) && (hits_to_trigger >= 2)) { + unk_bit_7 /= 2; } } - if (sp6C != 0) { - bundle_setYaw(func_80257204(arg0->propPtr->x, arg0->propPtr->z, arg1->propPtr->x, arg1->propPtr->z) + 90.0f); - D_8036E564 = sp6C; + if (unk_bit_7 != 0) { + bundle_setYaw(func_80257204(arg0->propPtr->position_x, arg0->propPtr->position_z, arg1->propPtr->position_x, arg1->propPtr->position_z) + 90.0f); + D_8036E564 = unk_bit_7; if (this->unk138_25) { - __bundle_spawnFromFirstActor(sp6C + BUNDLE_21__ICECUBE_B, this); + __bundle_spawnFromFirstActor(unk_bit_7 + BUNDLE_21__ICECUBE_B, this); } else { - if ((this->marker->id < 0x1A1) || (this->marker->id >= 0x1A5)) { - __bundle_spawnFromFirstActor(sp6C + BUNDLE_18__HONEYCOMB, this); + if ((this->marker->id < MARKER_1A1_BOSS_BOOM_BOX_LARGEST) || + (this->marker->id >= MARKER_1A5_SANDYBUTT_EGG_TOLL)) + { + __bundle_spawnFromFirstActor(unk_bit_7 + BUNDLE_18__HONEYCOMB, this); } } } - if (sp68 != 0) { + if (hits_to_trigger != 0) { if ((sp64 == 2) && this->unk16C_1) { func_8032B3A0(this, arg1); } @@ -2297,7 +2299,7 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { if (sp64 != 2) { this->unk164[sp64] = 0x63; } - if ((sp64 == 2) && (sp70 != 0)) { + if ((sp64 == 2) && (drop_bundle_num != 0)) { player_yaw = player_getYaw(); sp3C[0] = (s32) this->position[0]; sp3C[1] = (s32) this->position[1]; @@ -2307,21 +2309,21 @@ void func_8032B5C0(ActorMarker *arg0, ActorMarker *arg1, struct5Cs *arg2) { } func_8032EE0C(func_8032B38C, this); if (((s32)arg0->unk44 < 0) && ((sp50[0] != 0.0f) || (sp50[1] != 0.0f) || (sp50[2] != 0.0f))) { - __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + BUNDLE_15__JIGGY, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, drop_bundle_num + BUNDLE_15__JIGGY, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); } else if (this->unk16C_3 && func_803048E0(sp3C, &sp4C, &sp48, 3, (s32) (func_8033229C(arg0) * 4.0f))) { - sp50[0] = (f32) sp48->x; - sp50[1] = (f32) sp48->y; - sp50[2] = (f32) sp48->z; - __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + BUNDLE_15__JIGGY, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); + sp50[0] = (f32) sp48->position_x; + sp50[1] = (f32) sp48->position_y; + sp50[2] = (f32) sp48->position_z; + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, drop_bundle_num + BUNDLE_15__JIGGY, reinterpret_cast(s32, sp50[0]), reinterpret_cast(s32, sp50[1]), reinterpret_cast(s32, sp50[2]), reinterpret_cast(s32, player_yaw)); } else { sp38 = this->position[1] + func_8033229C(arg0); - __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, sp70 + BUNDLE_15__JIGGY, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, player_yaw)); + __spawnQueue_add_5((GenFunction_5)spawnQueue_bundleWithYaw_f32, drop_bundle_num + BUNDLE_15__JIGGY, reinterpret_cast(s32, this->position[0]), reinterpret_cast(s32, sp38), reinterpret_cast(s32, this->position[2]), reinterpret_cast(s32, player_yaw)); } func_8032EE20(); } marker_callCollisionFunc(arg0, arg1, sp64); } - if ((sp64 != 0) && (sp6C != 0)) { + if ((sp64 != 0) && (unk_bit_7 != 0)) { sfx_playFadeShorthandDefault(SFX_1D_HITTING_AN_ENEMY_1, 1.0f, 25984, this->position, (s32)((500.0f + func_8033229C(arg0)) * 0.5), (s32)((500.0f + func_8033229C(arg0)) * 5)); } } diff --git a/src/core2/code_A4D00.c b/src/core2/code_A4D00.c index ec45a6dd..fc19fb81 100644 --- a/src/core2/code_A4D00.c +++ b/src/core2/code_A4D00.c @@ -349,7 +349,7 @@ bool func_8032C850(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3, bool nonactor) func_80320ED8(actor->marker, temp_f0 / 2, 2); actor->marker->collidable = stored_collidability; for (var_v1 = func_8032F528(); var_v1 != NULL; var_v1 = func_8032F528()) { - if (nonactor || (var_v1->is_actor && (var_v1->actorProp.marker->id == actor->marker->id))) { + if (nonactor || (var_v1->isActorProp && (var_v1->actorProp.marker->id == actor->marker->id))) { D_803833D0 = var_v1; actor->position[0] = (f32) arg1[0]; actor->position[1] = (f32) arg1[1]; @@ -372,9 +372,9 @@ bool func_8032C9C0(Actor *actor, f32 arg1[3], s32 arg2, s32 arg3) { void func_8032C9E0(f32 arg0[3]) { if (D_803833D0 != NULL) { - arg0[0] = (f32) D_803833D0->unk4[0]; - arg0[1] = (f32) D_803833D0->unk4[1]; - arg0[2] = (f32) D_803833D0->unk4[2]; + arg0[0] = (f32) D_803833D0->position_x; + arg0[1] = (f32) D_803833D0->position_y; + arg0[2] = (f32) D_803833D0->position_z; } } diff --git a/src/core2/code_A5BC0.c b/src/core2/code_A5BC0.c index 1c0adb46..06f800f1 100644 --- a/src/core2/code_A5BC0.c +++ b/src/core2/code_A5BC0.c @@ -121,9 +121,9 @@ static void __cube_sort(Cube *cube, bool global) { //calculate prop distances new_var = var_v1 = cube->prop2Ptr; for(i = 0; i < cube->prop2Cnt; var_v1++, i++){ - D_80383450[i] = (var_v1->actorProp.x - ref_position[0])*(var_v1->actorProp.x - ref_position[0]) - + (var_v1->actorProp.y - ref_position[1])* (var_v1->actorProp.y - ref_position[1]) - + (var_v1->actorProp.z - ref_position[2])* (var_v1->actorProp.z - ref_position[2]); + D_80383450[i] = (var_v1->actorProp.position_x - ref_position[0])*(var_v1->actorProp.position_x - ref_position[0]) + + (var_v1->actorProp.position_y - ref_position[1])* (var_v1->actorProp.position_y - ref_position[1]) + + (var_v1->actorProp.position_z - ref_position[2])* (var_v1->actorProp.position_z - ref_position[2]); } //sort prop list @@ -256,7 +256,7 @@ void func_8032CD60(Prop *prop) { prop->spriteProp.unk8_5 = sp3C; } else{ - prop->spriteProp.mirrored = sp3C; + prop->spriteProp.isMirrored = sp3C; } } } @@ -376,20 +376,20 @@ void func_8032D510(Cube *cube, Gfx **gfx, Mtx **mtx, Vtx **vtx){ position[0] = (f32)iProp->modelProp.position[0]; position[1] = (f32)iProp->modelProp.position[1]; position[2] = (f32)iProp->modelProp.position[2]; - if(iProp->is_3d){ + if(iProp->isModelProp){ rotation[0] = 0.0f; rotation[1] = (f32)((s32)iProp->modelProp.yaw*2); rotation[2] = (f32)((s32)iProp->modelProp.roll*2); propModelList_drawModel(gfx, mtx, vtx, position, rotation, (f32)iProp->modelProp.scale/100.0, - iProp->modelProp.model_index, cube + iProp->modelProp.modelId, cube ); } else{//L8032D72C propModelList_drawSprite( gfx, mtx, vtx, - position, (f32)iProp->spriteProp.scale/100.0, iProp->spriteProp.sprite_index, cube, - iProp->spriteProp.r, iProp->spriteProp.b, iProp->spriteProp.g, - iProp->spriteProp.mirrored, iProp->spriteProp.frame + position, (f32)iProp->spriteProp.scale/100.0, iProp->spriteProp.spriteId, cube, + iProp->spriteProp.rgb_remove_red, iProp->spriteProp.rgb_remove_green, iProp->spriteProp.rgb_remove_blue, + iProp->spriteProp.isMirrored, iProp->spriteProp.frame ); } }//L8032D7C4 @@ -409,7 +409,7 @@ Prop *__codeA5BC0_initProp2Ptr(Cube *cube) { cube->prop2Ptr = malloc(sizeof(Prop)); } sp1C = &cube->prop2Ptr[cube->prop2Cnt-1]; - sp1C->is_actor = FALSE; + sp1C->isActorProp = FALSE; code_A5BC0_initCubePropActorProp(cube); return sp1C; } @@ -432,9 +432,9 @@ s32 func_8032D9C0(Cube *cube, Prop* prop){ sp24 = 0; if(cube->prop2Cnt != 0){ - sp24 = prop->is_3d; + sp24 = prop->isModelProp; if(func_80305D14()){ - func_80305CD8(func_803058C0(prop->unk4[1]), -1); + func_80305CD8(func_803058C0(prop->position_y), -1); } if((prop - cube->prop2Ptr) < (cube->prop2Cnt - 1)){ memcpy(prop, prop + 1, (s32)(&cube->prop2Ptr[cube->prop2Cnt-1]) - (s32)(prop)); @@ -495,14 +495,14 @@ SpriteProp *func_8032DCB8(Cube *cube) { SpriteProp *sp1C; sp1C = (SpriteProp *)__codeA5BC0_initProp2Ptr(cube); - sp1C->is_actor = FALSE; - sp1C->is_3d = FALSE; + sp1C->isActorProp = FALSE; + sp1C->isModelProp = FALSE; sp1C->frame = 0; - sp1C->mirrored = 0; + sp1C->isMirrored = FALSE; sp1C->unk8_10 = randf() * 32.0f; sp1C->unk8_3 = FALSE; - sp1C->unk8_2 = FALSE; - sp1C->unk8_4 = TRUE; + sp1C->isCollisionResolved = FALSE; + sp1C->isNotFeatherEggOrNote = TRUE; return sp1C; } @@ -510,44 +510,45 @@ ModelProp * func_8032DDD8(Cube *cube) { Prop *temp_v0; temp_v0 = __codeA5BC0_initProp2Ptr(cube); - temp_v0->is_actor = FALSE; - temp_v0->is_3d = TRUE; - temp_v0->unk8_5 = FALSE; + temp_v0->isActorProp = FALSE; + temp_v0->isModelProp = TRUE; + temp_v0->isMirrored = FALSE; temp_v0->unk8_3 = FALSE; - temp_v0->unk8_2 = FALSE; - temp_v0->unk8_4 = TRUE; + temp_v0->isCollisionResolved = FALSE; + temp_v0->isNotFeatherEggOrNote = TRUE; return (ModelProp *)temp_v0; } -void func_8032DE2C(ModelProp *model_prop, enum asset_e sprite_id){ - model_prop->model_index = sprite_id - 0x2d1; +void func_8032DE2C(ModelProp *model_prop, enum asset_e model_id){ + model_prop->modelId = model_id - MODEL_ASSET_OFFSET; } void func_8032DE48(ModelProp *model_prop, enum asset_e *model_id_ptr){\ - *model_id_ptr = ((*(u32*)model_prop) >> 0x14) + 0x2d1; + *model_id_ptr = ((*(u32*)model_prop) >> 0x14) + MODEL_ASSET_OFFSET; } void func_8032DE5C(SpriteProp *sprite_prop, enum asset_e sprite_id){ - sprite_prop->sprite_index = sprite_id - 0x572; + sprite_prop->spriteId = sprite_id - SPRITE_ASSET_OFFSET; } void func_8032DE78(SpriteProp *sprite_prop, enum asset_e *sprite_id_ptr){ - *sprite_id_ptr = sprite_prop->sprite_index + 0x572; + *sprite_id_ptr = sprite_prop->spriteId + SPRITE_ASSET_OFFSET; } void func_8032DE8C(SpriteProp *sprite_prop, s32 *arg1){ *arg1 = sprite_prop->scale; } -void func_8032DEA0(SpriteProp *sprite_prop, s32 *r, s32 *b, s32 *g){ - *r = sprite_prop->r; - *b = sprite_prop->b; - *g = sprite_prop->g; +void func_8032DEA0(SpriteProp *sprite_prop, + s32 *rgb_remove_red, s32 *rgb_remove_green, s32 *rgb_remove_blue){ + *rgb_remove_red = sprite_prop->rgb_remove_red; + *rgb_remove_green = sprite_prop->rgb_remove_green; + *rgb_remove_blue = sprite_prop->rgb_remove_blue; } void func_8032DECC(SpriteProp *sprite_prop, s32 *arg1){ - *arg1 = sprite_prop->mirrored; + *arg1 = sprite_prop->isMirrored; } void func_8032DEE0(SpriteProp *sprite_prop, s32 arg1){ @@ -567,7 +568,7 @@ void func_8032DF10(SpriteProp *sprite_prop, bool *arg1){ } void func_8032DF24(SpriteProp *sprite_prop, bool arg1){ - sprite_prop->mirrored = arg1; + sprite_prop->isMirrored = arg1; } void func_8032DF40(ModelProp *prop_prop, s32 arg1, s32 arg2){ @@ -580,10 +581,11 @@ void func_8032DF4C(ModelProp *prop_prop, s32 *arg1, s32 *arg2){ *arg2 = prop_prop->roll; } -void func_8032DF60(SpriteProp *sprite_prop, s32 r, s32 b, s32 g){ - sprite_prop->r = r; - sprite_prop->b = b; - sprite_prop->g = g; +void func_8032DF60(SpriteProp *sprite_prop, + s32 rgb_remove_red, s32 rgb_remove_green, s32 rgb_remove_blue){ + sprite_prop->rgb_remove_red = rgb_remove_red; + sprite_prop->rgb_remove_green = rgb_remove_green; + sprite_prop->rgb_remove_blue = rgb_remove_blue; } void func_8032DFA0(SpriteProp *sprite_prop, bool arg1){ @@ -591,27 +593,27 @@ void func_8032DFA0(SpriteProp *sprite_prop, bool arg1){ } void func_8032DFBC(NodeProp *node, s32 src[3]){ - node->x = src[0]; - node->y = src[1]; - node->z = src[2]; + node->position_x = src[0]; + node->position_y = src[1]; + node->position_z = src[2]; } void func_8032DFD8(NodeProp *node, s32 dst[3]){ - dst[0] = node->x; - dst[1] = node->y; - dst[2] = node->z; + dst[0] = node->position_x; + dst[1] = node->position_y; + dst[2] = node->position_z; } void func_8032DFF4(Prop *prop, s32 src[3]){ - prop->unk4[0] = src[0]; - prop->unk4[1] = src[1]; - prop->unk4[2] = src[2]; + prop->position_x = src[0]; + prop->position_y = src[1]; + prop->position_z = src[2]; } void codeA5BC0_getActorPosition(ActorProp *prop, s32 dst[3]){ - dst[0] = prop->x; - dst[1] = prop->y; - dst[2] = prop->z; + dst[0] = prop->position_x; + dst[1] = prop->position_y; + dst[2] = prop->position_z; } NodeProp *codeA5BC0_getPropNodeAtIndex(Cube *cube, s32 prop_index) { @@ -630,7 +632,7 @@ void cube_free(Cube *cube){ if(cube->prop2Ptr){ for(iProp = cube->prop2Ptr; iProp < cube->prop2Ptr +cube->prop2Cnt; iProp++){ - if(iProp->is_actor){ + if(iProp->isActorProp){ func_80332B2C(iProp->actorProp.marker); } } @@ -657,10 +659,10 @@ bool __codeA5BC0_pad_func_8032E178(Cube *arg0, s32 *arg1, s32 arg2) { if( ((node_ptr->bit0 == TRUE) || ((node_ptr->bit0 == FALSE) && (node_ptr->unk10_6 == TRUE)) ) - && (node_ptr->bit6 == 6) - && (arg2 == node_ptr->unk8) + && (node_ptr->category == 6) + && (arg2 == node_ptr->actorId) ) { - *arg1 = node_ptr->radius; + *arg1 = node_ptr->selector_or_radius; return TRUE; } node_ptr++; @@ -677,8 +679,8 @@ NodeProp *cube_findNodePropByActorId(Cube *cube, enum actor_e actor_id) { if( ( (i_ptr->bit0 == TRUE) || ( (i_ptr->bit0 == FALSE) && (i_ptr->unk10_6 == TRUE)) ) - && (i_ptr->bit6 == 6) - && (actor_id == i_ptr->unk8) + && (i_ptr->category == 6) + && (actor_id == i_ptr->actorId) ) { return i_ptr; } @@ -698,12 +700,12 @@ bool func_8032E2D4(Cube *arg0, s32 arg1[3], s32 arg2) { if( ((var_v1->bit0 == TRUE) || ((var_v1->bit0 == FALSE) && (var_v1->unk10_6 == TRUE)) ) - && (var_v1->bit6 == 6) - && (arg2 == var_v1->unk8) + && (var_v1->category == 6) + && (arg2 == var_v1->actorId) ) { - arg1[0] = var_v1->x; - arg1[1] = var_v1->y; - arg1[2] = var_v1->z; + arg1[0] = var_v1->position_x; + arg1[1] = var_v1->position_y; + arg1[2] = var_v1->position_z; return TRUE; } var_v1++; @@ -757,10 +759,10 @@ s32 func_8032E49C(Cube *cube, enum actor_e *actor_id_list, NodeProp **node_list, i_node = cube->prop1Ptr; end_node = cube->prop1Ptr + cube->prop1Cnt; while((i_node < end_node) && (found_cnt < node_list_capacity)) { - if (((i_node->bit0 == TRUE) || ((i_node->bit0 == FALSE) && (i_node->unk10_6 == TRUE))) && (i_node->bit6 == 6)) { + if (((i_node->bit0 == TRUE) || ((i_node->bit0 == FALSE) && (i_node->unk10_6 == TRUE))) && (i_node->category == 6)) { i_actor = actor_id_list; for(i_actor = actor_id_list; *i_actor != -1; i_actor++){ - if (i_node->unk8 == *i_actor) { + if (i_node->actorId == *i_actor) { node_list[found_cnt++] = i_node; break; } @@ -787,11 +789,11 @@ s32 func_8032E5A8(Cube *cube, s32 arg1, f32 (*arg2)[3], s32 capacity) { if( ( (i_node->bit0 == TRUE) || ((i_node->bit0 == FALSE) && (i_node->unk10_6 == TRUE)) ) - && (i_node->bit6 == 6) && (arg1 == i_node->unk8) + && (i_node->category == 6) && (arg1 == i_node->actorId) ) { - arg2[count][0] = (f32) i_node->x; - arg2[count][1] = (f32) i_node->y; - arg2[count][2] = (f32) i_node->z; + arg2[count][0] = (f32) i_node->position_x; + arg2[count][1] = (f32) i_node->position_y; + arg2[count][2] = (f32) i_node->position_z; count++; } i_node++; @@ -813,7 +815,7 @@ bool func_8032E6CC(Cube *cube, s32 *arg1, s32 arg2) { if( ( (i_node->bit0 == TRUE) || ((i_node->bit0 == FALSE) && (i_node->unk10_6 == TRUE)) ) - && (i_node->bit6 == 6) && (arg2 == i_node->unk8) + && (i_node->category == 6) && (arg2 == i_node->actorId) ) { *arg1 = i_node->yaw; return TRUE; @@ -843,11 +845,11 @@ static void __codeA5BC0_initPropPointerForCube(NodeProp *node, Cube *cube, s32 c cube_ptr_idx = cnt - 1; for(i = 0; i < cnt; i++){ iPtr = node + i; - if( (iPtr->bit6 == 6) - || (iPtr->bit6 == 8) - || (iPtr->bit6 == 7) - || (iPtr->bit6 == 9) - || (iPtr->bit6 == 0xA) + if( (iPtr->category == 6) + || (iPtr->category == 8) + || (iPtr->category == 7) + || (iPtr->category == 9) + || (iPtr->category == 0xA) || (iPtr->bit0 == 1) ){ memcpy(&cube->prop1Ptr[cube_ptr_idx], &node[i], sizeof(NodeProp)); @@ -912,15 +914,15 @@ void code7AF80_initCubeFromFile(File *file_ptr, Cube *cube) { cube->prop2Ptr = (Prop *) malloc(sp47 * sizeof(Prop)); file_getNBytes_ifExpected(file_ptr, 9, cube->prop2Ptr, cube->prop2Cnt * sizeof(Prop)); for(var_v1_2 = cube->prop2Ptr; var_v1_2 < cube->prop2Ptr + sp47; var_v1_2++){ - var_v1_2->unk8_4 = 1; - if (var_v1_2->is_3d) { - var_v1_2->unk8_5 = 0; + var_v1_2->isNotFeatherEggOrNote = TRUE; + if (var_v1_2->isModelProp) { + var_v1_2->isMirrored = FALSE; } if (sp34) { - if (!(var_v1_2->is_actor) && !(var_v1_2->is_3d)){ - temp_v0_5 = var_v1_2->spriteProp.sprite_index + 0x572; + if (!(var_v1_2->isActorProp) && !(var_v1_2->isModelProp)){ + temp_v0_5 = var_v1_2->spriteProp.spriteId + SPRITE_ASSET_OFFSET; if((temp_v0_5 == 0x580) || (temp_v0_5 == 0x6D1) || (temp_v0_5 == 0x6D6) || (temp_v0_5 == 0x6D7)){ - var_v1_2->unk8_4 = 0; + var_v1_2->isNotFeatherEggOrNote = FALSE; } } } @@ -969,11 +971,19 @@ void func_8032EE80(Cube *cube) { if ((cube->prop2Cnt != 0) && ((D_80383400 == 1) || (D_80383400 == 2))) { var_a1 = cube->prop2Ptr; for(var_t0 = 0; var_t0 < cube->prop2Cnt; var_t0++, var_a1++){ - if (!var_a1->is_actor) { - if (((var_a1->unk4[0] - D_803833F0[0]) * (var_a1->unk4[0] - D_803833F0[0])) + ((var_a1->unk4[1] - D_803833F0[1]) * (var_a1->unk4[1] - D_803833F0[1])) + ((var_a1->unk4[2] - D_803833F0[2]) * (var_a1->unk4[2] - D_803833F0[2])) < D_803833FC) { - var_v0 = (var_a1->is_3d) ? 2 : 1; + if (!var_a1->isActorProp) { + if ( + ((var_a1->position_x - D_803833F0[0]) * (var_a1->position_x - D_803833F0[0])) + + ((var_a1->position_y - D_803833F0[1]) * (var_a1->position_y - D_803833F0[1])) + + ((var_a1->position_z - D_803833F0[2]) * (var_a1->position_z - D_803833F0[2])) + < D_803833FC) + { + var_v0 = (var_a1->isModelProp) ? 2 : 1; if (var_v0 == D_80383400) { - D_803833FC = ((var_a1->unk4[0] - D_803833F0[0]) * (var_a1->unk4[0] - D_803833F0[0])) + ((var_a1->unk4[1] - D_803833F0[1]) * (var_a1->unk4[1] - D_803833F0[1])) + ((var_a1->unk4[2] - D_803833F0[2]) * (var_a1->unk4[2] - D_803833F0[2])); + D_803833FC = + ((var_a1->position_x - D_803833F0[0]) * (var_a1->position_x - D_803833F0[0])) + + ((var_a1->position_y - D_803833F0[1]) * (var_a1->position_y - D_803833F0[1])) + + ((var_a1->position_z - D_803833F0[2]) * (var_a1->position_z - D_803833F0[2])); D_80383404 = cube; D_80383408 = var_a1; D_8038340C = D_80383400; @@ -987,9 +997,17 @@ void func_8032EE80(Cube *cube) { if (D_80383400 == 3) { var_s0 = cube->prop1Ptr; for(var_s1 = 0; var_s1 < cube->prop1Cnt; var_s1++, var_s0++){ - if (((var_s0->x - D_803833F0[0]) * (var_s0->x - D_803833F0[0])) + ((var_s0->y - D_803833F0[1]) * (var_s0->y - D_803833F0[1])) + ((var_s0->z - D_803833F0[2]) * (var_s0->z - D_803833F0[2])) < D_803833FC) { + if ( + ((var_s0->position_x - D_803833F0[0]) * (var_s0->position_x - D_803833F0[0])) + + ((var_s0->position_y - D_803833F0[1]) * (var_s0->position_y - D_803833F0[1])) + + ((var_s0->position_z - D_803833F0[2]) * (var_s0->position_z - D_803833F0[2])) + < D_803833FC) + { if (D_80383558 == NULL || D_80383558(var_s0, D_8038355C)) { - D_803833FC = ((var_s0->x - D_803833F0[0]) * (var_s0->x - D_803833F0[0])) + ((var_s0->y - D_803833F0[1]) * (var_s0->y - D_803833F0[1])) + ((var_s0->z - D_803833F0[2]) * (var_s0->z - D_803833F0[2])); + D_803833FC = + ((var_s0->position_x - D_803833F0[0]) * (var_s0->position_x - D_803833F0[0])) + + ((var_s0->position_y - D_803833F0[1]) * (var_s0->position_y - D_803833F0[1])) + + ((var_s0->position_z - D_803833F0[2]) * (var_s0->position_z - D_803833F0[2])); D_80383404 = cube; D_80383408 = (Prop*)var_s0; D_8038340C = D_80383400; @@ -1015,9 +1033,9 @@ void func_8032F194(ActorMarker *marker, s32 position[3], Cube *cube) { sp24.words[2] = propPtr->words[2]; - v0->x = position[0]; - v0->y = position[1]; - v0->z = position[2]; + v0->position_x = position[0]; + v0->position_y = position[1]; + v0->position_z = position[2]; func_8032F21C(cube, position, marker, func_8032D9C0(marker->cubePtr, (Prop *)propPtr)); @@ -1030,19 +1048,19 @@ void func_8032F21C(Cube *cube, s32 position[3], ActorMarker *marker, bool arg3) ActorProp *sp1C; sp1C = &__codeA5BC0_initProp2Ptr(cube)->actorProp; - sp1C->is_actor = TRUE; - sp1C->x = (s16) position[0]; - sp1C->y = (s16) position[1]; - sp1C->z = (s16) position[2]; + sp1C->isActorProp = TRUE; + sp1C->position_x = (s16) position[0]; + sp1C->position_y = (s16) position[1]; + sp1C->position_z = (s16) position[2]; sp1C->marker = marker; - sp1C->is_3d = arg3; - sp1C->unk8_15 = 0; - sp1C->unk8_5 = FALSE; + sp1C->isModelProp = arg3; + sp1C->frame = 0; + sp1C->isMirrored = FALSE; sp1C->unk8_10 = (func_802E4A08()) ? 0xF : (u8)(randf() * 32); sp1C->unk8_3 = FALSE; - sp1C->unk8_2 = FALSE; - sp1C->unk8_4 = TRUE; + sp1C->isCollisionResolved = FALSE; + sp1C->isNotFeatherEggOrNote = TRUE; marker->propPtr = sp1C; marker->cubePtr = cube; if (func_80305D14()) { @@ -1069,9 +1087,9 @@ void func_8032F470(s32 *pos, ActorMarker *arg1){ cubePtr = (arg1->unk40_23)? func_8030364C(): cubeList_GetCubeAtPosition_s32(pos); if(cubePtr == arg1->cubePtr){ - arg1->propPtr->x = pos[0]; - arg1->propPtr->y = pos[1]; - arg1->propPtr->z = pos[2]; + arg1->propPtr->position_x = pos[0]; + arg1->propPtr->position_y = pos[1]; + arg1->propPtr->position_z = pos[2]; } else{ func_8032F194(arg1, pos, cubePtr); @@ -1297,7 +1315,7 @@ void code_A5BC0_initCubePropActorProp(Cube *cube) { prop_ptr = cube->prop2Ptr; prop_cnt = cube->prop2Cnt; while(prop_cnt != 0){ - if(prop_ptr->is_actor == TRUE){ + if(prop_ptr->isActorProp == TRUE){ prop_ptr->actorProp.marker->propPtr = &prop_ptr->actorProp; prop_ptr->actorProp.marker->cubePtr = cube; } @@ -1318,14 +1336,19 @@ void func_80330208(Cube *cube) { end_prop = cube->prop1Ptr + cube->prop1Cnt; func_80326C24(1); while(i_prop < end_prop){ - if (i_prop->bit6 == 6) { - position[0] = (s32) i_prop->x; - position[1] = (s32) i_prop->y; - position[2] = (s32) i_prop->z; - actor = func_803055E0(i_prop->unk8, position, i_prop->yaw, i_prop->unk10_31, i_prop->unk10_19); + if (i_prop->category == 6) { + position[0] = (s32) i_prop->position_x; + position[1] = (s32) i_prop->position_y; + position[2] = (s32) i_prop->position_z; + actor = func_803055E0( + i_prop->actorId, + position, + i_prop->yaw, + i_prop->unk10_31, + i_prop->unk10_19); if (actor != NULL) { actor->secondaryId = i_prop->unk10_31; - actor->actorTypeSpecificField = i_prop->radius; + actor->actorTypeSpecificField = i_prop->selector_or_radius; suSetSpriteScale(actor, (i_prop->scale != 0) ? ((f32)i_prop->scale * 0.01) : 1.0); } } @@ -1345,21 +1368,33 @@ void func_803303B8(Cube *cube) { current_node_ptr = cube->prop1Ptr; last_node_prop_ptr = cube->prop1Ptr + cube->prop1Cnt; while (current_node_ptr < last_node_prop_ptr) { - if (current_node_ptr->bit6 == 7) { - position[0] = (s32) current_node_ptr->x; - position[1] = (s32) current_node_ptr->y; - position[2] = (s32) current_node_ptr->z; - func_803065E4(current_node_ptr->unk8, position, current_node_ptr->radius, current_node_ptr->unk10_31, current_node_ptr->pad10_7); - } else if (current_node_ptr->bit6 == 9) { - position[0] = (s32) current_node_ptr->x; - position[1] = (s32) current_node_ptr->y; - position[2] = (s32) current_node_ptr->z; - func_8030688C(current_node_ptr->unk8, position, current_node_ptr->radius, current_node_ptr->unk10_0); - } else if (current_node_ptr->bit6 == 0xA) { - position[0] = (s32) current_node_ptr->x; - position[1] = (s32) current_node_ptr->y; - position[2] = (s32) current_node_ptr->z; - func_80306AA8(current_node_ptr->unk8, position, current_node_ptr->radius); + if (current_node_ptr->category == 7) { + position[0] = (s32) current_node_ptr->position_x; + position[1] = (s32) current_node_ptr->position_y; + position[2] = (s32) current_node_ptr->position_z; + func_803065E4( + current_node_ptr->actorId, + position, + current_node_ptr->selector_or_radius, + current_node_ptr->unk10_31, + current_node_ptr->pad10_7); + } else if (current_node_ptr->category == 9) { + position[0] = (s32) current_node_ptr->position_x; + position[1] = (s32) current_node_ptr->position_y; + position[2] = (s32) current_node_ptr->position_z; + func_8030688C( + current_node_ptr->actorId, + position, + current_node_ptr->selector_or_radius, + current_node_ptr->unk10_0); + } else if (current_node_ptr->category == 0xA) { + position[0] = (s32) current_node_ptr->position_x; + position[1] = (s32) current_node_ptr->position_y; + position[2] = (s32) current_node_ptr->position_z; + func_80306AA8( + current_node_ptr->actorId, + position, + current_node_ptr->selector_or_radius); } current_node_ptr++; } @@ -1428,7 +1463,7 @@ void func_803306C8(s32 arg0) { if (!D_8036E7CC); var_s0_2 = TRUE; - func_8033B338(&var_a2->unk4, &var_a2->unk8); + codeB3A80_releaseSprite(&var_a2->unk4, &var_a2->unk8); } if ((arg0 != 1) && (var_s0_2 == 1) && (func_80254BC4(1))) { return; @@ -1479,9 +1514,9 @@ s32 func_80330974(ActorMarker *marker, s32 arg1, f32 arg2, s32 arg3) { return 0; } sp58 = func_8033A12C(model); - position[0] = (f32) marker->propPtr->x; - position[1] = (f32) marker->propPtr->y; - position[2] = (f32) marker->propPtr->z; + position[0] = (f32) marker->propPtr->position_x; + position[1] = (f32) marker->propPtr->position_y; + position[2] = (f32) marker->propPtr->position_z; rotation[0] = (f32)marker->pitch; rotation[1] = (f32)marker->yaw; @@ -1518,7 +1553,7 @@ BKModelBin *marker_loadModelBin(ActorMarker *this){ func_8032ACA8(thisActor); } func_8032AB84(thisActor); - if(!this->unk18 && this->propPtr->is_3d && modelInfo->modelPtr && func_8033A12C(modelInfo->modelPtr)){ + if(!this->unk18 && this->propPtr->isModelProp && modelInfo->modelPtr && func_8033A12C(modelInfo->modelPtr)){ this->unk18 = func_80330B10(); } modelInfo->unk10 = globalTimer_getTime(); @@ -1582,7 +1617,7 @@ BKSpriteDisplayData *func_80330E54(ActorMarker *marker, BKSprite **sprite_ptr) { } model_cache_ptr = &modelCache[marker_getActor(marker)->modelCacheIndex]; if (model_cache_ptr->unk4 == 0) { - model_cache_ptr->unk4 = func_8033B6C4(marker->modelId, &model_cache_ptr->unk8); + model_cache_ptr->unk4 = codeB3A80_getSprite(marker->modelId, &model_cache_ptr->unk8); } model_cache_ptr->unk10 = globalTimer_getTime(); if (sprite_ptr != NULL) { @@ -1601,23 +1636,23 @@ BKSprite *func_80330F50(ActorMarker * marker){ return sp1C; } -s32 codeA5BC0_getNodePropUnkA(NodeProp *arg0){ - return arg0->unkA; //marker_id +s32 codeA5BC0_getNodePropMarkerId(NodeProp *arg0){ + return arg0->markerId; } -s32 codeA5BC0_getNodePropBit6(NodeProp *arg0){ - return arg0->bit6; +s32 codeA5BC0_getNodePropCategory(NodeProp *arg0){ + return arg0->category; } -s32 codeA5BC0_getNodePropUnk8(NodeProp *arg0){ - return arg0->unk8; +s32 codeA5BC0_getNodePropActorId(NodeProp *arg0){ + return arg0->actorId; } -s32 codeA5BC0_getPositionAndReturnRadius(NodeProp *arg0, s32 arg1[3]){ - arg1[0] = arg0->x; - arg1[1] = arg0->y; - arg1[2] = arg0->z; - return arg0->radius; +s32 codeA5BC0_getPositionAndSelectorOrRadius(NodeProp *arg0, s32 arg1[3]){ + arg1[0] = arg0->position_x; + arg1[1] = arg0->position_y; + arg1[2] = arg0->position_z; + return arg0->selector_or_radius; } // is used to set global timer time? @@ -1633,9 +1668,9 @@ s32 codeA5BC0_getNodePropUnkC(NodeProp *arg0){ } void func_80330FCC(ActorMarker *marker, s32 arg1[3]){ - arg1[0] = marker->propPtr->x; - arg1[1] = marker->propPtr->y; - arg1[2] = marker->propPtr->z; + arg1[0] = marker->propPtr->position_x; + arg1[1] = marker->propPtr->position_y; + arg1[2] = marker->propPtr->position_z; } void func_80330FF4(void){ @@ -1708,7 +1743,7 @@ BKCollisionTri *func_803311D4(Cube *cube, f32 *arg1, f32 *arg2, f32 *arg3, u32 a for(var_s1 = cube->prop2Ptr, var_s5 = cube->prop2Cnt; var_s5 > 0; var_s5--, var_s1++) { if(var_s1); - if (!var_s1->is_actor && var_s1->is_3d && var_s1->unk8_4) { //ModelProp + if (!var_s1->isActorProp && var_s1->isModelProp && var_s1->isNotFeatherEggOrNote) { //ModelProp var_s0 = propModelList_getModelIfActive(((u32)var_s1->modelProp.unk0 >> 0x4)); if ((var_s0 != NULL) || (func_8028F280() && ((var_s0 = propModelList_getModel(((u32)var_s1->modelProp.unk0 >> 0x4))) != NULL))) { temp_s2 = model_getCollisionList(var_s0); @@ -1725,7 +1760,7 @@ BKCollisionTri *func_803311D4(Cube *cube, f32 *arg1, f32 *arg2, f32 *arg3, u32 a } } } - } else if (var_s1->is_actor && var_s1->unk8_3 && var_s1->unk8_4 && !func_80331158(var_s1->actorProp.marker, arg1, arg2)) { + } else if (var_s1->isActorProp && var_s1->unk8_3 && var_s1->isNotFeatherEggOrNote && !func_80331158(var_s1->actorProp.marker, arg1, arg2)) { if (!(var_s1->actorProp.marker->unk3E_0 && (marker_getActor(var_s1->actorProp.marker)->unk3C & 0x008000000))) { var_a0 = func_80330DE4(var_s1->actorProp.marker); } else { @@ -1737,9 +1772,9 @@ BKCollisionTri *func_803311D4(Cube *cube, f32 *arg1, f32 *arg2, f32 *arg3, u32 a if (temp_s0 != 0) { temp_s2_2 = marker_getActor(var_s1->actorProp.marker); temp_a1 = func_80330C74(temp_s2_2); - actor_position[0] = (f32) var_s1->actorProp.x; - actor_position[1] = (f32) var_s1->actorProp.y; - actor_position[2] = (f32) var_s1->actorProp.z; + actor_position[0] = (f32) var_s1->actorProp.position_x; + actor_position[1] = (f32) var_s1->actorProp.position_y; + actor_position[2] = (f32) var_s1->actorProp.position_z; actor_rotation[0] = (f32) var_s1->actorProp.marker->pitch; actor_rotation[1] = (f32) var_s1->actorProp.marker->yaw; actor_rotation[2] = (f32) var_s1->actorProp.marker->roll; @@ -1762,7 +1797,7 @@ BKCollisionTri *func_803311D4(Cube *cube, f32 *arg1, f32 *arg2, f32 *arg3, u32 a } } } - } else if (var_s1->is_actor) { + } else if (var_s1->isActorProp) { if (var_s1->actorProp.marker->unk18 != NULL) { if (var_s1->actorProp.marker->unk18->unk0 != NULL) { var_v0 = var_s1->actorProp.marker->unk18->unk0(var_s1->actorProp.marker, arg1, arg2, arg3, arg4); @@ -1802,7 +1837,7 @@ s32 func_80331638(Cube *cube, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s new_var2 = sp8C; for (; var_s3 != 0; var_s0++, var_s3--) { - if (((!var_s0->is_actor) && var_s0->is_3d) && var_s0->unk8_4) + if (((!var_s0->isActorProp) && var_s0->isModelProp) && var_s0->isNotFeatherEggOrNote) { model_bin = propModelList_getModelIfActive(((u32) (*((u16 *) (&var_s0->modelProp)))) >> 4); if (model_bin == 0) @@ -1831,7 +1866,7 @@ s32 func_80331638(Cube *cube, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s } } else - if ((var_s0->is_actor && var_s0->unk8_3) && var_s0->unk8_4) + if ((var_s0->isActorProp && var_s0->unk8_3) && var_s0->isNotFeatherEggOrNote) { model_collision_list = func_80330DE4(var_s0->actorProp.marker); pad9C = model_collision_list; @@ -1847,9 +1882,9 @@ s32 func_80331638(Cube *cube, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s temp_v0_6 = marker_getActor(var_s0->actorProp.marker); temp_a1 = func_80330C74(temp_v0_6); { - sp98[0] = (f32) var_s0->actorProp.x; - sp98[1] = (f32) var_s0->actorProp.y; - sp98[2] = (f32) var_s0->actorProp.z; + sp98[0] = (f32) var_s0->actorProp.position_x; + sp98[1] = (f32) var_s0->actorProp.position_y; + sp98[2] = (f32) var_s0->actorProp.position_z; sp8C[0] = (f32) var_s0->actorProp.marker->pitch; sp8C[1] = (f32) var_s0->actorProp.marker->yaw; sp8C[2] = (f32) var_s0->actorProp.marker->roll; @@ -1861,7 +1896,7 @@ s32 func_80331638(Cube *cube, f32 arg1[3], f32 arg2[3], f32 arg3, f32 arg4[3], s } } else - if (var_s0->is_actor) + if (var_s0->isActorProp) { temp_a0 = var_s0->actorProp.marker; temp_v0_7 = temp_a0->unk18; @@ -1903,9 +1938,9 @@ BKCollisionTri *func_803319C0(Cube *cube, f32 position[3], f32 radius, s32 arg3, var_s7 = NULL; prop_ptr = cube->prop2Ptr; for (i = cube->prop2Cnt; i != 0; i--, prop_ptr++) { - if (((!prop_ptr->is_actor) && prop_ptr->is_3d) && prop_ptr->unk8_4) { + if (((!prop_ptr->isActorProp) && prop_ptr->isModelProp) && prop_ptr->isNotFeatherEggOrNote) { mProp = &prop_ptr->modelProp; - new_var = propModelList_getModelIfActive(mProp->model_index); + new_var = propModelList_getModelIfActive(mProp->modelId); if (1) { } if (1) { } if (1) { } model_bin = new_var; if (model_bin != NULL){ @@ -1925,7 +1960,7 @@ BKCollisionTri *func_803319C0(Cube *cube, f32 position[3], f32 radius, s32 arg3, } } else { aProp = &prop_ptr->actorProp; - if ((prop_ptr->is_actor && prop_ptr->unk8_3) && prop_ptr->unk8_4) { + if ((prop_ptr->isActorProp && prop_ptr->unk8_3) && prop_ptr->isNotFeatherEggOrNote) { model_bin = func_80330DE4(aProp->marker); if (model_bin != 0) { new_var = model_getCollisionList(model_bin); @@ -1934,9 +1969,9 @@ BKCollisionTri *func_803319C0(Cube *cube, f32 position[3], f32 radius, s32 arg3, temp_v0_6 = marker_getActor(aProp->marker); temp_a1 = func_80330C74(temp_v0_6); - actor_position[0] = (f32) aProp->x; - actor_position[1] = (f32) aProp->y; - actor_position[2] = (f32) aProp->z; + actor_position[0] = (f32) aProp->position_x; + actor_position[1] = (f32) aProp->position_y; + actor_position[2] = (f32) aProp->position_z; actor_rotation[0] = aProp->marker->pitch; actor_rotation[1] = aProp->marker->yaw; actor_rotation[2] = aProp->marker->roll; @@ -1947,7 +1982,7 @@ BKCollisionTri *func_803319C0(Cube *cube, f32 position[3], f32 radius, s32 arg3, } } } - } else if (prop_ptr->is_actor) { + } else if (prop_ptr->isActorProp) { Struct6Cs *temp_v0_7; temp_v0_7 = aProp->marker->unk18; if (temp_v0_7 != 0) { @@ -1983,7 +2018,7 @@ f32 func_80331D20(BKSprite *sprite) { f32 func_80331E34(Prop *arg0){ - return func_80331D20(propModelList_getSprite(arg0->spriteProp.sprite_index)); + return func_80331D20(propModelList_getSprite(arg0->spriteProp.spriteId)); } f32 func_80331E64(ActorMarker *marker) { @@ -2002,7 +2037,7 @@ f32 func_80331E64(ActorMarker *marker) { f32 func_80331F1C(Prop *arg0){ - return vtxList_getGlobalNorm(model_getVtxList(propModelList_getModel(arg0->modelProp.model_index))); + return vtxList_getGlobalNorm(model_getVtxList(propModelList_getModel(arg0->modelProp.modelId))); } f32 func_80331F54(ActorMarker *marker) { @@ -2030,8 +2065,8 @@ f32 func_80332050(Prop *prop, ActorMarker *marker, s32 arg2) { ActorMarker * phi_v0; f32 phi_f2; - phi_v0 =(prop->is_actor) ? prop->actorProp.marker : NULL; - phi_f2 = prop->unk4[arg2] - (&marker->propPtr->x)[arg2] - marker->unk38[arg2]; + phi_v0 =(prop->isActorProp) ? prop->actorProp.marker : NULL; + phi_f2 = prop->position[arg2] - (&marker->propPtr->position_x)[arg2] - marker->unk38[arg2]; if (phi_v0 != NULL) { phi_f2 += phi_v0->unk38[arg2]; } @@ -2069,7 +2104,7 @@ f32 func_8033229C(ActorMarker *marker) { ActorProp *prop; prop = marker->propPtr; - if (prop->is_3d) { + if (prop->isModelProp) { return func_803320BC(prop, func_80331F54); } else{ @@ -2093,27 +2128,27 @@ Prop *func_803322F0(Cube *cube, ActorMarker *marker, f32 arg2, s32 arg3, s32 *ar if (marker->collidable) { phi_s1 = &cube->prop2Ptr[(*arg4)++]; for(phi_s3 = phi_s3; phi_s3 != 0; phi_s3--){ - if (phi_s1->unk8_4) { - if( phi_s1->is_actor && (!phi_s1->actorProp.marker->unk3E_0 || !marker_getActor(phi_s1->actorProp.marker)->despawn_flag)){ + if (phi_s1->isNotFeatherEggOrNote) { + if( phi_s1->isActorProp && (!phi_s1->actorProp.marker->unk3E_0 || !marker_getActor(phi_s1->actorProp.marker)->despawn_flag)){ if (phi_s1->actorProp.marker->collidable && (marker != phi_s1->actorProp.marker)) { if( (phi_s1->actorProp.marker->modelId) && (func_803327A8(phi_s1->actorProp.marker->modelId) & arg3) ) { - if( phi_s1->actorProp.is_3d + if( phi_s1->actorProp.isModelProp && (phi_s1->actorProp.marker->unk18 != NULL) && (phi_s1->actorProp.marker->unk18->unkC != NULL) ) { func_803320BC(&phi_s1->actorProp, &func_80331F54); - sp68[0] = (f32) (marker->unk38[0] + marker->propPtr->x); - sp68[1] = (f32) (marker->unk38[1] + marker->propPtr->y); - sp68[2] = (f32) (marker->unk38[2] + marker->propPtr->z); + sp68[0] = (f32) (marker->unk38[0] + marker->propPtr->position_x); + sp68[1] = (f32) (marker->unk38[1] + marker->propPtr->position_y); + sp68[2] = (f32) (marker->unk38[2] + marker->propPtr->position_z); if ((phi_s1->actorProp.marker->unk40_31 = phi_s1->actorProp.marker->unk18->unkC(phi_s1->actorProp.marker, sp68, arg2, sp74, 0)) != 0) { return phi_s1; } } else{ phi_f24 = func_80332050(phi_s1, marker, 0); phi_f22 = func_80332050(phi_s1, marker, 2); - if (phi_s1->actorProp.is_3d) { + if (phi_s1->actorProp.isModelProp) { phi_f20 = func_80332050(phi_s1, marker, 1); phi_f2 = func_803320BC(&phi_s1->actorProp, func_80331F54); } else { @@ -2128,8 +2163,8 @@ Prop *func_803322F0(Cube *cube, ActorMarker *marker, f32 arg2, s32 arg3, s32 *ar } } } - else if (phi_s1->is_3d) {//ModelProp - if (func_803327A8(phi_s1->modelProp.model_index + 0x2D1) & arg3) { + else if (phi_s1->isModelProp) {//ModelProp + if (func_803327A8(phi_s1->modelProp.modelId + MODEL_ASSET_OFFSET) & arg3) { phi_f24 = func_80332050(phi_s1, marker, 0); phi_f20 = func_80332050(phi_s1, marker, 1) + func_80332220(phi_s1, &func_80331F1C); phi_f22 = func_80332050(phi_s1, marker, 2); @@ -2140,7 +2175,7 @@ Prop *func_803322F0(Cube *cube, ActorMarker *marker, f32 arg2, s32 arg3, s32 *ar } } else{ - if (func_803327A8(phi_s1->spriteProp.sprite_index + 0x572) & arg3) { + if (func_803327A8(phi_s1->spriteProp.spriteId + SPRITE_ASSET_OFFSET) & arg3) { phi_f24 = func_80332050(phi_s1, marker, 0);\ phi_f20 = func_80332050(phi_s1, marker, 1) + func_80332220(phi_s1, &func_80331E34);\ phi_f22 = func_80332050(phi_s1, marker, 2); diff --git a/src/core2/code_AD110.c b/src/core2/code_AD110.c index 974c02b9..641f2e16 100644 --- a/src/core2/code_AD110.c +++ b/src/core2/code_AD110.c @@ -553,17 +553,17 @@ void func_8033443C(NodeProp *arg0, ActorMarker *arg1){} void func_80334448(NodeProp *arg0, ActorMarker *arg1) { s32 global_timer_time; - switch(codeA5BC0_getNodePropBit6(arg0)) { + switch(codeA5BC0_getNodePropCategory(arg0)) { case 3: // warp (L80334480) global_timer_time = globalTimer_getTime(); if ((codeA5BC0_getNodePropUnkC(arg0) + 1) != global_timer_time) { - ((CodeAD110Callback) sWarpFunctions[codeA5BC0_getNodePropUnk8(arg0)])(arg0, arg1); + ((CodeAD110Callback) sWarpFunctions[codeA5BC0_getNodePropActorId(arg0)])(arg0, arg1); } codeA5BC0_setNodePropUnkC(arg0, global_timer_time); break; case 4: // radius trigger like camera (L803344E0) - sRadiusTriggers[codeA5BC0_getNodePropUnk8(arg0)](arg0, arg1); + sRadiusTriggers[codeA5BC0_getNodePropActorId(arg0)](arg0, arg1); break; case 0: //L80334508 diff --git a/src/core2/code_AEDA0.c b/src/core2/code_AEDA0.c index f50ac2f5..83def3e2 100644 --- a/src/core2/code_AEDA0.c +++ b/src/core2/code_AEDA0.c @@ -4,7 +4,7 @@ #include "variables.h" void func_803382D8(s32 arg0); -void func_803382E4(s32 arg0); +void codeAEDA0_setSpriteDrawMode(s32 arg0); void spriteRender_set1Primative(bool boolean); void func_803382FC(s32 arg0); void func_80338308(s32 arg0, s32 arg1); @@ -55,9 +55,9 @@ u8 D_80370338[4] = {1, 0, 0, 0}; u8 D_8037033C = 0; /* .bss */ -s32 D_80383610; -s32 D_80383614; -s32 D_80383618; +s32 sPrimColorR; +s32 sPrimColorG; +s32 sPrimColorB; s32 D_8038361C; s32 D_80383620; s32 D_80383624; @@ -75,7 +75,7 @@ void func_803380F8(Gfx **gfx, Mtx **mtx, f32 arg2[3]); void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]); /* .code */ -void func_80335D30(Gfx **gfx){ +void codeAEDA0_drawSprite(Gfx **gfx){ gDPPipeSync((*gfx)++); if (D_80370338[0] == 0) { gDPSetColorDither((*gfx)++, G_CD_DISABLE); @@ -86,26 +86,26 @@ void func_80335D30(Gfx **gfx){ case 15: gSPDisplayList((*gfx)++, D_803702C0); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, 0xFF); return; case 12: gSPDisplayList((*gfx)++, D_80370290); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, 0xFF); return; case 10: gSPDisplayList((*gfx)++, D_80370260); gDPSetCombineLERP((*gfx)++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038363C); gDPSetEnvColor((*gfx)++, D_80383620, D_80383624, D_80383628, 0xFF); return; case 16: gSPDisplayList((*gfx)++, D_80370290); gDPSetCombineLERP((*gfx)++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038363C); gDPSetEnvColor((*gfx)++, D_80383620, D_80383624, D_80383628, 0xFF); return; @@ -118,37 +118,37 @@ void func_80335D30(Gfx **gfx){ gSPDisplayList((*gfx)++, D_80370260); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); } - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038363C); return; case 7: if (D_8038361C != 0) { gSPDisplayList((*gfx)++, D_80370308); gDPSetCombineLERP((*gfx)++, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, TEXEL0, PRIMITIVE, COMBINED, PRIMITIVE_ALPHA, COMBINED, 0, 0, 0, COMBINED); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038361C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038361C); } else { gSPDisplayList((*gfx)++, D_80370260); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, 0xFF); } return; case 6: gSPDisplayList((*gfx)++, D_80370260); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038363C); return; case 13: gSPDisplayList((*gfx)++, D_80370290); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, D_8038363C); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, D_8038363C); return; case 5: gSPDisplayList((*gfx)++, D_80370260); gDPSetCombineMode((*gfx)++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM); - gDPSetPrimColor((*gfx)++, 0, 0, D_80383610, D_80383614, D_80383618, 0xFF); + gDPSetPrimColor((*gfx)++, 0, 0, sPrimColorR, sPrimColorG, sPrimColorB, 0xFF); return; case 9: @@ -195,7 +195,7 @@ void func_80335D30(Gfx **gfx){ } } -void func_8033687C( Gfx **gfx ) +void codeAEDA0_postDrawSprite( Gfx **gfx ) { /* Turn off texturing */ gDPPipeSync((*gfx)++); @@ -251,7 +251,7 @@ void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 fr } else if (sprite->type & SPRITE_TYPE_RGBA32){ pixel_size_nibbles = 8; } - func_80335D30(gfx); + codeAEDA0_drawSprite(gfx); //set to 1Prim if using if(D_80383638 || (sprite->type & SPRITE_TYPE_CI8)){ @@ -372,7 +372,7 @@ void spriteRender_drawWithSegment(Gfx **gfx, Vtx **vtx, BKSprite *sprite, u32 fr gDPPipelineMode((*gfx)++, G_PM_NPRIMITIVE); } if(sp1B4); - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); } void func_80337B68(Gfx **gfx, Vtx **vtx, Struct84s *texture_list, s32 texture_index) { @@ -388,7 +388,7 @@ void func_80337B68(Gfx **gfx, Vtx **vtx, Struct84s *texture_list, s32 texture_in s32 i_vtx0; s32 size; - func_80335D30(gfx); + codeAEDA0_drawSprite(gfx); txtr_ptr = func_8033EFB0(texture_list, texture_index); start_vtx = *vtx; temp_lo = (s32) D_80383644 / 3; @@ -422,7 +422,7 @@ void func_80337B68(Gfx **gfx, Vtx **vtx, Struct84s *texture_list, s32 texture_in tmem += txtr_ptr->w * 0x1A; i_vtx0 += 4; } - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); } void func_80338048(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 arg3[3], Struct84s *arg4, s32 arg5) { @@ -467,7 +467,7 @@ void func_803381B4(Gfx **gfx, Mtx **mtx, f32 arg2[3]) { void func_80338270(){ func_803382D8(0xFF); - func_803382E4(0); + codeAEDA0_setSpriteDrawMode(0); spriteRender_set1Primative(0); func_803382FC(0xFF); func_80338308(100, 100); @@ -485,7 +485,7 @@ void func_803382D8(s32 arg0){ D_80383630 = arg0; } -void func_803382E4(s32 arg0){ +void codeAEDA0_setSpriteDrawMode(s32 arg0){ D_80383634 = arg0; } @@ -507,10 +507,10 @@ void func_8033831C(s32 *arg0, s32 *arg1){ *arg1 = D_80383644; } -void func_80338338(s32 r, s32 g, s32 b){ - D_80383610 = r; - D_80383614 = g; - D_80383618 = b; +void codeAEDA0_setPrimaryColorRGB(s32 rgb_red, s32 rgb_green, s32 rgb_blue){ + sPrimColorR = rgb_red; + sPrimColorG = rgb_green; + sPrimColorB = rgb_blue; } void func_80338354(s32 arg0){ diff --git a/src/core2/code_B3A80.c b/src/core2/code_B3A80.c index 1787aa83..db504f2b 100644 --- a/src/core2/code_B3A80.c +++ b/src/core2/code_B3A80.c @@ -234,18 +234,17 @@ void func_8033B2A4(s32 arg0) { assetCacheLength += 1; } -bool func_8033B338(void **sprite_ptr, BKSpriteDisplayData **arg1) +bool codeB3A80_releaseSprite(BKSprite **sprite_ptr, BKSpriteDisplayData **sprite_gfx_ptr) { - void *new_var; + BKSprite *sprite; if ((*sprite_ptr) == NULL) - return 0; + return FALSE; - new_var = *sprite_ptr; - assetcache_release(new_var); - *sprite_ptr = 0; - *arg1 = 0; - return 1; - + sprite = *sprite_ptr; + assetcache_release(sprite); + *sprite_ptr = NULL; + *sprite_gfx_ptr = NULL; + return TRUE; } bool func_8033B388(BKSprite **sprite_ptr, BKSpriteDisplayData **arg1){ @@ -333,11 +332,11 @@ bool asset_isCompressed(enum asset_e arg0){ //asset_compressed? } //returns raw sprite(as saved in ROM) and points arg1 to a parsed sprite(?) -BKSprite *func_8033B6C4(enum asset_e sprite_id, BKSpriteDisplayData **arg1){ +BKSprite *codeB3A80_getSprite(enum asset_e sprite_id, BKSpriteDisplayData **arg1){ BKSprite *s0; s0 = assetcache_get(sprite_id); if(D_80383CD4[assetCacheCurrentIndex] == NULL){ - func_803382E4(-1); + codeAEDA0_setSpriteDrawMode(-1); func_80338308(sprite_getUnk8(s0), sprite_getUnkA(s0)); D_80383CD4[assetCacheCurrentIndex] = func_80344A1C(s0); } diff --git a/src/core2/code_B62B0.c b/src/core2/code_B62B0.c index 4e2907ea..b2ef59bc 100644 --- a/src/core2/code_B62B0.c +++ b/src/core2/code_B62B0.c @@ -2,13 +2,28 @@ #include "functions.h" #include "variables.h" -//Struct5Cs = u16 packed bitwise as (aaaa bbcc cdde eeff) +//CollisionParams = u16 packed bitwise as (aaaa bbcc cdde eeff) typedef struct{ - u16 unk0; - u16 unk2; //Struct5Cs - u16 unk4[11]; //Struct5Cs -} Struct_core2_B62B0_0; + u16 markerId; + u16 collisionUnion; + union{ + u16 collisionTypes[11]; + struct{ + u16 activeClawSwipe; + u16 activeRoll; + u16 jumpOnTop; + u16 activeRatATat; + u16 activeBeakBarge; + u16 activeBeakBuster; + u16 activeBeakBomb; + u16 activeEggFiring; + u16 activeWonderwing; + u16 activeCrocBite; + u16 otherContact; + }; + }; +} CollisionTable; typedef struct{ s32 (*unk0)(ActorMarker *, ActorMarker *); @@ -16,194 +31,197 @@ typedef struct{ } Struct_core2_B62B0_1; /* .data */ -Struct_core2_B62B0_0 D_80370AC0[0xBB] = { - {MARKER_12A_TOPPER_THE_CARROT_A, 0x0000, {0x0904, 0x8504, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}}, - {MARKER_129_BAWL_THE_ONION_A, 0x0000, {0x0504, 0x0984, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}}, - {MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, 0x0000, {0x0000, 0x0000, 0x8404, 0x0984, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404}}, - {MARKER_135_QUARRIE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {MARKER_1E6_TOPPER_THE_CARROT_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, - {MARKER_1E7_BAWL_THE_ONION_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, - {MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, - {MARKER_1EA_GRUNTLING_RED, 0x0001, {0x0A08, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0984, 0x2020}}, - {MARKER_295_GRUNTLING_BLUE, 0x0001, {0x0A0C, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, - {MARKER_1F1_GRUNTLING_BLACK, 0x0001, {0x0A10, 0x898C, 0x8100, 0x8988, 0x8A08, 0x8A08, 0x0A84, 0x098C, 0x0A04, 0x0000, 0x2020}}, - {0x1E0, 0x0000, {0x7000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0004, 0x8000, 0x0000, 0x7000}}, - {0x005, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0000, 0x1020}}, - {0x004, 0x0001, {0x0A88, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x1020}}, - {0x003, 0x0000, {0x0914, 0x990C, 0x2020, 0x8908, 0x8908, 0x8908, 0x0A04, 0x0914, 0x0904, 0x0000, 0x4020}}, - {0x29E, 0x0000, {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0xA000, 0x0004, 0x8000, 0x0000, 0x8000}}, - {MARKER_7_CONGA, 0x0000, {0x0000, 0x0000, 0x3020, 0x9000, 0x0000, 0x0000, 0x0000, 0x0804, 0x9000, 0x0000, 0x3020}}, - {MARKER_13_SNIPPET, 0x0002, {0x0504, 0x7584, 0x8100, 0x7584, 0x7604, 0x0A04, 0x0A84, 0x0504, 0x0A04, 0x0000, 0x1020}}, - {0x16B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0904, 0x0A04, 0x0000, 0x1020}}, - {MARKER_DD_BLACK_SNIPPET, 0x0002, {0x060C, 0x7588, 0x8100, 0x7588, 0x7608, 0x8604, 0x0A84, 0x050C, 0x0A04, 0x0000, 0x1020}}, - {0x0DE, 0x0001, {0x0908, 0x0988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x090C, 0x0A04, 0x0000, 0x1020}}, - {0x015, 0x0001, {0x0A88, 0x7988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x1424}}, - {0x065, 0x0804, {0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x090E, 0x0804, 0x0000, 0x5844}}, - {0x014, 0x0003, {0x3020, 0x3020, 0x3020, 0x9080, 0x9080, 0x9080, 0x0A84, 0x0914, 0x0904, 0x0000, 0x3020}}, - {MARKER_A5_NIPPER, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x5020}}, - {0x16C, 0x0000, {0x0000, 0x0000, 0x0000, 0xB804, 0x0000, 0x0000, 0x0000, 0x0404, 0xB804, 0x0000, 0x5020}}, - {MARKER_A4_LOCKUP_SLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, - {MARKER_F6_LOCKUP_MEDIUM, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, - {MARKER_F7_LOCKUP_FAST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, - {0x0029, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0808, 0x0804, 0x0000, 0x3444}}, - {0x01CF, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0808, 0x0804, 0x0000, 0x1424}}, - {0x01A6, 0x0000, {0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x0000, 0x0000, 0x3020, 0x3020}}, - {MARKER_1A7_CLANKER_WHIPCRACK, 0x0804, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3020}}, - {MARKER_69_CHUMP_FISH, 0x0001, {0x2020, 0x2020, 0x2020, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, - {MARKER_173_CHUMP_FISH_2, 0x0001, {0x2020, 0x2020, 0x2020, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x4020}}, - {MARKER_C1_FLIBBIT_RED, 0x0000, {0x0A09, 0x0985, 0x8100, 0x0985, 0x0A05, 0x0A05, 0x0000, 0x0989, 0x0A05, 0x0986, 0x2020}}, - {MARKER_C5_FLIBBIT_YELLOW, 0x0000, {0x0A0D, 0x8989, 0x8100, 0x8989, 0x7A09, 0x7A09, 0x0000, 0x098D, 0x0A05, 0x0986, 0x2020}}, - {MARKER_C2_BUZZBOMB, 0x0000, {0x0805, 0x0805, 0x8000, 0x0805, 0x0805, 0x0805, 0x0000, 0x0805, 0x0805, 0x0806, 0x3020}}, - {MARKER_B1_SIR_SLUSH, 0x0000, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0x9000, 0x0004, 0x8000, 0x0000, 0x7000}}, - {0x0287, 0x0001, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0x8804, 0x0004, 0x8000, 0x0000, 0x7000}}, - {MARKER_205_TWINKLY_MUNCHER, 0x0000, {0x0000, 0x0000, 0x0000, 0x0404, 0x0404, 0x0404, 0x0000, 0x0408, 0x0404, 0x0000, 0x0000}}, - {MARKER_245_XMAS_TREE_EGG_TOLL, 0x0000, {0x3004, 0x3004, 0x3004, 0x3004, 0x3004, 0x2004, 0x3004, 0x0000, 0x0000, 0x3004, 0x3004}}, - {MARKER_250_ICECUBE_A, 0x0000, {0x0A90, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0910, 0x0A04, 0x0984, 0x3104}}, - {MARKER_25F_ICECUBE_B, 0x0001, {0x0A88, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0908, 0x0A04, 0x0984, 0x3104}}, - {0x00AD, 0x0001, {0x0A10, 0x998C, 0x0020, 0x9988, 0x8A08, 0x0A04, 0x0A84, 0x0914, 0x0A04, 0x0000, 0x5124}}, - {MARKER_253_SCARAB_BEETLE, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0000, 0x3020}}, - {MARKER_219_MUMMUM, 0x0001, {0x0588, 0x7584, 0x8100, 0x7584, 0x7604, 0x7604, 0x0684, 0x0588, 0x0A04, 0x0000, 0x2020}}, - {MARKER_298_MUMMUM_BALL, 0x0000, {0x7000, 0x8000, 0x7000, 0x8000, 0x9000, 0x9000, 0xB000, 0x0004, 0x0A04, 0x0000, 0x2020}}, - {MARKER_218_LIMBO, 0x0001, {0x0588, 0x7584, 0x8100, 0x7584, 0x7604, 0x7604, 0x0684, 0x050C, 0x0A04, 0x0000, 0x2020}}, - {MARKER_99_TEEHEE, 0x0001, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x0804, 0x0000, 0x2424}}, - {MARKER_296_TEEHEE_PURPLE, 0x0000, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x0804, 0x0000, 0x2424}}, - {MARKER_96_GRAVESTONE, 0x0001, {0x0A10, 0x890C, 0x8100, 0x8908, 0x8988, 0x8988, 0x0A84, 0x0914, 0x0984, 0x0000, 0x3024}}, - {MARKER_297_GIANT_GRAVESTONE, 0x0001, {0x0A10, 0x890C, 0x8100, 0x8908, 0x8988, 0x8988, 0x0A84, 0x0914, 0x0984, 0x0000, 0x3024}}, - {MARKER_127_BAT, 0x0001, {0x0804, 0x0804, 0x8100, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x1424}}, - {MARKER_254_PORTRAIT_CHOMPA_A, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x3444}}, - {MARKER_1D1_PORTRAIT_CHOMPA_B, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x1424}}, - {MARKER_21A_SEAMAN_GRUBLIN, 0x0001, {0x0A08, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0988, 0x0A04, 0x0000, 0x2020}}, - {MARKER_C9_FLOTSAM, 0x0001, {0x0808, 0x8808, 0x8000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0808, 0x0804, 0x0000, 0x3424}}, - {MARKER_1B7_BOOM_BOX, 0x0000, {0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x098C, 0x0404, 0x0804, 0x5000}}, - {MARKER_2E_GRIMLET, 0x0004, {0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x0000, 0x0000, 0x8000, 0x3000, 0x3004}}, - {MARKER_1A1_BOSS_BOOM_BOX_LARGEST, 0x0000, {0x8020, 0x8884, 0x8020, 0x8884, 0x9884, 0x9884, 0x0804, 0x0904, 0x0884, 0x0000, 0x4020}}, - {MARKER_1A2_BOSS_BOOM_BOX_LARGE, 0x0000, {0x8020, 0x8904, 0x8020, 0x8904, 0x9904, 0x9904, 0x0804, 0x0984, 0x0904, 0x0000, 0x4020}}, - {MARKER_1A3_BOSS_BOOM_BOX_MEDIUM, 0x0000, {0x9020, 0x9984, 0x9020, 0x9984, 0x9984, 0x9984, 0x0804, 0x0A04, 0x0984, 0x0000, 0x3020}}, - {MARKER_1A4_BOSS_BOOM_BOX_SMALL, 0x0000, {0x9020, 0x9A04, 0x9020, 0x9A04, 0x9A04, 0x9A04, 0x0804, 0x0A84, 0x0A04, 0x0000, 0x3020}}, - {MARKER_185_MODEL_RUSTY_BUCKET_REAR_PROPELLER, 0x5060, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5060}}, - {MARKER_191_ENGINE_ROOM_PROPELLOR_1, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, - {MARKER_192_ENGINE_ROOM_PROPELLOR_2, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, - {MARKER_193_ENGINE_ROOM_PROPELLOR_3, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, - {MARKER_1E2_GRUBLIN_HOOD, 0x0001, {0x0A08, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, - {MARKER_1C5_WHIPCRACK, 0x0001, {0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x080C, 0x0804, 0x0000, 0x3020}}, - {MARKER_1F9_SNARE_BEAR, 0x0000, {0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x0000, 0x0000, 0x0000, 0x2040}}, - {MARKER_1B2_CLUCKER_A, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0810, 0x0804, 0x0000, 0x3444}}, - {MARKER_1D0_CLUCKER_B, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0810, 0x0804, 0x0000, 0x1424}}, - {MARKER_1B4_EEYRIE_BABY, 0x8000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000}}, - {0x000E, 0x0001, {0x3000, 0x7504, 0x7080, 0x7504, 0x7584, 0x0804, 0x0804, 0x0488, 0x0804, 0x0000, 0x1020}}, - {0x01AC, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_256_FIRE_FX, 0x0000, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x2020, 0x2020}}, - {MARKER_C_ORANGE_PROJECTILE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2424}}, - {MARKER_DB_BURIED_TREASURE, 0x0000, {0x7000, 0x7000, 0x7000, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x7000}}, - {MARKER_28_CLANKER_SAWBLADE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x2020}}, - {MARKER_4A_CC_KEY, 0x0404, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, - {MARKER_6E_PINK_EGG_LARGEST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_D7_PINK_EGG_MEDIUM, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_D9_PINK_EGG_SMALLEST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_D6_PINK_EGG_LARGE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_D8_PINK_EGG_SMALL, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x006D, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x019B, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x019C, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x019D, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x019E, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x019F, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x01A0, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_B9_FP_SNOWMAN_BUTTON,0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000}}, - {MARKER_124_BOGGY_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0097, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0000}}, - {0x0125, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, - {0x0126, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, - {MARKER_1FD_BLUE_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {MARKER_1FE_GREEN_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {MARKER_1FF_RED_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {MARKER_20B_WOZZA, 0x7000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x7000}}, - {MARKER_20F_WOZZA_IN_CAVE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0000}}, - {0x0204, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0207, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0404}}, - {0x0206, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, - {MARKER_BC_GOBI_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {0x00BE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x0000}}, - {MARKER_BF_GOBI_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {MARKER_C3_GOBI_3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, - {MARKER_252_LOGGO, 0x0000, {0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0000, 0x0004, 0x0004, 0x0004}}, - {MARKER_48_NAPPER, 0x0004, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0xB000, 0x0000, 0x8000, 0x0000, 0x8004}}, - {0x0132, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0130, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x012E, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x012C, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x01BF, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x7404, 0x7404, 0x0000, 0x0414, 0x7404, 0x0000, 0x0000}}, - {0x01B3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x01B0, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0814, 0x0000, 0x0000, 0x0000}}, - {MARKER_1AE_ZUBBA, 0x0000, {0x3004, 0x3004, 0x3004, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x3004}}, - {0x0050, 0x0003, {0x0804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000}}, - {0x009A, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x009E, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x009D, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x00E7, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x009C, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {MARKER_EA_LIGHTHOUSE_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x022D, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x022E, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0235, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0163, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0239, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0236, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0237, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0238, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0263, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x017D, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x009F, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x00A0, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x00FF, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x0107, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x0108, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0109, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x080C, 0x0804, 0x0000, 0x0000}}, - {0x0118, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x0119, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x011A, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x011E, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x8804, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x011F, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x7804, 0x7804, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, - {0x0121, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x8804, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0123, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x01F2, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x01F3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, - {0x0224, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0xA000, 0x080C, 0x0000, 0x0000, 0x0000}}, - {0x0225, 0x0000, {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0xA000, 0x080C, 0x8000, 0x0000, 0x0000}}, - {0x00A2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x8804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x01A9, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0804, 0x0000, 0x080C, 0x0000, 0x0000, 0x0000}}, - {0x0195, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0196, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0197, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x002F, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0194, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0186, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0183, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0184, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0164, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x0165, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, - {0x00E4, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, - {0x00E5, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, - {0x00E6, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, - {0x00B2, 0x0001, {0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, - {0x01A5, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001}}, - {0x01A6, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3020}}, - {0x016D, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, - {0x016E, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, - {0x016F, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, - {0x0170, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, - {0x0171, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, - {0x0172, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, - {0x025C, 0x0000, {0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x0000, 0x0804, 0x3804, 0x3804}}, - {0x025D, 0x0000, {0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x0000, 0x0804, 0x3804, 0x3804}}, - {0x027A, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, - {0x027F, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, - {0x025E, 0x0000, {0x4000, 0x4000, 0x4000, 0xA604, 0x4000, 0x4000, 0x4000, 0x0584, 0xA000, 0x0000, 0x4000}}, - {0x0260, 0x0000, {0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x0000, 0xA000, 0x0000, 0x5000}}, - {0x0281, 0x0000, {0x4080, 0x4080, 0x4080, 0xA604, 0x4080, 0x4080, 0x4080, 0x0584, 0xA200, 0x0000, 0x4080}}, - {0x0282, 0x0000, {0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0xA604, 0xA604, 0x0000, 0xA200, 0x0000, 0x4080}}, - {0x0283, 0x0000, {0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x0000, 0xA200, 0x0000, 0x4080}}, - {0x0284, 0x0000, {0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x0000, 0xB404, 0x5404, 0x5404}}, + +#define COLLISION_TABLE_SIZE 187 + +CollisionTable collision_table[COLLISION_TABLE_SIZE] = { + {MARKER_12A_TOPPER_THE_CARROT_A, 0x0000, {0x0904, 0x8504, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}}, + {MARKER_129_BAWL_THE_ONION_A, 0x0000, {0x0504, 0x0984, 0x8504, 0x0000, 0x8504, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7484}}, + {MARKER_128_COLLYWOBBLE_THE_CAULIFLOWER_A, 0x0000, {0x0000, 0x0000, 0x8404, 0x0984, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404}}, + {MARKER_135_QUARRIE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_1E6_TOPPER_THE_CARROT_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, + {MARKER_1E7_BAWL_THE_ONION_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, + {MARKER_1E8_COLLYWOBBLE_THE_CAULIFLOWER_B, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0984, 0x0A04, 0x0000, 0x1020}}, + {MARKER_1EA_GRUNTLING_RED, 0x0001, {0x0A08, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0984, 0x2020}}, + {MARKER_295_GRUNTLING_BLUE, 0x0001, {0x0A0C, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, + {MARKER_1F1_GRUNTLING_BLACK, 0x0001, {0x0A10, 0x898C, 0x8100, 0x8988, 0x8A08, 0x8A08, 0x0A84, 0x098C, 0x0A04, 0x0000, 0x2020}}, + {MARKER_1E0_BRENTILDA, 0x0000, {0x7000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0004, 0x8000, 0x0000, 0x7000}}, + {MARKER_5_GRUBLIN, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0000, 0x1020}}, + {MARKER_4_TERMITE, 0x0001, {0x0A88, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x1020}}, + {MARKER_3_BIGBUTT, 0x0000, {0x0914, 0x990C, 0x2020, 0x8908, 0x8908, 0x8908, 0x0A04, 0x0914, 0x0904, 0x0000, 0x4020}}, + {MARKER_29E_BIGBUTT_KNOCKED_DOWN, 0x0000, {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0xA000, 0x0004, 0x8000, 0x0000, 0x8000}}, + {MARKER_7_CONGA, 0x0000, {0x0000, 0x0000, 0x3020, 0x9000, 0x0000, 0x0000, 0x0000, 0x0804, 0x9000, 0x0000, 0x3020}}, + {MARKER_13_SNIPPET, 0x0002, {0x0504, 0x7584, 0x8100, 0x7584, 0x7604, 0x0A04, 0x0A84, 0x0504, 0x0A04, 0x0000, 0x1020}}, + {MARKER_16B_SNIPPET_UPSIDEDOWN, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0904, 0x0A04, 0x0000, 0x1020}}, + {MARKER_DD_BLACK_SNIPPET, 0x0002, {0x060C, 0x7588, 0x8100, 0x7588, 0x7608, 0x8604, 0x0A84, 0x050C, 0x0A04, 0x0000, 0x1020}}, + {MARKER_DE_BLACK_SNIPPET_UPSIDEDOWN, 0x0001, {0x0908, 0x0988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x090C, 0x0A04, 0x0000, 0x1020}}, + {MARKER_15_CLAM, 0x0001, {0x0A88, 0x7988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x1424}}, + {MARKER_65_SHRAPNEL, 0x0804, {0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x5040, 0x090E, 0x0804, 0x0000, 0x5844}}, + {MARKER_14_SNACKER, 0x0003, {0x3020, 0x3020, 0x3020, 0x9080, 0x9080, 0x9080, 0x0A84, 0x0914, 0x0904, 0x0000, 0x3020}}, + {MARKER_A5_NIPPER, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x5020}}, + {MARKER_16C_NIPPER, 0x0000, {0x0000, 0x0000, 0x0000, 0xB804, 0x0000, 0x0000, 0x0000, 0x0404, 0xB804, 0x0000, 0x5020}}, + {MARKER_A4_LOCKUP_SLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, + {MARKER_F6_LOCKUP_MEDIUM, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, + {MARKER_F7_LOCKUP_FAST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, + {MARKER_29_GRILLE_CHOMPA, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0808, 0x0804, 0x0000, 0x3444}}, + {MARKER_1CF_GRILLE_CHOMPA_ATTACKING, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0808, 0x0804, 0x0000, 0x1424}}, + {MARKER_1A6_BETA_VENT, 0x0000, {0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x0000, 0x0000, 0x3020, 0x3020}}, + {MARKER_1A7_CLANKER_WHIPCRACK, 0x0804, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3020}}, + {MARKER_69_CHUMP_FISH, 0x0001, {0x2020, 0x2020, 0x2020, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, + {MARKER_173_CHUMP_FISH_2, 0x0001, {0x2020, 0x2020, 0x2020, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x4020}}, + {MARKER_C1_FLIBBIT_RED, 0x0000, {0x0A09, 0x0985, 0x8100, 0x0985, 0x0A05, 0x0A05, 0x0000, 0x0989, 0x0A05, 0x0986, 0x2020}}, + {MARKER_C5_FLIBBIT_YELLOW, 0x0000, {0x0A0D, 0x8989, 0x8100, 0x8989, 0x7A09, 0x7A09, 0x0000, 0x098D, 0x0A05, 0x0986, 0x2020}}, + {MARKER_C2_BUZZBOMB, 0x0000, {0x0805, 0x0805, 0x8000, 0x0805, 0x0805, 0x0805, 0x0000, 0x0805, 0x0805, 0x0806, 0x3020}}, + {MARKER_B1_SIR_SLUSH, 0x0000, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0x9000, 0x0004, 0x8000, 0x0000, 0x7000}}, + {0x0287, 0x0001, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0x8804, 0x0004, 0x8000, 0x0000, 0x7000}}, // snowman.c + {MARKER_205_TWINKLY_MUNCHER, 0x0000, {0x0000, 0x0000, 0x0000, 0x0404, 0x0404, 0x0404, 0x0000, 0x0408, 0x0404, 0x0000, 0x0000}}, + {MARKER_245_XMAS_TREE_EGG_TOLL, 0x0000, {0x3004, 0x3004, 0x3004, 0x3004, 0x3004, 0x2004, 0x3004, 0x0000, 0x0000, 0x3004, 0x3004}}, + {MARKER_250_ICECUBE_A, 0x0000, {0x0A90, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0910, 0x0A04, 0x0984, 0x3104}}, + {MARKER_25F_ICECUBE_B, 0x0001, {0x0A88, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0908, 0x0A04, 0x0984, 0x3104}}, + {0x00AD, 0x0001, {0x0A10, 0x998C, 0x0020, 0x9988, 0x8A08, 0x0A04, 0x0A84, 0x0914, 0x0A04, 0x0000, 0x5124}}, + {MARKER_253_SCARAB_BEETLE, 0x0001, {0x0904, 0x0984, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0984, 0x0A04, 0x0000, 0x3020}}, + {MARKER_219_MUMMUM, 0x0001, {0x0588, 0x7584, 0x8100, 0x7584, 0x7604, 0x7604, 0x0684, 0x0588, 0x0A04, 0x0000, 0x2020}}, + {MARKER_298_MUMMUM_BALL, 0x0000, {0x7000, 0x8000, 0x7000, 0x8000, 0x9000, 0x9000, 0xB000, 0x0004, 0x0A04, 0x0000, 0x2020}}, + {MARKER_218_LIMBO, 0x0001, {0x0588, 0x7584, 0x8100, 0x7584, 0x7604, 0x7604, 0x0684, 0x050C, 0x0A04, 0x0000, 0x2020}}, + {MARKER_99_TEEHEE, 0x0001, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x0804, 0x0000, 0x2424}}, + {MARKER_296_TEEHEE_PURPLE, 0x0000, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x0804, 0x0000, 0x2424}}, + {MARKER_96_GRAVESTONE, 0x0001, {0x0A10, 0x890C, 0x8100, 0x8908, 0x8988, 0x8988, 0x0A84, 0x0914, 0x0984, 0x0000, 0x3024}}, + {MARKER_297_GIANT_GRAVESTONE, 0x0001, {0x0A10, 0x890C, 0x8100, 0x8908, 0x8988, 0x8988, 0x0A84, 0x0914, 0x0984, 0x0000, 0x3024}}, + {MARKER_127_BAT, 0x0001, {0x0804, 0x0804, 0x8100, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x1424}}, + {MARKER_254_PORTRAIT_CHOMPA_A, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x3444}}, + {MARKER_1D1_PORTRAIT_CHOMPA_B, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x1424}}, + {MARKER_21A_SEAMAN_GRUBLIN, 0x0001, {0x0A08, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0000, 0x0988, 0x0A04, 0x0000, 0x2020}}, + {MARKER_C9_FLOTSAM, 0x0001, {0x0808, 0x8808, 0x8000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0808, 0x0804, 0x0000, 0x3424}}, + {MARKER_1B7_BOOM_BOX, 0x0000, {0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x098C, 0x0404, 0x0804, 0x5000}}, + {MARKER_2E_GRIMLET, 0x0004, {0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x3000, 0x0000, 0x0000, 0x8000, 0x3000, 0x3004}}, + {MARKER_1A1_BOSS_BOOM_BOX_LARGEST, 0x0000, {0x8020, 0x8884, 0x8020, 0x8884, 0x9884, 0x9884, 0x0804, 0x0904, 0x0884, 0x0000, 0x4020}}, + {MARKER_1A2_BOSS_BOOM_BOX_LARGE, 0x0000, {0x8020, 0x8904, 0x8020, 0x8904, 0x9904, 0x9904, 0x0804, 0x0984, 0x0904, 0x0000, 0x4020}}, + {MARKER_1A3_BOSS_BOOM_BOX_MEDIUM, 0x0000, {0x9020, 0x9984, 0x9020, 0x9984, 0x9984, 0x9984, 0x0804, 0x0A04, 0x0984, 0x0000, 0x3020}}, + {MARKER_1A4_BOSS_BOOM_BOX_SMALL, 0x0000, {0x9020, 0x9A04, 0x9020, 0x9A04, 0x9A04, 0x9A04, 0x0804, 0x0A84, 0x0A04, 0x0000, 0x3020}}, + {MARKER_185_RBB_REAR_PROPELLER, 0x5060, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x5060}}, + {MARKER_191_ENGINE_ROOM_PROPELLOR_1, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_192_ENGINE_ROOM_PROPELLOR_2, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_193_ENGINE_ROOM_PROPELLOR_3, 0x0000, {0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x2000, 0x0000, 0x8000, 0x0000, 0x2000}}, + {MARKER_1E2_GRUBLIN_HOOD, 0x0001, {0x0A08, 0x8988, 0x8100, 0x0984, 0x0A04, 0x0A04, 0x0A84, 0x0988, 0x0A04, 0x0000, 0x2020}}, + {MARKER_1C5_WHIPCRACK, 0x0001, {0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x3020, 0x080C, 0x0804, 0x0000, 0x3020}}, + {MARKER_1F9_SNARE_BEAR, 0x0000, {0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x2040, 0x0000, 0x0000, 0x0000, 0x2040}}, + {MARKER_1B2_CLUCKER_A, 0x0001, {0x0804, 0x0804, 0x2020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0810, 0x0804, 0x0000, 0x3444}}, + {MARKER_1D0_CLUCKER_B, 0x0001, {0x0804, 0x0804, 0x1020, 0x0804, 0x0804, 0x0804, 0x0804, 0x0810, 0x0804, 0x0000, 0x1424}}, + {MARKER_1B4_EEYRIE_BABY, 0x8000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000}}, + {0x000E, 0x0001, {0x3000, 0x7504, 0x7080, 0x7504, 0x7584, 0x0804, 0x0804, 0x0488, 0x0804, 0x0000, 0x1020}}, + {MARKER_1AC_ZUBBA_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_256_FIRE_FX, 0x0000, {0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x2020, 0x0000, 0x0000, 0x2020, 0x2020}}, + {MARKER_C_ORANGE_PROJECTILE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2424}}, + {MARKER_DB_BURIED_TREASURE, 0x0000, {0x7000, 0x7000, 0x7000, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000, 0x7000}}, + {MARKER_28_CLANKER_SAWBLADE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x2020}}, + {MARKER_4A_CC_KEY, 0x0404, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, + {MARKER_6E_PINK_EGG_LARGEST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_D7_PINK_EGG_MEDIUM, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_D9_PINK_EGG_SMALLEST, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_D6_PINK_EGG_LARGE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_D8_PINK_EGG_SMALL, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_6D_TANKTUP_LEG, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_19B_CHOIR_TURTLE_YELLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_19C_CHOIR_TURTLE_CYAN, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_19D_CHOIR_TURTLE_BLUE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_19E_CHOIR_TURTLE_RED, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_19F_CHOIR_TURTLE_PINK, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_1A0_CHOIR_TURTLE_PURPLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_B9_FP_SNOWMAN_BUTTON, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_124_BOGGY_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_97_BOGGY_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0000}}, + {MARKER_125_BOGGY_RACE_FLAG, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, + {MARKER_126_BOGGY_RACE_FLAG, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404}}, + {MARKER_1FD_BLUE_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_1FE_GREEN_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_1FF_RED_PRESENT_COLLECTIBLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_20B_WOZZA, 0x7000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x7000}}, + {MARKER_20F_WOZZA_IN_CAVE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004, 0x0000, 0x0000, 0x0000}}, + {MARKER_204_TWINKLY_BOX, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_207_XMAS_TREE_STAR, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0404}}, + {MARKER_206_XMAS_TREE_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, + {MARKER_BC_GOBI_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_BE_GOBI_ROCK, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x0000}}, + {MARKER_BF_GOBI_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_C3_GOBI_3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0004}}, + {MARKER_252_LOGGO, 0x0000, {0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0004, 0x0000, 0x0004, 0x0004, 0x0004}}, + {MARKER_48_NAPPER, 0x0004, {0x7000, 0x8000, 0x8000, 0x8000, 0x9000, 0x9000, 0xB000, 0x0000, 0x8000, 0x0000, 0x8004}}, + {MARKER_132_CCW_SPRING_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_130_CCW_SUMMER_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_12E_CCW_AUTUMN_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_12C_CCW_WINTER_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_1BF_GNAWTY_BOULDER, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x7404, 0x7404, 0x0000, 0x0414, 0x7404, 0x0000, 0x0000}}, + {MARKER_1B3_EAGLE_EGG, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x9804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_1B0_CCW_BEANSTALK, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0814, 0x0000, 0x0000, 0x0000}}, + {MARKER_1AE_ZUBBA, 0x0000, {0x3004, 0x3004, 0x3004, 0x0804, 0x0804, 0x0804, 0x0804, 0x080C, 0x0804, 0x0000, 0x3004}}, + {MARKER_50_BEEHIVE, 0x0003, {0x0804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0804, 0x0000}}, + {MARKER_9A_1881_BARREL_TOP, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_9E_CELLAR_HATCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_9D_MANSION_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_E7_DINING_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_9C_SHACK_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_EA_LIGHTHOUSE_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_22D_SHIP_SHADOW_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_22E_SHIP_SUNNY_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_235_CRACKED_SKYLIGHT, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0804, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_163_CRYPT_COFFIN_LID, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_239_CCW_UNKNOWN_NABNUT_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_236_CCW_UNKNOWN_NABNUT_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_237_CCW_AUTUMN_NABNUT_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_238_CCW_WINTER_NABNUT_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0804, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_263_CCW_WHIPCRACK_ROOM_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_17D_IRON_GATE_NO_LOCK, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_9F_CHURCH_GATE_LEFT_LOCK, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_A0_HEDGE_GATE_RIGHT_LOCK_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_FF_HEDGE_GATE_RIGHT_LOCK_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_107_ENGINE_ROOM_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_108_CABIN_CLOSET_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_109_BREAKABLE_BRICK_WALL, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x080C, 0x0804, 0x0000, 0x0000}}, + {MARKER_118_GRATE_TO_LEVEL_3_WATER_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_119_GRATE_BETWEEN_MMM_AND_RBB_PUZZLES, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_11A_GRATE_TO_RBB_PUZZLE, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x0000, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_11E_ICE_BALL_TO_CHEATO, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x8804, 0x8804, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_11F_RAREWARE_BOX, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x7804, 0x7804, 0x0000, 0x0808, 0x0804, 0x0000, 0x0000}}, + {MARKER_121_GLASS_EYE, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x8804, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_123_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_1F2_WIDE_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_1F3_TALL_WINDOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0804, 0x0804, 0x0000, 0x0000}}, + {MARKER_224_BREAKABLE_FLOOR_COBWEB, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8000, 0xA000, 0x080C, 0x0000, 0x0000, 0x0000}}, + {MARKER_225_BREAKABLE_WALL_COBWEB, 0x0000, {0x8000, 0x8000, 0x8000, 0x8000, 0x8000, 0x0000, 0xA000, 0x080C, 0x8000, 0x0000, 0x0000}}, + {MARKER_A2_CHURCH_DOOR, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x8804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_1A9_CC_BREAKABLE_GRATES, 0x0000, {0x0000, 0x0000, 0x0000, 0x7804, 0x0000, 0x0804, 0x0000, 0x080C, 0x0000, 0x0000, 0x0000}}, + {MARKER_195_WHISTLE_SWITCH_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_196_WHISTLE_SWITCH_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_197_WHISTLE_SWITCH_3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_2F_ANCHOR_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_194_RBB_GREY_PROPELLER_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_186_RBB_GREEN_PROPELLER_SWITCH, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_183_RBB_EGG_TOLL, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_184_RBB_EGG_TOLL, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_164_GL_GRUNTY_FLOOR_PICTURE_EYE_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_165_GL_GRUNTY_FLOOR_PICTURE_EYE_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000}}, + {MARKER_E4_CS_BK_SLEEPING, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, + {MARKER_E5_CS_BK_GAMEBOY, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, + {MARKER_E6_CS_BK_COOKING, 0x0000, {0x8004, 0x8004, 0x8004, 0x8404, 0x8404, 0x8004, 0x8004, 0x0000, 0x8004, 0x8004, 0x8004}}, + {MARKER_B2_SNOWBALL, 0x0001, {0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x0804, 0x0000, 0x0000, 0x0000, 0x0000, 0x2020}}, + {MARKER_1A5_SANDYBUTT_EGG_TOLL, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0001}}, + {MARKER_1A6_BETA_VENT, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x3020}}, + {MARKER_16D_CHEATO_1, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, + {MARKER_16E_CHEATO_2, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, + {MARKER_16F_CHEATO_3, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x8004}}, + {MARKER_170_BLUE_EGG_REFILL_PILLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, + {MARKER_171_RED_FEATHER_REFILL_PILLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, + {MARKER_172_GOLD_FEATHER_REFILL_PILLOW, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x7004}}, + {MARKER_25C_GRUNTY_SPELL_FIREBALL, 0x0000, {0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x0000, 0x0804, 0x3804, 0x3804}}, + {MARKER_25D_GREEN_BLAST, 0x0000, {0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x3804, 0x0000, 0x0804, 0x3804, 0x3804}}, + {MARKER_27A_JINJO_STATUE_BASE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, + {MARKER_27F_JINJONATOR_STATUE_BASE, 0x0000, {0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0404, 0x0000, 0x0000, 0x0000}}, + {MARKER_25E_GRUNTILDA_FINAL_BOSS_VULNERABLE, 0x0000, {0x4000, 0x4000, 0x4000, 0xA604, 0x4000, 0x4000, 0x4000, 0x0584, 0xA000, 0x0000, 0x4000}}, + {MARKER_260_GRUNTY_PHASE_1_2_MOVING, 0x0000, {0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x5000, 0x0000, 0xA000, 0x0000, 0x5000}}, + {MARKER_281_GRUNTY_PHASE_2_VULNERABLE, 0x0000, {0x4080, 0x4080, 0x4080, 0xA604, 0x4080, 0x4080, 0x4080, 0x0584, 0xA200, 0x0000, 0x4080}}, + {MARKER_282_GRUNTY_PHASE_3_FLIGHT, 0x0000, {0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0xA604, 0xA604, 0x0000, 0xA200, 0x0000, 0x4080}}, + {MARKER_283_GRUNTY_PHASE_4_5_INVULNERABLE, 0x0000, {0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x4080, 0x0000, 0xA200, 0x0000, 0x4080}}, + {MARKER_284_GRUNTY_SPELL_BARRIER, 0x0000, {0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x5404, 0x0000, 0xB404, 0x5404, 0x5404}}, }; s32 func_8033D240(ActorMarker *arg0, ActorMarker *arg1); @@ -217,10 +235,10 @@ Struct_core2_B62B0_1 D_80371DC0[11] = { {func_8033D2A8, HITBOX_2_BEAK_BARGE}, {func_8033D2A8, HITBOX_1_BEAK_BUSTER}, {func_8033D2A8, HITBOX_3_BEAK_BOMB}, - {func_8033D240, 1}, + {func_8033D240, 1}, // Egg Firing {func_8033D2A8, HITBOX_6_WONDERWING}, {func_8033D2A8, HITBOX_9_CROC_BITE}, - {func_8033D240, 0} + {func_8033D240, 0} // Other Contact }; /* .bss */ @@ -249,11 +267,11 @@ void func_8033D2F4(void) { s32 var_a0; bool var_a1; s32 var_v1; - s32 var_v0 = 0xBB; + s32 var_v0 = COLLISION_TABLE_SIZE; for(var_v1 = 0; var_v1 < 0x2A9; var_v1++) { for(((var_a0 = 0), (var_a1 = FALSE), (D_80383F10[var_v1] = -1)); (var_a0 < var_v0) && !var_a1; var_a0++){ - if (var_v1 == D_80370AC0[var_a0].unk0) { + if (var_v1 == collision_table[var_a0].markerId) { D_80383F10[var_v1] = var_a0; var_a1 = TRUE; } @@ -262,51 +280,62 @@ void func_8033D2F4(void) { for(var_a0 = 0; var_a0 < var_v0; var_a0++) { for(var_v1 = 0; var_v1 < 10; var_v1++){ - D_80370AC0[var_a0].unk4[var_v1] |= D_80370AC0[var_a0].unk2; + collision_table[var_a0].collisionTypes[var_v1] |= collision_table[var_a0].collisionUnion; } } } bool func_8033D410(ActorMarker *arg0, ActorMarker *arg1) { s32 var_s2; - s32 sp38; + s32 collision_index; s16 temp_t0; s32 temp_s0; - sp38 = D_80383F10[arg1->id]; - if (sp38 == -1) { + collision_index = D_80383F10[arg1->id]; + if (collision_index == -1) { return FALSE; } for(var_s2 = 0; var_s2 < 11; var_s2++){ - if ((D_80370AC0[sp38].unk4[var_s2] != 0) && (D_80371DC0[var_s2].unk0(arg0, arg1) == D_80371DC0[var_s2].unk4)) { - func_80330078(arg1, arg0, D_80370AC0[sp38].unk4 + var_s2); - func_80330078(arg0, arg1, D_80370AC0[sp38].unk4 + var_s2); + if ((collision_table[collision_index].collisionTypes[var_s2] != 0) && (D_80371DC0[var_s2].unk0(arg0, arg1) == D_80371DC0[var_s2].unk4)) { + func_80330078(arg1, arg0, collision_table[collision_index].collisionTypes + var_s2); + func_80330078(arg0, arg1, collision_table[collision_index].collisionTypes + var_s2); break; } } return TRUE; } -s32 func_8033D564(struct5Cs *arg0){ - return arg0->unk0_15; +s32 collision_getPlayerInteraction(CollisionParams *arg0){ + // Player Bounce vs Player Knockback + // Includes the distance the player is sent + return arg0->playerInteraction; } -enum marker_collision_func_type_e func_8033D574(struct5Cs *arg0){ - return arg0->unk0_11; +enum marker_collision_func_type_e collision_getNextState(CollisionParams *arg0){ + // 01 -> Alternate State + // 10 -> Death + return arg0->nextState; } -s32 func_8033D584(struct5Cs *arg0){ - return arg0->unk0_9; +s32 collision_getUnkBit7(CollisionParams *arg0){ + return arg0->unkBit7; } -s32 func_8033D594(struct5Cs *arg0){ - return arg0->unk0_6; +s32 collision_getDamageToPlayer(CollisionParams *arg0){ + return arg0->damageToPlayer; } -s32 func_8033D5A4(struct5Cs *arg0){ - return arg0->unk0_4; +s32 collision_getHitsToTrigger(CollisionParams *arg0){ + // Enemies have health + // 1 divided by hits to trigger = % of health the enemy loses + return arg0->hitsToTrigger; } -s32 func_8033D5B4(struct5Cs *arg0){ - return arg0->unk0_1; +s32 collision_getDropBundleNum(CollisionParams *arg0){ + // By default, + // 0 is nothing + // 1 is one honeycomb + // 2 is two honeycombs + // 3 is three honeycombs + return arg0->dropBundleNum; } diff --git a/src/core2/code_B8860.c b/src/core2/code_B8860.c index 18e722c7..ea4d4377 100644 --- a/src/core2/code_B8860.c +++ b/src/core2/code_B8860.c @@ -52,8 +52,8 @@ void func_8033F7F0(u8 indx, Gfx **gfx, Mtx **mtx, Vtx **vtx){ func_80252330(sp30[0], sp30[1], sp30[2]); mlMtxApply(*mtx); gSPMatrix((*gfx)++, OS_PHYSICAL_TO_K0((*mtx)++), G_MTX_PUSH | G_MTX_LOAD | G_MTX_MODELVIEW); - func_803382E4(sp54->unk28_21); - func_80338338(sp54->color[0], sp54->color[1],sp54->color[2]); + codeAEDA0_setSpriteDrawMode(sp54->unk28_21); + codeAEDA0_setPrimaryColorRGB(sp54->color[0], sp54->color[1],sp54->color[2]); func_803382FC(sp54->unk27); func_80338308(sp54->unk20[0], sp54->unk20[1]); func_8033837C(1); diff --git a/src/core2/code_BD100.c b/src/core2/code_BD100.c index 76c3bed7..04932c9c 100644 --- a/src/core2/code_BD100.c +++ b/src/core2/code_BD100.c @@ -37,8 +37,8 @@ void func_80344124(void){ } void func_80344138(BKSpriteDisplayData *self, s32 frame, s32 mirrored, f32 position[3], f32 scale[3], Gfx **gfx, Mtx **mtx) { - f32 sp6C[3]; - f32 sp60[3]; + f32 viewport_position[3]; + f32 viewport_look_vector[3]; f32 temp_f14; f32 sp50[3]; f32 temp_f0; @@ -49,12 +49,12 @@ void func_80344138(BKSpriteDisplayData *self, s32 frame, s32 mirrored, f32 posit f32 sp38; f32 sp34; - viewport_getPosition_vec3f(sp6C); - viewport_getLookVector(sp60); - sp50[0] = position[0] - sp6C[0]; - sp50[1] = position[1] - sp6C[1]; - sp50[2] = position[2] - sp6C[2]; - temp_f14 = sp60[0]*sp50[0] + sp60[1]*sp50[1] + sp60[2]*sp50[2]; + viewport_getPosition_vec3f(viewport_position); + viewport_getLookVector(viewport_look_vector); + sp50[0] = position[0] - viewport_position[0]; + sp50[1] = position[1] - viewport_position[1]; + sp50[2] = position[2] - viewport_position[2]; + temp_f14 = viewport_look_vector[0]*sp50[0] + viewport_look_vector[1]*sp50[1] + viewport_look_vector[2]*sp50[2]; if ((temp_f14 < 0.0f) || (20000.0f < temp_f14)) { func_80344124(); return; @@ -257,7 +257,7 @@ s32 func_80344C14(UNK_TYPE(s32) arg0){ return 0; } -s32 func_80344C20(BKSpriteDisplayData *self){ +s32 codeBD100_getSpriteType(BKSpriteDisplayData *self){ return self->sprite->type; } diff --git a/src/core2/code_C4F40.c b/src/core2/code_C4F40.c index 80e589f6..cfd1bb4e 100644 --- a/src/core2/code_C4F40.c +++ b/src/core2/code_C4F40.c @@ -83,7 +83,7 @@ void func_8034BFF8(ActorMarker *marker) { if (marker->unk48 != NULL) { marker->unk4C = vector_new(sizeof(Struct6Es), 0); - sp2C = BKModel_getMeshList(marker->unk48); + sp2C = (BKMeshList*)BKModel_getMeshList(marker->unk48); phi_s1 = (BKMesh *)(sp2C + 1); for(phi_s2 = 0; phi_s2 < sp2C->meshCount_0; phi_s2++){ if ((phi_s1->uid_0 >= 0x65) && (phi_s1->uid_0 < 0xC8)) { diff --git a/src/core2/code_C9F00.c b/src/core2/code_C9F00.c index ce6036e6..706079ef 100644 --- a/src/core2/code_C9F00.c +++ b/src/core2/code_C9F00.c @@ -14,7 +14,7 @@ void func_80351AD0(Struct68s *arg0, enum asset_e model_id); typedef struct { s16 unk0; u8 unk2; - u8 unk3; + u8 mapId; }Struct_Core2_C9F00_1; typedef struct { @@ -23,18 +23,18 @@ typedef struct { }Struct_Core2_C9F00_0; Struct_Core2_C9F00_1 D_803725C0[] = { - { 0x37, 0x1, 0x00}, - { 0x38, 0x2, 0x24}, - { 0xF9, 0x5, 0x22}, - { 0xFA, 0x6, 0x22}, - { 0xFB, 0x7, 0x22}, - { 0xFC, 0x8, 0x22}, - { 0xFD, 0x9, 0x22}, - { 0xFE, 0xA, 0x22}, - { 0xFF, 0xB, 0x22}, - {0x100, 0xC, 0x22}, - {0x100, 0xC, 0x22}, - { 0x13, 0xD, 0x00}, + { 0x37, 0x1, NULL}, + { 0x38, 0x2, MAP_24_MMM_TUMBLARS_SHED}, + { 0xF9, 0x5, MAP_22_CC_INSIDE_CLANKER}, + { 0xFA, 0x6, MAP_22_CC_INSIDE_CLANKER}, + { 0xFB, 0x7, MAP_22_CC_INSIDE_CLANKER}, + { 0xFC, 0x8, MAP_22_CC_INSIDE_CLANKER}, + { 0xFD, 0x9, MAP_22_CC_INSIDE_CLANKER}, + { 0xFE, 0xA, MAP_22_CC_INSIDE_CLANKER}, + { 0xFF, 0xB, MAP_22_CC_INSIDE_CLANKER}, + {0x100, 0xC, MAP_22_CC_INSIDE_CLANKER}, + {0x100, 0xC, MAP_22_CC_INSIDE_CLANKER}, + { 0x13, 0xD, NULL}, 0 }; @@ -199,19 +199,19 @@ Struct68s * func_8035126C(f32 position[3], f32 arg1[3], f32 arg2, s32 arg3, enum } void func_803513EC(ModelProp *arg0, s32 arg1) { - f32 sp3C[3]; + f32 position[3]; s32 pad30; f32 rotation[3]; arg0->unkB_5 = TRUE; arg0->unkB_4 = FALSE; - sp3C[0] = (f32) arg0->position[0]; - sp3C[1] = (f32) arg0->position[1]; - sp3C[2] = (f32) arg0->position[2]; + position[0] = (f32) arg0->position[0]; + position[1] = (f32) arg0->position[1]; + position[2] = (f32) arg0->position[2]; rotation[0] = 0.0f; rotation[1] = (f32) (arg0->yaw * 2); rotation[2] = (f32) (arg0->roll * 2); - func_8035126C(sp3C, rotation, (f32) (arg0->scale / 100.0), arg1, arg0->model_index + 0x2D1); + func_8035126C(position, rotation, (f32) (arg0->scale / 100.0), arg1, arg0->modelId + MODEL_ASSET_OFFSET); } @@ -242,16 +242,16 @@ bool func_803515EC(NodeProp *arg0) { s16 phi_v0; - if (arg0->bit6 != 6) { + if (arg0->category != 6) { return TRUE; } else { for(phi_s0 = D_803725C0; phi_s0->unk0 != 0; phi_s0++){ - if( (arg0->unk8 == phi_s0->unk0) - && ((phi_s0->unk3 == 0) || (gsworld_get_map() == phi_s0->unk3)) + if( (arg0->actorId == phi_s0->unk0) + && ((phi_s0->mapId == NULL) || (gsworld_get_map() == phi_s0->mapId)) ){ - sp48[0] = (s32) arg0->x; - sp48[1] = (s32) arg0->y; - sp48[2] = (s32) arg0->z; + sp48[0] = (s32) arg0->position_x; + sp48[1] = (s32) arg0->position_y; + sp48[2] = (s32) arg0->position_z; if(func_803048E0(&sp48, &sp44, &sp40, 2, 0x1F4)){ func_803513EC(sp40, phi_s0->unk2); break; @@ -273,8 +273,8 @@ bool func_80351724(void * arg0){ ActorProp *a_prop; if (((*(u16*)((s32)arg0 + 0xA) << 0x1E) >> 0x1F) && ((*(u16*)((s32)arg0 + 0xA) << 0x1A) >> 0x1F)) { a_prop = (ActorProp *)arg0; - a_prop->unk8_5 = FALSE; - a_prop->unk8_4 = TRUE; + a_prop->isMirrored = FALSE; + a_prop->isNotFeatherEggOrNote = TRUE; } return TRUE; } diff --git a/src/core2/code_CC1E0.c b/src/core2/code_CC1E0.c index a7b2de1c..8e546de5 100644 --- a/src/core2/code_CC1E0.c +++ b/src/core2/code_CC1E0.c @@ -64,7 +64,7 @@ s32 func_803531C8(u8 projectile_indx, s32 arg1){ projectile_getPosition(projectile_indx, egg_position); marker->unk38[1] = 0x1E; prop = func_80320EB0(marker, 30.0f, 1); - if(prop != NULL && prop->is_actor){ + if(prop != NULL && prop->isActorProp){ other_marker = prop->marker; sp34 =other_marker->id; if(!func_8033D410(marker, other_marker)){ @@ -241,9 +241,9 @@ void fxegg_head_update(void){ if(ml_isZero_vec3f(sp88)){ s0 = func_8033E840(); projectile_getPosition(projectile_indx, sp60); - sp54[0] = (f32)s0->propPtr->x; - sp54[1] = (f32)s0->propPtr->y; - sp54[2] = (f32)s0->propPtr->z; + sp54[0] = (f32)s0->propPtr->position_x; + sp54[1] = (f32)s0->propPtr->position_y; + sp54[2] = (f32)s0->propPtr->position_z; commonParticle_setCurrentInUseFalse(); fxegg_shatter(projectile_indx); }//L803539D4 @@ -370,7 +370,7 @@ void fxegg_collide(s32 arg0, ActorMarker *marker, s32 arg2) { Actor *actor; actor = marker_getActor(marker); - if (func_8033D5A4(arg2) != 0) { + if (collision_getHitsToTrigger(arg2) != 0) { commonParticle_setCurrentInUseFalse(); if (actor->modelCacheIndex != 0x29D) { fxegg_shatter(commonParticle_getCurrentProjectileIndex()); diff --git a/src/core2/code_D5D10.c b/src/core2/code_D5D10.c index f9318944..a9e9cdec 100644 --- a/src/core2/code_D5D10.c +++ b/src/core2/code_D5D10.c @@ -12,7 +12,7 @@ typedef struct { u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 padC_27:28; s16 unk10; @@ -88,7 +88,7 @@ static void _chskeleton_init(Actor *this) { local->unk9 = 8; local->unkA = 0xA; local->unkB = 7; - local->unkC_31 = 1; + local->yaw = 1; local->unk10 = 0x10C; local->unk12 = 20000; local->unk14 = 1.7f; diff --git a/src/core2/code_D5FD0.c b/src/core2/code_D5FD0.c index ea035c9a..432c52a2 100644 --- a/src/core2/code_D5FD0.c +++ b/src/core2/code_D5FD0.c @@ -11,7 +11,7 @@ typedef struct { u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 padC_27:28; s16 unk10; @@ -77,7 +77,7 @@ void func_8035CFC4(Actor *this) { local->unk9 = 0xA; local->unkA = 0xE; local->unkB = 9; - local->unkC_31 = 1; + local->yaw = 1; local->unk10 = 0x11A; local->unk12 = 25000; local->unk14 = 1.0f; diff --git a/src/core2/code_D6180.c b/src/core2/code_D6180.c index 7087b023..96a87ea9 100644 --- a/src/core2/code_D6180.c +++ b/src/core2/code_D6180.c @@ -12,7 +12,7 @@ typedef struct { u8 unk9; u8 unkA; u8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 padC_27:28; s16 unk10; @@ -92,7 +92,7 @@ void func_8035D2FC(Actor *this) { local->unk9 = 6; local->unkA = 8; local->unkB = 4; - local->unkC_31 = 0; + local->yaw = 0; local->unk10 = 0x10C; //SFX_10C_MUMMY_TALKING local->unk12 = 20000; local->unk14 = 1.5f; diff --git a/src/core2/code_DA3A0.c b/src/core2/code_DA3A0.c index 06ab0cc1..6fdadc01 100644 --- a/src/core2/code_DA3A0.c +++ b/src/core2/code_DA3A0.c @@ -14,14 +14,14 @@ void func_8036158C(Actor *this); u8 D_80373130[] = {0, 1, 0, 0}; ActorInfo D_80373134 = { - 0x1a6, 0x289, 0x431, + MARKER_1A6_BETA_VENT, ACTOR_289_BETA_VENT, ASSET_431_MODEL_BETA_VENT, 0x0, NULL, func_8036158C, NULL, actor_draw, 0, 0, 0.0f, 0 }; ActorInfo D_80373158 = { - 0x1a6, 0x28f, 0x431, + MARKER_1A6_BETA_VENT, ACTOR_28F_BETA_VENT, ASSET_431_MODEL_BETA_VENT, 0x0, NULL, func_8036158C, NULL, actor_draw, 0, 0, 0.0f, 0 diff --git a/src/core2/code_DB010.c b/src/core2/code_DB010.c index e11e5262..8d620ea4 100644 --- a/src/core2/code_DB010.c +++ b/src/core2/code_DB010.c @@ -587,7 +587,7 @@ void func_80363330(Actor *this){ void func_80363388(struct_core2_DB010 *arg0, s32 arg1){ f32 sp2C[3]; s32 sp20[3]; - s32 tmp_v0 = codeA5BC0_getPositionAndReturnRadius(arg0, sp20); + s32 tmp_v0 = codeA5BC0_getPositionAndSelectorOrRadius(arg0, sp20); sp2C[0] = (f32)sp20[0]; sp2C[1] = (f32)sp20[1]; sp2C[2] = (f32)sp20[2]; diff --git a/src/core2/gc/pauseMenu.c b/src/core2/gc/pauseMenu.c index aab535b2..985ca0be 100644 --- a/src/core2/gc/pauseMenu.c +++ b/src/core2/gc/pauseMenu.c @@ -1305,8 +1305,8 @@ void __gcpausemenu_drawSprite(Gfx **gdl, Mtx **mptr, Vtx **vptr, BKSprite *sprit _frame = sprite_getFramePtr(sprite, frame); sp2C = _frame->w; sp28 = _frame->h; - func_803382E4(5); - func_80338338(0xFF, 0xFF, 0xFF); + codeAEDA0_setSpriteDrawMode(5); + codeAEDA0_setPrimaryColorRGB(0xFF, 0xFF, 0xFF); func_803382FC(a); func_8033837C(0); viewport_getPosition_vec3f(sp50); diff --git a/src/core2/gc/transition.c b/src/core2/gc/transition.c index a75998b4..5968e85a 100644 --- a/src/core2/gc/transition.c +++ b/src/core2/gc/transition.c @@ -49,7 +49,7 @@ typedef struct { u8 next_state; // u8 pad3[1]; f32 duration; - s32 model_index; + s32 modelId; s32 anim_index; f32 scale; }TransitionInfo; @@ -183,8 +183,8 @@ void _gctranstion_changeState(s32 state, TransitionInfo *desc){ s_current_transition.model_ptr = assetcache_get(0x7D2); //scene transition black else if(state == TRANSITION_STATE_6_LOADING_WHITE) s_current_transition.model_ptr = assetcache_get(0x7D3); //scene transition white - else if(desc != NULL && desc->model_index != 0) - s_current_transition.model_ptr = assetcache_get(desc->model_index); + else if(desc != NULL && desc->modelId != 0) + s_current_transition.model_ptr = assetcache_get(desc->modelId); //load transistion animation if(desc != NULL && desc->anim_index != NULL){ diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index 9c6fdb8c..f3f1a9f2 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -8,7 +8,7 @@ #include "time.h" extern void func_80344090(BKSpriteDisplayData *self, s32 frame, Gfx **gfx); -BKSprite *func_8033B6C4(enum asset_e sprite_id, BKSpriteDisplayData **arg1); +BKSprite *codeB3A80_getSprite(enum asset_e sprite_id, BKSpriteDisplayData **arg1); typedef struct struct_18_s{ s16 sfx_id; /* enum sfx_e */ @@ -426,7 +426,7 @@ s32 D_8036D924[] = { 70, 35, 18, 9, 4, 2, 1}; char D_803830B0[0x30]; void sfxsource_freeSfxsourceByIndex(u8); -void func_80338338(s32, s32, s32); +void codeAEDA0_setPrimaryColorRGB(s32, s32, s32); void func_803382FC(u8); /* .code */ @@ -845,10 +845,10 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BK if (this->portrait_id == ZOOMBOX_SPRITE_46_TUMBLAR) { arg6 = 0.75f; } - func_80338338(0xFF, 0xFF, 0xFF); + codeAEDA0_setPrimaryColorRGB(0xFF, 0xFF, 0xFF); func_803382FC(this->unk168 * arg6); - func_803382E4(5); - func_80335D30(gfx); + codeAEDA0_setSpriteDrawMode(5); + codeAEDA0_drawSprite(gfx); viewport_setRenderViewportAndOrthoMatrix(gfx, mtx); mlMtxIdent(); if (this->unk1A4_24) { @@ -866,7 +866,7 @@ void func_803164B0(GcZoombox *this, Gfx **gfx, Mtx **mtx, s32 arg3, s32 arg4, BK gSPMatrix((*gfx)++, (*mtx)++, G_MTX_LOAD | G_MTX_MODELVIEW); modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE); func_80344090(arg5, this->unk186, gfx); - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); viewport_setRenderViewportAndPerspectiveMatrix(gfx, mtx); } @@ -1337,9 +1337,9 @@ void gczoombox_update(GcZoombox *this){ } void __gczoombox_load_sprite(GcZoombox *this, GcZoomboxSprite portrait_id){ - this->unkF8 = func_8033B6C4(D_8036C6C0[portrait_id].spite_id, &this->unkFC); + this->unkF8 = codeB3A80_getSprite(D_8036C6C0[portrait_id].spite_id, &this->unkFC); this->frame_count = this->unkF8->frameCnt; - func_803382E4(-1); + codeAEDA0_setSpriteDrawMode(-1); func_80338308(sprite_getUnk8(this->unkF8), sprite_getUnkA(this->unkF8)); } diff --git a/src/core2/gccube.c b/src/core2/gccube.c index edb774a9..15b2615e 100644 --- a/src/core2/gccube.c +++ b/src/core2/gccube.c @@ -691,7 +691,7 @@ void func_80303C54(Cube *cube, ActorMarker *marker, f32 arg2, s32 arg3, s32 *arg while (*arg4 != -1){ phi_s0 = func_803322F0(cube, marker, arg2, arg3, arg4); if (phi_s0 != NULL) { - if (phi_s0->is_actor && phi_s0->marker->unk58 != NULL) { + if (phi_s0->isActorProp && phi_s0->marker->unk58 != NULL) { if (phi_s0->marker->unk58(phi_s0->marker, marker) == 0) { phi_s0 = NULL; } @@ -716,9 +716,9 @@ void func_80303D78(ActorMarker *marker, f32 arg1, UNK_TYPE(s32) arg2) { sp5C = 0; - sp50[0] = (f32) marker->propPtr->x; - sp50[1] = (f32) marker->propPtr->y; - sp50[2] = (f32) marker->propPtr->z; + sp50[0] = (f32) marker->propPtr->position_x; + sp50[1] = (f32) marker->propPtr->position_y; + sp50[2] = (f32) marker->propPtr->position_z; cube_positionToIndices(sp60, sp50); for(sp6C[2] = sp60[2] - 1; sp6C[2] <= sp60[2] + 1; sp6C[2]++){ for(sp6C[1] = sp60[1] - 1; sp6C[1] <= sp60[1] + 1; sp6C[1]++){ @@ -924,7 +924,7 @@ void cubeList_fromFile(File *file_ptr) { if (cube->unk0_4) { for(iPtr = cube->prop1Ptr; iPtr < &cube->prop1Ptr[cube->unk0_4] ;iPtr++){ if (!iPtr->bit0) { - bitfield_setBit(D_8036A9E0, iPtr->unkA, TRUE); + bitfield_setBit(D_8036A9E0, iPtr->markerId, TRUE); } } } @@ -948,7 +948,7 @@ s32 func_80304984(s32 actor_id, u32 *arg1) { NodeProp *temp_v0 = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL); if (temp_v0 != 0) { - *arg1 = temp_v0->radius; + *arg1 = temp_v0->selector_or_radius; return 1; } @@ -1046,18 +1046,18 @@ NodeProp *nodeprop_findByActorIdAndPosition_s16(enum actor_e actor_id, s16 *posi } s32 nodeprop_getRadius(NodeProp *arg0) { - return arg0->radius; + return arg0->selector_or_radius; } void nodeprop_getPosition_s32(NodeProp *nodeProp, s32 dst[3]) { - TUPLE_ASSIGN(dst, nodeProp->x, nodeProp->y, nodeProp->z) + TUPLE_ASSIGN(dst, nodeProp->position_x, nodeProp->position_y, nodeProp->position_z) } void nodeprop_getPosition(NodeProp *nodeProp, f32 dst[3]) { - TUPLE_ASSIGN(dst, nodeProp->x, nodeProp->y, nodeProp->z) + TUPLE_ASSIGN(dst, nodeProp->position_x, nodeProp->position_y, nodeProp->position_z) } -u32 nodeprop_getYaw(NodeProp *nodeProp) { +u32 nodeProp_getYaw(NodeProp *nodeProp) { return nodeProp->yaw; } @@ -1070,9 +1070,9 @@ bool nodeprop_findPositionFromActorId(enum actor_e actor_id, s32 *position) { node_prop = cubeList_findNodePropByActorIdAndPosition_s32(actor_id, NULL); if (node_prop != 0) { - position[0] = (s32) node_prop->x; - position[1] = (s32) node_prop->y; - position[2] = (s32) node_prop->z; + position[0] = (s32) node_prop->position_x; + position[1] = (s32) node_prop->position_y; + position[2] = (s32) node_prop->position_z; return TRUE; } return FALSE; @@ -1113,7 +1113,10 @@ NodeProp *func_80304ED0(enum actor_e *arg0 , f32 arg1[3]) { return NULL; } for(i = 0; i < cnt; i++){ - dist_sq = func_80304E9C(sp34[0] - sp4C[i]->x, sp34[1] - sp4C[i]->y, sp34[2] - sp4C[i]->z); + dist_sq = func_80304E9C( + sp34[0] - sp4C[i]->position_x, + sp34[1] - sp4C[i]->position_y, + sp34[2] - sp4C[i]->position_z); if (dist_sq < min_dist_sq) { min_dist_sq = dist_sq; closest_node_ptr = sp4C[i]; @@ -2034,8 +2037,8 @@ void func_80307CA0(ActorMarker *marker) { for(i = 0; cubePtrList[i] != NULL; i++) { for(node_idx = 0; node_idx < cubePtrList[i]->unk0_4; node_idx++){ node = codeA5BC0_getPropNodeAtIndex(cubePtrList[i], node_idx); - if (codeA5BC0_getNodePropUnkA(node) == marker_bitfield) { - node_radius = codeA5BC0_getPositionAndReturnRadius(node, node_position); + if (codeA5BC0_getNodePropMarkerId(node) == marker_bitfield) { + node_radius = codeA5BC0_getPositionAndSelectorOrRadius(node, node_position); if( ((node_position[0] - node_radius) < marker_position[0]) && (marker_position[0] < (node_position[0] + node_radius)) && ((node_position[1] - node_radius) < marker_position[1]) && (marker_position[1] < (node_position[1] + node_radius)) && ((node_position[2] - node_radius) < marker_position[2]) && (marker_position[2] < (node_position[2] + node_radius)) @@ -2097,9 +2100,9 @@ u32 func_80307EA8(s32 arg0, s32 position[3], s32 *arg2, s32 *arg3) { var_s4 = temp_v0->prop1Ptr[D_803820B4].unk10_31; *arg2 = temp_v0->prop1Ptr[D_803820B4].unk10_19; *arg3 = temp_v0->prop1Ptr[D_803820B4].bit0; - position[0] = temp_v0->prop1Ptr[D_803820B4].x; - position[1] = temp_v0->prop1Ptr[D_803820B4].y; - position[2] = temp_v0->prop1Ptr[D_803820B4].z; + position[0] = temp_v0->prop1Ptr[D_803820B4].position_x; + position[1] = temp_v0->prop1Ptr[D_803820B4].position_y; + position[2] = temp_v0->prop1Ptr[D_803820B4].position_z; D_803820B4++; } if ((temp_v0 == NULL) || (D_803820B4 >= temp_v0->prop1Cnt)) { @@ -2170,7 +2173,7 @@ bool func_803082D8(Cube *arg0, s32 *arg1, bool arg2, bool arg3) { bool var_a0; var_v0 = arg0->prop2Ptr + *arg1; - while ((var_v0->is_actor == 1) && (*arg1 < arg0->prop2Cnt)) { + while ((var_v0->isActorProp == 1) && (*arg1 < arg0->prop2Cnt)) { (*arg1)++; var_v0++; } @@ -2179,10 +2182,10 @@ bool func_803082D8(Cube *arg0, s32 *arg1, bool arg2, bool arg3) { *arg1 = 0; return FALSE; } - var_a0 = var_v0->unk8_4; + var_a0 = var_v0->isNotFeatherEggOrNote; (*arg1)++; if (arg2) { - var_v0->unk8_4 = arg3; + var_v0->isNotFeatherEggOrNote = arg3; } return var_a0; } @@ -2391,8 +2394,8 @@ static void __code7AF80_func_80308984(void) { // this iterates over the cubes and assumes that the cubes pointer is currently at index 0 for(iCube = sCubeList.cubes; iCube < sCubeList.cubes + sCubeList.cubeCnt; iCube++){ for(iNode = iCube->prop1Ptr; iNode < iCube->prop1Ptr + iCube->prop1Cnt; iNode++){ - if (iNode->bit6 == 6 && iNode->bit0 == FALSE){ - u32 tmp = iNode->unk8; + if (iNode->category == 6 && iNode->bit0 == FALSE){ + u32 tmp = iNode->actorId; if(tmp >= unk8_range_min && tmp <= unk8_range_max) { for(i = 0; D_8036ABAC[i] != tmp && D_8036ABAC[i] != -1; i++){ @@ -2405,7 +2408,7 @@ static void __code7AF80_func_80308984(void) { for(jCube = sCubeList.cubes; jCube < sCubeList.cubes + sCubeList.cubeCnt; jCube++){ for(jNode = jCube->prop1Ptr; jNode < jCube->prop1Ptr + jCube->prop1Cnt; jNode++){ - if (jNode->bit6 == 6 && jNode->bit0 == FALSE && jNode->unk8 == D_8036ABC0[i]) { + if (jNode->category == 6 && jNode->bit0 == FALSE && jNode->actorId == D_8036ABC0[i]) { __code7AF80_addCubeIndexToD_80382150(jCube - sCubeList.cubes); D_80382150[temp_s4 + 1]++; jNode = jCube->prop1Ptr + jCube->prop1Cnt; diff --git a/src/core2/nc/dynamicCam12.c b/src/core2/nc/dynamicCam12.c index bceaf0ee..e69f536b 100644 --- a/src/core2/nc/dynamicCam12.c +++ b/src/core2/nc/dynamicCam12.c @@ -214,7 +214,7 @@ void func_802C1674(NodeProp *arg0, ActorMarker *arg1){ } void func_802C169C(NodeProp *arg0, ActorMarker *arg1){ - func_802C16CC(func_8033451C(arg0->unk8)); + func_802C16CC(func_8033451C(arg0->actorId)); } // sets up dynamic camera for cubes in "area" of arg0 diff --git a/src/core2/particle.c b/src/core2/particle.c index 803a54b4..9f11a78f 100644 --- a/src/core2/particle.c +++ b/src/core2/particle.c @@ -180,8 +180,8 @@ void __particleEmitter_drawOnPass(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, V || this->rgb[2] != 0xff || this->alpha != 0xff ){ - func_803382E4((this->draw_mode & PART_EMIT_NO_DEPTH)? 9: 0xf); - func_80338338(this->rgb[0], this->rgb[1], this->rgb[2]); + codeAEDA0_setSpriteDrawMode((this->draw_mode & PART_EMIT_NO_DEPTH)? 9: 0xf); + codeAEDA0_setPrimaryColorRGB(this->rgb[0], this->rgb[1], this->rgb[2]); func_803382B4( (this->rgb[0] < 8)? 0 : this->rgb[0] - 8, (this->rgb[1] < 8)? 0 : this->rgb[1] - 8, @@ -189,7 +189,7 @@ void __particleEmitter_drawOnPass(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, V (this->draw_mode & PART_EMIT_NO_OPA)? 0xff : this->alpha ); func_80338370(); - func_80335D30(gfx); + codeAEDA0_drawSprite(gfx); } else if(this->draw_mode & PART_EMIT_NO_DEPTH){//L802EF0C0 gSPDisplayList((*gfx)++, D_80368978); @@ -222,7 +222,7 @@ void __particleEmitter_drawOnPass(ParticleEmitter *this, Gfx **gfx, Mtx **mtx, V }//L802EF338 if( this->rgb[0] != 0xff || this->rgb[1] != 0xff || this->rgb[2] != 0xff || this->alpha != 0xff ){ - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); } } } @@ -344,7 +344,7 @@ void particleEmitter_setSprite(ParticleEmitter *this, enum asset_e sprite_id){ if(sprite_id != this->assetId_0_15){ this->assetId_0_15 = sprite_id; func_802EE930(this); - this->sprite_1C = func_8033B6C4(sprite_id, &this->unk34); + this->sprite_1C = codeB3A80_getSprite(sprite_id, &this->unk34); } } diff --git a/src/core2/propModelList.c b/src/core2/propModelList.c index b9e8adcf..ccf57126 100644 --- a/src/core2/propModelList.c +++ b/src/core2/propModelList.c @@ -2,6 +2,8 @@ #include "functions.h" #include "variables.h" +#define PROP_MODEL_COUNT 0x2A2 +#define PROP_SPRITE_COUNT 0x168 extern f32 func_8033A244(f32); @@ -9,14 +11,14 @@ typedef struct{ BKModelBin *model_bin; s32 timestamp; f32 scale; -}propModelListModel; +} PropModelData; typedef struct{ BKSprite *sprite; BKSpriteDisplayData *display; s32 timestamp; f32 scale; -}propModelListSprite; +} PropSpriteData; BKModelBin *propModelList_getModel(s32 arg0); @@ -24,15 +26,15 @@ BKModelBin *propModelList_getModel(s32 arg0); s32 D_8036B800 = 0; /* .bss */ -static propModelListModel *sPropModelList; -static propModelListSprite *sPropSpriteList; +static PropModelData *sPropModelList; +static PropSpriteData *sPropSpriteList; BKSpriteDisplayData *propModelList_getSpriteDisplayList(s32 arg0); -void propModelList_drawModel(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 position[3], f32 rotation[3], f32 scale, s32 model_index, Cube* arg7){ +void propModelList_drawModel(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 position[3], f32 rotation[3], f32 scale, s32 modelId, Cube* arg7){ BKModelBin * model; - model = propModelList_getModel(model_index); + model = propModelList_getModel(modelId); func_8033A244(3700.0f); func_8033A28C(1); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); @@ -40,28 +42,32 @@ void propModelList_drawModel(Gfx **gfx, Mtx **mtx, Vtx **vtx, f32 position[3], f modelRender_draw(gfx, mtx, position, rotation, scale, NULL, model); } -void propModelList_drawSprite(Gfx **gfx, Mtx **mtx, Vtx **Vtx, f32 position[3], f32 scale, s32 sprite_index, Cube *arg6, s32 r, s32 b, s32 g, s32 mirrored, s32 frame) { +void propModelList_drawSprite( + Gfx **gfx, Mtx **mtx, Vtx **Vtx, + f32 position[3], f32 scale, s32 spriteId, Cube *arg6, + s32 rgb_remove_red, s32 rgb_remove_green, s32 rgb_remove_blue, + s32 mirrored, s32 frame) { f32 scale_f3[3]; BKSpriteDisplayData *sprite; - sprite = propModelList_getSpriteDisplayList(sprite_index); + sprite = propModelList_getSpriteDisplayList(spriteId); scale_f3[0] = scale; scale_f3[1] = scale; scale_f3[2] = scale; - func_80338338(0xFF - (r * 0x10), 0xFF - (b * 0x10), 0xFF - (g * 0x10)); - if (func_80344C20(sprite) & 0xB00) { - func_803382E4(0xB); + codeAEDA0_setPrimaryColorRGB(0xFF - (rgb_remove_red * 0x10), 0xFF - (rgb_remove_green * 0x10), 0xFF - (rgb_remove_blue * 0x10)); + if (codeBD100_getSpriteType(sprite) & 0xB00) { + codeAEDA0_setSpriteDrawMode(0xB); } else { - func_803382E4(0xE); + codeAEDA0_setSpriteDrawMode(0xE); } - func_80335D30(gfx); + codeAEDA0_drawSprite(gfx); func_80344138(sprite, frame, mirrored, position, scale_f3, gfx, mtx); - func_8033687C(gfx); + codeAEDA0_postDrawSprite(gfx); } BKModelBin *propModelList_getModel(s32 arg0){ if(sPropModelList[arg0].model_bin == NULL){ - sPropModelList[arg0].model_bin = assetcache_get(0x2d1 + arg0); + sPropModelList[arg0].model_bin = assetcache_get(MODEL_ASSET_OFFSET + arg0); } sPropModelList[arg0].timestamp = globalTimer_getTime(); return sPropModelList[arg0].model_bin; @@ -74,8 +80,8 @@ BKModelBin *propModelList_getModelIfActive(s32 arg0){ BKSpriteDisplayData *propModelList_getSpriteDisplayList(s32 arg0) { - if (((propModelListSprite *)((s32)sPropSpriteList + arg0*sizeof(propModelListSprite)))->sprite == 0){ - ((propModelListSprite *)((s32)sPropSpriteList + arg0*sizeof(propModelListSprite)))->sprite = func_8033B6C4(arg0 + 0x572, &((propModelListSprite *)((s32)sPropSpriteList + arg0*sizeof(propModelListSprite)))->display); + if (((PropSpriteData *)((s32)sPropSpriteList + arg0*sizeof(PropSpriteData)))->sprite == 0){ + ((PropSpriteData *)((s32)sPropSpriteList + arg0*sizeof(PropSpriteData)))->sprite = codeB3A80_getSprite(arg0 + SPRITE_ASSET_OFFSET, &((PropSpriteData *)((s32)sPropSpriteList + arg0*sizeof(PropSpriteData)))->display); } sPropSpriteList[arg0].timestamp = globalTimer_getTime(); return sPropSpriteList[arg0].display; @@ -87,39 +93,39 @@ BKSprite *propModelList_getSprite(s32 arg0){ } f32 propModelList_getScale(Prop *arg0){ - if(arg0->is_3d){ + if(arg0->isModelProp){ ModelProp* ModelProp = &arg0->modelProp; - return sPropModelList[arg0->spriteProp.sprite_index].scale; + return sPropModelList[arg0->spriteProp.spriteId].scale; } else{//L8030A65C SpriteProp *spriteProp = &arg0->spriteProp; - return sPropSpriteList[spriteProp->sprite_index].scale; + return sPropSpriteList[spriteProp->spriteId].scale; } } void propModelList_setScale(Prop *arg0, f32 arg1){ - if(arg0->is_3d){ + if(arg0->isModelProp){ ModelProp* ModelProp = &arg0->modelProp; - sPropModelList[arg0->spriteProp.sprite_index].scale = (f32)ModelProp->scale*arg1/100.0f; + sPropModelList[arg0->spriteProp.spriteId].scale = (f32)ModelProp->scale*arg1/100.0f; } else{//L8030A65C SpriteProp *spriteProp = &arg0->spriteProp; - sPropSpriteList[spriteProp->sprite_index].scale = (f32)spriteProp->scale*arg1/100.0f; + sPropSpriteList[spriteProp->spriteId].scale = (f32)spriteProp->scale*arg1/100.0f; } } void propModelList_free(void){ - propModelListModel* iPtr; - propModelListSprite* jPtr; + PropModelData* iPtr; + PropSpriteData* jPtr; - for(iPtr = sPropModelList; iPtr < &sPropModelList[0x2A2]; iPtr++){ + for(iPtr = sPropModelList; iPtr < &sPropModelList[PROP_MODEL_COUNT]; iPtr++){ if(iPtr->model_bin){ assetcache_release(iPtr->model_bin); } } - for(jPtr = sPropSpriteList; jPtr < &sPropSpriteList[0x168]; jPtr++){ + for(jPtr = sPropSpriteList; jPtr < &sPropSpriteList[PROP_SPRITE_COUNT]; jPtr++){ if(jPtr->sprite){ - func_8033B338(&jPtr->sprite, &jPtr->display); + codeB3A80_releaseSprite(&jPtr->sprite, &jPtr->display); } } free(sPropModelList); @@ -129,17 +135,17 @@ void propModelList_free(void){ } void propModelList_init(void){//init - propModelListModel* iPtr; - propModelListSprite* jPtr; + PropModelData* iPtr; + PropSpriteData* jPtr; - sPropModelList = (propModelListModel *)malloc(0x2A2 * sizeof(propModelListModel)); - sPropSpriteList = (propModelListSprite *)malloc(0x168 * sizeof(propModelListSprite)); + sPropModelList = (PropModelData *)malloc(PROP_MODEL_COUNT * sizeof(PropModelData)); + sPropSpriteList = (PropSpriteData *)malloc(PROP_SPRITE_COUNT * sizeof(PropSpriteData)); D_8036B800 = 0; - for(iPtr = sPropModelList; iPtr < &sPropModelList[0x2A2]; iPtr++){ + for(iPtr = sPropModelList; iPtr < &sPropModelList[PROP_MODEL_COUNT]; iPtr++){ iPtr->model_bin = NULL; iPtr->scale = 0.0f; } - for(jPtr = sPropSpriteList; jPtr < &sPropSpriteList[0x168]; jPtr++){ + for(jPtr = sPropSpriteList; jPtr < &sPropSpriteList[PROP_SPRITE_COUNT]; jPtr++){ jPtr->sprite = NULL; jPtr->scale = 0.0f; } @@ -157,25 +163,34 @@ void propModelList_flush(s32 level) { static s32 D_8036B808 = 0; s32 oldest_active_time; s32 var_s0; - propModelListModel *sp3C; - propModelListSprite *temp_a0_2; + PropModelData *model_entry; + PropSpriteData *sprite_entry; oldest_active_time = globalTimer_getTime() - func_80255B08(level); - for(var_s0 = 0; (sPropModelList != NULL) && (var_s0 < ((level == 1) ? 0x28 : 0x2A1)); var_s0++, D_8036B804 = (D_8036B804 >= 0x2A1)? 0: D_8036B804 + 1){ - sp3C = (propModelListModel*)((u32)sPropModelList + sizeof(propModelListModel)*D_8036B804); - if ((sp3C->model_bin != NULL) && ((sp3C->timestamp < oldest_active_time) || (level == 3))){ - assetcache_release(sp3C->model_bin); - sp3C->model_bin = NULL; + for(var_s0 = 0; + (sPropModelList != NULL) && (var_s0 < ((level == 1) ? 0x28 : PROP_MODEL_COUNT - 1)); + var_s0++, D_8036B804 = (D_8036B804 >= PROP_MODEL_COUNT - 1)? 0: D_8036B804 + 1) + { + model_entry = (PropModelData*)((u32)sPropModelList + sizeof(PropModelData)*D_8036B804); + if ((model_entry->model_bin != NULL) && ((model_entry->timestamp < oldest_active_time) || (level == 3))){ + assetcache_release(model_entry->model_bin); + model_entry->model_bin = NULL; if( (level != 1) && (func_80254BC4(1))){ return; } } } - for(var_s0 = 0; (sPropSpriteList != NULL) && (var_s0 < ((level == 1) ? 0x28 : 0x167)); var_s0++, D_8036B808 = (D_8036B808 >= 0x167)? 0: D_8036B808 + 1){ - temp_a0_2 = (propModelListSprite*)((u32)sPropSpriteList + sizeof(propModelListSprite)*D_8036B808); - if ((temp_a0_2->sprite != 0) && ((temp_a0_2->timestamp < oldest_active_time) || (level == 3))){ - func_8033B338(&temp_a0_2->sprite, &temp_a0_2->display); + for(var_s0 = 0; + (sPropSpriteList != NULL) && (var_s0 < ((level == 1) ? 0x28 : PROP_SPRITE_COUNT - 1)); + var_s0++, D_8036B808 = (D_8036B808 >= PROP_SPRITE_COUNT - 1)? 0: D_8036B808 + 1) + { + sprite_entry = (PropSpriteData*)((u32)sPropSpriteList + sizeof(PropSpriteData)*D_8036B808); + if ((sprite_entry->sprite != 0) && + ((sprite_entry->timestamp < oldest_active_time) || + (level == 3))) + { + codeB3A80_releaseSprite(&sprite_entry->sprite, &sprite_entry->display); if( (level != 1) && (func_80254BC4(1))){ return; } @@ -187,12 +202,12 @@ void propModelList_defrag(void) { BKModelBin *temp_a0; s32 phi_s2; - sPropSpriteList = (propModelListSprite *) defrag(sPropSpriteList); - sPropModelList = (propModelListModel *) defrag(sPropModelList); + sPropSpriteList = (PropSpriteData *) defrag(sPropSpriteList); + sPropModelList = (PropModelData *) defrag(sPropModelList); if (!func_802559A0() && !func_80255AE4() && sPropModelList != NULL) { for(phi_s2 = 0x14; (phi_s2 != 0) && !func_80255AE4(); phi_s2--){ D_8036B800++; - if (D_8036B800 >= 0x2A2) { + if (D_8036B800 >= PROP_MODEL_COUNT) { D_8036B800 = 0; } temp_a0 = sPropModelList[D_8036B800].model_bin; @@ -206,25 +221,24 @@ void propModelList_defrag(void) { void propModelList_refresh(void) { s32 model_list_index; s32 temp_t7; - propModelListSprite *phi_s0; + PropSpriteData *sprite_entry; s32 phi_s2; - propModelListModel *phi_s0_2; + PropModelData *model_entry; - for(phi_s0 = sPropSpriteList; phi_s0 < sPropSpriteList + 360; phi_s0++){ - if (phi_s0->sprite != NULL) { - temp_t7 = phi_s0 - sPropSpriteList; - func_8033B338(&phi_s0->sprite, &phi_s0->display); - phi_s2 = temp_t7 *sizeof(propModelListSprite); - *(BKSprite **)((s32)sPropSpriteList + phi_s2) = func_8033B6C4(temp_t7 + 0x572, (BKSpriteDisplayData **)((s32)sPropSpriteList + phi_s2 + 4)); + for(sprite_entry = sPropSpriteList; sprite_entry < sPropSpriteList + 360; sprite_entry++){ + if (sprite_entry->sprite != NULL) { + temp_t7 = sprite_entry - sPropSpriteList; + codeB3A80_releaseSprite(&sprite_entry->sprite, &sprite_entry->display); + phi_s2 = temp_t7 *sizeof(PropSpriteData); + *(BKSprite **)((s32)sPropSpriteList + phi_s2) = codeB3A80_getSprite(temp_t7 + SPRITE_ASSET_OFFSET, (BKSpriteDisplayData **)((s32)sPropSpriteList + phi_s2 + 4)); } } - for(phi_s0_2 = sPropModelList; phi_s0_2 < sPropModelList + 674; phi_s0_2++){ - if(phi_s0_2->model_bin != NULL){ - model_list_index = phi_s0_2 - sPropModelList; - assetcache_release(phi_s0_2->model_bin); - sPropModelList[model_list_index].model_bin = (BKModelBin *) assetcache_get(model_list_index + 0x2D1); - + for(model_entry = sPropModelList; model_entry < sPropModelList + 674; model_entry++){ + if(model_entry->model_bin != NULL){ + model_list_index = model_entry - sPropModelList; + assetcache_release(model_entry->model_bin); + sPropModelList[model_list_index].model_bin = (BKModelBin *) assetcache_get(model_list_index + MODEL_ASSET_OFFSET); } } } diff --git a/src/cutscenes/code_0.c b/src/cutscenes/code_0.c index 1c366beb..0b368e9a 100644 --- a/src/cutscenes/code_0.c +++ b/src/cutscenes/code_0.c @@ -803,10 +803,10 @@ void func_80388CE4(vector(AnSeqElement) **arg0, ActorMarker *arg1) { void func_80388D30(vector(AnSeqElement) **arg0, ActorMarker *arg1) { anSeq_func_80288F78(arg0, 0.0257f, (SFX_6B_LOCKUP_OPENING << 0x10) | (0x40 << 8) | 0xFF); anSeq_func_80288F78(arg0, 0.6287f, (SFX_6C_LOCKUP_CLOSING << 0x10) | (0x80 << 8) | 0xFA); - anSeq_func_80288F78(arg0, 0.7126f, (SFX_3F_CAULDRON_SQEAK_1 << 0x10) | (0x99 << 8) | 0x65); - anSeq_func_80288F78(arg0, 0.77f, (SFX_40_CAULDRON_SQEAK_2 << 0x10) | (0x99 << 8) | 0x65); - anSeq_func_80288F78(arg0, 0.8079f, (SFX_3F_CAULDRON_SQEAK_1 << 0x10) | (0x99 << 8) | 0x65); - anSeq_func_80288F78(arg0, 0.9142f, (SFX_40_CAULDRON_SQEAK_2 << 0x10) | (0x99 << 8) | 0x65); + anSeq_func_80288F78(arg0, 0.7126f, (SFX_3F_CAULDRON_SQUEAK_1 << 0x10) | (0x99 << 8) | 0x65); + anSeq_func_80288F78(arg0, 0.77f, (SFX_40_CAULDRON_SQUEAK_2 << 0x10) | (0x99 << 8) | 0x65); + anSeq_func_80288F78(arg0, 0.8079f, (SFX_3F_CAULDRON_SQUEAK_1 << 0x10) | (0x99 << 8) | 0x65); + anSeq_func_80288F78(arg0, 0.9142f, (SFX_40_CAULDRON_SQUEAK_2 << 0x10) | (0x99 << 8) | 0x65); } void func_80388DE4(vector(AnSeqElement) **arg0, ActorMarker *arg1) { diff --git a/src/cutscenes/code_60F0.c b/src/cutscenes/code_60F0.c index 024832b0..9953c452 100644 --- a/src/cutscenes/code_60F0.c +++ b/src/cutscenes/code_60F0.c @@ -15,7 +15,7 @@ extern ActorInfo D_8038E8A8; /* .data */ ActorInfo D_8038DC90 = { - MARKER_17_CONCERT_BANJO, ACTOR_8E_CONCERT_BANJO, ASSET_355_MODEL_CONCERT_BANJO, + MARKER_17_CONCERT_BANJO, ACTOR_8E_CONCERT_BANJO, ASSET_355_MODEL_CONCERT_BANJO, 1, NULL, NULL, func_802E07E0, func_802E0738, 0, 0, 5.0f, 0 @@ -47,7 +47,7 @@ ActorInfo D_8038DCFC = ActorInfo D_8038DD20 = { - MARKER_1B_CONCERT_TOOTY, ACTOR_92_CONCERT_TOOTY, ASSET_35A_MODEL_CONCERT_TOOTY, + MARKER_1B_CONCERT_TOOTY, ACTOR_92_CONCERT_TOOTY, ASSET_35A_MODEL_CONCERT_TOOTY, 1, NULL, NULL, func_802E07E0, func_802E0738, 0, 0, 3.0f, 0 @@ -471,7 +471,7 @@ ActorInfo D_8038E470 = ActorInfo D_8038E494 = { - 0x143, 0x2FA, 0x46A, + 0x143, ACTOR_2FA_BANJOS_HOUSE_ROYSTEN, 0x46A, 1, NULL, NULL, func_802E07E0, func_802E0738, 0, 0, 0.0f, 0 diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index c0b0610d..5e7ef71f 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -282,7 +282,7 @@ void chBossJinjo_update(Actor *this){ case BOSSJINJO_STATE_5_HIT: chfinalboss_getPosition(position_finalboss); position_finalboss[1] += 100.0f; - chfinalboss_func_80387470(this, position_finalboss, 1200.0f, 3840.0f, 200.0f, 2500.0f, 70.0f); + chfinalboss_flyTo(this, position_finalboss, 1200.0f, 3840.0f, 200.0f, 2500.0f, 70.0f); chbossjinjo_func_8038C79C(this); break; } diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index 60dce009..c4b7c104 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -6,6 +6,7 @@ extern void func_8028F4B8(f32[3], f32, f32); extern void func_80320ED8(ActorMarker *, f32, s32); s32 subaddie_getYawToPosition(Actor*, f32*); +s32 subaddie_getYawToPosition(Actor*, f32*); Actor *func_8032813C(); extern Actor* func_80329958(ActorMarker *this, s32 arg1); extern void func_803298D8(); @@ -94,7 +95,12 @@ ActorAnimationInfo chFinalBossAnimationInfo[] = { { 0x266, 4.0f} }; -ActorInfo chFinalBoss = { MARKER_25E_GRUNTILDA_FINAL_BOSS, ACTOR_38B_GRUNTILDA_FINAL_BOSS, ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, 1, chFinalBossAnimationInfo, chfinalboss_update, actor_update_func_80326224, chfinalboss_draw, 0, 0, 0.0f, 0 }; +ActorInfo chFinalBoss = { + MARKER_25E_GRUNTILDA_FINAL_BOSS_VULNERABLE, ACTOR_38B_GRUNTILDA_FINAL_BOSS, ASSET_53D_MODEL_GRUNTILDA_FINAL_BOSS, + 1, chFinalBossAnimationInfo, + chfinalboss_update, actor_update_func_80326224, chfinalboss_draw, + 0, 0, 0.0f, 0 +}; f32 fight_D_80391524[3] = {0.0f, -8.0f, 400.0f}; f32 D_80391530[3] = {0.0f, -8.0f, 0.0f}; @@ -125,7 +131,7 @@ f32 D_80391780[3] = {1290.0f, 0.0f, -1290.0f}; f32 D_8039178C[3] = {1290.0f, 0.0f, 1290.0f}; f32 D_80391798[3] = {0.0f, 0.0f, 0.0f}; f32 D_803917A4[4] = {500.0f, 650.0f, 800.0f, 950.0f}; -f32 D_803917B4[4] = {3.75f, 3.0f, 2.25f, 1.5f}; +f32 D_803917B4[4] = {3.75f, 3.0f, 2.25f, 1.5f}; s32 D_803917C4[3] = {230, 230, 230}; f32 D_803917D0[4] = {2.4f, 2.1f, 1.8f, 1.5f}; f32 D_803917E0[3] = {0.0f, 186.0f, 0.0f}; @@ -260,12 +266,18 @@ void chfinalboss_spawnBroomstickGlowParticles(Actor *this) { time_delta = globalTimer_getTime(); state = this->state; - if ((state == 6) || (state == 7)) { + if ( + (state == FINALBOSS_STATE_6_PHASE1_SWOOP_MID) || + (state == FINALBOSS_STATE_7_PHASE1_SWOOP_END)) + { color[0] = sFinalBoss_ColorRed[0]; color[1] = sFinalBoss_ColorRed[1]; color[2] = sFinalBoss_ColorRed[2]; sprite_id = ASSET_715_SPRITE_SPARKLE_RED; - } else if ((state == 8) || (state == 9)) { + } else if ( + (state == FINALBOSS_STATE_8_PHASE1_BREAKING) || + (state == FINALBOSS_STATE_9_PHASE1_BROKEN)) + { color[0] = sFinalBoss_ColorDarkGrey[0]; color[1] = sFinalBoss_ColorDarkGrey[1]; color[2] = sFinalBoss_ColorDarkGrey[2]; @@ -305,7 +317,7 @@ void chfinalboss_func_80386B54(f32 *arg0, f32 arg1) { } } -bool chfinalboss_func_80386BEC(Actor *this, f32 arg1) { +bool chfinalboss_turnTowardPlayer(Actor *this, f32 arg1) { this->yaw_ideal = (f32) subaddie_getYawToPlayer(this); subaddie_turnToYaw(this, arg1); if ((this->yaw_ideal < (this->yaw + arg1)) && ((this->yaw - arg1) < this->yaw_ideal)) { @@ -405,7 +417,7 @@ void chfinalboss_func_80387074(s32 arg0) { chSpellFireball_func_8038FB84(marker, D_80392758, D_80392768, D_80392778); } -void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 arg3) { +void chfinalboss_throwObject(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 arg3) { Actor *temp_v0; ActorLocal_FinalBoss *local; f32 sp2C[3]; @@ -433,7 +445,7 @@ void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 a D_80392778[0] = 0.0f; D_80392778[1] = (arg3 == 0) ? -1000.0 : -500.0; D_80392778[2] = 0.0f; - + for(i = 0; i < 3; i++){ D_80392768[i] = (sp2C[i] - arg1[i]) / arg2 - (D_80392778[i] * arg2 / 2); } @@ -445,14 +457,14 @@ void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2, s32 a } } -void chfinalboss_func_803872F8(Actor *arg0) { +void chfinalboss_throwFinalSpell(Actor *arg0) { f32 vec[3]; func_8034A174(arg0->marker->unk44, 0xA, vec); - chfinalboss_func_80387110(arg0->marker, vec, 3.0f, 1); + chfinalboss_throwObject(arg0->marker, vec, 3.0f, 1); } -s32 chfinalboss_func_80387340(Actor *this, f32 arg1) { +s32 chfinalboss_throwFireball(Actor *this, f32 arg1) { f32 sp24[3]; if (actor_animationIsAt(this, 0.50f) != 0) { @@ -463,7 +475,7 @@ s32 chfinalboss_func_80387340(Actor *this, f32 arg1) { sp24[1] = this->position_y; sp24[2] = this->position_z; } - chfinalboss_func_80387110(this->marker, sp24, arg1, 0); + chfinalboss_throwObject(this->marker, sp24, arg1, 0); return 1; } return 0; @@ -486,7 +498,7 @@ void chfinalboss_func_803873DC(Actor *actor, f32 arg1, f32 arg2) { } } -bool chfinalboss_func_80387470(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { +bool chfinalboss_flyTo(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6) { f32 dt; f32 diff[3]; TUPLE(f32, pos) temp; @@ -546,7 +558,7 @@ void chfinalboss_func_8038770C(Actor *actor) { } void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) -{ +{ Actor *actor = marker_getActor(this); ActorLocal_FinalBoss *local = (ActorLocal_FinalBoss *) &actor->local; @@ -558,7 +570,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) switch(phase_id) { case FINALBOSS_PHASE_0_INTRO: - subaddie_set_state_with_direction(actor, 1, 0.0001f, 1); + subaddie_set_state_with_direction(actor, FINALBOSS_STATE_1_PHASE0_INTRO, 0.0001f, 1); timed_setStaticCameraToNode(0.0f, 0); timed_exitStaticCamera(2.0f); timed_setStaticCameraToNode(2.0f, 1); @@ -566,7 +578,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) break; case FINALBOSS_PHASE_1_BROOMSTICK: - subaddie_set_state_with_direction(actor, 2, 0.0001f, 1); + subaddie_set_state_with_direction(actor, FINALBOSS_STATE_2_PHASE1_TRAVEL1, 0.0001f, 1); func_8030E878(SFX_EA_GRUNTY_LAUGH_1, randf2(0.95f, 1.05f), 32000, actor->position, 5000.0f, 12000.0f); local->unk5 = 0x0; actor->unk1C_x = D_803927D0[(local->unk5)][0]; @@ -584,7 +596,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) break; case FINALBOSS_PHASE_2_AIR: - subaddie_set_state_with_direction(actor, 0xE, 0.0001f, 1); + subaddie_set_state_with_direction(actor, FINALBOSS_STATE_E_PHASE2_TRAVEL, 0.0001f, 1); local->unk5 = 0x8; actor->unk1C_x = D_803927D0[(local->unk5)][0]; actor->unk1C_y = D_803927D0[(local->unk5)][1]; @@ -594,7 +606,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) case FINALBOSS_PHASE_3_FLIGHT: - subaddie_set_state_with_direction(actor, 0x15, 0.0001f, 1); + subaddie_set_state_with_direction(actor, FINALBOSS_STATE_15_PHASE3_TRAVEL, 0.0001f, 1); local->unk5 = 0xC; actor->unk1C_x = D_803927D0[(local->unk5)][0]; actor->unk1C_y = D_803927D0[(local->unk5)][1]; @@ -603,7 +615,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) break; case FINALBOSS_PHASE_4_JINJOS: - subaddie_set_state_with_direction(actor, 0x1C, 0.0001f, 1); + subaddie_set_state_with_direction(actor, FINALBOSS_STATE_1C_PHASE4_TRAVEL, 0.0001f, 1); local->unk5 = 0x10; actor->unk1C_x = D_803927D0[(local->unk5)][0]; actor->unk1C_y = D_803927D0[(local->unk5)][1]; @@ -612,7 +624,7 @@ void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id) case FINALBOSS_PHASE_5_JINJONATOR: chfinalboss_func_80386628(actor->marker, 0); - chfinalboss_phase5_setState(actor, 0x24); + chfinalboss_phase5_setState(actor, FINALBOSS_STATE_24_PHASE5_TURN); actor_loopAnimation(actor); break; } @@ -750,7 +762,7 @@ void chfinalboss_func_803880A0(Actor *actor, f32 arg1) { } void chfinalboss_func_803880E0(ActorMarker *marker, enum asset_e text_id, s32 arg2) { - chfinalboss_phase1_setState(marker_getActor(marker), 0xC); + chfinalboss_phase1_setState(marker_getActor(marker), FINALBOSS_STATE_C_PHASE1_SPELL); } void chfinalboss_func_80388110(ActorMarker *marker, enum asset_e text_id, s32 arg2) { @@ -777,64 +789,65 @@ void chfinalboss_phase1_setState(Actor *this, s32 next_state) { subaddie_set_state_with_direction(this, next_state, 0.0001f, 1); actor_loopAnimation(this); chfinalboss_func_80386600(this->marker, 0); - if (next_state != 9) { + if (next_state != FINALBOSS_STATE_9_PHASE1_BROKEN) { if (func_8030E3FC(this->unk44_31)) { sfxSource_triggerCallbackByIndex(this->unk44_31); FUNC_8030E624(SFX_162_MOTOR_RUCKUS, 1.0f, 32000); } } - switch (next_state) { - case 2: - chfinalboss_func_80387E1C(this, this->unk1C); - break; - case 5: - if ((sp40 & 1) == 0) { - func_8030E878(SFX_142_GRUNTY_LAUGH_3, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - } else { - func_8030E878(SFX_14B_GRUNTY_LAUGH_4, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - } - this->actor_specific_1_f = 0.0f; - this->lifetime_value = 0.0f; - break; - case 6: - local = local; - chfinalboss_func_80386600(this->marker, 1); - func_80324D54(0.4f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); - this->actor_specific_1_f = 0.0f; - chfinalboss_func_80387B00(this); - local->unkA = 0; - break; - case 7: - local->unk14 = (local->unk14 > 2000.0f) ? local->unk14 : 2000.0f; - local->unk14 = (local->unk14 < 2700.0f) ? local->unk14 : 2700.0f; - local->unk18 = 400.0f; - local->unk28 = (-this->actor_specific_1_f * this->actor_specific_1_f) / (2.0 * local->unk14); - chfinalboss_func_80386600(this->marker, 1); - anctrl_setAnimTimer(this->anctrl, sp3C); - break; - case 8: - temp_f12 = 1150.0f; - local->unk28 = (-this->actor_specific_1_f * this->actor_specific_1_f) / (2.0 * temp_f12); - local->unk2C = (100.0f - local->unk1C) / temp_f12; - break; - case 9: - actor_playAnimationOnce(this); - anctrl_setAnimTimer(this->anctrl, sp3C); - break; - case 10: - func_8030E878(SFX_EA_GRUNTY_LAUGH_1, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - break; - case 12: - coMusicPlayer_playMusic(SFX_GRUNTY_SPELL_POWERUP, 30000); - break; - case 13: - func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - if ((s32) local->hits >= 4) { - SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); - chfinalboss_func_80388110(this->marker, 0, 0); - } - break; + switch (next_state) + { + case FINALBOSS_STATE_2_PHASE1_TRAVEL1: + chfinalboss_func_80387E1C(this, this->unk1C); + break; + case FINALBOSS_STATE_5_PHASE1_SWOOP_START: + if ((sp40 & 1) == 0) { + func_8030E878(SFX_142_GRUNTY_LAUGH_3, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); + } else { + func_8030E878(SFX_14B_GRUNTY_LAUGH_4, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); + } + this->actor_specific_1_f = 0.0f; + this->lifetime_value = 0.0f; + break; + case FINALBOSS_STATE_6_PHASE1_SWOOP_MID: + local = local; + chfinalboss_func_80386600(this->marker, 1); + func_80324D54(0.4f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); + this->actor_specific_1_f = 0.0f; + chfinalboss_func_80387B00(this); + local->unkA = 0; + break; + case FINALBOSS_STATE_7_PHASE1_SWOOP_END: + local->unk14 = (local->unk14 > 2000.0f) ? local->unk14 : 2000.0f; + local->unk14 = (local->unk14 < 2700.0f) ? local->unk14 : 2700.0f; + local->unk18 = 400.0f; + local->unk28 = (-this->actor_specific_1_f * this->actor_specific_1_f) / (2.0 * local->unk14); + chfinalboss_func_80386600(this->marker, 1); + anctrl_setAnimTimer(this->anctrl, sp3C); + break; + case FINALBOSS_STATE_8_PHASE1_BREAKING: + temp_f12 = 1150.0f; + local->unk28 = (-this->actor_specific_1_f * this->actor_specific_1_f) / (2.0 * temp_f12); + local->unk2C = (100.0f - local->unk1C) / temp_f12; + break; + case FINALBOSS_STATE_9_PHASE1_BROKEN: + actor_playAnimationOnce(this); + anctrl_setAnimTimer(this->anctrl, sp3C); + break; + case FINALBOSS_STATE_A_PHASE1_FIREBALL: + func_8030E878(SFX_EA_GRUNTY_LAUGH_1, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); + break; + case FINALBOSS_STATE_C_PHASE1_SPELL: + coMusicPlayer_playMusic(SFX_GRUNTY_SPELL_POWERUP, 30000); + break; + case FINALBOSS_STATE_D_PHASE1_HIT: + func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); + if ((s32) local->hits >= 4) { + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); + chfinalboss_func_80388110(this->marker, 0, 0); + } + break; } } @@ -903,8 +916,8 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_spawnBroomstickGlowParticles(this); chfinalboss_func_80387ACC(this, 60.0f * sp54); chfinalboss_func_80387F70(this, this->unk1C, 950.0f); - if (chfinalboss_func_80387470(this, this->unk1C, 1000.0f, 1800.0f, 200.0f, 1000.0f, 600.0f)) { - chfinalboss_phase1_setState(this, 3); + if (chfinalboss_flyTo(this, this->unk1C, 1000.0f, 1800.0f, 200.0f, 1000.0f, 600.0f)) { + chfinalboss_phase1_setState(this, FINALBOSS_STATE_3_PHASE1_TRAVEL2); this->unk1C[0] = D_803927D0[local->unk5][0]; this->unk1C[1] = D_803927D0[local->unk5][1]; this->unk1C[2] = D_803927D0[local->unk5][2]; @@ -915,16 +928,16 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_spawnBroomstickGlowParticles(this); sp50 = ml_map_f(ml_vec3f_distance(this->position, this->unk1C), 300.0f, 1000.0f, 100.0f, 1000.0f); chfinalboss_func_80387ACC(this, 60.0f * sp54); - if (chfinalboss_func_80387470(this, this->unk1C, sp50, 1800.0f, 200.0f, 500.0f, 300.0f)) { - chfinalboss_phase1_setState(this, 4); + if (chfinalboss_flyTo(this, this->unk1C, sp50, 1800.0f, 200.0f, 500.0f, 300.0f)) { + chfinalboss_phase1_setState(this, FINALBOSS_STATE_4_PHASE1_TURN); } break; case 4: chfinalboss_func_80386600(this->marker, 0); chfinalboss_spawnBroomstickGlowParticles(this); chfinalboss_func_80387ACC(this, 60.0f * sp54); - if (chfinalboss_func_80386BEC(this, 240.0f * sp54)) { - chfinalboss_phase1_setState(this, 5); + if (chfinalboss_turnTowardPlayer(this, 240.0f * sp54)) { + chfinalboss_phase1_setState(this, FINALBOSS_STATE_5_PHASE1_SWOOP_START); chfinalboss_func_80386654(1.0f, fight_D_80391380, fight_D_80391390); } break; @@ -940,7 +953,7 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_func_80387BFC(this, 45.0f * sp54); subaddie_turnToYaw(this, 30.0f * sp54); if (this->lifetime_value > 1.0) { - chfinalboss_phase1_setState(this, 6); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_6_PHASE1_SWOOP_MID); } break; case 6: @@ -973,11 +986,11 @@ void chfinalboss_phase1_update(ActorMarker *marker) { if (local->unk20 < 0.0) { var_a0 = (local->hits == 0) ? 1 : 0; if (local->unk4 >= (var_a0 + local->hits)) { - chfinalboss_phase1_setState(this, 8); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_8_PHASE1_BREAKING); local->unk4 = 0; } else{ - chfinalboss_phase1_setState(this, 7); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_7_PHASE1_SWOOP_END); local->unk4++; } } @@ -989,7 +1002,7 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_func_80387BFC(this, 180.0f * sp54); subaddie_turnToYaw(this, 30.0f * sp54); if (this->actor_specific_1_f < 0) { - chfinalboss_phase1_setState(this, 4); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_4_PHASE1_TURN); chfinalboss_func_80386654(1.5f, fight_D_80391390, fight_D_80391380); } break; @@ -1002,7 +1015,7 @@ void chfinalboss_phase1_update(ActorMarker *marker) { chfinalboss_func_80387D4C(this); subaddie_turnToYaw(this, 30.0f * sp54); if (this->actor_specific_1_f < 0) { - chfinalboss_phase1_setState(this, 9); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_9_PHASE1_BROKEN); chfinalboss_func_80386654(2.0f, fight_D_80391390, fight_D_80391380); this->lifetime_value = 4.0f; } @@ -1014,31 +1027,31 @@ void chfinalboss_phase1_update(ActorMarker *marker) { } else{ if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase1_setState(this, 2); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_2_PHASE1_TRAVEL1); chfinalboss_func_803880A0(this, 2000.0f); } } break; case 10: chfinalboss_func_80387ACC(this, 60.0f * sp54); - chfinalboss_func_80386BEC(this, 30.0f); + chfinalboss_turnTowardPlayer(this, 30.0f); chfinalboss_func_8038871C(this, 460.0f, 400.0f * sp54); - chfinalboss_func_80387340(this, 1.0f); + chfinalboss_throwFireball(this, 1.0f); if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase1_setState(this, 2); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_2_PHASE1_TRAVEL1); chfinalboss_func_803880A0(this, 2000.0f); } break; case 11: chfinalboss_func_80387ACC(this, 60.0f * sp54); - chfinalboss_func_80386BEC(this, 30.0f); + chfinalboss_turnTowardPlayer(this, 30.0f); if (local->unk9) { chfinalboss_func_8038871C(this, 460.0f, 400.0f * sp54); } break; case 12: chfinalboss_func_80387ACC(this, 60.0f * sp54); - chfinalboss_func_80386BEC(this, 30.0f); + chfinalboss_turnTowardPlayer(this, 30.0f); chfinalboss_func_8038871C(this, 460.0f, 400.0f * sp54); chfinalboss_func_803873DC(this, 600.0f, 2000.0f); if (actor_animationIsAt(this, 0.9999f)) { @@ -1049,13 +1062,13 @@ void chfinalboss_phase1_update(ActorMarker *marker) { break; case 13: chfinalboss_func_80387ACC(this, 60.0f * sp54); - chfinalboss_func_80386BEC(this, 30.0f); + chfinalboss_turnTowardPlayer(this, 30.0f); if (actor_animationIsAt(this, 0.9999f)) { if (local->hits >= 4) { - chfinalboss_phase1_setState(this, 0xB); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_B_PHASE1_WAIT_FOR_TEXT); } else{ - chfinalboss_phase1_setState(this, 0xA); + chfinalboss_phase1_setState(this, FINALBOSS_STATE_A_PHASE1_FIREBALL); } } break; @@ -1072,29 +1085,29 @@ void chfinalboss_phase2_setState(Actor *this, s32 arg1){ subaddie_set_state_with_direction(this, arg1, 0.0001f, 1); actor_loopAnimation(this); switch (arg1) { - case 14: - local->unk5 = local->hits + 8; - this->unk1C[0] = D_803927D0[local->unk5][0]; - this->unk1C[1] = D_803927D0[local->unk5][1]; - this->unk1C[2] = D_803927D0[local->unk5][2]; - break; - case 19: - if (sp28 & 1) { - sfx_playFadeShorthandDefault(SFX_132_GRUNTY_YOW, 1.0f, 32000, this->position, 7000, 12000); - } - else{ - sfx_playFadeShorthandDefault(SFX_133_GRUNTY_OHW, 1.0f, 32000, this->position, 7000, 12000); - } - break; - case 20: - sfx_playFadeShorthandDefault(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000, this->position, 5000, 12000); + case FINALBOSS_STATE_E_PHASE2_TRAVEL: + local->unk5 = local->hits + 8; + this->unk1C[0] = D_803927D0[local->unk5][0]; + this->unk1C[1] = D_803927D0[local->unk5][1]; + this->unk1C[2] = D_803927D0[local->unk5][2]; + break; + case FINALBOSS_STATE_13_PHASE2_HIT_OW: + if (sp28 & 1) { + sfx_playFadeShorthandDefault(SFX_132_GRUNTY_YOW, 1.0f, 32000, this->position, 7000, 12000); + } + else{ + sfx_playFadeShorthandDefault(SFX_133_GRUNTY_OHW, 1.0f, 32000, this->position, 7000, 12000); + } + break; + case FINALBOSS_STATE_14_PHASE2_HIT_WEEEGH: + sfx_playFadeShorthandDefault(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000, this->position, 5000, 12000); - local->unkA = 0; - break; - case 17: - coMusicPlayer_playMusic(SFX_GRUNTY_SPELL_POWERUP, 30000); - break; - } + local->unkA = 0; + break; + case FINALBOSS_STATE_11_PHASE2_SPELL: + coMusicPlayer_playMusic(SFX_GRUNTY_SPELL_POWERUP, 30000); + break; + } } void chfinalboss_phase2_endTextCallback(ActorMarker *marker, enum asset_e text_id, s32 arg2) { @@ -1112,25 +1125,25 @@ void chfinalboss_phase2_update(ActorMarker *marker) { sp4C = time_getDelta(); sp48 = local->hits; switch (this->state) { - case 14: + case FINALBOSS_STATE_E_PHASE2_TRAVEL: chfinalboss_spawnBroomstickGlowParticles(this); chfinalboss_func_80387ACC(this, 30.0f * sp4C); - if (chfinalboss_func_80387470(this, this->unk1C, ml_map_f(ml_vec3f_distance(this->position, this->unk1C), 70.0f, 1000.0f, 100.0f, D_80391758[sp48]), D_80391758[sp48] * 2, 160.0f, 500.0f, 70.0f)) { + if (chfinalboss_flyTo(this, this->unk1C, ml_map_f(ml_vec3f_distance(this->position, this->unk1C), 70.0f, 1000.0f, 100.0f, D_80391758[sp48]), D_80391758[sp48] * 2, 160.0f, 500.0f, 70.0f)) { local->unkA = 1; - chfinalboss_phase2_setState(this, 0xF); + chfinalboss_phase2_setState(this, FINALBOSS_STATE_F_PHASE2_TURN); } break; - case 15: - if (chfinalboss_func_80386BEC(this, 9.0f)) { - chfinalboss_phase2_setState(this, 0x10); + case FINALBOSS_STATE_F_PHASE2_TURN: + if (chfinalboss_turnTowardPlayer(this, 9.0f)) { + chfinalboss_phase2_setState(this, FINALBOSS_STATE_10_PHASE2_FIREBALL); } break; - case 16: - chfinalboss_func_80386BEC(this, 3.0f); - chfinalboss_func_80387340(this, 1.3f); + case FINALBOSS_STATE_10_PHASE2_FIREBALL: + chfinalboss_turnTowardPlayer(this, 3.0f); + chfinalboss_throwFireball(this, 1.3f); if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase2_setState(this, 0x12); + chfinalboss_phase2_setState(this, FINALBOSS_STATE_12_PHASE2_WAIT); local->unk3++; if (local->unk3 >= 4) { local->unk3 = 0U; @@ -1141,37 +1154,37 @@ void chfinalboss_phase2_update(ActorMarker *marker) { } } break; - case 17: - chfinalboss_func_80386BEC(this, 3.0f); + case FINALBOSS_STATE_11_PHASE2_SPELL: + chfinalboss_turnTowardPlayer(this, 3.0f); chfinalboss_func_803873DC(this, 1200.0f, 2400.0f); if (actor_animationIsAt(this, 0.9999f)) { chfinalboss_setPhase(this->marker, FINALBOSS_PHASE_3_FLIGHT); } break; - case 18: - chfinalboss_func_80386BEC(this, 3.0f); + case FINALBOSS_STATE_12_PHASE2_WAIT: + chfinalboss_turnTowardPlayer(this, 3.0f); if (this->lifetime_value > 0.0) { this->lifetime_value = this->lifetime_value - sp4C; break; } - if (chfinalboss_func_80386BEC(this, 3.0f)) { - chfinalboss_phase2_setState(this, 0x10); + if (chfinalboss_turnTowardPlayer(this, 3.0f)) { + chfinalboss_phase2_setState(this, FINALBOSS_STATE_10_PHASE2_FIREBALL); } break; - case 19: + case FINALBOSS_STATE_13_PHASE2_HIT_OW: if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase2_setState(this, 0xE); + chfinalboss_phase2_setState(this, FINALBOSS_STATE_E_PHASE2_TRAVEL); } break; - case 20: + case FINALBOSS_STATE_14_PHASE2_HIT_WEEEGH: if (actor_animationIsAt(this, 0.9999f)) { if (local->hits >= 4) { gcdialog_showDialog(randi2(0, 5) + 0x1115, 0x20, NULL, NULL, NULL, NULL); gcdialog_showDialog(randi2(0, 3) + 0x111A, 4, NULL, this->marker, NULL, chfinalboss_phase2_endTextCallback); - chfinalboss_phase2_setState(this, 0x11); + chfinalboss_phase2_setState(this, FINALBOSS_STATE_11_PHASE2_SPELL); } else{ - chfinalboss_phase2_setState(this, 0xE); + chfinalboss_phase2_setState(this, FINALBOSS_STATE_E_PHASE2_TRAVEL); chfinalboss_func_803880A0(this, 2000.0f); } } @@ -1242,39 +1255,39 @@ void chfinalboss_phase3_endTextCallback(ActorMarker *marker, enum asset_e text_i chfinalboss_setPhase(actor->marker, FINALBOSS_PHASE_4_JINJOS); } -void chfinalboss_phase3_setState(Actor *this, s32 arg1) { +void chfinalboss_phase3_setState(Actor *this, s32 next_state) { ActorLocal_FinalBoss *local; s32 i; local = (ActorLocal_FinalBoss *)&this->local; local->phase = 3; - subaddie_set_state_with_direction(this, arg1, 0.0001f, 1); - switch (arg1) { - case 21: - if((local->unk5 + 1) < 0x10) { - local->unk5++; - } else{ - local->unk5 = 0xC; + subaddie_set_state_with_direction(this, next_state, 0.0001f, 1); + switch (next_state) { + case FINALBOSS_STATE_15_PHASE3_TRAVEL: + if((local->unk5 + 1) < 0x10) { + local->unk5++; + } else{ + local->unk5 = 0xC; + } + this->unk1C[0] = D_803927D0[local->unk5][0]; + this->unk1C[1] = D_803927D0[local->unk5][1]; + this->unk1C[2] = D_803927D0[local->unk5][2]; + for(i = 0; i < 3; i++){ + this->unk1C[i] += randf2(-120.0f, 120.0f); + }; + break; + case FINALBOSS_STATE_18_PHASE3_FIREBALL: + local->unk3 = 0; + break; + case FINALBOSS_STATE_19_PHASE3_WEEEGH: + sfx_playFadeShorthandDefault(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000, this->position, 5000, 12000); + break; + case FINALBOSS_STATE_1A_PHASE3_BARRIER: + chfinalboss_func_80386CF8(this); + func_80324E38(0.0f, 1); + gcdialog_showDialog(randi2(0, 5) + 0x112C, 0xA8, NULL, this->marker, chfinalboss_phase3_endTextCallback, NULL); + break; } - this->unk1C[0] = D_803927D0[local->unk5][0]; - this->unk1C[1] = D_803927D0[local->unk5][1]; - this->unk1C[2] = D_803927D0[local->unk5][2]; - for(i = 0; i < 3; i++){ - this->unk1C[i] += randf2(-120.0f, 120.0f); - }; - break; - case 24: - local->unk3 = 0; - break; - case 25: - sfx_playFadeShorthandDefault(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000, this->position, 5000, 12000); - break; - case 26: - chfinalboss_func_80386CF8(this); - func_80324E38(0.0f, 1); - gcdialog_showDialog(randi2(0, 5) + 0x112C, 0xA8, NULL, this->marker, chfinalboss_phase3_endTextCallback, NULL); - break; - } } void chfinalboss_dropHealth(ActorMarker *marker) { @@ -1299,83 +1312,83 @@ void chfinalboss_phase3_update(ActorMarker *marker) { sp38 = local->hits; sp34 = anctrl_getAnimTimer(this->anctrl); switch (this->state) { - case 21: - chfinalboss_spawnBroomstickGlowParticles(this); - this->lifetime_value -= sp3C; - if (this->lifetime_value < 0.0) { - if (local->unkA) { - chfinalboss_phase3_setState(this, 0x17); - } else { - chfinalboss_phase3_setState(this, 0x16); - this->lifetime_value = D_803917B4[local->hits]; + case FINALBOSS_STATE_15_PHASE3_TRAVEL: + chfinalboss_spawnBroomstickGlowParticles(this); + this->lifetime_value -= sp3C; + if (this->lifetime_value < 0.0) { + if (local->unkA) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_17_PHASE3_TURN); + } else { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_16_PHASE3_WAIT); + this->lifetime_value = D_803917B4[local->hits]; + } + local->unkA = NOT(local->unkA); + break; } - local->unkA = NOT(local->unkA); + if (chfinalboss_flyTo(this, this->unk1C, D_803917A4[sp38], D_803917A4[sp38], 120.0f, 520.0f, 350.0f)) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_15_PHASE3_TRAVEL); + if (local->unkB == 0) { + local->unkB = 1; + timedFunc_set_1(1.2f, (GenFunction_1)chfinalboss_dropHealth, (s32) this->marker); + } + } + break; + case FINALBOSS_STATE_16_PHASE3_WAIT: + this->lifetime_value -= sp3C; + if (this->lifetime_value < 0.0) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_15_PHASE3_TRAVEL); + this->lifetime_value = 5.0f; + } + break; + case FINALBOSS_STATE_17_PHASE3_TURN: + if (chfinalboss_turnTowardPlayer(this, 9.0f) && (baiFrame_getState() != 3)) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_18_PHASE3_FIREBALL); + } + break; + case FINALBOSS_STATE_18_PHASE3_FIREBALL: + chfinalboss_turnTowardPlayer(this, 3.0f); + if (chfinalboss_throwFireball(this, 1.3f)) { + local->unk3++; + } + if (actor_animationIsAt(this, 0.9999f)) { + if (local->unk3 >= local->hits) { + if (local->hits >= 4) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_1A_PHASE3_BARRIER); + } + else{ + this->lifetime_value = 5.0f; + chfinalboss_phase3_setState(this, FINALBOSS_STATE_15_PHASE3_TRAVEL); + } + } + } + break; + case FINALBOSS_STATE_19_PHASE3_WEEEGH: + if (actor_animationIsAt(this, 0.9999f)) { + chfinalboss_phase3_setState(this, FINALBOSS_STATE_17_PHASE3_TURN); + } + break; + case FINALBOSS_STATE_1A_PHASE3_BARRIER: + if (actor_animationIsAt(this, 0.1f) != 0) { + func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 0x7FFF); + } + if ((0.1 < sp34) && (sp34 < 0.8)) { + func_8034A174(this->marker->unk44, 8, D_803928B8); + chfinalboss_createSingleSpriteParticle(D_803928B8, 0x716); + func_8034A174(this->marker->unk44, 9, D_803928B8); + chfinalboss_createSingleSpriteParticle(D_803928B8, 0x716); + } + if (actor_animationIsAt(this, 0.38f) ) { + chfinalboss_spawnSpellBarrier(this->marker); + } + if (actor_animationIsAt(this, 0.9999f)) { + func_80324D2C(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER); + chfinalboss_despawnFlightPad(); + chfinalboss_phase3_setState(this, FINALBOSS_STATE_1B_PHASE3_WAIT_FOR_TEXT); + } + break; + case FINALBOSS_STATE_1B_PHASE3_WAIT_FOR_TEXT: break; } - if (chfinalboss_func_80387470(this, this->unk1C, D_803917A4[sp38], D_803917A4[sp38], 120.0f, 520.0f, 350.0f)) { - chfinalboss_phase3_setState(this, 0x15); - if (local->unkB == 0) { - local->unkB = 1; - timedFunc_set_1(1.2f, (GenFunction_1)chfinalboss_dropHealth, (s32) this->marker); - } - } - break; - case 22: - this->lifetime_value -= sp3C; - if (this->lifetime_value < 0.0) { - chfinalboss_phase3_setState(this, 0x15); - this->lifetime_value = 5.0f; - } - break; - case 23: - if (chfinalboss_func_80386BEC(this, 9.0f) && (baiFrame_getState() != 3)) { - chfinalboss_phase3_setState(this, 0x18); - } - break; - case 24: - chfinalboss_func_80386BEC(this, 3.0f); - if (chfinalboss_func_80387340(this, 1.3f)) { - local->unk3++; - } - if (actor_animationIsAt(this, 0.9999f)) { - if (local->unk3 >= local->hits) { - if (local->hits >= 4) { - chfinalboss_phase3_setState(this, 0x1A); - } - else{ - this->lifetime_value = 5.0f; - chfinalboss_phase3_setState(this, 0x15); - } - } - } - break; - case 25: - if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase3_setState(this, 0x17); - } - break; - case 26: - if (actor_animationIsAt(this, 0.1f) != 0) { - func_80324CFC(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER, 0x7FFF); - } - if ((0.1 < sp34) && (sp34 < 0.8)) { - func_8034A174(this->marker->unk44, 8, D_803928B8); - chfinalboss_createSingleSpriteParticle(D_803928B8, 0x716); - func_8034A174(this->marker->unk44, 9, D_803928B8); - chfinalboss_createSingleSpriteParticle(D_803928B8, 0x716); - } - if (actor_animationIsAt(this, 0.38f) ) { - chfinalboss_spawnSpellBarrier(this->marker); - } - if (actor_animationIsAt(this, 0.9999f)) { - func_80324D2C(0.0f, COMUSIC_43_ENTER_LEVEL_GLITTER); - chfinalboss_despawnFlightPad(); - chfinalboss_phase3_setState(this, 0x1B); - } - break; - case 27: - break; - } } @@ -1384,7 +1397,7 @@ void chfinalboss_func_80389F54(void) { sFinalBossJinjoStatueActivated = (u8)0; } -void chfinalboss_phase4_setState(Actor *this, s32 arg1) { +void chfinalboss_phase4_setState(Actor *this, s32 next_state) { ActorLocal_FinalBoss *local; f32 sp48; f32 sp3C[3]; @@ -1400,98 +1413,98 @@ void chfinalboss_phase4_setState(Actor *this, s32 arg1) { local = (ActorLocal_FinalBoss *)&this->local; sp48 = anctrl_getAnimTimer(this->anctrl); local->phase = 4; - subaddie_set_state_with_direction(this, arg1, 0.0001f, 1); - switch (arg1) { - case 28: - anctrl_setAnimTimer(this->anctrl, sp48); - this->unk1C[0] = D_803927D0[0x10][0]; - this->unk1C[1] = D_803927D0[0x10][1]; - this->unk1C[2] = D_803927D0[0x10][2]; - break; + subaddie_set_state_with_direction(this, next_state, 0.0001f, 1); + switch (next_state) { + case FINALBOSS_STATE_1C_PHASE4_TRAVEL: + anctrl_setAnimTimer(this->anctrl, sp48); + this->unk1C[0] = D_803927D0[0x10][0]; + this->unk1C[1] = D_803927D0[0x10][1]; + this->unk1C[2] = D_803927D0[0x10][2]; + break; - case 30: - if ((local->unk3 == 2) && (local->unkA == 0)) { - iter.D_803928C4_ptr = &D_803928C4; - chFinalBossJinjoSpawned = TRUE; - gcdialog_showDialog(randi2(0, 5) + 0x1136, 4, NULL, NULL, NULL, NULL); - if ( !fileProgressFlag_get(FILEPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) ) { - local->unkA = 1U; - sFinalBossJinjoStatueActivated = 1; - func_80324E38(0.0f, 1); - timedFunc_set_1(0.0f, chfinalboss_spawnStatue, BOSSJINJO_1_ORANGE); - timed_setStaticCameraToNode(0.0f, 4); - timed_exitStaticCamera(2.2f); - timedFunc_set_1(2.2f, chfinalboss_spawnStatue, BOSSJINJO_2_GREEN); - timed_setStaticCameraToNode(2.2f, 5); - timed_exitStaticCamera(4.4f); - timedFunc_set_1(4.4f, chfinalboss_spawnStatue, BOSSJINJO_3_PINK); - timed_setStaticCameraToNode(4.4f, 6); - timed_exitStaticCamera(6.6f); - timedFunc_set_1(6.6f, chfinalboss_spawnStatue, BOSSJINJO_4_YELLOW); - timed_setStaticCameraToNode(6.6f, 7); - timed_exitStaticCamera(8.8f); - timedFunc_set_0(8.8f, chfinalboss_func_80389F54); - func_80324E38(8.8f, 0); - break; + case FINALBOSS_STATE_1E_PHASE4_FIREBALL: + if ((local->unk3 == 2) && (local->unkA == 0)) { + iter.D_803928C4_ptr = &D_803928C4; + chFinalBossJinjoSpawned = TRUE; + gcdialog_showDialog(randi2(0, 5) + 0x1136, 4, NULL, NULL, NULL, NULL); + if ( !fileProgressFlag_get(FILEPROG_D2_HAS_SPAWNED_A_JINJO_STATUE_IN_FINAL_FIGHT) ) { + local->unkA = 1U; + sFinalBossJinjoStatueActivated = 1; + func_80324E38(0.0f, 1); + timedFunc_set_1(0.0f, chfinalboss_spawnStatue, BOSSJINJO_1_ORANGE); + timed_setStaticCameraToNode(0.0f, 4); + timed_exitStaticCamera(2.2f); + timedFunc_set_1(2.2f, chfinalboss_spawnStatue, BOSSJINJO_2_GREEN); + timed_setStaticCameraToNode(2.2f, 5); + timed_exitStaticCamera(4.4f); + timedFunc_set_1(4.4f, chfinalboss_spawnStatue, BOSSJINJO_3_PINK); + timed_setStaticCameraToNode(4.4f, 6); + timed_exitStaticCamera(6.6f); + timedFunc_set_1(6.6f, chfinalboss_spawnStatue, BOSSJINJO_4_YELLOW); + timed_setStaticCameraToNode(6.6f, 7); + timed_exitStaticCamera(8.8f); + timedFunc_set_0(8.8f, chfinalboss_func_80389F54); + func_80324E38(8.8f, 0); + break; + } + + for(*iter.D_803928C4_ptr = 1; *iter.D_803928C4_ptr < 5; (*iter.D_803928C4_ptr)++){ + chfinalboss_spawnStatue(*iter.D_803928C4_ptr); + } } - - for(*iter.D_803928C4_ptr = 1; *iter.D_803928C4_ptr < 5; (*iter.D_803928C4_ptr)++){ - chfinalboss_spawnStatue(*iter.D_803928C4_ptr); - } - } - break; + break; - case 32: - func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); - __bundle_spawnFromFirstActor(BUNDLE_24__HONEYCOMB, this); - return; - case 33: - FUNC_8030E624(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000); - timed_playSfx(0.6f, SFX_61_CARTOONY_FALL, 1.0f, 32000); - SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); - FUNC_8030E624(SFX_D9_WOODEN_CRATE_BREAKING_1, 1.0f, 32000); - chfinalboss_func_80386628(this->marker, 0); - chfinalboss_createBroomstickParticles(this->position, ASSET_552_MODEL_BROOMSTICK_PIECE_HEAD, 1); - chfinalboss_createBroomstickParticles(this->position, ASSET_553_MODEL_BROOMSTICK_PIECE_SHORT, 12); - chfinalboss_createBroomstickParticles(this->position, ASSET_554_MODEL_BROOMSTICK_PIECE_LONG, 20); - chfinalboss_createBroomstickParticles(this->position, ASSET_555_MODEL_BROOMSTICK_PIECE_EYE, 2); - sp3C[0] = D_803927D0[local->mirror_phase5 + 0x11][0] - this->position[0]; - sp3C[1] = D_803927D0[local->mirror_phase5 + 0x11][1] - this->position[1]; - sp3C[2] = D_803927D0[local->mirror_phase5 + 0x11][2] - this->position[2]; - this->velocity[0] = sp3C[0] / 1.7; - this->velocity[1] = sp3C[1] / 1.7 - -1190.0; - this->velocity[2] = sp3C[2] / 1.7; - func_8028F94C(2, this->position, local); - if (local->mirror_phase5 == 0) { - timed_setStaticCameraToNode(0.0f, 0xA); - timed_exitStaticCamera(1.7f); - timed_setStaticCameraToNode(1.7f, 0xB); - } - else{ - timed_setStaticCameraToNode(0.0f, 0xC); - timed_exitStaticCamera(1.7f); - timed_setStaticCameraToNode(1.7f, 0xD); - } - break; - case 34: - actor_playAnimationOnce(this); - gcdialog_showDialog(randi2(0, 5) + 0x1145, 0x20, NULL, NULL, NULL, NULL); - gcsfx_playWithPitch(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); - gcsfx_playWithPitch(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 32000); - this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); - D_803927C0 = 1.0f; - sfxsource_setSfxId(this->unk44_31, SFX_2C_PULLING_NOISE); - sfxSource_setunk43_7ByIndex(this->unk44_31, 2); - sfxsource_playSfxAtVolume(this->unk44_31, D_803927C0); - sfxsource_setSampleRate(this->unk44_31, 26000); - for(iter.i = 0; iter.i < 4; iter.i+=1){ - if(__chFinalBossJinjoStatueMarker[iter.i] != NULL){ - marker_despawn(__chFinalBossJinjoStatueMarker[iter.i]); - __chFinalBossJinjoStatueMarker[iter.i] = NULL; + case FINALBOSS_STATE_20_PHASE4_WEEEGH: + func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); + __bundle_spawnFromFirstActor(BUNDLE_24__HONEYCOMB, this); + return; + case FINALBOSS_STATE_21_PHASE4_FALL: + FUNC_8030E624(SFX_131_GRUNTY_WEEEGH, 1.0f, 32000); + timed_playSfx(0.6f, SFX_61_CARTOONY_FALL, 1.0f, 32000); + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); + FUNC_8030E624(SFX_D9_WOODEN_CRATE_BREAKING_1, 1.0f, 32000); + chfinalboss_func_80386628(this->marker, 0); + chfinalboss_createBroomstickParticles(this->position, ASSET_552_MODEL_BROOMSTICK_PIECE_HEAD, 1); + chfinalboss_createBroomstickParticles(this->position, ASSET_553_MODEL_BROOMSTICK_PIECE_SHORT, 12); + chfinalboss_createBroomstickParticles(this->position, ASSET_554_MODEL_BROOMSTICK_PIECE_LONG, 20); + chfinalboss_createBroomstickParticles(this->position, ASSET_555_MODEL_BROOMSTICK_PIECE_EYE, 2); + sp3C[0] = D_803927D0[local->mirror_phase5 + 0x11][0] - this->position[0]; + sp3C[1] = D_803927D0[local->mirror_phase5 + 0x11][1] - this->position[1]; + sp3C[2] = D_803927D0[local->mirror_phase5 + 0x11][2] - this->position[2]; + this->velocity[0] = sp3C[0] / 1.7; + this->velocity[1] = sp3C[1] / 1.7 - -1190.0; + this->velocity[2] = sp3C[2] / 1.7; + func_8028F94C(2, this->position, local); + if (local->mirror_phase5 == 0) { + timed_setStaticCameraToNode(0.0f, 0xA); + timed_exitStaticCamera(1.7f); + timed_setStaticCameraToNode(1.7f, 0xB); } + else{ + timed_setStaticCameraToNode(0.0f, 0xC); + timed_exitStaticCamera(1.7f); + timed_setStaticCameraToNode(1.7f, 0xD); + } + break; + case FINALBOSS_STATE_22_PHASE4_LAND: + actor_playAnimationOnce(this); + gcdialog_showDialog(randi2(0, 5) + 0x1145, 0x20, NULL, NULL, NULL, NULL); + gcsfx_playWithPitch(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); + gcsfx_playWithPitch(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 32000); + this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); + D_803927C0 = 1.0f; + sfxsource_setSfxId(this->unk44_31, SFX_2C_PULLING_NOISE); + sfxSource_setunk43_7ByIndex(this->unk44_31, 2); + sfxsource_playSfxAtVolume(this->unk44_31, D_803927C0); + sfxsource_setSampleRate(this->unk44_31, 26000); + for(iter.i = 0; iter.i < 4; iter.i+=1){ + if(__chFinalBossJinjoStatueMarker[iter.i] != NULL){ + marker_despawn(__chFinalBossJinjoStatueMarker[iter.i]); + __chFinalBossJinjoStatueMarker[iter.i] = NULL; + } + } + break; } - break; - } } @@ -1503,7 +1516,7 @@ ActorMarker *chfinalboss_findCollidingJinjo(Actor *this, f32 arg1) { func_80320ED8(this->marker, arg1, 1); prop = func_8032F528(); while(prop !=NULL){ - if (prop->is_actor){ + if (prop->isActorProp){ jinjo = marker_getActor(prop->actorProp.marker); jinjo_marker_id = jinjo->marker->id; if( @@ -1553,7 +1566,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) { } if ((local->hits + 1) < 4) { local->hits++; - chfinalboss_phase4_setState(this, 0x20); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_20_PHASE4_WEEEGH); } else{ temp_t6 = marker_getActor(sp6C)->marker->id; @@ -1562,57 +1575,57 @@ void chfinalboss_phase4_update(ActorMarker *marker) { } else { local->mirror_phase5 = TRUE; } - chfinalboss_phase4_setState(this, 0x21); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_21_PHASE4_FALL); } return; } switch (this->state) { case 28: chfinalboss_spawnBroomstickGlowParticles(this); - if (chfinalboss_func_80387470(this, this->unk1C, 500.0f, 1000.0f, 140.0f, 500.0f, 120.0f)) { - chfinalboss_phase4_setState(this, 0x1D); + if (chfinalboss_flyTo(this, this->unk1C, 500.0f, 1000.0f, 140.0f, 500.0f, 120.0f)) { + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1D_PHASE4_TURN); } break; case 29: - if ((chfinalboss_func_80386BEC(this, 9.0f)) && (baiFrame_getState() != 3) && (sFinalBossJinjoStatueActivated == 0)) { - chfinalboss_phase4_setState(this, 0x1E); + if ((chfinalboss_turnTowardPlayer(this, 9.0f)) && (baiFrame_getState() != 3) && (sFinalBossJinjoStatueActivated == 0)) { + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1E_PHASE4_FIREBALL); } break; case 30: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); if (sFinalBossJinjoStatueActivated == 0) { - chfinalboss_func_80387340(this, 1.0f); + chfinalboss_throwFireball(this, 1.0f); if (actor_animationIsAt(this, 0.9999f)) { local->unk3++; - chfinalboss_phase4_setState(this, 0x1F); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1F_PHASE4_WAIT); this->lifetime_value = D_803917D0[sp70]; } } else { - chfinalboss_phase4_setState(this, 0x1D); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1D_PHASE4_TURN); } break; case 31: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); if (this->lifetime_value > 0.0) { this->lifetime_value -= sp74; break; } - if (chfinalboss_func_80386BEC(this, 3.0f)) { - chfinalboss_phase4_setState(this, 0x1E); + if (chfinalboss_turnTowardPlayer(this, 3.0f)) { + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1E_PHASE4_FIREBALL); } break; case 32: if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase4_setState(this, 0x1C); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_1C_PHASE4_TRAVEL); } break; case 33: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); sp5C[0] = this->position[0] + (this->velocity[0] * sp74); sp5C[1] = this->position[1] + (this->velocity[1] * sp74); sp5C[2] = this->position[2] + (this->velocity[2] * sp74); @@ -1622,7 +1635,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) { this->position[1] = sp5C[1]; this->position[2] = sp5C[2]; this->position[1] = temp_f2; - chfinalboss_phase4_setState(this, 0x22); + chfinalboss_phase4_setState(this, FINALBOSS_STATE_22_PHASE4_LAND); gcsfx_playWithPitch(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); gcsfx_playWithPitch(SFX_132_GRUNTY_YOW, randf2(0.95f, 1.05f), 32000); } @@ -1679,7 +1692,7 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { local->phase = 5; subaddie_set_state_with_direction(this, next_state, 0.0001f, 1); switch (next_state) { - case 35: + case FINALBOSS_STATE_23_PHASE5_SPAWN_JINJONATOR: gcdialog_showDialog(randi2(0, 5) + 0x114F, 4, NULL, NULL, NULL, NULL); if (local->mirror_phase5) { sp28 = 0x13; @@ -1692,15 +1705,15 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { func_80324E38(7.5f, 0); break; - case 36: + case FINALBOSS_STATE_24_PHASE5_TURN: chfinalboss_func_8038AC50(this->marker); break; - case 37: + case FINALBOSS_STATE_25_PHASE5_FIREBALL: local->unk3 = 0; break; - case 40: + case FINALBOSS_STATE_28_PHASE5_SHIVER1: func_802BB41C(0); if (this->unk44_31 == 0) { this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); @@ -1711,7 +1724,7 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { } break; - case 41: + case FINALBOSS_STATE_29_PHASE5_SHIVER2: this->unk7C[2] = 0; if (this->unk44_31 == 0) { this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); @@ -1723,7 +1736,7 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { } break; - case 42: + case FINALBOSS_STATE_2A_PHASE5_HIT: if (randf() < 0.5) { func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); } @@ -1732,11 +1745,11 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { } break; - case 38: + case FINALBOSS_STATE_26_PHASE5_SPELL: coMusicPlayer_playMusic(SFX_GRUNTY_SPELL_POWERUP, 30000); break; - case 43: + case FINALBOSS_STATE_2B_PHASE5_WEEEGH: func_8030E878(SFX_131_GRUNTY_WEEEGH, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); actor_playAnimationOnce(this); break; @@ -1744,7 +1757,7 @@ void chfinalboss_phase5_setState(Actor *this, s32 next_state) { } void chfinalboss_func_8038AF84(ActorMarker *arg0) { - chfinalboss_phase5_setState(marker_getActor(arg0), 0x29); + chfinalboss_phase5_setState(marker_getActor(arg0), FINALBOSS_STATE_29_PHASE5_SHIVER2); } void chfinalboss_func_8038AFB0(void) { @@ -1780,7 +1793,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { timed_exitStaticCamera(0.6f); timed_setStaticCameraToNode(0.6f, sp38 + 3 + __chFinalBossJinjonatorHits); chjinjonator_attack(jinjonator_marker, __chFinalBossJinjonatorHits, local->mirror_phase5); - chfinalboss_phase5_setState(this, 0x2A); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_2A_PHASE5_HIT); if (__chFinalBossJinjonatorHits == 9) { sp2C = 0x16; if(local->mirror_phase5) sp2C = 0x25; @@ -1794,7 +1807,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { chjinjonator_finalAttack(jinjonator_marker); func_8030E6D4(SFX_HEAVY_THUNDERSTORM_01); coMusicPlayer_playMusic(COMUSIC_A3_JINJONATOR_HITS_GRUNTY_J, 20000); - chfinalboss_phase5_setState(this, 0x2B); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_2B_PHASE5_WEEEGH); timed_exitStaticCamera(0.0f); timed_setStaticCameraToNode(0.0f, sp38 + 0xD); func_8028F85C(D_803917E0); @@ -1810,34 +1823,34 @@ void chfinalboss_phase5_update(ActorMarker *marker) { } switch (this->state) { case 35: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); break; case 36: - if (chfinalboss_func_80386BEC(this, 9.0f) && (baiFrame_getState() != 3)) { - chfinalboss_phase5_setState(this, 0x25); + if (chfinalboss_turnTowardPlayer(this, 9.0f) && (baiFrame_getState() != 3)) { + chfinalboss_phase5_setState(this, FINALBOSS_STATE_25_PHASE5_FIREBALL); } break; case 37: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); if (baiFrame_getState() == 3) { - chfinalboss_phase5_setState(this, 0x24); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_24_PHASE5_TURN); break; } - if (chfinalboss_func_80387340(this, 1.0f)) { + if (chfinalboss_throwFireball(this, 1.0f)) { local->unk3++; } if ((actor_animationIsAt(this, 0.9999f)) && (local->unk3 >= 5)) { - chfinalboss_phase5_setState(this, 0x26); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_26_PHASE5_SPELL); } break; case 38: - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); chfinalboss_func_803873DC(this, 700.0f, 2400.0f); if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase5_setState(this, 0x27); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_27_PHASE5_WAIT); this->lifetime_value = 4.0f; } break; @@ -1846,7 +1859,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { if (local->unk8) { chfinalboss_func_80386C68(this, 4.5f); } else { - chfinalboss_func_80386BEC(this, 3.0f); + chfinalboss_turnTowardPlayer(this, 3.0f); } if (this->lifetime_value > 0.0) { this->lifetime_value -= dt; @@ -1855,10 +1868,10 @@ void chfinalboss_phase5_update(ActorMarker *marker) { if (local->unk8 == 0) { if (!chFinalBossJinjonatorSpawned) { chFinalBossJinjonatorSpawned = TRUE; - chfinalboss_phase5_setState(this, 0x23); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_23_PHASE5_SPAWN_JINJONATOR); } else{ - chfinalboss_phase5_setState(this, 0x25); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_25_PHASE5_FIREBALL); } } break; @@ -1871,7 +1884,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { sfxSource_func_8030E2C4(this->unk44_31); } if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase5_setState(this, 0x27); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_27_PHASE5_WAIT); sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; } @@ -1895,7 +1908,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { case 42: if (actor_animationIsAt(this, 0.9999f)) { - chfinalboss_phase5_setState(this, 0x27); + chfinalboss_phase5_setState(this, FINALBOSS_STATE_27_PHASE5_WAIT); } break; @@ -1919,7 +1932,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { FUNC_8030E624(SFX_130_GRUNTY_ECHOING_CRY, 1.0f, 32000); } if (actor_animationIsAt(this, 0.85f)) { - chfinalboss_func_803872F8(this); + chfinalboss_throwFinalSpell(this); } if (actor_animationIsAt(this, 0.9f)) { ncStaticCamera_exit(); @@ -1974,35 +1987,35 @@ bool chfinalboss_func_8038B834(ActorMarker *marker, ActorMarker *other_marker) { switch (local->phase) { case FINALBOSS_PHASE_1_BROOMSTICK: - if ((this->state == 6) || (this->state == 7)) { - marker->id = 0x260; + if ((this->state == FINALBOSS_STATE_6_PHASE1_SWOOP_MID) || (this->state == FINALBOSS_STATE_7_PHASE1_SWOOP_END)) { + marker->id = MARKER_260_GRUNTY_PHASE_1_2_MOVING; } else { - marker->id = 0x25E; + marker->id = MARKER_25E_GRUNTILDA_FINAL_BOSS_VULNERABLE; } break; case FINALBOSS_PHASE_2_AIR: if (local->unkA == 0) { - marker->id = 0x260; + marker->id = MARKER_260_GRUNTY_PHASE_1_2_MOVING; } else { - marker->id = 0x281; + marker->id = MARKER_281_GRUNTY_PHASE_2_VULNERABLE; } break; case FINALBOSS_PHASE_3_FLIGHT: - marker->id = 0x282; + marker->id = MARKER_282_GRUNTY_PHASE_3_FLIGHT; break; case FINALBOSS_PHASE_4_JINJOS: - marker->id = 0x283; + marker->id = MARKER_283_GRUNTY_PHASE_4_5_INVULNERABLE; break; case FINALBOSS_PHASE_5_JINJONATOR: - marker->id = 0x283; + marker->id = MARKER_283_GRUNTY_PHASE_4_5_INVULNERABLE; break; default: - marker->id = MARKER_25E_GRUNTILDA_FINAL_BOSS; + marker->id = MARKER_25E_GRUNTILDA_FINAL_BOSS_VULNERABLE; break; } @@ -2016,47 +2029,47 @@ void chfinalboss_collisionPassive(ActorMarker *marker, ActorMarker *other_marker this = marker_getActor(marker); local = (ActorLocal_FinalBoss *)&this->local; switch (local->phase) { - case 1: - if (local->hits == 0) { - gcdialog_showDialog(randi2(0, 5) + 0x10F7, 0x20, NULL, NULL, NULL, NULL); - } - if ((local->hits + 1) < 5) { - local->hits++; - chfinalboss_phase1_setState(this, 0xD); - local->unk4 = 0; - } - break; + case 1: + if (local->hits == 0) { + gcdialog_showDialog(randi2(0, 5) + 0x10F7, 0x20, NULL, NULL, NULL, NULL); + } + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase1_setState(this, FINALBOSS_STATE_D_PHASE1_HIT); + local->unk4 = 0; + } + break; - case 2: - if (this->state != 0x14) { - if ((local->unk2 + 1) >= 3) { - local->unk2 = 0; - if (local->hits == 0) { - gcdialog_showDialog(randi2(0, 5) + 0x1110, 0x20, NULL, NULL, NULL, NULL); + case 2: + if (this->state != 0x14) { + if ((local->unk2 + 1) >= 3) { + local->unk2 = 0; + if (local->hits == 0) { + gcdialog_showDialog(randi2(0, 5) + 0x1110, 0x20, NULL, NULL, NULL, NULL); + } + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase2_setState(this, FINALBOSS_STATE_14_PHASE2_HIT_WEEEGH); + } + } else { + local->unk2++; + chfinalboss_phase2_setState(this, FINALBOSS_STATE_13_PHASE2_HIT_OW); } - if ((local->hits + 1) < 5) { - local->hits++; - chfinalboss_phase2_setState(this, 0x14); + } + break; + case 3: + if (local->hits == 0) { + gcdialog_showDialog(randi2(0, 5) + 0x1127, 0x20, NULL, NULL, NULL, NULL); + } + if ((local->hits + 1) < 5) { + local->hits++; + chfinalboss_phase3_setState(this, FINALBOSS_STATE_19_PHASE3_WEEEGH); + if (local->hits == 4) { + SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); } - } else { - local->unk2++; - chfinalboss_phase2_setState(this, 0x13); } + break; } - break; - case 3: - if (local->hits == 0) { - gcdialog_showDialog(randi2(0, 5) + 0x1127, 0x20, NULL, NULL, NULL, NULL); - } - if ((local->hits + 1) < 5) { - local->hits++; - chfinalboss_phase3_setState(this, 0x19); - if (local->hits == 4) { - SPAWNQUEUE_ADD_1(__chfinalboss_dropHealth, this->marker); - } - } - break; - } } void chfinalboss_collisionActive(ActorMarker *marker, ActorMarker *other_marker) { @@ -2214,7 +2227,7 @@ void chfinalboss_spellBarrierInactive() { } void chfinalboss_func_8038C10C(s32 arg0) { - chfinalboss_phase5_setState(marker_getActor((ActorMarker*)arg0), 0x28); + chfinalboss_phase5_setState(marker_getActor((ActorMarker*)arg0), FINALBOSS_STATE_28_PHASE5_SHIVER1); } void chfinalboss_func_8038C138() { @@ -2240,7 +2253,7 @@ void chfinalboss_setBossDefeated(void) { if (sp48->mirror_phase5 != 0) { camera_node = 0x23; } - chfinalboss_phase5_setState(sp4C, 0x27); + chfinalboss_phase5_setState(sp4C, FINALBOSS_STATE_27_PHASE5_WAIT); sp48->unk8 = (u8)1; func_80324E38(0, 1); timed_setStaticCameraToNode(0, camera_node); diff --git a/src/fight/chgreenblast.c b/src/fight/chgreenblast.c index 9b1acb10..ebdb1e08 100644 --- a/src/fight/chgreenblast.c +++ b/src/fight/chgreenblast.c @@ -97,7 +97,7 @@ void chGreenBlast_update(Actor *this) { player_getPosition(target_position); target_position[1] += 50.0f; - chfinalboss_func_80387470(this, target_position, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f); + chfinalboss_flyTo(this, target_position, this->unk1C[0], this->unk1C[1], 0.0f, 1400.0f, 70.0f); if (func_8028F25C()) { chGreenBlast_collisionDie(this->marker, 0); diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index 29505d55..a4bd2e64 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -276,7 +276,7 @@ void chjinjonator_update(Actor *this){ chjinjonator_spawnSparkleParticles(this); chfinalboss_getPosition(local->position_finalboss); local->position_finalboss[1] += 100.0f; - chfinalboss_func_80387470(this, local->position_finalboss, sp50*2400.0f, sp50*2400.0f*4.2, 170.0f, sp50*2500.0f, 0.0f); + chfinalboss_flyTo(this, local->position_finalboss, sp50*2400.0f, sp50*2400.0f*4.2, 170.0f, sp50*2500.0f, 0.0f); break; case JINJONATOR_STATE_8: @@ -355,7 +355,7 @@ void chjinjonator_update(Actor *this){ chjinjonator_spawnSparkleParticles(this); chfinalboss_getPosition(local->position_finalboss); local->position_finalboss[1] += 100.0f; - chfinalboss_func_80387470(this, local->position_finalboss, sp48*2400.0f, sp48*2400.0f*4.2, 170.0f, sp48*2500.0f, 0.0f); + chfinalboss_flyTo(this, local->position_finalboss, sp48*2400.0f, sp48*2400.0f*4.2, 170.0f, sp48*2500.0f, 0.0f); break; } diff --git a/src/fight/fight.h b/src/fight/fight.h index 4c6e5688..5ceddb29 100644 --- a/src/fight/fight.h +++ b/src/fight/fight.h @@ -57,6 +57,57 @@ enum ch_finalboss_phase_e { FINALBOSS_PHASE_5_JINJONATOR }; +enum ch_finalboss_state_e { + FINALBOSS_STATE_1_PHASE0_INTRO = 1, + + FINALBOSS_STATE_2_PHASE1_TRAVEL1, + FINALBOSS_STATE_3_PHASE1_TRAVEL2, + FINALBOSS_STATE_4_PHASE1_TURN, + FINALBOSS_STATE_5_PHASE1_SWOOP_START, + FINALBOSS_STATE_6_PHASE1_SWOOP_MID, + FINALBOSS_STATE_7_PHASE1_SWOOP_END, + FINALBOSS_STATE_8_PHASE1_BREAKING, + FINALBOSS_STATE_9_PHASE1_BROKEN, + FINALBOSS_STATE_A_PHASE1_FIREBALL, + FINALBOSS_STATE_B_PHASE1_WAIT_FOR_TEXT, + FINALBOSS_STATE_C_PHASE1_SPELL, + FINALBOSS_STATE_D_PHASE1_HIT, + + FINALBOSS_STATE_E_PHASE2_TRAVEL, + FINALBOSS_STATE_F_PHASE2_TURN, + FINALBOSS_STATE_10_PHASE2_FIREBALL, + FINALBOSS_STATE_11_PHASE2_SPELL, + FINALBOSS_STATE_12_PHASE2_WAIT, + FINALBOSS_STATE_13_PHASE2_HIT_OW, + FINALBOSS_STATE_14_PHASE2_HIT_WEEEGH, + + FINALBOSS_STATE_15_PHASE3_TRAVEL, + FINALBOSS_STATE_16_PHASE3_WAIT, + FINALBOSS_STATE_17_PHASE3_TURN, + FINALBOSS_STATE_18_PHASE3_FIREBALL, + FINALBOSS_STATE_19_PHASE3_WEEEGH, + FINALBOSS_STATE_1A_PHASE3_BARRIER, + FINALBOSS_STATE_1B_PHASE3_WAIT_FOR_TEXT, + + FINALBOSS_STATE_1C_PHASE4_TRAVEL, + FINALBOSS_STATE_1D_PHASE4_TURN, + FINALBOSS_STATE_1E_PHASE4_FIREBALL, + FINALBOSS_STATE_1F_PHASE4_WAIT, + FINALBOSS_STATE_20_PHASE4_WEEEGH, + FINALBOSS_STATE_21_PHASE4_FALL, + FINALBOSS_STATE_22_PHASE4_LAND, + + FINALBOSS_STATE_23_PHASE5_SPAWN_JINJONATOR, + FINALBOSS_STATE_24_PHASE5_TURN, + FINALBOSS_STATE_25_PHASE5_FIREBALL, + FINALBOSS_STATE_26_PHASE5_SPELL, + FINALBOSS_STATE_27_PHASE5_WAIT, + FINALBOSS_STATE_28_PHASE5_SHIVER1, + FINALBOSS_STATE_29_PHASE5_SHIVER2, + FINALBOSS_STATE_2A_PHASE5_HIT, + FINALBOSS_STATE_2B_PHASE5_WEEEGH +}; + enum ch_spellbarrier_state_e { SPELLBARRIER_STATE_0_UNKNOWN, SPELLBARRIER_STATE_1_UNKNOWN @@ -113,7 +164,7 @@ extern void chfinalboss_func_80387110(ActorMarker *marker, f32 arg1[3], f32 arg2 extern void chfinalboss_func_803872F8(Actor *arg0); extern s32 chfinalboss_func_80387340(Actor *this, f32 arg1); extern void chfinalboss_func_803873DC(Actor *actor, f32 arg1, f32 arg2); -extern bool chfinalboss_func_80387470(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6); +extern bool chfinalboss_flyTo(Actor *this, f32 arg1[3], f32 v_max, f32 arg3, f32 arg4, f32 arg5, f32 arg6); extern void chfinalboss_func_8038770C(Actor *actor); extern void chfinalboss_setPhase(ActorMarker *this, enum ch_finalboss_phase_e phase_id); extern void chfinalboss_func_80387ACC(Actor *arg0, f32 arg1); diff --git a/src/lair/ch/brentilda.c b/src/lair/ch/brentilda.c index e7a68496..310a7766 100644 --- a/src/lair/ch/brentilda.c +++ b/src/lair/ch/brentilda.c @@ -15,7 +15,12 @@ ActorAnimationInfo chBrentildaAnimations[] ={ {0x26C, 4.0f}, {0x26B, 4.0f}, }; -ActorInfo chBrentilda = { 0x1E0, 0x348, 0x539, 0x1, chBrentildaAnimations, chBrentilda_update, actor_update_func_80326224, actor_draw, 2000, 0, 2.0f, 0}; +ActorInfo chBrentilda = { + MARKER_1E0_BRENTILDA, ACTOR_348_BRENTILDA, ASSET_539_MODEL_BRENTILDA, + 0x1, chBrentildaAnimations, + chBrentilda_update, actor_update_func_80326224, actor_draw, + 2000, 0, 2.0f, 0 +}; /* .code */ void func_8038BA30(ActorMarker *marker, enum asset_e text_id, s32 arg2){ diff --git a/src/lair/ch/cauldron.c b/src/lair/ch/cauldron.c index 9ea63ca5..1a9fd044 100644 --- a/src/lair/ch/cauldron.c +++ b/src/lair/ch/cauldron.c @@ -102,10 +102,10 @@ void func_8038A730(Actor *this, f32 *arg1, enum sfx_e arg2, enum sfx_e arg3, u32 void lair_func_8038A864(Actor *this) { switch (this->state) { case 2: - func_8038A730(this, D_80393670, SFX_3F_CAULDRON_SQEAK_1, SFX_40_CAULDRON_SQEAK_2, 11000); + func_8038A730(this, D_80393670, SFX_3F_CAULDRON_SQUEAK_1, SFX_40_CAULDRON_SQUEAK_2, 11000); break; case 3: - func_8038A730(this, D_80393688, SFX_3F_CAULDRON_SQEAK_1, SFX_40_CAULDRON_SQEAK_2, 11000); + func_8038A730(this, D_80393688, SFX_3F_CAULDRON_SQUEAK_1, SFX_40_CAULDRON_SQUEAK_2, 11000); break; case 5: if (actor_animationIsAt(this, 0.5f)) { @@ -117,7 +117,7 @@ void lair_func_8038A864(Actor *this) { } break; case 4: - func_8038A730(this, D_803936A8, SFX_3F_CAULDRON_SQEAK_1, SFX_40_CAULDRON_SQEAK_2, 11000); + func_8038A730(this, D_803936A8, SFX_3F_CAULDRON_SQUEAK_1, SFX_40_CAULDRON_SQUEAK_2, 11000); break; } } diff --git a/src/lair/code_0.c b/src/lair/code_0.c index eab212a3..0f86ca28 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -80,7 +80,7 @@ extern ActorInfo D_80394980; extern ActorInfo D_80394C28; extern ActorInfo D_80394C4C; extern ActorInfo D_80394C70; -extern ActorInfo D_80394D20; +extern ActorInfo gChActorFurnaceFunPickPrice; extern ActorInfo D_80394CF0; extern ActorInfo D_80394C94; @@ -115,53 +115,335 @@ ActorAnimationInfo D_80392CB0[] = { {0x271, 3.0f}, {0x271, 1e+08f} }; -ActorInfo lair_D_80392D90 = { 0x270, 0x2D8, 0x3B2, 0x1, NULL, func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80392DB4 = { 0x110, 0x214, 0x4AB, 0x1, D_80392CB0, func_803896D4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392DD8 = { 0x113, 0x217, 0x4A9, 0x1, D_80392CB0, func_803896F4, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392DFC = { 0x115, 0x219, 0x4AA, 0x1, D_80392CB0, func_80389714, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392E20 = { 0x11B, 0x221, 0x4B5, 0x1, D_80392CB0, func_80389734, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392E44 = { 0x11C, 0x222, 0x4B2, 0x1, D_80392CB0, func_8038975C, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392E68 = { 0x11D, 0x223, 0x4B0, 0x1, D_80392CB0, func_80389784, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392E8C = { 0x232, 0x23C, 0x4B8, 0x1, D_80392CB0, func_803897AC, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392EB0 = { 0x23F, 0x246, 0x534, 0x1, D_80392CB0, func_80386D20, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392ED4 = { 0x241, 0x248, 0x540, 0x1, D_80392CB0, func_80386780, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392EF8 = { MARKER_109_BREAKABLE_BRICK_WALL, ACTOR_20D_BREAKABLE_BRICK_WALL, ASSET_4A1_MODEL_BREAKABLE_BRICK_WALL, 0x1, D_80392CB0, lair_func_80386550, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0x85}; -ActorInfo D_80392F1C = { 0x264, 0x2E5, 0x550, 0x19, D_80392CB0, func_80388524, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80392F40 = { MARKER_224_BREAKABLE_FLOOR_COBWEB, ACTOR_230_BREAKABLE_FLOOR_COBWEB, ASSET_4BF_MODEL_FLOOR_COBWEB, 0xB, D_80392CB0, chFloorCobweb_update, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0x88}; -ActorInfo D_80392F64 = { MARKER_225_BREAKABLE_WALL_COBWEB, ACTOR_231_BREAKABLE_WALL_COBWEB, ASSET_4D5_MODEL_WALL_COBWEB, 0xE, D_80392CB0, chWallCobweb_update, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0x88}; -ActorInfo D_80392F88 = { 0x111, 0x215, 0x4A4, 0x1, NULL, func_80388FC8, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80392FAC = { 0x112, 0x216, 0x4A5, 0x1, NULL, func_80388FC8, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80392FD0 = { 0x114, 0x218, 0x4A6, 0x1, NULL, lair_func_80389204, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80392FF4 = { 0x10D, 0x211, 0x4A3, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80393018 = { 0x22C, 0x23A, 0x4D9, 0x1, NULL, func_803882B0, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_8039303C = { 0x164, 0x259, 0x507, 0x1, NULL, func_803880BC, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80393060 = { 0x165, 0x25A, 0x508, 0x1, NULL, func_8038824C, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80393084 = { MARKER_240_LAIR_SWITCH_FLIGHT_PAD, 0x247, 0x48A, 0x1, NULL, func_80386D78, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_803930A8 = { 0x242, 0x249, 0x2DD, 0x1, NULL, func_803867A8, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_803930CC = { 0x11F, 0x225, 0x4B3, 0x1, NULL, func_8038A064, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_803930F0 = { 0x10A, 0x20E, 0x4A2, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_80393114 = { 0x11A, 0x220, 0x4B7, 0x1, NULL, func_80389FF4, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x91}; -ActorInfo D_80393138 = { 0x11E, 0x224, 0x4AF, 0x1, NULL, func_8038A014, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x83}; -ActorInfo D_8039315C = { 0x227, 0x234, 0x4D6, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x93}; -ActorInfo D_80393180 = { 0x228, 0x235, 0x4D7, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8B}; -ActorInfo D_803931A4 = { 0x229, 0x236, 0x4D8, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8B}; -ActorInfo D_803931C8 = { MARKER_121_GLASS_EYE, ACTOR_227_GLASS_EYE, ASSET_4BD_MODEL_GLASS_EYE, 0x1, NULL, func_8038A034, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0x89}; -ActorInfo D_803931EC = { 0x116, 0x21A, 0x4AC, 0x1, NULL, func_803893B8, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x82}; -ActorInfo D_80393210 = { 0x117, 0x21B, 0x4AD, 0x1, NULL, lair_func_803894B0, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x82}; -ActorInfo D_80393234 = { 0x10B, 0x20F, 0x4B4, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x90}; -ActorInfo D_80393258 = { 0x10C, 0x210, 0x4AE, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x84}; -ActorInfo D_8039327C = { 0x10E, 0x212, 0x4A7, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x7F}; -ActorInfo D_803932A0 = { 0x120, 0x226, 0x4BC, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x87}; -ActorInfo D_803932C4 = { 0x122, ACTOR_228_MMM_ENTRANCE_DOOR, 0x4BE, 0x1, NULL, func_80388524, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8C}; -ActorInfo D_803932E8 = { 0x10F, 0x213, 0x4A8, 0x1, NULL, func_803875F0, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x80}; -ActorInfo D_8039330C = { 0x118, 0x21E, 0x4B1, 0x1, NULL, lair_func_8038A084, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x8F}; -ActorInfo D_80393330 = { 0x119, 0x21F, 0x4B6, 0x1, NULL, func_8038A0A4, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0x92}; -ActorInfo D_80393354 = { 0x266, 0x2E3, 0x563, 0x1, NULL, func_803870DC, actor_update_func_80326224, lair_func_80387560, 0, 0, 0.0f, 0}; -ActorInfo D_80393378 = { 0x17D, 0x1E1, 0x517, 0x1, NULL, func_80389D08, actor_update_func_80326224, func_80389E10, 0, 0, 0.0f, 0x8D}; -ActorInfo D_8039339C = { 0x234, 0x23E, 0x4E1, 0x12, D_80392CB0, func_8038982C, actor_update_func_80326224, actor_drawFullDepth, 0, 0, 0.0f, 0}; -ActorInfo D_803933C0 = { 0x163, 0x258, 0x511, 0x12, D_80392CB0, func_80389898, actor_update_func_80326224, func_8038664C, 0, 0, 0.0f, 0x8E}; -ActorInfo D_803933E4 = { 0x160, 0x255, 0x509, 0x15, D_80392CB0, func_80389934, actor_update_func_80326224, actor_draw, 0, 0, 0.0f, 0}; -ActorInfo D_80393408 = { 0x102, 0x203, 0x491, 0x1, D_80392CB0, func_80387730, actor_update_func_80326224, func_80387DA8, 0, 0, 0.0f, 0}; +ActorInfo lair_D_80392D90 = { + 0x270, 0x2D8, ASSET_3B2_MODEL_TWO_ICE_POLES_NEAR_CHEATO_3, + 0x1, NULL, + func_802D3D54, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392DB4 = { + 0x110, 0x214, ASSET_4AB_MODEL_RAISE_GRATE_TO_BGS_PUZZLE_SWITCH, + 0x1, D_80392CB0, + func_803896D4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392DD8 = { + 0x113, 0x217, ASSET_4A9_MODEL_RAISE_PIPE_TO_CC_ENTRANCE_SWITCH, + 0x1, D_80392CB0, + func_803896F4, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392DFC = { + 0x115, 0x219, ASSET_4AA_MODEL_RAISE_PIPE_TO_BRENTILDA_SWITCH, + 0x1, D_80392CB0, + func_80389714, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392E20 = { + 0x11B, 0x221, ASSET_4B5_MODEL_LEVEL_1_WATER_SWITCH, + 0x1, D_80392CB0, + func_80389734, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392E44 = { + 0x11C, 0x222, ASSET_4B2_MODEL_LEVEL_2_WATER_SWITCH, + 0x1, D_80392CB0, + func_8038975C, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392E68 = { + 0x11D, 0x223, ASSET_4B0_MODEL_LEVEL_3_WATER_SWITCH, + 0x1, D_80392CB0, + func_80389784, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392E8C = { + 0x232, 0x23C, ASSET_4B8_MODEL_CCW_PUZZLE_SWITCH, + 0x1, D_80392CB0, + func_803897AC, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392EB0 = { + 0x23F, 0x246, ASSET_534_MODEL_FLIGHT_PAD_SWITCH, + 0x1, D_80392CB0, + func_80386D20, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392ED4 = { + 0x241, 0x248, ASSET_540_MODEL_SHOCK_JUMP_PAD_SWITCH, + 0x1, D_80392CB0, + func_80386780, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392EF8 = { + MARKER_109_BREAKABLE_BRICK_WALL, ACTOR_20D_BREAKABLE_BRICK_WALL, ASSET_4A1_MODEL_BREAKABLE_BRICK_WALL, + 0x1, D_80392CB0, + lair_func_80386550, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0x85 +}; + +ActorInfo D_80392F1C = { + 0x264, 0x2E5, ASSET_550_MODEL_LARGE_DOOR_TO_FINAL_BATTLE, + 0x19, D_80392CB0, + func_80388524, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392F40 = { + MARKER_224_BREAKABLE_FLOOR_COBWEB, ACTOR_230_BREAKABLE_FLOOR_COBWEB, ASSET_4BF_MODEL_FLOOR_COBWEB, + 0xB, D_80392CB0, + chFloorCobweb_update, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0x88 +}; + +ActorInfo D_80392F64 = { + MARKER_225_BREAKABLE_WALL_COBWEB, ACTOR_231_BREAKABLE_WALL_COBWEB, ASSET_4D5_MODEL_WALL_COBWEB, + 0xE, D_80392CB0, + chWallCobweb_update, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0x88 +}; + +ActorInfo D_80392F88 = { + 0x111, 0x215, ASSET_4A4_MODEL_GL_CC_ENTRANCE_LONG_PIPE_GREEN, + 0x1, NULL, + func_80388FC8, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392FAC = { + 0x112, 0x216, ASSET_4A5_MODEL_GL_CC_ENTRANCE_LONG_PIPE_BLUE, + 0x1, NULL, + func_80388FC8, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392FD0 = { + 0x114, 0x218, ASSET_4A6_MODEL_GL_CC_ENTRANCE_SHORT_PIPE, + 0x1, NULL, + lair_func_80389204, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80392FF4 = { + 0x10D, 0x211, ASSET_4A3_MODEL_GL_TTC_ENTRANCE_CHEST_LID, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393018 = { + 0x22C, 0x23A, ASSET_4D9_MODEL_GL_ADVENT_CALENDAR_HATCH_DOOR, + 0x1, NULL, + func_803882B0, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_8039303C = { + MARKER_164_GL_GRUNTY_FLOOR_PICTURE_EYE_1, 0x259, ASSET_507_MODEL_GL_GRUNTY_FLOOR_PICTURE_EYE_1, + 0x1, NULL, + func_803880BC, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393060 = { + MARKER_165_GL_GRUNTY_FLOOR_PICTURE_EYE_2, 0x25A, ASSET_508_MODEL_GL_GRUNTY_FLOOR_PICTURE_EYE_2, + 0x1, NULL, + func_8038824C, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393084 = { + MARKER_240_LAIR_SWITCH_FLIGHT_PAD, 0x247, ASSET_48A_MODEL_FLIGHT_PAD, + 0x1, NULL, + func_80386D78, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_803930A8 = { + 0x242, 0x249, ASSET_2DD_MODEL_SHOCK_JUMP_PAD, + 0x1, NULL, + func_803867A8, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_803930CC = { + 0x11F, 0x225, ASSET_4B3_MODEL_RAREWARE_BOX, + 0x1, NULL, + func_8038A064, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_803930F0 = { + 0x10A, 0x20E, ASSET_4A2_MODEL_GL_MM_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393114 = { + MARKER_11A_GRATE_TO_RBB_PUZZLE, 0x220, ASSET_4B7_MODEL_GRATE_TO_RBB_PUZZLE, + 0x1, NULL, + func_80389FF4, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x91 +}; + +ActorInfo D_80393138 = { + MARKER_11E_ICE_BALL_TO_CHEATO, 0x224, ASSET_4AF_MODEL_ICE_BALL_TO_CHEATO, + 0x1, NULL, + func_8038A014, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x83 +}; + +ActorInfo D_8039315C = { + 0x227, 0x234, ASSET_4D6_MODEL_GL_CCW_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x93 +}; + +ActorInfo D_80393180 = { + 0x228, 0x235, ASSET_4D7_MODEL_GL_FP_DOOR_ENTRANCE_LEFT, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x8B +}; + +ActorInfo D_803931A4 = { + 0x229, 0x236, ASSET_4D8_MODEL_GL_FP_DOOR_ENTRANCE_LEFT, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x8B +}; + +ActorInfo D_803931C8 = { + MARKER_121_GLASS_EYE, ACTOR_227_GLASS_EYE, ASSET_4BD_MODEL_GLASS_EYE, + 0x1, NULL, + func_8038A034, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0x89 +}; + +ActorInfo D_803931EC = { + 0x116, 0x21A, ASSET_4AC_MODEL_IRON_BARS_UNDER_GRUNTY_STATUE, + 0x1, NULL, + func_803893B8, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x82 +}; + +ActorInfo D_80393210 = { + 0x117, 0x21B, ASSET_4AD_MODEL_GRUNTY_STATUE_BREAKABLE_HAT_TOP, + 0x1, NULL, + lair_func_803894B0, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x82 +}; + +ActorInfo D_80393234 = { + 0x10B, 0x20F, ASSET_4B4_MODEL_GL_RBB_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x90 +}; + +ActorInfo D_80393258 = { + 0x10C, 0x210, ASSET_4AE_MODEL_GL_BGS_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x84 +}; + +ActorInfo D_8039327C = { + 0x10E, 0x212, ASSET_4A7_MODEL_GL_CC_IRON_BARS_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x7F +}; + +ActorInfo D_803932A0 = { + 0x120, 0x226, ASSET_4BC_MODEL_GL_GV_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x87 +}; + +ActorInfo D_803932C4 = { + 0x122, ACTOR_228_MMM_ENTRANCE_DOOR, ASSET_4BE_MODEL_GL_MMM_DOOR_ENTRANCE, + 0x1, NULL, + func_80388524, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x8C +}; + +ActorInfo D_803932E8 = { + 0x10F, 0x213, ASSET_4A8_MODEL_GL_BGS_PUZZLE_GRATE, + 0x1, NULL, + func_803875F0, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x80 +}; + +ActorInfo D_8039330C = { + MARKER_118_GRATE_TO_LEVEL_3_WATER_SWITCH, 0x21E, ASSET_4B1_MODEL_GRATE_TO_LEVEL_3_WATER_SWITCH, + 0x1, NULL, + lair_func_8038A084, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x8F +}; + +ActorInfo D_80393330 = { + MARKER_119_GRATE_BETWEEN_MMM_AND_RBB_PUZZLES, 0x21F, ASSET_4B6_MODEL_GRATE_BETWEEN_MMM_AND_RBB_PUZZLES, + 0x1, NULL, + func_8038A0A4, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0x92 +}; + +ActorInfo D_80393354 = { + 0x266, 0x2E3, ASSET_563_MODEL_LEVEL_ENTRY_SIGNS, + 0x1, NULL, + func_803870DC, actor_update_func_80326224, lair_func_80387560, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393378 = { + MARKER_17D_IRON_GATE_NO_LOCK, 0x1E1, ASSET_517_MODEL_IRON_GATE_NO_LOCK, + 0x1, NULL, + func_80389D08, actor_update_func_80326224, func_80389E10, + 0, 0, 0.0f, 0x8D +}; + +ActorInfo D_8039339C = { + 0x234, 0x23E, ASSET_4E1_MODEL_GL_WOODEN_COFFIN_NO_LID, + 0x12, D_80392CB0, + func_8038982C, actor_update_func_80326224, actor_drawFullDepth, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_803933C0 = { + MARKER_163_CRYPT_COFFIN_LID, 0x258, ASSET_511_MODEL_CRYPT_COFFIN_LID, + 0x12, D_80392CB0, + func_80389898, actor_update_func_80326224, func_8038664C, + 0, 0, 0.0f, 0x8E +}; + +ActorInfo D_803933E4 = { + MARKER_160_GL_SARCOPHAGUS, 0x255, ASSET_509_MODEL_GL_SARCOPHAGUS, + 0x15, D_80392CB0, + func_80389934, actor_update_func_80326224, actor_draw, + 0, 0, 0.0f, 0 +}; + +ActorInfo D_80393408 = { + MARKER_102_NOTE_DOOR, ACTOR_203_NOTE_DOOR, ASSET_491_MODEL_NOTE_DOOR, + 0x1, D_80392CB0, + func_80387730, actor_update_func_80326224, func_80387DA8, + 0, 0, 0.0f, 0 +}; + ParticleScaleAndLifetimeRanges D_8039342C = { {0.31f, 0.37f}, {0.17f, 0.22f}, @@ -980,7 +1262,7 @@ void func_80388450(Actor *actor1, Actor *actor2) f32 vec1[3]; f32 vec2[3]; void *actor3 = nodeprop_findByActorIdAndActorPosition(0x22A, actor1); - s32 val = nodeprop_getYaw(actor3); + s32 val = nodeProp_getYaw(actor3); actor2->yaw = val; actor1->yaw = val; @@ -1039,7 +1321,7 @@ void func_80388524(Actor *this) { } break; - case ACTOR_211_TCC_ENTRANCE_CHEST_LID: //L803886F0 + case ACTOR_211_TTC_ENTRANCE_CHEST_LID: //L803886F0 if (!fileProgressFlag_get(FILEPROG_32_TTC_OPEN) && jigsawPicture_isJigsawPictureComplete(2)) { fileProgressFlag_set(FILEPROG_32_TTC_OPEN, TRUE); } @@ -1109,7 +1391,7 @@ void func_80388524(Actor *this) { this->unk1C[1] = this->position[1] + 365.0f; break; - case ACTOR_211_TCC_ENTRANCE_CHEST_LID://L80388948 + case ACTOR_211_TTC_ENTRANCE_CHEST_LID://L80388948 if(fileProgressFlag_get(FILEPROG_32_TTC_OPEN)){ this->pitch = 90.0f; } @@ -1909,7 +2191,7 @@ void lair_func_8038A0C4(void) spawnableActorList_add(&D_80394C28, actor_new, ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&D_80394C4C, actor_new, ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&D_80394C70, actor_new, ACTOR_FLAG_UNKNOWN_10); - spawnableActorList_add(&D_80394D20, actor_new, ACTOR_FLAG_NONE); + spawnableActorList_add(&gChActorFurnaceFunPickPrice, actor_new, ACTOR_FLAG_NONE); spawnableActorList_add(&D_80394CF0, actor_new, ACTOR_FLAG_UNKNOWN_3 | ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_19); spawnableActorList_add(&D_80394C94, actor_new, ACTOR_FLAG_UNKNOWN_8 | ACTOR_FLAG_UNKNOWN_10); spawnableActorList_add(&D_80393354, actor_new, ACTOR_FLAG_UNKNOWN_1 | ACTOR_FLAG_UNKNOWN_9 | ACTOR_FLAG_UNKNOWN_10 | ACTOR_FLAG_UNKNOWN_15); diff --git a/src/lair/code_9C40.c b/src/lair/code_9C40.c index 50537bbe..c686d526 100644 --- a/src/lair/code_9C40.c +++ b/src/lair/code_9C40.c @@ -10,9 +10,26 @@ ActorAnimationInfo D_80394860[] = { {0, 0.0f}, {0x272, 0.8f} }; -ActorInfo D_80394870 = { 0x16D, 0x1D5, 0x54F, 0x1, D_80394860, func_803902B8, actor_update_func_80326224, func_80390030, 2500, 0, 1.2f, 0}; -ActorInfo D_80394894 = { 0x16E, 0x1D6, 0x54F, 0x1, D_80394860, func_803902B8, actor_update_func_80326224, func_80390030, 2500, 0, 1.2f, 0}; -ActorInfo D_803948B8 = { 0x16F, 0x1D7, 0x54F, 0x1, D_80394860, func_803902B8, actor_update_func_80326224, func_80390030, 2500, 0, 1.2f, 0}; +ActorInfo D_80394870 = { + MARKER_16D_CHEATO_1, 0x1D5, ASSET_54F_MODEL_CHEATO, + 0x1, D_80394860, + func_803902B8, actor_update_func_80326224, func_80390030, + 2500, 0, 1.2f, 0 +}; + +ActorInfo D_80394894 = { + MARKER_16E_CHEATO_2, 0x1D6, ASSET_54F_MODEL_CHEATO, + 0x1, D_80394860, + func_803902B8, actor_update_func_80326224, func_80390030, + 2500, 0, 1.2f, 0 +}; + +ActorInfo D_803948B8 = { + MARKER_16F_CHEATO_3, 0x1D7, ASSET_54F_MODEL_CHEATO, + 0x1, D_80394860, + func_803902B8, actor_update_func_80326224, func_80390030, + 2500, 0, 1.2f, 0 +}; /* .code */ Actor *func_80390030(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ diff --git a/src/lair/code_A170.c b/src/lair/code_A170.c index 47e16c12..5f8f9511 100644 --- a/src/lair/code_A170.c +++ b/src/lair/code_A170.c @@ -20,9 +20,26 @@ ActorAnimationInfo D_80394900[] = { {0, 0.0f}, {0x26A, 1.6f}, }; -ActorInfo D_80394910 = { 0x170, 0x1D8, 0x547, 0x1, D_803948E0, func_803906A0, actor_update_func_80326224, func_80390560, 0, 0, 0.7f, 0}; -ActorInfo D_80394934 = { 0x171, 0x1D9, 0x548, 0x1, D_803948F0, func_803906A0, actor_update_func_80326224, func_80390560, 0, 0, 0.5f, 0}; -ActorInfo D_80394958 = { 0x172, 0x1DA, 0x549, 0x1, D_80394900, func_803906A0, actor_update_func_80326224, func_80390560, 0, 0, 0.5f, 0}; +ActorInfo D_80394910 = { + MARKER_170_BLUE_EGG_REFILL_PILLOW, 0x1D8, ASSET_547_MODEL_BLUE_EGG_REFILL_PILLOW, + 0x1, D_803948E0, + func_803906A0, actor_update_func_80326224, func_80390560, + 0, 0, 0.7f, 0 +}; + +ActorInfo D_80394934 = { + MARKER_171_RED_FEATHER_REFILL_PILLOW, 0x1D9, ASSET_548_MODEL_RED_FEATHER_REFILL_PILLOW, + 0x1, D_803948F0, + func_803906A0, actor_update_func_80326224, func_80390560, + 0, 0, 0.5f, 0 +}; + +ActorInfo D_80394958 = { + MARKER_172_GOLD_FEATHER_REFILL_PILLOW, 0x1DA, ASSET_549_MODEL_GOLD_FEATHER_REFILL_PILLOW, + 0x1, D_80394900, + func_803906A0, actor_update_func_80326224, func_80390560, + 0, 0, 0.5f, 0 +}; /* .code */ Actor *func_80390560(ActorMarker *marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ @@ -35,17 +52,17 @@ void func_803905CC(ActorMarker *marker, ActorMarker *other_marker){ switch (marker->id) { case 0x170: item_setMaxCount(ITEM_D_EGGS); - fxSparkle_giantBlueEgg(&marker->propPtr->x); + fxSparkle_giantBlueEgg(&marker->propPtr->position_x); coMusicPlayer_playMusic(SFX_EGG_REFILL, -1); break; case 0x171: item_setMaxCount(ITEM_F_RED_FEATHER); - fxSparkle_giantRedFeather(&marker->propPtr->x); + fxSparkle_giantRedFeather(&marker->propPtr->position_x); coMusicPlayer_playMusic(SFX_RED_FEATHER_REFILL, -1); break; case 0x172: item_setMaxCount(ITEM_10_GOLD_FEATHER); - fxSparkle_giantGoldFeather(&marker->propPtr->x); + fxSparkle_giantGoldFeather(&marker->propPtr->position_x); coMusicPlayer_playMusic(SFX_GOLD_FEATHER_REFILL, -1); break; } diff --git a/src/lair/code_A4A0.c b/src/lair/code_A4A0.c index 37b90ef4..6ce4cfb7 100644 --- a/src/lair/code_A4A0.c +++ b/src/lair/code_A4A0.c @@ -11,7 +11,7 @@ typedef struct { s8 unk9; s8 unkA; s8 unkB; - u32 unkC_31:3; + u32 yaw:3; u32 unkC_28:1; u32 unkC_27:28; s16 unk10; @@ -69,7 +69,7 @@ void func_80390994(Actor *this) { local->unk9 = 0xC - local->unkC_27 * 2; local->unkA = 0x10 - (local->unkC_27 * 3); local->unkB = 8 - local->unkC_27; - local->unkC_31 = 1; + local->yaw = 1; local->unk10 = 0xFB; local->unk12 = 0x7530; local->unk14 = local->unkC_27 * 0.1 + 0.8; diff --git a/src/lair/code_C6C0.c b/src/lair/code_C6C0.c index 7bd78a8a..2b9619c3 100644 --- a/src/lair/code_C6C0.c +++ b/src/lair/code_C6C0.c @@ -4,28 +4,33 @@ extern void player_walkToPosition(f32[3], f32, void(*)(ActorMarker *), ActorMarker *); -void func_80392B6C(Actor *this); +void __codeC6C0_updateFunc(Actor *this); /* .data */ -ActorInfo D_80394D20 = { 0x29C, 0x3C9, 0x0, 0x0, NULL, func_80392B6C, actor_update_func_80326224, func_80325340, 0, 0, 0.0f, 0}; +ActorInfo gChActorFurnaceFunPickPrice = { + MARKER_29C_FURNACE_FUN_PICK_PRICE, ACTOR_3C9_FURNACE_FUN_PICK_PRICE, 0x0, + 0x0, NULL, + __codeC6C0_updateFunc, actor_update_func_80326224, func_80325340, + 0, 0, 0.0f, 0 +}; /* .code */ -void func_80392AB0(ActorMarker *marker, enum asset_e text_id, s32 arg2){ +void __codeC6C0_func_80392AB0(ActorMarker *marker, enum asset_e text_id, s32 arg2){ comusic_8025AB44(COMUSIC_A9_TOOTY, 0, 2000); func_8025AABC(0xA9); gcparade_beginFFParade(); } -void func_80392AF4(ActorMarker *marker, enum asset_e text_id, s32 arg2){ +void __codeC6C0_func_80392AF4(ActorMarker *marker, enum asset_e text_id, s32 arg2){ ncStaticCamera_setToNode(arg2); } -void func_80392B1C(ActorMarker *marker) { +void __codeC6C0_func_80392B1C(ActorMarker *marker) { func_8028E6EC(0); - gcdialog_showDialog(0x1040, 8, NULL, marker, func_80392AB0, func_80392AF4); + gcdialog_showDialog(ASSET_1040_DIALOG_FURNACE_FUN_PICK_PRICE, 8, NULL, marker, __codeC6C0_func_80392AB0, __codeC6C0_func_80392AF4); } -void func_80392B6C(Actor *this) { +void __codeC6C0_updateFunc(Actor *this) { NodeProp* phi_a0; s32 sp28; @@ -35,7 +40,7 @@ void func_80392B6C(Actor *this) { marker_despawn(this->marker); return; } - phi_a0 = nodeprop_findByActorIdAndActorPosition(0x3BE, this); + phi_a0 = nodeprop_findByActorIdAndActorPosition(ACTOR_3BE_LAIR_UNKNOWN, this); if (this == NULL) { this->unk1C[0] = -1300.0f; this->unk1C[1] = 250.0f; @@ -44,14 +49,14 @@ void func_80392B6C(Actor *this) { nodeprop_getPosition(phi_a0, this->unk1C); } } - if (mapSpecificFlags_get(7) != 0) { + if (mapSpecificFlags_get(LAIR_SPECIFIC_FLAG_7_UKNOWN) != FALSE) { sp28 = ml_vec3f_distance(this->position, this->unk1C) / 350.0; comusic_playTrack(COMUSIC_A9_TOOTY); - mapSpecificFlags_set(7, 0); - mapSpecificFlags_set(9, 1); + mapSpecificFlags_set(LAIR_SPECIFIC_FLAG_7_UKNOWN, FALSE); + mapSpecificFlags_set(LAIR_SPECIFIC_FLAG_9_UKNOWN, TRUE); ncStaticCamera_setToNode(0x10); func_8028F918(0); func_8028F85C(this->position); - player_walkToPosition(this->unk1C, (f32) sp28, &func_80392B1C, this->marker); + player_walkToPosition(this->unk1C, (f32) sp28, &__codeC6C0_func_80392B1C, this->marker); } } diff --git a/src/lair/jigsawpicture.c b/src/lair/jigsawpicture.c index bb4f244c..a27445a1 100644 --- a/src/lair/jigsawpicture.c +++ b/src/lair/jigsawpicture.c @@ -39,7 +39,7 @@ ActorInfo JIGSAW_PICTURE_ACTOR_2 = { 0x1EB, 0x3BC, 0x538, 0x1, NULL, updateJigsa JigsawPictureInfo PICTURE_INFO[0xB] ={ { 1, 0x1, FILEPROG_5D_MM_PUZZLE_PIECES_PLACED }, - { 2, 0x2, FILEPROG_5E_TCC_PUZZLE_PIECES_PLACED }, + { 2, 0x2, FILEPROG_5E_TTC_PUZZLE_PIECES_PLACED }, { 5, 0x3, FILEPROG_60_CC_PUZZLE_PIECES_PLACED }, { 7, 0x3, FILEPROG_63_BGS_PUZZLE_PIECES_PLACED }, { 8, 0x4, FILEPROG_66_FP_PUZZLE_PIECES_PLACED },