diff --git a/config/GMPE01_00/rels/m443Dll/splits.txt b/config/GMPE01_00/rels/m443Dll/splits.txt index ff3f7391..b9a84a24 100644 --- a/config/GMPE01_00/rels/m443Dll/splits.txt +++ b/config/GMPE01_00/rels/m443Dll/splits.txt @@ -17,11 +17,11 @@ REL/m443Dll/main.c: REL/m443Dll/map.c: .text start:0x00004A5C end:0x00005444 - .rodata start:0x000001F0 end:0x00000278 + .rodata start:0x000001F0 end:0x00000268 .data start:0x00000240 end:0x00000258 REL/m443Dll/player.c: .text start:0x00005444 end:0x00009638 - .rodata start:0x00000278 end:0x000004E0 + .rodata start:0x00000268 end:0x000004E0 .data start:0x00000258 end:0x000004F0 .bss start:0x00000078 end:0x000000A0 diff --git a/config/GMPE01_00/rels/m443Dll/symbols.txt b/config/GMPE01_00/rels/m443Dll/symbols.txt index 76a2059a..2c1f25ca 100644 --- a/config/GMPE01_00/rels/m443Dll/symbols.txt +++ b/config/GMPE01_00/rels/m443Dll/symbols.txt @@ -76,203 +76,205 @@ fn_1_8FFC = .text:0x00008FFC; // type:function size:0x5A8 fn_1_95A4 = .text:0x000095A4; // type:function size:0x94 _ctors = .ctors:0x00000000; // type:label scope:global data:4byte _dtors = .dtors:0x00000000; // type:label scope:global data:4byte -lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x4 data:float -lbl_1_rodata_14 = .rodata:0x00000014; // type:object size:0x4 data:float -lbl_1_rodata_18 = .rodata:0x00000018; // type:object size:0x4 data:float -lbl_1_rodata_1C = .rodata:0x0000001C; // type:object size:0x4 data:float -lbl_1_rodata_20 = .rodata:0x00000020; // type:object size:0x4 data:float -lbl_1_rodata_24 = .rodata:0x00000024; // type:object size:0x4 data:float -lbl_1_rodata_28 = .rodata:0x00000028; // type:object size:0x4 data:float -lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x4 data:float -lbl_1_rodata_30 = .rodata:0x00000030; // type:object size:0x4 data:float -lbl_1_rodata_34 = .rodata:0x00000034; // type:object size:0x4 data:float -lbl_1_rodata_38 = .rodata:0x00000038; // type:object size:0x4 data:float -lbl_1_rodata_3C = .rodata:0x0000003C; // type:object size:0x4 data:float -lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x4 data:float -lbl_1_rodata_44 = .rodata:0x00000044; // type:object size:0x4 data:float -lbl_1_rodata_48 = .rodata:0x00000048; // type:object size:0x4 data:float -lbl_1_rodata_4C = .rodata:0x0000004C; // type:object size:0x4 data:float -lbl_1_rodata_50 = .rodata:0x00000050; // type:object size:0x4 data:float -lbl_1_rodata_54 = .rodata:0x00000054; // type:object size:0x4 data:float -lbl_1_rodata_58 = .rodata:0x00000058; // type:object size:0x4 data:float -lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x8 data:double -lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x4 data:float -lbl_1_rodata_6C = .rodata:0x0000006C; // type:object size:0x4 data:float -lbl_1_rodata_70 = .rodata:0x00000070; // type:object size:0x4 data:float -lbl_1_rodata_74 = .rodata:0x00000074; // type:object size:0x4 data:float -lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x4 data:float -lbl_1_rodata_80 = .rodata:0x00000080; // type:object size:0x8 data:double -lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x4 data:float -lbl_1_rodata_8C = .rodata:0x0000008C; // type:object size:0x4 data:float -lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x4 data:float -lbl_1_rodata_94 = .rodata:0x00000094; // type:object size:0x4 data:float -lbl_1_rodata_98 = .rodata:0x00000098; // type:object size:0x4 data:float -lbl_1_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 data:float -lbl_1_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 data:float -lbl_1_rodata_A4 = .rodata:0x000000A4; // type:object size:0x4 data:float -lbl_1_rodata_A8 = .rodata:0x000000A8; // type:object size:0x8 data:double -lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 data:float -lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x8 data:double -lbl_1_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 data:double -lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x8 data:double -lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x4 data:float -lbl_1_rodata_D8 = .rodata:0x000000D8; // type:object size:0x8 data:double -lbl_1_rodata_E0 = .rodata:0x000000E0; // type:object size:0x50 -lbl_1_rodata_130 = .rodata:0x00000130; // type:object size:0x14 data:4byte -lbl_1_rodata_144 = .rodata:0x00000144; // type:object size:0x4 data:float -lbl_1_rodata_148 = .rodata:0x00000148; // type:object size:0x4 data:float -lbl_1_rodata_14C = .rodata:0x0000014C; // type:object size:0x4 data:float -lbl_1_rodata_150 = .rodata:0x00000150; // type:object size:0x8 data:double -lbl_1_rodata_158 = .rodata:0x00000158; // type:object size:0x8 data:double -lbl_1_rodata_160 = .rodata:0x00000160; // type:object size:0x8 data:double -lbl_1_rodata_168 = .rodata:0x00000168; // type:object size:0x8 data:double -lbl_1_rodata_170 = .rodata:0x00000170; // type:object size:0x8 data:double -lbl_1_rodata_178 = .rodata:0x00000178; // type:object size:0x8 data:double -lbl_1_rodata_180 = .rodata:0x00000180; // type:object size:0x8 data:double -lbl_1_rodata_188 = .rodata:0x00000188; // type:object size:0x10 data:4byte -lbl_1_rodata_198 = .rodata:0x00000198; // type:object size:0x10 data:4byte -lbl_1_rodata_1A8 = .rodata:0x000001A8; // type:object size:0x4 data:float -lbl_1_rodata_1AC = .rodata:0x000001AC; // type:object size:0x4 data:float -lbl_1_rodata_1B0 = .rodata:0x000001B0; // type:object size:0x4 data:float -lbl_1_rodata_1B4 = .rodata:0x000001B4; // type:object size:0x4 data:float -lbl_1_rodata_1B8 = .rodata:0x000001B8; // type:object size:0x4 data:float -lbl_1_rodata_1BC = .rodata:0x000001BC; // type:object size:0x4 data:float -lbl_1_rodata_1C0 = .rodata:0x000001C0; // type:object size:0x4 data:float -lbl_1_rodata_1C4 = .rodata:0x000001C4; // type:object size:0x4 data:float -lbl_1_rodata_1C8 = .rodata:0x000001C8; // type:object size:0x4 data:float -lbl_1_rodata_1CC = .rodata:0x000001CC; // type:object size:0x4 data:float -lbl_1_rodata_1D0 = .rodata:0x000001D0; // type:object size:0x8 data:double -lbl_1_rodata_1D8 = .rodata:0x000001D8; // type:object size:0x8 data:double -lbl_1_rodata_1E0 = .rodata:0x000001E0; // type:object size:0x8 data:double -lbl_1_rodata_1E8 = .rodata:0x000001E8; // type:object size:0x4 data:float -lbl_1_rodata_1EC = .rodata:0x000001EC; // type:object size:0x4 data:float -lbl_1_rodata_1F0 = .rodata:0x000001F0; // type:object size:0x4 data:float -lbl_1_rodata_1F4 = .rodata:0x000001F4; // type:object size:0x4 data:float -lbl_1_rodata_1F8 = .rodata:0x000001F8; // type:object size:0xC data:4byte -lbl_1_rodata_204 = .rodata:0x00000204; // type:object size:0x34 data:4byte -lbl_1_rodata_238 = .rodata:0x00000238; // type:object size:0x8 data:double -lbl_1_rodata_240 = .rodata:0x00000240; // type:object size:0x8 data:double -lbl_1_rodata_248 = .rodata:0x00000248; // type:object size:0x4 data:float -lbl_1_rodata_24C = .rodata:0x0000024C; // type:object size:0x4 data:float -lbl_1_rodata_250 = .rodata:0x00000250; // type:object size:0x4 data:float -lbl_1_rodata_254 = .rodata:0x00000254; // type:object size:0x4 data:float -lbl_1_rodata_258 = .rodata:0x00000258; // type:object size:0x4 data:float -lbl_1_rodata_25C = .rodata:0x0000025C; // type:object size:0x4 data:float -lbl_1_rodata_260 = .rodata:0x00000260; // type:object size:0x8 data:double -lbl_1_rodata_268 = .rodata:0x00000268; // type:object size:0x10 data:4byte -lbl_1_rodata_278 = .rodata:0x00000278; // type:object size:0x4 data:float -lbl_1_rodata_27C = .rodata:0x0000027C; // type:object size:0x4 data:float -lbl_1_rodata_280 = .rodata:0x00000280; // type:object size:0x4 data:float -lbl_1_rodata_284 = .rodata:0x00000284; // type:object size:0x4 data:float -lbl_1_rodata_288 = .rodata:0x00000288; // type:object size:0x4 data:float -lbl_1_rodata_28C = .rodata:0x0000028C; // type:object size:0x4 data:float -lbl_1_rodata_290 = .rodata:0x00000290; // type:object size:0x4 data:float -lbl_1_rodata_294 = .rodata:0x00000294; // type:object size:0x4 data:float -lbl_1_rodata_298 = .rodata:0x00000298; // type:object size:0x4 data:float -lbl_1_rodata_29C = .rodata:0x0000029C; // type:object size:0x4 data:float -lbl_1_rodata_2A0 = .rodata:0x000002A0; // type:object size:0x8 data:double -lbl_1_rodata_2A8 = .rodata:0x000002A8; // type:object size:0x4 data:float -lbl_1_rodata_2AC = .rodata:0x000002AC; // type:object size:0x4 data:float -lbl_1_rodata_2B0 = .rodata:0x000002B0; // type:object size:0x4 data:float -lbl_1_rodata_2B4 = .rodata:0x000002B4; // type:object size:0x4 data:float -lbl_1_rodata_2B8 = .rodata:0x000002B8; // type:object size:0x4 data:float -lbl_1_rodata_2BC = .rodata:0x000002BC; // type:object size:0x4 data:float -lbl_1_rodata_2C0 = .rodata:0x000002C0; // type:object size:0x4 data:float -lbl_1_rodata_2C4 = .rodata:0x000002C4; // type:object size:0x4 data:float -lbl_1_rodata_2C8 = .rodata:0x000002C8; // type:object size:0x4 data:float -lbl_1_rodata_2CC = .rodata:0x000002CC; // type:object size:0x4 data:float -lbl_1_rodata_2D0 = .rodata:0x000002D0; // type:object size:0x4 data:float -lbl_1_rodata_2D4 = .rodata:0x000002D4; // type:object size:0x4 data:float -lbl_1_rodata_2D8 = .rodata:0x000002D8; // type:object size:0x8 data:double -lbl_1_rodata_2E0 = .rodata:0x000002E0; // type:object size:0x8 data:double -lbl_1_rodata_2E8 = .rodata:0x000002E8; // type:object size:0x8 data:double -lbl_1_rodata_2F0 = .rodata:0x000002F0; // type:object size:0x4 data:float -lbl_1_rodata_2F8 = .rodata:0x000002F8; // type:object size:0x8 data:double -lbl_1_rodata_300 = .rodata:0x00000300; // type:object size:0x8 data:double -lbl_1_rodata_308 = .rodata:0x00000308; // type:object size:0x8 data:double -lbl_1_rodata_310 = .rodata:0x00000310; // type:object size:0x4 data:float -lbl_1_rodata_314 = .rodata:0x00000314; // type:object size:0x4 data:float -lbl_1_rodata_318 = .rodata:0x00000318; // type:object size:0x4 data:float -lbl_1_rodata_31C = .rodata:0x0000031C; // type:object size:0x4 data:float -lbl_1_rodata_320 = .rodata:0x00000320; // type:object size:0x8 data:double -lbl_1_rodata_328 = .rodata:0x00000328; // type:object size:0x4 data:float -lbl_1_rodata_32C = .rodata:0x0000032C; // type:object size:0x4 data:float -lbl_1_rodata_330 = .rodata:0x00000330; // type:object size:0x4 data:float -lbl_1_rodata_334 = .rodata:0x00000334; // type:object size:0x40 data:4byte -lbl_1_rodata_374 = .rodata:0x00000374; // type:object size:0x10 data:4byte -lbl_1_rodata_384 = .rodata:0x00000384; // type:object size:0x10 data:4byte -lbl_1_rodata_394 = .rodata:0x00000394; // type:object size:0x4 data:float -lbl_1_rodata_398 = .rodata:0x00000398; // type:object size:0x4 data:float -lbl_1_rodata_39C = .rodata:0x0000039C; // type:object size:0x4 data:float -lbl_1_rodata_3A0 = .rodata:0x000003A0; // type:object size:0x4 data:float -lbl_1_rodata_3A4 = .rodata:0x000003A4; // type:object size:0x4 data:float -lbl_1_rodata_3A8 = .rodata:0x000003A8; // type:object size:0x4 data:float -lbl_1_rodata_3AC = .rodata:0x000003AC; // type:object size:0x4 data:float -lbl_1_rodata_3B0 = .rodata:0x000003B0; // type:object size:0x4 data:float -lbl_1_rodata_3B4 = .rodata:0x000003B4; // type:object size:0x4 data:float -lbl_1_rodata_3B8 = .rodata:0x000003B8; // type:object size:0x4 data:float -lbl_1_rodata_3BC = .rodata:0x000003BC; // type:object size:0x4 data:float -lbl_1_rodata_3C0 = .rodata:0x000003C0; // type:object size:0x4 data:float -lbl_1_rodata_3C4 = .rodata:0x000003C4; // type:object size:0x20 data:4byte -lbl_1_rodata_3E4 = .rodata:0x000003E4; // type:object size:0x4 data:float -lbl_1_rodata_3E8 = .rodata:0x000003E8; // type:object size:0x4 data:float -lbl_1_rodata_3EC = .rodata:0x000003EC; // type:object size:0x4 data:float -lbl_1_rodata_3F0 = .rodata:0x000003F0; // type:object size:0x4 data:float -lbl_1_rodata_3F4 = .rodata:0x000003F4; // type:object size:0x4 data:float -lbl_1_rodata_3F8 = .rodata:0x000003F8; // type:object size:0x4 data:float -lbl_1_rodata_3FC = .rodata:0x000003FC; // type:object size:0x4 data:float -lbl_1_rodata_400 = .rodata:0x00000400; // type:object size:0x4 data:float -lbl_1_rodata_404 = .rodata:0x00000404; // type:object size:0x4 data:float -lbl_1_rodata_408 = .rodata:0x00000408; // type:object size:0x4 data:float -lbl_1_rodata_40C = .rodata:0x0000040C; // type:object size:0x4 data:float -lbl_1_rodata_410 = .rodata:0x00000410; // type:object size:0x4 data:float -lbl_1_rodata_414 = .rodata:0x00000414; // type:object size:0x4 data:float -lbl_1_rodata_418 = .rodata:0x00000418; // type:object size:0x4 data:float -lbl_1_rodata_41C = .rodata:0x0000041C; // type:object size:0x4 data:float -lbl_1_rodata_420 = .rodata:0x00000420; // type:object size:0x4 data:float -lbl_1_rodata_428 = .rodata:0x00000428; // type:object size:0x8 data:double -lbl_1_rodata_430 = .rodata:0x00000430; // type:object size:0x4 data:float -lbl_1_rodata_434 = .rodata:0x00000434; // type:object size:0x4 data:float -lbl_1_rodata_438 = .rodata:0x00000438; // type:object size:0x4 data:float -lbl_1_rodata_43C = .rodata:0x0000043C; // type:object size:0x4 data:float -lbl_1_rodata_440 = .rodata:0x00000440; // type:object size:0x4 data:float -lbl_1_rodata_444 = .rodata:0x00000444; // type:object size:0x4 data:float -lbl_1_rodata_448 = .rodata:0x00000448; // type:object size:0x4 data:float -lbl_1_rodata_44C = .rodata:0x0000044C; // type:object size:0x4 data:float -lbl_1_rodata_450 = .rodata:0x00000450; // type:object size:0x4 data:float -lbl_1_rodata_454 = .rodata:0x00000454; // type:object size:0x4 data:float -lbl_1_rodata_458 = .rodata:0x00000458; // type:object size:0x8 data:double -lbl_1_rodata_460 = .rodata:0x00000460; // type:object size:0x8 data:double -lbl_1_rodata_468 = .rodata:0x00000468; // type:object size:0x4 data:float -lbl_1_rodata_46C = .rodata:0x0000046C; // type:object size:0x4 data:float -lbl_1_rodata_470 = .rodata:0x00000470; // type:object size:0x4 data:float -lbl_1_rodata_474 = .rodata:0x00000474; // type:object size:0x4 data:float -lbl_1_rodata_478 = .rodata:0x00000478; // type:object size:0x4 data:float -lbl_1_rodata_47C = .rodata:0x0000047C; // type:object size:0x4 data:float -lbl_1_rodata_480 = .rodata:0x00000480; // type:object size:0x4 data:float -lbl_1_rodata_484 = .rodata:0x00000484; // type:object size:0x4 data:float -lbl_1_rodata_488 = .rodata:0x00000488; // type:object size:0x4 data:float -lbl_1_rodata_48C = .rodata:0x0000048C; // type:object size:0x4 data:float -lbl_1_rodata_490 = .rodata:0x00000490; // type:object size:0x4 data:float -lbl_1_rodata_494 = .rodata:0x00000494; // type:object size:0x4 data:float -lbl_1_rodata_498 = .rodata:0x00000498; // type:object size:0x4 data:float -lbl_1_rodata_49C = .rodata:0x0000049C; // type:object size:0x4 data:float -lbl_1_rodata_4A0 = .rodata:0x000004A0; // type:object size:0x4 data:float -lbl_1_rodata_4A4 = .rodata:0x000004A4; // type:object size:0x4 data:float -lbl_1_rodata_4A8 = .rodata:0x000004A8; // type:object size:0x4 data:float -lbl_1_rodata_4AC = .rodata:0x000004AC; // type:object size:0x4 data:float -lbl_1_rodata_4B0 = .rodata:0x000004B0; // type:object size:0x4 data:float -lbl_1_rodata_4B4 = .rodata:0x000004B4; // type:object size:0x4 data:float -lbl_1_rodata_4B8 = .rodata:0x000004B8; // type:object size:0x4 data:float -lbl_1_rodata_4BC = .rodata:0x000004BC; // type:object size:0x4 data:float -lbl_1_rodata_4C0 = .rodata:0x000004C0; // type:object size:0x4 data:float -lbl_1_rodata_4C4 = .rodata:0x000004C4; // type:object size:0x4 data:float -lbl_1_rodata_4C8 = .rodata:0x000004C8; // type:object size:0x4 data:float -lbl_1_rodata_4CC = .rodata:0x000004CC; // type:object size:0x4 data:float -lbl_1_rodata_4D0 = .rodata:0x000004D0; // type:object size:0x4 data:float -lbl_1_rodata_4D4 = .rodata:0x000004D4; // type:object size:0x4 data:float -lbl_1_rodata_4D8 = .rodata:0x000004D8; // type:object size:0x4 data:float -lbl_1_rodata_4DC = .rodata:0x000004DC; // type:object size:0x4 data:float +__fakeHalf = .rodata:0x00000000; // type:object size:0x8 data:double +__fakeThree = .rodata:0x00000008; // type:object size:0x8 data:double +lbl_1_rodata_10 = .rodata:0x00000010; // type:object size:0x4 scope:local data:float +lbl_1_rodata_14 = .rodata:0x00000014; // type:object size:0x4 scope:local data:float +lbl_1_rodata_18 = .rodata:0x00000018; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1C = .rodata:0x0000001C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_20 = .rodata:0x00000020; // type:object size:0x4 scope:local data:float +lbl_1_rodata_24 = .rodata:0x00000024; // type:object size:0x4 scope:local data:float +lbl_1_rodata_28 = .rodata:0x00000028; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_30 = .rodata:0x00000030; // type:object size:0x4 scope:local data:float +lbl_1_rodata_34 = .rodata:0x00000034; // type:object size:0x4 scope:local data:float +lbl_1_rodata_38 = .rodata:0x00000038; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3C = .rodata:0x0000003C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x4 scope:local data:float +lbl_1_rodata_44 = .rodata:0x00000044; // type:object size:0x4 scope:local data:float +lbl_1_rodata_48 = .rodata:0x00000048; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4C = .rodata:0x0000004C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_50 = .rodata:0x00000050; // type:object size:0x4 scope:local data:float +lbl_1_rodata_54 = .rodata:0x00000054; // type:object size:0x4 scope:local data:float +lbl_1_rodata_58 = .rodata:0x00000058; // type:object size:0x4 scope:local data:float +lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x8 scope:local data:double +lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x4 scope:local data:float +lbl_1_rodata_6C = .rodata:0x0000006C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_70 = .rodata:0x00000070; // type:object size:0x4 scope:local data:float +lbl_1_rodata_74 = .rodata:0x00000074; // type:object size:0x4 scope:local data:float +lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x4 scope:local data:float +lbl_1_rodata_80 = .rodata:0x00000080; // type:object size:0x8 scope:local data:double +lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x4 scope:local data:float +lbl_1_rodata_8C = .rodata:0x0000008C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x4 scope:local data:float +lbl_1_rodata_94 = .rodata:0x00000094; // type:object size:0x4 scope:local data:float +lbl_1_rodata_98 = .rodata:0x00000098; // type:object size:0x4 scope:local data:float +lbl_1_rodata_9C = .rodata:0x0000009C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_A0 = .rodata:0x000000A0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_A4 = .rodata:0x000000A4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_A8 = .rodata:0x000000A8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_C0 = .rodata:0x000000C0; // type:object size:0x8 scope:local data:double +lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_D8 = .rodata:0x000000D8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_E0 = .rodata:0x000000E0; // type:object size:0x50 scope:local data:float +lbl_1_rodata_130 = .rodata:0x00000130; // type:object size:0x14 scope:local data:4byte +lbl_1_rodata_144 = .rodata:0x00000144; // type:object size:0x4 scope:local data:float +lbl_1_rodata_148 = .rodata:0x00000148; // type:object size:0x4 scope:local data:float +lbl_1_rodata_14C = .rodata:0x0000014C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_150 = .rodata:0x00000150; // type:object size:0x8 scope:local data:double +lbl_1_rodata_158 = .rodata:0x00000158; // type:object size:0x8 scope:local data:double +lbl_1_rodata_160 = .rodata:0x00000160; // type:object size:0x8 scope:local data:double +lbl_1_rodata_168 = .rodata:0x00000168; // type:object size:0x8 scope:local data:double +lbl_1_rodata_170 = .rodata:0x00000170; // type:object size:0x8 scope:local data:double +lbl_1_rodata_178 = .rodata:0x00000178; // type:object size:0x8 scope:local data:double +lbl_1_rodata_180 = .rodata:0x00000180; // type:object size:0x8 scope:local data:double +lbl_1_rodata_188 = .rodata:0x00000188; // type:object size:0x10 scope:local data:4byte +lbl_1_rodata_198 = .rodata:0x00000198; // type:object size:0x10 scope:local data:4byte +lbl_1_rodata_1A8 = .rodata:0x000001A8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1AC = .rodata:0x000001AC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1B0 = .rodata:0x000001B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1B4 = .rodata:0x000001B4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1B8 = .rodata:0x000001B8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1BC = .rodata:0x000001BC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1C0 = .rodata:0x000001C0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1C4 = .rodata:0x000001C4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1C8 = .rodata:0x000001C8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1CC = .rodata:0x000001CC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1D0 = .rodata:0x000001D0; // type:object size:0x8 scope:local data:double +lbl_1_rodata_1D8 = .rodata:0x000001D8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_1E0 = .rodata:0x000001E0; // type:object size:0x8 scope:local data:double +lbl_1_rodata_1E8 = .rodata:0x000001E8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1EC = .rodata:0x000001EC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1F0 = .rodata:0x000001F0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1F4 = .rodata:0x000001F4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_1F8 = .rodata:0x000001F8; // type:object size:0xC scope:local data:4byte +lbl_1_rodata_204 = .rodata:0x00000204; // type:object size:0x34 scope:local data:float +lbl_1_rodata_238 = .rodata:0x00000238; // type:object size:0x8 scope:local data:double +lbl_1_rodata_240 = .rodata:0x00000240; // type:object size:0x8 scope:local data:double +lbl_1_rodata_248 = .rodata:0x00000248; // type:object size:0x4 scope:local data:float +lbl_1_rodata_24C = .rodata:0x0000024C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_250 = .rodata:0x00000250; // type:object size:0x4 scope:local data:float +lbl_1_rodata_254 = .rodata:0x00000254; // type:object size:0x4 scope:local data:float +lbl_1_rodata_258 = .rodata:0x00000258; // type:object size:0x4 scope:local data:float +lbl_1_rodata_25C = .rodata:0x0000025C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_260 = .rodata:0x00000260; // type:object size:0x8 scope:local data:double +lbl_1_rodata_268 = .rodata:0x00000268; // type:object size:0x10 scope:local data:float +lbl_1_rodata_278 = .rodata:0x00000278; // type:object size:0x4 scope:local data:float +lbl_1_rodata_27C = .rodata:0x0000027C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_280 = .rodata:0x00000280; // type:object size:0x4 scope:local data:float +lbl_1_rodata_284 = .rodata:0x00000284; // type:object size:0x4 scope:local data:float +lbl_1_rodata_288 = .rodata:0x00000288; // type:object size:0x4 scope:local data:float +lbl_1_rodata_28C = .rodata:0x0000028C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_290 = .rodata:0x00000290; // type:object size:0x4 scope:local data:float +lbl_1_rodata_294 = .rodata:0x00000294; // type:object size:0x4 scope:local data:float +lbl_1_rodata_298 = .rodata:0x00000298; // type:object size:0x4 scope:local data:float +lbl_1_rodata_29C = .rodata:0x0000029C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2A0 = .rodata:0x000002A0; // type:object size:0x8 scope:local data:double +lbl_1_rodata_2A8 = .rodata:0x000002A8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2AC = .rodata:0x000002AC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2B0 = .rodata:0x000002B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2B4 = .rodata:0x000002B4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2B8 = .rodata:0x000002B8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2BC = .rodata:0x000002BC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2C0 = .rodata:0x000002C0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2C4 = .rodata:0x000002C4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2C8 = .rodata:0x000002C8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2CC = .rodata:0x000002CC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2D0 = .rodata:0x000002D0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2D4 = .rodata:0x000002D4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2D8 = .rodata:0x000002D8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_2E0 = .rodata:0x000002E0; // type:object size:0x8 scope:local data:double +lbl_1_rodata_2E8 = .rodata:0x000002E8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_2F0 = .rodata:0x000002F0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_2F8 = .rodata:0x000002F8; // type:object size:0x8 scope:local data:double +lbl_1_rodata_300 = .rodata:0x00000300; // type:object size:0x8 scope:local data:double +lbl_1_rodata_308 = .rodata:0x00000308; // type:object size:0x8 scope:local data:double +lbl_1_rodata_310 = .rodata:0x00000310; // type:object size:0x4 scope:local data:float +lbl_1_rodata_314 = .rodata:0x00000314; // type:object size:0x4 scope:local data:float +lbl_1_rodata_318 = .rodata:0x00000318; // type:object size:0x4 scope:local data:float +lbl_1_rodata_31C = .rodata:0x0000031C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_320 = .rodata:0x00000320; // type:object size:0x8 scope:local data:double +lbl_1_rodata_328 = .rodata:0x00000328; // type:object size:0x4 scope:local data:float +lbl_1_rodata_32C = .rodata:0x0000032C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_330 = .rodata:0x00000330; // type:object size:0x4 scope:local data:float +lbl_1_rodata_334 = .rodata:0x00000334; // type:object size:0x40 scope:local data:4byte +lbl_1_rodata_374 = .rodata:0x00000374; // type:object size:0x10 scope:local data:4byte +lbl_1_rodata_384 = .rodata:0x00000384; // type:object size:0x10 scope:local data:4byte +lbl_1_rodata_394 = .rodata:0x00000394; // type:object size:0x4 scope:local data:float +lbl_1_rodata_398 = .rodata:0x00000398; // type:object size:0x4 scope:local data:float +lbl_1_rodata_39C = .rodata:0x0000039C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3A0 = .rodata:0x000003A0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3A4 = .rodata:0x000003A4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3A8 = .rodata:0x000003A8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3AC = .rodata:0x000003AC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3B0 = .rodata:0x000003B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3B4 = .rodata:0x000003B4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3B8 = .rodata:0x000003B8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3BC = .rodata:0x000003BC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3C0 = .rodata:0x000003C0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3C4 = .rodata:0x000003C4; // type:object size:0x20 scope:local data:4byte +lbl_1_rodata_3E4 = .rodata:0x000003E4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3E8 = .rodata:0x000003E8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3EC = .rodata:0x000003EC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3F0 = .rodata:0x000003F0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3F4 = .rodata:0x000003F4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3F8 = .rodata:0x000003F8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3FC = .rodata:0x000003FC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_400 = .rodata:0x00000400; // type:object size:0x4 scope:local data:float +lbl_1_rodata_404 = .rodata:0x00000404; // type:object size:0x4 scope:local data:float +lbl_1_rodata_408 = .rodata:0x00000408; // type:object size:0x4 scope:local data:float +lbl_1_rodata_40C = .rodata:0x0000040C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_410 = .rodata:0x00000410; // type:object size:0x4 scope:local data:float +lbl_1_rodata_414 = .rodata:0x00000414; // type:object size:0x4 scope:local data:float +lbl_1_rodata_418 = .rodata:0x00000418; // type:object size:0x4 scope:local data:float +lbl_1_rodata_41C = .rodata:0x0000041C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_420 = .rodata:0x00000420; // type:object size:0x4 scope:local data:float +lbl_1_rodata_428 = .rodata:0x00000428; // type:object size:0x8 scope:local data:double +lbl_1_rodata_430 = .rodata:0x00000430; // type:object size:0x4 scope:local data:float +lbl_1_rodata_434 = .rodata:0x00000434; // type:object size:0x4 scope:local data:float +lbl_1_rodata_438 = .rodata:0x00000438; // type:object size:0x4 scope:local data:float +lbl_1_rodata_43C = .rodata:0x0000043C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_440 = .rodata:0x00000440; // type:object size:0x4 scope:local data:float +lbl_1_rodata_444 = .rodata:0x00000444; // type:object size:0x4 scope:local data:float +lbl_1_rodata_448 = .rodata:0x00000448; // type:object size:0x4 scope:local data:float +lbl_1_rodata_44C = .rodata:0x0000044C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_450 = .rodata:0x00000450; // type:object size:0x4 scope:local data:float +lbl_1_rodata_454 = .rodata:0x00000454; // type:object size:0x4 scope:local data:float +lbl_1_rodata_458 = .rodata:0x00000458; // type:object size:0x8 scope:local data:double +lbl_1_rodata_460 = .rodata:0x00000460; // type:object size:0x8 scope:local data:double +lbl_1_rodata_468 = .rodata:0x00000468; // type:object size:0x4 scope:local data:float +lbl_1_rodata_46C = .rodata:0x0000046C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_470 = .rodata:0x00000470; // type:object size:0x4 scope:local data:float +lbl_1_rodata_474 = .rodata:0x00000474; // type:object size:0x4 scope:local data:float +lbl_1_rodata_478 = .rodata:0x00000478; // type:object size:0x4 scope:local data:float +lbl_1_rodata_47C = .rodata:0x0000047C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_480 = .rodata:0x00000480; // type:object size:0x4 scope:local data:float +lbl_1_rodata_484 = .rodata:0x00000484; // type:object size:0x4 scope:local data:float +lbl_1_rodata_488 = .rodata:0x00000488; // type:object size:0x4 scope:local data:float +lbl_1_rodata_48C = .rodata:0x0000048C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_490 = .rodata:0x00000490; // type:object size:0x4 scope:local data:float +lbl_1_rodata_494 = .rodata:0x00000494; // type:object size:0x4 scope:local data:float +lbl_1_rodata_498 = .rodata:0x00000498; // type:object size:0x4 scope:local data:float +lbl_1_rodata_49C = .rodata:0x0000049C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4A0 = .rodata:0x000004A0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4A4 = .rodata:0x000004A4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4A8 = .rodata:0x000004A8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4AC = .rodata:0x000004AC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4B0 = .rodata:0x000004B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4B4 = .rodata:0x000004B4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4B8 = .rodata:0x000004B8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4BC = .rodata:0x000004BC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4C0 = .rodata:0x000004C0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4C4 = .rodata:0x000004C4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4C8 = .rodata:0x000004C8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4CC = .rodata:0x000004CC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4D0 = .rodata:0x000004D0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4D4 = .rodata:0x000004D4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4D8 = .rodata:0x000004D8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_4DC = .rodata:0x000004DC; // type:object size:0x4 scope:local data:float lbl_1_data_0 = .data:0x00000000; // type:object size:0xC lbl_1_data_C = .data:0x0000000C; // type:object size:0xC lbl_1_data_18 = .data:0x00000018; // type:object size:0xC data:float @@ -280,15 +282,15 @@ lbl_1_data_24 = .data:0x00000024; // type:object size:0x4 lbl_1_data_28 = .data:0x00000028; // type:object size:0xC data:float lbl_1_data_34 = .data:0x00000034; // type:object size:0xC data:float lbl_1_data_40 = .data:0x00000040; // type:object size:0xC data:float -lbl_1_data_4C = .data:0x0000004C; // type:object size:0x14 data:string +lbl_1_data_4C = .data:0x0000004C; // type:object size:0x14 scope:local data:string lbl_1_data_60 = .data:0x00000060; // type:object size:0x48 lbl_1_data_A8 = .data:0x000000A8; // type:object size:0x48 lbl_1_data_F0 = .data:0x000000F0; // type:object size:0x18 lbl_1_data_108 = .data:0x00000108; // type:object size:0x80 lbl_1_data_188 = .data:0x00000188; // type:object size:0x80 -lbl_1_data_208 = .data:0x00000208; // type:object size:0x1 data:byte -lbl_1_data_20C = .data:0x0000020C; // type:object size:0x1A data:string -lbl_1_data_226 = .data:0x00000226; // type:object size:0x19 data:string +lbl_1_data_208 = .data:0x00000208; // type:object size:0x4 data:byte +lbl_1_data_20C = .data:0x0000020C; // type:object size:0x1A scope:local data:string +lbl_1_data_226 = .data:0x00000226; // type:object size:0x19 scope:local data:string lbl_1_data_240 = .data:0x00000240; // type:object size:0x14 lbl_1_data_264 = .data:0x00000258; // type:object size:0x20 lbl_1_data_284 = .data:0x00000284; // type:object size:0x40 diff --git a/configure.py b/configure.py index 50b84a50..8a5611e2 100644 --- a/configure.py +++ b/configure.py @@ -1143,8 +1143,8 @@ config.libs = [ Rel( "m443Dll", # Mario Speedwagons objects={ - Object(NonMatching, "REL/m443Dll/main.c"), - Object(NonMatching, "REL/m443Dll/map.c"), + Object(Matching, "REL/m443Dll/main.c"), + Object(Matching, "REL/m443Dll/map.c"), Object(NonMatching, "REL/m443Dll/player.c"), }, ), diff --git a/include/REL/m443Dll.h b/include/REL/m443Dll.h new file mode 100644 index 00000000..72b89689 --- /dev/null +++ b/include/REL/m443Dll.h @@ -0,0 +1,51 @@ +#ifndef M443DLL_H +#define M443DLL_H + +#include "game/object.h" + +typedef struct M443DllCameraStruct { + s32 unk_00; + s32 unk_04; + s32 unk_08; + u32 unk_0C; + float unk_10; + float unk_14; + float unk_18; + Vec unk_1C; + Vec unk_28; + float unk_34; + s32 unk_38; + s32 unk_3C; + float unk_40; + float unk_44; + float unk_48; + float unk_4C; + float unk_50; + char unk54[0x24]; + float unk_78; + float unk_7C; + float unk_80; + char unk84[0x1C]; + u32 unk_A0; +} M443DllCameraStruct; /* size = 0xA4 */ + +void fn_1_3FE8(u32 arg0); +u32 fn_1_3FFC(void); +M443DllCameraStruct *fn_1_40AC(s32 arg0); +M443DllCameraStruct *fn_1_4148(u32 arg0); +M443DllCameraStruct *fn_1_41B0(u32 arg0); +void fn_1_421C(s32 arg0, s32 arg1); +s32 fn_1_42CC(void); +u32 fn_1_42E4(void); +s32 fn_1_42FC(void); +void fn_1_4314(s32 arg0, float arg8); +s32 fn_1_4368(s32 arg0); +void fn_1_43AC(s32 arg0); +void fn_1_43DC(s32 arg0); +float fn_1_488C(float arg8, float arg9, float argA); +void fn_1_4A5C(Process *arg0); +void fn_1_4AB0(void); +void fn_1_5444(Process *arg0); +void fn_1_565C(void); + +#endif diff --git a/src/REL/m443Dll/main.c b/src/REL/m443Dll/main.c new file mode 100644 index 00000000..9c939016 --- /dev/null +++ b/src/REL/m443Dll/main.c @@ -0,0 +1,1164 @@ +#include "dolphin/gx/GXVert.h" +#include "ext_math.h" +#include "game/audio.h" +#include "game/flag.h" +#include "game/gamework.h" +#include "game/hsfman.h" +#include "game/memory.h" +#include "game/minigame_seq.h" +#include "game/object.h" +#include "game/objsub.h" +#include "game/wipe.h" +#include "math.h" +#include "rel_sqrt_consts.h" +#include "string.h" + +#ifndef __MWERKS__ +#include "game/esprite.h" +#include "game/frand.h" +#endif + +#include "REL/m443Dll.h" + +typedef struct M443DllWork { + u32 unk_00; + s32 unk_04; + s32 unk_08; + s32 unk_0C; + s32 unk_10; + u32 unk_14; + u32 unk_18; + u32 unk_1C; + u32 unk_20; + char unk24[4]; + s32 unk_28; + u32 unk_2C; + s32 unk_30; + s32 unk_34[4]; + float unk_44[4]; + u32 unk_54; + u32 unk_58; + s32 unk_5C; +} M443DllWork; /* size = 0x60 */ + +typedef struct M443DllData108Struct { + u32 unk_00; + s32 unk_04; +} M443DllData108Struct; /* size = 0x08 */ + +typedef struct M443DllUnkStruct { + s32 unk_00; + s32 unk_04; + float unk_08; + float unk_0C; + u32 unk_10; + u32 unk_14; + u32 unk_18; + s16 unk_1C[0x10]; +} M443DllUnkStruct; /* size = 0x3C */ + +void fn_1_1294(omObjData *); +void fn_1_17D8(omObjData *arg0); +omObjFunc fn_1_1C98(Process *arg0, omObjData *arg1); +void fn_1_1D8C(omObjData *); +omObjFunc fn_1_2490(Process *arg0, omObjData *arg1); +void fn_1_25A4(omObjData *); +void fn_1_2DD8(M443DllUnkStruct *arg0); +void fn_1_2F54(M443DllUnkStruct *arg0); +void fn_1_32C0(Process *arg0); +void fn_1_3370(omObjData *object); +void fn_1_3710(omObjData *); +void fn_1_3770(omObjData *object); +void fn_1_3D78(ModelData *, float[3][4]); +void fn_1_420(omObjData *object); +void fn_1_584(omObjData *arg0); +void fn_1_6D0(omObjData *); +void fn_1_9B0(omObjData *); +void fn_1_CE0(omObjData *); +void fn_1_ECC(omObjData *); + +Vec lbl_1_data_0 = { 100.0f, 800.0f, -100.0f }; + +Vec lbl_1_data_C = { 0.3f, -0.8f, 0.3f }; + +Vec lbl_1_data_18 = { 10.0f, 45.0f, 3500.0f }; + +GXColor lbl_1_data_24 = { 0xFF, 0xFF, 0xFF, 0xFF }; + +Vec lbl_1_data_28 = { 50.0f, 150000.0f, 50.0f }; + +Vec lbl_1_data_34 = { 0.0f, 1.0f, 0.0f }; + +Vec lbl_1_data_40 = { 0.0f, 0.0f, 0.0f }; + +Process *lbl_1_bss_74; +omObjData *lbl_1_bss_70; +omObjData *lbl_1_bss_6C; +omObjData *lbl_1_bss_68; +s16 lbl_1_bss_64; +s16 lbl_1_bss_5C[4]; +s16 lbl_1_bss_5A; +s16 lbl_1_bss_58; +s16 lbl_1_bss_56; +s16 lbl_1_bss_54; +s32 lbl_1_bss_50; +M443DllUnkStruct lbl_1_bss_14; +s16 lbl_1_bss_10[1]; // why only 1 long? +s32 lbl_1_bss_C; +s32 lbl_1_bss_8; +s32 lbl_1_bss_4; +s32 lbl_1_bss_0; + +void ObjectSetup(void) +{ + Vec sp14; + Vec sp8; + Process *var_r31; + LightData *var_r30; + + HuAudSndGrpSet(0x45); + lbl_1_bss_C = lbl_1_bss_8 = -1; + lbl_1_bss_4 = lbl_1_bss_0 = -1; + lbl_1_bss_5C[0] = Hu3DGLightCreateV(&lbl_1_data_0, &lbl_1_data_C, &lbl_1_data_24); + Hu3DGLightInfinitytSet(lbl_1_bss_5C[0]); + var_r30 = &Hu3DGlobalLight[lbl_1_bss_5C[0]]; + var_r30->unk_00 |= 0x8000; + + lbl_1_data_18.x = 55.74f; + lbl_1_data_18.y = 0.0f; + lbl_1_data_18.z = 3500.0f; + + sp14.x = sp14.y = sp14.z = 0.0f; + sp8.x = sp8.z = 0.0f; + sp8.y = lbl_1_data_18.z; + sp8.x = 0.0f; + sp8.y = 3480.0002f; + sp8.z = 900.00006f; + Hu3DGLightPosAimSetV(lbl_1_bss_5C[0], &sp8, &sp14); + + lbl_1_data_28.x = 100.0f; + lbl_1_data_28.y = 2000.0f; + lbl_1_data_28.z = 2000.0f; + lbl_1_data_34.x = 0.0f; + lbl_1_data_34.y = 1.0f; + lbl_1_data_34.z = 0.0f; + lbl_1_data_40.x = 0.0f; + lbl_1_data_40.y = 0.0f; + lbl_1_data_40.z = 700.0f; + Hu3DShadowCreate(30.0f, 20.0f, 25000.0f); + Hu3DShadowTPLvlSet(0.625f); + Hu3DShadowPosSet(&lbl_1_data_28, &lbl_1_data_34, &lbl_1_data_40); + lbl_1_bss_5A = lbl_1_bss_58 = lbl_1_bss_56 = lbl_1_bss_54 = -1; + lbl_1_bss_50 = 0; + var_r31 = omInitObjMan(0x32, 0x2000); + lbl_1_bss_74 = var_r31; + omGameSysInit(var_r31); + fn_1_2DD8(&lbl_1_bss_14); + fn_1_32C0(var_r31); + lbl_1_bss_70 = omAddObjEx(var_r31, 0xA, 0, 0, -1, fn_1_420); + fn_1_4A5C(var_r31); + fn_1_5444(var_r31); +} + +void fn_1_420(omObjData *object) +{ + M443DllWork *var_r31; + + object->data = HuMemDirectMallocNum(HEAP_SYSTEM, sizeof(M443DllWork), MEMORY_DEFAULT_NUM); + var_r31 = object->data; + memset(var_r31, 0, sizeof(M443DllWork)); + var_r31->unk_00 = 0; + var_r31->unk_04 = 0; + var_r31->unk_0C = 0; + var_r31->unk_10 = 0; + var_r31->unk_14 = 0; + var_r31->unk_18 = 0; + var_r31->unk_28 = 0; + var_r31->unk_2C = 0; + var_r31->unk_08 = 0; + var_r31->unk_54 = 2; + var_r31->unk_58 = 0; + var_r31->unk_5C = 0; + object->func = fn_1_6D0; +} + +void fn_1_4E4(omObjData *object) +{ + M443DllWork *var_r31; + + var_r31 = object->data; + var_r31->unk_04++; + var_r31->unk_10++; + var_r31->unk_18++; + var_r31->unk_2C++; + fn_1_2F54(&lbl_1_bss_14); + if ((omSysExitReq != 0) && (var_r31->unk_00 != 5)) { + var_r31->unk_00 = 4; + fn_1_584(object); + } +} + +void fn_1_584(omObjData *object) +{ + M443DllWork *var_r31 = object->data; + + if (var_r31->unk_08 == 0) { + switch (var_r31->unk_00) { + case 0: + WipeCreate(1, 0, 0x3C); + lbl_1_bss_14.unk_00 = 1; + var_r31->unk_00 = 1; + var_r31->unk_10 = 0; + object->func = fn_1_1C98(lbl_1_bss_74, object); + break; + case 1: + var_r31->unk_00 = 2; + var_r31->unk_18 = 0; + fn_1_3FE8(4); + object->func = fn_1_ECC; + break; + case 2: + var_r31->unk_00 = 3; + var_r31->unk_2C = 0; + object->func = fn_1_2490(lbl_1_bss_74, object); + break; + case 3: + case 4: + var_r31->unk_08 = 1; + var_r31->unk_00 = 5; + object->func = fn_1_9B0; + break; + case 5: + default: + var_r31->unk_00 = 5; + object->func = fn_1_CE0; + break; + } + var_r31->unk_04 = 0; + } +} + +void fn_1_6D0(omObjData *object) +{ + fn_1_4E4(object); + fn_1_584(object); +} + +void fn_1_9B0(omObjData *object) +{ + M443DllWork *var_r27 = object->data; + + fn_1_4E4(object); + + if (WipeStatGet() == 0) { + WipeCreate(2, 0, 0x3C); + if (lbl_1_bss_8 >= 0) { + HuAudFXStop(lbl_1_bss_8); + lbl_1_bss_8 = -1; + } + var_r27->unk_08 = 0; + fn_1_584(object); + } +} + +void fn_1_CE0(omObjData *object) +{ + fn_1_4E4(object); + + if (WipeStatGet() == 0) { + fn_1_565C(); + fn_1_4AB0(); + MGSeqKillAll(); + HuAudFadeOut(1); + omOvlReturnEx(1, 1); + } +} + +void fn_1_ECC(omObjData *object) +{ + M443DllWork *var_r29 = object->data; + + fn_1_4E4(object); + switch (var_r29->unk_14) { + case 0: + var_r29->unk_1C = 0x12C; + var_r29->unk_20 = 0x3C; + lbl_1_bss_5A = MGSeqCreate(3, 0); + MGSeqPosSet(lbl_1_bss_5A, 320.0f, 240.0f); + lbl_1_bss_64 = -1; + Center.x = 0.0f; + Center.y = 200.0f; + Center.z = 0.0f; + CRot.x = -30.0f; + CRot.y = 0.0f; + CRot.z = 0.0f; + CZoom = 1900.0f; + lbl_1_bss_14.unk_00 = 1; + var_r29->unk_14 = 1; + var_r29->unk_18 = 0; + break; + case 1: + if ((var_r29->unk_18 > 60.0f) && (lbl_1_bss_C >= 0)) { + HuAudFXFadeOut(lbl_1_bss_C, 0x1E); + lbl_1_bss_C = -1; + } + if ((MGSeqStatGet(lbl_1_bss_5A) == 0) && (var_r29->unk_08 == 0)) { + var_r29->unk_14 = 2; + var_r29->unk_18 = 0; + object->func = fn_1_1294; + } + break; + } +} + +void fn_1_1294(omObjData *object) +{ + s32 sp8[4]; + + float var_f31; + + s32 var_r30; + s32 var_r26; + s32 var_r25; + s32 var_r24; + s32 var_r23; + + M443DllWork *var_r31 = object->data; + var_r25 = 0; + fn_1_4E4(object); + lbl_1_bss_14.unk_14++; + if (--var_r31->unk_20 == 0) { + var_r31->unk_20 = 0x3C; + var_r31->unk_1C--; + if (var_r31->unk_1C == 0) { + var_r31->unk_54 = 0; + var_r25 = 1; + } + } + if (var_r31->unk_1C <= 5) { + if (lbl_1_bss_64 < 0) { + lbl_1_bss_64 = MGSeqCreate(1, var_r31->unk_1C, -1, -1); + } + MGSeqParamSet(lbl_1_bss_64, 1, var_r31->unk_1C); + } + for (var_r30 = 0; var_r30 < 4; var_r30++) { + if (var_r31->unk_44[var_r30] >= 40000.0f) { + var_r31->unk_54 = 1; + } + } + if (var_r31->unk_54 != 2) { + var_r25 = 1; + } + if (var_r25 != 0) { + if (var_r31->unk_54 == 1) { + for (var_r30 = 0; var_r30 < 4; var_r30++) { + sp8[var_r30] = var_r30; + } + for (var_r24 = 0; var_r24 < 0xA; var_r24++) { + for (var_r30 = 0; var_r30 < 3; var_r30++) { + for (var_r26 = var_r30 + 1; var_r26 < 4; var_r26++) { + if ((var_r31->unk_44[var_r30] < var_r31->unk_44[var_r26]) + || ((var_r31->unk_44[var_r30] == var_r31->unk_44[var_r26]) && (frandmod(0x3E8) < 0x2BC))) { + var_f31 = var_r31->unk_44[var_r30]; + var_r31->unk_44[var_r30] = var_r31->unk_44[var_r26]; + var_r31->unk_44[var_r26] = var_f31; + var_r23 = sp8[var_r30]; + sp8[var_r30] = sp8[var_r26]; + sp8[var_r26] = var_r23; + } + } + } + } + for (var_r30 = 0; var_r30 < 4; var_r30++) { + var_r31->unk_34[sp8[var_r30]] = var_r30; + } + var_r31->unk_30 = sp8[0]; + } + lbl_1_bss_58 = MGSeqCreate(3, 1); + MGSeqPosSet(lbl_1_bss_58, 320.0f, 240.0f); + if (GWPlayerCfg[var_r31->unk_30].iscom == 0) { + if (lbl_1_bss_14.unk_14 < lbl_1_bss_14.unk_10) { + GWMGRecordSet(5, lbl_1_bss_14.unk_14); + lbl_1_bss_50 = 1; + } + if (lbl_1_bss_14.unk_14 <= 0x258) { + GWGameStat.present[0x39] = 1; + OSReport("Present For You!!!\n"); + } + } + lbl_1_bss_8 = HuAudFXPlay(0x735); + fn_1_3FE8(3); + var_r31->unk_14 = 3; + var_r31->unk_18 = 0; + if (var_r31->unk_08 == 0) { + object->func = fn_1_17D8; + } + } +} + +void fn_1_17D8(omObjData *object) +{ + M443DllWork *var_r27 = object->data; + s32 var_r25 = 0; + + if (lbl_1_bss_64 >= 0) { + MGSeqParamSet(lbl_1_bss_64, 2, -1); + lbl_1_bss_64 = -1; + } + fn_1_4E4(object); + if (var_r27->unk_14 == 3) { + if (var_r27->unk_54 == 1) { + M443DllCameraStruct *var_r31 = fn_1_4148(var_r27->unk_30 + 1); + if (var_r31->unk_A0 == 0) { + var_r31->unk_78 = var_r31->unk_44; + var_r31->unk_7C = var_r31->unk_48; + var_r31->unk_80 = var_r31->unk_40; + var_r31->unk_04 = 0x3E8; + } + if (var_r31->unk_A0 <= 0x3C) { + float var_f31 = 0.016666668f * var_r31->unk_A0; + var_r31->unk_44 = var_r31->unk_78 + ((320.0f - var_r31->unk_78) * var_f31); + var_r31->unk_48 = var_r31->unk_7C + ((240.0f - var_r31->unk_7C) * var_f31); + var_r31->unk_40 = var_r31->unk_80 + ((2.0f - var_r31->unk_80) * var_f31); + } + else { + var_r25 = 1; + } + var_r31->unk_A0 = var_r31->unk_A0 + 1; + } + else { + var_r25 = 1; + } + if ((MGSeqStatGet(lbl_1_bss_58) == 0) && (var_r27->unk_58 == 0x1111) && (var_r25 != 0)) { + if (var_r27->unk_08 == 0) { + WipeCreate(2, 0, 0x3C); + } + var_r27->unk_14 = 4; + var_r27->unk_18 = 0; + } + } + else if (WipeStatGet() == 0) { + var_r27->unk_14 = 5; + var_r27->unk_18 = 0; + fn_1_584(object); + } +} + +omObjFunc fn_1_1C98(Process *process, omObjData *object) +{ + CRot.x = -80.5f; + CRot.y = CRot.z = 0.0f; + Center.x = 0.0f; + Center.y = 0.0f; + Center.z = 0.0f; + CZoom = 1000.0f; + object->work[0] = object->work[1] = 0; + fn_1_3FE8(1); + lbl_1_bss_C = HuAudFXPlay(0x734); + + return fn_1_1D8C; +} + +Vec lbl_1_data_60[6] = { + { -500.0f, 150.0f, 350.0f }, + { -500.0f, 150.0f, 350.0f }, + { 500.0f, 150.0f, 350.0f }, + { 500.0f, 150.0f, 350.0f }, + { 0.0f, 150.0f, 350.0f }, + { 0.0f, 150.0f, 350.0f }, +}; + +Vec lbl_1_data_A8[6] = { + { -1.5f, -40.0f, 880.0f }, + { -1.5f, -40.0f, 880.0f }, + { -20.0f, 40.0f, 1000.0f }, + { -40.0f, 130.0f, 1300.0f }, + { -40.0f, 180.0f, 1500.0f }, + { -40.0f, 180.0f, 1500.0f }, +}; + +s32 lbl_1_data_F0[6] = { 0x3C, 0x5A, 0x6C, 0x96, 0x6C, 0 }; + +void fn_1_1D8C(omObjData *object) +{ + Vec sp8; + + float var_f31; + M443DllCameraStruct *var_r27; + + M443DllWork *var_r26 = object->data; + fn_1_4E4(object); + var_r26->unk_0C = 1; + object->work[0]++; + if ((object->work[1] == 1) && (lbl_1_bss_4 < 0)) { + lbl_1_bss_4 = HuAudSStreamPlay(0xB); + } + var_f31 = (float)object->work[0] / lbl_1_data_F0[object->work[1]]; + PSVECSubtract(&lbl_1_data_60[object->work[1] + 1], &lbl_1_data_60[object->work[1]], &sp8); + PSVECScale(&sp8, &sp8, var_f31); + PSVECAdd(&lbl_1_data_60[object->work[1]], &sp8, &sp8); + Center.x = sp8.x; + Center.y = sp8.y; + Center.z = sp8.z; + PSVECSubtract(&lbl_1_data_A8[object->work[1] + 1], &lbl_1_data_A8[object->work[1]], &sp8); + PSVECScale(&sp8, &sp8, var_f31); + PSVECAdd(&lbl_1_data_A8[object->work[1]], &sp8, &sp8); + CRot.x = sp8.x; + CRot.y = sp8.y; + CRot.z = 0.0f; + CZoom = sp8.z; + var_r27 = fn_1_4148(0); + var_r27->unk_1C = Center; + var_r27->unk_28 = CRot; + var_r27->unk_34 = CZoom; + if (object->work[1] == 3) { + fn_1_3FE8(2); + } + if (var_f31 >= 1.0f) { + object->work[0] = 0; + object->work[1] += 1; + if (lbl_1_data_F0[object->work[1]] == 0) { + var_r26->unk_0C = 2; + fn_1_584(object); + } + } +} + +omObjFunc fn_1_2490(Process *process, omObjData *object) +{ + M443DllCameraStruct *var_r31; + M443DllWork *var_r30 = object->data; + + if (var_r30->unk_08 == 0) { + WipeCreate(1, 0, 0x3C); + } + fn_1_3FE8(1); + var_r31 = fn_1_4148(0); + if (var_r30->unk_54 == 1) { + var_r31->unk_1C.x = 70.0f; + var_r31->unk_1C.y = 250.0f; + var_r31->unk_1C.z = 500.0f; + } + else { + var_r31->unk_1C.x = 0.0f; + var_r31->unk_1C.y = 150.0f; + var_r31->unk_1C.z = 1000.0f; + } + var_r31->unk_28.x = -10.0f; + var_r31->unk_28.y = 0.0f; + + var_r31->unk_34 = 800.0f; + return fn_1_25A4; +} + +void fn_1_25A4(omObjData *object) +{ + M443DllWork *var_r28 = object->data; + s32 var_r22 = 1; + + fn_1_4E4(object); + if (lbl_1_bss_50 != 0) { + var_r22 = 0; + if (lbl_1_bss_56 < 0) { + lbl_1_bss_56 = MGSeqCreate(0xE, lbl_1_bss_14.unk_14); + lbl_1_bss_14.unk_04 = 1; + } + else if (MGSeqStatGet(lbl_1_bss_56) == 0) { + var_r22 = 1; + lbl_1_bss_50 = 0; + } + } + if ((WipeStatGet() != 0) || (var_r22 == 0)) { + var_r28->unk_2C = 0; + return; + } + var_r28->unk_28 = 1; + if (lbl_1_bss_0 < 0) { + if (var_r28->unk_54 == 1) { + lbl_1_bss_0 = HuAudSStreamPlay(1); + } + else { + lbl_1_bss_0 = HuAudSStreamPlay(4); + } + } + if (lbl_1_bss_54 < 0) { + if (var_r28->unk_54 == 1) { + lbl_1_bss_54 = MGSeqCreate(5, 3, GWPlayerCfg[var_r28->unk_30].character, -1, -1, -1); + GWPlayerCoinWinAdd(var_r28->unk_30, 10); + } + else { + lbl_1_bss_54 = MGSeqCreate(5, 2); + } + } + else if ((MGSeqStatGet(lbl_1_bss_54) == 0) && (var_r28->unk_2C >= 210.0f)) { + var_r28->unk_28 = 2; + fn_1_584(object); + } +} + +M443DllData108Struct lbl_1_data_108[0x10] = { + { 0x4A001F, 0x10E }, + { 0x610037, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610030, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, + { 0x610031, 0xFA }, +}; + +void fn_1_2DD8(M443DllUnkStruct *arg0) +{ + s32 var_r30; + + memset(arg0, 0, sizeof(M443DllUnkStruct)); + arg0->unk_10 = GWMGRecordGet(5); + if (arg0->unk_10 == 0) { + arg0->unk_10 = 0xE10; + } + arg0->unk_08 = 320.0f; + arg0->unk_0C = 64.0f; + for (var_r30 = 0; var_r30 < 0x10; var_r30++) { + arg0->unk_1C[var_r30] = -1; + if (lbl_1_data_108[var_r30].unk_00 != 0) { + arg0->unk_1C[var_r30] = espEntry(lbl_1_data_108[var_r30].unk_00, lbl_1_data_108[var_r30].unk_04, 0); + espAttrSet(arg0->unk_1C[var_r30], 8); + espDispOff(arg0->unk_1C[var_r30]); + } + } + espColorSet(arg0->unk_1C[0], 0, 0, 0); + espTPLvlSet(arg0->unk_1C[0], 0.699999988079071); + espBankSet(arg0->unk_1C[7], 0xB); + espBankSet(arg0->unk_1C[8], 0xA); + espBankSet(arg0->unk_1C[14], 0xB); + espBankSet(arg0->unk_1C[15], 0xA); +} + +Vec2f lbl_1_data_188[0x10] = { + { 0.0f, 0.0f }, + { -52.0f, -9.0f }, + { 53.0f, -8.0f }, + { 35.0f, -8.0f }, + { 9.0f, -8.0f }, + { -9.0f, -8.0f }, + { -31.0f, -8.0f }, + { 23.0f, -8.0f }, + { -17.0f, -8.0f }, + { 53.0f, 8.0f }, + { 35.0f, 8.0f }, + { 9.0f, 8.0f }, + { -9.0f, 8.0f }, + { -31.0f, 8.0f }, + { 23.0f, 8.0f }, + { -17.0f, 8.0f }, +}; + +void fn_1_2F54(M443DllUnkStruct *arg0) +{ + u32 sp8[3]; + float var_f31; + + s32 var_r30; + u32 var_r29; + s32 var_r28; + s32 var_r27; + + for (var_r30 = 0; var_r30 < 0x10; var_r30++) { + if (arg0->unk_1C[var_r30] >= 0) { + if (arg0->unk_00 == 0) { + espDispOff(arg0->unk_1C[var_r30]); + } + else { + espDispOn(arg0->unk_1C[var_r30]); + espPosSet(arg0->unk_1C[var_r30], 0.9f * (arg0->unk_08 + lbl_1_data_188[var_r30].x), arg0->unk_0C + lbl_1_data_188[var_r30].y); + } + } + } + arg0->unk_18++; + if (arg0->unk_04 != 0) { + var_r29 = arg0->unk_14; + arg0->unk_10 = var_r29; + var_f31 = 1.100000023841858 + (0.10000000149011612 * sind((22.5f * (arg0->unk_18 & 0xF)))); + espScaleSet(arg0->unk_1C[1], var_f31, var_f31); + for (var_r30 = 2; var_r30 <= 6; var_r30++) { + espScaleSet(arg0->unk_1C[var_r30], var_f31, var_f31); + } + for (var_r30 = 7; var_r30 <= 8; var_r30++) { + espScaleSet(arg0->unk_1C[var_r30], var_f31, var_f31); + } + } + for (var_r30 = 0; var_r30 < 2; var_r30++) { + if (var_r30 != 0) { + var_r29 = arg0->unk_14; + var_r27 = 9; + } + else { + var_r29 = arg0->unk_10; + var_r27 = 2; + } + sp8[0] = var_r29 % 60; + var_r29 = (var_r29 - sp8[0]) / 60; + sp8[0] = 100.0f * (0.016666668f * sp8[0]); + sp8[1] = var_r29 % 60; + var_r29 = (var_r29 - sp8[1]) / 60; + sp8[2] = var_r29; + for (var_r28 = 0; var_r28 < 3; var_r28++) { + espBankSet(arg0->unk_1C[var_r27++], sp8[var_r28] % 10); + if (var_r28 < 2) { + espBankSet(arg0->unk_1C[var_r27++], sp8[var_r28] / 10); + } + } + } +} + +void fn_1_32C0(Process *process) +{ + Hu3DCameraCreate(0x1F); + lbl_1_bss_6C = omAddObjEx(process, 0x7FDA, 0, 0, -1, omOutViewMulti); + lbl_1_bss_6C->work[0] = 5; + lbl_1_bss_68 = omAddObjEx(process, 0xC, 1, 0, -1, fn_1_3370); + lbl_1_bss_68->work[0] = 0; +} + +void fn_1_3370(omObjData *object) +{ + M443DllCameraStruct *var_r31; + s32 var_r30; + M443DllCameraStruct *var_r28; + + float sp1C[5][4] = { + { 320.0f, 240.0f, 640.0f, 416.0f }, + { 160.0f, 136.0f, 320.0f, 208.0f }, + { 480.0f, 136.0f, 320.0f, 208.0f }, + { 160.0f, 344.0f, 320.0f, 208.0f }, + { 480.0f, 344.0f, 320.0f, 208.0f }, + }; + s32 sp8[5] = { 1, 2, 4, 8, 16 }; + + object->data = HuMemDirectMallocNum(HEAP_SYSTEM, 10 * sizeof(M443DllCameraStruct), MEMORY_DEFAULT_NUM); + var_r28 = object->data; + memset(var_r28, 0, 10 * sizeof(M443DllCameraStruct)); + object->model[0] = Hu3DHookFuncCreate(fn_1_3D78); + Hu3DModelLayerSet(*object->model, 0); + Hu3DModelCameraSet(*object->model, 0x1E); + for (var_r31 = var_r28, var_r30 = 0; var_r30 < 5; var_r30++, var_r31++) { + var_r31->unk_00 = 1; + var_r31->unk_04 = var_r30 * 0x64; + var_r31->unk_10 = 41.5f; + var_r31->unk_14 = 100.0f; + var_r31->unk_18 = 60000.0f; + var_r31->unk_1C.x = 0.0f; + var_r31->unk_1C.y = 0.0f; + var_r31->unk_1C.z = 0.0f; + var_r31->unk_28.x = -15.0f; + var_r31->unk_28.y = 0.0f; + var_r31->unk_28.z = 0.0f; + var_r31->unk_34 = 1000.0f; + var_r31->unk_40 = 1.0f; + var_r31->unk_44 = sp1C[var_r30][0]; + var_r31->unk_48 = sp1C[var_r30][1]; + var_r31->unk_4C = sp1C[var_r30][2]; + var_r31->unk_50 = sp1C[var_r30][3]; + var_r31->unk_3C = var_r31->unk_0C = sp8[var_r30]; + var_r31->unk_08 = var_r30; + var_r31->unk_38 = var_r30; + } + object->work[1] = 0; + for (var_r30 = 0; var_r30 < 2; var_r30++) { + lbl_1_bss_10[var_r30] = espEntry(0x4A001E, 0x12C, 0); + espPosSet(lbl_1_bss_10[var_r30], 288.0, 240.0); + if (var_r30 != 0) { + espScaleSet(lbl_1_bss_10[var_r30], 0.22499999403953552, 60.0); + } + else { + espScaleSet(lbl_1_bss_10[var_r30], 72.0, 0.25); + } + espColorSet(lbl_1_bss_10[var_r30], 0, 0, 0); + espTPLvlSet(lbl_1_bss_10[var_r30], 1.0); + espDispOff(lbl_1_bss_10[var_r30]); + } + object->work[0]++; + fn_1_3770(object); + object->func = fn_1_3710; +} + +void fn_1_3710(omObjData *arg0) +{ + M443DllWork *sp8 = arg0->data; + s32 spC[4] = { 0x100, 0x200, 0x400, 0x800 }; + fn_1_3770(arg0); +} + +void fn_1_3770(omObjData *arg0) +{ + float var_f31; + + M443DllCameraStruct *var_r31; + s32 var_r30; + s32 var_r29; + M443DllCameraStruct *var_r28; + omObjData *var_r27; + s32 var_r26; + u32 var_r25; + s32 var_r24; + s32 var_r23; + u32 var_r22; + u32 var_r21; + + var_r28 = arg0->data; + { + s32 sp40[4] = { 2, 4, 8, 16 }; + u32 sp30[4]; + s32 sp20[4]; + float sp18[2]; + float sp10[2]; + float sp8[2]; + + var_r24 = 0; + var_r26 = 0; + memcpy(&var_r28[5], var_r28, 5 * sizeof(M443DllCameraStruct)); + switch (arg0->work[1]) { + case 0: + break; + case 1: + var_r26 |= 1; + break; + case 2: + var_r26 |= 1; + case 3: + var_r24 = 1; + case 4: + var_r26 |= 0x1E; + break; + } + if (var_r24 != 0) { + Hu3DModelAttrReset(arg0->model[0], 1); + } + else { + Hu3DModelAttrSet(arg0->model[0], 1); + } + for (var_r30 = 0; var_r30 < 4; var_r30++) { + sp30[var_r30] = var_r28[var_r30 + 6].unk_04; + sp20[var_r30] = var_r30; + } + for (var_r30 = 0; var_r30 < 3; var_r30++) { + for (var_r29 = var_r30 + 1; var_r29 < 4; var_r29++) { + if ((var_r30 != var_r29) && (sp30[var_r30] > sp30[var_r29])) { + var_r25 = sp30[var_r30]; + sp30[var_r30] = sp30[var_r29]; + sp30[var_r29] = var_r25; + var_r25 = sp20[var_r30]; + sp20[var_r30] = sp20[var_r29]; + sp20[var_r29] = var_r25; + } + } + } + for (var_r30 = 0; var_r30 < 4; var_r30++) { + var_r28[sp20[var_r30] + 6].unk_3C = sp40[var_r30]; + var_r28[sp20[var_r30] + 6].unk_38 = var_r30 + 1; + } + Hu3DCamera[5].fov = -1.0f; + for (var_r31 = &var_r28[5], var_r30 = 0; var_r30 < 5; var_r30++, var_r31++) { + if ((var_r31->unk_00 == 0) || ((var_r26 & var_r31->unk_0C) == 0)) { + Hu3DCamera[var_r31->unk_38].fov = -1.0f; + } + else { + var_f31 = 1.2f * ((var_r31->unk_4C / 640.0f) / (var_r31->unk_50 / 480.0f)); + sp18[0] = var_r31->unk_4C * var_r31->unk_40; + sp18[1] = var_r31->unk_50 * var_r31->unk_40; + Hu3DCameraPerspectiveSet(var_r31->unk_3C, var_r31->unk_10, var_r31->unk_14, var_r31->unk_18, var_f31); + Hu3DCameraViewportSet( + var_r31->unk_3C, var_r31->unk_44 - (0.5f * sp18[0]), var_r31->unk_48 - (0.5f * sp18[1]), sp18[0], sp18[1], 0.0f, 1.0f); + sp10[0] = var_r31->unk_44 - (0.5f * sp18[0]); + sp10[1] = var_r31->unk_48 - (0.5f * sp18[1]); + sp8[0] = var_r31->unk_44 + (0.5f * sp18[0]); + sp8[1] = var_r31->unk_48 + (0.5f * sp18[1]); + if (sp10[0] < 0.0f) { + sp10[0] = 0.0f; + } + if (sp10[1] < 0.0f) { + sp10[1] = 0.0f; + } + if (sp8[0] > 640.0f) { + sp8[0] = 640.0f; + } + if (sp8[1] > 480.0f) { + sp8[1] = 480.0f; + } + sp8[0] -= sp10[0]; + sp8[1] -= sp10[1]; + Hu3DCameraScissorSet(var_r31->unk_3C, sp10[0], sp10[1], sp8[0], sp8[1]); + var_r29 = var_r31->unk_38; + CenterM[var_r29].x = var_r31->unk_1C.x; + CenterM[var_r29].y = var_r31->unk_1C.y; + CenterM[var_r29].z = var_r31->unk_1C.z; + CRotM[var_r29].x = var_r31->unk_28.x; + CRotM[var_r29].y = var_r31->unk_28.y; + CRotM[var_r29].z = var_r31->unk_28.z; + CZoomM[var_r29] = var_r31->unk_34; + } + } + } + if (arg0->work[1] == 4) { + espDispOn(lbl_1_bss_10[0]); + espDispOn(lbl_1_bss_10[1]); + return; + } + espDispOff(lbl_1_bss_10[0]); + espDispOff(lbl_1_bss_10[1]); +} + +GXColor lbl_1_data_208 = { 0x00, 0x00, 0x00, 0x00 }; + +void fn_1_3D78(ModelData *arg0, Mtx arg1) +{ + Mtx spC; + + PSMTXIdentity(spC); + GXLoadPosMtxImm(spC, 0); + GXSetNumChans(1); + GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, 0, GX_DF_CLAMP, GX_AF_NONE); + GXSetNumTexGens(0); + GXSetNumTevStages(1); + GXSetTevColor(GX_TEVREG0, lbl_1_data_208); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0); + GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_C0); + GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_KONST); + GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetBlendMode(GX_BM_NONE, GX_BL_ONE, GX_BL_ZERO, GX_LO_SET); + GXSetZMode(GX_TRUE, GX_ALWAYS, GX_TRUE); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); + GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXPosition3f32(-45000.0f, 30000.0f, -59900.0f); + GXPosition3f32(45000.0f, 30000.0f, -59900.0f); + GXPosition3f32(45000.0f, -30000.0f, -59900.0f); + GXPosition3f32(-45000.0f, -30000.0f, -59900.0f); +} + +void fn_1_3FE8(u32 arg0) +{ + lbl_1_bss_68->work[1] = arg0; +} + +u32 fn_1_3FFC(void) +{ + return lbl_1_bss_68->work[1]; +} + +M443DllCameraStruct *fn_1_4010(s32 arg0) +{ + M443DllCameraStruct *var_r31; + s32 var_r30; + M443DllCameraStruct *var_r29; + + var_r29 = lbl_1_bss_68->data; + for (var_r31 = var_r29, var_r30 = 0; var_r30 < 5; var_r30++, var_r31++) { + if (var_r31->unk_0C & arg0) { + break; + } + } + if (var_r30 >= 5) { + OSReport("M443:Camera Flag Error!!\n"); + return NULL; + } + return var_r31; +} + +M443DllCameraStruct *fn_1_40AC(s32 arg0) +{ + M443DllCameraStruct *var_r31; + s32 var_r30; + M443DllCameraStruct *var_r29; + + var_r29 = lbl_1_bss_68->data; + for (var_r31 = &var_r29[5], var_r30 = 0; var_r30 < 5; var_r30++, var_r31++) { + if (var_r31->unk_0C & arg0) { + break; + } + } + if (var_r30 >= 5) { + OSReport("M443:Camera Flag Error!!\n"); + return NULL; + } + return var_r31; +} + +// Get camera +M443DllCameraStruct *fn_1_4148(u32 arg0) +{ + M443DllCameraStruct *var_r31 = lbl_1_bss_68->data; + if (arg0 >= 5) { + OSReport("M443:Camera No. Error!!\n"); + return NULL; + } + return &var_r31[arg0]; +} + +M443DllCameraStruct *fn_1_41B0(u32 arg0) +{ + M443DllCameraStruct *var_r31 = lbl_1_bss_68->data; + if (arg0 >= 5) { + OSReport("M443:Camera No. Error!!\n"); + return NULL; + } + return &var_r31[arg0 + 5]; +} + +void fn_1_421C(s32 arg0, s32 arg1) +{ + M443DllCameraStruct *var_r31; + s32 var_r30; + M443DllCameraStruct *var_r28; + M443DllCameraStruct *var_r27; + + s32 var_r29 = 0; + if (arg0 >= 0) { + var_r27 = lbl_1_bss_68->data; + var_r28 = &var_r27[5]; + for (var_r31 = var_r28, var_r30 = 0; var_r30 < 5; var_r30++, var_r31++) { + if (var_r31->unk_0C & arg1) { + var_r29 |= var_r31->unk_3C; + } + } + Hu3DModelCameraSet(arg0, var_r29); + } +} + +s32 fn_1_42B4(void) +{ + return ((M443DllWork *)lbl_1_bss_70->data)->unk_00; +} + +s32 fn_1_42CC(void) +{ + return ((M443DllWork *)lbl_1_bss_70->data)->unk_0C; +} + +u32 fn_1_42E4(void) +{ + return ((M443DllWork *)lbl_1_bss_70->data)->unk_14; +} + +s32 fn_1_42FC(void) +{ + return ((M443DllWork *)lbl_1_bss_70->data)->unk_28; +} + +void fn_1_4314(s32 arg0, float arg8) +{ + M443DllWork *var_r31 = lbl_1_bss_70->data; + + if (fn_1_42E4() == 2) { + var_r31->unk_44[arg0] = arg8; + } +} + +s32 fn_1_4368(s32 arg0) +{ + M443DllWork *var_r31 = lbl_1_bss_70->data; + + if (var_r31->unk_54 == 1) { + return var_r31->unk_34[arg0]; + } + return -1; +} + +void fn_1_43AC(s32 arg0) +{ + ((M443DllWork *)lbl_1_bss_70->data)->unk_58 |= (1 << ((arg0 & 7) * 4)); +} + +void fn_1_43DC(s32 arg0) +{ + ((M443DllWork *)lbl_1_bss_70->data)->unk_5C |= (1 << ((arg0 & 3) * 4)); +} + +s32 fn_1_440C(void) +{ + return MGSeqStatGet(lbl_1_bss_58) == 0; +} + +void fn_1_4444(Vec *arg0, Vec *arg1) +{ + Vec sp10; + float var_f30; + + PSVECSubtract(arg1, arg0, &sp10); + Center = *arg1; + var_f30 = (sp10.x * sp10.x) + (sp10.z * sp10.z); + CRot.x = atan2d(sp10.y, sqrtf(var_f30)); + CRot.y = atan2d(-sp10.x, -sp10.z); + CRot.z = 0.0f; + CZoom = PSVECMag(&sp10); +} + +void fn_1_464C(float arg8, float arg9, float argA, float argB, float argC, float argD) +{ + Vec sp3C; + Vec sp30; + Vec sp24; + float var_f30; + + sp3C.x = arg8; + sp3C.y = arg9; + sp3C.z = argA; + sp30.x = argB; + sp30.y = argC; + sp30.z = argD; + PSVECSubtract(&sp30, &sp3C, &sp24); + Center = sp30; + var_f30 = (sp24.x * sp24.x) + (sp24.z * sp24.z); + CRot.x = atan2d(sp24.y, sqrtf(var_f30)); + CRot.y = atan2d(-sp24.x, -sp24.z); + CRot.z = 0.0f; + CZoom = PSVECMag(&sp24); +} + +float fn_1_488C(float arg8, float arg9, float argA) +{ + float var_f31; + float var_f30; + float var_f29; + + var_f30 = fmod(arg9 - arg8, 360.0); + var_f31 = var_f30; + if (var_f31 < 0.0f) { + var_f31 += 360.0f; + } + if (var_f31 > 180.0f) { + var_f31 -= 360.0f; + } + var_f29 = fmod(arg8 + (argA * var_f31), 360.0); + var_f31 = var_f29; + if (var_f31 < 0.0f) { + var_f31 += 360.0f; + } + return var_f31; +} + +float fn_1_49A8(float arg8, float arg9) +{ + float var_f31; + float var_f30; + + var_f30 = fmod(arg9 - arg8, 360.0); + var_f31 = var_f30; + if (var_f31 < 0.0f) { + var_f31 += 360.0f; + } + if (var_f31 > 180.0f) { + var_f31 -= 360.0f; + } + return var_f31; +} diff --git a/src/REL/m443Dll/map.c b/src/REL/m443Dll/map.c new file mode 100644 index 00000000..bab11988 --- /dev/null +++ b/src/REL/m443Dll/map.c @@ -0,0 +1,183 @@ +#include "datadir_enum.h" +#include "ext_math.h" +#include "game/audio.h" +#include "game/hsfdraw.h" +#include "game/hsfman.h" +#include "game/hsfmotion.h" + +#include "REL/m443Dll.h" + +void fn_1_4AB4(omObjData *object); +void fn_1_4D14(omObjData *object); + +s32 lbl_1_data_240[5] = { 1, 2, 4, 8, 0x10 }; + +void fn_1_4A5C(Process *process) +{ + omObjData *var_r31 = omAddObjEx(process, 0x1E, 0xD, 0, -1, fn_1_4AB4); + var_r31->work[0] = 0; +} + +void fn_1_4AB0(void) { } + +void fn_1_4AB4(omObjData *object) +{ + s32 var_r30; + + omSetTra(object, 0.0f, 0.0f, 0.0f); + object->model[0] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_M443, 0)); + Hu3DModelLayerSet(object->model[0], 2); + object->model[2] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_M443, 2)); + Hu3DModelLayerSet(object->model[2], 2); + Hu3DModelAttrSet(object->model[2], 1); + object->model[3] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_M443, 4)); + Hu3DModelLayerSet(object->model[3], 2); + Hu3DMotionSpeedSet(object->model[3], 0.0f); + object->model[4] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_M443, 3)); + Hu3DModelLayerSet(object->model[4], 2); + for (var_r30 = 0; var_r30 < 4; var_r30++) { + object->model[var_r30 + 5] = Hu3DModelLink(object->model[4]); + Hu3DModelLayerSet(object->model[var_r30 + 5], 2); + Hu3DModelScaleSet(object->model[var_r30 + 5], 0.93f, 0.93f, 0.93f); + } + for (var_r30 = 0; var_r30 < 4; var_r30++) { + object->model[var_r30 + 9] = Hu3DModelCreateFile(DATA_MAKE_NUM(DATADIR_M443, 1)); + Hu3DModelLayerSet(object->model[var_r30 + 9], 2); + Hu3DMotionSpeedSet(object->model[var_r30 + 9], 0.0f); + } + object->work[0] = 0; + object->work[1] = 0; + object->work[2] = 0; + object->work[3] = 0; + object->func = fn_1_4D14; +} + +typedef struct M443DllMapUnkStruct { + Vec unk_00[4]; + float unk_30; +} M443DllMapUnkStruct; /* size = 0x34 */ + +void fn_1_4D14(omObjData *object) +{ + float var_f31; + float var_f30; + + M443DllCameraStruct *var_r30; + s32 var_r29; + s32 var_r28; + + var_r28 = 1; + { + Mtx sp5C; + Vec sp20; + Vec sp14; + Vec sp8 = { 0.0f, 0.0f, 0.0f }; + Vec sp2C[4] = { + { -50.0f, 0.0f, -150.0f }, + { 50.0f, 0.0f, -150.0f }, + { -50.0f, 0.0f, -150.0f }, + { 50.0f, 0.0f, -150.0f }, + }; + + for (var_r29 = 0; var_r29 < 5; var_r29++) { + var_r30 = fn_1_40AC(lbl_1_data_240[var_r29]); + sp20.x = var_r30->unk_1C.x + (var_r30->unk_34 * (sind(var_r30->unk_28.y) * cosd(var_r30->unk_28.x))); + sp20.y = var_r30->unk_1C.y + (var_r30->unk_34 * -sind(var_r30->unk_28.x)); + sp20.z = var_r30->unk_1C.z + (var_r30->unk_34 * (cosd(var_r30->unk_28.y) * cosd(var_r30->unk_28.x))); + Hu3DModelPosSetV(object->model[var_r29 + 4], &sp20); + fn_1_421C(object->model[var_r29 + 4], lbl_1_data_240[var_r29]); + } + object->work[1] += 1; + var_f31 = 150.0f; + switch (object->work[0]) { + case 0: + if (fn_1_3FFC() == 4) { + object->work[0] += 1; + object->work[1] = 0; + } + break; + case 1: + var_f30 = 1.0f - (0.016666668f * object->work[1]); + if (var_f30 <= 0.0f) { + object->work[0] += 1; + object->work[1] = 0; + var_f30 = 0.0f; + } + var_f31 = var_f31 * var_f30; + break; + case 2: + var_f31 = 0.0f; + if (fn_1_42E4() < 2) { + object->work[1] = 0; + } + if (object->work[1] >= 60.0f) { + object->work[0] += 1; + object->work[1] = 0; + } + break; + case 3: + var_f30 = 0.016666668f * object->work[1]; + if (var_f30 > 1.0f) { + object->work[0] += 1; + object->work[1] = 0; + var_r28 = 0; + } + var_f31 = var_f31 * var_f30; + break; + default: + var_r28 = 0; + break; + } + for (var_r29 = 0; var_r29 < 4; var_r29++) { + var_r30 = fn_1_40AC(lbl_1_data_240[var_r29 + 1]); + mtxRot(sp5C, var_r30->unk_28.x, var_r30->unk_28.y, 0.0f); + sp8.z = var_r30->unk_34; + PSMTXMultVec(sp5C, &sp8, &sp14); + PSVECAdd(&var_r30->unk_1C, &sp14, &sp20); + sp2C[var_r29].y += var_f31; + PSMTXMultVec(sp5C, &sp2C[var_r29], &sp14); + PSVECAdd(&sp20, &sp14, &sp20); + Hu3DModelPosSetV(object->model[var_r29 + 9], &sp20); + Hu3DModelRotSet(object->model[var_r29 + 9], var_r30->unk_28.x, var_r30->unk_28.y, 0.0f); + Hu3DModelScaleSet(object->model[var_r29 + 9], 0.15f, 0.15f, 0.15f); + fn_1_421C(object->model[var_r29 + 9], lbl_1_data_240[var_r29 + 1]); + if (fn_1_42E4() >= 1) { + if (object->work[2] == 0) { + object->work[2] = 1; + object->work[3] = 0; + } + Hu3DMotionSpeedSet(object->model[var_r29 + 9], 0.95f); + if (var_r28 == 0) { + Hu3DModelAttrSet(object->model[var_r29 + 9], 1); + } + } + } + if (object->work[2] != 0) { + object->work[3] += 1; + if (object->work[3] >= 60.0f) { + switch (object->work[2]) { + case 1: + case 2: + HuAudFXPlay(0x725); + break; + case 3: + HuAudFXPlay(0x726); + break; + } + object->work[2] += 1; + object->work[3] = 0; + } + } + if (fn_1_42E4() == 2) { + Hu3DMotionSpeedSet(object->model[3], 1.0f); + } + else if (fn_1_42E4() == 5) { + Hu3DModelAttrSet(object->model[3], 1); + } + if (fn_1_42E4() == 5) { + Hu3DModelAttrReset(object->model[2], 1); + Hu3DModelShadowMapSet(object->model[0]); + Hu3DModelShadowMapSet(object->model[2]); + } + } +} diff --git a/src/REL/m443Dll/player.c b/src/REL/m443Dll/player.c new file mode 100644 index 00000000..98e6f793 --- /dev/null +++ b/src/REL/m443Dll/player.c @@ -0,0 +1,16 @@ +#include "ext_math.h" +#include "game/audio.h" +#include "game/chrman.h" +#include "game/hsfman.h" +#include "game/hsfmotion.h" +#include "game/objsub.h" +#include "game/pad.h" +#include "game/sprite.h" +#include "string.h" + +#ifndef __MWERKS__ +#include "game/esprite.h" +#include "game/frand.h" +#endif + +#include "REL/m443Dll.h"