diff --git a/asm/non_matchings/unknown_06B2B0/func_8006A6B0.s b/asm/non_matchings/game/func_8006A6B0.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006A6B0.s rename to asm/non_matchings/game/func_8006A6B0.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006AC00.s b/asm/non_matchings/game/func_8006AC00.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006AC00.s rename to asm/non_matchings/game/func_8006AC00.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006AE2C.s b/asm/non_matchings/game/func_8006AE2C.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006AE2C.s rename to asm/non_matchings/game/func_8006AE2C.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006CCF0.s b/asm/non_matchings/game/func_8006CCF0.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006CCF0.s rename to asm/non_matchings/game/func_8006CCF0.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006DCF8.s b/asm/non_matchings/game/func_8006DCF8.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006DCF8.s rename to asm/non_matchings/game/func_8006DCF8.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006ECFC.s b/asm/non_matchings/game/func_8006ECFC.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006ECFC.s rename to asm/non_matchings/game/func_8006ECFC.s diff --git a/asm/non_matchings/unknown_06B2B0/func_8006EFDC.s b/asm/non_matchings/game/func_8006EFDC.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/func_8006EFDC.s rename to asm/non_matchings/game/func_8006EFDC.s diff --git a/asm/non_matchings/unknown_06B2B0/load_level.s b/asm/non_matchings/game/load_level.s similarity index 100% rename from asm/non_matchings/unknown_06B2B0/load_level.s rename to asm/non_matchings/game/load_level.s diff --git a/asm/non_matchings/unknown_09F8F0/func_8009ECF0.s b/asm/non_matchings/game_ui/func_8009ECF0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_8009ECF0.s rename to asm/non_matchings/game_ui/func_8009ECF0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_8009F034.s b/asm/non_matchings/game_ui/func_8009F034.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_8009F034.s rename to asm/non_matchings/game_ui/func_8009F034.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A003C.s b/asm/non_matchings/game_ui/func_800A003C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A003C.s rename to asm/non_matchings/game_ui/func_800A003C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A01A0.s b/asm/non_matchings/game_ui/func_800A01A0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A01A0.s rename to asm/non_matchings/game_ui/func_800A01A0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A0BD4.s b/asm/non_matchings/game_ui/func_800A0BD4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A0BD4.s rename to asm/non_matchings/game_ui/func_800A0BD4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A0EB4.s b/asm/non_matchings/game_ui/func_800A0EB4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A0EB4.s rename to asm/non_matchings/game_ui/func_800A0EB4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1248.s b/asm/non_matchings/game_ui/func_800A1248.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1248.s rename to asm/non_matchings/game_ui/func_800A1248.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A14F0.s b/asm/non_matchings/game_ui/func_800A14F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A14F0.s rename to asm/non_matchings/game_ui/func_800A14F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A19A4.s b/asm/non_matchings/game_ui/func_800A19A4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A19A4.s rename to asm/non_matchings/game_ui/func_800A19A4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1C04.s b/asm/non_matchings/game_ui/func_800A1C04.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1C04.s rename to asm/non_matchings/game_ui/func_800A1C04.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A1E48.s b/asm/non_matchings/game_ui/func_800A1E48.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A1E48.s rename to asm/non_matchings/game_ui/func_800A1E48.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A22F4.s b/asm/non_matchings/game_ui/func_800A22F4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A22F4.s rename to asm/non_matchings/game_ui/func_800A22F4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A277C.s b/asm/non_matchings/game_ui/func_800A277C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A277C.s rename to asm/non_matchings/game_ui/func_800A277C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A36CC.s b/asm/non_matchings/game_ui/func_800A36CC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A36CC.s rename to asm/non_matchings/game_ui/func_800A36CC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A3884.s b/asm/non_matchings/game_ui/func_800A3884.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A3884.s rename to asm/non_matchings/game_ui/func_800A3884.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A3CE4.s b/asm/non_matchings/game_ui/func_800A3CE4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A3CE4.s rename to asm/non_matchings/game_ui/func_800A3CE4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4154.s b/asm/non_matchings/game_ui/func_800A4154.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4154.s rename to asm/non_matchings/game_ui/func_800A4154.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A45F0.s b/asm/non_matchings/game_ui/func_800A45F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A45F0.s rename to asm/non_matchings/game_ui/func_800A45F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A47A0.s b/asm/non_matchings/game_ui/func_800A47A0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A47A0.s rename to asm/non_matchings/game_ui/func_800A47A0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A497C.s b/asm/non_matchings/game_ui/func_800A497C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A497C.s rename to asm/non_matchings/game_ui/func_800A497C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4C44.s b/asm/non_matchings/game_ui/func_800A4C44.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4C44.s rename to asm/non_matchings/game_ui/func_800A4C44.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A4F50.s b/asm/non_matchings/game_ui/func_800A4F50.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A4F50.s rename to asm/non_matchings/game_ui/func_800A4F50.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A5A64.s b/asm/non_matchings/game_ui/func_800A5A64.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A5A64.s rename to asm/non_matchings/game_ui/func_800A5A64.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A5F18.s b/asm/non_matchings/game_ui/func_800A5F18.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A5F18.s rename to asm/non_matchings/game_ui/func_800A5F18.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6254.s b/asm/non_matchings/game_ui/func_800A6254.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A6254.s rename to asm/non_matchings/game_ui/func_800A6254.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A6E30.s b/asm/non_matchings/game_ui/func_800A6E30.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A6E30.s rename to asm/non_matchings/game_ui/func_800A6E30.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A718C.s b/asm/non_matchings/game_ui/func_800A718C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A718C.s rename to asm/non_matchings/game_ui/func_800A718C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7520.s b/asm/non_matchings/game_ui/func_800A7520.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7520.s rename to asm/non_matchings/game_ui/func_800A7520.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7A60.s b/asm/non_matchings/game_ui/func_800A7A60.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7A60.s rename to asm/non_matchings/game_ui/func_800A7A60.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7B68.s b/asm/non_matchings/game_ui/func_800A7B68.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7B68.s rename to asm/non_matchings/game_ui/func_800A7B68.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A7FBC.s b/asm/non_matchings/game_ui/func_800A7FBC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A7FBC.s rename to asm/non_matchings/game_ui/func_800A7FBC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800A8474.s b/asm/non_matchings/game_ui/func_800A8474.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800A8474.s rename to asm/non_matchings/game_ui/func_800A8474.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AA3EC.s b/asm/non_matchings/game_ui/func_800AA3EC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AA3EC.s rename to asm/non_matchings/game_ui/func_800AA3EC.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AA600.s b/asm/non_matchings/game_ui/func_800AA600.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AA600.s rename to asm/non_matchings/game_ui/func_800AA600.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AAFD0.s b/asm/non_matchings/game_ui/func_800AAFD0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AAFD0.s rename to asm/non_matchings/game_ui/func_800AAFD0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB1F0.s b/asm/non_matchings/game_ui/func_800AB1F0.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB1F0.s rename to asm/non_matchings/game_ui/func_800AB1F0.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB35C.s b/asm/non_matchings/game_ui/func_800AB35C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB35C.s rename to asm/non_matchings/game_ui/func_800AB35C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AB4A8.s b/asm/non_matchings/game_ui/func_800AB4A8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AB4A8.s rename to asm/non_matchings/game_ui/func_800AB4A8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABB34.s b/asm/non_matchings/game_ui/func_800ABB34.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABB34.s rename to asm/non_matchings/game_ui/func_800ABB34.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABC5C.s b/asm/non_matchings/game_ui/func_800ABC5C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABC5C.s rename to asm/non_matchings/game_ui/func_800ABC5C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ABE68.s b/asm/non_matchings/game_ui/func_800ABE68.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ABE68.s rename to asm/non_matchings/game_ui/func_800ABE68.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC0C8.s b/asm/non_matchings/game_ui/func_800AC0C8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC0C8.s rename to asm/non_matchings/game_ui/func_800AC0C8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC21C.s b/asm/non_matchings/game_ui/func_800AC21C.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC21C.s rename to asm/non_matchings/game_ui/func_800AC21C.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC5A4.s b/asm/non_matchings/game_ui/func_800AC5A4.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC5A4.s rename to asm/non_matchings/game_ui/func_800AC5A4.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AC8A8.s b/asm/non_matchings/game_ui/func_800AC8A8.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AC8A8.s rename to asm/non_matchings/game_ui/func_800AC8A8.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ACA20.s b/asm/non_matchings/game_ui/func_800ACA20.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ACA20.s rename to asm/non_matchings/game_ui/func_800ACA20.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD030.s b/asm/non_matchings/game_ui/func_800AD030.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD030.s rename to asm/non_matchings/game_ui/func_800AD030.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD144.s b/asm/non_matchings/game_ui/func_800AD144.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD144.s rename to asm/non_matchings/game_ui/func_800AD144.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800AD658.s b/asm/non_matchings/game_ui/func_800AD658.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800AD658.s rename to asm/non_matchings/game_ui/func_800AD658.s diff --git a/asm/non_matchings/unknown_09F8F0/func_800ADCBC.s b/asm/non_matchings/game_ui/func_800ADCBC.s similarity index 100% rename from asm/non_matchings/unknown_09F8F0/func_800ADCBC.s rename to asm/non_matchings/game_ui/func_800ADCBC.s diff --git a/asm/non_matchings/unknown_043920/func_80042D20.s b/asm/non_matchings/racer/func_80042D20.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80042D20.s rename to asm/non_matchings/racer/func_80042D20.s diff --git a/asm/non_matchings/unknown_043920/func_80043ECC.s b/asm/non_matchings/racer/func_80043ECC.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80043ECC.s rename to asm/non_matchings/racer/func_80043ECC.s diff --git a/asm/non_matchings/unknown_043920/func_8004447C.s b/asm/non_matchings/racer/func_8004447C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004447C.s rename to asm/non_matchings/racer/func_8004447C.s diff --git a/asm/non_matchings/unknown_043920/func_80045128.s b/asm/non_matchings/racer/func_80045128.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80045128.s rename to asm/non_matchings/racer/func_80045128.s diff --git a/asm/non_matchings/unknown_043920/func_800452A0.s b/asm/non_matchings/racer/func_800452A0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800452A0.s rename to asm/non_matchings/racer/func_800452A0.s diff --git a/asm/non_matchings/unknown_043920/func_80045C48.s b/asm/non_matchings/racer/func_80045C48.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80045C48.s rename to asm/non_matchings/racer/func_80045C48.s diff --git a/asm/non_matchings/unknown_043920/func_80046524.s b/asm/non_matchings/racer/func_80046524.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80046524.s rename to asm/non_matchings/racer/func_80046524.s diff --git a/asm/non_matchings/unknown_043920/func_80048C7C.s b/asm/non_matchings/racer/func_80048C7C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80048C7C.s rename to asm/non_matchings/racer/func_80048C7C.s diff --git a/asm/non_matchings/unknown_043920/func_80048E64.s b/asm/non_matchings/racer/func_80048E64.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80048E64.s rename to asm/non_matchings/racer/func_80048E64.s diff --git a/asm/non_matchings/unknown_043920/func_800494E0.s b/asm/non_matchings/racer/func_800494E0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800494E0.s rename to asm/non_matchings/racer/func_800494E0.s diff --git a/asm/non_matchings/unknown_043920/func_80049794.s b/asm/non_matchings/racer/func_80049794.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80049794.s rename to asm/non_matchings/racer/func_80049794.s diff --git a/asm/non_matchings/unknown_043920/func_8004C2B0.s b/asm/non_matchings/racer/func_8004C2B0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004C2B0.s rename to asm/non_matchings/racer/func_8004C2B0.s diff --git a/asm/non_matchings/unknown_043920/func_8004CC20.s b/asm/non_matchings/racer/func_8004CC20.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004CC20.s rename to asm/non_matchings/racer/func_8004CC20.s diff --git a/asm/non_matchings/unknown_043920/func_8004D590.s b/asm/non_matchings/racer/func_8004D590.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004D590.s rename to asm/non_matchings/racer/func_8004D590.s diff --git a/asm/non_matchings/unknown_043920/func_8004DE38.s b/asm/non_matchings/racer/func_8004DE38.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004DE38.s rename to asm/non_matchings/racer/func_8004DE38.s diff --git a/asm/non_matchings/unknown_043920/func_8004F7F4.s b/asm/non_matchings/racer/func_8004F7F4.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8004F7F4.s rename to asm/non_matchings/racer/func_8004F7F4.s diff --git a/asm/non_matchings/unknown_043920/func_80050754.s b/asm/non_matchings/racer/func_80050754.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050754.s rename to asm/non_matchings/racer/func_80050754.s diff --git a/asm/non_matchings/unknown_043920/func_80050850.s b/asm/non_matchings/racer/func_80050850.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050850.s rename to asm/non_matchings/racer/func_80050850.s diff --git a/asm/non_matchings/unknown_043920/func_80050A28.s b/asm/non_matchings/racer/func_80050A28.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80050A28.s rename to asm/non_matchings/racer/func_80050A28.s diff --git a/asm/non_matchings/unknown_043920/func_800521C4.s b/asm/non_matchings/racer/func_800521C4.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800521C4.s rename to asm/non_matchings/racer/func_800521C4.s diff --git a/asm/non_matchings/unknown_043920/func_80052388.s b/asm/non_matchings/racer/func_80052388.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052388.s rename to asm/non_matchings/racer/func_80052388.s diff --git a/asm/non_matchings/unknown_043920/func_8005250C.s b/asm/non_matchings/racer/func_8005250C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005250C.s rename to asm/non_matchings/racer/func_8005250C.s diff --git a/asm/non_matchings/unknown_043920/func_80052B64.s b/asm/non_matchings/racer/func_80052B64.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052B64.s rename to asm/non_matchings/racer/func_80052B64.s diff --git a/asm/non_matchings/unknown_043920/func_80052D7C.s b/asm/non_matchings/racer/func_80052D7C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80052D7C.s rename to asm/non_matchings/racer/func_80052D7C.s diff --git a/asm/non_matchings/unknown_043920/func_80053750.s b/asm/non_matchings/racer/func_80053750.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80053750.s rename to asm/non_matchings/racer/func_80053750.s diff --git a/asm/non_matchings/unknown_043920/func_80053E9C.s b/asm/non_matchings/racer/func_80053E9C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80053E9C.s rename to asm/non_matchings/racer/func_80053E9C.s diff --git a/asm/non_matchings/unknown_043920/func_80054110.s b/asm/non_matchings/racer/func_80054110.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80054110.s rename to asm/non_matchings/racer/func_80054110.s diff --git a/asm/non_matchings/unknown_043920/func_8005492C.s b/asm/non_matchings/racer/func_8005492C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005492C.s rename to asm/non_matchings/racer/func_8005492C.s diff --git a/asm/non_matchings/unknown_043920/func_80054FD0.s b/asm/non_matchings/racer/func_80054FD0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80054FD0.s rename to asm/non_matchings/racer/func_80054FD0.s diff --git a/asm/non_matchings/unknown_043920/func_80055A84.s b/asm/non_matchings/racer/func_80055A84.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80055A84.s rename to asm/non_matchings/racer/func_80055A84.s diff --git a/asm/non_matchings/unknown_043920/func_80055EC0.s b/asm/non_matchings/racer/func_80055EC0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80055EC0.s rename to asm/non_matchings/racer/func_80055EC0.s diff --git a/asm/non_matchings/unknown_043920/func_8005698C.s b/asm/non_matchings/racer/func_8005698C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005698C.s rename to asm/non_matchings/racer/func_8005698C.s diff --git a/asm/non_matchings/unknown_043920/func_80056E2C.s b/asm/non_matchings/racer/func_80056E2C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80056E2C.s rename to asm/non_matchings/racer/func_80056E2C.s diff --git a/asm/non_matchings/unknown_043920/func_800570B8.s b/asm/non_matchings/racer/func_800570B8.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800570B8.s rename to asm/non_matchings/racer/func_800570B8.s diff --git a/asm/non_matchings/unknown_043920/func_80057220.s b/asm/non_matchings/racer/func_80057220.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80057220.s rename to asm/non_matchings/racer/func_80057220.s diff --git a/asm/non_matchings/unknown_043920/func_800576E0.s b/asm/non_matchings/racer/func_800576E0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800576E0.s rename to asm/non_matchings/racer/func_800576E0.s diff --git a/asm/non_matchings/unknown_043920/func_80057A40.s b/asm/non_matchings/racer/func_80057A40.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80057A40.s rename to asm/non_matchings/racer/func_80057A40.s diff --git a/asm/non_matchings/unknown_043920/func_800581E8.s b/asm/non_matchings/racer/func_800581E8.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_800581E8.s rename to asm/non_matchings/racer/func_800581E8.s diff --git a/asm/non_matchings/unknown_043920/func_80058B84.s b/asm/non_matchings/racer/func_80058B84.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058B84.s rename to asm/non_matchings/racer/func_80058B84.s diff --git a/asm/non_matchings/unknown_043920/func_80058D5C.s b/asm/non_matchings/racer/func_80058D5C.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058D5C.s rename to asm/non_matchings/racer/func_80058D5C.s diff --git a/asm/non_matchings/unknown_043920/func_80058F44.s b/asm/non_matchings/racer/func_80058F44.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80058F44.s rename to asm/non_matchings/racer/func_80058F44.s diff --git a/asm/non_matchings/unknown_043920/func_80059080.s b/asm/non_matchings/racer/func_80059080.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059080.s rename to asm/non_matchings/racer/func_80059080.s diff --git a/asm/non_matchings/unknown_043920/func_80059208.s b/asm/non_matchings/racer/func_80059208.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059208.s rename to asm/non_matchings/racer/func_80059208.s diff --git a/asm/non_matchings/unknown_043920/func_80059BF0.s b/asm/non_matchings/racer/func_80059BF0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_80059BF0.s rename to asm/non_matchings/racer/func_80059BF0.s diff --git a/asm/non_matchings/unknown_043920/func_8005A424.s b/asm/non_matchings/racer/func_8005A424.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005A424.s rename to asm/non_matchings/racer/func_8005A424.s diff --git a/asm/non_matchings/unknown_043920/func_8005A6F0.s b/asm/non_matchings/racer/func_8005A6F0.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005A6F0.s rename to asm/non_matchings/racer/func_8005A6F0.s diff --git a/asm/non_matchings/unknown_043920/func_8005B818.s b/asm/non_matchings/racer/func_8005B818.s similarity index 100% rename from asm/non_matchings/unknown_043920/func_8005B818.s rename to asm/non_matchings/racer/func_8005B818.s diff --git a/asm/non_matchings/unknown_043920/func_8004DAB0.s b/asm/non_matchings/racer/obj_init_racer.s similarity index 99% rename from asm/non_matchings/unknown_043920/func_8004DAB0.s rename to asm/non_matchings/racer/obj_init_racer.s index d1ba1b8a..b46ba17c 100644 --- a/asm/non_matchings/unknown_043920/func_8004DAB0.s +++ b/asm/non_matchings/racer/obj_init_racer.s @@ -1,4 +1,4 @@ -glabel func_8004DAB0 +glabel obj_init_racer /* 04E6B0 8004DAB0 3C013F80 */ li $at, 0x3F800000 # 1.000000 /* 04E6B4 8004DAB4 44811000 */ mtc1 $at, $f2 /* 04E6B8 8004DAB8 27BDFFD0 */ addiu $sp, $sp, -0x30 diff --git a/asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s b/asm/non_matchings/racer/set_ghost_position_and_rotation.s similarity index 100% rename from asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s rename to asm/non_matchings/racer/set_ghost_position_and_rotation.s diff --git a/asm/non_matchings/controller_pak/func_80072348.s b/asm/non_matchings/save_data/func_80072348.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072348.s rename to asm/non_matchings/save_data/func_80072348.s diff --git a/asm/non_matchings/controller_pak/func_80072424.s b/asm/non_matchings/save_data/func_80072424.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072424.s rename to asm/non_matchings/save_data/func_80072424.s diff --git a/asm/non_matchings/controller_pak/func_80072578.s b/asm/non_matchings/save_data/func_80072578.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072578.s rename to asm/non_matchings/save_data/func_80072578.s diff --git a/asm/non_matchings/controller_pak/func_80072718.s b/asm/non_matchings/save_data/func_80072718.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072718.s rename to asm/non_matchings/save_data/func_80072718.s diff --git a/asm/non_matchings/controller_pak/func_80072C54.s b/asm/non_matchings/save_data/func_80072C54.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072C54.s rename to asm/non_matchings/save_data/func_80072C54.s diff --git a/asm/non_matchings/controller_pak/func_80072E28.s b/asm/non_matchings/save_data/func_80072E28.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80072E28.s rename to asm/non_matchings/save_data/func_80072E28.s diff --git a/asm/non_matchings/controller_pak/func_8007306C.s b/asm/non_matchings/save_data/func_8007306C.s similarity index 100% rename from asm/non_matchings/controller_pak/func_8007306C.s rename to asm/non_matchings/save_data/func_8007306C.s diff --git a/asm/non_matchings/controller_pak/func_800732E8.s b/asm/non_matchings/save_data/func_800732E8.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800732E8.s rename to asm/non_matchings/save_data/func_800732E8.s diff --git a/asm/non_matchings/controller_pak/func_80073588.s b/asm/non_matchings/save_data/func_80073588.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80073588.s rename to asm/non_matchings/save_data/func_80073588.s diff --git a/asm/non_matchings/controller_pak/func_800738A4.s b/asm/non_matchings/save_data/func_800738A4.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800738A4.s rename to asm/non_matchings/save_data/func_800738A4.s diff --git a/asm/non_matchings/controller_pak/func_80073C5C.s b/asm/non_matchings/save_data/func_80073C5C.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80073C5C.s rename to asm/non_matchings/save_data/func_80073C5C.s diff --git a/asm/non_matchings/controller_pak/func_80074204.s b/asm/non_matchings/save_data/func_80074204.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80074204.s rename to asm/non_matchings/save_data/func_80074204.s diff --git a/asm/non_matchings/controller_pak/func_8007431C.s b/asm/non_matchings/save_data/func_8007431C.s similarity index 100% rename from asm/non_matchings/controller_pak/func_8007431C.s rename to asm/non_matchings/save_data/func_8007431C.s diff --git a/asm/non_matchings/controller_pak/func_80074B34.s b/asm/non_matchings/save_data/func_80074B34.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80074B34.s rename to asm/non_matchings/save_data/func_80074B34.s diff --git a/asm/non_matchings/controller_pak/func_80074EB8.s b/asm/non_matchings/save_data/func_80074EB8.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80074EB8.s rename to asm/non_matchings/save_data/func_80074EB8.s diff --git a/asm/non_matchings/controller_pak/func_80075000.s b/asm/non_matchings/save_data/func_80075000.s similarity index 100% rename from asm/non_matchings/controller_pak/func_80075000.s rename to asm/non_matchings/save_data/func_80075000.s diff --git a/asm/non_matchings/controller_pak/func_800753D8.s b/asm/non_matchings/save_data/func_800753D8.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800753D8.s rename to asm/non_matchings/save_data/func_800753D8.s diff --git a/asm/non_matchings/controller_pak/func_800756D4.s b/asm/non_matchings/save_data/func_800756D4.s similarity index 100% rename from asm/non_matchings/controller_pak/func_800756D4.s rename to asm/non_matchings/save_data/func_800756D4.s diff --git a/asm/non_matchings/controller_pak/init_controller_paks.s b/asm/non_matchings/save_data/init_controller_paks.s similarity index 100% rename from asm/non_matchings/controller_pak/init_controller_paks.s rename to asm/non_matchings/save_data/init_controller_paks.s diff --git a/asm/non_matchings/unknown_00BC20/func_8000EA54.s b/asm/non_matchings/unknown_00BC20/func_8000EA54.s index d116c61e..27b18dad 100644 --- a/asm/non_matchings/unknown_00BC20/func_8000EA54.s +++ b/asm/non_matchings/unknown_00BC20/func_8000EA54.s @@ -752,7 +752,7 @@ glabel L8000EDE0 .L8000F500: /* 010100 8000F500 3C108012 */ lui $s0, %hi(objCount) # $s0, 0x8012 /* 010104 8000F504 8FA50068 */ lw $a1, 0x68($sp) -/* 010108 8000F508 0C008E2F */ jal func_800238BC +/* 010108 8000F508 0C008E2F */ jal run_object_init_func /* 01010C 8000F50C 2610AE5C */ addiu $s0, %lo(objCount) # addiu $s0, $s0, -0x51a4 /* 010110 8000F510 8E42004C */ lw $v0, 0x4c($s2) /* 010114 8000F514 00000000 */ nop diff --git a/asm/non_matchings/unknown_00BC20/func_80023E30.s b/asm/non_matchings/unknown_00BC20/func_80023E30.s deleted file mode 100644 index 0a33dd34..00000000 --- a/asm/non_matchings/unknown_00BC20/func_80023E30.s +++ /dev/null @@ -1,136 +0,0 @@ -.late_rodata -glabel jpt_800E5A3C -.word L80023E5C, L80023E64, L80023F40, L80023F40, L80023E6C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023E74, L80023F14, L80023E7C, L80023F40, L80023F40, L80023E84, L80023F14, L80023F40, L80023F40, L80023F40, L80023F40, L80023F40, L80023E9C, L80023F40, L80023F14, L80023F40, L80023F40, L80023F40, L80023F14, L80023EA4, L80023EAC, L80023F40, L80023F40, L80023F40, L80023F14, L80023F40, L80023EBC, L80023EC4, L80023ECC, L80023F14, L80023F40, L80023F40, L80023F40, L80023ED4, L80023F40, L80023F40, L80023EDC, L80023F24, L80023EEC, L80023F24, L80023F14, L80023F40, L80023EF4, L80023F14, L80023EEC, L80023F14, L80023F40, L80023F40, L80023F40, L80023F24, L80023F2C, L80023EE4, L80023EAC, L80023F40, L80023F40, L80023EB4, L80023F14, L80023F40, L80023E8C, L80023F40, L80023E8C, L80023F40, L80023EFC, L80023F40, L80023F40, L80023E84, L80023F14, L80023F14, L80023EEC, L80023F0C, L80023F1C, L80023F40, L80023EEC, L80023F40, L80023EEC, L80023F40, L80023EAC, L80023F40, L80023F40, L80023F04, L80023F40, L80023F14, L80023F40, L80023EFC, L80023E8C, L80023E8C, L80023F14, L80023EFC, L80023EFC, L80023E94, L80023E94, L80023E94, L80023E94, L80023F40, L80023F40, L80023F40, L80023F14, L80023F34, L80023EAC, L80023E7C, L80023F40, L80023F40, L80023F3C, L80023EEC, L80023F14 - -.text -glabel func_80023E30 -/* 024A30 80023E30 248EFFFF */ addiu $t6, $a0, -1 -/* 024A34 80023E34 2DC10074 */ sltiu $at, $t6, 0x74 -/* 024A38 80023E38 10200041 */ beqz $at, .L80023F40 -/* 024A3C 80023E3C 00001825 */ move $v1, $zero -/* 024A40 80023E40 000E7080 */ sll $t6, $t6, 2 -/* 024A44 80023E44 3C01800E */ lui $at, %hi(jpt_800E5A3C) # $at, 0x800e -/* 024A48 80023E48 002E0821 */ addu $at, $at, $t6 -/* 024A4C 80023E4C 8C2E5A3C */ lw $t6, %lo(jpt_800E5A3C)($at) -/* 024A50 80023E50 00000000 */ nop -/* 024A54 80023E54 01C00008 */ jr $t6 -/* 024A58 80023E58 00000000 */ nop -glabel L80023E5C -/* 024A5C 80023E5C 03E00008 */ jr $ra -/* 024A60 80023E60 2402001F */ li $v0, 31 - -glabel L80023E64 -/* 024A64 80023E64 03E00008 */ jr $ra -/* 024A68 80023E68 24020013 */ li $v0, 19 - -glabel L80023E6C -/* 024A6C 80023E6C 03E00008 */ jr $ra -/* 024A70 80023E70 24020016 */ li $v0, 22 - -glabel L80023E74 -/* 024A74 80023E74 03E00008 */ jr $ra -/* 024A78 80023E78 2402001B */ li $v0, 27 - -glabel L80023E7C -/* 024A7C 80023E7C 03E00008 */ jr $ra -/* 024A80 80023E80 24020030 */ li $v0, 48 - -glabel L80023E84 -/* 024A84 80023E84 03E00008 */ jr $ra -/* 024A88 80023E88 24020012 */ li $v0, 18 - -glabel L80023E8C -/* 024A8C 80023E8C 03E00008 */ jr $ra -/* 024A90 80023E90 2402003B */ li $v0, 59 - -glabel L80023E94 -/* 024A94 80023E94 03E00008 */ jr $ra -/* 024A98 80023E98 2402003A */ li $v0, 58 - -glabel L80023E9C -/* 024A9C 80023E9C 03E00008 */ jr $ra -/* 024AA0 80023EA0 24020004 */ li $v0, 4 - -glabel L80023EA4 -/* 024AA4 80023EA4 03E00008 */ jr $ra -/* 024AA8 80023EA8 2402001B */ li $v0, 27 - -glabel L80023EAC -/* 024AAC 80023EAC 03E00008 */ jr $ra -/* 024AB0 80023EB0 24020012 */ li $v0, 18 - -glabel L80023EB4 -/* 024AB4 80023EB4 03E00008 */ jr $ra -/* 024AB8 80023EB8 24020030 */ li $v0, 48 - -glabel L80023EBC -/* 024ABC 80023EBC 03E00008 */ jr $ra -/* 024AC0 80023EC0 24020039 */ li $v0, 57 - -glabel L80023EC4 -/* 024AC4 80023EC4 03E00008 */ jr $ra -/* 024AC8 80023EC8 24020012 */ li $v0, 18 - -glabel L80023ECC -/* 024ACC 80023ECC 03E00008 */ jr $ra -/* 024AD0 80023ED0 24020009 */ li $v0, 9 - -glabel L80023ED4 -/* 024AD4 80023ED4 03E00008 */ jr $ra -/* 024AD8 80023ED8 24020012 */ li $v0, 18 - -glabel L80023EDC -/* 024ADC 80023EDC 03E00008 */ jr $ra -/* 024AE0 80023EE0 24020009 */ li $v0, 9 - -glabel L80023EE4 -/* 024AE4 80023EE4 03E00008 */ jr $ra -/* 024AE8 80023EE8 24020009 */ li $v0, 9 - -glabel L80023EEC -/* 024AEC 80023EEC 03E00008 */ jr $ra -/* 024AF0 80023EF0 2402000B */ li $v0, 11 - -glabel L80023EF4 -/* 024AF4 80023EF4 03E00008 */ jr $ra -/* 024AF8 80023EF8 2402000B */ li $v0, 11 - -glabel L80023EFC -/* 024AFC 80023EFC 03E00008 */ jr $ra -/* 024B00 80023F00 24020031 */ li $v0, 49 - -glabel L80023F04 -/* 024B04 80023F04 03E00008 */ jr $ra -/* 024B08 80023F08 24020001 */ li $v0, 1 - -glabel L80023F0C -/* 024B0C 80023F0C 03E00008 */ jr $ra -/* 024B10 80023F10 2402000A */ li $v0, 10 - -glabel L80023F14 -/* 024B14 80023F14 03E00008 */ jr $ra -/* 024B18 80023F18 24020010 */ li $v0, 16 - -glabel L80023F1C -/* 024B1C 80023F1C 03E00008 */ jr $ra -/* 024B20 80023F20 24020012 */ li $v0, 18 - -glabel L80023F24 -/* 024B24 80023F24 03E00008 */ jr $ra -/* 024B28 80023F28 24020002 */ li $v0, 2 - -glabel L80023F2C -/* 024B2C 80023F2C 03E00008 */ jr $ra -/* 024B30 80023F30 2402001B */ li $v0, 27 - -glabel L80023F34 -/* 024B34 80023F34 03E00008 */ jr $ra -/* 024B38 80023F38 2402000B */ li $v0, 11 - -glabel L80023F3C -/* 024B3C 80023F3C 24030001 */ li $v1, 1 -.L80023F40: -glabel L80023F40 -/* 024B40 80023F40 03E00008 */ jr $ra -/* 024B44 80023F44 00601025 */ move $v0, $v1 - diff --git a/asm/non_matchings/unknown_0255E0/func_80030A74.s b/asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s similarity index 99% rename from asm/non_matchings/unknown_0255E0/func_80030A74.s rename to asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s index 8f39fd06..193f4179 100644 --- a/asm/non_matchings/unknown_0255E0/func_80030A74.s +++ b/asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s @@ -1,4 +1,4 @@ -glabel func_80030A74 +glabel obj_loop_fogchanger /* 031674 80030A74 27BDFF80 */ addiu $sp, $sp, -0x80 /* 031678 80030A78 AFBF0024 */ sw $ra, 0x24($sp) /* 03167C 80030A7C AFB30020 */ sw $s3, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_80034860.s b/asm/non_matchings/unknown_032760/func_80034860.s deleted file mode 100644 index ea68bddd..00000000 --- a/asm/non_matchings/unknown_032760/func_80034860.s +++ /dev/null @@ -1,182 +0,0 @@ -.late_rodata -glabel D_800E5FF8 -.double 1.2 -glabel D_800E6000 -.float 0.2 - -.text -glabel func_80034860 -/* 035460 80034860 44852000 */ mtc1 $a1, $f4 -/* 035464 80034864 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 -/* 035468 80034868 468020A0 */ cvt.s.w $f2, $f4 -/* 03546C 8003486C 8DEF0300 */ lw $t7, %lo(osTvType)($t7) -/* 035470 80034870 27BDFFA0 */ addiu $sp, $sp, -0x60 -/* 035474 80034874 AFB00028 */ sw $s0, 0x28($sp) -/* 035478 80034878 00808025 */ move $s0, $a0 -/* 03547C 8003487C AFBF002C */ sw $ra, 0x2c($sp) -/* 035480 80034880 AFA50064 */ sw $a1, 0x64($sp) -/* 035484 80034884 00004025 */ move $t0, $zero -/* 035488 80034888 15E00007 */ bnez $t7, .L800348A8 -/* 03548C 8003488C 46001006 */ mov.s $f0, $f2 -/* 035490 80034890 3C01800E */ lui $at, %hi(D_800E5FF8 + 4) # $at, 0x800e -/* 035494 80034894 C4295FF8 */ lwc1 $f9, %lo(D_800E5FF8)($at) -/* 035498 80034898 C4285FFC */ lwc1 $f8, %lo(D_800E5FF8 + 4)($at) -/* 03549C 8003489C 460011A1 */ cvt.d.s $f6, $f2 -/* 0354A0 800348A0 46283282 */ mul.d $f10, $f6, $f8 -/* 0354A4 800348A4 46205020 */ cvt.s.d $f0, $f10 -.L800348A8: -/* 0354A8 800348A8 C612001C */ lwc1 $f18, 0x1c($s0) -/* 0354AC 800348AC C610000C */ lwc1 $f16, 0xc($s0) -/* 0354B0 800348B0 46009102 */ mul.s $f4, $f18, $f0 -/* 0354B4 800348B4 3C014110 */ li $at, 0x41100000 # 9.000000 -/* 0354B8 800348B8 2605000C */ addiu $a1, $s0, 0xc -/* 0354BC 800348BC 24040001 */ li $a0, 1 -/* 0354C0 800348C0 46048180 */ add.s $f6, $f16, $f4 -/* 0354C4 800348C4 27A60040 */ addiu $a2, $sp, 0x40 -/* 0354C8 800348C8 E7A60040 */ swc1 $f6, 0x40($sp) -/* 0354CC 800348CC C60A0020 */ lwc1 $f10, 0x20($s0) -/* 0354D0 800348D0 C6080010 */ lwc1 $f8, 0x10($s0) -/* 0354D4 800348D4 46005482 */ mul.s $f18, $f10, $f0 -/* 0354D8 800348D8 2407FFFF */ li $a3, -1 -/* 0354DC 800348DC 46124400 */ add.s $f16, $f8, $f18 -/* 0354E0 800348E0 44819000 */ mtc1 $at, $f18 -/* 0354E4 800348E4 E7B00044 */ swc1 $f16, 0x44($sp) -/* 0354E8 800348E8 C6060024 */ lwc1 $f6, 0x24($s0) -/* 0354EC 800348EC C6040014 */ lwc1 $f4, 0x14($s0) -/* 0354F0 800348F0 46003282 */ mul.s $f10, $f6, $f0 -/* 0354F4 800348F4 E7A0005C */ swc1 $f0, 0x5c($sp) -/* 0354F8 800348F8 A3A8004F */ sb $t0, 0x4f($sp) -/* 0354FC 800348FC AFA50034 */ sw $a1, 0x34($sp) -/* 035500 80034900 460A2200 */ add.s $f8, $f4, $f10 -/* 035504 80034904 E7B2003C */ swc1 $f18, 0x3c($sp) -/* 035508 80034908 0C00C44C */ jal func_80031130 -/* 03550C 8003490C E7A80048 */ swc1 $f8, 0x48($sp) -/* 035510 80034910 8FA40034 */ lw $a0, 0x34($sp) -/* 035514 80034914 24180001 */ li $t8, 1 -/* 035518 80034918 27B90038 */ addiu $t9, $sp, 0x38 -/* 03551C 8003491C AFA00038 */ sw $zero, 0x38($sp) -/* 035520 80034920 AFB90014 */ sw $t9, 0x14($sp) -/* 035524 80034924 AFB80010 */ sw $t8, 0x10($sp) -/* 035528 80034928 27A50040 */ addiu $a1, $sp, 0x40 -/* 03552C 8003492C 27A6003C */ addiu $a2, $sp, 0x3c -/* 035530 80034930 0C00C580 */ jal func_80031600 -/* 035534 80034934 27A7004E */ addiu $a3, $sp, 0x4e -/* 035538 80034938 8FA90038 */ lw $t1, 0x38($sp) -/* 03553C 8003493C 83A8004F */ lb $t0, 0x4f($sp) -/* 035540 80034940 C7A0005C */ lwc1 $f0, 0x5c($sp) -/* 035544 80034944 11200014 */ beqz $t1, .L80034998 -/* 035548 80034948 00000000 */ nop -/* 03554C 8003494C C7B00040 */ lwc1 $f16, 0x40($sp) -/* 035550 80034950 C606000C */ lwc1 $f6, 0xc($s0) -/* 035554 80034954 C6120010 */ lwc1 $f18, 0x10($s0) -/* 035558 80034958 46068101 */ sub.s $f4, $f16, $f6 -/* 03555C 8003495C 00000000 */ nop -/* 035560 80034960 46002283 */ div.s $f10, $f4, $f0 -/* 035564 80034964 E60A001C */ swc1 $f10, 0x1c($s0) -/* 035568 80034968 C7A80044 */ lwc1 $f8, 0x44($sp) -/* 03556C 8003496C C60A0014 */ lwc1 $f10, 0x14($s0) -/* 035570 80034970 46124401 */ sub.s $f16, $f8, $f18 -/* 035574 80034974 00000000 */ nop -/* 035578 80034978 46008183 */ div.s $f6, $f16, $f0 -/* 03557C 8003497C E6060020 */ swc1 $f6, 0x20($s0) -/* 035580 80034980 C7A40048 */ lwc1 $f4, 0x48($sp) -/* 035584 80034984 00000000 */ nop -/* 035588 80034988 460A2201 */ sub.s $f8, $f4, $f10 -/* 03558C 8003498C 00000000 */ nop -/* 035590 80034990 46004483 */ div.s $f18, $f8, $f0 -/* 035594 80034994 E6120024 */ swc1 $f18, 0x24($s0) -.L80034998: -/* 035598 80034998 C610001C */ lwc1 $f16, 0x1c($s0) -/* 03559C 8003499C C6040020 */ lwc1 $f4, 0x20($s0) -/* 0355A0 800349A0 46008182 */ mul.s $f6, $f16, $f0 -/* 0355A4 800349A4 C6080024 */ lwc1 $f8, 0x24($s0) -/* 0355A8 800349A8 A3A8004F */ sb $t0, 0x4f($sp) -/* 0355AC 800349AC 02002025 */ move $a0, $s0 -/* 0355B0 800349B0 46002282 */ mul.s $f10, $f4, $f0 -/* 0355B4 800349B4 44053000 */ mfc1 $a1, $f6 -/* 0355B8 800349B8 46004482 */ mul.s $f18, $f8, $f0 -/* 0355BC 800349BC 44065000 */ mfc1 $a2, $f10 -/* 0355C0 800349C0 44079000 */ mfc1 $a3, $f18 -/* 0355C4 800349C4 0C00455C */ jal func_80011570 -/* 0355C8 800349C8 00000000 */ nop -/* 0355CC 800349CC 8FAA0038 */ lw $t2, 0x38($sp) -/* 0355D0 800349D0 83A8004F */ lb $t0, 0x4f($sp) -/* 0355D4 800349D4 1140000E */ beqz $t2, .L80034A10 -/* 0355D8 800349D8 3C014210 */ li $at, 0x42100000 # 36.000000 -/* 0355DC 800349DC C6100010 */ lwc1 $f16, 0x10($s0) -/* 0355E0 800349E0 44813000 */ mtc1 $at, $f6 -/* 0355E4 800349E4 3C01800E */ lui $at, %hi(D_800E6000) # $at, 0x800e -/* 0355E8 800349E8 C60C000C */ lwc1 $f12, 0xc($s0) -/* 0355EC 800349EC 8E060014 */ lw $a2, 0x14($s0) -/* 0355F0 800349F0 C4246000 */ lwc1 $f4, %lo(D_800E6000)($at) -/* 0355F4 800349F4 AFA00018 */ sw $zero, 0x18($sp) -/* 0355F8 800349F8 AFA00010 */ sw $zero, 0x10($sp) -/* 0355FC 800349FC 2407002C */ li $a3, 44 -/* 035600 80034A00 46068381 */ sub.s $f14, $f16, $f6 -/* 035604 80034A04 0C00FF11 */ jal func_8003FC44 -/* 035608 80034A08 E7A40014 */ swc1 $f4, 0x14($sp) -/* 03560C 80034A0C 24080001 */ li $t0, 1 -.L80034A10: -/* 035610 80034A10 8E020078 */ lw $v0, 0x78($s0) -/* 035614 80034A14 8FAB0064 */ lw $t3, 0x64($sp) -/* 035618 80034A18 18400003 */ blez $v0, .L80034A28 -/* 03561C 80034A1C 004B6023 */ subu $t4, $v0, $t3 -/* 035620 80034A20 10000002 */ b .L80034A2C -/* 035624 80034A24 AE0C0078 */ sw $t4, 0x78($s0) -.L80034A28: -/* 035628 80034A28 24080001 */ li $t0, 1 -.L80034A2C: -/* 03562C 80034A2C 8E03004C */ lw $v1, 0x4c($s0) -/* 035630 80034A30 00000000 */ nop -/* 035634 80034A34 906D0013 */ lbu $t5, 0x13($v1) -/* 035638 80034A38 00000000 */ nop -/* 03563C 80034A3C 29A10050 */ slti $at, $t5, 0x50 -/* 035640 80034A40 10200023 */ beqz $at, .L80034AD0 -/* 035644 80034A44 00000000 */ nop -/* 035648 80034A48 8C620000 */ lw $v0, ($v1) -/* 03564C 80034A4C 00000000 */ nop -/* 035650 80034A50 1040001F */ beqz $v0, .L80034AD0 -/* 035654 80034A54 00000000 */ nop -/* 035658 80034A58 844E0048 */ lh $t6, 0x48($v0) -/* 03565C 80034A5C 24040001 */ li $a0, 1 -/* 035660 80034A60 148E001B */ bne $a0, $t6, .L80034AD0 -/* 035664 80034A64 2407002C */ li $a3, 44 -/* 035668 80034A68 8C430064 */ lw $v1, 0x64($v0) -/* 03566C 80034A6C 2401FFFF */ li $at, -1 -/* 035670 80034A70 846F0000 */ lh $t7, ($v1) -/* 035674 80034A74 24080001 */ li $t0, 1 -/* 035678 80034A78 11E10002 */ beq $t7, $at, .L80034A84 -/* 03567C 80034A7C 24190011 */ li $t9, 17 -/* 035680 80034A80 A0640187 */ sb $a0, 0x187($v1) -.L80034A84: -/* 035684 80034A84 8E02007C */ lw $v0, 0x7c($s0) -/* 035688 80034A88 241800B4 */ li $t8, 180 -/* 03568C 80034A8C 10400002 */ beqz $v0, .L80034A98 -/* 035690 80034A90 3C014210 */ li $at, 0x42100000 # 36.000000 -/* 035694 80034A94 A458000C */ sh $t8, 0xc($v0) -.L80034A98: -/* 035698 80034A98 C60A0010 */ lwc1 $f10, 0x10($s0) -/* 03569C 80034A9C 44814000 */ mtc1 $at, $f8 -/* 0356A0 80034AA0 C60C000C */ lwc1 $f12, 0xc($s0) -/* 0356A4 80034AA4 8E060014 */ lw $a2, 0x14($s0) -/* 0356A8 80034AA8 3C013F00 */ li $at, 0x3F000000 # 0.500000 -/* 0356AC 80034AAC 44819000 */ mtc1 $at, $f18 -/* 0356B0 80034AB0 A3A8004F */ sb $t0, 0x4f($sp) -/* 0356B4 80034AB4 AFA00018 */ sw $zero, 0x18($sp) -/* 0356B8 80034AB8 AFB90010 */ sw $t9, 0x10($sp) -/* 0356BC 80034ABC 46085381 */ sub.s $f14, $f10, $f8 -/* 0356C0 80034AC0 0C00FF11 */ jal func_8003FC44 -/* 0356C4 80034AC4 E7B20014 */ swc1 $f18, 0x14($sp) -/* 0356C8 80034AC8 83A8004F */ lb $t0, 0x4f($sp) -/* 0356CC 80034ACC 00000000 */ nop -.L80034AD0: -/* 0356D0 80034AD0 11000004 */ beqz $t0, .L80034AE4 -/* 0356D4 80034AD4 8FBF002C */ lw $ra, 0x2c($sp) -/* 0356D8 80034AD8 0C003FEE */ jal gParticlePtrList_addObject -/* 0356DC 80034ADC 02002025 */ move $a0, $s0 -/* 0356E0 80034AE0 8FBF002C */ lw $ra, 0x2c($sp) -.L80034AE4: -/* 0356E4 80034AE4 8FB00028 */ lw $s0, 0x28($sp) -/* 0356E8 80034AE8 03E00008 */ jr $ra -/* 0356EC 80034AEC 27BD0060 */ addiu $sp, $sp, 0x60 - diff --git a/asm/non_matchings/unknown_032760/func_80037A18.s b/asm/non_matchings/unknown_032760/obj_init_animation.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80037A18.s rename to asm/non_matchings/unknown_032760/obj_init_animation.s index d0e45cf3..f5b4067c 100644 --- a/asm/non_matchings/unknown_032760/func_80037A18.s +++ b/asm/non_matchings/unknown_032760/obj_init_animation.s @@ -1,4 +1,4 @@ -glabel func_80037A18 +glabel obj_init_animation /* 038618 80037A18 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03861C 80037A1C AFBF001C */ sw $ra, 0x1c($sp) /* 038620 80037A20 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003FD68.s b/asm/non_matchings/unknown_032760/obj_init_audio.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003FD68.s rename to asm/non_matchings/unknown_032760/obj_init_audio.s index 5af695b5..dfcb8d2b 100644 --- a/asm/non_matchings/unknown_032760/func_8003FD68.s +++ b/asm/non_matchings/unknown_032760/obj_init_audio.s @@ -1,4 +1,4 @@ -glabel func_8003FD68 +glabel obj_init_audio /* 040968 8003FD68 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 04096C 8003FD6C AFBF003C */ sw $ra, 0x3c($sp) /* 040970 8003FD70 AFB00038 */ sw $s0, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80038B74.s b/asm/non_matchings/unknown_032760/obj_init_bombexplosion.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_80038B74.s rename to asm/non_matchings/unknown_032760/obj_init_bombexplosion.s index dc4f57e3..8baeaa00 100644 --- a/asm/non_matchings/unknown_032760/func_80038B74.s +++ b/asm/non_matchings/unknown_032760/obj_init_bombexplosion.s @@ -1,4 +1,4 @@ -glabel func_80038B74 +glabel obj_init_bombexplosion /* 039774 80038B74 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 039778 80038B78 3C013F00 */ li $at, 0x3F000000 # 0.500000 /* 03977C 80038B7C 44812000 */ mtc1 $at, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800409C8.s b/asm/non_matchings/unknown_032760/obj_init_butterfly.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800409C8.s rename to asm/non_matchings/unknown_032760/obj_init_butterfly.s index a50b41c4..0c4babe6 100644 --- a/asm/non_matchings/unknown_032760/func_800409C8.s +++ b/asm/non_matchings/unknown_032760/obj_init_butterfly.s @@ -3,7 +3,7 @@ glabel D_800E6218 .float 0.01 .text -glabel func_800409C8 +glabel obj_init_butterfly /* 0415C8 800409C8 AFA50004 */ sw $a1, 4($sp) /* 0415CC 800409CC 8C820064 */ lw $v0, 0x64($a0) /* 0415D0 800409D0 14C0003B */ bnez $a2, .L80040AC0 diff --git a/asm/non_matchings/unknown_032760/func_8003B7CC.s b/asm/non_matchings/unknown_032760/obj_init_door.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B7CC.s rename to asm/non_matchings/unknown_032760/obj_init_door.s index 5b106911..2e9c57a0 100644 --- a/asm/non_matchings/unknown_032760/func_8003B7CC.s +++ b/asm/non_matchings/unknown_032760/obj_init_door.s @@ -3,7 +3,7 @@ glabel D_800E5FB4 .asciz "Illegal door no!!!\n" .text -glabel func_8003B7CC +glabel obj_init_door /* 03C3CC 8003B7CC 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03C3D0 8003B7D0 AFBF001C */ sw $ra, 0x1c($sp) /* 03C3D4 8003B7D4 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80036C30.s b/asm/non_matchings/unknown_032760/obj_init_fish.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80036C30.s rename to asm/non_matchings/unknown_032760/obj_init_fish.s index c964abab..7ad7af13 100644 --- a/asm/non_matchings/unknown_032760/func_80036C30.s +++ b/asm/non_matchings/unknown_032760/obj_init_fish.s @@ -3,7 +3,7 @@ glabel D_800E6048 .float 0.01 .text -glabel func_80036C30 +glabel obj_init_fish /* 037830 80036C30 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 037834 80036C34 AFBF0024 */ sw $ra, 0x24($sp) /* 037838 80036C38 AFB20020 */ sw $s2, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003B368.s b/asm/non_matchings/unknown_032760/obj_init_goldenballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B368.s rename to asm/non_matchings/unknown_032760/obj_init_goldenballoon.s index 574faaf5..33d6d4db 100644 --- a/asm/non_matchings/unknown_032760/func_8003B368.s +++ b/asm/non_matchings/unknown_032760/obj_init_goldenballoon.s @@ -3,7 +3,7 @@ glabel D_800E5FA0 .asciz "Illegal door no!!!\n" .text -glabel func_8003B368 +glabel obj_init_goldenballoon /* 03BF68 8003B368 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 03BF6C 8003B36C AFBF001C */ sw $ra, 0x1c($sp) /* 03BF70 8003B370 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035AE8.s b/asm/non_matchings/unknown_032760/obj_init_groundzipper.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035AE8.s rename to asm/non_matchings/unknown_032760/obj_init_groundzipper.s index 5830ac91..87b5d5bd 100644 --- a/asm/non_matchings/unknown_032760/func_80035AE8.s +++ b/asm/non_matchings/unknown_032760/obj_init_groundzipper.s @@ -1,4 +1,4 @@ -glabel func_80035AE8 +glabel obj_init_groundzipper /* 0366E8 80035AE8 27BDFFE8 */ addiu $sp, $sp, -0x18 /* 0366EC 80035AEC AFBF0014 */ sw $ra, 0x14($sp) /* 0366F0 80035AF0 90AF0009 */ lbu $t7, 9($a1) diff --git a/asm/non_matchings/unknown_032760/func_80041A90.s b/asm/non_matchings/unknown_032760/obj_init_midifade.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80041A90.s rename to asm/non_matchings/unknown_032760/obj_init_midifade.s index 2b5341fb..d99b7675 100644 --- a/asm/non_matchings/unknown_032760/func_80041A90.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifade.s @@ -1,4 +1,4 @@ -glabel func_80041A90 +glabel obj_init_midifade /* 042690 80041A90 27BDFF00 */ addiu $sp, $sp, -0x100 /* 042694 80041A94 AFBF003C */ sw $ra, 0x3c($sp) /* 042698 80041A98 AFB00038 */ sw $s0, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80041E80.s b/asm/non_matchings/unknown_032760/obj_init_midifadepoint.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80041E80.s rename to asm/non_matchings/unknown_032760/obj_init_midifadepoint.s index 01140733..fe5e581c 100644 --- a/asm/non_matchings/unknown_032760/func_80041E80.s +++ b/asm/non_matchings/unknown_032760/obj_init_midifadepoint.s @@ -1,4 +1,4 @@ -glabel func_80041E80 +glabel obj_init_midifadepoint /* 042A80 80041E80 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 042A84 80041E84 AFBF001C */ sw $ra, 0x1c($sp) /* 042A88 80041E88 AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_80033CC0.s b/asm/non_matchings/unknown_032760/obj_init_scenery.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80033CC0.s rename to asm/non_matchings/unknown_032760/obj_init_scenery.s index d4602c15..1dcdd562 100644 --- a/asm/non_matchings/unknown_032760/func_80033CC0.s +++ b/asm/non_matchings/unknown_032760/obj_init_scenery.s @@ -1,4 +1,4 @@ -glabel func_80033CC0 +glabel obj_init_scenery /* 0348C0 80033CC0 848E0006 */ lh $t6, 6($a0) /* 0348C4 80033CC4 3C014120 */ li $at, 0x41200000 # 10.000000 /* 0348C8 80033CC8 35CF0002 */ ori $t7, $t6, 2 diff --git a/asm/non_matchings/unknown_032760/func_8003C644.s b/asm/non_matchings/unknown_032760/obj_init_trigger.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C644.s rename to asm/non_matchings/unknown_032760/obj_init_trigger.s index f8af78a0..bbe58d9e 100644 --- a/asm/non_matchings/unknown_032760/func_8003C644.s +++ b/asm/non_matchings/unknown_032760/obj_init_trigger.s @@ -3,7 +3,7 @@ glabel D_800E5FC8 .asciz "Illegal door no!!!\n" .text -glabel func_8003C644 +glabel obj_init_trigger /* 03D244 8003C644 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 03D248 8003C648 AFBF001C */ sw $ra, 0x1c($sp) /* 03D24C 8003C64C AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003596C.s b/asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003596C.s rename to asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s index d01aeab7..c1b5fdcc 100644 --- a/asm/non_matchings/unknown_032760/func_8003596C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s @@ -1,4 +1,4 @@ -glabel func_8003596C +glabel obj_loop_airzippers_waterzippers /* 03656C 8003596C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 036570 80035970 AFBF002C */ sw $ra, 0x2c($sp) /* 036574 80035974 AFB30024 */ sw $s3, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_800377E4.s b/asm/non_matchings/unknown_032760/obj_loop_animator.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800377E4.s rename to asm/non_matchings/unknown_032760/obj_loop_animator.s index 0bcfe4ca..87f282a7 100644 --- a/asm/non_matchings/unknown_032760/func_800377E4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_animator.s @@ -1,4 +1,4 @@ -glabel func_800377E4 +glabel obj_loop_animator /* 0383E4 800377E4 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 0383E8 800377E8 AFBF0014 */ sw $ra, 0x14($sp) /* 0383EC 800377EC 8C830064 */ lw $v1, 0x64($a0) diff --git a/asm/non_matchings/unknown_032760/func_80038BF4.s b/asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80038BF4.s rename to asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s index a87a497c..bf70385d 100644 --- a/asm/non_matchings/unknown_032760/func_80038BF4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s @@ -1,4 +1,4 @@ -glabel func_80038BF4 +glabel obj_loop_bombexplosion /* 0397F4 80038BF4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 0397F8 80038BF8 AFBF002C */ sw $ra, 0x2c($sp) /* 0397FC 80038BFC AFB00028 */ sw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003B174.s b/asm/non_matchings/unknown_032760/obj_loop_bonus.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B174.s rename to asm/non_matchings/unknown_032760/obj_loop_bonus.s index eebfe381..d40e9d3a 100644 --- a/asm/non_matchings/unknown_032760/func_8003B174.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bonus.s @@ -1,4 +1,4 @@ -glabel func_8003B174 +glabel obj_loop_bonus /* 03BD74 8003B174 27BDFF70 */ addiu $sp, $sp, -0x90 /* 03BD78 8003B178 AFBF0054 */ sw $ra, 0x54($sp) /* 03BD7C 8003B17C AFB60050 */ sw $s6, 0x50($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003CA68.s b/asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003CA68.s rename to asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s index d0170d05..d41b84b6 100644 --- a/asm/non_matchings/unknown_032760/func_8003CA68.s +++ b/asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s @@ -3,7 +3,7 @@ glabel D_800E6178 .double 1.2 .text -glabel func_8003CA68 +glabel obj_loop_bridge_whaleramp /* 03D668 8003CA68 27BDFF90 */ addiu $sp, $sp, -0x70 /* 03D66C 8003CA6C 44852000 */ mtc1 $a1, $f4 /* 03D670 8003CA70 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040C54.s b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040C54.s rename to asm/non_matchings/unknown_032760/obj_loop_butterfly.s index 89d95d0b..86fc3b4a 100644 --- a/asm/non_matchings/unknown_032760/func_80040C54.s +++ b/asm/non_matchings/unknown_032760/obj_loop_butterfly.s @@ -17,7 +17,7 @@ glabel D_800E6248 .float 1.6 .text -glabel func_80040C54 +glabel obj_loop_butterfly /* 041854 80040C54 27BDFF68 */ addiu $sp, $sp, -0x98 /* 041858 80040C58 AFBF0024 */ sw $ra, 0x24($sp) /* 04185C 80040C5C AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003833C.s b/asm/non_matchings/unknown_032760/obj_loop_char_select.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003833C.s rename to asm/non_matchings/unknown_032760/obj_loop_char_select.s index d768009c..a737a858 100644 --- a/asm/non_matchings/unknown_032760/func_8003833C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_char_select.s @@ -1,4 +1,4 @@ -glabel func_8003833C +glabel obj_loop_char_select /* 038F3C 8003833C 27BDFF88 */ addiu $sp, $sp, -0x78 /* 038F40 80038340 AFBF0024 */ sw $ra, 0x24($sp) /* 038F44 80038344 AFB2001C */ sw $s2, 0x1c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D5A0.s b/asm/non_matchings/unknown_032760/obj_loop_coin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D5A0.s rename to asm/non_matchings/unknown_032760/obj_loop_coin.s index 7771afb1..7f427159 100644 --- a/asm/non_matchings/unknown_032760/func_8003D5A0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_coin.s @@ -7,7 +7,7 @@ glabel D_800E61A0 .float -10000.0 .text -glabel func_8003D5A0 +glabel obj_loop_coin /* 03E1A0 8003D5A0 44852000 */ mtc1 $a1, $f4 /* 03E1A4 8003D5A4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 /* 03E1A8 8003D5A8 468020A0 */ cvt.s.w $f2, $f4 diff --git a/asm/non_matchings/unknown_032760/func_8003D3FC.s b/asm/non_matchings/unknown_032760/obj_loop_coincreator.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D3FC.s rename to asm/non_matchings/unknown_032760/obj_loop_coincreator.s index bdb194dc..f347fcb6 100644 --- a/asm/non_matchings/unknown_032760/func_8003D3FC.s +++ b/asm/non_matchings/unknown_032760/obj_loop_coincreator.s @@ -1,4 +1,4 @@ -glabel func_8003D3FC +glabel obj_loop_coincreator /* 03DFFC 8003D3FC 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03E000 8003D400 AFBF002C */ sw $ra, 0x2c($sp) /* 03E004 8003D404 AFB00028 */ sw $s0, 0x28($sp) diff --git a/asm/non_matchings/unknown_032760/func_80035260.s b/asm/non_matchings/unknown_032760/obj_loop_collectegg.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035260.s rename to asm/non_matchings/unknown_032760/obj_loop_collectegg.s index 92a4eeeb..22a2eb0b 100644 --- a/asm/non_matchings/unknown_032760/func_80035260.s +++ b/asm/non_matchings/unknown_032760/obj_loop_collectegg.s @@ -7,7 +7,7 @@ glabel D_800E6020 .double 0.95 .text -glabel func_80035260 +glabel obj_loop_collectegg /* 035E60 80035260 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035E64 80035264 44852000 */ mtc1 $a1, $f4 /* 035E68 80035268 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003B988.s b/asm/non_matchings/unknown_032760/obj_loop_door.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B988.s rename to asm/non_matchings/unknown_032760/obj_loop_door.s index dd0f6c00..4a99eee0 100644 --- a/asm/non_matchings/unknown_032760/func_8003B988.s +++ b/asm/non_matchings/unknown_032760/obj_loop_door.s @@ -5,7 +5,7 @@ glabel D_800E6170 .double 130.0 .text -glabel func_8003B988 +glabel obj_loop_door /* 03C588 8003B988 27BDFFA0 */ addiu $sp, $sp, -0x60 /* 03C58C 8003B98C 44852000 */ mtc1 $a1, $f4 /* 03C590 8003B990 AFBF0024 */ sw $ra, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_80034B74.s b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80034B74.s rename to asm/non_matchings/unknown_032760/obj_loop_effectbox.s index 5a7df6fd..86220401 100644 --- a/asm/non_matchings/unknown_032760/func_80034B74.s +++ b/asm/non_matchings/unknown_032760/obj_loop_effectbox.s @@ -1,4 +1,4 @@ -glabel func_80034B74 +glabel obj_loop_effectbox /* 035774 80034B74 27BDFF68 */ addiu $sp, $sp, -0x98 /* 035778 80034B78 AFBF004C */ sw $ra, 0x4c($sp) /* 03577C 80034B7C AFB00048 */ sw $s0, 0x48($sp) diff --git a/asm/non_matchings/unknown_032760/func_80038F58.s b/asm/non_matchings/unknown_032760/obj_loop_exit.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80038F58.s rename to asm/non_matchings/unknown_032760/obj_loop_exit.s index d20f655b..e2d5a882 100644 --- a/asm/non_matchings/unknown_032760/func_80038F58.s +++ b/asm/non_matchings/unknown_032760/obj_loop_exit.s @@ -1,4 +1,4 @@ -glabel func_80038F58 +glabel obj_loop_exit /* 039B58 80038F58 27BDFF80 */ addiu $sp, $sp, -0x80 /* 039B5C 80038F5C AFBF0044 */ sw $ra, 0x44($sp) /* 039B60 80038F60 AFB70040 */ sw $s7, 0x40($sp) diff --git a/asm/non_matchings/unknown_032760/func_80033F60.s b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80033F60.s rename to asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s index 9b7231a8..e6cc1576 100644 --- a/asm/non_matchings/unknown_032760/func_80033F60.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s @@ -7,7 +7,7 @@ glabel D_800E5FF0 .double 0.9 .text -glabel func_80033F60 +glabel obj_loop_fireball_octoweapon /* 034B60 80033F60 27BDFF78 */ addiu $sp, $sp, -0x88 /* 034B64 80033F64 44852000 */ mtc1 $a1, $f4 /* 034B68 80033F68 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_800370D4.s b/asm/non_matchings/unknown_032760/obj_loop_fish.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800370D4.s rename to asm/non_matchings/unknown_032760/obj_loop_fish.s index 38f62ca9..5b2a52c0 100644 --- a/asm/non_matchings/unknown_032760/func_800370D4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_fish.s @@ -1,4 +1,4 @@ -glabel func_800370D4 +glabel obj_loop_fish /* 037CD4 800370D4 27BDFF90 */ addiu $sp, $sp, -0x70 /* 037CD8 800370D8 AFBF001C */ sw $ra, 0x1c($sp) /* 037CDC 800370DC AFB10018 */ sw $s1, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D2B8.s b/asm/non_matchings/unknown_032760/obj_loop_flycoin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D2B8.s rename to asm/non_matchings/unknown_032760/obj_loop_flycoin.s index 4b19a198..db5fce08 100644 --- a/asm/non_matchings/unknown_032760/func_8003D2B8.s +++ b/asm/non_matchings/unknown_032760/obj_loop_flycoin.s @@ -3,7 +3,7 @@ glabel D_800E6188 .double 1.2 .text -glabel func_8003D2B8 +glabel obj_loop_flycoin /* 03DEB8 8003D2B8 44852000 */ mtc1 $a1, $f4 /* 03DEBC 8003D2BC 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 /* 03DEC0 8003D2C0 468020A0 */ cvt.s.w $f2, $f4 diff --git a/asm/non_matchings/unknown_032760/func_800422F0.s b/asm/non_matchings/unknown_032760/obj_loop_frog.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800422F0.s rename to asm/non_matchings/unknown_032760/obj_loop_frog.s index cb7162a8..2487f15a 100644 --- a/asm/non_matchings/unknown_032760/func_800422F0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_frog.s @@ -13,7 +13,7 @@ glabel D_800E6278 .float 0.15 .text -glabel func_800422F0 +glabel obj_loop_frog /* 042EF0 800422F0 27BDFEF0 */ addiu $sp, $sp, -0x110 /* 042EF4 800422F4 44852000 */ mtc1 $a1, $f4 /* 042EF8 800422F8 3C0E8000 */ lui $t6, %hi(osTvType) # $t6, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_8003B4BC.s b/asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003B4BC.s rename to asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s index 02afdf05..0089d37a 100644 --- a/asm/non_matchings/unknown_032760/func_8003B4BC.s +++ b/asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s @@ -3,7 +3,7 @@ glabel D_800E6160 .double 1.2 .text -glabel func_8003B4BC +glabel obj_loop_goldenballoon /* 03C0BC 8003B4BC 44852000 */ mtc1 $a1, $f4 /* 03C0C0 8003B4C0 27BDFFB0 */ addiu $sp, $sp, -0x50 /* 03C0C4 8003B4C4 3C0F8000 */ lui $t7, %hi(osTvType) # $t7, 0x8000 diff --git a/asm/non_matchings/unknown_032760/func_80035C50.s b/asm/non_matchings/unknown_032760/obj_loop_groundzipper.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80035C50.s rename to asm/non_matchings/unknown_032760/obj_loop_groundzipper.s index 2d8cc9f8..4e4dda29 100644 --- a/asm/non_matchings/unknown_032760/func_80035C50.s +++ b/asm/non_matchings/unknown_032760/obj_loop_groundzipper.s @@ -1,4 +1,4 @@ -glabel func_80035C50 +glabel obj_loop_groundzipper /* 036850 80035C50 27BDFF98 */ addiu $sp, $sp, -0x68 /* 036854 80035C54 AFBF003C */ sw $ra, 0x3c($sp) /* 036858 80035C58 AFB60038 */ sw $s6, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_800345A0.s b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800345A0.s rename to asm/non_matchings/unknown_032760/obj_loop_lasergun.s index 4c46f8b0..a77ab058 100644 --- a/asm/non_matchings/unknown_032760/func_800345A0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_lasergun.s @@ -1,4 +1,4 @@ -glabel func_800345A0 +glabel obj_loop_lasergun /* 0351A0 800345A0 27BDFF38 */ addiu $sp, $sp, -0xc8 /* 0351A4 800345A4 AFBF003C */ sw $ra, 0x3c($sp) /* 0351A8 800345A8 AFB10038 */ sw $s1, 0x38($sp) diff --git a/asm/non_matchings/unknown_032760/func_80042A90.s b/asm/non_matchings/unknown_032760/obj_loop_levelname.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80042A90.s rename to asm/non_matchings/unknown_032760/obj_loop_levelname.s index 94204ac9..8d02cbd6 100644 --- a/asm/non_matchings/unknown_032760/func_80042A90.s +++ b/asm/non_matchings/unknown_032760/obj_loop_levelname.s @@ -1,4 +1,4 @@ -glabel func_80042A90 +glabel obj_loop_levelname /* 043690 80042A90 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 043694 80042A94 AFBF0024 */ sw $ra, 0x24($sp) /* 043698 80042A98 00803025 */ move $a2, $a0 diff --git a/asm/non_matchings/unknown_032760/func_80040570.s b/asm/non_matchings/unknown_032760/obj_loop_log.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040570.s rename to asm/non_matchings/unknown_032760/obj_loop_log.s index 86286164..339eaf7f 100644 --- a/asm/non_matchings/unknown_032760/func_80040570.s +++ b/asm/non_matchings/unknown_032760/obj_loop_log.s @@ -1,4 +1,4 @@ -glabel func_80040570 +glabel obj_loop_log /* 041170 80040570 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 041174 80040574 AFBF0014 */ sw $ra, 0x14($sp) /* 041178 80040578 AFA5002C */ sw $a1, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003AE50.s b/asm/non_matchings/unknown_032760/obj_loop_modechange.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003AE50.s rename to asm/non_matchings/unknown_032760/obj_loop_modechange.s index 6ae59fe8..b444a17f 100644 --- a/asm/non_matchings/unknown_032760/func_8003AE50.s +++ b/asm/non_matchings/unknown_032760/obj_loop_modechange.s @@ -1,4 +1,4 @@ -glabel func_8003AE50 +glabel obj_loop_modechange /* 03BA50 8003AE50 27BDFF80 */ addiu $sp, $sp, -0x80 /* 03BA54 8003AE54 AFBF0044 */ sw $ra, 0x44($sp) /* 03BA58 8003AE58 AFB70040 */ sw $s7, 0x40($sp) diff --git a/asm/non_matchings/unknown_032760/func_80039330.s b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80039330.s rename to asm/non_matchings/unknown_032760/obj_loop_parkwarden.s index 606a17af..0c14f44f 100644 --- a/asm/non_matchings/unknown_032760/func_80039330.s +++ b/asm/non_matchings/unknown_032760/obj_loop_parkwarden.s @@ -19,7 +19,7 @@ glabel D_800E6158 .double 2.2 .text -glabel func_80039330 +glabel obj_loop_parkwarden /* 039F30 80039330 27BDFF50 */ addiu $sp, $sp, -0xb0 /* 039F34 80039334 44853000 */ mtc1 $a1, $f6 /* 039F38 80039338 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003763C.s b/asm/non_matchings/unknown_032760/obj_loop_posarrow.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_8003763C.s rename to asm/non_matchings/unknown_032760/obj_loop_posarrow.s index 45287811..515b9cae 100644 --- a/asm/non_matchings/unknown_032760/func_8003763C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_posarrow.s @@ -1,4 +1,4 @@ -glabel func_8003763C +glabel obj_loop_posarrow /* 03823C 8003763C 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 038240 80037640 AFBF0014 */ sw $ra, 0x14($sp) /* 038244 80037644 AFA40030 */ sw $a0, 0x30($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003DD14.s b/asm/non_matchings/unknown_032760/obj_loop_silvercoin.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003DD14.s rename to asm/non_matchings/unknown_032760/obj_loop_silvercoin.s index a5200d01..7024ae22 100644 --- a/asm/non_matchings/unknown_032760/func_8003DD14.s +++ b/asm/non_matchings/unknown_032760/obj_loop_silvercoin.s @@ -1,4 +1,4 @@ -glabel func_8003DD14 +glabel obj_loop_silvercoin /* 03E914 8003DD14 27BDFFE0 */ addiu $sp, $sp, -0x20 /* 03E918 8003DD18 AFBF0014 */ sw $ra, 0x14($sp) /* 03E91C 8003DD1C AFA50024 */ sw $a1, 0x24($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003827C.s b/asm/non_matchings/unknown_032760/obj_loop_snowball.s similarity index 98% rename from asm/non_matchings/unknown_032760/func_8003827C.s rename to asm/non_matchings/unknown_032760/obj_loop_snowball.s index 72f6a460..12d740d1 100644 --- a/asm/non_matchings/unknown_032760/func_8003827C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_snowball.s @@ -1,4 +1,4 @@ -glabel func_8003827C +glabel obj_loop_snowball /* 038E7C 8003827C 27BDFFD8 */ addiu $sp, $sp, -0x28 /* 038E80 80038280 AFBF0024 */ sw $ra, 0x24($sp) /* 038E84 80038284 AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_800361E0.s b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_800361E0.s rename to asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s index 9c50ab97..32e66350 100644 --- a/asm/non_matchings/unknown_032760/func_800361E0.s +++ b/asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s @@ -9,7 +9,7 @@ glabel D_800E6040 .double 0.05 .text -glabel func_800361E0 +glabel obj_loop_stopwatchman /* 036DE0 800361E0 27BDFF80 */ addiu $sp, $sp, -0x80 /* 036DE4 800361E4 44853000 */ mtc1 $a1, $f6 /* 036DE8 800361E8 AFBF002C */ sw $ra, 0x2c($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040148.s b/asm/non_matchings/unknown_032760/obj_loop_texscroll.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040148.s rename to asm/non_matchings/unknown_032760/obj_loop_texscroll.s index 8d32dfac..65e2b1d6 100644 --- a/asm/non_matchings/unknown_032760/func_80040148.s +++ b/asm/non_matchings/unknown_032760/obj_loop_texscroll.s @@ -1,4 +1,4 @@ -glabel func_80040148 +glabel obj_loop_texscroll /* 040D48 80040148 27BDFFC8 */ addiu $sp, $sp, -0x38 /* 040D4C 8004014C AFBF001C */ sw $ra, 0x1c($sp) /* 040D50 80040150 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003D058.s b/asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003D058.s rename to asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s index ea3d27d8..a836035e 100644 --- a/asm/non_matchings/unknown_032760/func_8003D058.s +++ b/asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s @@ -3,7 +3,7 @@ glabel D_800E6180 .float 50625.0 .text -glabel func_8003D058 +glabel obj_loop_treasuresucker /* 03DC58 8003D058 27BDFFB8 */ addiu $sp, $sp, -0x48 /* 03DC5C 8003D05C AFBF0014 */ sw $ra, 0x14($sp) /* 03DC60 8003D060 AFA5004C */ sw $a1, 0x4c($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003C7A4.s b/asm/non_matchings/unknown_032760/obj_loop_trigger.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C7A4.s rename to asm/non_matchings/unknown_032760/obj_loop_trigger.s index 83f09c5b..c744bf5f 100644 --- a/asm/non_matchings/unknown_032760/func_8003C7A4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_trigger.s @@ -1,4 +1,4 @@ -glabel func_8003C7A4 +glabel obj_loop_trigger /* 03D3A4 8003C7A4 27BDFF68 */ addiu $sp, $sp, -0x98 /* 03D3A8 8003C7A8 AFBF004C */ sw $ra, 0x4c($sp) /* 03D3AC 8003C7AC AFBE0048 */ sw $fp, 0x48($sp) diff --git a/asm/non_matchings/unknown_032760/func_80034E9C.s b/asm/non_matchings/unknown_032760/obj_loop_trophycab.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80034E9C.s rename to asm/non_matchings/unknown_032760/obj_loop_trophycab.s index 95679003..25c4cdbc 100644 --- a/asm/non_matchings/unknown_032760/func_80034E9C.s +++ b/asm/non_matchings/unknown_032760/obj_loop_trophycab.s @@ -5,7 +5,7 @@ glabel D_800E6008 .float 0.552 .text -glabel func_80034E9C +glabel obj_loop_trophycab /* 035A9C 80034E9C 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 035AA0 80034EA0 AFBF001C */ sw $ra, 0x1c($sp) /* 035AA4 80034EA4 AFB00018 */ sw $s0, 0x18($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003C2E4.s b/asm/non_matchings/unknown_032760/obj_loop_ttdoor.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003C2E4.s rename to asm/non_matchings/unknown_032760/obj_loop_ttdoor.s index 4ca7b9e4..a093e418 100644 --- a/asm/non_matchings/unknown_032760/func_8003C2E4.s +++ b/asm/non_matchings/unknown_032760/obj_loop_ttdoor.s @@ -1,4 +1,4 @@ -glabel func_8003C2E4 +glabel obj_loop_ttdoor /* 03CEE4 8003C2E4 27BDFFD0 */ addiu $sp, $sp, -0x30 /* 03CEE8 8003C2E8 AFBF0024 */ sw $ra, 0x24($sp) /* 03CEEC 8003C2EC AFB10020 */ sw $s1, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_8003E140.s b/asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_8003E140.s rename to asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s index 76c4efab..902f5dc6 100644 --- a/asm/non_matchings/unknown_032760/func_8003E140.s +++ b/asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s @@ -8,7 +8,7 @@ glabel D_800E61B8 .double 0.1 .text -glabel func_8003E140 +glabel obj_loop_weaponballoon /* 03ED40 8003E140 27BDFFC0 */ addiu $sp, $sp, -0x40 /* 03ED44 8003E144 AFBF0024 */ sw $ra, 0x24($sp) /* 03ED48 8003E148 AFB00020 */ sw $s0, 0x20($sp) diff --git a/asm/non_matchings/unknown_032760/func_80040820.s b/asm/non_matchings/unknown_032760/obj_loop_weather.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80040820.s rename to asm/non_matchings/unknown_032760/obj_loop_weather.s index 10ee2f48..649a0680 100644 --- a/asm/non_matchings/unknown_032760/func_80040820.s +++ b/asm/non_matchings/unknown_032760/obj_loop_weather.s @@ -1,4 +1,4 @@ -glabel func_80040820 +glabel obj_loop_weather /* 041420 80040820 27BDFFA8 */ addiu $sp, $sp, -0x58 /* 041424 80040824 AFBF001C */ sw $ra, 0x1c($sp) /* 041428 80040828 AFA40058 */ sw $a0, 0x58($sp) diff --git a/asm/non_matchings/unknown_032760/func_80037D78.s b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s similarity index 99% rename from asm/non_matchings/unknown_032760/func_80037D78.s rename to asm/non_matchings/unknown_032760/obj_loop_wizpigship.s index 5df349fa..fbdb2039 100644 --- a/asm/non_matchings/unknown_032760/func_80037D78.s +++ b/asm/non_matchings/unknown_032760/obj_loop_wizpigship.s @@ -1,4 +1,4 @@ -glabel func_80037D78 +glabel obj_loop_wizpigship /* 038978 80037D78 27BDFED8 */ addiu $sp, $sp, -0x128 /* 03897C 80037D7C AFB00038 */ sw $s0, 0x38($sp) /* 038980 80037D80 00808025 */ move $s0, $a0 diff --git a/asm/non_matchings/waves/func_800BFFDC.s b/asm/non_matchings/waves/obj_loop_wavepower.s similarity index 99% rename from asm/non_matchings/waves/func_800BFFDC.s rename to asm/non_matchings/waves/obj_loop_wavepower.s index f12c35ef..eec7976d 100644 --- a/asm/non_matchings/waves/func_800BFFDC.s +++ b/asm/non_matchings/waves/obj_loop_wavepower.s @@ -1,4 +1,4 @@ -glabel func_800BFFDC +glabel obj_loop_wavepower /* 0C0BDC 800BFFDC 3C0E800E */ lui $t6, %hi(D_800E3198) # $t6, 0x800e /* 0C0BE0 800BFFE0 8DCE3198 */ lw $t6, %lo(D_800E3198)($t6) /* 0C0BE4 800BFFE4 27BDFFA8 */ addiu $sp, $sp, -0x58 diff --git a/include/level_object_entries.h b/include/level_object_entries.h new file mode 100644 index 00000000..1f9d4f54 --- /dev/null +++ b/include/level_object_entries.h @@ -0,0 +1,457 @@ +#ifndef _LEVEL_OBJECT_ENTRIES_H_ +#define _LEVEL_OBJECT_ENTRIES_H_ + + /* Size: 8 bytes. Shared across every entry. */ +typedef struct LevelObjectEntryCommon { + u8 object_id; // 9-bit object ID to load (uses size's MSB). + u8 size; // 7-bit total entry length (MSB is used in object_id). + s16 x, y, z; // Position in level +} LevelObjectEntryCommon; + +typedef struct LevelObjectEntry_Racer { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Racer; + +typedef struct LevelObjectEntry_Scenery { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_Scenery; + +typedef struct LevelObjectEntry_Fish { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Fish; + +typedef struct LevelObjectEntry_Animator { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; + /* 0x09 */ s8 unk9; + /* 0x0A */ s8 unkA; +} LevelObjectEntry_Animator; + +typedef struct LevelObjectEntry_Weapon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Weapon; + +typedef struct LevelObjectEntry_Smoke { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Smoke; + +typedef struct LevelObjectEntry_Exit { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 pad8[8]; + /* 0x10 */ u8 unk10; + /* 0x11 */ u8 unk11; + /* 0x12 */ u8 pad12[6]; + /* 0x18 */ s8 unk18; +} LevelObjectEntry_Exit; + +typedef struct LevelObjectEntry_Audio { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Audio; + +typedef struct LevelObjectEntry_AudioLine { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u16 unkA; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 unkD; + /* 0x0E */ u16 unkE; + /* 0x10 */ u8 unk10; + /* 0x11 */ u8 unk11; + /* 0x12 */ u8 unk12; + /* 0x13 */ u8 unk13; +} LevelObjectEntry_AudioLine; + +typedef struct LevelObjectEntry_CameraControl { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; +} LevelObjectEntry_CameraControl; + +typedef struct LevelObjectEntry_SetupPoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_SetupPoint; + +typedef struct LevelObjectEntry_Dino_Whale { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Dino_Whale; + +typedef struct LevelObjectEntry_Checkpoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Checkpoint; + +typedef struct LevelObjectEntry_Door { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Door; + +typedef struct LevelObjectEntry_FogChanger { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_FogChanger; + +typedef struct LevelObjectEntry_AiNode { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_AiNode; + +#define BALLOON_TYPE_BOOST 0 +#define BALLOON_TYPE_MISSILE 1 +#define BALLOON_TYPE_TRAP 2 +#define BALLOON_TYPE_SHIELD 3 +#define BALLOON_TYPE_MAGNET 4 + +typedef struct LevelObjectEntry_WeaponBalloon { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; // Unused? + /* 0x09 */ u8 balloonType; + /* 0x0A */ u8 scale; // This is divided by 64 to get actual scale. +} LevelObjectEntry_WeaponBalloon; + +typedef struct LevelObjectEntry_AudioSeqLine { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_AudioSeqLine; + +typedef struct LevelObjectEntry_BombExplosion { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_BombExplosion; + +typedef struct LevelObjectEntry_WBalloonPop { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WBalloonPop; + +typedef struct LevelObjectEntry_Unknown25 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown25; + +typedef struct LevelObjectEntry_SkyControl { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_SkyControl; + +typedef struct LevelObjectEntry_AudioReverb { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_AudioReverb; + +typedef struct LevelObjectEntry_Torch_Mist { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_Torch_Mist; + +typedef struct LevelObjectEntry_TexScroll { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ s8 unkA; + /* 0x0B */ s8 unkB; +} LevelObjectEntry_TexScroll; + +typedef struct LevelObjectEntry_ModeChange { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_ModeChange; + +typedef struct LevelObjectEntry_StopWatchMan { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_StopWatchMan; + +typedef struct LevelObjectEntry_Banana { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Banana; + +typedef struct LevelObjectEntry_RgbaLight { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_RgbaLight; + +typedef struct LevelObjectEntry_Buoy_PirateShip { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Buoy_PirateShip; + +typedef struct LevelObjectEntry_Weather { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; +} LevelObjectEntry_Weather; + +typedef struct LevelObjectEntry_Bridge_WhaleRamp { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_Bridge_WhaleRamp; + +typedef struct LevelObjectEntry_RampSwitch { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_RampSwitch; + +typedef struct LevelObjectEntry_SeaMonster { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SeaMonster; + +typedef struct LevelObjectEntry_Bonus { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Bonus; + +typedef struct LevelObjectEntry_LensFlare { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_LensFlare; + +typedef struct LevelObjectEntry_LensFlareSwitch { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; +} LevelObjectEntry_LensFlareSwitch; + +typedef struct LevelObjectEntry_CollectEgg { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_CollectEgg; + +typedef struct LevelObjectEntry_EggCreator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_EggCreator; + +typedef struct LevelObjectEntry_CharacterFlag { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ s16 unkA; + /* 0x0C */ s16 unkC; + /* 0x0E */ s16 unkE; +} LevelObjectEntry_CharacterFlag; + +typedef struct LevelObjectEntry_Animation { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Animation; + +typedef struct LevelObjectEntry_InfoPoint { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8[3]; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_InfoPoint; + +typedef struct LevelObjectEntry_Trigger { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Trigger; + +typedef struct LevelObjectEntry_AirZippers_WaterZippers { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_AirZippers_WaterZippers; + +typedef struct LevelObjectEntry_Unknown58 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown58; + +typedef struct LevelObjectEntry_WaveGenerator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WaveGenerator; + +typedef struct LevelObjectEntry_Butterfly { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Butterfly; + +typedef struct LevelObjectEntry_Parkwarden { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Parkwarden; + +typedef struct LevelObjectEntry_WorldKey { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; +} LevelObjectEntry_WorldKey; + +typedef struct LevelObjectEntry_BananaCreator { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_BananaCreator; + +typedef struct LevelObjectEntry_TreasureSucker { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; +} LevelObjectEntry_TreasureSucker; + +typedef struct LevelObjectEntry_Log { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Log; + +typedef struct LevelObjectEntry_LavaSpurt { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; +} LevelObjectEntry_LavaSpurt; + +typedef struct LevelObjectEntry_PosArrow { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_PosArrow; + +typedef struct LevelObjectEntry_HitTester { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_HitTester; + +typedef struct LevelObjectEntry_MidiFade { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_MidiFade; + +typedef struct LevelObjectEntry_DynamicLightingObject { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_DynamicLightingObject; + +typedef struct LevelObjectEntry_EffectBox { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_EffectBox; + +typedef struct LevelObjectEntry_TrophyCab { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 rotation; +} LevelObjectEntry_TrophyCab; + +typedef struct LevelObjectEntry_Bubbler { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u16 unkA; +} LevelObjectEntry_Bubbler; + +typedef struct LevelObjectEntry_FlyCoin { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_FlyCoin; + +typedef struct LevelObjectEntry_GoldenBalloon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_GoldenBalloon; + +typedef struct LevelObjectEntry_Laserbolt { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Laserbolt; + +typedef struct LevelObjectEntry_Lasergun { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ s8 unkA; + /* 0x0B */ s8 unkB; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 unkD; +} LevelObjectEntry_Lasergun; + +typedef struct LevelObjectEntry_GroundZipper { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_GroundZipper; + +typedef struct LevelObjectEntry_OverridePos { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_OverridePos; + +typedef struct LevelObjectEntry_WizpigShip { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WizpigShip; + +typedef struct LevelObjectEntry_SilverCoin { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SilverCoin; + +typedef struct LevelObjectEntry_Boost { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8[1]; +} LevelObjectEntry_Boost; + +typedef struct LevelObjectEntry_WardenSmoke { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_WardenSmoke; + +typedef struct LevelObjectEntry_Unknown94 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown94; + +typedef struct LevelObjectEntry_Unknown96 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Unknown96; + +typedef struct LevelObjectEntry_Snowball { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Snowball; + +typedef struct LevelObjectEntry_Teleport { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Teleport; + +typedef struct LevelObjectEntry_Lighthouse_RocketSignpost { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Lighthouse_RocketSignpost; + +typedef struct LevelObjectEntry_Windsail { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Windsail; + +typedef struct LevelObjectEntry_RangeTrigger { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_RangeTrigger; + +typedef struct LevelObjectEntry_Fireball_Octoweapon { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_Fireball_Octoweapon; + +typedef struct LevelObjectEntry_Frog { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s16 unk8; + /* 0x0A */ u8 unkA; +} LevelObjectEntry_Frog; + +typedef struct LevelObjectEntry_SilverCoinAdv2 { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_SilverCoinAdv2; + +typedef struct LevelObjectEntry_TTDoor { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u8 unk8; + /* 0x09 */ u8 unk9; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; + /* 0x0C */ u8 unkC; + /* 0x0D */ u8 padD; + /* 0x0E */ s8 unkE; +} LevelObjectEntry_TTDoor; + +typedef struct LevelObjectEntry_MidiFadePoint { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_MidiFadePoint; + +typedef struct LevelObjectEntry_OctoBubble { + /* 0x00 */ LevelObjectEntryCommon common; +} LevelObjectEntry_OctoBubble; + +typedef struct LevelObjectEntry_LevelName { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ s8 unk8; + /* 0x09 */ s8 unk9; +} LevelObjectEntry_LevelName; + +typedef struct LevelObjectEntry_Midichset { + /* 0x00 */ LevelObjectEntryCommon common; + /* 0x08 */ u16 unk8; + /* 0x0A */ u8 unkA; + /* 0x0B */ u8 unkB; +} LevelObjectEntry_Midichset; + +#endif diff --git a/include/structs.h b/include/structs.h index 58ae3872..15dd5953 100644 --- a/include/structs.h +++ b/include/structs.h @@ -453,40 +453,43 @@ typedef struct LevelModel { /* 0x38 */ u32 minimapColor; } LevelModel; -/* Size: 8 bytes. */ -typedef struct LevelObjectEntryCommon { - u8 object_id; // 9-bit object ID to load (uses size'a MSB). - u8 size; // 7-bit total entry length (MSB is used in object_id). - s16 x, y, z; // Position in level -} LevelObjectEntryCommon; - typedef struct Object_3C { - u8 pad0[0x8]; + u8 pad0[0x2]; + s16 unk2; + s16 unk4; + s16 unk6; s8 unk8; u8 pad9[0x4]; u8 unkD; } Object_3C; -typedef struct Object_40 { - u8 pad0[0x4]; - f32 unk4; - f32 unk8; - f32 unkC; - u8 pad10[0x20]; - u16 unk30; - s16 unk32; - u8 pad34[0x9]; - u8 unk3D; - u8 pad3E[0x15]; - s8 unk53; - s8 unk54; - s8 unk55; //size of array pointed by Object->unk68 - u8 pad56; - s8 unk57; - u8 pad58[0x18]; - u8 unk70; - u8 unk71; -} Object_40; +#define OBJECT_MODEL_TYPE_3D_MODEL 0 +#define OBJECT_MODEL_TYPE_SPRITE_BILLBOARD 1 +#define OBJECT_MODEL_TYPE_VEHICLE_PART 2 +#define OBJECT_MODEL_TYPE_UNKNOWN4 4 + +typedef struct ObjectHeader { + u8 pad0[0x4]; + /* 0x04 */ f32 unk4; + /* 0x08 */ f32 unk8; + /* 0x0C */ f32 scale; + u8 pad10[0x20]; + /* 0x30 */ u16 unk30; + /* 0x32 */ s16 unk32; + u8 pad34[0x9]; + /* 0x3D */ u8 unk3D; + u8 pad3E[0x15]; + /* 0x53 */ s8 modelType; + /* 0x54 */ s8 behaviorId; + /* 0x55 */ s8 numberOfModelIds; // size of array pointed by Object->unk68 + u8 pad56; + /* 0x57 */ s8 unk57; + u8 pad58[0x8]; + /* 0x60 */ char internalName[16]; + /* 0x70 */ u8 unk70; + /* 0x71 */ u8 unk71; + u8 pad72[0x6]; +} ObjectHeader; typedef struct Object_44_0 { u8 unk0; @@ -562,7 +565,7 @@ typedef struct Object_60 { // This REALLY needs to be refactored at some point. // This structure differs based on the type of object being loaded. -// See functions in unknown_0348C0.c for how these get loaded. +// See functions in object_functions.c for how these get loaded. typedef struct Object_64 { union { f32 unk0; @@ -682,9 +685,9 @@ typedef struct Object { /* 0x003C */ f32 unk3C_f; } unk3C_a; - /* 0x0040 */ Object_40 *descriptor_ptr; + /* 0x0040 */ ObjectHeader *header; /* 0x0044 */ void *unk44; - /* 0x0048 */ s16 unk48; + /* 0x0048 */ s16 behaviorId; /* 0x004A */ s16 unk4A; /* 0x004C */ Object_4C *unk4C; //player + 0x318 /* 0x0050 */ Object_50 *unk50; //player + 0x2F4 @@ -699,7 +702,11 @@ typedef struct Object { /* 0x0070 */ u32 unk70; /* 0x0074 */ u32 unk74; + + union { /* 0x0078 */ s32 unk78; + /* 0x0078 */ f32 unk78f; + }; union { struct { diff --git a/lib/src/os/osMotor.c b/lib/src/os/osMotor.c index 4056ed14..3a9ca083 100644 --- a/lib/src/os/osMotor.c +++ b/lib/src/os/osMotor.c @@ -10,11 +10,10 @@ #define MOTOR_DEFAULT_BANK 128 static void _MakeMotorData(int channel, u16 address, u8 *buffer, OSPifRam *mdata); -//TODO: These should really be declared here instead of somewhere else -extern OSPifRam _MotorStopData[MAXCONTROLLERS]; -extern OSPifRam _MotorStartData[MAXCONTROLLERS]; -extern u8 _motorstopbuf[BLOCKSIZE]; -extern u8 _motorstartbuf[BLOCKSIZE]; +OSPifRam _MotorStopData[MAXCONTROLLERS]; +OSPifRam _MotorStartData[MAXCONTROLLERS]; +u8 _motorstopbuf[BLOCKSIZE]; +u8 _motorstartbuf[BLOCKSIZE]; s32 osMotorStop(OSPfs *pfs) { int i; s32 ret; diff --git a/rename.sh b/rename.sh index 4d31a792..35fa7c0c 100755 --- a/rename.sh +++ b/rename.sh @@ -9,7 +9,7 @@ then fi # Rename all instances within text files. -grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g" +grep -rl "$1" asm/**/*.s src/**/*.{c,h} lib/**/*.{c,s} include/*.h undefined_syms.txt dkr.ld | xargs sed -i "s/\b$1\b/$2/g" # Rename filenames & directories. python3 ./tools/python/rename_file.py "$1" "$2" diff --git a/src/camera.c b/src/camera.c index a6e4ae14..a9c07ac9 100644 --- a/src/camera.c +++ b/src/camera.c @@ -4,7 +4,7 @@ #include "camera.h" #include "audio.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "unknown_0255E0.h" #include "video.h" #include "lib/src/libc/rmonPrintf.h" diff --git a/src/unknown_06B2B0.c b/src/game.c similarity index 99% rename from src/unknown_06B2B0.c rename to src/game.c index 5d753acf..739cf265 100644 --- a/src/unknown_06B2B0.c +++ b/src/game.c @@ -1,7 +1,7 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8006A6B0 */ -#include "unknown_06B2B0.h" +#include "game.h" #include #include @@ -24,7 +24,7 @@ #include "audio.h" #include "unknown_00BC20.h" #include "camera.h" -#include "controller_pak.h" +#include "save_data.h" #include "unknown_078050.h" #include "unknown_003260.h" #include "unknown_032760.h" @@ -249,7 +249,7 @@ void func_8006A6B0(void) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006A6B0.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006A6B0.s") #endif // Unused. @@ -264,10 +264,10 @@ s16 func_8006ABB4(s32 arg0) { } // Unused? -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006AC00.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006AC00.s") // Unused? -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006AE2C.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006AE2C.s") // Unused. s32 func_8006B018(s8 arg0) { @@ -590,7 +590,7 @@ void load_level(s32 levelId, s32 numberOfPlayers, s32 entranceId, s32 vehicleId, func_8007AB24(gCurrentLevelHeader->unk4[numberOfPlayers]); } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/load_level.s") +GLOBAL_ASM("asm/non_matchings/game/load_level.s") #endif void func_8006BD10(f32 arg0) { @@ -1368,7 +1368,7 @@ void func_8006CCF0(s32 updateRate) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006CCF0.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006CCF0.s") #endif void func_8006D8A4(void) { @@ -1623,7 +1623,7 @@ void func_8006DCF8(s32 updateRate) { } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006DCF8.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006DCF8.s") #endif void load_level_for_menu(s32 levelId, s32 numberOfPlayers, s32 cutsceneId) { @@ -1862,7 +1862,7 @@ void func_8006ECE0(void) { D_800DD37C |= 0x200; } -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006ECFC.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006ECFC.s") s32 func_8006EFB8(void) { //Could be SP_DMEM_START / CACHERR_EE / SR_FR / M_K0 / LEO_STATUS_BUFFER_MANAGER_INTERRUPT @@ -1902,7 +1902,7 @@ void func_8006EFDC(void) { gCurrNumHudVertsPerPlayer = gNumHudVertsPerPlayer[3]; } #else -GLOBAL_ASM("asm/non_matchings/unknown_06B2B0/func_8006EFDC.s") +GLOBAL_ASM("asm/non_matchings/game/func_8006EFDC.s") #endif void func_8006F140(s32 arg0) { diff --git a/src/unknown_06B2B0.h b/src/game.h similarity index 100% rename from src/unknown_06B2B0.h rename to src/game.h diff --git a/src/game_text.c b/src/game_text.c index acaeaf48..5644816a 100644 --- a/src/game_text.c +++ b/src/game_text.c @@ -4,8 +4,8 @@ #include "game_text.h" #include "menu.h" #include "unknown_00BC20.h" -#include "unknown_043920.h" -#include "unknown_06B2B0.h" +#include "racer.h" +#include "game.h" /************ .data ************/ diff --git a/src/unknown_09F8F0.c b/src/game_ui.c similarity index 83% rename from src/unknown_09F8F0.c rename to src/game_ui.c index 1f834b47..cddbdce5 100644 --- a/src/unknown_09F8F0.c +++ b/src/game_ui.c @@ -1,13 +1,13 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x8009ECF0 */ -#include "unknown_09F8F0.h" +#include "game_ui.h" #include "types.h" #include "macros.h" #include "structs.h" #include "f3ddkr.h" #include "camera.h" -#include "unknown_06B2B0.h" +#include "game.h" extern u32 osTvType; @@ -243,15 +243,15 @@ s32 D_801271B0[640]; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_8009ECF0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_8009F034.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A003C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_8009ECF0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_8009F034.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A003C.s") u8 func_800A0190(void) { return D_80126D34; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A01A0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A01A0.s") void func_800A0B74(void) { s32 i; @@ -264,7 +264,7 @@ void func_800A0B74(void) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A0BD4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0BD4.s") void func_800A0DC0(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { unk800A0DC0_2 *temp = arg1->unk64; @@ -291,8 +291,8 @@ void func_800A0DC0(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { func_80068508(0); } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A0EB4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1248.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0EB4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1248.s") void func_800A1428(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { unk800A0DC0_2 *temp = arg1->unk64; @@ -312,11 +312,11 @@ void func_800A1428(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A14F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A19A4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1C04.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A1E48.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A22F4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A14F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A19A4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1C04.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1E48.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A22F4.s") void func_800A258C(s32 arg0, unk800A0DC0 *arg1, s32 arg2) { LevelHeader *level; @@ -369,24 +369,24 @@ void func_800A26C8(Object *obj, s32 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A277C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A36CC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A277C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A36CC.s") void func_800A3870(void) { D_80126CDC->unk4C4 = 0x6490; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A3884.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A3CE4.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4154.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A45F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A47A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A497C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4C44.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A4F50.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A5A64.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A5F18.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A6254.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A3884.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A3CE4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4154.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A45F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A47A0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A497C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4C44.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A4F50.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A5A64.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A5F18.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A6254.s") void func_800A6DB4(s16 *arg0) { Settings *settings = get_settings(); @@ -400,8 +400,8 @@ void func_800A6DB4(s16 *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A6E30.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A718C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A6E30.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A718C.s") void func_800A7484(u16 arg0, f32 arg1, s32 arg2) { if (D_80126D74 == 0) { @@ -417,10 +417,10 @@ void func_800A74EC(u16 arg0, s32 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7520.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7A60.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7B68.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A7FBC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7520.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7A60.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7B68.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A7FBC.s") void func_800A83B4(LevelModel *model) { s32 sp2C; @@ -436,10 +436,10 @@ s8 func_800A8458(void) { return D_800E27A4[D_80126D0C]; } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800A8474.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AA3EC.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AA600.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AAFD0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800A8474.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AA3EC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AA600.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AAFD0.s") void func_800AB194(s32 arg0) { D_80126CD1 = 1; diff --git a/src/unknown_09F8F0.h b/src/game_ui.h similarity index 96% rename from src/unknown_09F8F0.h rename to src/game_ui.h index 17e6d981..fb4a9f19 100644 --- a/src/unknown_09F8F0.h +++ b/src/game_ui.h @@ -1,5 +1,5 @@ -#ifndef _UNKNOWN_09F8F0_H_ -#define _UNKNOWN_09F8F0_H_ +#ifndef _GAME_UI_H_ +#define _GAME_UI_H_ #include "types.h" #include "structs.h" diff --git a/src/main.c b/src/main.c index 6ad5d4ee..09dca4de 100644 --- a/src/main.c +++ b/src/main.c @@ -3,7 +3,7 @@ #include "main.h" #include "thread0_epc.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "lib/src/libc/rmonPrintf.h" /************ .rodata ************/ diff --git a/src/memory.c b/src/memory.c index 68d29efa..9c6b06f9 100644 --- a/src/memory.c +++ b/src/memory.c @@ -39,10 +39,6 @@ s32 D_801235C4; FreeQueueSlot gFreeQueue[256]; s32 gFreeQueueCount; s32 gFreeQueueState; -OSPifRam _MotorStopData[MAXCONTROLLERS]; -OSPifRam _MotorStartData[MAXCONTROLLERS]; -u8 _motorstopbuf[BLOCKSIZE]; -u8 _motorstartbuf[BLOCKSIZE]; extern MemoryPoolSlot gMainMemoryPool; diff --git a/src/menu.c b/src/menu.c index c6fc615a..1630499a 100644 --- a/src/menu.c +++ b/src/menu.c @@ -21,10 +21,10 @@ #include "textures_sprites.h" #include "thread30.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "unknown_078050.h" -#include "controller_pak.h" -#include "unknown_0348C0.h" +#include "save_data.h" +#include "object_functions.h" #include "unknown_003260.h" /** diff --git a/src/object_functions.c b/src/object_functions.c new file mode 100644 index 00000000..fc48b85d --- /dev/null +++ b/src/object_functions.c @@ -0,0 +1,2026 @@ +/* The comment below is needed for this file to be picked up by generate_ld */ +/* RAM_POS: 0x80033CC0 */ + +#include "object_functions.h" + +#include "PR/os_cont.h" +#include "types.h" +#include "macros.h" +#include "structs.h" +#include "video.h" +#include "camera.h" +#include "menu.h" // For cheats +#include "unknown_0ABDF0.h" +#include "racer.h" +#include "game.h" +#include "audio.h" +#include "unknown_008C40.h" +#include "unknown_00BC20.h" +#include "particles.h" +#include "unknown_0255E0.h" +#include "font.h" +#include "unknown_032760.h" +#include "game_ui.h" +#include "waves.h" +#include "unknown_003260.h" + +/************ .data ************/ + +// Unsure about the signed/unsigned with these arrays. +u16 D_800DC970[4] = { + 0x40FF, 0xFFFF, 0x0007, 0x0003 +}; +u16 D_800DC978[4] = { + 0x0000, 0x0000, 0x001E, 0xFFFF +}; +u16 D_800DC980[20] = { + 0xFF00, 0x0100, 0x0000, 0xFFFF, + 0xFFFF, 0x0100, 0x0100, 0x0000, + 0xFFFF, 0xFFFF, 0x0100, 0xFF00, + 0x0000, 0xFFFF, 0xFFFF, 0xFF00, + 0xFF00, 0x0000, 0xFFFF, 0xFFFF, +}; +u16 D_800DC9A8[20] = { + 0x0000, 0x0040, 0xFFC0, 0x0000, + 0xFFC0, 0xFFC0, 0x0000, 0x0040, + 0x0020, 0x0000, 0xFFC0, 0x0020, + 0x0000, 0x0040, 0x0040, 0x0000, + 0xFFC0, 0x0040, 0x0000, 0x0000, +}; +u16 D_800DC9D0[64] = { + 0x0000, 0x0301, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0004, 0x0004, + 0x0000, 0x0203, 0x0004, 0x0000, + 0x0001, 0x0000, 0x0001, 0x0004, + 0x0002, 0x0503, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0001, 0x0004, + 0x0002, 0x0405, 0x0001, 0x0000, + 0x0000, 0x0000, 0x0000, 0x0004, + 0x0000, 0x0103, 0x0004, 0x0000, + 0x0004, 0x0004, 0x0001, 0x0004, + 0x0000, 0x0302, 0x0004, 0x0000, + 0x0001, 0x0004, 0x0001, 0x0000, + 0x0002, 0x0305, 0x0001, 0x0000, + 0x0001, 0x0004, 0x0000, 0x0004, + 0x0002, 0x0504, 0x0001, 0x0000, + 0x0000, 0x0004, 0x0000, 0x0000, +}; +s8 D_800DCA50[8] = { + 2, 5, 6, 3, 10, 8, 7, 9 +}; +u8 D_800DCA58[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11 +}; +s8 D_800DCA64[9] = { + 2, 5, 6, 3, 10, 8, 7, 9, 12 +}; +s8 D_800DCA70[10] = { + 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 +}; +s32 D_800DCA7C[3] = { // Not sure about typing + 0, 0, 0 +}; +s32 D_800DCA88[3] = { // Not sure about typing + 0, 0, 0 +}; + +s8 D_800DCA94[8] = { + 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00 +}; + +s8 D_800DCA9C[12] = { + 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +u16 D_800DCAA8[64] = { + 0x0000, 0x0301, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0000, 0x0203, 0x0000, 0x0000, + 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, + 0x0002, 0x0503, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0002, 0x0405, 0xFFFF, 0x0000, + 0x0000, 0x0000, 0x0000, 0xFFFF, + 0x0000, 0x0103, 0x0000, 0x0000, + 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, + 0x0000, 0x0302, 0x0000, 0x0000, + 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, + 0x0002, 0x0305, 0xFFFF, 0x0000, + 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, + 0x0002, 0x0504, 0xFFFF, 0x0000, + 0x0000, 0xFFFF, 0x0000, 0x0000, +}; +u16 D_800DCB28[20] = { + 0xFFC0, 0x0000, 0x0020, 0xFFC0, + 0x0000, 0xFFE0, 0x0000, 0x0000, + 0x0020, 0x0000, 0x0000, 0xFFE0, + 0x0040, 0x0000, 0x0020, 0x0040, + 0x0000, 0xFFE0, 0x0000, 0x0000, +}; + +/*******************************/ + +/************ .bss ************/ + +f32 D_8011D4D0; +s32 D_8011D4D4; +s32 D_8011D4D8; +s32 D_8011D4DC; +s16 D_8011D4E0; +s16 D_8011D4E2; + +/******************************/ + +#ifdef NON_EQUIVALENT +typedef struct Object_50_80033CC0 { + f32 unk0; +} Object_50_80033CC0; + +void obj_init_scenery(Object *obj, LevelObjectEntry_Scenery *entry) { + f32 phi_f0; + obj->unk6 |= 2; + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + ((Object_50_80033CC0 *)obj->unk50)->unk0 = obj->header->unk4 * phi_f0; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unkA << 6 << 4; + if (entry->unkB) { + // Regalloc issue here + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 1; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + obj->unk4C->unk16 = -5; + obj->unk4C->unk17 = entry->unkB; + } + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk78 = 0; + obj->unk7C.word = 0; +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_scenery.s") +#endif + +void obj_loop_scenery(Object *obj, s32 speed) { + Object78_80033DD0 *obj78; + s32 temp_v0; + + if (obj->unk4C != NULL) { + obj78 = &obj->unk78; + if (obj->unk7C.half.upper > 0) { + obj78->unk4 -= speed; + } + if ((obj->unk4C->unk14 & 0x40) && ((s32) obj78->unk4 <= 0)) { + func_80009558(316, obj->x_position, obj->y_position, obj->z_position, 4, NULL); + obj78->unk0 = (s32*) obj->unk4C->unk0; + obj78->unk6 = 1820; + obj78->unk4 = 10; + if (get_number_of_active_players() < 2) { + if (obj->header->unk57 > 0) { + if (obj->header->unk57 == 1) { + temp_v0 = 0; + } else { + temp_v0 = get_random_number_from_range(0, obj->header->unk57 - 1); + } + obj->unk74 = 1 << temp_v0; + func_800AFC3C(obj, 2); + } + } + } else if (obj78->unk4 <= 0) { + obj78->unk0 = 0; + } + obj->z_rotation = (s16) obj78->unk6; + obj78->unk6 = (obj78->unk6 * -200) >> 8; + } +} + +void obj_init_fireball_octoweapon(Object *obj, LevelObjectEntry_Fireball_Octoweapon *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; +} + +#ifdef NON_MATCHING +// Has a minor regalloc issue with obj4C_obj. + +typedef struct Object80033F60_64 { + u8 pad0[0x1C]; + s32 *unk1C; + u8 pad20[0x8]; + s32 unk28; +} Object80033F60_64; + +typedef struct Object80033F60_4C_64 { + s16 unk0; + u8 pad2[0x185]; + s8 unk187; + u8 pad188[0x7C]; + s16 unk204; +} Object80033F60_4C_64; + +s32 func_80011560(void); +void func_80011570(Object*, f32, f32, f32); +void func_8003FC44(f32, f32, f32, s32, s32, f32, s32); +s16 func_80070750(f32, f32); +s32 func_8002AD08(f32, f32**, s32); +void func_80001D04(u16, s32 *); +void func_8000488C(s32); +void func_800AFC3C(Object *, s32); +void gParticlePtrList_addObject(Object *); +f32 sqrtf(f32); + +void obj_loop_fireball_octoweapon(Object *obj, s32 speed) { + Object *obj78; + Object_4C *obj4C; + f32 sp7C; + Object80033F60_4C_64 *obj4C_obj64; + Object80033F60_64 *obj64; + Object *obj4C_obj; + f32 phi_f2; + s32* temp; + f32 sp4C[7]; + + obj78 = (Object*)obj->unk78; + + sp7C = speed; + if (osTvType == TV_TYPE_PAL) { + sp7C *= 1.2; + } + + if ((obj->behaviorId == 116) && (obj->unk7C.word < 0)) { + obj->x_position = 0.0f; + obj->y_position = 0.0f; + obj->z_position = 0.0f; + func_80011560(); + func_80011570(obj, obj78->x_position, obj78->y_position, obj78->z_position); + } else { + phi_f2 = (obj78->x_position - obj->x_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->x_velocity += (phi_f2 - obj->x_velocity) * 0.125 * sp7C; + phi_f2 = (obj78->y_position - obj->y_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->y_velocity += (phi_f2 - obj->y_velocity) * 0.125 * sp7C; + phi_f2 = (obj78->z_position - obj->z_position) * 0.1; + if (phi_f2 > 10.0) { + phi_f2 = 10.0f; + } + if (phi_f2 < -10.0) { + phi_f2 = -10.0f; + } + obj->z_velocity += (phi_f2 - obj->z_velocity) * 0.125 * sp7C; + if (sqrtf((obj->x_velocity * obj->x_velocity) + (obj->z_velocity * obj->z_velocity)) > 0.5) { + obj->y_rotation = func_80070750(obj->x_velocity, obj->z_velocity); + obj->x_rotation -= speed << 9; + } + func_80011570(obj, obj->x_velocity * sp7C, obj->y_velocity * sp7C, obj->z_velocity * sp7C); + if (obj->unk4A == 298 && func_8002AD08(obj->y_position, &sp4C, 0)) { + obj->y_position = sp4C[0]; + } + } + obj->unk18 += speed * 10; + obj64 = obj->unk64; + obj4C = obj->unk4C; + obj4C_obj = (Object*)obj4C->unk0; // This should be a0, not v1! + if ((obj4C_obj != NULL) && (obj4C->unk13 < 60) && (obj4C_obj->header->behaviorId == 1)) { + obj4C_obj64 = obj4C_obj->unk64; + if (obj4C_obj64->unk0 != -1) { + if (obj->behaviorId == 108) { + obj4C_obj64->unk187 = 1; + obj->unk7C.word = 20; + func_8003FC44(obj->x_position, obj->y_position, obj->z_position, 44, 17, 1.0f, 1); + gParticlePtrList_addObject(obj); + } else if (obj->unk7C.word > 0) { + obj4C_obj64->unk204 = 60; + obj->unk7C.word = -60; + obj->unk78 = obj4C_obj; + func_80001D04(586, &obj64->unk1C); + } + } + } + if (obj->behaviorId == 108) { + obj->unk74 = 1; + func_800AFC3C(obj, speed); + obj->unk7C.word -= speed; + if (obj->unk7C.word < 0) { + if (obj->unk4A == 298) { + gParticlePtrList_addObject(obj); + func_8003FC44(obj->x_position, obj->y_position, obj->z_position, 44, 17, 1.0f, 1); + } + obj->scale *= 0.9; + if (obj->scale < 0.5) { + gParticlePtrList_addObject(obj); + } + } + } else { + if (obj->unk7C.word < 0) { + obj->unk7C.word += speed; + if (obj->unk7C.word >= 0) { + obj->unk7C.word = 0; + } + } else { + obj->unk7C.word -= speed; + if (obj->unk7C.word <= 0) { + obj->unk7C.word = 0; + } + } + if (obj->unk7C.word == 0) { + temp = obj64->unk1C; + if (temp != 0) { + func_8000488C(temp); + } + func_80009558(341, obj->x_position, obj->y_position, obj->z_position, 4, 0); + gParticlePtrList_addObject(obj); + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s") +#endif + +void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry) { + Object_64 *obj64; + obj->unk4C->unk14 = 0x22; + obj->unk4C->unk11 = 0; + obj64 = obj->unk64; + obj64->unkE = entry->unkA; + obj64->unkF = entry->unkB; + obj64->unk10 = entry->unkC; + obj64->unk11 = entry->unkD; + obj64->unkCD.half = obj64->unkF; + obj->y_rotation = entry->unk8 << 4 << 4; // Not sure about the shift amounts here, but it + obj->x_rotation = entry->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_lasergun.s") + +void obj_init_laserbolt(Object *obj, LevelObjectEntry_Laserbolt *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; +} + +void func_80031130(s32, f32*, f32*, s32); +void func_80031600(f32*, f32*, f32*, s8*, s32, s8*); +void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6); + +typedef struct Object_7C_80034860 { + u8 pad0[0xC]; + s16 unkC; +} Object_7C_80034860; + +typedef struct Object_64_80034860 { + s16 unk0; + u8 unk4[0x185]; + s8 unk187; +} Object_64_80034860; + +void obj_loop_laserbolt(Object *obj, s32 speed) { + f32 sp5C; + + Object *obj4C_obj; + + Object_7C_80034860 *obj7C; + Object_64_80034860 *obj4C_obj64; + + s8 sp4F; // Boolean + s8 sp4E; + f32 sp48; + f32 sp44; + f32 sp40; + f32 sp3C; + s32 sp38; // Boolean + + + sp4F = FALSE; + sp5C = speed; + if (osTvType == TV_TYPE_PAL) { + sp5C *= 1.2; + } + sp40 = obj->x_position + (obj->x_velocity * sp5C); + sp44 = obj->y_position + (obj->y_velocity * sp5C); + sp48 = obj->z_position + (obj->z_velocity * sp5C); + sp3C = 9.0f; + + func_80031130(1, &obj->x_position, &sp40, -1); + sp38 = FALSE; + func_80031600(&obj->x_position, &sp40, &sp3C, &sp4E, 1, &sp38); + if (sp38) { + obj->x_velocity = (sp40 - obj->x_position) / sp5C; + obj->y_velocity = (sp44 - obj->y_position) / sp5C; + obj->z_velocity = (sp48 - obj->z_position) / sp5C; + } + func_80011570(obj, obj->x_velocity * sp5C, obj->y_velocity * sp5C, obj->z_velocity * sp5C); + if (sp38) { + func_8003FC44(obj->x_position, obj->y_position - 36.0f, obj->z_position, 44, 0, 0.2, 0); + sp4F = TRUE; + } + + if (obj->unk78 > 0) { + obj->unk78 -= speed; + } else { + sp4F = TRUE; + } + + if (obj->unk4C->unk13 < 80) { + obj4C_obj = (Object*)obj->unk4C->unk0; + if (obj4C_obj && (obj4C_obj->behaviorId == 1)) { + obj4C_obj64 = obj4C_obj->unk64; + sp4F = TRUE; + if (obj4C_obj64->unk0 != -1) { + obj4C_obj64->unk187 = 1; + } + obj7C = (Object_7C_80034860 *)obj->unk7C.word; + if (obj7C) { + obj7C->unkC = 180; + } + sp4F = TRUE; + func_8003FC44(obj->x_position, obj->y_position - 36.0f, obj->z_position, 44, 17, 0.5, 0); + } + } + if (sp4F) { + gParticlePtrList_addObject(obj); + } +} + +void obj_init_torch_mist(Object *obj, LevelObjectEntry_Torch_Mist *entry) { + f32 phi_f0 = (s32)(entry->unk9 & 0xFF); + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk78 = entry->unk8; +} + +void obj_loop_torch_mist(Object *obj, s32 speed) { + obj->unk18 += obj->unk78 * speed; +} + +void obj_init_effectbox(Object *obj, LevelObjectEntry_EffectBox *entry) { +} + +#ifdef NON_EQUIVALENT + +// Has regalloc & stack issues. + +f32 func_800707C4(s16); +f32 func_800707F8(s16); +Object **get_object_struct_array(s32 *count); + +void obj_loop_effectbox(Object *obj, s32 speed) { + Object **objList; + Object_3C_80034B74 *obj3C; + Object_64_80034B74 *curObj64; + s32 i; + s32 numberOfObjects; + f32 xDiff; + f32 yDiff; + f32 zDiff; + f32 temp0; + f32 temp1; + f32 temp2; + f32 temp3; + f32 temp4; + f32 temp5; + f32 tempf0; + u8 new_var2; + + obj3C = obj->unk3C_a.unk3C; + objList = get_object_struct_array(&numberOfObjects); + temp0 = func_800707F8((obj3C->unkB << 8) * -1); + temp1 = func_800707C4((obj3C->unkB << 8) * -1); + temp2 = obj3C->unk8 * 3; + temp3 = obj3C->unk9 * 3; + temp4 = obj3C->unkA * 3; + for (i = 0; i < numberOfObjects; i++) + { + xDiff = objList[i]->x_position - obj->x_position; + yDiff = objList[i]->y_position - obj->y_position; + zDiff = objList[i]->z_position - obj->z_position; + if (((-temp3) < yDiff) && (yDiff < temp3)) + { + temp5 = (xDiff * temp0) + (zDiff * temp1); + if (((-temp2) < temp5) && (temp5 < temp2)) + { + temp5 = ((-xDiff) * temp1) + (zDiff * temp0); + if (((-temp4) < (((-xDiff) * temp1) + (zDiff * temp0))) && (temp5 < temp4)) + { + temp5 = temp3 / 2; + curObj64 = objList[i]->unk64; + curObj64->unk1FE = obj3C->unkC; + curObj64->unk1FF = obj3C->unkD; + if ((temp5 < yDiff) && (curObj64->unk1FE == 1)) + { + new_var2 = curObj64->unk1FF; + tempf0 = (new_var2 & 0xFF) * ((f32) (1.0 - ((yDiff - temp5) / temp5))); + curObj64->unk1FF = new_var2 * ((f32) (1.0 - ((yDiff - temp5) / temp5))); + if (tempf0 < 0.0f) + { + } + } + } + } + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_effectbox.s") +#endif + +void obj_init_trophycab(Object *obj, LevelObjectEntry_TrophyCab *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->y_rotation = entry->rotation << 6 << 4; // Not sure about the values here. +} + +#ifdef NON_EQUIVALENT + +void func_80001D04(u16, s32 *); +f32 sqrtf(f32); +void func_80001D04(u16, s32 *); +f32 sqrtf(f32); +u32 func_80001C08(void); +void func_80001D04(u16, s32 *); +Object *func_8000EA54(unk80027FC4 *, s32); +void func_8005A3B0(void); +void func_8006F254(void); +void func_8009CF68(s32 arg0); +s32 func_8009CFEC(u32 arg0); +void func_800A3870(void); +void func_800AB1AC(s32 arg0); +void func_800AB1D4(u8 arg0); +void func_800C31EC(s32); +s32 func_800C3400(void); +LevelHeader *get_current_level_header(void); +Settings *get_settings(void); +void play_sound(u8 arg0); +void set_music_fade_timer(s32 time); +void set_sndfx_player_voice_limit(u8 voiceLimit); +f32 sqrtf(f32); + +typedef struct Object_64_80034E9C { + s32 unk0; + s16 unk4; +} Object_64_80034E9C; + +typedef struct Object_54_80034E9C { + u8 pad0[0x28]; + f32 unk28; + f32 unk2C; +} Object_54_80034E9C; + +// Has regalloc & stack issues. + +void obj_loop_trophycab(Object *obj, s32 speed) { + s32 sp34; + s32 isTrophyRaceAvaliable; + s32 raceType; + unk80027FC4 sp44; + Settings *settings; + LevelHeader *curLevelHeader; + Object_64_80034E9C *obj64; + Object *trophyObj; + Object *playerObj; + f32 xDiff; + f32 zDiff; + s32 new_var2; + + settings = get_settings(); + curLevelHeader = get_current_level_header(); + obj64 = obj->unk64; + + // Show trophy inside the cabinet + if (obj->unk7C.word == 0) { + raceType = curLevelHeader->race_type; + if ((raceType != 7) && (raceType != 6)) { // Make sure the current level is not a cutscene. + obj->unk7C.word = 1; + if ((settings->trophies >> (((settings->worldId - 1) ^ 0) * 2)) & 3) { + sp44.unk0 = 128; + sp44.unk2 = obj->unk3C_a.unk3C->unk2; + sp44.unk4 = obj->unk3C_a.unk3C->unk4; + sp44.unk6 = obj->unk3C_a.unk3C->unk6; + sp44.unk1 = 8; + trophyObj = func_8000EA54(&sp44, 1); + if (trophyObj) { + trophyObj->unk3C_a.unk3C = (void *) 0; + trophyObj->y_rotation = obj->y_rotation; + } + } + } + } + + ((Object_54_80034E9C *) obj->unk54)->unk2C = 0.612f; + ((Object_54_80034E9C *) obj->unk54)->unk28 = 0.0f; + + playerObj = get_object_struct(0); + if (playerObj) { + xDiff = obj->x_position - playerObj->x_position; + zDiff = playerObj->z_position - obj->z_position; + sqrtf((xDiff * xDiff) + (zDiff * zDiff)); // Distance on X & Z axes. Not used? + + new_var2 = settings->bosses; + + /** + * Future Fun Land doesn't have a boss rematch, so this OR is needed so that + * trophy race becomes avaliable after all the balloons have been collected. + */ + new_var2 |= 0x800; + + // Check if all the balloons have been collected. + isTrophyRaceAvaliable = (settings->balloonsPtr[settings->worldId] < 8) ^ 1; + if (isTrophyRaceAvaliable) { + // Check if the boss rematch has been beaten. + isTrophyRaceAvaliable = ((1 << (settings->worldId + 6)) & new_var2) != 0; + } + + // Hit detection between cabinet & player? + if ((((obj->unk78 == 0) && (!func_800C3400())) && obj->unk5C->unk100) && (obj64->unk4 == 0)) { + // A hit has been detected at this point. + if (isTrophyRaceAvaliable) { + obj->unk78 = 1; + func_80001D04(303, 0); + func_800A3870(); + } + else + { + func_800C31EC(4); + obj64->unk4 = 180; + obj64->unk0 = 140; + set_sndfx_player_voice_limit(16); + set_music_fade_timer(-8); + play_sound(17); + } + } + if ((obj64->unk0 != 0) && (func_80001C08() == 0)) { + if (speed < obj64->unk0) { + obj64->unk0 -= speed; + } + else + { + obj64->unk0 = 0; + set_music_fade_timer(8); + set_sndfx_player_voice_limit(6); + } + } + if (obj->unk5C->unk100 || func_800C3400()) { + obj64->unk4 = 180; + } + if (obj64->unk4 > 0) { + obj64->unk4 -= speed; + } + else + { + obj64->unk4 = 0; + } + if (obj->unk78 == 1) { + func_800AB1AC(3); + func_800AB1D4(0); + sp34 = func_8009CFEC(4); + if (sp34 != 0) { + obj->unk78 = 0; + func_8009CF68(4); + if (sp34 == 1) { + func_8006F254(); + obj->unk78 = 2; + } + else + { + func_800AB1D4(1); + } + } + func_8005A3B0(); + } + obj->unk5C->unk100 = NULL; + if (isTrophyRaceAvaliable) { + // Changes lighting/color of the cabinet? + ((Object_54_80034E9C *) obj->unk54)->unk28 = 0.552f; + } + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_trophycab.s") +#endif + +void obj_init_collectegg(Object *obj, LevelObjectEntry_CollectEgg *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_collectegg.s") + +void obj_init_eggcreator(Object *obj, LevelObjectEntry_EggCreator *entry) { +} + +void obj_loop_eggcreator(Object *obj, s32 speed) { + unk8003564C sp20; + Object *someObj; + + if (obj->unk78 == 0) { + sp20.unk2 = obj->x_position; + sp20.unk4 = obj->y_position; + sp20.unk6 = obj->z_position; + sp20.unk1 = 8; + sp20.unk0 = 0x34; + someObj = func_8000EA54(&sp20, 1); + if (someObj != NULL) { + Object_64_8003564C *someObj64 = someObj->unk64; + someObj64->unk4 = obj; + obj->unk78 = someObj; + someObj->unk3C_a.unk3C = 0; + } + } +} + +void obj_init_lighthouse_rocketsignpost(Object *obj, LevelObjectEntry_Lighthouse_RocketSignpost *entry) { + f32 phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_rocketsignpost(Object *obj, s32 speed) { + Object *playerObj; + Object_4C *obj4C; + + playerObj = get_object_struct(0); + if (playerObj != NULL) { + obj4C = obj->unk4C; + if (obj4C->unk13 < 0xC8) { + if (playerObj == obj4C->unk0) { + // Detect if the player honks or slams into the signpost. + if ((get_buttons_pressed_from_player(0) & Z_TRIG) || playerObj == obj->unk5C->unk100) { + func_8006F29C(); + } + } + } + } + obj->unk4C->unk13 = 0xFF; +} + +void obj_init_airzippers_waterzippers(Object *obj, LevelObjectEntry_AirZippers_WaterZippers *entry) { + ObjectHeader *objHeader; + f32 phi_f0; + + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + objHeader = obj->header; + phi_f0 /= 64; + obj->scale = objHeader->scale * phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; + if (obj->unk3A >= objHeader->numberOfModelIds) { + obj->unk3A = 0; + } + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + if (get_filtered_cheats() & CHEAT_TURN_OFF_ZIPPERS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_airzippers_waterzippers.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_groundzipper.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_groundzipper.s") + +void obj_init_unknown58(Object *obj, LevelObjectEntry_Unknown58 *entry) { + obj->unk78 = 0; + obj->unk7C.word = obj->header; +} + +void obj_loop_unknown58(Object *obj, s32 speed) { + Object *someObj; + Object *someOtherObj; + Object_64_80035E34 *someOtherObj64; + Object_60 *obj60; + + obj->unk3B = 0; + obj->unk18 = 0x28; + if (func_8001139C() == 0) { + obj->unk78 += speed; + } + set_ghost_position_and_rotation(obj); + func_800AFC3C(obj, speed); + someOtherObj = get_object_struct(0); + someOtherObj64 = someOtherObj->unk64; + obj60 = obj->unk60; + if (obj60->unk0 == 1) { + s8 temp = someOtherObj64->unk1D6; + if ((temp == 1) || (temp == 2)) { + someObj = (Object *)obj60->unk4; + someObj->y_rotation = 0x4000; + someObj->unk3A++; + someObj->unk3A &= 1; + } + } +} + +void obj_init_characterflag(Object *obj, LevelObjectEntry_CharacterFlag *entry) { + f32 phi_f0; + obj->unk78 = (s32)entry->unkE; + obj->unk7C.word = -1; + obj->y_rotation = entry->unkC << 6 << 4; // Not sure about the values here. + phi_f0 = (f32)(entry->unkA & 0xFF); + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = (f32)(obj->header->scale * phi_f0); +} + +void obj_loop_characterflag(Object *obj, s32 speed) { + s32 temp_t4; + s32 temp_t5; + Object *someObj; + Object_64_80035F6C *obj64; + Object_64_80035F6C_2 *someObj64; + + if (obj->unk7C.word < 0) { + someObj = get_object_struct(obj->unk78); + if (someObj != NULL) { + obj64 = obj->unk64; + someObj64 = someObj->unk64; + obj->unk7C.word = someObj64->unk3; + if (obj->unk7C.word < 0 || obj->unk7C.word >= 0xA) { + obj->unk7C.word = 0; + } + obj64->unk20 = D_800DC980; + obj64->unk24 = obj->unk68[obj->unk7C.word]; + temp_t4 = (obj64->unk24[0] - 1) << 0x15; + temp_t5 = (obj64->unk24[1] - 1) << 5; + obj64->unk0 = 0x40000103; + obj64->unk4 = 0; + obj64->unk8 = temp_t4; + obj64->unkC = temp_t5; + obj64->unk10 = 0x40010203; + obj64->unk14 = temp_t4; + obj64->unk18 = (s32)(temp_t4 | temp_t5); + obj64->unk1C = temp_t5; + } + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") + +void obj_init_stopwatchman(Object *obj, LevelObjectEntry_StopWatchMan *entry) { + Object_64 *temp; + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk4C->unk12 = 0; + temp = obj->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0_a.unk0 = 0.0f; + D_8011D4D8 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_stopwatchman.s") + +void func_80036BCC(u16 arg0, s32 arg1) { + if ((D_8011D4D8 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D8); //This is likely wrong and will need to be fixed + D_8011D4D8 = 0; + } + if (D_8011D4D8 == 0) { + func_80001D04(arg0, &D_8011D4D8); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_fish.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_fish.s") + +void obj_init_lavaspurt(Object *obj, LevelObjectEntry_LavaSpurt *entry) { + obj->unk78 = entry->unk9 * 2; + obj->unk7C.word = entry->unk8; +} + +void obj_loop_lavaspurt(Object *obj, s32 speed) { + if (obj->unk78 > 0) { + obj->unk78 -= speed; + obj->unk6 |= 0x4000; + } else { + obj->unk6 &= ~0x4000; + obj->unk18 += speed * 4; + if (obj->unk18 >= 256) { + obj->unk18 = 0; + obj->unk78 = get_random_number_from_range(0, 30) + obj->unk7C.word; + } + } +} + +void obj_init_posarrow(Object *obj, LevelObjectEntry_PosArrow *entry) { + obj->unk6 |= 0x4000; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_posarrow.s") + +void obj_init_animator(Object *obj, LevelObjectEntry_Animator *entry, s32 arg2) { + Object_64_800376E0 *obj64; + LevelModel *levelModel; + s16 segmentBatchCount; + + obj64 = obj->unk64; + levelModel = func_8002C7C4(); + obj64->unk2 = entry->unk8; + obj64->unk4 = entry->unk9; + obj64->unk6 = entry->unkA; + obj64->segmentId = get_level_segment_index_from_position(obj->x_position, obj->y_position, obj->z_position); + if (arg2 == 0) { + obj64->unk8 = 0; + obj64->unkA = 0; + } + if (obj64->segmentId != -1) { + if (obj64->unk2 < 0) { + obj64->unk2 = 0; + } + segmentBatchCount = levelModel->segments[obj64->segmentId].numberOfBatches; + if (obj64->unk2 >= segmentBatchCount) { + obj64->unk2 = segmentBatchCount - 1; + } + } + obj_loop_animator(obj, 0x20000); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_animator.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_animation.s") + +void obj_loop_animobject(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); +} + +void obj_loop_dooropener(Object *obj, s32 speed) { + s32 phi_a0; + unk80037D08_arg0_64 *sp18; + + sp18 = obj->unk64; + phi_a0 = 1 - func_8001F460(obj, speed, obj); + if (sp18->unk2A > 0) { + phi_a0 = 0; + } + func_800235D0(phi_a0); +} + +void obj_init_overridepos(Object *obj, LevelObjectEntry_OverridePos *entry) { +} + +/* Unused? */ +void func_80037D60(s32 arg0, s32 arg1) { +} + +void obj_init_wizpigship(Object *obj, LevelObjectEntry_WizpigShip *entry) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_wizpigship.s") + +void obj_loop_vehicleanim(Object *obj, s32 speed) { + Object_60_800380F8 *obj60; + Object *someObj; + + func_8001F460(obj, speed, obj); + obj60 = obj->unk60; + if (obj60 != NULL) { + if (obj60->unk0 > 0) { + someObj = obj60->unk0 == 3 ? obj60->unkC : obj60->unk4; + someObj->y_rotation = 0x4000; + someObj->unk3A++; + if (someObj->unk3A == someObj->header->numberOfModelIds) { + someObj->unk3A = 0; + } + } + } +} + +void obj_init_hittester(Object *obj, LevelObjectEntry_HitTester *entry) { + obj->unk4C->unk14 = 0x81; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_hittester(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); +} + +void obj_init_dynamic_lighting_object(Object *obj, LevelObjectEntry_DynamicLightingObject *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_init_unknown96(Object *obj, LevelObjectEntry_Unknown96 *entry) { + obj->unk4C->unk14 = 0x81; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_init_snowball(Object *obj, LevelObjectEntry_Snowball *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +#ifdef NON_EQUIVALENT +// Regalloc issues +void obj_loop_snowball(Object *obj, s32 speed) { + Object_64_8003827C *obj64 = obj->unk64; + if (obj64->unk24 == 0) { + if (obj64->unk38 != 0) { + obj64->unk24 = (s16)(obj64->unk38 & 0xFF); + } + } + if (obj64->unk24 != 0) { + if (obj64->unk20 == 0) { + func_80009558(obj64->unk24 & 0xFFFF, obj->x_position, obj->y_position, obj->z_position, 1, &obj64->unk20); + } else { + func_800096D8(obj64->unk20, obj->x_position, obj->y_position, obj->z_position); + } + } + func_8001F460(obj, speed, obj); +} + +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_snowball.s") +#endif + +// Unused +void func_80038330(s32 arg0, s32 arg1) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_char_select.s") + +void obj_loop_animcamera(Object *obj, s32 speed) { + s32 temp_v0; + s32 phi_v1; + Object_64_80038710 *obj64; + + temp_v0 = func_8001F460(obj, speed, obj); + obj->unk6 |= 0x4000; + obj64 = obj->unk64; + if (temp_v0 == 0) { + if (get_viewport_count() == VIEWPORTS_COUNT_1_PLAYER) { + phi_v1 = func_800210CC(obj64->unk44); + } else { + phi_v1 = 1; + } + if (phi_v1) { + func_80066488(obj64->unk30, obj->x_position, obj->y_position, obj->z_position, 0x8000 - obj->y_rotation, -obj->x_rotation, obj->z_rotation); + } + } +} + +// Unused +void func_800387C0(s32 arg0, s32 arg1) { +} + +void obj_loop_animcar(Object *obj, s32 speed) { + Object *someObj; + s32 temp_v0; + temp_v0 = obj->unk78; + someObj = NULL; + if (temp_v0 != 0) { + someObj = get_object_struct(temp_v0 - 1); + } + obj->unk7C.word = func_8001F460(obj, speed, obj); + obj->unk6 |= 0x4000; + if (obj->unk7C.word == 0 && someObj != NULL) { + Object_64_800387CC *someObj64 = someObj->unk64; + someObj64->unk148 = obj; + } +} + +void obj_init_infopoint(Object *obj, LevelObjectEntry_InfoPoint *entry) { + if (entry->unk8[1] != 0) { + obj->unk4C->unk14 = 0x21; + } else { + obj->unk4C->unk14 = 0x22; + } + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0xF; + obj->unk4C->unk12 = 0; + obj->unk78 = (entry->unk8[2] << 16) | entry->unk8[0]; // Not sure about the values here. + obj->unk7C.word = entry->unk8[1]; + obj->y_rotation = entry->unkB << 10; // Not sure about the values here. +} + +void obj_loop_infopoint(Object *obj, s32 speed) { + s16 temp_a0; + Object_4C *obj4C; + Object *playerObj; + + if (obj->unk7C.word == 0) { + obj->unk6 |= 0x4000; + } else { + obj->unk6 &= ~0x4000; + } + + obj4C = obj->unk4C; + if (obj4C->unk13 < ((obj->unk78 >> 16) & 0xFF)) { + playerObj = obj4C->unk0; + if (playerObj->header->behaviorId == 1) { + Object_64_800388D4 *playerObj64 = playerObj->unk64; + temp_a0 = playerObj64->unk0; + if ((temp_a0 != -1) && (get_buttons_pressed_from_player(temp_a0) & Z_TRIG)) { + func_800C31EC(obj->unk78 & 0xFF); + } + } + } +} + +void obj_init_smoke(Object *obj, LevelObjectEntry_Smoke *entry) { +} + +void obj_loop_smoke(Object *obj, s32 speed) { + f32 temp_f2 = speed; + if (osTvType == TV_TYPE_PAL) { + temp_f2 *= 1.2; + } + obj->x_position += obj->x_velocity * temp_f2; + obj->unk18 += speed * 16; + obj->y_position += obj->y_velocity * temp_f2; + obj->z_position += obj->z_velocity * temp_f2; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +void obj_init_unknown25(Object *obj, LevelObjectEntry_Unknown25 *entry) { +} + +void obj_loop_unknown25(Object *obj, s32 speed) { + obj->unk18 += speed * 8; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +void obj_init_wardensmoke(Object *obj, LevelObjectEntry_WardenSmoke *entry) { +} + +void obj_loop_wardensmoke(Object *obj, s32 speed) { + f32 temp_f2; + + temp_f2 = (f32)speed; + if (osTvType == TV_TYPE_PAL) { + temp_f2 *= 1.2; + } + obj->unk18 += speed * 4; + obj->y_position += temp_f2 * 0.25; + if (obj->unk18 >= 256) { + gParticlePtrList_addObject(obj); + obj->unk18 = 255; + } +} + +#ifdef NON_EQUIVALENT +// regalloc issues +void obj_init_bombexplosion(Object *obj, unk80038B74 *entry) { + s32 temp; + obj->unk18 = 0; + obj->scale = 0.5f; + obj->unk3A = get_random_number_from_range(0, obj->header->numberOfModelIds - 1); + obj->unk78 = 0; + obj->unk7C.word = 0xFF; + temp = entry->unk8; + if (temp != 0) { + obj->unk7C.word |= (temp << 8) & 0xFF00; + } + obj->unk74 = 1; +} + +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_bombexplosion.s") +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bombexplosion.s") + +void obj_init_teleport(Object *obj, LevelObjectEntry_Teleport *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0xF; + obj->unk4C->unk12 = 0; + if (get_settings()->cutsceneFlags & 1) { + obj->unk78 = 1; + } +} + +void obj_loop_teleport(Object *obj, s32 speed) { + if (obj->unk78 != 0) { + Object_3C_80038DC4 *temp = obj->unk3C_a.unk3C; + if (obj->unk4C->unk13 < 0x78) { + func_8006F338(temp->unk8); + obj->unk78 = 0; + func_80001D04(0x30, 0); + func_80000FDC(0x12A, 0, 1.0f); + } + } +} + +void obj_init_exit(Object *obj, LevelObjectEntry_Exit *entry) { + f32 phi_f0; + Object_64_80038E3C *obj64; + phi_f0 = entry->unk10 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk11 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk10; + obj64->unk14 = entry->unk18; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk10; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_exit.s") + +void obj_init_cameracontrol(Object *obj, LevelObjectEntry_CameraControl *entry) { + obj->unk78 = entry->unk8; + func_80011390(); +} + +void obj_loop_cameracontrol(Object *obj, s32 speed) { +} + +void obj_init_setuppoint(Object *obj, LevelObjectEntry_SetupPoint *entry) { + s32 temp; + obj->unk78 = entry->unk8; + obj->unk7C.word = entry->unk9; + obj->y_rotation = entry->unkA << 6 << 4; // Not sure about the values here. +} + +void obj_loop_setuppoint(Object *obj, s32 speed) { +} + +void obj_init_dino_whale(Object *obj, LevelObjectEntry_Dino_Whale *entry) { + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 3; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; +} + +void obj_loop_dino_whale(Object *obj, s32 speed) { + s32 sp2C; + + if (obj->unk78 > 0) { + obj->unk78 -= speed; + speed *= 2; + } else { + obj->unk78 = 0; + } + sp2C = obj->unk18; + func_8001F460(obj, speed, obj); + func_800113CC(obj, 0, sp2C, 0xAC, 0xAD); + if (obj->unk4C->unk13 < 0xFF) { + if (obj->unk78 == 0) { + obj->unk78 = 0x3C; + func_80009558(0x23B, obj->x_position, obj->y_position, obj->z_position, 4, NULL); + } + } +} + +void obj_init_parkwarden(Object *obj, LevelObjectEntry_Parkwarden *entry) { + Object_64 *temp; + obj->unk4C->unk14 = (u16)1; + obj->unk4C->unk11 = (u8)0; + obj->unk4C->unk10 = (u8)0x1E; + obj->unk4C->unk12 = (u8)0; + temp = obj->unk64; + temp->unkCD.bytes.byteD = 0xFF; + temp->unk0_a.unk0 = 0.0f; + temp->unk28 = 0; + temp->unk2C = 0; + temp->unk34 = 0; + temp->unk36 = 0; + D_8011D4D4 = 0; + D_8011D4E2 = 0x10F; +} + +void func_80039320(s16 arg0) { + D_8011D4E2 = arg0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_parkwarden.s") + +void func_8003AC3C(u16 arg0, s32 arg1) { + if ((D_8011D4D4 != 0) && (arg1 & 1)) { + func_8000488C(D_8011D4D4); + D_8011D4D4 = 0; + } + if (D_8011D4D4 == 0) { + func_80001D04(arg0, &D_8011D4D4); + } +} + +void obj_loop_gbparkwarden(Object *obj, s32 speed) { +} + +f32 func_8003ACAC(void) { + return D_8011D4D0; +} + +void obj_init_checkpoint(Object *obj, LevelObjectEntry_Checkpoint *entry, s32 arg2) { + f32 phi_f0 = (s32)(entry->unk8 & 0xFF); + if (phi_f0 < 5.0f) { + phi_f0 = 5.0f; + } + phi_f0 /= 64; + obj->scale = phi_f0; + obj->y_rotation = entry->unkA << 6 << 4; // Not sure about the values here. + func_80011390(); +} + +void obj_loop_checkpoint(Object *obj, s32 speed) { +} + +void obj_init_modechange(Object *obj, LevelObjectEntry_ModeChange *entry) { + f32 phi_f0; + Object_64_8003AD34 *obj64; + phi_f0 = entry->unk8 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk9 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk8; + obj64->unk14 = entry->unkA; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk8; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_modechange.s") + +void obj_init_bonus(Object *obj, LevelObjectEntry_Bonus *entry) { + f32 phi_f0; + Object_64_8003AD34 *obj64; + phi_f0 = entry->unk8 & 0xFF; + if (phi_f0 < 5) { + phi_f0 = 5; + } + obj64 = obj->unk64; + phi_f0 /= 128; + obj->scale = phi_f0; + obj->y_rotation = entry->unk9 << 6 << 4; + obj64->unk0 = func_800707C4(obj->y_rotation); + obj64->unk4 = 0.0f; + obj64->unk8 = func_800707F8(obj->y_rotation); + obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); + obj64->unk10 = entry->unk8; + obj64->unk14 = entry->unkA; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk8; + obj->unk4C->unk12 = 0; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bonus.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_goldenballoon.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_goldenballoon.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_door.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_door.s") + +void obj_init_ttdoor(Object *obj, LevelObjectEntry_TTDoor *entry) { + f32 temp_f0; + Object_64_8003C1E0 *obj64; + f32 phi_f0; + + obj->unk3A = 0; + obj64 = obj->unk64; + obj->y_rotation = entry->unk8 << 6 << 4; + obj64->unkF = entry->unkE; + obj64->unk13 = entry->unkB; + obj64->unk0 = obj->y_position; + obj64->unk8 = 0; + obj64->unk12 = entry->unkA; + obj->unk78 = obj->y_rotation; + obj->unk7C.word = (entry->unk9 & 0x3F) << 0xA; + phi_f0 = entry->unkC & 0xFF; + if (phi_f0 < 10) { + phi_f0 = 10; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk4C->unk14 = 0x21; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_ttdoor.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_trigger.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_trigger.s") + +void obj_init_bridge_whaleramp(Object *obj, LevelObjectEntry_Bridge_WhaleRamp *entry) { + Object_64 *temp = obj->unk64; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unk9 << 6 << 4; + temp->unk0_a.unk0 = obj->y_position; + obj->unk4C->unk14 = 0x21; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + temp->unk4 = 0; + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_bridge_whaleramp.s") + +void obj_init_rampswitch(Object *obj, LevelObjectEntry_RampSwitch *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x14; + obj->unk4C->unk12 = 0; + obj->unk78 = entry->unk8; +} + +void obj_loop_rampswitch(Object *obj, s32 speed) { + if (obj->unk4C->unk13 < 0x2D) { + func_8001E344(obj->unk78); + } + obj->unk4C->unk13 = (u8)0xFF; +} + +void obj_init_seamonster(Object *obj, LevelObjectEntry_SeaMonster *entry) { +} + +void obj_loop_seamonster(Object *obj, s32 speed) { +} + +void obj_init_fogchanger(Object *obj, LevelObjectEntry_FogChanger *entry) { + f32 temp_f0; + temp_f0 = entry->unk8 * 8.0f; + temp_f0 = temp_f0 * temp_f0; + obj->unk78f = temp_f0; +} + +void obj_init_skycontrol(Object *obj, LevelObjectEntry_SkyControl *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = entry->unk9; + obj->unk78 = entry->unk8; + obj->unk7C.word = entry->unk9; +} + +void obj_loop_skycontrol(Object *obj, s32 speed) { + if (obj->unk4C->unk13 < obj->unk7C.word) { + func_80028044(obj->unk78); + } +} + +void obj_init_ainode(Object *obj, LevelObjectEntry_AiNode *entry) { + if (entry->unk9 == 0xFF) { + entry->unk9 = func_8001C48C(obj) & 0xFF; + } + func_8001D1BC(entry->unk9); + func_8001D1AC(); +} + +void obj_loop_ainode(Object *obj, s32 speed) { +} + +void obj_init_treasuresucker(Object *obj, LevelObjectEntry_TreasureSucker *entry) { + obj->unk18 = 0x78; + obj->unk78 = (entry->unk8 - 1) & 3; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_treasuresucker.s") + +void obj_init_flycoin(Object *obj, LevelObjectEntry_FlyCoin *entry) { +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_flycoin.s") + +void obj_init_coincreator(Object *obj, LevelObjectEntry_BananaCreator *entry) { + obj->unk18 = 0x64; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_coincreator.s") + +void obj_init_coin(Object *obj, LevelObjectEntry_Banana *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk7C.half.upper = 0x14; + obj->unk7C.half.lower = 0x10; + if (get_filtered_cheats() & CHEAT_DISABLE_BANANAS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_coin.s") + +void obj_init_silvercoin_adv2(Object *obj, LevelObjectEntry_SilverCoinAdv2 *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk78 = 3; + obj->unk7C.word = 16; + if (!is_in_tracks_mode()) { + if (func_8000E1DC() && is_in_adventure_two()) { + obj->unk78 = 0; + } else { + obj->unk78 = 3; + } + } + if (obj->unk78 == 3) { + obj->unk6 |= 0x600; + gParticlePtrList_addObject(obj); + } +} + +void obj_init_silvercoin(Object *obj, LevelObjectEntry_SilverCoin *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk78 = 3; + obj->unk7C.word = 0; + if (!is_in_tracks_mode()) { + if (func_8000E1DC() && !is_in_adventure_two()) { + obj->unk78 = 0; + } else { + obj->unk78 = 3; + } + } + if (obj->unk78 == 3) { + obj->unk6 |= 0x600; + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_silvercoin.s") + +void obj_init_worldkey(Object *obj, LevelObjectEntry_WorldKey *entry) { + Settings *settings; + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + entry->unk8 &= 0xF; + obj->unk78 = entry->unk8; + settings = get_settings(); + if (!is_in_tracks_mode() && !(settings->keys & (1 << obj->unk78))) { + return; + } + gParticlePtrList_addObject(obj); +} + +/** + * Rotates the key and checks to see if the player grabbed it. + */ +void obj_loop_worldkey(Object *worldKeyObj, s32 speed) { + Settings *settings; + Object *playerObj; + + // Check if the player is near the key + // "worldKeyObj->unk4C->unk13" is the player's distance from the key (Up to 255). + if (worldKeyObj->unk4C->unk13 < WORLD_KEY_GRAB_CHECK_RADIUS) { + // "worldKeyObj->unk4C->unk0" is only set when the player is within 255 units of + // the key object, otherwise it is NULL. + playerObj = worldKeyObj->unk4C->unk0; + if (playerObj != NULL) { + if (playerObj->header->behaviorId == 1) { // Is the player a racer? + Object_64_8003DF08 *obj64 = playerObj->unk64; + if (obj64->unk0 != -1) { + // Player has grabbed the key! + play_sound(SOUND_WORLD_KEY_GRAB); + settings = get_settings(); + settings->keys |= 1 << worldKeyObj->unk78; // Set key flag + gParticlePtrList_addObject(worldKeyObj); // Makes the key unload. + } + } + } + } + + // Rotate world key + worldKeyObj->y_rotation += speed * 256; +} + +typedef struct Object_64_8003DFCC { + f32 unk0; + s16 unk4; + s8 unk6[0x2]; +} Object_64_8003DFCC; + +void obj_init_weaponballoon(Object *obj, LevelObjectEntry_WeaponBalloon *entry) { + s32 cheats; + Object_64_8003DFCC *obj64; + f32 scalef; + + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 4; + obj->unk4C->unk10 = 0x14; + + cheats = get_filtered_cheats(); + + if (cheats & CHEAT_ALL_BALLOONS_ARE_BLUE) { + entry->balloonType = BALLOON_TYPE_BOOST; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RED) { + entry->balloonType = BALLOON_TYPE_MISSILE; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_GREEN) { + entry->balloonType = BALLOON_TYPE_TRAP; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_YELLOW) { + entry->balloonType = BALLOON_TYPE_SHIELD; + } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RAINBOW) { + entry->balloonType = BALLOON_TYPE_MAGNET; + } + + // I guess unk8 is unused? + if (entry->unk8 >= 6) { + entry->unk8 = 0; + } + + if (obj->unk3A >= obj->header->numberOfModelIds) { + obj->unk3A = 0; + } + + obj->unk3A = entry->balloonType; + obj->unk78 = obj->unk3A; + + scalef = entry->scale & 0xFF; + if (scalef < 10) { + scalef = 10; + } + scalef /= 64; + + obj64 = (Object_64_8003DFCC*)obj->unk64; + + obj->scale = obj->header->scale * scalef; + obj64->unk0 = obj->scale; + obj64->unk4 = 0; + obj->unk7C.word = 0; + + if (get_filtered_cheats() & CHEAT_DISABLE_WEAPONS) { + gParticlePtrList_addObject(obj); + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_weaponballoon.s") + +void obj_init_wballoonpop(Object *obj, LevelObjectEntry_WBalloonPop *entry) { +} + +void obj_loop_wballoonpop(Object *obj, s32 speed) { +} + +void obj_init_weapon(Object *obj, LevelObjectEntry_Weapon *entry) { + obj->unk4C->unk14 = 2; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x18; + obj->unk4C->unk12 = 0; + obj->unk78 = func_8000C8B4(0x1E0); + obj->unk7C.word = 0; +} + +void obj_loop_weapon(Object *obj, s32 speed) { + Object_64 *obj64 = obj->unk64; + switch (obj64->unk18) { + case 0: + case 1: + func_8003E694(obj, speed); + break; + case 2: + case 3: + case 10: + case 11: + func_8003F2E8(obj, speed); + break; + } + return; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") + +void func_8003F0D0(void) { + D_8011D4DC = 0; +} + +void func_8003F0DC(void) { + D_8011D4DC--; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") + +#ifdef NON_EQUIVALENT +// Regalloc issues +void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6) { + Object *someObj; + unk8003FC44 sp24; + + sp24.unk4 = (s32)arg1 + 0x24; + sp24.unk1 = 0xA; + sp24.unk2 = arg0; + sp24.unk0 = arg3; + sp24.unk7 = arg6; + sp24.unk6 = arg2; + someObj = func_8000EA54(&sp24, 1); + if (someObj != NULL) { + someObj->scale *= 3.5 * arg5; + someObj->unk3C_a.unk3C = NULL; + someObj->x_velocity = 0.0f; + someObj->y_velocity = 0.0f; + someObj->z_velocity = 0.0f; + } + if (arg4 != 0) { + func_80009558(arg4, arg0, arg1, arg2, 4, 0); + } +} +#else +GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") +#endif + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_audio.s") + +void obj_init_audioline(Object *obj, LevelObjectEntry_AudioLine *entry) { + Object_64_8003FEF4 *obj64; + + obj64 = obj->unk64; + obj64->unk0 = entry->unk8; + obj64->unk2 = entry->unkA; + obj64->unkC = entry->unkC; + obj64->unkD = entry->unkD; + obj64->unk_union.unk8_word = 0; + obj64->unk4 = entry->unkE; + obj64->unk11 = entry->unk12; + obj64->unk10 = entry->unk11; + obj64->unkE = entry->unk9; + obj64->unkF = entry->unk10; + obj64->unk12 = entry->unk13; + func_800098A4(obj64->unk0, obj64->unk2, entry->common.x, entry->common.y, entry->common.z, + obj64->unkF, obj64->unkE, obj64->unk10, obj64->unk12, obj64->unk4, obj64->unk11, + obj64->unkC, obj64->unkD); + gParticlePtrList_addObject(obj); +} + +void obj_init_audioreverb(Object *obj, LevelObjectEntry_AudioReverb *entry) { + s32 temp; + Object_64_8004001C *obj64 = (Object_64_8004001C *)obj->unk64; + obj64->unk2 = entry->unk8; + temp = entry->unk9; + obj64->unk4 = temp & 0xFF; + obj64->unk5 = entry->unkA; + func_80009968(entry->common.x, entry->common.y, entry->common.z, obj64->unk2, obj64->unk4, obj64->unk5); + gParticlePtrList_addObject(obj); +} + +void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2) { + Object_64_800400A4 *obj64; + LevelModel *levelModel; + s16 numberOfTexturesInLevel; + + obj64 = obj->unk64; + levelModel = func_8002C7C4(); + obj64->unk0 = entry->unk8; + if (obj64->unk0 < 0) { + obj64->unk0 = 0; + } + numberOfTexturesInLevel = levelModel->numberOfTextures; + if (obj64->unk0 >= numberOfTexturesInLevel) { + obj64->unk0 = numberOfTexturesInLevel - 1; + } + obj64->unk4 = (s16)entry->unkA; + obj64->unk6 = (s16)entry->unkB; + if (arg2 == 0) { + obj64->unk8 = 0; + obj64->unkA = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_texscroll.s") + +void obj_init_rgbalight(Object *obj, LevelObjectEntry_RgbaLight *entry, s32 arg2) { + obj->unk64 = func_80031CAC(obj, entry); +} + +void obj_init_buoy_pirateship(Object *obj, LevelObjectEntry_Buoy_PirateShip *entry, s32 arg2) { + obj->unk64 = func_800BE654(obj->unk2E, obj->x_position, obj->z_position); + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 0; + obj->unk4C->unk10 = 0x1E; + obj->unk4C->unk12 = 0; +} + +void obj_loop_buoy_pirateship(Object *obj, s32 speed) { + if (obj->unk64 != NULL) { + obj->y_position = func_800BEEB4(obj->unk64); + } + obj->unk18 += speed * 8; +} + +void obj_init_log(Object *obj, LevelObjectEntry_Log *entry, s32 arg2) { + f32 phi_f0; + obj->unk64 = func_800BE654(obj->unk2E, obj->x_position, obj->z_position); + obj->unk4C->unk14 = 1; + obj->unk4C->unk11 = 2; + obj->unk4C->unk10 = 0x1E; + phi_f0 = entry->unk9 & 0xFF; + if (phi_f0 < 10.0f) { + phi_f0 = 10.0f; + } + phi_f0 /= 64; + obj->scale = obj->header->scale * phi_f0; + obj->unk3A = entry->unk8; + obj->y_rotation = entry->unkA << 6 << 4; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_log.s") + +void obj_init_weather(Object *obj, LevelObjectEntry_Weather *entry) { + f32 temp = entry->unk8; + temp *= temp; + obj->unk78f = temp; +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_weather.s") + +void obj_init_lensflare(Object *obj, LevelObjectEntry_LensFlare *entry) { + func_800AC8A8(obj); +} + +void obj_init_lensflareswitch(Object *obj, LevelObjectEntry_LensFlareSwitch *entry, s32 arg2) { + func_800ACF60(obj); + obj->scale = entry->unk8; + obj->scale /= 40.0f; +} + +void obj_init_wavegenerator(Object *obj, LevelObjectEntry_WaveGenerator *entry, s32 arg2) { + func_800BF524(obj); //waves.c +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_butterfly.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_butterfly.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_midifade.s") +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_init_midifadepoint.s") + +void obj_init_midichset(Object *obj, LevelObjectEntry_Midichset *entry) { + unk80042014_arg0_64 *temp = obj->unk64; + temp->unk0 = entry->unk8; + temp->unk2 = entry->unkA; + temp->unk3 = entry->unkB; +} + +void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry) { + func_800AF134(obj->unk6C, entry->unk9, entry->unk8, 0, 0, 0); + obj->unk78 = entry->unkA; +} + +void obj_loop_bubbler(Object *obj, s32 speed) { + if (obj->unk78 >= get_random_number_from_range(0, 0x400)) { + obj->unk74 = 1; + } else { + obj->unk74 = 0; + } + if (get_number_of_active_players() < 2) { + func_800AFC3C(obj, speed); + } +} + +void obj_init_boost(Object *obj, LevelObjectEntry_Boost *entry) { + obj->unk64 = (s32)get_misc_asset(0x14) + (entry->unk8[0] << 7); + obj->unk3C_a.unk3C = NULL; +} + +void obj_init_unknown94(Object *obj, LevelObjectEntry_Unknown94 *entry, s32 arg2) { +} + +void obj_loop_unknown94(Object *obj, s32 speed) { +} + +void obj_init_rangetrigger(Object *obj, LevelObjectEntry_RangeTrigger *entry) { +} + +void obj_loop_rangetrigger(Object *obj, s32 speed) { + s32 temp; + Object_3C_80042178 *obj3C; + unk80042178 sp20; + + obj3C = obj->unk3C_a.unk3C; + if (func_80016DE8(obj->x_position, 0, obj->z_position, (f32)obj3C->unk8, 1, &sp20) > 0) { + obj->unk74 = obj3C->unkA; + } else { + obj->unk74 = 0; + } + func_800AFC3C(obj, speed); +} + +void obj_init_frog(Object *obj, LevelObjectEntry_Frog *entry) { + Object_64_80042210 *obj64; + + obj64 = (Object_64_80042210 *)obj->unk64; + obj64->unk15 = entry->unkA; + obj64->unk0 = obj->x_position; + obj64->unk4 = obj->y_position; + obj64->unk8 = obj->z_position; + obj64->unkC = entry->unk8; + obj64->unk10 = obj64->unkC * obj64->unkC; + obj64->unk14 = 0; + obj64->unk20 = obj->x_position; + obj64->unk24 = obj->z_position; + obj64->unk19 = 0; + obj64->unk30 = 1.0f; + + if (obj64->unk15) { + obj->unk3A = 1; + /** + * Don't spawn the chicken frog if drumstick is already unlocked, or + * if the player hasn't completed the trophy races yet. + */ + if (is_drumstick_unlocked() || (get_settings()->trophies & 0xFF) != 0xFF) { + gParticlePtrList_addObject(obj); + } + } else { + obj->unk3A = 0; + } +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_frog.s") + +void obj_loop_pigrocketeer(Object *obj, s32 speed) { + Object *someObj; + Object_64_80042998 *obj64; + + func_8001F460(obj, speed, obj); + someObj = func_8000BF44(-1); + + if (someObj != NULL) { + obj64 = someObj->unk64; + someObj->unk78 = 0; + if (obj64 != 0) { + obj64->unk72 += speed; + obj64->unk70 = 2; + obj64->unk74 = 1.0f; + func_8000B750(obj, -1, 2, 1, 1); + } + } +} + +void obj_init_levelname(Object *obj, LevelObjectEntry_LevelName *entry) { + obj->unk78f = entry->unk9 * 8.0f; + obj->unk78f *= obj->unk78f; + obj->unk7C.half.upper = entry->unk8; + obj->unk7C.half.lower = 0; + if (is_in_tracks_mode()) { + gParticlePtrList_addObject(obj); + } + func_800C56D0(4); +} + +GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_levelname.s") + +void obj_loop_wizghosts(Object *obj, s32 speed) { + func_8001F460(obj, speed, obj); + obj->unk18 = (obj->unk18 + (speed * 8)) & 0xFF; +} + diff --git a/src/object_functions.h b/src/object_functions.h new file mode 100644 index 00000000..217db4b7 --- /dev/null +++ b/src/object_functions.h @@ -0,0 +1,509 @@ +#ifndef _OBJECT_FUNCTIONS_H_ +#define _OBJECT_FUNCTIONS_H_ + +#include "types.h" +#include "structs.h" +#include "level_object_entries.h" + +#define WORLD_KEY_GRAB_CHECK_RADIUS 50 +#define SOUND_WORLD_KEY_GRAB 54 + +typedef struct Object78_80033DD0 { + s32 *unk0; + s16 unk4; + s16 unk6; +} Object78_80033DD0; + +typedef struct unk80034B4C { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk80034B4C; + +typedef struct Object_3C_80034B74 { + u8 pad0[0x8]; + u8 unk8; + u8 unk9; + u8 unkA; + u8 unkB; + u8 unkC; + u8 unkD; +} Object_3C_80034B74; + +typedef struct Object_64_80034B74 { + u8 pad0[0x1FE]; + u8 unk1FE; + u8 unk1FF; +} Object_64_80034B74; + +typedef struct unk8003564C { + s8 unk0; + s8 unk1; + s16 unk2; + s16 unk4; + s16 unk6; +} unk8003564C; + +typedef struct Object_64_8003564C { + u8 pad0[4]; + Object *unk4; +} Object_64_8003564C; + +typedef struct unk80035E20 { + u8 pad0[0x40]; + s32 unk40; + u8 pad44[0x34]; + s32 unk78; + s32 unk7C; +} unk80035E20; + +typedef struct Object_64_80035E34 { + u8 pad0[0x1D6]; + s8 unk1D6; +} Object_64_80035E34; + +typedef struct Object_64_80035F6C { + s32 unk0; + s32 unk4; + s32 unk8; + s32 unkC; + s32 unk10; + s32 unk14; + s32 unk18; + s32 unk1C; + s16 *unk20; + u8 *unk24; +} Object_64_80035F6C; + +typedef struct Object_64_80035F6C_2 { + u8 pad0[3]; + s8 unk3; +} Object_64_80035F6C_2; + +typedef struct unk80037578 { + u8 pad0[0x78]; + s32 unk78; + s32 unk7C; +} unk80037578; + +typedef struct unk80037624 { + u8 pad0[6]; + s16 unk6; +} unk80037624; + +/* Size: 12 bytes */ +typedef struct LevelObjectEntry800376E0 { + LevelObjectEntryCommon common; + s8 unk8; + s8 unk9; + s8 unkA; +} LevelObjectEntry800376E0; + +typedef struct Object_64_800376E0 { + s16 segmentId; + s16 unk2; + s16 unk4; + s16 unk6; + s16 unk8; + s16 unkA; +} Object_64_800376E0; + +typedef struct unk80037D08_arg0_64 { + u8 pad0[0x2A]; + s16 unk2A; +} unk80037D08_arg0_64; + +typedef struct unk80037D08_arg0 { + u8 pad0[0x64]; + unk80037D08_arg0_64 *unk64; +} unk80037D08_arg0; + +// Not sure if Object_60 differs between objects yet. +typedef struct Object_60_800380F8 { + s32 unk0; + Object *unk4; + s32 pad8; + Object *unkC; +} Object_60_800380F8; + +typedef struct Object_64_8003827C { + u8 pad0[0x20]; + s32 unk20; + s16 unk24; + u8 pad28[0x12]; + s8 unk38; +} Object_64_8003827C; + +typedef struct Object_64_80038710 { + u8 pad0[0x30]; + s8 unk30; + u8 pad31[0x13]; + s8 unk44; +} Object_64_80038710; + +typedef struct Object_64_800387CC { + u8 pad0[0x148]; + Object *unk148; +} Object_64_800387CC; + +typedef struct Object_64_800388D4 { + s16 unk0; +} Object_64_800388D4; + +typedef struct unk80038B74 { + u8 pad0[8]; + s8 unk8; +} unk80038B74; + +typedef struct Object_3C_80038DC4 { + u8 pad0[8]; + s8 unk8; +} Object_3C_80038DC4; + +typedef struct Object_64_80038E3C { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + s32 unk10; + s8 unk14; +} Object_64_80038E3C; + +typedef struct unk80039160 { + u8 pad0[0x78]; + s32 unk78; +} unk80039160; + +typedef struct unk80039190 { + u16 unk0; + u8 pad2[0x76]; + s32 unk78; + s32 unk7C; +} unk80039190; + +typedef struct Object_64_8003AD34 { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + s32 unk10; + s8 unk14; +} Object_64_8003AD34; + +typedef struct Object_64_8003C1E0 { + f32 unk0; + u8 pad4[4]; + s32 unk8; + u8 padC[3]; + s8 unkF; + u8 pad10[2]; + u8 unk12; + u8 unk13; +} Object_64_8003C1E0; + +typedef struct unk8003CF18 { + u8 pad1A[0x78]; + f32 unk78; +} unk8003CF18; + +typedef struct unk8003D038 { + u8 pad0[0x18]; + s16 unk18; + u8 pad1A[0x5E]; + s32 unk78; +} unk8003D038; + +typedef struct unk8003D3EC { + u8 pad0[0x18]; + u16 unk18; +} unk8003D3EC; + +typedef struct Object_64_8003DF08 { + s16 unk0; +} Object_64_8003DF08; + +typedef struct unk8003FC44 { + s8 unk0; + s8 unk1; + s16 unk2; + s16 unk4; + s16 unk6; + s8 unk7; +} unk8003FC44; + + +typedef struct Object_64_8003FEF4 { + u8 unk0; + u8 pad1; + u16 unk2; + u16 unk4; + u16 unk6; + union { + struct { + u8 unk8; + u8 unk9; + u8 unkA; + u8 padB; + } unk_struct; + s32 unk8_word; + } unk_union; + u8 unkC; + u8 unkD; + u8 unkE; + u8 unkF; + u8 unk10; + u8 unk11; + u8 unk12; +} Object_64_8003FEF4; + +typedef struct LevelObjectEntry8003FEF4 { + LevelObjectEntryCommon common; + u8 unk8; + u8 unk9; + u16 unkA; + u8 unkC; + u8 unkD; + u16 unkE; + u8 unk10; + u8 unk11; + u8 unk12; + u8 unk13; +} LevelObjectEntry8003FEF4; + +typedef struct LevelObjectEntry8004001C { + LevelObjectEntryCommon common; + u8 unk8; + u8 unk9; + u8 unkA; +} LevelObjectEntry8004001C; + +typedef struct Object_64_8004001C { + u16 pad0; + s16 unk2; + u8 unk4; + u8 unk5; +} Object_64_8004001C; + +typedef struct Object_64_800400A4 { + s16 unk0; + s16 pad2; + s16 unk4; + s16 unk6; + s16 unk8; + s16 unkA; +} Object_64_800400A4; + +typedef struct unk80040800 { + u8 pad0[0x78]; + f32 unk78; +} unk80040800; + +typedef struct unk80042014_arg0_64 { + u16 unk0; + u8 unk2; + u8 unk3; +} unk80042014_arg0_64; + +typedef struct unk80042014_arg0 { + u8 pad0[0x64]; + unk80042014_arg0_64 *unk64; +} unk80042014_arg0; + +typedef struct unk80042014_arg1 { + u8 pad0[8]; + u16 unk8; + u8 unkA; + u8 unkB; +} unk80042014_arg1; + +typedef struct unk8004210C { + u8 pad0[0x3C]; + s32 unk3C; + u8 pad40[0x24]; + s32 unk64; +} unk8004210C; + +typedef struct Object_3C_80042178 { + u8 pad0[8]; + u16 unk8; + u16 unkA; +} Object_3C_80042178; + +typedef struct Object_64_80042210 { + f32 unk0; + f32 unk4; + f32 unk8; + f32 unkC; + f32 unk10; + u8 unk14; + u8 unk15; + u8 pad16[3]; + u8 unk19; + u8 pad1A[6]; + f32 unk20; + f32 unk24; + u8 pad28[8]; + f32 unk30; +} Object_64_80042210; + +typedef struct Object_64_80042998 { + u8 pad0[0x70]; + u8 unk70; + u8 pad71; + u8 unk72; + u8 pad73; + f32 unk74; +} Object_64_80042998; + +typedef struct unk80042A1C { + u8 pad0[0x78]; + f32 unk78; + s16 unk7C; + s16 unk7E; +} unk80042A1C; + +typedef struct unk80042CD0 { + u8 pad0[0x18]; + s16 unk18; +} unk80042CD0; + +// Unsure about the signed/unsigned with these arrays. +extern u16 D_800DC970[4]; +extern u16 D_800DC978[4]; +extern u16 D_800DC980[20]; +extern u16 D_800DC9A8[20]; +extern u16 D_800DC9D0[64]; +extern s8 D_800DCA50[8]; +extern u8 D_800DCA58[9]; +extern s8 D_800DCA64[9]; +extern s8 D_800DCA70[10]; +extern s32 D_800DCA7C[3]; +extern s32 D_800DCA88[3]; +extern s8 D_800DCA94[8]; +extern s8 D_800DCA9C[12]; +extern u16 D_800DCAA8[64]; +extern u16 D_800DCB28[20]; +extern u32 osTvType; + +f32 func_800707C4(s16); // No idea where it's located +f32 func_800707F8(s16); // No idea where it's located +s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c +s32 func_8007066C(s32, s32); // Non Matching src/unknown_070110.c + +void obj_init_fireball_octoweapon(Object *obj, LevelObjectEntry_Fireball_Octoweapon *entry); +void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry); +void obj_init_laserbolt(Object *obj, LevelObjectEntry_Laserbolt *entry); +void obj_init_torch_mist(Object *obj, LevelObjectEntry_Torch_Mist *entry); +void obj_loop_torch_mist(Object *obj, s32 speed); +void obj_init_effectbox(Object *obj, LevelObjectEntry_EffectBox *entry); +void obj_init_trophycab(Object *obj, LevelObjectEntry_TrophyCab *entry); +void obj_init_collectegg(Object *obj, LevelObjectEntry_CollectEgg *entry); +void obj_init_eggcreator(Object *obj, LevelObjectEntry_EggCreator *entry); +void obj_loop_eggcreator(Object *obj, s32 speed); +void obj_init_lighthouse_rocketsignpost(Object *obj, LevelObjectEntry_Lighthouse_RocketSignpost *entry); +void obj_loop_rocketsignpost(Object *obj, s32 speed); +void obj_init_airzippers_waterzippers(Object *obj, LevelObjectEntry_AirZippers_WaterZippers *entry); +void obj_init_unknown58(Object *obj, LevelObjectEntry_Unknown58 *entry); +void obj_loop_unknown58(Object *obj, s32 speed); +void obj_init_characterflag(Object *obj, LevelObjectEntry_CharacterFlag *entry); +void obj_loop_characterflag(Object *obj, s32 speed); +void obj_init_stopwatchman(Object *obj, LevelObjectEntry_StopWatchMan *entry); +void func_80036BCC(u16 arg0, s32 arg1); +void obj_init_lavaspurt(Object *obj, LevelObjectEntry_LavaSpurt *entry); +void obj_init_posarrow(Object *obj, LevelObjectEntry_PosArrow *entry); +void obj_init_animator(Object *obj, LevelObjectEntry_Animator *entry, s32 arg2); +void obj_loop_animobject(Object *obj, s32 speed); +void obj_loop_dooropener(Object *obj, s32 speed); +void obj_init_overridepos(Object *obj, LevelObjectEntry_OverridePos *entry); +void func_80037D60(s32 arg0, s32 arg1); +void obj_init_wizpigship(Object *obj, LevelObjectEntry_WizpigShip *entry); +void obj_init_hittester(Object *obj, LevelObjectEntry_HitTester *entry); +void obj_loop_hittester(Object *obj, s32 speed); +void obj_init_dynamic_lighting_object(Object *obj, LevelObjectEntry_DynamicLightingObject *entry); +void obj_init_unknown96(Object *obj, LevelObjectEntry_Unknown96 *entry); +void obj_init_snowball(Object *obj, LevelObjectEntry_Snowball *entry); +void func_80038330(s32 arg0, s32 arg1); +void obj_loop_animcamera(Object *obj, s32 speed); +void func_800387C0(s32 arg0, s32 arg1); +void obj_loop_animcar(Object *obj, s32 speed); +void obj_init_infopoint(Object *obj, LevelObjectEntry_InfoPoint *entry); +void obj_loop_infopoint(Object *obj, s32 speed); +void obj_init_smoke(Object *obj, LevelObjectEntry_Smoke *entry); +void obj_loop_smoke(Object *obj, s32 speed); +void obj_init_unknown25(Object *obj, LevelObjectEntry_Unknown25 *entry); +void obj_loop_unknown25(Object *obj, s32 speed); +void obj_init_wardensmoke(Object *obj, LevelObjectEntry_WardenSmoke *entry); +void obj_loop_wardensmoke(Object *obj, s32 speed); +void obj_init_teleport(Object *obj, LevelObjectEntry_Teleport *entry); +void obj_loop_teleport(Object *obj, s32 speed); +void obj_init_exit(Object *obj, LevelObjectEntry_Exit *entry); +void obj_init_cameracontrol(Object *obj, LevelObjectEntry_CameraControl *entry); +void obj_loop_cameracontrol(Object *obj, s32 speed); +void obj_init_setuppoint(Object *obj, LevelObjectEntry_SetupPoint *entry); +void obj_loop_setuppoint(Object *obj, s32 speed); +void obj_init_dino_whale(Object *obj, LevelObjectEntry_Dino_Whale *entry); +void obj_loop_dino_whale(Object *obj, s32 speed); +void obj_init_parkwarden(Object *obj, LevelObjectEntry_Parkwarden *entry); +void func_80039320(s16 arg0); +void func_8003AC3C(u16 arg0, s32 arg1); +void obj_loop_gbparkwarden(Object *obj, s32 speed); +f32 func_8003ACAC(void); +void obj_init_checkpoint(Object *obj, LevelObjectEntry_Checkpoint *entry, s32 arg2); +void obj_loop_checkpoint(Object *obj, s32 speed); +void obj_init_modechange(Object *obj, LevelObjectEntry_ModeChange *entry); +void obj_init_bonus(Object *obj, LevelObjectEntry_Bonus *entry); +void obj_init_ttdoor(Object *obj, LevelObjectEntry_TTDoor *entry); +void obj_init_bridge_whaleramp(Object *obj, LevelObjectEntry_Bridge_WhaleRamp *entry); +void obj_init_rampswitch(Object *obj, LevelObjectEntry_RampSwitch *entry); +void obj_loop_rampswitch(Object *obj, s32 speed); +void obj_init_seamonster(Object *obj, LevelObjectEntry_SeaMonster *entry); +void obj_loop_seamonster(Object *obj, s32 speed); +void obj_init_fogchanger(Object *obj, LevelObjectEntry_FogChanger *entry); +void obj_init_skycontrol(Object *obj, LevelObjectEntry_SkyControl *entry); +void obj_loop_skycontrol(Object *obj, s32 speed); +void obj_init_ainode(Object *obj, LevelObjectEntry_AiNode *entry); +void obj_loop_ainode(Object *obj, s32 speed); +void obj_init_treasuresucker(Object *obj, LevelObjectEntry_TreasureSucker *entry); +void obj_init_flycoin(Object *obj, LevelObjectEntry_FlyCoin *entry); +void obj_init_coincreator(Object *obj, LevelObjectEntry_BananaCreator *entry); +void obj_init_coin(Object *obj, LevelObjectEntry_Banana *entry); +void obj_init_silvercoin_adv2(Object *obj, LevelObjectEntry_SilverCoinAdv2 *entry); +void obj_init_silvercoin(Object *obj, LevelObjectEntry_SilverCoin *entry); +void obj_init_worldkey(Object *obj, LevelObjectEntry_WorldKey *entry); +void obj_loop_worldkey(Object *worldKeyObj, s32 speed); +void obj_init_wballoonpop(Object *obj, LevelObjectEntry_WBalloonPop *entry); +void obj_loop_wballoonpop(Object *obj, s32 speed); +void obj_init_weapon(Object *obj, LevelObjectEntry_Weapon *entry); +void obj_loop_weapon(Object *obj, s32 speed); +void func_8003F0D0(void); +void func_8003F0DC(void); +void obj_init_audioline(Object *obj, LevelObjectEntry_AudioLine *entry); +void obj_init_audioreverb(Object *obj, LevelObjectEntry_AudioReverb *entry); +void obj_init_texscroll(Object *obj, LevelObjectEntry_TexScroll *entry, s32 arg2); +void obj_init_rgbalight(Object *obj, LevelObjectEntry_RgbaLight *entry, s32 arg2); +void obj_init_buoy_pirateship(Object *obj, LevelObjectEntry_Buoy_PirateShip *entry, s32 arg2); +void obj_loop_buoy_pirateship(Object *obj, s32 speed); +void obj_init_log(Object *obj, LevelObjectEntry_Log *entry, s32 arg2); +void obj_init_wavegenerator(Object *obj, LevelObjectEntry_WaveGenerator *entry, s32 arg2); +void obj_init_midichset(Object *obj, LevelObjectEntry_Midichset *entry); +void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry); +void obj_loop_bubbler(Object *obj, s32 speed); +void obj_init_boost(Object *obj, LevelObjectEntry_Boost *entry); +void obj_init_unknown94(Object *obj, LevelObjectEntry_Unknown94 *entry, s32 arg2); +void obj_loop_unknown94(Object *obj, s32 speed); +void obj_init_rangetrigger(Object *obj, LevelObjectEntry_RangeTrigger *entry); +void obj_loop_rangetrigger(Object *obj, s32 speed); +void obj_init_frog(Object *obj, LevelObjectEntry_Frog *entry); +void obj_loop_pigrocketeer(Object *obj, s32 speed); +void obj_init_levelname(Object *obj, LevelObjectEntry_LevelName *entry); +void obj_loop_wizghosts(Object *obj, s32 speed); + +//Non Matching +void obj_loop_lavaspurt(Object *obj, s32 speed); +void obj_loop_animator(Object *obj, s32 speed); +void obj_loop_vehicleanim(Object *obj, s32 speed); +void obj_loop_snowball(Object *obj, s32 speed); +void obj_loop_goldenballoon(Object *obj, s32 speed); + +#endif diff --git a/src/object_models.c b/src/object_models.c index 8b1b46d8..1daa385f 100644 --- a/src/object_models.c +++ b/src/object_models.c @@ -6,7 +6,7 @@ #include "memory.h" #include "asset_sections.h" #include "unknown_0255E0.h" -#include "unknown_043920.h" +#include "racer.h" /************ .data ************/ diff --git a/src/unknown_043920.c b/src/racer.c similarity index 86% rename from src/unknown_043920.c rename to src/racer.c index 075b9bdc..d0cd090a 100644 --- a/src/unknown_043920.c +++ b/src/racer.c @@ -1,7 +1,7 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80042D20 */ -#include "unknown_043920.h" +#include "racer.h" #include "memory.h" #include "menu.h" #include "video.h" @@ -10,18 +10,18 @@ #include "macros.h" #include "structs.h" #include "asset_sections.h" -#include "controller_pak.h" +#include "save_data.h" #include "unknown_008C40.h" #include "unknown_00BC20.h" #include "audio.h" -#include "unknown_0348C0.h" -#include "unknown_06B2B0.h" +#include "object_functions.h" +#include "game.h" #define MAX_NUMBER_OF_GHOST_NODES 360 /************ .data ************/ -s32 gFunc8003B4BCLength = 0x310; +s32 gObjLoopGoldenBalloonLength = 0x310; s16 D_800DCB54 = 0; s32 D_800DCB58 = 0; // Currently unknown, might be a different type. s32 D_800DCB5C = 0; // Currently unknown, might be a different type. @@ -110,8 +110,8 @@ s16 D_800DCDB0[16] = { 0x02FA, 0x02FE, 0x08F8, 0x03FD, }; -// Checksum count for func_8003B4BC -s32 gFunc8003B4BCChecksum = 42391; +// Checksum count for obj_loop_goldenballoon +s32 gObjLoopGoldenBalloonChecksum = 42391; s16 D_800DCDD4[4] = { 0, 0, 0x32, -1 @@ -194,8 +194,8 @@ s8 D_8011D5BC; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80042D20.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80043ECC.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80042D20.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80043ECC.s") typedef struct Object_64_80044170 { char unk0[0x2C]; @@ -293,15 +293,15 @@ s32 func_80044450(s32 arg0) { return get_random_number_from_range(0, 99) < arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004447C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80045128.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800452A0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80045C48.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80046524.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80048C7C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80048E64.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800494E0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80049794.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004447C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80045128.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800452A0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80045C48.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80046524.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80048C7C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80048E64.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800494E0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80049794.s") // Something Plane related. void func_8004C0A0(s32 arg0, Object *planeObj, Object_64_8004C0A0 *planeObj64) { @@ -387,9 +387,9 @@ void func_8004C140(Object *obj, Object_64_8004C140 *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004C2B0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004CC20.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004D590.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004C2B0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004CC20.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004D590.s") void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_64_8004D95C *obj64) { s16 sp26; @@ -421,8 +421,8 @@ void func_8004D95C(s32 arg0, s32 arg1, Object *obj, Object_64_8004D95C *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004DAB0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004DE38.s") +GLOBAL_ASM("asm/non_matchings/racer/obj_init_racer.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004DE38.s") void func_8004F77C(unk8004F77C *arg0) { s32 temp; @@ -448,7 +448,7 @@ void func_8004F77C(unk8004F77C *arg0) { arg0->unk20A = (arg0->unk20A & 0xFFF0) | temp; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8004F7F4.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8004F7F4.s") #ifdef NON_EQUIVALENT @@ -491,11 +491,11 @@ void func_80050754(Object *obj, Object_64_80050754 *obj64, f32 arg2) { obj64->unk30 = 0.0f; } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050754.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050754.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050850.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80050A28.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050850.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80050A28.s") s32 func_80052188(void) { if (D_8011D582 == 2) { @@ -509,7 +509,7 @@ void func_800521B8(s32 arg0) { D_8011D582 = arg0; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800521C4.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800521C4.s") void func_8005234C(unk8005234C *arg0) { arg0->unk16C -= arg0->unk16C >> 3; @@ -518,8 +518,8 @@ void func_8005234C(unk8005234C *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052388.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005250C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052388.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005250C.s") void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) { arg5 *= arg7; @@ -581,8 +581,8 @@ void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052B64.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80052D7C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052B64.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80052D7C.s") void func_80053478(Object_64_80053478 *obj) { s32 phi_v0; @@ -645,13 +645,13 @@ void func_80053664(Object_64 *arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80053750.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80053E9C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80054110.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005492C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80054FD0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80055A84.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80055EC0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80053750.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80053E9C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80054110.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005492C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80054FD0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80055A84.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80055EC0.s") void play_char_horn_sound(Object *obj, Object_64 *obj64) { if (get_filtered_cheats() & CHEAT_HORN_CHEAT) { @@ -663,8 +663,8 @@ void play_char_horn_sound(Object *obj, Object_64 *obj64) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005698C.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80056E2C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005698C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80056E2C.s") void func_80057048(Object *obj, s32 arg1) { Object_64 *obj64 = obj->unk64; @@ -722,10 +722,10 @@ void func_800570B8(Object *obj, s32 arg1, s32 arg2, s32 arg3) { } } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800570B8.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800570B8.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80057220.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80057220.s") void func_800575EC(Object *obj, Object_64_800575EC *obj64) { Matrix mf; @@ -743,7 +743,7 @@ void func_800575EC(Object *obj, Object_64_800575EC *obj64) { guMtxXFMF(&mf, 1.0f, 0.0f, 0.0f, &obj64->ox3, &obj64->oy3, &obj64->oz3); } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800576E0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800576E0.s") void func_800579B0(unk800579B0 *arg0, s32 arg1, f32 arg2) { s32 temp, temp2; @@ -763,7 +763,7 @@ void func_800579B0(unk800579B0 *arg0, s32 arg1, f32 arg2) { arg0->unk1E1 = arg0->unk1E1 + temp2; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80057A40.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80057A40.s") void func_800580B4(Object *obj, Object_64_800580B4 *obj64, s32 arg2, f32 arg3) { f32 xPos, yPos, zPos; @@ -784,9 +784,9 @@ void func_800580B4(Object *obj, Object_64_800580B4 *obj64, s32 arg2, f32 arg3) { } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_800581E8.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058B84.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058D5C.s") +GLOBAL_ASM("asm/non_matchings/racer/func_800581E8.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058B84.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058D5C.s") #ifdef NON_EQUIVALENT void func_80058F44(f32 arg0, Object *arg1, Object *arg2) { @@ -798,11 +798,11 @@ void func_80058F44(f32 arg0, Object *arg1, Object *arg2) { gCameraObject->unk34 = get_level_segment_index_from_position(gCameraObject->x_position, arg2->unk3C_a.unk3C_f, gCameraObject->z_position); } #else -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80058F44.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80058F44.s") #endif -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059080.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059208.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059080.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059208.s") void func_80059790(s32 arg0, s32 *arg1, s32 *arg2, s32 *arg3) { s32 temp_lo; @@ -901,13 +901,13 @@ s32 func_80059B7C(s32 controllerIndex, s32 arg1, s16 arg2, s16 arg3, s16 arg4) { return func_80075000(controllerIndex, (s16)arg1, arg2, arg3, arg4, D_8011D5A0[D_8011D59C], gGhostData[D_8011D59C]); } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_80059BF0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_80059BF0.s") s16 func_80059E20(void) { return D_8011D5A8[D_8011D59C]; } -GLOBAL_ASM("asm/non_matchings/unknown_043920/set_ghost_position_and_rotation.s") +GLOBAL_ASM("asm/non_matchings/racer/set_ghost_position_and_rotation.s") void func_8005A3B0(void) { D_8011D584 = 1; @@ -920,20 +920,20 @@ void func_8005A3C0(void) { void func_8005A3D0(void) { s32 i; s32 count = 0; - u8 *temp = (u8 *)&func_8003B4BC; + u8 *temp = (u8 *)&obj_loop_goldenballoon; - for (i = 0; i < gFunc8003B4BCLength; i++) { + for (i = 0; i < gObjLoopGoldenBalloonLength; i++) { count += temp[i]; } - if (count != gFunc8003B4BCChecksum) { + if (count != gObjLoopGoldenBalloonChecksum) { D_800DCB54 = 0x800; } } -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A424.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005A6F0.s") -GLOBAL_ASM("asm/non_matchings/unknown_043920/func_8005B818.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005A424.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005A6F0.s") +GLOBAL_ASM("asm/non_matchings/racer/func_8005B818.s") // This gets called if an anti-piracy checksum fails in func_8005F850. void func_8005C25C(void) { diff --git a/src/unknown_043920.h b/src/racer.h similarity index 97% rename from src/unknown_043920.h rename to src/racer.h index a1e5e036..81c1ca89 100644 --- a/src/unknown_043920.h +++ b/src/racer.h @@ -1,5 +1,5 @@ -#ifndef _UNKNOWN_043920_H_ -#define _UNKNOWN_043920_H_ +#ifndef _RACER_H_ +#define _RACER_H_ #include "types.h" #include "structs.h" @@ -147,7 +147,7 @@ typedef struct unk8005C270 { s8 unk193; } unk8005C270; -extern s32 gFunc8003B4BCLength; +extern s32 gObjLoopGoldenBalloonLength; extern s16 D_800DCB54; extern s32 D_800DCB58; extern s32 D_800DCB5C; @@ -185,7 +185,7 @@ extern s8 D_800DCDA8[8]; // Unused? extern s16 D_800DCDB0[16]; -extern s32 gFunc8003B4BCChecksum; +extern s32 gObjLoopGoldenBalloonChecksum; extern s16 D_800DCDD4[4]; diff --git a/src/controller_pak.c b/src/save_data.c similarity index 96% rename from src/controller_pak.c rename to src/save_data.c index 5395d590..68cab6bc 100644 --- a/src/controller_pak.c +++ b/src/save_data.c @@ -1,7 +1,7 @@ /* The comment below is needed for this file to be picked up by generate_ld */ /* RAM_POS: 0x80072250 */ -#include "controller_pak.h" +#include "save_data.h" #include "memory.h" #include "PR/pfs.h" #include "PR/os_cont.h" @@ -9,7 +9,7 @@ #include "structs.h" #include "camera.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "unknown_0CEC50.h" /************ .data ************/ @@ -168,18 +168,18 @@ void func_80072348(s16 arg0, u8 arg1) { } } #else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072348.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072348.s") #endif -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072424.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072578.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072424.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072578.s") void func_80072708(void) { D_800DE48C = 3; } //Rumbles controller? -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072718.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072718.s") #ifdef NON_EQUIVALENT u16 func_80072C54(s32 arg0) { @@ -327,18 +327,18 @@ u16 func_80072C54(s32 arg0) { return v1; } #else -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072C54.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072C54.s") #endif -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80072E28.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007306C.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800732E8.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80072E28.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_8007306C.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800732E8.s") //arg1 is eepromData, from read_eeprom_data //arg2 seems to be a flag for either lap times or course initials? -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073588.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80073588.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800738A4.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800738A4.s") s32 get_game_data_file_size(void) { return 256; @@ -350,7 +350,7 @@ s32 get_time_data_file_size(void) { //Probably get_file_extension //func_80073C5C(s32 controllerIndex, s32 fileType, u8 **fileExt); -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80073C5C.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80073C5C.s") //Read DKRACING-ADV data into settings? s32 read_game_data_from_controller_pak(s32 controllerIndex, u8 *fileExt, Settings *settings) { @@ -490,8 +490,8 @@ s32 write_time_data_to_controller_pak(s32 controllerIndex, Settings *arg1) { return ret; } -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074204.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_8007431C.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80074204.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_8007431C.s") // Writes Eeprom in 5 block chunks of data starting at either 0x0, 0x5, or 0xA // Educated guess says this might be for one of three save files @@ -691,11 +691,11 @@ s32 func_80074B1C(void) { return (&x)[0] * 6 + 0x100; } -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074B34.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80074EB8.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_80075000.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800753D8.s") -GLOBAL_ASM("asm/non_matchings/controller_pak/func_800756D4.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80074B34.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80074EB8.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_80075000.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800753D8.s") +GLOBAL_ASM("asm/non_matchings/save_data/func_800756D4.s") SIDeviceStatus get_si_device_status(s32 controllerIndex) { OSMesg unusedMsg; @@ -811,7 +811,7 @@ void init_controller_paks(void) { osContStartReadData(sControllerMesgQueue); } #else -GLOBAL_ASM("asm/non_matchings/controller_pak/init_controller_paks.s") +GLOBAL_ASM("asm/non_matchings/save_data/init_controller_paks.s") #endif UNUSED SIDeviceStatus check_for_rumble_pak(s32 controllerIndex) { diff --git a/src/controller_pak.h b/src/save_data.h similarity index 98% rename from src/controller_pak.h rename to src/save_data.h index 57df0d82..7db53ac0 100644 --- a/src/controller_pak.h +++ b/src/save_data.h @@ -1,5 +1,5 @@ -#ifndef _CONTROLLER_PAK_H_ -#define _CONTROLLER_PAK_H_ +#ifndef _SAVE_DATA_H_ +#define _SAVE_DATA_H_ #include "types.h" #include "structs.h" diff --git a/src/thread0_epc.c b/src/thread0_epc.c index d0c00bed..ef23e61c 100644 --- a/src/thread0_epc.c +++ b/src/thread0_epc.c @@ -5,11 +5,11 @@ #include "types.h" #include "macros.h" #include "menu.h" -#include "controller_pak.h" +#include "save_data.h" #include "printf.h" #include "unknown_00BC20.h" #include "controller.h" -#include "unknown_06B2B0.h" +#include "game.h" /************ .rodata ************/ diff --git a/src/thread30.c b/src/thread30.c index 814a52d0..fc721486 100644 --- a/src/thread30.c +++ b/src/thread30.c @@ -4,7 +4,7 @@ #include "thread30.h" #include "macros.h" #include "libultra_internal.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "stacks.h" /************ .data ************/ diff --git a/src/unknown_00BC20.c b/src/unknown_00BC20.c index d2f7f223..9810a3d8 100644 --- a/src/unknown_00BC20.c +++ b/src/unknown_00BC20.c @@ -7,13 +7,14 @@ #include "types.h" #include "macros.h" #include "structs.h" +#include "level_object_entries.h" #include "asset_sections.h" #include "asset_loading.h" #include "thread0_epc.h" -#include "controller_pak.h" +#include "save_data.h" #include "menu.h" -#include "unknown_06B2B0.h" -#include "unknown_043920.h" +#include "game.h" +#include "racer.h" /************ .data ************/ @@ -819,8 +820,9 @@ s32 func_800113BC() { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800113CC.s") -void func_80011560(void) { +s32 func_80011560(void) { //! @bug The developers probably intended this to be a void function. D_800DC848 = 1; + // No return value! } GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80011570.s") @@ -840,7 +842,7 @@ extern f32 D_800E5550; void func_80011AD0(Object *this) { f32 tmp_f0; u32 offset; - switch (this->unk48) { + switch (this->behaviorId) { case 47: //L80011B10 if (this->unk7C.word < 0) @@ -940,7 +942,7 @@ void func_80012E28(Object *this) { f32 sp_1c; f32 tmp_f0; - if (this->unk48 == 1) { + if (this->behaviorId == 1) { sp_20 = this->unk64; this->y_rotation += sp_20->unk160; @@ -967,7 +969,7 @@ void func_80012E28(Object *this) { #endif void func_80012F30(Object *arg0) { - if (arg0->unk48 == 1) { + if (arg0->behaviorId == 1) { Object_64 *object_64 = arg0->unk64; arg0->y_rotation -= object_64->unk160; arg0->x_rotation -= object_64->unk162; @@ -983,18 +985,18 @@ void render_object(Object *this) { if (this->unk6 & 0x8000) { func_800B3740(this, &D_8011AE8C, &D_8011AE90, &D_8011AE94, 32768); } else { - if (this->descriptor_ptr->unk53 == 0) + if (this->header->modelType == OBJECT_MODEL_TYPE_3D_MODEL) render_3d_model(this); - else if (this->descriptor_ptr->unk53 == 1) + else if (this->header->modelType == OBJECT_MODEL_TYPE_SPRITE_BILLBOARD) render_3d_billboard(this); - else if (this->descriptor_ptr->unk53 == 4) + else if (this->header->modelType == OBJECT_MODEL_TYPE_UNKNOWN4) func_80011AD0(this); } func_80013548(this); } void func_80013548(Object *arg0) { - if ((arg0->unk6 & 0x8000) == 0 && arg0->descriptor_ptr->unk54 == 1) { + if ((arg0->unk6 & 0x8000) == 0 && arg0->header->behaviorId == 1) { arg0->x_position -= arg0->unk64->unk78; arg0->y_position -= arg0->unk64->unk7C; arg0->z_position -= arg0->unk64->unk80; @@ -1015,8 +1017,8 @@ void func_800142B8(void) { for (; i < objCount; i++) { currObj = gObjPtrList[i]; - if ((currObj->unk6 & 0x8000) == 0 && currObj->descriptor_ptr->unk53 == 0) { - for (j = 0; j < currObj->descriptor_ptr->unk55; j++) { + if ((currObj->unk6 & 0x8000) == 0 && currObj->header->modelType == OBJECT_MODEL_TYPE_3D_MODEL) { + for (j = 0; j < currObj->header->numberOfModelIds; j++) { curr_68 = currObj->unk68[j]; if (curr_68 != NULL && curr_68->unk20 > 0) { curr_68->unk20 = curr_68->unk20-- & 0x03; @@ -1073,7 +1075,7 @@ Object *func_80018C6C(void) { Object *current_obj; for (i = D_8011AE60; i < objCount; i++) { current_obj = gObjPtrList[i]; - if (!(current_obj->unk6 & 0x8000) && (current_obj->unk48 == 62)) + if (!(current_obj->unk6 & 0x8000) && (current_obj->behaviorId == 62)) return current_obj; } return NULL; @@ -1270,7 +1272,7 @@ void calc_dyn_light_and_env_map_for_object(ObjectModel *model, Object *object, s if (dynamicLightingEnabled) { // Calculates dynamic lighting for the object - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { // Dynamic lighting for some objects? (Intro diddy, Taj, T.T., Bosses) calc_dynamic_lighting_for_object_1(object, model, arg2, object, arg3, 1.0f); } else { @@ -1328,7 +1330,7 @@ void func_8001E36C(s32 arg0, f32 *arg1, f32 *arg2, f32 *arg3) { if (current_obj != NULL && (current_obj->unk6 & 0x8000) == 0 - && current_obj->unk48 == 39 + && current_obj->behaviorId == 39 && current_obj->unk78 == arg0) { *arg1 = current_obj->x_position; *arg2 = current_obj->y_position; @@ -1473,7 +1475,7 @@ Object *func_8002342C(f32 x, f32 z) { for (i = 0; i < objCount; i++) { currObj = gObjPtrList[i]; - if ((currObj->unk6 & 0x8000) == 0 && currObj->unk48 == 87) { + if ((currObj->unk6 & 0x8000) == 0 && currObj->behaviorId == 87) { x = currObj->x_position - x; z = currObj->z_position - z; dist = sqrtf(x * x + z * z); @@ -1507,614 +1509,639 @@ void func_800235D0(s32 arg0) { GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_800235DC.s") -void func_800238BC(Object *arg0, void *arg1) { - arg0->unk48 = arg0->descriptor_ptr->unk54; - switch (arg0->unk48 - 1) { - case 0x00: - func_8004DAB0(arg0, arg1); +void run_object_init_func(Object *obj, void *entry, s32 arg2) { + obj->behaviorId = obj->header->behaviorId; + switch (obj->behaviorId - 1) { // Why the minus 1? + case 0: + obj_init_racer(obj, (LevelObjectEntry_Racer *)entry); break; - case 0x01: - func_80033CC0(arg0, arg1); + case 1: + obj_init_scenery(obj, (LevelObjectEntry_Scenery*)entry); break; - case 0x02: - func_80036C30(arg0, arg1); + case 2: + obj_init_fish(obj, (LevelObjectEntry_Fish *)entry); break; - case 0x03: - func_800376E0(arg0, arg1); + case 3: + obj_init_animator(obj, (LevelObjectEntry_Animator *)entry, arg2); break; - case 0x05: - func_800389AC(arg0, arg1); + case 5: + obj_init_smoke(obj, (LevelObjectEntry_Smoke *)entry); break; - case 0x18: - func_80038A6C(arg0, arg1); + case 24: + obj_init_unknown25(obj, (LevelObjectEntry_Unknown25 *)entry); break; - case 0x15: - func_80038B74(arg0, arg1); + case 21: + obj_init_bombexplosion(obj, (LevelObjectEntry_BombExplosion *)entry); break; - case 0x06: - func_80038E3C(arg0, arg1); + case 6: + obj_init_exit(obj, (LevelObjectEntry_Exit *)entry); break; - case 0x07: - func_8003FD68(arg0, arg1); + case 7: + obj_init_audio(obj, (LevelObjectEntry_Audio *)entry); break; - case 0x08: - case 0x12: - func_8003FEF4(arg0, arg1); + case 8: + case 18: + obj_init_audioline(obj, (LevelObjectEntry_AudioLine *)entry); break; - case 0x1A: - func_8004001C(arg0, arg1); + case 26: + obj_init_audioreverb(obj, (LevelObjectEntry_AudioReverb *)entry); break; - case 0x09: - func_80039160(arg0, arg1); + case 9: + obj_init_cameracontrol(obj, (LevelObjectEntry_CameraControl *)entry); break; - case 0x0A: - func_80039190(arg0, arg1); + case 10: + obj_init_setuppoint(obj, (LevelObjectEntry_SetupPoint *)entry); break; - case 0x0B: - func_800391C8(arg0, arg1); + case 11: + obj_init_dino_whale(obj, (LevelObjectEntry_Dino_Whale *)entry); break; - case 0x0C: - func_8003ACBC(arg0, arg1); + case 12: + obj_init_checkpoint(obj, (LevelObjectEntry_Checkpoint *)entry, arg2); break; - case 0x1D: - func_8003AD34(arg0, arg1); + case 29: + obj_init_modechange(obj, (LevelObjectEntry_ModeChange *)entry); break; - case 0x28: - func_8003B058(arg0, arg1); + case 40: + obj_init_bonus(obj, (LevelObjectEntry_Bonus *)entry); break; - case 0x0D: - func_8003B7CC(arg0, arg1); + case 13: + obj_init_door(obj, (LevelObjectEntry_Door *)entry); break; - case 0x6E: - func_8003C1E0(arg0, arg1); + case 110: + obj_init_ttdoor(obj, (LevelObjectEntry_TTDoor *)entry); break; - case 0x0E: - func_8003CF18(arg0, arg1); + case 14: + obj_init_fogchanger(obj, (LevelObjectEntry_FogChanger *)entry); break; - case 0x0F: - func_8003CFE0(arg0, arg1); + case 15: + obj_init_ainode(obj, (LevelObjectEntry_AiNode *)entry); break; - case 0x10: - func_8003DFCC(arg0, arg1); + case 16: + obj_init_weaponballoon(obj, (LevelObjectEntry_WeaponBalloon *)entry); break; - case 0x16: - func_8003E5B0(arg0, arg1); + case 22: + obj_init_wballoonpop(obj, (LevelObjectEntry_WBalloonPop *)entry); break; - case 0x04: - case 0x11: - func_8003E5C8(arg0, arg1); + case 4: + case 17: + obj_init_weapon(obj, (LevelObjectEntry_Weapon *)entry); break; - case 0x19: - func_8003CF58(arg0, arg1); + case 25: + obj_init_skycontrol(obj, (LevelObjectEntry_SkyControl *)entry); break; - case 0x1B: - func_80034AF0(arg0, arg1); + case 27: + obj_init_torch_mist(obj, (LevelObjectEntry_Torch_Mist *)entry); break; - case 0x1C: - func_800400A4(arg0, arg1); + case 28: + obj_init_texscroll(obj, (LevelObjectEntry_TexScroll *)entry, arg2); break; - case 0x1E: - func_80036194(arg0, arg1); + case 30: + obj_init_stopwatchman(obj, (LevelObjectEntry_StopWatchMan *)entry); break; - case 0x1F: - func_8003D534(arg0, arg1); + case 31: + obj_init_coin(obj, (LevelObjectEntry_Banana *)entry); break; - case 0x20: - func_800403A8(arg0, arg1); + case 32: + obj_init_rgbalight(obj, (LevelObjectEntry_RgbaLight *)entry, arg2); break; - case 0x23: - func_800403D8(arg0, arg1); + case 35: + obj_init_buoy_pirateship(obj, (LevelObjectEntry_Buoy_PirateShip *)entry, arg2); break; - case 0x42: - func_8004049C(arg0, arg1); + case 66: + obj_init_log(obj, (LevelObjectEntry_Log *)entry, arg2); break; - case 0x24: - func_80040800(arg0, arg1); + case 36: + obj_init_weather(obj, (LevelObjectEntry_Weather *)entry); break; - case 0x25: - func_8003C9EC(arg0, arg1); + case 37: + obj_init_bridge_whaleramp(obj, (LevelObjectEntry_Bridge_WhaleRamp *)entry); break; - case 0x26: - func_8003CE64(arg0, arg1); + case 38: + obj_init_rampswitch(obj, (LevelObjectEntry_RampSwitch *)entry); break; - case 0x27: - func_8003CF00(arg0, arg1); + case 39: + obj_init_seamonster(obj, (LevelObjectEntry_SeaMonster *)entry); break; - case 0x2A: - func_8004092C(arg0, arg1); + case 42: + obj_init_lensflare(obj, (LevelObjectEntry_LensFlare *)entry); break; - case 0x2B: - func_8004094C(arg0, arg1); + case 43: + obj_init_lensflareswitch(obj, (LevelObjectEntry_LensFlareSwitch *)entry); break; - case 0x2C: - func_8003522C(arg0, arg1); + case 44: + obj_init_collectegg(obj, (LevelObjectEntry_CollectEgg *)entry); break; - case 0x2D: - func_80035640(arg0, arg1); + case 45: + obj_init_eggcreator(obj, (LevelObjectEntry_EggCreator *)entry); break; - case 0x2E: - func_80035EF8(arg0, arg1); + case 46: + obj_init_characterflag(obj, (LevelObjectEntry_CharacterFlag *)entry); break; - case 0x30: - func_80037A18(arg0, arg1); + case 48: + obj_init_animation(obj, (LevelObjectEntry_Animation *)entry); break; - case 0x33: - func_80038854(arg0, arg1); + case 51: + obj_init_infopoint(obj, (LevelObjectEntry_InfoPoint *)entry); break; - case 0x36: - func_8003C644(arg0, arg1); + case 54: + obj_init_trigger(obj, (LevelObjectEntry_Trigger *)entry); break; - case 0x38: - case 0x5C: - func_8003588C(arg0, arg1); + case 56: + case 92: + obj_init_airzippers_waterzippers(obj, (LevelObjectEntry_AirZippers_WaterZippers *)entry); break; - case 0x39: - func_80035E20(arg0, arg1); + case 57: + obj_init_unknown58(obj, (LevelObjectEntry_Unknown58 *)entry); break; - case 0x3A: - func_800409A4(arg0, arg1); + case 58: + obj_init_wavegenerator(obj, (LevelObjectEntry_WaveGenerator *)entry, arg2); break; - case 0x3C: - func_800409C8(arg0, arg1); + case 60: + obj_init_butterfly(obj, (LevelObjectEntry_Butterfly *)entry); break; - case 0x3D: - func_800392B8(arg0, arg1); + case 61: + obj_init_parkwarden(obj, (LevelObjectEntry_Parkwarden *)entry); break; - case 0x3F: - func_8003DE74(arg0, arg1); + case 63: + obj_init_worldkey(obj, (LevelObjectEntry_WorldKey *)entry); break; - case 0x40: - func_8003D3EC(arg0, arg1); + case 64: + obj_init_coincreator(obj, (LevelObjectEntry_BananaCreator *)entry); break; - case 0x41: - func_8003D038(arg0, arg1); + case 65: + obj_init_treasuresucker(obj, (LevelObjectEntry_TreasureSucker *)entry); break; - case 0x43: - func_80037578(arg0, arg1); + case 67: + obj_init_lavaspurt(obj, (LevelObjectEntry_LavaSpurt *)entry); break; - case 0x44: - func_80037624(arg0, arg1); + case 68: + obj_init_posarrow(obj, (LevelObjectEntry_PosArrow *)entry); break; - case 0x45: - case 0x66: - func_8003818C(arg0, arg1); + case 69: + case 102: + obj_init_hittester(obj, (LevelObjectEntry_HitTester *)entry); break; - case 0x47: - case 0x5E: - case 0x67: - func_800381E0(arg0, arg1); + case 71: + case 94: + case 103: + obj_init_dynamic_lighting_object(obj, (LevelObjectEntry_DynamicLightingObject *)entry); break; - case 0x5F: - case 0x64: - func_80038214(arg0, arg1); + case 95: + case 100: + obj_init_unknown96(obj, (LevelObjectEntry_Unknown96 *)entry); break; - case 0x60: - case 0x65: - func_80038248(arg0, arg1); + case 96: + case 101: + obj_init_snowball(obj, (LevelObjectEntry_Snowball *)entry); break; - case 0x46: - func_80041A90(arg0, arg1); + case 70: + obj_init_midifade(obj, (LevelObjectEntry_MidiFade *)entry); break; - case 0x6F: - func_80041E80(arg0, arg1); + case 111: + obj_init_midifadepoint(obj, (LevelObjectEntry_MidiFadePoint *)entry); break; - case 0x75: - func_80042014(arg0, arg1); + case 117: + obj_init_midichset(obj, (LevelObjectEntry_Midichset *)entry); break; - case 0x48: - func_80034B68(arg0, arg1); + case 72: + obj_init_effectbox(obj, (LevelObjectEntry_EffectBox *)entry); break; - case 0x49: - func_80034E70(arg0, arg1); + case 73: + obj_init_trophycab(obj, (LevelObjectEntry_TrophyCab *)entry); break; - case 0x4A: - func_8004203C(arg0, arg1); + case 74: + obj_init_bubbler(obj, (LevelObjectEntry_Bubbler *)entry); break; - case 0x4B: - func_8003D2AC(arg0, arg1); + case 75: + obj_init_flycoin(obj, (LevelObjectEntry_FlyCoin *)entry); break; - case 0x4C: - func_8003B368(arg0, arg1); + case 76: + obj_init_goldenballoon(obj, (LevelObjectEntry_GoldenBalloon *)entry); break; - case 0x4D: - func_80034844(arg0, arg1); + case 77: + obj_init_laserbolt(obj, (LevelObjectEntry_Laserbolt *)entry); break; - case 0x4E: - func_80034530(arg0, arg1); + case 78: + obj_init_lasergun(obj, (LevelObjectEntry_Lasergun *)entry); break; - case 0x51: - func_80035AE8(arg0, arg1); + case 81: + obj_init_groundzipper(obj, (LevelObjectEntry_GroundZipper *)entry); break; - case 0x52: - func_80037D54(arg0, arg1); + case 82: + obj_init_overridepos(obj, (LevelObjectEntry_OverridePos *)entry); break; - case 0x53: - func_80037D6C(arg0, arg1); + case 83: + obj_init_wizpigship(obj, (LevelObjectEntry_WizpigShip *)entry); break; - case 0x58: - func_8004210C(arg0, arg1); + case 88: + obj_init_boost(obj, (LevelObjectEntry_Boost *)entry); break; - case 0x57: - func_8003DC5C(arg0, arg1); + case 87: + obj_init_silvercoin(obj, (LevelObjectEntry_SilverCoin *)entry); break; - case 0x59: - func_80038AC8(arg0, arg1); + case 89: + obj_init_wardensmoke(obj, (LevelObjectEntry_WardenSmoke *)entry); break; - case 0x5D: - func_80042150(arg0, arg1); + case 93: + obj_init_unknown94(obj, (LevelObjectEntry_Unknown94 *)entry, arg2); break; - case 0x61: - func_80038D58(arg0, arg1); + case 97: + obj_init_teleport(obj, (LevelObjectEntry_Teleport *)entry); break; - case 0x62: - case 0x63: - func_8003572C(arg0, arg1); + case 98: + case 99: + obj_init_lighthouse_rocketsignpost(obj, (LevelObjectEntry_Lighthouse_RocketSignpost *)entry); break; - case 0x68: - func_8004216C(arg0, arg1); + case 104: + obj_init_rangetrigger(obj, (LevelObjectEntry_RangeTrigger *)entry); break; - case 0x6B: - case 0x73: - func_80033F44(arg0, arg1); + case 107: + case 115: + obj_init_fireball_octoweapon(obj, (LevelObjectEntry_Fireball_Octoweapon *)entry); break; - case 0x6C: - func_80042210(arg0, arg1); + case 108: + obj_init_frog(obj, (LevelObjectEntry_Frog *)entry); break; - case 0x6D: - func_8003DBA0(arg0, arg1); + case 109: + obj_init_silvercoin_adv2(obj, (LevelObjectEntry_SilverCoinAdv2 *)entry); break; - case 0x74: - func_80042A1C(arg0, arg1); + case 116: + obj_init_levelname(obj, (LevelObjectEntry_LevelName *)entry); break; } } -#ifdef NON_EQUIVALENT s32 func_80023E30(s32 arg0) { - switch (arg0 - 1) { - case 0x00: - return 0x1F; - case 0x01: - return 0x13; - case 0x04: - return 0x16; - case 0x0B: - return 0x1B; - case 0x0D: - case 0x6E: - return 0x30; - case 0x10: - case 0x4C: - return 0x12; - case 0x45: - case 0x47: - case 0x5F: - case 0x60: - return 0x3B; - case 0x64: - case 0x65: - case 0x66: - case 0x67: - return 0x3A; - case 0x17: - return 0x04; - case 0x1E: - return 0x1B; - case 0x1F: - case 0x3F: - case 0x57: - case 0x6D: - return 0x12; - case 0x42: - return 0x30; - case 0x25: - return 0x39; - case 0x26: - return 0x12; - case 0x27: - return 0x09; - case 0x2C: - return 0x12; - case 0x2F: - return 0x09; - case 0x3E: - return 0x09; - case 0x31: - case 0x37: - case 0x4F: - case 0x53: - case 0x55: - case 0x72: - return 0x0B; - case 0x35: - return 0x0B; - case 0x49: - case 0x5E: - case 0x62: - case 0x63: - return 0x31; - case 0x5A: - return 0x01; - case 0x50: - return 0x0A; - case 0x06: - case 0x0C: - case 0x11: - case 0x19: - case 0x1D: - case 0x23: - case 0x28: - case 0x33: - case 0x36: - case 0x38: - case 0x43: - case 0x4D: - case 0x4E: - case 0x5C: - case 0x61: - case 0x6B: - case 0x73: - return 0x10; - case 0x51: - return 0x12; - case 0x30: - case 0x32: - case 0x3C: - return 0x02; - case 0x3D: - return 0x1B; - case 0x6C: - return 0x0B; - case 0x71: - return 0x01; - default: - return 0x00; - } + s32 value = 0; + switch (arg0 - 1){ + case 0x00: + value = 0x1F; + break; + case 0x01: + value = 0x13; + break; + case 0x04: + value = 0x16; + break; + case 0x0B: + value = 0x1B; + break; + case 0x0D: + case 0x6E: + value = 0x30; + break; + case 0x10: + case 0x4C: + value = 0x12; + break; + case 0x45: + case 0x47: + case 0x5F: + case 0x60: + value = 0x3B; + break; + case 0x64: + case 0x65: + case 0x66: + case 0x67: + value = 0x3A; + break; + case 0x17: + value = 0x04; + break; + case 0x1E: + value = 0x1B; + break; + case 0x1F: + case 0x3F: + case 0x57: + case 0x6D: + value = 0x12; + break; + case 0x42: + value = 0x30; + break; + case 0x25: + value = 0x39; + break; + case 0x26: + value = 0x12; + break; + case 0x27: + value = 0x09; + break; + case 0x2C: + value = 0x12; + break; + case 0x2F: + value = 0x09; + break; + case 0x3E: + value = 0x09; + break; + case 0x31: + case 0x37: + case 0x4F: + case 0x53: + case 0x55: + case 0x72: + value = 0x0B; + break; + case 0x35: + value = 0x0B; + break; + case 0x49: + case 0x5E: + case 0x62: + case 0x63: + value = 0x31; + break; + case 0x5A: + value = 0x01; + break; + case 0x50: + value = 0x0A; + break; + case 0x06: + case 0x0C: + case 0x11: + case 0x19: + case 0x1D: + case 0x23: + case 0x28: + case 0x33: + case 0x36: + case 0x38: + case 0x43: + case 0x4D: + case 0x4E: + case 0x5C: + case 0x61: + case 0x6B: + case 0x73: + value = 0x10; + break; + case 0x51: + value = 0x12; + break; + case 0x30: + case 0x32: + case 0x3C: + value = 0x02; + break; + case 0x3D: + value = 0x1B; + break; + case 0x6C: + value = 0x0B; + break; + case 0x71: + value = 0x01; + break; + } + return value; } -#else -GLOBAL_ASM("asm/non_matchings/unknown_00BC20/func_80023E30.s") -#endif void run_object_loop_func(Object *obj, s32 arg1) { func_800B76B8(1, obj->unk4A); - switch (obj->unk48) { + switch (obj->behaviorId) { case 2: - func_80033DD0(obj, arg1); + obj_loop_scenery(obj, arg1); break; case 3: - func_800370D4(obj, arg1); + obj_loop_fish(obj, arg1); break; case 4: - func_800377E4(obj, arg1); + obj_loop_animator(obj, arg1); break; case 6: - func_800389B8(obj, arg1); + obj_loop_smoke(obj, arg1); break; case 25: - func_80038A78(obj, arg1); + obj_loop_unknown25(obj, arg1); break; case 22: - func_80038BF4(obj, arg1); + obj_loop_bombexplosion(obj, arg1); break; case 7: - func_80038F58(obj, arg1); + obj_loop_exit(obj, arg1); break; case 10: - func_80039184(obj, arg1); + obj_loop_cameracontrol(obj, arg1); break; case 11: - func_800391BC(obj, arg1); + obj_loop_setuppoint(obj, arg1); break; case 12: - func_800391FC(obj, arg1); + obj_loop_dino_whale(obj, arg1); break; case 13: - func_8003AD28(obj, arg1); + obj_loop_checkpoint(obj, arg1); break; case 30: - func_8003AE50(obj, arg1); + obj_loop_modechange(obj, arg1); break; case 41: - func_8003B174(obj, arg1); + obj_loop_bonus(obj, arg1); break; case 14: - func_8003B988(obj, arg1); + obj_loop_door(obj, arg1); break; case 15: - func_80030A74(obj); + obj_loop_fogchanger(obj); break; case 16: - func_8003D02C(obj, arg1); + obj_loop_ainode(obj, arg1); break; case 17: - func_8003E140(obj, arg1); + obj_loop_weaponballoon(obj, arg1); break; case 23: - func_8003E5BC(obj, arg1); + obj_loop_wballoonpop(obj, arg1); break; case 5: case 18: - func_8003E630(obj, arg1); + obj_loop_weapon(obj, arg1); break; case 26: - func_8003CF98(obj, arg1); + obj_loop_skycontrol(obj, arg1); break; case 28: - func_80034B4C(obj, arg1); + obj_loop_torch_mist(obj, arg1); break; case 29: - func_80040148(obj, arg1); + obj_loop_texscroll(obj, arg1); break; case 31: - func_800361E0(obj, arg1); + obj_loop_stopwatchman(obj, arg1); break; case 32: - func_8003D5A0(obj, arg1); + obj_loop_coin(obj, arg1); break; case 36: - func_80040448(obj, arg1); + obj_loop_buoy_pirateship(obj, arg1); break; case 67: - func_80040570(obj, arg1); + obj_loop_log(obj, arg1); break; case 37: - func_80040820(obj, arg1); + obj_loop_weather(obj, arg1); break; case 38: - func_8003CA68(obj, arg1); + obj_loop_bridge_whaleramp(obj, arg1); break; case 39: - func_8003CEA0(obj, arg1); + obj_loop_rampswitch(obj, arg1); break; case 40: - func_8003CF0C(obj, arg1); + obj_loop_seamonster(obj, arg1); break; case 45: - func_80035260(obj, arg1); + obj_loop_collectegg(obj, arg1); break; case 46: - func_8003564C(obj, arg1); + obj_loop_eggcreator(obj, arg1); break; case 47: - func_80035F6C(obj, arg1); + obj_loop_characterflag(obj, arg1); break; case 50: case 81: case 85: case 86: - func_80037CE8(obj, arg1); + obj_loop_animobject(obj, arg1); break; case 119: - func_80042CD0(obj, arg1); + obj_loop_wizghosts(obj, arg1); break; case 51: - func_80038710(obj, arg1); + obj_loop_animcamera(obj, arg1); break; case 52: - func_800388D4(obj, arg1); + obj_loop_infopoint(obj, arg1); break; case 53: - func_800387CC(obj, arg1); + obj_loop_animcar(obj, arg1); break; case 54: - func_8003833C(obj, arg1); + obj_loop_char_select(obj, arg1); break; case 55: - func_8003C7A4(obj, arg1); + obj_loop_trigger(obj, arg1); break; case 56: - func_800380F8(obj, arg1); + obj_loop_vehicleanim(obj, arg1); break; case 57: case 93: - func_8003596C(obj, arg1); + obj_loop_airzippers_waterzippers(obj, arg1); break; case 58: - func_80035E34(obj, arg1); + obj_loop_unknown58(obj, arg1); break; case 60: - func_800BFFDC(obj); + obj_loop_wavepower(obj); break; case 61: - func_80040C54(obj, arg1); + obj_loop_butterfly(obj, arg1); break; case 62: - func_80039330(obj, arg1); + obj_loop_parkwarden(obj, arg1); break; case 64: - obj_loop_world_key(obj, arg1); //arg1=speed + obj_loop_worldkey(obj, arg1); //arg1=speed break; case 65: - func_8003D3FC(obj, arg1); + obj_loop_coincreator(obj, arg1); break; case 66: - func_8003D058(obj, arg1); + obj_loop_treasuresucker(obj, arg1); break; case 68: - func_80037594(obj, arg1); + obj_loop_lavaspurt(obj, arg1); break; case 69: - func_8003763C(obj, arg1); + obj_loop_posarrow(obj, arg1); break; case 70: case 72: case 103: case 104: - func_800381C0(obj, arg1); + obj_loop_hittester(obj, arg1); break; case 96: case 97: case 101: case 102: - func_8003827C(obj, arg1); + obj_loop_snowball(obj, arg1); break; case 73: - func_80034B74(obj, arg1); + obj_loop_effectbox(obj, arg1); break; case 74: - func_80034E9C(obj, arg1); + obj_loop_trophycab(obj, arg1); break; case 75: - func_80042090(obj, arg1); + obj_loop_bubbler(obj, arg1); break; case 76: - func_8003D2B8(obj, arg1); + obj_loop_flycoin(obj, arg1); break; case 77: - func_8003B4BC(obj, arg1); + obj_loop_goldenballoon(obj, arg1); break; case 78: - func_80034860(obj, arg1); + obj_loop_laserbolt(obj, arg1); break; case 79: - func_800345A0(obj, arg1); + obj_loop_lasergun(obj, arg1); break; case 80: - func_8003ACA0(obj, arg1); + obj_loop_gbparkwarden(obj, arg1); break; case 82: - func_80035C50(obj, arg1); + obj_loop_groundzipper(obj, arg1); break; case 84: - func_80037D78(obj, arg1); + obj_loop_wizpigship(obj, arg1); break; case 88: case 110: - func_8003DD14(obj, arg1); + obj_loop_silvercoin(obj, arg1); break; case 90: - func_80038AD4(obj, arg1); + obj_loop_wardensmoke(obj, arg1); break; case 94: - func_80042160(obj, arg1); + obj_loop_unknown94(obj, arg1); break; case 98: - func_80038DC4(obj, arg1); + obj_loop_teleport(obj, arg1); break; case 105: - func_80042178(obj, arg1); + obj_loop_rangetrigger(obj, arg1); break; case 100: - func_800357D4(obj, arg1); + obj_loop_rocketsignpost(obj, arg1); break; case 108: case 116: - func_80033F60(obj, arg1); + obj_loop_fireball_octoweapon(obj, arg1); break; case 109: - func_800422F0(obj, arg1); + obj_loop_frog(obj, arg1); break; case 111: - func_8003C2E4(obj, arg1); + obj_loop_ttdoor(obj, arg1); break; case 113: - func_80037D08(obj, arg1); + obj_loop_dooropener(obj, arg1); break; case 115: - func_80042998(obj, arg1); + obj_loop_pigrocketeer(obj, arg1); break; case 117: - func_80042A90(obj, arg1); + obj_loop_levelname(obj, arg1); break; } func_800B76B8(1, -1); diff --git a/src/unknown_00BC20.h b/src/unknown_00BC20.h index b85c7f8c..530b51ab 100644 --- a/src/unknown_00BC20.h +++ b/src/unknown_00BC20.h @@ -4,6 +4,7 @@ #include "types.h" #include "structs.h" #include "f3ddkr.h" +#include "object_functions.h" /* Size: 0x8 bytes */ typedef struct unknown800DC6F0 { @@ -151,7 +152,7 @@ void func_80011390(void); s32 func_8001139C(); s32 func_800113AC(); s32 func_800113BC(); -void func_80011560(void); +s32 func_80011560(void); void func_80012C30(void); void func_80012C3C(Gfx** dlist); void func_80012C98(Gfx **dlist); @@ -211,7 +212,7 @@ s8 func_8002341C(void); s32 func_80023568(void); s8 func_800235C0(void); void func_800235D0(s32 arg0); -void func_800238BC(Object *arg0, void *arg1); +void run_object_init_func(Object *arg0, void *arg1, s32 arg2); void run_object_loop_func(Object *obj, s32 arg1); void func_8002458C(s32 arg0); s16 *func_80024594(s32 *arg0, s32 *arg1); diff --git a/src/unknown_0255E0.c b/src/unknown_0255E0.c index dccfdaf5..c0de9fea 100644 --- a/src/unknown_0255E0.c +++ b/src/unknown_0255E0.c @@ -10,9 +10,9 @@ #include "PR/gu.h" #include "textures_sprites.h" #include "unknown_00BC20.h" -#include "unknown_06B2B0.h" +#include "game.h" #include "memory.h" -#include "unknown_043920.h" +#include "racer.h" #include "camera.h" #include "waves.h" @@ -411,7 +411,7 @@ void render_level_geometry_and_objects(void) { render_floor_decal(obj, obj->unk50); } func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != NULL) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != NULL) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -435,7 +435,7 @@ void render_level_geometry_and_objects(void) { render_floor_decal(obj, obj->unk50); } func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != NULL) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != NULL) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -484,7 +484,7 @@ void render_level_geometry_and_objects(void) { } // This is being called when it shouldn't. func_80012D5C(&D_8011B0A0, &D_8011B0A4, &D_8011B0A8, obj); - if ((obj->unk58 != 0) && (obj->descriptor_ptr->unk30 & 0x10)) { + if ((obj->unk58 != 0) && (obj->header->unk30 & 0x10)) { func_8002D670(obj, obj->unk58); } } @@ -1054,7 +1054,7 @@ void func_8003093C(s32 arg0) { gDPSetFogColor(D_8011B0A0++, D_8011D388[arg0].unk0 >> 0x10, D_8011D388[arg0].unk4 >> 0x10, D_8011D388[arg0].unk8 >> 0x10, 0xFF); gSPFogPosition(D_8011B0A0++, D_8011D388[arg0].unkC >> 0x10, D_8011D388[arg0].unk10 >> 0x10); } -GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80030A74.s") +GLOBAL_ASM("asm/non_matchings/unknown_0255E0/obj_loop_fogchanger.s") GLOBAL_ASM("asm/non_matchings/unknown_0255E0/func_80030DE0.s") void func_80031018(void) { diff --git a/src/unknown_032760.c b/src/unknown_032760.c index a6559663..0fe20b8b 100644 --- a/src/unknown_032760.c +++ b/src/unknown_032760.c @@ -149,8 +149,8 @@ void func_80032C7C(Object *object) { s16 phi_a0, phi_a1; unk800DC950 *entry; - if (object->descriptor_ptr->unk3D == 0) { - switch (object->descriptor_ptr->unk53) { // Model type + if (object->header->unk3D == 0) { + switch (object->header->unk53) { // Model type case 0: // 3D Model sp64 = 2; break; @@ -199,7 +199,7 @@ void func_80032C7C(Object *object) { if (f20 > 0.0f) { f20 *= func_80033A14(entry); if (f20 > 0.0f) { - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { if (D_8011D4C0 > 0.0f) { temp = 1.0f / sqrtf(D_8011D4C0); D_8011D4C4 *= temp; @@ -227,7 +227,7 @@ void func_80032C7C(Object *object) { } } - if (object->descriptor_ptr->unk71 != 0) { + if (object->header->unk71 != 0) { if (D_800DC968 == 0) { object->unk54->unk7 = 0; object->unk54->unk11 = 0; diff --git a/src/unknown_0348C0.c b/src/unknown_0348C0.c deleted file mode 100644 index 61f3da63..00000000 --- a/src/unknown_0348C0.c +++ /dev/null @@ -1,1577 +0,0 @@ -/* The comment below is needed for this file to be picked up by generate_ld */ -/* RAM_POS: 0x80033CC0 */ - -#include "unknown_0348C0.h" - -#include "PR/os_cont.h" -#include "types.h" -#include "macros.h" -#include "structs.h" -#include "video.h" -#include "camera.h" -#include "menu.h" // For cheats -#include "unknown_0ABDF0.h" -#include "unknown_043920.h" -#include "unknown_06B2B0.h" -#include "audio.h" -#include "unknown_008C40.h" -#include "unknown_00BC20.h" -#include "particles.h" -#include "unknown_0255E0.h" -#include "font.h" -#include "unknown_032760.h" -#include "unknown_09F8F0.h" -#include "waves.h" -#include "unknown_003260.h" - -/************ .data ************/ - -// Unsure about the signed/unsigned with these arrays. -u16 D_800DC970[4] = { - 0x40FF, 0xFFFF, 0x0007, 0x0003 -}; -u16 D_800DC978[4] = { - 0x0000, 0x0000, 0x001E, 0xFFFF -}; -u16 D_800DC980[20] = { - 0xFF00, 0x0100, 0x0000, 0xFFFF, - 0xFFFF, 0x0100, 0x0100, 0x0000, - 0xFFFF, 0xFFFF, 0x0100, 0xFF00, - 0x0000, 0xFFFF, 0xFFFF, 0xFF00, - 0xFF00, 0x0000, 0xFFFF, 0xFFFF, -}; -u16 D_800DC9A8[20] = { - 0x0000, 0x0040, 0xFFC0, 0x0000, - 0xFFC0, 0xFFC0, 0x0000, 0x0040, - 0x0020, 0x0000, 0xFFC0, 0x0020, - 0x0000, 0x0040, 0x0040, 0x0000, - 0xFFC0, 0x0040, 0x0000, 0x0000, -}; -u16 D_800DC9D0[64] = { - 0x0000, 0x0301, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0004, 0x0004, - 0x0000, 0x0203, 0x0004, 0x0000, - 0x0001, 0x0000, 0x0001, 0x0004, - 0x0002, 0x0503, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0001, 0x0004, - 0x0002, 0x0405, 0x0001, 0x0000, - 0x0000, 0x0000, 0x0000, 0x0004, - 0x0000, 0x0103, 0x0004, 0x0000, - 0x0004, 0x0004, 0x0001, 0x0004, - 0x0000, 0x0302, 0x0004, 0x0000, - 0x0001, 0x0004, 0x0001, 0x0000, - 0x0002, 0x0305, 0x0001, 0x0000, - 0x0001, 0x0004, 0x0000, 0x0004, - 0x0002, 0x0504, 0x0001, 0x0000, - 0x0000, 0x0004, 0x0000, 0x0000, -}; -s8 D_800DCA50[8] = { - 2, 5, 6, 3, 10, 8, 7, 9 -}; -u8 D_800DCA58[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11 -}; -s8 D_800DCA64[9] = { - 2, 5, 6, 3, 10, 8, 7, 9, 12 -}; -s8 D_800DCA70[10] = { - 2, 5, 6, 3, 10, 8, 7, 9, 11, 12 -}; -s32 D_800DCA7C[3] = { // Not sure about typing - 0, 0, 0 -}; -s32 D_800DCA88[3] = { // Not sure about typing - 0, 0, 0 -}; - -s8 D_800DCA94[8] = { - 0x00, 0x00, 0x01, 0x01, 0x02, 0x00, 0x00, 0x00 -}; - -s8 D_800DCA9C[12] = { - 0x00, 0x01, 0x01, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 -}; -u16 D_800DCAA8[64] = { - 0x0000, 0x0301, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0000, 0x0203, 0x0000, 0x0000, - 0xFFFF, 0x0000, 0xFFFF, 0xFFFF, - 0x0002, 0x0503, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0002, 0x0405, 0xFFFF, 0x0000, - 0x0000, 0x0000, 0x0000, 0xFFFF, - 0x0000, 0x0103, 0x0000, 0x0000, - 0x0000, 0xFFFF, 0xFFFF, 0xFFFF, - 0x0000, 0x0302, 0x0000, 0x0000, - 0xFFFF, 0xFFFF, 0xFFFF, 0x0000, - 0x0002, 0x0305, 0xFFFF, 0x0000, - 0xFFFF, 0xFFFF, 0x0000, 0xFFFF, - 0x0002, 0x0504, 0xFFFF, 0x0000, - 0x0000, 0xFFFF, 0x0000, 0x0000, -}; -u16 D_800DCB28[20] = { - 0xFFC0, 0x0000, 0x0020, 0xFFC0, - 0x0000, 0xFFE0, 0x0000, 0x0000, - 0x0020, 0x0000, 0x0000, 0xFFE0, - 0x0040, 0x0000, 0x0020, 0x0040, - 0x0000, 0xFFE0, 0x0000, 0x0000, -}; - -/*******************************/ - -/************ .bss ************/ - -f32 D_8011D4D0; -s32 D_8011D4D4; -s32 D_8011D4D8; -s32 D_8011D4DC; -s16 D_8011D4E0; -s16 D_8011D4E2; - -/******************************/ - -#ifdef NON_EQUIVALENT -typedef struct LevelObjectEntry80033CC0 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; -} LevelObjectEntry80033CC0; - -typedef struct Object_50_80033CC0 { - f32 unk0; -} Object_50_80033CC0; - -void func_80033CC0(Object *arg0, LevelObjectEntry80033CC0 *arg1) { - f32 phi_f0; - arg0->unk6 |= 2; - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - ((Object_50_80033CC0 *)arg0->unk50)->unk0 = arg0->descriptor_ptr->unk4 * phi_f0; - arg0->unk3A = arg1->unk8; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg1->unkB) { - // Regalloc issue here - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 1; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - arg0->unk4C->unk16 = -5; - arg0->unk4C->unk17 = arg1->unkB; - } - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - arg0->unk78 = 0; - arg0->unk7C.word = 0; -} -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033CC0.s") -#endif - -void func_80033DD0(Object *obj, s32 arg1) { - Object78_80033DD0 *obj78; - s32 temp_v0; - - if (obj->unk4C != NULL) { - obj78 = &obj->unk78; - if (obj->unk7C.half.upper > 0) { - obj78->unk4 -= arg1; - } - if ((obj->unk4C->unk14 & 0x40) && ((s32) obj78->unk4 <= 0)) { - func_80009558(316, obj->x_position, obj->y_position, obj->z_position, 4, NULL); - obj78->unk0 = (s32*) obj->unk4C->unk0; - obj78->unk6 = 1820; - obj78->unk4 = 10; - if (get_number_of_active_players() < 2) { - if (obj->descriptor_ptr->unk57 > 0) { - if (obj->descriptor_ptr->unk57 == 1) { - temp_v0 = 0; - } else { - temp_v0 = get_random_number_from_range(0, obj->descriptor_ptr->unk57 - 1); - } - obj->unk74 = 1 << temp_v0; - func_800AFC3C(obj, 2); - } - } - } else if (obj78->unk4 <= 0) { - obj78->unk0 = 0; - } - obj->z_rotation = (s16) obj78->unk6; - obj78->unk6 = (obj78->unk6 * -200) >> 8; - } -} - -void func_80033F44(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80033F60.s") - -void func_80034530(Object *arg0, unk80034530 *arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = 0x22; - arg0->unk4C->unk11 = 0; - temp = arg0->unk64; - temp->unkE = arg1->unkA; - temp->unkF = arg1->unkB; - temp->unk10 = arg1->unkC; - temp->unk11 = arg1->unkD; - temp->unkCD.half = temp->unkF; - arg0->y_rotation = arg1->unk8 << 4 << 4; // Not sure about the shift amounts here, but it - arg0->x_rotation = arg1->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800345A0.s") - -// Literally the same function as func_80033F44() -void func_80034844(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034860.s") - -void func_80034AF0(Object *arg0, u8 *arg1) { - f32 phi_f0 = (s32)(arg1[9] & 0xFF); - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->unk78 = arg1[8]; -} - -void func_80034B4C(unk80034B4C *arg0, s32 arg1) { - arg0->unk18 += arg0->unk78 * arg1; -} - -void func_80034B68(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034B74.s") - -void func_80034E70(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->y_rotation = arg1[8] << 6 << 4; // Not sure about the values here. -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80034E9C.s") - -void func_8003522C(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035260.s") - -void func_80035640(s32 arg0, s32 arg1) { -} - -void func_8003564C(Object *arg0, s32 arg1) { - unk8003564C sp20; - Object *someObj; - - if (arg0->unk78 == 0) { - sp20.unk2 = arg0->x_position; - sp20.unk4 = arg0->y_position; - sp20.unk6 = arg0->z_position; - sp20.unk1 = 8; - sp20.unk0 = 0x34; - someObj = func_8000EA54(&sp20, 1); - if (someObj != NULL) { - Object_64_8003564C *someObj64 = someObj->unk64; - someObj64->unk4 = arg0; - arg0->unk78 = someObj; - someObj->unk3C_a.unk3C = 0; - } - } -} - -void func_8003572C(Object *arg0, LevelObjectEntry8003572C *arg1) { - f32 phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -void func_800357D4(Object *obj, s32 arg1) { - Object *someObj; - Object_4C *temp_v1; - - someObj = get_object_struct(0); - if (someObj != NULL) { - temp_v1 = obj->unk4C; - if (temp_v1->unk13 < 0xC8) { - if (someObj == temp_v1->unk0) { - if ((get_buttons_pressed_from_player(0) & Z_TRIG) || someObj == obj->unk5C->unk100) { - func_8006F29C(); - } - } - } - } - obj->unk4C->unk13 = 0xFF; -} - -void func_8003588C(Object *arg0, LevelObjectEntry8003588C *arg1) { - Object_40 *obj40; - f32 phi_f0; - - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - obj40 = arg0->descriptor_ptr; - phi_f0 /= 64; - arg0->scale = obj40->unkC * phi_f0; - arg0->y_rotation = arg1->unkA << 6 << 4; - if (arg0->unk3A >= obj40->unk55) { - arg0->unk3A = 0; - } - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - if (get_filtered_cheats() & CHEAT_TURN_OFF_ZIPPERS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003596C.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035AE8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80035C50.s") - -void func_80035E20(unk80035E20 *arg0, s32 arg1) { - arg0->unk78 = 0; - arg0->unk7C = arg0->unk40; -} - -void func_80035E34(Object *obj, s32 arg1) { - Object *someObj; - Object *someOtherObj; - Object_64_80035E34 *someOtherObj64; - Object_60 *obj60; - - obj->unk3B = 0; - obj->unk18 = 0x28; - if (func_8001139C() == 0) { - obj->unk78 += arg1; - } - set_ghost_position_and_rotation(obj); - func_800AFC3C(obj, arg1); - someOtherObj = get_object_struct(0); - someOtherObj64 = someOtherObj->unk64; - obj60 = obj->unk60; - if (obj60->unk0 == 1) { - s8 temp = someOtherObj64->unk1D6; - if ((temp == 1) || (temp == 2)) { - someObj = (Object *)obj60->unk4; - someObj->y_rotation = 0x4000; - someObj->unk3A++; - someObj->unk3A &= 1; - } - } -} - -void func_80035EF8(Object *arg0, unk80035EF8 *arg1) { - f32 phi_f0; - arg0->unk78 = (s32)arg1->unkE; - arg0->unk7C.word = -1; - arg0->y_rotation = arg1->unkC << 6 << 4; // Not sure about the values here. - phi_f0 = (f32)(arg1->unkA & 0xFF); - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = (f32)(arg0->descriptor_ptr->unkC * phi_f0); -} - -void func_80035F6C(Object *obj, s32 arg1) { - s32 temp_t4; - s32 temp_t5; - Object *someObj; - Object_64_80035F6C *obj64; - Object_64_80035F6C_2 *someObj64; - - if (obj->unk7C.word < 0) { - someObj = get_object_struct(obj->unk78); - if (someObj != NULL) { - obj64 = obj->unk64; - someObj64 = someObj->unk64; - obj->unk7C.word = someObj64->unk3; - if (obj->unk7C.word < 0 || obj->unk7C.word >= 0xA) { - obj->unk7C.word = 0; - } - obj64->unk20 = D_800DC980; - obj64->unk24 = obj->unk68[obj->unk7C.word]; - temp_t4 = (obj64->unk24[0] - 1) << 0x15; - temp_t5 = (obj64->unk24[1] - 1) << 5; - obj64->unk0 = 0x40000103; - obj64->unk4 = 0; - obj64->unk8 = temp_t4; - obj64->unkC = temp_t5; - obj64->unk10 = 0x40010203; - obj64->unk14 = temp_t4; - obj64->unk18 = (s32)(temp_t4 | temp_t5); - obj64->unk1C = temp_t5; - } - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s") - -void func_80036194(Object *arg0, s32 arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0_a.unk0 = 0.0f; - D_8011D4D8 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800361E0.s") - -void func_80036BCC(u16 arg0, s32 arg1) { - if ((D_8011D4D8 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D8); //This is likely wrong and will need to be fixed - D_8011D4D8 = 0; - } - if (D_8011D4D8 == 0) { - func_80001D04(arg0, &D_8011D4D8); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036C30.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800370D4.s") - -void func_80037578(unk80037578 *arg0, u8 *arg1) { - arg0->unk78 = arg1[9] * 2; - arg0->unk7C = arg1[8]; -} - -void func_80037594(Object *obj, s32 arg1) { - if (obj->unk78 > 0) { - obj->unk78 -= arg1; - obj->unk6 |= 0x4000; - } else { - obj->unk6 &= ~0x4000; - obj->unk18 += arg1 * 4; - if (obj->unk18 >= 256) { - obj->unk18 = 0; - obj->unk78 = get_random_number_from_range(0, 30) + obj->unk7C.word; - } - } -} - -void func_80037624(unk80037624 *arg0, s32 arg1) { - arg0->unk6 |= 0x4000; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003763C.s") - -void func_800376E0(Object *arg0, LevelObjectEntry800376E0 *arg1, s32 arg2) { - Object_64_800376E0 *obj64; - LevelModel *levelModel; - s16 segmentBatchCount; - - obj64 = arg0->unk64; - levelModel = func_8002C7C4(); - obj64->unk2 = arg1->unk8; - obj64->unk4 = arg1->unk9; - obj64->unk6 = arg1->unkA; - obj64->segmentId = get_level_segment_index_from_position(arg0->x_position, arg0->y_position, arg0->z_position); - if (arg2 == 0) { - obj64->unk8 = 0; - obj64->unkA = 0; - } - if (obj64->segmentId != -1) { - if (obj64->unk2 < 0) { - obj64->unk2 = 0; - } - segmentBatchCount = levelModel->segments[obj64->segmentId].numberOfBatches; - if (obj64->unk2 >= segmentBatchCount) { - obj64->unk2 = segmentBatchCount - 1; - } - } - func_800377E4(arg0, 0x20000); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800377E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037A18.s") - -void func_80037CE8(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1) { - s32 phi_a0; - unk80037D08_arg0_64 *sp18; - - sp18 = arg0->unk64; - phi_a0 = 1 - func_8001F460(arg0, arg1, arg0); - if (sp18->unk2A > 0) { - phi_a0 = 0; - } - func_800235D0(phi_a0); -} - -void func_80037D54(s32 arg0, s32 arg1) { -} - -/* Unused? */ -void func_80037D60(s32 arg0, s32 arg1) { -} - -void func_80037D6C(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80037D78.s") - -void func_800380F8(Object *obj, s32 arg1) { - Object_60_800380F8 *obj60; - Object *someObj; - - func_8001F460(obj, arg1, obj); - obj60 = obj->unk60; - if (obj60 != NULL) { - if (obj60->unk0 > 0) { - someObj = obj60->unk0 == 3 ? obj60->unkC : obj60->unk4; - someObj->y_rotation = 0x4000; - someObj->unk3A++; - if (someObj->unk3A == someObj->descriptor_ptr->unk55) { - someObj->unk3A = 0; - } - } - } -} - -void func_8003818C(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_80037CE8() -void func_800381C0(s32 arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); -} - -void func_800381E0(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_8003818C() -void func_80038214(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 0x81; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -// Literally the same as func_800381E0() -void func_80038248(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -#ifdef NON_EQUIVALENT -// Regalloc issues -void func_8003827C(Object *obj, s32 arg1) { - Object_64_8003827C *obj64 = obj->unk64; - if (obj64->unk24 == 0) { - if (obj64->unk38 != 0) { - obj64->unk24 = (s16)(obj64->unk38 & 0xFF); - } - } - if (obj64->unk24 != 0) { - if (obj64->unk20 == 0) { - func_80009558(obj64->unk24 & 0xFFFF, obj->x_position, obj->y_position, obj->z_position, 1, &obj64->unk20); - } else { - func_800096D8(obj64->unk20, obj->x_position, obj->y_position, obj->z_position); - } - } - func_8001F460(obj, arg1, obj); -} - -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003827C.s") -#endif - -// Unused -void func_80038330(Object *obj, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003833C.s") - -void func_80038710(Object *obj, s32 arg1) { - s32 temp_v0; - s32 phi_v1; - Object_64_80038710 *obj64; - - temp_v0 = func_8001F460(obj, arg1, obj); - obj->unk6 |= 0x4000; - obj64 = obj->unk64; - if (temp_v0 == 0) { - if (get_viewport_count() == VIEWPORTS_COUNT_1_PLAYER) { - phi_v1 = func_800210CC(obj64->unk44); - } else { - phi_v1 = 1; - } - if (phi_v1) { - func_80066488(obj64->unk30, obj->x_position, obj->y_position, obj->z_position, 0x8000 - obj->y_rotation, -obj->x_rotation, obj->z_rotation); - } - } -} - -// Unused -void func_800387C0(Object *obj, s32 arg1) { -} - -void func_800387CC(Object *obj, s32 arg1) { - Object *someObj; - s32 temp_v0; - temp_v0 = obj->unk78; - someObj = NULL; - if (temp_v0 != 0) { - someObj = get_object_struct(temp_v0 - 1); - } - obj->unk7C.word = func_8001F460(obj, arg1, obj); - obj->unk6 |= 0x4000; - if (obj->unk7C.word == 0 && someObj != NULL) { - Object_64_800387CC *someObj64 = someObj->unk64; - someObj64->unk148 = obj; - } -} - -void func_80038854(Object *arg0, u8 *arg1) { - if (arg1[9] != 0) { - arg0->unk4C->unk14 = 0x21; - } else { - arg0->unk4C->unk14 = 0x22; - } - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - arg0->unk78 = (arg1[10] << 16) | arg1[8]; // Not sure about the values here. - arg0->unk7C.word = arg1[9]; - arg0->y_rotation = arg1[11] << 10; // Not sure about the values here. -} - -void func_800388D4(Object *arg0, s32 arg1) { - s16 temp_a0; - Object_4C *obj4C; - Object *playerObj; - - if (arg0->unk7C.word == 0) { - arg0->unk6 |= 0x4000; - } else { - arg0->unk6 &= ~0x4000; - } - - obj4C = arg0->unk4C; - if (obj4C->unk13 < ((arg0->unk78 >> 16) & 0xFF)) { - playerObj = obj4C->unk0; - if (playerObj->descriptor_ptr->unk54 == 1) { - Object_64_800388D4 *playerObj64 = playerObj->unk64; - temp_a0 = playerObj64->unk0; - if ((temp_a0 != -1) && (get_buttons_pressed_from_player(temp_a0) & Z_TRIG)) { - func_800C31EC(arg0->unk78 & 0xFF, arg0); - } - } - } -} - -void func_800389AC(s32 arg0, s32 arg1) { -} - -void func_800389B8(Object *obj, s32 arg1) { - f32 temp_f2 = arg1; - if (osTvType == TV_TYPE_PAL) { - temp_f2 *= 1.2; - } - obj->x_position += obj->x_velocity * temp_f2; - obj->unk18 += arg1 * 16; - obj->y_position += obj->y_velocity * temp_f2; - obj->z_position += obj->z_velocity * temp_f2; - if (obj->unk18 >= 256) { - gParticlePtrList_addObject(obj); - obj->unk18 = 255; - } -} - -void func_80038A6C(s32 arg0, s32 arg1) { -} - -void func_80038A78(Object *arg0, s32 arg1) { - arg0->unk18 += arg1 * 8; - if (arg0->unk18 >= 256) { - gParticlePtrList_addObject(arg0); - arg0->unk18 = 255; - } -} - -void func_80038AC8(s32 arg0, s32 arg1) { -} - -void func_80038AD4(Object *arg0, s32 arg1) { - f32 temp_f2; - - temp_f2 = (f32)arg1; - if (osTvType == TV_TYPE_PAL) { - temp_f2 *= 1.2; - } - arg0->unk18 += arg1 * 4; - arg0->y_position += temp_f2 * 0.25; - if (arg0->unk18 >= 256) { - gParticlePtrList_addObject(arg0); - arg0->unk18 = 255; - } -} - -#ifdef NON_EQUIVALENT -// regalloc issues -void func_80038B74(Object *obj, unk80038B74 *arg1) { - s32 temp; - obj->unk18 = 0; - obj->scale = 0.5f; - obj->unk3A = get_random_number_from_range(0, obj->descriptor_ptr->unk55 - 1); - obj->unk78 = 0; - obj->unk7C.word = 0xFF; - temp = (s32)arg1->unk8; - if (temp != 0) { - obj->unk7C.word |= (temp << 8) & 0xFF00; - } - obj->unk74 = 1; -} - -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038B74.s") -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038BF4.s") - -void func_80038D58(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0xF; - arg0->unk4C->unk12 = 0; - if (get_settings()->cutsceneFlags & 1) { - arg0->unk78 = 1; - } -} - -void func_80038DC4(Object *arg0, s32 arg1) { - if (arg0->unk78 != 0) { - Object_3C_80038DC4 *temp = arg0->unk3C_a.unk3C; - if (arg0->unk4C->unk13 < 0x78) { - func_8006F338(temp->unk8); - arg0->unk78 = 0; - func_80001D04(0x30, 0); - func_80000FDC(0x12A, 0, 1.0f); - } - } -} - -void func_80038E3C(Object *obj, LevelObjectEntry80038E3C *arg1) { - f32 phi_f0; - Object_64_80038E3C *obj64; - phi_f0 = arg1->unk10 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk11 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk10; - obj64->unk14 = arg1->unk18; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk10; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80038F58.s") - -void func_80039160(unk80039160 *arg0, s8 *arg1) { - arg0->unk78 = arg1[8]; - func_80011390(); -} - -void func_80039184(s32 arg0, s32 arg1) { -} - -void func_80039190(unk80039190 *arg0, u8 *arg1) { - s32 temp; - arg0->unk78 = arg1[8]; - arg0->unk7C = arg1[9]; - arg0->unk0 = arg1[10] << 6 << 4; // Not sure about the values here. -} - -void func_800391BC(s32 arg0, s32 arg1) { -} - -void func_800391C8(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 3; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; -} - -void func_800391FC(Object *obj, s32 arg1) { - s32 sp2C; - - if (obj->unk78 > 0) { - obj->unk78 -= arg1; - arg1 *= 2; - } else { - obj->unk78 = 0; - } - sp2C = obj->unk18; - func_8001F460(obj, arg1, obj); - func_800113CC(obj, 0, sp2C, 0xAC, 0xAD); - if (obj->unk4C->unk13 < 0xFF) { - if (obj->unk78 == 0) { - obj->unk78 = 0x3C; - func_80009558(0x23B, obj->x_position, obj->y_position, obj->z_position, 4, NULL); - } - } -} - -void func_800392B8(Object *arg0, s32 arg1) { - Object_64 *temp; - arg0->unk4C->unk14 = (u16)1; - arg0->unk4C->unk11 = (u8)0; - arg0->unk4C->unk10 = (u8)0x1E; - arg0->unk4C->unk12 = (u8)0; - temp = arg0->unk64; - temp->unkCD.bytes.byteD = 0xFF; - temp->unk0_a.unk0 = 0.0f; - temp->unk28 = 0; - temp->unk2C = 0; - temp->unk34 = 0; - temp->unk36 = 0; - D_8011D4D4 = 0; - D_8011D4E2 = 0x10F; -} - -void func_80039320(s16 arg0) { - D_8011D4E2 = arg0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80039330.s") - -void func_8003AC3C(u16 arg0, s32 arg1) { - if ((D_8011D4D4 != 0) && (arg1 & 1)) { - func_8000488C(D_8011D4D4); - D_8011D4D4 = 0; - } - if (D_8011D4D4 == 0) { - func_80001D04(arg0, &D_8011D4D4); - } -} - -void func_8003ACA0(s32 arg0, s32 arg1) { -} - -f32 func_8003ACAC(void) { - return D_8011D4D0; -} - -void func_8003ACBC(Object *arg0, u8 *arg1, s32 arg2) { - f32 phi_f0 = (s32)(arg1[8] & 0xFF); - if (phi_f0 < 5.0f) { - phi_f0 = 5.0f; - } - phi_f0 /= 64; - arg0->scale = phi_f0; - arg0->y_rotation = arg1[10] << 6 << 4; // Not sure about the values here. - func_80011390(); -} - -void func_8003AD28(s32 arg0, s32 arg1) { -} - -void func_8003AD34(Object *obj, LevelObjectEntry8003AD34 *arg1) { - f32 phi_f0; - Object_64_8003AD34 *obj64; - phi_f0 = arg1->unk8 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk8; - obj64->unk14 = arg1->unkA; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk8; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003AE50.s") - -// Exactly the same as func_8003AD34 -void func_8003B058(Object *obj, LevelObjectEntry8003AD34 *arg1) { - f32 phi_f0; - Object_64_8003AD34 *obj64; - phi_f0 = arg1->unk8 & 0xFF; - if (phi_f0 < 5) { - phi_f0 = 5; - } - obj64 = obj->unk64; - phi_f0 /= 128; - obj->scale = phi_f0; - obj->y_rotation = arg1->unk9 << 6 << 4; - obj64->unk0 = func_800707C4(obj->y_rotation); - obj64->unk4 = 0.0f; - obj64->unk8 = func_800707F8(obj->y_rotation); - obj64->unkC = -((obj64->unk0 * obj->x_position) + (obj64->unk8 * obj->z_position)); - obj64->unk10 = arg1->unk8; - obj64->unk14 = arg1->unkA; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = arg1->unk8; - obj->unk4C->unk12 = 0; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B174.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B368.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B4BC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B7CC.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003B988.s") - -void func_8003C1E0(Object *obj, LevelObjectEntry8003C1E0 *arg1) { - f32 temp_f0; - Object_64_8003C1E0 *obj64; - f32 phi_f0; - - obj->unk3A = 0; - obj64 = obj->unk64; - obj->y_rotation = arg1->unk8 << 6 << 4; - obj64->unkF = arg1->unkE; - obj64->unk13 = arg1->unkB; - obj64->unk0 = obj->y_position; - obj64->unk8 = 0; - obj64->unk12 = arg1->unkA; - obj->unk78 = obj->y_rotation; - obj->unk7C.word = (arg1->unk9 & 0x3F) << 0xA; - phi_f0 = arg1->unkC & 0xFF; - if (phi_f0 < 10) { - phi_f0 = 10; - } - phi_f0 /= 64; - obj->scale = obj->descriptor_ptr->unkC * phi_f0; - obj->unk4C->unk14 = 0x21; - obj->unk4C->unk11 = 2; - obj->unk4C->unk10 = 0x14; - obj->unk4C->unk12 = 0; - if (obj->unk3A >= obj->descriptor_ptr->unk55) { - obj->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C2E4.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C644.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003C7A4.s") - -void func_8003C9EC(Object *arg0, u8 *arg1) { - Object_64 *temp = arg0->unk64; - arg0->unk3A = arg1[8]; - arg0->y_rotation = arg1[9] << 6 << 4; - temp->unk0_a.unk0 = arg0->y_position; - arg0->unk4C->unk14 = 0x21; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - temp->unk4 = 0; - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003CA68.s") - -void func_8003CE64(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x14; - arg0->unk4C->unk12 = 0; - arg0->unk78 = arg1[8]; -} - -void func_8003CEA0(Object *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < 0x2D) { - func_8001E344(arg0->unk78); - } - arg0->unk4C->unk13 = (u8)0xFF; -} - -void func_8003CF00(s32 arg0, s32 arg1) { -} - -void func_8003CF0C(s32 arg0, s32 arg1) { -} - -void func_8003CF18(unk8003CF18 *arg0, u8 *arg1) { - f32 temp_f0; - temp_f0 = arg1[8] * 8.0f; - temp_f0 = temp_f0 * temp_f0; - arg0->unk78 = temp_f0; -} - -void func_8003CF58(Object *arg0, u8 *arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = arg1[9]; - arg0->unk78 = arg1[8]; - arg0->unk7C.word = arg1[9]; -} - -void func_8003CF98(Object *arg0, s32 arg1) { - if (arg0->unk4C->unk13 < arg0->unk7C.word) { - func_80028044(arg0->unk78); - } -} - -void func_8003CFE0(s32 arg0, u8 *arg1) { - if (arg1[9] == 0xFF) { - arg1[9] = func_8001C48C(arg0) & 0xFF; - } - func_8001D1BC(arg1[9]); - func_8001D1AC(); -} - -void func_8003D02C(s32 arg0, s32 arg1) { -} - -void func_8003D038(unk8003D038 *arg0, s8 *arg1) { - arg0->unk18 = 0x78; - arg0->unk78 = (arg1[8] - 1) & 3; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D058.s") - -void func_8003D2AC(s32 arg0, s32 arg1) { -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D2B8.s") - -void func_8003D3EC(unk8003D3EC *arg0, s32 arg1) { - arg0->unk18 = 0x64; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D3FC.s") - -void func_8003D534(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk7C.half.upper = 0x14; - arg0->unk7C.half.lower = 0x10; - if (get_filtered_cheats() & CHEAT_DISABLE_BANANAS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003D5A0.s") - -void func_8003DBA0(Object *obj, s32 arg1) { - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - obj->unk78 = 3; - obj->unk7C.word = 16; - if (!is_in_tracks_mode()) { - if (func_8000E1DC() && is_in_adventure_two()) { - obj->unk78 = 0; - } else { - obj->unk78 = 3; - } - } - if (obj->unk78 == 3) { - obj->unk6 |= 0x600; - gParticlePtrList_addObject(obj); - } -} - -void func_8003DC5C(Object *obj, s32 arg1) { - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - obj->unk78 = 3; - obj->unk7C.word = 0; - if (!is_in_tracks_mode()) { - if (func_8000E1DC() && !is_in_adventure_two()) { - obj->unk78 = 0; - } else { - obj->unk78 = 3; - } - } - if (obj->unk78 == 3) { - obj->unk6 |= 0x600; - gParticlePtrList_addObject(obj); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003DD14.s") - -void func_8003DE74(Object *obj, unk8003DE74 *arg1) { - Settings *settings; - obj->unk4C->unk14 = 2; - obj->unk4C->unk11 = 0; - obj->unk4C->unk10 = 0x1E; - arg1->unk8 &= 0xF; - obj->unk78 = arg1->unk8; - settings = get_settings(); - if (!is_in_tracks_mode() && !(settings->keys & (1 << obj->unk78))) { - return; - } - gParticlePtrList_addObject(obj); -} - -/** - * Rotates the key and checks to see if the player grabbed it. - */ -void obj_loop_world_key(Object *worldKeyObj, s32 speed) { - Settings *settings; - Object *playerObj; - - // Check if the player is near the key - // "worldKeyObj->unk4C->unk13" is the player's distance from the key (Up to 255). - if (worldKeyObj->unk4C->unk13 < WORLD_KEY_GRAB_CHECK_RADIUS) { - // "worldKeyObj->unk4C->unk0" is only set when the player is within 255 units of - // the key object, otherwise it is NULL. - playerObj = worldKeyObj->unk4C->unk0; - if (playerObj != NULL) { - if (playerObj->descriptor_ptr->unk54 == 1) { - Object_64_8003DF08 *obj64 = playerObj->unk64; - if (obj64->unk0 != -1) { - // Player has grabbed the key! - play_sound(SOUND_WORLD_KEY_GRAB); - settings = get_settings(); - settings->keys |= 1 << worldKeyObj->unk78; // Set key flag - gParticlePtrList_addObject(worldKeyObj); // Makes the key unload. - } - } - } - } - - // Rotate world key - worldKeyObj->y_rotation += speed * 256; -} - -typedef struct Object_64_8003DFCC { - f32 unk0; - s16 unk4; - char unk6[0x2]; - u8 unk8; - u8 unk9; - u8 unkA; -} Object_64_8003DFCC; - -void func_8003DFCC(Object *arg0, Object_64_8003DFCC *arg1) { - s32 cheats; - Object_64_8003DFCC *obj; - f32 temp; - - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 4; - arg0->unk4C->unk10 = 0x14; - - cheats = get_filtered_cheats(); - - if (cheats & CHEAT_ALL_BALLOONS_ARE_BLUE) { - arg1->unk9 = 0; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RED) { - arg1->unk9 = 1; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_GREEN) { - arg1->unk9 = 2; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_YELLOW) { - arg1->unk9 = 3; - } else if (cheats & CHEAT_ALL_BALLOONS_ARE_RAINBOW) { - arg1->unk9 = 4; - } - - if (arg1->unk8 >= 6) { - arg1->unk8 = 0; - } - - if (arg0->unk3A >= arg0->descriptor_ptr->unk55) { - arg0->unk3A = 0; - } - - arg0->unk3A = arg1->unk9; - arg0->unk78 = arg0->unk3A; - - temp = arg1->unkA & 0xFF; - if (temp < 10) { - temp = 10; - } - temp /= 64; - - obj = (Object_64_8003DFCC*)arg0->unk64; - - arg0->scale = arg0->descriptor_ptr->unkC * temp; - obj->unk0 = arg0->scale; - obj->unk4 = 0; - arg0->unk7C.word = 0; - - if (get_filtered_cheats() & CHEAT_DISABLE_WEAPONS) { - gParticlePtrList_addObject(arg0); - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E140.s") - -void func_8003E5B0(s32 arg0, s32 arg1) { -} - -void func_8003E5BC(s32 arg0, s32 arg1) { -} - -void func_8003E5C8(Object *arg0, s32 arg1) { - arg0->unk4C->unk14 = 2; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x18; - arg0->unk4C->unk12 = 0; - arg0->unk78 = func_8000C8B4(0x1E0); - arg0->unk7C.word = 0; -} - -void func_8003E630(Object *arg0) { - Object_64 *temp = arg0->unk64; - switch (temp->unk18) { - case 0: - case 1: - func_8003E694(); - break; - case 2: - case 3: - case 10: - case 11: - func_8003F2E8(); - break; - } - return; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003E694.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EC14.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003EDD8.s") - -void func_8003F0D0(void) { - D_8011D4DC = 0; -} - -void func_8003F0DC(void) { - D_8011D4DC--; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F0F8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003F2E8.s") - -#ifdef NON_EQUIVALENT -// Regalloc issues -void func_8003FC44(f32 arg0, f32 arg1, f32 arg2, s32 arg3, s32 arg4, f32 arg5, s32 arg6) { - Object *someObj; - unk8003FC44 sp24; - - sp24.unk4 = (s32)arg1 + 0x24; - sp24.unk1 = 0xA; - sp24.unk2 = arg0; - sp24.unk0 = arg3; - sp24.unk7 = arg6; - sp24.unk6 = arg2; - someObj = func_8000EA54(&sp24, 1); - if (someObj != NULL) { - someObj->scale *= 3.5 * arg5; - someObj->unk3C_a.unk3C = NULL; - someObj->x_velocity = 0.0f; - someObj->y_velocity = 0.0f; - someObj->z_velocity = 0.0f; - } - if (arg4 != 0) { - func_80009558(arg4, arg0, arg1, arg2, 4, 0); - } -} -#else -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FC44.s") -#endif - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_8003FD68.s") - -void func_8003FEF4(Object *arg0, LevelObjectEntry8003FEF4 *arg1) { - Object_64_8003FEF4 *obj64; - - obj64 = arg0->unk64; - obj64->unk0 = arg1->unk8; - obj64->unk2 = arg1->unkA; - obj64->unkC = arg1->unkC; - obj64->unkD = arg1->unkD; - obj64->unk_union.unk8_word = 0; - obj64->unk4 = arg1->unkE; - obj64->unk11 = arg1->unk12; - obj64->unk10 = arg1->unk11; - obj64->unkE = arg1->unk9; - obj64->unkF = arg1->unk10; - obj64->unk12 = arg1->unk13; - func_800098A4(obj64->unk0, obj64->unk2, arg1->common.x, arg1->common.y, arg1->common.z, - obj64->unkF, obj64->unkE, obj64->unk10, obj64->unk12, obj64->unk4, obj64->unk11, - obj64->unkC, obj64->unkD); - gParticlePtrList_addObject(arg0); -} - -void func_8004001C(Object *arg0, LevelObjectEntry8004001C *entry) { - s32 temp; - Object_64_8004001C *obj64 = (Object_64_8004001C *)arg0->unk64; - obj64->unk2 = entry->unk8; - temp = entry->unk9; - obj64->unk4 = temp & 0xFF; - obj64->unk5 = entry->unkA; - func_80009968(entry->common.x, entry->common.y, entry->common.z, obj64->unk2, obj64->unk4, obj64->unk5); - gParticlePtrList_addObject(arg0); -} - -void func_800400A4(Object *obj, LevelObjectEntry800400A4 *arg1, s32 arg2) { - Object_64_800400A4 *obj64; - LevelModel *levelModel; - s16 numberOfTexturesInLevel; - - obj64 = obj->unk64; - levelModel = func_8002C7C4(); - obj64->unk0 = arg1->unk8; - if (obj64->unk0 < 0) { - obj64->unk0 = 0; - } - numberOfTexturesInLevel = levelModel->numberOfTextures; - if (obj64->unk0 >= numberOfTexturesInLevel) { - obj64->unk0 = numberOfTexturesInLevel - 1; - } - obj64->unk4 = (s16)arg1->unkA; - obj64->unk6 = (s16)arg1->unkB; - if (arg2 == 0) { - obj64->unk8 = 0; - obj64->unkA = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040148.s") - -void func_800403A8(Object *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_80031CAC(arg0, arg1); -} - -void func_800403D8(Object *arg0, s32 arg1, s32 arg2) { - arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 0; - arg0->unk4C->unk10 = 0x1E; - arg0->unk4C->unk12 = 0; -} - -void func_80040448(Object *arg0, s32 arg1) { - if (arg0->unk64 != NULL) { - arg0->y_position = func_800BEEB4(arg0->unk64); - } - arg0->unk18 += arg1 * 8; -} - -void func_8004049C(Object *arg0, LevelObjectEntry8004049C *arg1, s32 arg2) { - f32 phi_f0; - arg0->unk64 = func_800BE654(arg0->unk2E, arg0->x_position, arg0->z_position); - arg0->unk4C->unk14 = 1; - arg0->unk4C->unk11 = 2; - arg0->unk4C->unk10 = 0x1E; - phi_f0 = arg1->unk9 & 0xFF; - if (phi_f0 < 10.0f) { - phi_f0 = 10.0f; - } - phi_f0 /= 64; - arg0->scale = arg0->descriptor_ptr->unkC * phi_f0; - arg0->unk3A = arg1->unk8; - arg0->y_rotation = arg1->unkA << 6 << 4; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040570.s") - -void func_80040800(unk80040800 *arg0, s16 *arg1) { - f32 temp = arg1[4]; - temp *= temp; - arg0->unk78 = temp; -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040820.s") - -void func_8004092C(s32 arg0, s32 arg1) { - func_800AC8A8(arg0); -} - -void func_8004094C(Object *arg0, s16 *arg1, s32 arg2) { - func_800ACF60(arg0); - arg0->scale = arg1[4]; - arg0->scale /= 40.0f; -} - -void func_800409A4(s32 arg0, s32 arg1, s32 arg2) { - func_800BF524(arg0); //waves.c -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800409C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80040C54.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041A90.s") -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80041E80.s") - -void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1) { - unk80042014_arg0_64 *temp = arg0->unk64; - temp->unk0 = arg1->unk8; - temp->unk2 = arg1->unkA; - temp->unk3 = arg1->unkB; -} - -void func_8004203C(Object *arg0, unk8004203C_arg1 *arg1) { - func_800AF134(arg0->unk6C, arg1->unk9, arg1->unk8, 0, 0, 0); - arg0->unk78 = arg1->unkA; -} - -void func_80042090(Object *arg0, s32 arg1) { - if (arg0->unk78 >= get_random_number_from_range(0, 0x400)) { - arg0->unk74 = 1; - } else { - arg0->unk74 = 0; - } - if (get_number_of_active_players() < 2) { - func_800AFC3C(arg0, arg1); - } -} - -void func_8004210C(unk8004210C *arg0, s8 *arg1) { - arg0->unk64 = (s32)get_misc_asset(0x14) + (arg1[8] << 7); - arg0->unk3C = 0; -} - -void func_80042150(s32 arg0, s32 arg1, s32 arg2) { -} - -void func_80042160(s32 arg0, s32 arg1) { -} - -void func_8004216C(s32 arg0, s32 arg1) { -} - -void func_80042178(Object *obj, s32 arg1) { - s32 temp; - Object_3C_80042178 *obj3C; - unk80042178 sp20; - - obj3C = obj->unk3C_a.unk3C; - if (func_80016DE8(obj->x_position, 0, obj->z_position, (f32)obj3C->unk8, 1, &sp20) > 0) { - obj->unk74 = obj3C->unkA; - } else { - obj->unk74 = 0; - } - func_800AFC3C(obj, arg1); -} - -void func_80042210(Object *obj, LevelObjectEntry80042210 *arg1) { - Object_64_80042210 *obj64; - - obj64 = (Object_64_80042210 *)obj->unk64; - obj64->unk15 = arg1->unkA; - obj64->unk0 = obj->x_position; - obj64->unk4 = obj->y_position; - obj64->unk8 = obj->z_position; - obj64->unkC = arg1->unk8; - obj64->unk10 = obj64->unkC * obj64->unkC; - obj64->unk14 = 0; - obj64->unk20 = obj->x_position; - obj64->unk24 = obj->z_position; - obj64->unk19 = 0; - obj64->unk30 = 1.0f; - - if (obj64->unk15) { - obj->unk3A = 1; - if (is_drumstick_unlocked() || (get_settings()->trophies & 0xFF) != 0xFF) { - gParticlePtrList_addObject(obj); - } - } else { - obj->unk3A = 0; - } -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_800422F0.s") - -void func_80042998(s32 arg0, s32 arg1) { - Object *obj; - Object_64_80042998 *obj64; - - func_8001F460(arg0, arg1, arg0); - obj = func_8000BF44(-1); - - if (obj != NULL) { - obj64 = obj->unk64; - obj->unk78 = 0; - if (obj64 != 0) { - obj64->unk72 += arg1; - obj64->unk70 = 2; - obj64->unk74 = 1.0f; - func_8000B750(arg0, -1, 2, 1, 1); - } - } -} - -void func_80042A1C(unk80042A1C *arg0, s8 *arg1) { - arg0->unk78 = arg1[9] * 8.0f; - arg0->unk78 *= arg0->unk78; - arg0->unk7C = arg1[8]; - arg0->unk7E = 0; - if (is_in_tracks_mode()) { - gParticlePtrList_addObject(arg0); - } - func_800C56D0(4); -} - -GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80042A90.s") - -void func_80042CD0(unk80042CD0 *arg0, s32 arg1) { - func_8001F460(arg0, arg1, arg0); - arg0->unk18 = (arg0->unk18 + (arg1 * 8)) & 0xFF; -} diff --git a/src/unknown_0348C0.h b/src/unknown_0348C0.h deleted file mode 100644 index a753f56a..00000000 --- a/src/unknown_0348C0.h +++ /dev/null @@ -1,587 +0,0 @@ -#ifndef _UNKNOWN_0348C0_H_ -#define _UNKNOWN_0348C0_H_ - -#include "types.h" -#include "structs.h" - -#define WORLD_KEY_GRAB_CHECK_RADIUS 50 -#define SOUND_WORLD_KEY_GRAB 54 - -typedef struct Object78_80033DD0 { - s32 *unk0; - s16 unk4; - s16 unk6; -} Object78_80033DD0; - -typedef struct unk80034530 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - s8 unkA; - s8 unkB; - u8 unkC; - u8 unkD; -} unk80034530; - -typedef struct unk80034B4C { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk80034B4C; - -typedef struct unk8003564C { - s8 unk0; - s8 unk1; - s16 unk2; - s16 unk4; - s16 unk6; -} unk8003564C; - -typedef struct Object_64_8003564C { - u8 pad0[4]; - Object *unk4; -} Object_64_8003564C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8003572C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003572C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8003588C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003588C; - -typedef struct unk80035E20 { - u8 pad0[0x40]; - s32 unk40; - u8 pad44[0x34]; - s32 unk78; - s32 unk7C; -} unk80035E20; - -typedef struct Object_64_80035E34 { - u8 pad0[0x1D6]; - s8 unk1D6; -} Object_64_80035E34; - -typedef struct unk80035EF8 { - u8 pad0[0xA]; - s16 unkA; - s16 unkC; - s16 unkE; -} unk80035EF8; - -typedef struct Object_64_80035F6C { - s32 unk0; - s32 unk4; - s32 unk8; - s32 unkC; - s32 unk10; - s32 unk14; - s32 unk18; - s32 unk1C; - s16 *unk20; - u8 *unk24; -} Object_64_80035F6C; - -typedef struct Object_64_80035F6C_2 { - u8 pad0[3]; - s8 unk3; -} Object_64_80035F6C_2; - -typedef struct unk80037578 { - u8 pad0[0x78]; - s32 unk78; - s32 unk7C; -} unk80037578; - -typedef struct unk80037624 { - u8 pad0[6]; - s16 unk6; -} unk80037624; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry800376E0 { - LevelObjectEntryCommon common; - s8 unk8; - s8 unk9; - s8 unkA; -} LevelObjectEntry800376E0; - -typedef struct Object_64_800376E0 { - s16 segmentId; - s16 unk2; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; -} Object_64_800376E0; - -typedef struct unk80037D08_arg0_64 { - u8 pad0[0x2A]; - s16 unk2A; -} unk80037D08_arg0_64; - -typedef struct unk80037D08_arg0 { - u8 pad0[0x64]; - unk80037D08_arg0_64 *unk64; -} unk80037D08_arg0; - -// Not sure if Object_60 differs between objects yet. -typedef struct Object_60_800380F8 { - s32 unk0; - Object *unk4; - s32 pad8; - Object *unkC; -} Object_60_800380F8; - -typedef struct Object_64_8003827C { - u8 pad0[0x20]; - s32 unk20; - s16 unk24; - u8 pad28[0x12]; - s8 unk38; -} Object_64_8003827C; - -typedef struct Object_64_80038710 { - u8 pad0[0x30]; - s8 unk30; - u8 pad31[0x13]; - s8 unk44; -} Object_64_80038710; - -typedef struct Object_64_800387CC { - u8 pad0[0x148]; - Object *unk148; -} Object_64_800387CC; - -typedef struct Object_64_800388D4 { - s16 unk0; -} Object_64_800388D4; - -typedef struct unk80038B74 { - u8 pad0[8]; - s8 unk8; -} unk80038B74; - -typedef struct Object_3C_80038DC4 { - u8 pad0[8]; - s8 unk8; -} Object_3C_80038DC4; - -typedef struct LevelObjectEntry80038E3C { - LevelObjectEntryCommon common; - u8 pad8[8]; - u8 unk10; - u8 unk11; - u8 pad12[6]; - s8 unk18; -} LevelObjectEntry80038E3C; - -typedef struct Object_64_80038E3C { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - s32 unk10; - s8 unk14; -} Object_64_80038E3C; - -typedef struct unk80039160 { - u8 pad0[0x78]; - s32 unk78; -} unk80039160; - -typedef struct unk80039190 { - u16 unk0; - u8 pad2[0x76]; - s32 unk78; - s32 unk7C; -} unk80039190; - -typedef struct LevelObjectEntry8003AD34 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8003AD34; - -typedef struct Object_64_8003AD34 { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - s32 unk10; - s8 unk14; -} Object_64_8003AD34; - -typedef struct LevelObjectEntry8003C1E0 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; - u8 unkB; - u8 unkC; - u8 padD; - s8 unkE; -} LevelObjectEntry8003C1E0; - -typedef struct Object_64_8003C1E0 { - f32 unk0; - u8 pad4[4]; - s32 unk8; - u8 padC[3]; - s8 unkF; - u8 pad10[2]; - u8 unk12; - u8 unk13; -} Object_64_8003C1E0; - -typedef struct unk8003CF18 { - u8 pad1A[0x78]; - f32 unk78; -} unk8003CF18; - -typedef struct unk8003D038 { - u8 pad0[0x18]; - s16 unk18; - u8 pad1A[0x5E]; - s32 unk78; -} unk8003D038; - -typedef struct unk8003D3EC { - u8 pad0[0x18]; - u16 unk18; -} unk8003D3EC; - -typedef struct unk8003DE74 { - u8 pad0[8]; - u8 unk8; -} unk8003DE74; - -typedef struct Object_64_8003DF08 { - s16 unk0; -} Object_64_8003DF08; - -typedef struct unk8003FC44 { - s8 unk0; - s8 unk1; - s16 unk2; - s16 unk4; - s16 unk6; - s8 unk7; -} unk8003FC44; - - -typedef struct Object_64_8003FEF4 { - u8 unk0; - u8 pad1; - u16 unk2; - u16 unk4; - u16 unk6; - union { - struct { - u8 unk8; - u8 unk9; - u8 unkA; - u8 padB; - } unk_struct; - s32 unk8_word; - } unk_union; - u8 unkC; - u8 unkD; - u8 unkE; - u8 unkF; - u8 unk10; - u8 unk11; - u8 unk12; -} Object_64_8003FEF4; - -typedef struct LevelObjectEntry8003FEF4 { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u16 unkA; - u8 unkC; - u8 unkD; - u16 unkE; - u8 unk10; - u8 unk11; - u8 unk12; - u8 unk13; -} LevelObjectEntry8003FEF4; - -typedef struct LevelObjectEntry8004001C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8004001C; - -typedef struct Object_64_8004001C { - u16 pad0; - s16 unk2; - u8 unk4; - u8 unk5; -} Object_64_8004001C; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry800400A4 { - LevelObjectEntryCommon common; - s16 unk8; - s8 unkA; - s8 unkB; -} LevelObjectEntry800400A4; - -typedef struct Object_64_800400A4 { - s16 unk0; - s16 pad2; - s16 unk4; - s16 unk6; - s16 unk8; - s16 unkA; -} Object_64_800400A4; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry8004049C { - LevelObjectEntryCommon common; - u8 unk8; - u8 unk9; - u8 unkA; -} LevelObjectEntry8004049C; - -typedef struct unk80040800 { - u8 pad0[0x78]; - f32 unk78; -} unk80040800; - -typedef struct unk80042014_arg0_64 { - u16 unk0; - u8 unk2; - u8 unk3; -} unk80042014_arg0_64; - -typedef struct unk80042014_arg0 { - u8 pad0[0x64]; - unk80042014_arg0_64 *unk64; -} unk80042014_arg0; - -typedef struct unk80042014_arg1 { - u8 pad0[8]; - u16 unk8; - u8 unkA; - u8 unkB; -} unk80042014_arg1; - -typedef struct unk8004210C { - u8 pad0[0x3C]; - s32 unk3C; - u8 pad40[0x24]; - s32 unk64; -} unk8004210C; - -typedef struct Object_3C_80042178 { - u8 pad0[8]; - u16 unk8; - u16 unkA; -} Object_3C_80042178; - -typedef struct unk8004203C_arg1 { - u8 pad0[0x8]; - u8 unk8; - u8 unk9; - u16 unkA; -} unk8004203C_arg1; - -/* Size: 12 bytes */ -typedef struct LevelObjectEntry80042210 { - LevelObjectEntryCommon common; - s16 unk8; - u8 unkA; -} LevelObjectEntry80042210; - -typedef struct Object_64_80042210 { - f32 unk0; - f32 unk4; - f32 unk8; - f32 unkC; - f32 unk10; - u8 unk14; - u8 unk15; - u8 pad16[3]; - u8 unk19; - u8 pad1A[6]; - f32 unk20; - f32 unk24; - u8 pad28[8]; - f32 unk30; -} Object_64_80042210; - -typedef struct Object_64_80042998 { - u8 pad0[0x70]; - u8 unk70; - u8 pad71; - u8 unk72; - u8 pad73; - f32 unk74; -} Object_64_80042998; - -typedef struct unk80042A1C { - u8 pad0[0x78]; - f32 unk78; - s16 unk7C; - s16 unk7E; -} unk80042A1C; - -typedef struct unk80042CD0 { - u8 pad0[0x18]; - s16 unk18; -} unk80042CD0; - -// Unsure about the signed/unsigned with these arrays. -extern u16 D_800DC970[4]; -extern u16 D_800DC978[4]; -extern u16 D_800DC980[20]; -extern u16 D_800DC9A8[20]; -extern u16 D_800DC9D0[64]; -extern s8 D_800DCA50[8]; -extern u8 D_800DCA58[9]; -extern s8 D_800DCA64[9]; -extern s8 D_800DCA70[10]; -extern s32 D_800DCA7C[3]; -extern s32 D_800DCA88[3]; -extern s8 D_800DCA94[8]; -extern s8 D_800DCA9C[12]; -extern u16 D_800DCAA8[64]; -extern u16 D_800DCB28[20]; -extern u32 osTvType; - -f32 func_800707C4(s16); // No idea where it's located -f32 func_800707F8(s16); // No idea where it's located -s32 get_random_number_from_range(s32, s32); // Non Matching src/unknown_070110.c -s32 func_8007066C(s32, s32); // Non Matching src/unknown_070110.c - -void func_80033F44(Object *arg0, s32 arg1); -void func_80034530(Object *arg0, unk80034530 *arg1); -void func_80034844(Object *arg0, s32 arg1); -void func_80034AF0(Object *arg0, u8 *arg1); -void func_80034B4C(unk80034B4C *arg0, s32 arg1); -void func_80034B68(s32 arg0, s32 arg1); -void func_80034E70(Object *arg0, u8 *arg1); -void func_8003522C(Object *arg0, s32 arg1); -void func_80035640(s32 arg0, s32 arg1); -void func_8003564C(Object *arg0, s32 arg1); -void func_8003572C(Object *arg0, LevelObjectEntry8003572C *arg1); -void func_800357D4(Object *obj, s32 arg1); -void func_8003588C(Object *arg0, LevelObjectEntry8003588C *arg1); -void func_80035E20(unk80035E20 *arg0, s32 arg1); -void func_80035E34(Object *obj, s32 arg1); -void func_80035EF8(Object *arg0, unk80035EF8 *arg1); -void func_80035F6C(Object *obj, s32 arg1); -void func_80036194(Object *arg0, s32 arg1); -void func_80036BCC(u16 arg0, s32 arg1); -void func_80037578(unk80037578 *arg0, u8 *arg1); -void func_80037624(unk80037624 *arg0, s32 arg1); -void func_800376E0(Object *arg0, LevelObjectEntry800376E0 *arg1, s32 arg2); -void func_80037CE8(s32 arg0, s32 arg1); -void func_80037D08(unk80037D08_arg0 *arg0, s32 arg1); -void func_80037D54(s32 arg0, s32 arg1); -void func_80037D60(s32 arg0, s32 arg1); -void func_80037D6C(s32 arg0, s32 arg1); -void func_8003818C(Object *arg0, s32 arg1); -void func_800381C0(s32 arg0, s32 arg1); -void func_800381E0(Object *arg0, s32 arg1); -void func_80038214(Object *arg0, s32 arg1); -void func_80038248(Object *arg0, s32 arg1); -void func_80038330(Object *obj, s32 arg1); -void func_80038710(Object *obj, s32 arg1); -void func_800387C0(Object *obj, s32 arg1); -void func_800387CC(Object *obj, s32 arg1); -void func_80038854(Object *arg0, u8 *arg1); -void func_800388D4(Object *arg0, s32 arg1); -void func_800389AC(s32 arg0, s32 arg1); -void func_800389B8(Object *obj, s32 arg1); -void func_80038A6C(s32 arg0, s32 arg1); -void func_80038A78(Object *arg0, s32 arg1); -void func_80038AC8(s32 arg0, s32 arg1); -void func_80038AD4(Object *arg0, s32 arg1); -void func_80038D58(Object *arg0, s32 arg1); -void func_80038DC4(Object *arg0, s32 arg1); -void func_80038E3C(Object *obj, LevelObjectEntry80038E3C *arg1); -void func_80039160(unk80039160 *arg0, s8 *arg1); -void func_80039184(s32 arg0, s32 arg1); -void func_80039190(unk80039190 *arg0, u8 *arg1); -void func_800391BC(s32 arg0, s32 arg1); -void func_800391C8(Object *arg0, s32 arg1); -void func_800391FC(Object *obj, s32 arg1); -void func_800392B8(Object *arg0, s32 arg1); -void func_80039320(s16 arg0); -void func_8003AC3C(u16 arg0, s32 arg1); -void func_8003ACA0(s32 arg0, s32 arg1); -f32 func_8003ACAC(void); -void func_8003ACBC(Object *arg0, u8 *arg1, s32 arg2); -void func_8003AD28(s32 arg0, s32 arg1); -void func_8003AD34(Object *obj, LevelObjectEntry8003AD34 *arg1); -void func_8003B058(Object *obj, LevelObjectEntry8003AD34 *arg1); -void func_8003C1E0(Object *obj, LevelObjectEntry8003C1E0 *arg1); -void func_8003C9EC(Object *arg0, u8 *arg1); -void func_8003CE64(Object *arg0, u8 *arg1); -void func_8003CEA0(Object *arg0, s32 arg1); -void func_8003CF00(s32 arg0, s32 arg1); -void func_8003CF0C(s32 arg0, s32 arg1); -void func_8003CF18(unk8003CF18 *arg0, u8 *arg1); -void func_8003CF58(Object *arg0, u8 *arg1); -void func_8003CF98(Object *arg0, s32 arg1); -void func_8003CFE0(s32 arg0, u8 *arg1); -void func_8003D02C(s32 arg0, s32 arg1); -void func_8003D038(unk8003D038 *arg0, s8 *arg1); -void func_8003D2AC(s32 arg0, s32 arg1); -void func_8003D3EC(unk8003D3EC *arg0, s32 arg1); -void func_8003D534(Object *arg0, s32 arg1); -void func_8003DBA0(Object *obj, s32 arg1); -void func_8003DC5C(Object *obj, s32 arg1); -void func_8003DE74(Object *obj, unk8003DE74 *arg1); -void obj_loop_world_key(Object *worldKeyObj, s32 speed); -void func_8003E5B0(s32 arg0, s32 arg1); -void func_8003E5BC(s32 arg0, s32 arg1); -void func_8003E5C8(Object *arg0, s32 arg1); -void func_8003E630(Object *arg0); -void func_8003F0D0(void); -void func_8003F0DC(void); -void func_8003FEF4(Object *arg0, LevelObjectEntry8003FEF4 *arg1); -void func_8004001C(Object *arg0, LevelObjectEntry8004001C *entry); -void func_800400A4(Object *obj, LevelObjectEntry800400A4 *arg1, s32 arg2); -void func_800403A8(Object *arg0, s32 arg1, s32 arg2); -void func_800403D8(Object *arg0, s32 arg1, s32 arg2); -void func_80040448(Object *arg0, s32 arg1); -void func_8004049C(Object *arg0, LevelObjectEntry8004049C *arg1, s32 arg2); -void func_800409A4(s32 arg0, s32 arg1, s32 arg2); -void func_80042014(unk80042014_arg0 *arg0, unk80042014_arg1 *arg1); -void func_8004203C(Object *arg0, unk8004203C_arg1 *arg1); -void func_80042090(Object *arg0, s32 arg1); -void func_8004210C(unk8004210C *arg0, s8 *arg1); -void func_80042150(s32 arg0, s32 arg1, s32 arg2); -void func_80042160(s32 arg0, s32 arg1); -void func_8004216C(s32 arg0, s32 arg1); -void func_80042178(Object *obj, s32 arg1); -void func_80042210(Object *obj, LevelObjectEntry80042210 *arg1); -void func_80042998(s32 arg0, s32 arg1); -void func_80042A1C(unk80042A1C *arg0, s8 *arg1); -void func_80042CD0(unk80042CD0 *arg0, s32 arg1); - -//Non Matching -void func_80037594(Object *obj, s32 arg1); -void func_800377E4(Object *obj, s32 arg1); -void func_800380F8(Object *obj, s32 arg1); -void func_8003827C(Object *obj, s32 arg1); -void func_8003B4BC(s32 arg0); - -#endif diff --git a/src/unknown_0ABDF0.c b/src/unknown_0ABDF0.c index 1a5b41d9..487d2e3e 100644 --- a/src/unknown_0ABDF0.c +++ b/src/unknown_0ABDF0.c @@ -166,7 +166,7 @@ Object *D_80127C40[16]; /******************************/ -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB1F0.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB1F0.s") void func_800AB308(s16 arg0, s16 arg1) { if (D_80127BF8.unk2 < D_80127BF8.unk0) { @@ -178,14 +178,14 @@ void func_800AB308(s16 arg0, s16 arg1) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB35C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AB4A8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABB34.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABC5C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ABE68.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC0C8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC21C.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC5A4.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB35C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AB4A8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABB34.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABC5C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ABE68.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC0C8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC21C.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC5A4.s") void func_800AC880(s32 arg0) { if (arg0 == D_800E2A80) { @@ -194,8 +194,8 @@ void func_800AC880(s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AC8A8.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ACA20.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AC8A8.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ACA20.s") void func_800ACF60(Object *arg0) { if (D_800E2A88 < 0x10) { @@ -224,8 +224,8 @@ void func_800ACF98(Object* arg0) { } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD030.s") -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD144.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD030.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD144.s") void func_800AD220(void) { if (D_800E2C2C[0].tex != NULL) { @@ -304,7 +304,7 @@ void func_800AD4B8(s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800AD658.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800AD658.s") void func_800ADAB8(s32 arg0) { if (D_800E2C80 > 0) { @@ -348,4 +348,4 @@ void func_800ADBC8(UNUSED s32 arg0) { } } -GLOBAL_ASM("asm/non_matchings/unknown_09F8F0/func_800ADCBC.s") +GLOBAL_ASM("asm/non_matchings/game_ui/func_800ADCBC.s") diff --git a/src/waves.c b/src/waves.c index 3a7be0b6..30a5f224 100644 --- a/src/waves.c +++ b/src/waves.c @@ -248,4 +248,4 @@ GLOBAL_ASM("asm/non_matchings/waves/func_800BF3E4.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BF524.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BF634.s") GLOBAL_ASM("asm/non_matchings/waves/func_800BFE98.s") -GLOBAL_ASM("asm/non_matchings/waves/func_800BFFDC.s") +GLOBAL_ASM("asm/non_matchings/waves/obj_loop_wavepower.s") diff --git a/tools/python/calc_func_checksums.py b/tools/python/calc_func_checksums.py index 1bca8970..ac121757 100644 --- a/tools/python/calc_func_checksums.py +++ b/tools/python/calc_func_checksums.py @@ -14,7 +14,7 @@ FUNCTIONS_TO_CALC = [ # function checksum variable func size variable ('func_80019808', 'gFunc80019808Checksum', 'gFunc80019808Length'), ('func_80024D54', 'gFunc80024D54Checksum', 'gFunc80024D54Length'), - ('func_8003B4BC', 'gFunc8003B4BCChecksum', 'gFunc8003B4BCLength'), + ('obj_loop_goldenballoon', 'gObjLoopGoldenBalloonChecksum', 'gObjLoopGoldenBalloonLength'), ('func_80068158', 'gFunc80068158Checksum', 'gFunc80068158Length') ]