diff --git a/.gitignore b/.gitignore index 65658a04..81558d47 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,4 @@ orig/*/* !orig/*/.gitkeep /*.txt ctx.c -tools/output/* +tools/output/* \ No newline at end of file diff --git a/config/GMPE01_00/rels/bootDll/splits.txt b/config/GMPE01_00/rels/bootDll/splits.txt index 1cdd17c0..49f64a4a 100644 --- a/config/GMPE01_00/rels/bootDll/splits.txt +++ b/config/GMPE01_00/rels/bootDll/splits.txt @@ -9,7 +9,7 @@ Sections: REL/executor.c: .text start:0x00000000 end:0x000000A0 -REL/bootDll/bootDll.c: +REL/bootDll/main.c: .text start:0x000000A0 end:0x00002944 .rodata start:0x00000000 end:0x000000DC .data start:0x00000000 end:0x000000A0 diff --git a/config/GMPE01_00/rels/m405Dll/splits.txt b/config/GMPE01_00/rels/m405Dll/splits.txt index 531cd645..1cdde2c1 100644 --- a/config/GMPE01_00/rels/m405Dll/splits.txt +++ b/config/GMPE01_00/rels/m405Dll/splits.txt @@ -5,3 +5,9 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/m405Dll/main.c: + .text start:0x00000000 end:0x0000B734 + .rodata start:0x00000000 end:0x000001F0 + .data start:0x00000000 end:0x000004B4 + .bss start:0x00000000 end:0x0000079C diff --git a/config/GMPE01_00/rels/m406Dll/splits.txt b/config/GMPE01_00/rels/m406Dll/splits.txt index 531cd645..dfb4354e 100644 --- a/config/GMPE01_00/rels/m406Dll/splits.txt +++ b/config/GMPE01_00/rels/m406Dll/splits.txt @@ -5,3 +5,24 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/executor.c: + .text start:0x00000000 end:0x000000A0 + +REL/m406Dll/main.c: + .text start:0x000000A0 end:0x00002308 + .rodata start:0x00000000 end:0x00000080 + .data start:0x00000000 end:0x000000F0 + .bss start:0x00000000 end:0x00000030 + +REL/m406Dll/map.c: + .text start:0x00002308 end:0x0000D65C + .rodata start:0x00000080 end:0x000002B8 + .data start:0x000000F0 end:0x00000960 + .bss start:0x00000030 end:0x000000D8 + +REL/m406Dll/player.c: + .text start:0x0000D65C end:0x00014724 + .rodata start:0x000002B8 end:0x0000043C + .data start:0x00000960 end:0x00001230 + .bss start:0x000000D8 end:0x000001FC diff --git a/config/GMPE01_00/rels/m406Dll/symbols.txt b/config/GMPE01_00/rels/m406Dll/symbols.txt index 67393891..325549ff 100644 --- a/config/GMPE01_00/rels/m406Dll/symbols.txt +++ b/config/GMPE01_00/rels/m406Dll/symbols.txt @@ -1,6 +1,6 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global _epilog = .text:0x00000054; // type:function size:0x4C scope:global -fn_1_A0 = .text:0x000000A0; // type:function size:0x318 +ModuleProlog = .text:0x000000A0; // type:function size:0x318 fn_1_3B8 = .text:0x000003B8; // type:function size:0x54 fn_1_40C = .text:0x0000040C; // type:function size:0xD00 fn_1_110C = .text:0x0000110C; // type:function size:0x5C @@ -357,11 +357,11 @@ lbl_1_data_838 = .data:0x00000838; // type:object size:0xC lbl_1_data_844 = .data:0x00000844; // type:object size:0xC lbl_1_data_850 = .data:0x00000850; // type:object size:0x20 lbl_1_data_870 = .data:0x00000870; // type:object size:0x1F data:string -lbl_1_data_88F = .data:0x0000088F; // type:object size:0x1 data:byte -lbl_1_data_893 = .data:0x00000893; // type:object size:0x1 data:byte -lbl_1_data_897 = .data:0x00000897; // type:object size:0x1 data:byte -lbl_1_data_89B = .data:0x0000089B; // type:object size:0x1 data:byte -lbl_1_data_89F = .data:0x0000089F; // type:object size:0x5 data:byte +lbl_1_data_88F = .data:0x0000088F; // type:object size:0x4 data:byte +lbl_1_data_893 = .data:0x00000893; // type:object size:0x4 data:byte +lbl_1_data_897 = .data:0x00000897; // type:object size:0x4 data:byte +lbl_1_data_89B = .data:0x0000089B; // type:object size:0x4 data:byte +lbl_1_data_89F = .data:0x0000089F; // type:object size:0x4 data:byte lbl_1_data_8A4 = .data:0x000008A4; // type:object size:0x10 lbl_1_data_8B4 = .data:0x000008B4; // type:object size:0x10 lbl_1_data_8C4 = .data:0x000008C4; // type:object size:0xC diff --git a/config/GMPE01_00/rels/m407dll/splits.txt b/config/GMPE01_00/rels/m407dll/splits.txt index 531cd645..273b18ae 100644 --- a/config/GMPE01_00/rels/m407dll/splits.txt +++ b/config/GMPE01_00/rels/m407dll/splits.txt @@ -5,3 +5,53 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/executor.c: + .text start:0x00000000 end:0x000000A0 + +REL/m407dll/player.c: + .text start:0x000000A0 end:0x000014F0 + .rodata start:0x00000000 end:0x000000B8 + .data start:0x00000000 end:0x00000198 + .bss start:0x00000000 end:0x00000020 + +REL/m407dll/map.c: + .text start:0x000014F0 end:0x00001B1C + .rodata start:0x000000B8 end:0x000000D8 + .data start:0x00000198 end:0x00000228 + .bss start:0x00000020 end:0x00000030 + +REL/m407dll/camera.c: + .text start:0x00001B1C end:0x00002354 + .rodata start:0x000000D8 end:0x00000120 + .bss start:0x00000030 end:0x00000038 + +REL/m407dll/whomp.c: + .text start:0x00002354 end:0x00003AC8 + .rodata start:0x00000120 end:0x00000168 + .data start:0x00000228 end:0x00000278 + .bss start:0x00000038 end:0x000037C8 + +REL/m407dll/whomp_score.c: + .text start:0x00003AC8 end:0x000041CC + .rodata start:0x00000168 end:0x00000188 + .data start:0x00000278 end:0x00000288 + .bss start:0x000037C8 end:0x000037E0 + +REL/m407dll/effect.c: + .text start:0x000041CC end:0x00004980 + .rodata start:0x00000188 end:0x00000190 + .data start:0x00000288 end:0x000002A8 + .bss start:0x000037E0 end:0x00003978 + +REL/m407dll/main.c: + .text start:0x00004980 end:0x00005C5C + .rodata start:0x00000190 end:0x000001F0 + .data start:0x000002A8 end:0x00000360 + .bss start:0x00003978 end:0x00003988 + +REL/m407dll/score.c: + .text start:0x00005C5C end:0x00006404 + .rodata start:0x000001F0 end:0x00000220 + .data start:0x00000360 end:0x0000036C + .bss start:0x00003988 end:0x00003990 diff --git a/config/GMPE01_00/rels/m407dll/symbols.txt b/config/GMPE01_00/rels/m407dll/symbols.txt index 4fb3dbd8..f89ae85a 100644 --- a/config/GMPE01_00/rels/m407dll/symbols.txt +++ b/config/GMPE01_00/rels/m407dll/symbols.txt @@ -1,6 +1,6 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global _epilog = .text:0x00000054; // type:function size:0x4C scope:global -fn_1_A0 = .text:0x000000A0; // type:function size:0x54 +ModuleProlog = .text:0x000000A0; // type:function size:0x54 fn_1_F4 = .text:0x000000F4; // type:function size:0xA0 fn_1_194 = .text:0x00000194; // type:function size:0x50 fn_1_1E4 = .text:0x000001E4; // type:function size:0x54 @@ -196,7 +196,7 @@ lbl_1_rodata_1C0 = .rodata:0x000001C0; // type:object size:0x4 data:float lbl_1_rodata_1C8 = .rodata:0x000001C8; // type:object size:0x8 data:double lbl_1_rodata_1D0 = .rodata:0x000001D0; // type:object size:0xC data:4byte lbl_1_rodata_1DC = .rodata:0x000001DC; // type:object size:0xC data:4byte -lbl_1_rodata_1E8 = .rodata:0x000001E8; // type:object size:0x8 data:float +lbl_1_rodata_1E8 = .rodata:0x000001E8; // 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:0x4 data:float @@ -210,24 +210,24 @@ lbl_1_rodata_218 = .rodata:0x00000218; // type:object size:0x4 data:float lbl_1_rodata_21C = .rodata:0x0000021C; // type:object size:0x4 data:float lbl_1_data_0 = .data:0x00000000; // type:object size:0x100 lbl_1_data_100 = .data:0x00000100; // type:object size:0x20 -lbl_1_data_120 = .data:0x00000120; // type:object size:0x1C +lbl_1_data_120 = .data:0x00000120; // type:object size:0x19 data:string lbl_1_data_13C = .data:0x0000013C; // type:object size:0x20 lbl_1_data_15C = .data:0x0000015C; // type:object size:0x28 lbl_1_data_184 = .data:0x00000184; // type:object size:0x8 -lbl_1_data_18C = .data:0x0000018C; // type:object size:0xC +lbl_1_data_18C = .data:0x0000018C; // type:object size:0xB data:string lbl_1_data_198 = .data:0x00000198; // type:object size:0x34 data:4byte lbl_1_data_1CC = .data:0x000001CC; // type:object size:0x30 lbl_1_data_1FC = .data:0x000001FC; // type:object size:0xC data:float lbl_1_data_208 = .data:0x00000208; // type:object size:0xC lbl_1_data_214 = .data:0x00000214; // type:object size:0x4 -lbl_1_data_218 = .data:0x00000218; // type:object size:0x10 +lbl_1_data_218 = .data:0x00000218; // type:object size:0xC lbl_1_data_228 = .data:0x00000228; // type:object size:0x10 data:4byte lbl_1_data_238 = .data:0x00000238; // type:object size:0x20 data:4byte lbl_1_data_258 = .data:0x00000258; // type:object size:0x14 -lbl_1_data_26C = .data:0x0000026C; // type:object size:0xC -lbl_1_data_278 = .data:0x00000278; // type:object size:0x10 +lbl_1_data_26C = .data:0x0000026C; // type:object size:0xB data:string +lbl_1_data_278 = .data:0x00000278; // type:object size:0xC lbl_1_data_288 = .data:0x00000288; // type:object size:0x14 -lbl_1_data_29C = .data:0x0000029C; // type:object size:0xC +lbl_1_data_29C = .data:0x0000029C; // type:object size:0x8 lbl_1_data_2A8 = .data:0x000002A8; // type:object size:0x34 lbl_1_data_2DC = .data:0x000002DC; // type:object size:0x10 lbl_1_data_2EC = .data:0x000002EC; // type:object size:0xC @@ -245,7 +245,7 @@ lbl_1_data_358 = .data:0x00000358; // type:object size:0x8 lbl_1_data_360 = .data:0x00000360; // type:object size:0xC lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x8 data:4byte lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x10 data:4byte -lbl_1_bss_18 = .bss:0x00000018; // type:object size:0x8 data:4byte +lbl_1_bss_18 = .bss:0x00000018; // type:object size:0x4 data:4byte lbl_1_bss_20 = .bss:0x00000020; // type:object size:0x4 data:4byte lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x2 data:2byte lbl_1_bss_28 = .bss:0x00000028; // type:object size:0x4 data:4byte @@ -259,13 +259,13 @@ lbl_1_bss_66 = .bss:0x00000066; // type:object size:0x2 data:2byte lbl_1_bss_68 = .bss:0x00000068; // type:object size:0x1E30 data:2byte lbl_1_bss_1E98 = .bss:0x00001E98; // type:object size:0xF18 lbl_1_bss_2DB0 = .bss:0x00002DB0; // type:object size:0xA10 -lbl_1_bss_37C0 = .bss:0x000037C0; // type:object size:0x8 data:4byte +lbl_1_bss_37C0 = .bss:0x000037C0; // type:object size:0x4 data:4byte lbl_1_bss_37C8 = .bss:0x000037C8; // type:object size:0x10 -lbl_1_bss_37D8 = .bss:0x000037D8; // type:object size:0x8 data:4byte +lbl_1_bss_37D8 = .bss:0x000037D8; // type:object size:0x4 data:4byte lbl_1_bss_37E0 = .bss:0x000037E0; // type:object size:0x190 -lbl_1_bss_3970 = .bss:0x00003970; // type:object size:0x8 data:4byte +lbl_1_bss_3970 = .bss:0x00003970; // type:object size:0x4 data:4byte lbl_1_bss_3978 = .bss:0x00003978; // type:object size:0x2 data:2byte lbl_1_bss_397C = .bss:0x0000397C; // type:object size:0x4 data:4byte -lbl_1_bss_3980 = .bss:0x00003980; // type:object size:0x8 data:4byte +lbl_1_bss_3980 = .bss:0x00003980; // type:object size:0x4 data:4byte lbl_1_bss_3988 = .bss:0x00003988; // type:object size:0x4 data:4byte lbl_1_bss_398C = .bss:0x0000398C; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/messDll/splits.txt b/config/GMPE01_00/rels/messDll/splits.txt index 531cd645..1f102c76 100644 --- a/config/GMPE01_00/rels/messDll/splits.txt +++ b/config/GMPE01_00/rels/messDll/splits.txt @@ -5,3 +5,12 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/executor.c: + .text start:0x00000000 end:0x000000A0 + +REL/messDll/main.c: + .text start:0x000000A0 end:0x000014A0 + .rodata start:0x00000000 end:0x00000078 + .data start:0x00000000 end:0x00000460 + .bss start:0x00000000 end:0x00000038 diff --git a/config/GMPE01_00/rels/messDll/symbols.txt b/config/GMPE01_00/rels/messDll/symbols.txt index f17a0354..4ff0390b 100644 --- a/config/GMPE01_00/rels/messDll/symbols.txt +++ b/config/GMPE01_00/rels/messDll/symbols.txt @@ -1,6 +1,6 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global _epilog = .text:0x00000054; // type:function size:0x4C scope:global -fn_1_A0 = .text:0x000000A0; // type:function size:0x21C +ModuleProlog = .text:0x000000A0; // type:function size:0x21C fn_1_2BC = .text:0x000002BC; // type:function size:0x44 fn_1_300 = .text:0x00000300; // type:function size:0xB88 fn_1_E88 = .text:0x00000E88; // type:function size:0x328 diff --git a/config/GMPE01_00/rels/mstory2Dll/splits.txt b/config/GMPE01_00/rels/mstory2Dll/splits.txt index 531cd645..43465253 100644 --- a/config/GMPE01_00/rels/mstory2Dll/splits.txt +++ b/config/GMPE01_00/rels/mstory2Dll/splits.txt @@ -5,3 +5,50 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/mstory2Dll/main.c: + .text start:0x00000000 end:0x00007DB0 + .rodata start:0x00000000 end:0x00000118 + .data start:0x00000000 end:0x000003A0 + .bss start:0x00000000 end:0x00000078 + +REL/mstory2Dll/board_entrance.c: + .text start:0x00007DB0 end:0x0000B37C + .rodata start:0x00000118 end:0x000001A8 + .data start:0x000003A0 end:0x00000520 + .bss start:0x00000078 end:0x00000298 + +REL/mstory2Dll/board_clear.c: + .text start:0x0000B37C end:0x0000E570 + .rodata start:0x000001A8 end:0x00000248 + .data start:0x00000520 end:0x00000698 + .bss start:0x00000298 end:0x000004E0 + +REL/mstory2Dll/board_miss.c: + .text start:0x0000E570 end:0x000123C8 + .rodata start:0x00000248 end:0x00000310 + .data start:0x00000698 end:0x00000D50 + .bss start:0x000004E0 end:0x00000790 + +REL/mstory2Dll/mg_clear.c: + .text start:0x000123C8 end:0x00016060 + .rodata start:0x00000310 end:0x000003D0 + .data start:0x00000D50 end:0x00000DB8 + .bss start:0x00000790 end:0x00000968 + +REL/mstory2Dll/mg_miss.c: + .text start:0x00016060 end:0x000186D0 + .rodata start:0x000003D0 end:0x00000440 + .data start:0x00000DB8 end:0x00000EF8 + .bss start:0x00000968 end:0x00000B38 + +REL/mstory2Dll/ending.c: + .text start:0x000186D0 end:0x0001B560 + .rodata start:0x00000440 end:0x000004B8 + .data start:0x00000EF8 end:0x00001113 + .bss start:0x00000B38 end:0x00000D10 + +REL/mstory2Dll/save.c: + .text start:0x0001B560 end:0x0001B95C + .rodata start:0x000004B8 end:0x000004C8 + .bss start:0x00000D10 end:0x00000D18 diff --git a/config/GMPE01_00/rels/mstory2Dll/symbols.txt b/config/GMPE01_00/rels/mstory2Dll/symbols.txt index 43271272..de1259ef 100644 --- a/config/GMPE01_00/rels/mstory2Dll/symbols.txt +++ b/config/GMPE01_00/rels/mstory2Dll/symbols.txt @@ -537,7 +537,8 @@ lbl_1_data_2F6 = .data:0x000002F6; // type:object size:0x12 lbl_1_data_308 = .data:0x00000308; // type:object size:0x20 lbl_1_data_328 = .data:0x00000328; // type:object size:0x60 lbl_1_data_388 = .data:0x00000388; // type:object size:0x11 data:string -lbl_1_data_399 = .data:0x00000399; // type:object size:0x33 +lbl_1_data_399 = .data:0x00000399; // type:object size:0x2 data:string +lbl_1_data_3A0 = .data:0x000003A0; // type:object size:0x2C lbl_1_data_3CC = .data:0x000003CC; // type:object size:0x10 lbl_1_data_3DC = .data:0x000003DC; // type:object size:0x4 data:4byte lbl_1_data_3E0 = .data:0x000003E0; // type:object size:0x8 data:4byte @@ -555,7 +556,7 @@ lbl_1_data_4B5 = .data:0x000004B5; // type:object size:0x14 data:string lbl_1_data_4C9 = .data:0x000004C9; // type:object size:0xA data:string lbl_1_data_4D3 = .data:0x000004D3; // type:object size:0x1C data:string lbl_1_data_4EF = .data:0x000004EF; // type:object size:0x1D data:string -lbl_1_data_50C = .data:0x0000050C; // type:object size:0x14 +lbl_1_data_50C = .data:0x0000050C; // type:object size:0xF data:string lbl_1_data_520 = .data:0x00000520; // type:object size:0x16 data:string lbl_1_data_536 = .data:0x00000536; // type:object size:0x15 data:string lbl_1_data_54B = .data:0x0000054B; // type:object size:0x16 data:string @@ -572,7 +573,8 @@ lbl_1_data_61F = .data:0x0000061F; // type:object size:0x1D data:string lbl_1_data_63C = .data:0x0000063C; // type:object size:0x10 data:string lbl_1_data_64C = .data:0x0000064C; // type:object size:0x1C data:string lbl_1_data_668 = .data:0x00000668; // type:object size:0x30 -lbl_1_data_698 = .data:0x00000698; // type:object size:0x3C +lbl_1_data_698 = .data:0x00000698; // type:object size:0x1C +lbl_1_data_6B4 = .data:0x000006B4; // type:object size:0x20 lbl_1_data_6D4 = .data:0x000006D4; // type:object size:0x16 data:string lbl_1_data_6EA = .data:0x000006EA; // type:object size:0x15 data:string lbl_1_data_6FF = .data:0x000006FF; // type:object size:0x16 data:string @@ -588,7 +590,7 @@ lbl_1_data_7B7 = .data:0x000007B7; // type:object size:0x1C data:string lbl_1_data_7D3 = .data:0x000007D3; // type:object size:0x1D data:string lbl_1_data_7F0 = .data:0x000007F0; // type:object size:0x10 data:string lbl_1_data_800 = .data:0x00000800; // type:object size:0x1C -lbl_1_data_81C = .data:0x0000081C; // type:object size:0x34 +lbl_1_data_81C = .data:0x0000081C; // type:object size:0x30 lbl_1_data_850 = .data:0x00000850; // type:object size:0x3C0 lbl_1_data_C10 = .data:0x00000C10; // type:object size:0x10 lbl_1_data_C20 = .data:0x00000C20; // type:object size:0x4 data:4byte @@ -610,7 +612,7 @@ lbl_1_data_D33 = .data:0x00000D33; // type:object size:0x1D data:string lbl_1_data_D50 = .data:0x00000D50; // type:object size:0x1C data:string lbl_1_data_D6C = .data:0x00000D6C; // type:object size:0x31 data:string lbl_1_data_D9D = .data:0x00000D9D; // type:object size:0x10 data:string -lbl_1_data_DAD = .data:0x00000DAD; // type:object size:0xB +lbl_1_data_DAD = .data:0x00000DAD; // type:object size:0x7 data:string lbl_1_data_DB8 = .data:0x00000DB8; // type:object size:0x15 data:string lbl_1_data_DCD = .data:0x00000DCD; // type:object size:0x14 data:string lbl_1_data_DE1 = .data:0x00000DE1; // type:object size:0x15 data:string @@ -625,7 +627,7 @@ lbl_1_data_E85 = .data:0x00000E85; // type:object size:0xA data:string lbl_1_data_E8F = .data:0x00000E8F; // type:object size:0x1C data:string lbl_1_data_EAB = .data:0x00000EAB; // type:object size:0x1D data:string lbl_1_data_EC8 = .data:0x00000EC8; // type:object size:0x10 data:string -lbl_1_data_ED8 = .data:0x00000ED8; // type:object size:0x20 +lbl_1_data_ED8 = .data:0x00000ED8; // type:object size:0x1C data:string lbl_1_data_EF8 = .data:0x00000EF8; // type:object size:0x10 lbl_1_data_F08 = .data:0x00000F08; // type:object size:0x4 data:4byte lbl_1_data_F0C = .data:0x00000F0C; // type:object size:0x8 data:4byte @@ -654,8 +656,10 @@ lbl_1_data_10BA = .data:0x000010BA; // type:object size:0x15 data:string lbl_1_data_10CF = .data:0x000010CF; // type:object size:0x15 data:string lbl_1_data_10E4 = .data:0x000010E4; // type:object size:0x20 lbl_1_data_1104 = .data:0x00001104; // type:object size:0xF data:string -lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x24 data:4byte -lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x54 data:float +lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte +lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x20 data:4byte +lbl_1_bss_24 = .bss:0x00000024; // type:object size:0x44 data:float +lbl_1_bss_68 = .bss:0x00000068; // type:object size:0xC data:float lbl_1_bss_78 = .bss:0x00000078; // type:object size:0x10 data:4byte lbl_1_bss_88 = .bss:0x00000088; // type:object size:0x40 data:4byte lbl_1_bss_C8 = .bss:0x000000C8; // type:object size:0x4 data:4byte @@ -680,7 +684,7 @@ lbl_1_bss_5E8 = .bss:0x000005E8; // type:object size:0x28 data:4byte lbl_1_bss_610 = .bss:0x00000610; // type:object size:0x28 data:4byte lbl_1_bss_638 = .bss:0x00000638; // type:object size:0x28 data:4byte lbl_1_bss_660 = .bss:0x00000660; // type:object size:0x28 data:4byte -lbl_1_bss_688 = .bss:0x00000688; // type:object size:0x108 data:float +lbl_1_bss_688 = .bss:0x00000688; // type:object size:0x104 data:float lbl_1_bss_790 = .bss:0x00000790; // type:object size:0x4 data:4byte lbl_1_bss_794 = .bss:0x00000794; // type:object size:0x4 data:4byte lbl_1_bss_798 = .bss:0x00000798; // type:object size:0x28 data:4byte @@ -688,7 +692,7 @@ lbl_1_bss_7C0 = .bss:0x000007C0; // type:object size:0x28 data:4byte lbl_1_bss_7E8 = .bss:0x000007E8; // type:object size:0x28 data:4byte lbl_1_bss_810 = .bss:0x00000810; // type:object size:0x28 data:4byte lbl_1_bss_838 = .bss:0x00000838; // type:object size:0x28 data:4byte -lbl_1_bss_860 = .bss:0x00000860; // type:object size:0x108 data:4byte +lbl_1_bss_860 = .bss:0x00000860; // type:object size:0x104 data:4byte lbl_1_bss_968 = .bss:0x00000968; // type:object size:0x4 data:4byte lbl_1_bss_96C = .bss:0x0000096C; // type:object size:0x28 data:4byte lbl_1_bss_994 = .bss:0x00000994; // type:object size:0x28 data:4byte diff --git a/config/GMPE01_00/rels/mstory3Dll/splits.txt b/config/GMPE01_00/rels/mstory3Dll/splits.txt index 531cd645..ae5dd759 100644 --- a/config/GMPE01_00/rels/mstory3Dll/splits.txt +++ b/config/GMPE01_00/rels/mstory3Dll/splits.txt @@ -5,3 +5,27 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/mstory3Dll/main.c: + .text start:0x00000000 end:0x00006A78 + .rodata start:0x00000000 end:0x00000110 + .data start:0x00000000 end:0x00000130 + .bss start:0x00000000 end:0x00000058 + +REL/mstory3Dll/result_seq.c: + .text start:0x00006A78 end:0x000157F0 + .rodata start:0x00000110 end:0x00000418 + .data start:0x00000130 end:0x000007E0 + .bss start:0x00000058 end:0x000018D0 + +REL/mstory3Dll/result.c: + .text start:0x000157F0 end:0x0001DED8 + .rodata start:0x00000418 end:0x000005D0 + .data start:0x000007E0 end:0x00000A90 + .bss start:0x000018D0 end:0x00001CE8 + +REL/mstory3Dll/win_effect.c: + .text start:0x0001DED8 end:0x0001F100 + .rodata start:0x000005D0 end:0x00000644 + .data start:0x00000A90 end:0x00000AAB + .bss start:0x00001CE8 end:0x00001D50 diff --git a/config/GMPE01_00/rels/mstory3Dll/symbols.txt b/config/GMPE01_00/rels/mstory3Dll/symbols.txt index 9835d8ae..a6159435 100644 --- a/config/GMPE01_00/rels/mstory3Dll/symbols.txt +++ b/config/GMPE01_00/rels/mstory3Dll/symbols.txt @@ -345,7 +345,7 @@ lbl_1_rodata_3D4 = .rodata:0x000003D4; // type:object size:0x4 data:float lbl_1_rodata_3D8 = .rodata:0x000003D8; // type:object size:0x4 data:float lbl_1_rodata_3E0 = .rodata:0x000003E0; // type:object size:0x8 data:double lbl_1_rodata_3E8 = .rodata:0x000003E8; // type:object size:0x4 data:float -lbl_1_rodata_3EC = .rodata:0x000003EC; // type:object size:0x2C data:4byte +lbl_1_rodata_3EC = .rodata:0x000003EC; // type:object size:0x28 data:4byte lbl_1_rodata_418 = .rodata:0x00000418; // type:object size:0x8 data:double lbl_1_rodata_420 = .rodata:0x00000420; // type:object size:0x1 data:byte lbl_1_rodata_424 = .rodata:0x00000424; // type:object size:0x4 data:float @@ -442,14 +442,14 @@ lbl_1_rodata_638 = .rodata:0x00000638; // type:object size:0x8 data:double lbl_1_rodata_640 = .rodata:0x00000640; // type:object size:0x4 data:float lbl_1_data_0 = .data:0x00000000; // type:object size:0x70 lbl_1_data_70 = .data:0x00000070; // type:object size:0x25 data:string -lbl_1_data_95 = .data:0x00000095; // type:object size:0xF +lbl_1_data_95 = .data:0x00000095; // type:object size:0xD data:string lbl_1_data_A4 = .data:0x000000A4; // type:object size:0x8 lbl_1_data_AC = .data:0x000000AC; // type:object size:0x28 data:string lbl_1_data_D4 = .data:0x000000D4; // type:object size:0x10 data:string lbl_1_data_E4 = .data:0x000000E4; // type:object size:0x3 data:string lbl_1_data_E7 = .data:0x000000E7; // type:object size:0x1A data:string lbl_1_data_101 = .data:0x00000101; // type:object size:0x1A data:string -lbl_1_data_11B = .data:0x0000011B; // type:object size:0x15 +lbl_1_data_11B = .data:0x0000011B; // type:object size:0xE data:string lbl_1_data_130 = .data:0x00000130; // type:object size:0x30 data:float lbl_1_data_160 = .data:0x00000160; // type:object size:0x50 lbl_1_data_1B0 = .data:0x000001B0; // type:object size:0x50 @@ -465,11 +465,11 @@ lbl_1_data_2E8 = .data:0x000002E8; // type:object size:0x16 data:string lbl_1_data_2FE = .data:0x000002FE; // type:object size:0xF data:string lbl_1_data_30D = .data:0x0000030D; // type:object size:0x1C data:string lbl_1_data_329 = .data:0x00000329; // type:object size:0x1D data:string -lbl_1_data_346 = .data:0x00000346; // type:object size:0x1E +lbl_1_data_346 = .data:0x00000346; // type:object size:0x1C data:string lbl_1_data_364 = .data:0x00000364; // type:object size:0x8 data:4byte lbl_1_data_36C = .data:0x0000036C; // type:object size:0xC lbl_1_data_378 = .data:0x00000378; // type:object size:0xF data:string -lbl_1_data_387 = .data:0x00000387; // type:object size:0x11 +lbl_1_data_387 = .data:0x00000387; // type:object size:0x10 data:string jumptable_1_data_398 = .data:0x00000398; // type:object size:0x30 scope:local lbl_1_data_3C8 = .data:0x000003C8; // type:object size:0x46 data:string lbl_1_data_40E = .data:0x0000040E; // type:object size:0x30 data:string @@ -485,7 +485,7 @@ lbl_1_data_4D2 = .data:0x000004D2; // type:object size:0x10 data:string lbl_1_data_4E2 = .data:0x000004E2; // type:object size:0x10 data:string lbl_1_data_4F2 = .data:0x000004F2; // type:object size:0x12 lbl_1_data_504 = .data:0x00000504; // type:object size:0x288 -lbl_1_data_78C = .data:0x0000078C; // type:object size:0x54 +lbl_1_data_78C = .data:0x0000078C; // type:object size:0x5 lbl_1_data_7E0 = .data:0x000007E0; // type:object size:0x16 data:string lbl_1_data_7F6 = .data:0x000007F6; // type:object size:0x15 data:string lbl_1_data_80B = .data:0x0000080B; // type:object size:0x16 data:string @@ -508,7 +508,8 @@ lbl_1_data_A75 = .data:0x00000A75; // type:object size:0x1B lbl_1_data_A90 = .data:0x00000A90; // type:object size:0x13 data:string lbl_1_data_AA3 = .data:0x00000AA3; // type:object size:0x8 data:string lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte -lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x54 data:float +lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x44 data:float +lbl_1_bss_48 = .bss:0x00000048; // type:object size:0x10 data:float lbl_1_bss_58 = .bss:0x00000058; // type:object size:0x10 data:4byte lbl_1_bss_68 = .bss:0x00000068; // type:object size:0x40 data:4byte lbl_1_bss_A8 = .bss:0x000000A8; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/mstory4Dll/splits.txt b/config/GMPE01_00/rels/mstory4Dll/splits.txt index 531cd645..5789fb59 100644 --- a/config/GMPE01_00/rels/mstory4Dll/splits.txt +++ b/config/GMPE01_00/rels/mstory4Dll/splits.txt @@ -5,3 +5,9 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/mstory4Dll/main.c: + .text start:0x00000000 end:0x00001A2C + .rodata start:0x00000000 end:0x00000048 + .data start:0x00000000 end:0x000006F6 + .bss start:0x00000000 end:0x00000018 diff --git a/config/GMPE01_00/rels/mstoryDll/splits.txt b/config/GMPE01_00/rels/mstoryDll/splits.txt index 531cd645..b8e8873f 100644 --- a/config/GMPE01_00/rels/mstoryDll/splits.txt +++ b/config/GMPE01_00/rels/mstoryDll/splits.txt @@ -5,3 +5,39 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/mstoryDll/main.c: + .text start:0x00000000 end:0x00006AFC + .rodata start:0x00000000 end:0x00000100 + .data start:0x00000000 end:0x00000190 + .bss start:0x00000000 end:0x00000058 + +REL/mstoryDll/board_clear.c: + .text start:0x00006AFC end:0x0000A830 + .rodata start:0x00000100 end:0x00000268 + .data start:0x00000190 end:0x00000388 + .bss start:0x00000058 end:0x000002C8 + +REL/mstoryDll/board_miss.c: + .text start:0x0000A830 end:0x0000E710 + .rodata start:0x00000268 end:0x000003B8 + .data start:0x00000388 end:0x00000570 + .bss start:0x000002C8 end:0x00000558 + +REL/mstoryDll/mg_clear.c: + .text start:0x0000E710 end:0x00011624 + .rodata start:0x000003B8 end:0x000004E0 + .data start:0x00000570 end:0x00000AF8 + .bss start:0x00000558 end:0x00000710 + +REL/mstoryDll/mg_miss.c: + .text start:0x00011624 end:0x00013B48 + .rodata start:0x000004E0 end:0x000005A8 + .data start:0x00000AF8 end:0x00000C50 + .bss start:0x00000710 end:0x000008B8 + +REL/mstoryDll/save.c: + .text start:0x00013B48 end:0x000141A0 + .rodata start:0x000005A8 end:0x000005B8 + .data start:0x00000C50 end:0x00000C98 + .bss start:0x000008B8 end:0x000008C0 diff --git a/config/GMPE01_00/rels/mstoryDll/symbols.txt b/config/GMPE01_00/rels/mstoryDll/symbols.txt index e9076690..9bc5210b 100644 --- a/config/GMPE01_00/rels/mstoryDll/symbols.txt +++ b/config/GMPE01_00/rels/mstoryDll/symbols.txt @@ -277,7 +277,7 @@ 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:float lbl_1_rodata_268 = .rodata:0x00000268; // type:object size:0x1C data:4byte -lbl_1_rodata_284 = .rodata:0x00000284; // type:object size:0x1 data:byte +lbl_1_rodata_284 = .rodata:0x00000284; // type:object size:0x4 data:byte 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 @@ -390,7 +390,7 @@ lbl_1_data_138 = .data:0x00000138; // type:object size:0x10 data:string lbl_1_data_148 = .data:0x00000148; // type:object size:0x3 data:string lbl_1_data_14B = .data:0x0000014B; // type:object size:0x1A data:string lbl_1_data_165 = .data:0x00000165; // type:object size:0x1A data:string -lbl_1_data_17F = .data:0x0000017F; // type:object size:0x11 +lbl_1_data_17F = .data:0x0000017F; // type:object size:0xE data:string lbl_1_data_190 = .data:0x00000190; // type:object size:0x50 lbl_1_data_1E0 = .data:0x000001E0; // type:object size:0x3C lbl_1_data_21C = .data:0x0000021C; // type:object size:0x16 data:string @@ -406,8 +406,8 @@ lbl_1_data_2D9 = .data:0x000002D9; // type:object size:0x1C data:string lbl_1_data_2F5 = .data:0x000002F5; // type:object size:0x1D data:string lbl_1_data_312 = .data:0x00000312; // type:object size:0x17 data:string lbl_1_data_329 = .data:0x00000329; // type:object size:0xF data:string -lbl_1_data_338 = .data:0x00000338; // type:object size:0x1C -lbl_1_data_354 = .data:0x00000354; // type:object size:0x34 +lbl_1_data_338 = .data:0x00000338; // type:object size:0x1A data:string +lbl_1_data_354 = .data:0x00000354; // type:object size:0x30 lbl_1_data_388 = .data:0x00000388; // type:object size:0x50 lbl_1_data_3D8 = .data:0x000003D8; // type:object size:0x3C lbl_1_data_414 = .data:0x00000414; // type:object size:0x16 data:string @@ -424,7 +424,7 @@ lbl_1_data_4E8 = .data:0x000004E8; // type:object size:0x1D data:string lbl_1_data_505 = .data:0x00000505; // type:object size:0xF data:string lbl_1_data_514 = .data:0x00000514; // type:object size:0x1B data:string lbl_1_data_52F = .data:0x0000052F; // type:object size:0x8 data:string -lbl_1_data_537 = .data:0x00000537; // type:object size:0x9 +lbl_1_data_537 = .data:0x00000537; // type:object size:0x8 data:string lbl_1_data_540 = .data:0x00000540; // type:object size:0x30 lbl_1_data_570 = .data:0x00000570; // type:object size:0x3C0 lbl_1_data_930 = .data:0x00000930; // type:object size:0x50 @@ -445,7 +445,7 @@ lbl_1_data_ABA = .data:0x00000ABA; // type:object size:0xF data:string lbl_1_data_AC9 = .data:0x00000AC9; // type:object size:0x11 data:string lbl_1_data_ADA = .data:0x00000ADA; // type:object size:0xA data:string lbl_1_data_AE4 = .data:0x00000AE4; // type:object size:0x9 data:string -lbl_1_data_AED = .data:0x00000AED; // type:object size:0xB +lbl_1_data_AED = .data:0x00000AED; // type:object size:0x7 data:string lbl_1_data_AF8 = .data:0x00000AF8; // type:object size:0x3C lbl_1_data_B34 = .data:0x00000B34; // type:object size:0x15 data:string lbl_1_data_B49 = .data:0x00000B49; // type:object size:0x14 data:string @@ -459,10 +459,11 @@ lbl_1_data_BD8 = .data:0x00000BD8; // type:object size:0xF data:string lbl_1_data_BE7 = .data:0x00000BE7; // type:object size:0x1C data:string lbl_1_data_C03 = .data:0x00000C03; // type:object size:0x1D data:string lbl_1_data_C20 = .data:0x00000C20; // type:object size:0xF data:string -lbl_1_data_C2F = .data:0x00000C2F; // type:object size:0x21 +lbl_1_data_C2F = .data:0x00000C2F; // type:object size:0x1A data:string lbl_1_data_C50 = .data:0x00000C50; // type:object size:0x48 data:string lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte -lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x54 data:4byte +lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x44 data:4byte +lbl_1_bss_48 = .bss:0x00000048; // type:object size:0xC data:4byte lbl_1_bss_58 = .bss:0x00000058; // type:object size:0x10 data:4byte lbl_1_bss_68 = .bss:0x00000068; // type:object size:0x40 data:4byte lbl_1_bss_A8 = .bss:0x000000A8; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/resultDll/splits.txt b/config/GMPE01_00/rels/resultDll/splits.txt index 531cd645..e3323be0 100644 --- a/config/GMPE01_00/rels/resultDll/splits.txt +++ b/config/GMPE01_00/rels/resultDll/splits.txt @@ -5,3 +5,23 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/executor.c: + .text start:0x00000000 end:0x000000A0 + +REL/resultDll/main.c: + .text start:0x000000A0 end:0x00006490 + .rodata start:0x00000000 end:0x00000160 + .data start:0x00000000 end:0x000004E8 + .bss start:0x00000000 end:0x00000190 + +REL/resultDll/battle.c: + .text start:0x00006490 end:0x00008FF8 + .rodata start:0x00000160 end:0x00000220 + .data start:0x000004E8 end:0x000008B8 + .bss start:0x00000190 end:0x00001ADC + +REL/resultDll/datalist.c: + .text start:0x00008FF8 end:0x0000942C + .rodata start:0x00000220 end:0x00000230 + .data start:0x000008B8 end:0x00000918 diff --git a/config/GMPE01_00/rels/resultDll/symbols.txt b/config/GMPE01_00/rels/resultDll/symbols.txt index 07d67720..28077d73 100644 --- a/config/GMPE01_00/rels/resultDll/symbols.txt +++ b/config/GMPE01_00/rels/resultDll/symbols.txt @@ -1,6 +1,6 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global _epilog = .text:0x00000054; // type:function size:0x4C scope:global -fn_1_A0 = .text:0x000000A0; // type:function size:0x438 +ModuleProlog = .text:0x000000A0; // type:function size:0x438 fn_1_4D8 = .text:0x000004D8; // type:function size:0x3B0 fn_1_888 = .text:0x00000888; // type:function size:0x2F0 fn_1_B78 = .text:0x00000B78; // type:function size:0x13D4 @@ -145,11 +145,12 @@ lbl_1_data_3F8 = .data:0x000003F8; // type:object size:0x10 lbl_1_data_408 = .data:0x00000408; // type:object size:0x30 lbl_1_data_438 = .data:0x00000438; // type:object size:0x10 lbl_1_data_448 = .data:0x00000448; // type:object size:0x8 -lbl_1_data_450 = .data:0x00000450; // type:object size:0x38 +lbl_1_data_450 = .data:0x00000450; // type:object size:0x18 +lbl_1_data_468 = .data:0x00000468; // type:object size:0x20 lbl_1_data_488 = .data:0x00000488; // type:object size:0x30 lbl_1_data_4B8 = .data:0x000004B8; // type:object size:0x11 data:string lbl_1_data_4C9 = .data:0x000004C9; // type:object size:0x11 data:string -lbl_1_data_4DA = .data:0x000004DA; // type:object size:0xE +lbl_1_data_4DA = .data:0x000004DA; // type:object size:0xB data:string lbl_1_data_4E8 = .data:0x000004E8; // type:object size:0x270 lbl_1_data_758 = .data:0x00000758; // type:object size:0x28 lbl_1_data_780 = .data:0x00000780; // type:object size:0x70 @@ -160,7 +161,7 @@ lbl_1_data_860 = .data:0x00000860; // type:object size:0x20 lbl_1_data_880 = .data:0x00000880; // type:object size:0x20 lbl_1_data_8A0 = .data:0x000008A0; // type:object size:0x6 data:2byte lbl_1_data_8A6 = .data:0x000008A6; // type:object size:0x8 data:string -lbl_1_data_8AE = .data:0x000008AE; // type:object size:0xA +lbl_1_data_8AE = .data:0x000008AE; // type:object size:0x8 data:string lbl_1_data_8B8 = .data:0x000008B8; // type:object size:0x60 lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte @@ -187,7 +188,7 @@ lbl_1_bss_174 = .bss:0x00000174; // type:object size:0x4 data:4byte lbl_1_bss_178 = .bss:0x00000178; // type:object size:0x4 data:4byte lbl_1_bss_17C = .bss:0x0000017C; // type:object size:0x2 data:2byte lbl_1_bss_180 = .bss:0x00000180; // type:object size:0x4 data:4byte -lbl_1_bss_184 = .bss:0x00000184; // type:object size:0xC data:4byte +lbl_1_bss_184 = .bss:0x00000184; // type:object size:0x8 data:4byte lbl_1_bss_190 = .bss:0x00000190; // type:object size:0x4 data:4byte lbl_1_bss_194 = .bss:0x00000194; // type:object size:0x1680 lbl_1_bss_1814 = .bss:0x00001814; // type:object size:0x14 diff --git a/config/GMPE01_00/rels/safDll/splits.txt b/config/GMPE01_00/rels/safDll/splits.txt index 531cd645..d7dd15cb 100644 --- a/config/GMPE01_00/rels/safDll/splits.txt +++ b/config/GMPE01_00/rels/safDll/splits.txt @@ -5,3 +5,9 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/safDll/main.c: + .text start:0x00000000 end:0x000003AC + .rodata start:0x00000000 end:0x00000024 + .data start:0x00000000 end:0x00000039 + .bss start:0x00000000 end:0x00000300 diff --git a/config/GMPE01_00/rels/selmenuDll/splits.txt b/config/GMPE01_00/rels/selmenuDll/splits.txt index 0c8a822e..39e27b1f 100644 --- a/config/GMPE01_00/rels/selmenuDll/splits.txt +++ b/config/GMPE01_00/rels/selmenuDll/splits.txt @@ -9,7 +9,7 @@ Sections: REL/executor.c: .text start:0x00000000 end:0x000000A0 -REL/selmenuDll/selmenuDll.c: +REL/selmenuDll/main.c: .text start:0x000000A0 end:0x00005198 .rodata start:0x00000000 end:0x00000084 .data start:0x00000000 end:0x00000B3F diff --git a/config/GMPE01_00/rels/staffDll/splits.txt b/config/GMPE01_00/rels/staffDll/splits.txt index 857b9b91..74e73407 100644 --- a/config/GMPE01_00/rels/staffDll/splits.txt +++ b/config/GMPE01_00/rels/staffDll/splits.txt @@ -9,7 +9,7 @@ Sections: REL/executor.c: .text start:0x00000000 end:0x000000A0 -REL/staffDll/staffDll.c: +REL/staffDll/main.c: .text start:0x000000A0 end:0x00001290 .rodata start:0x00000000 end:0x00000094 .data start:0x00000000 end:0x00001178 diff --git a/config/GMPE01_00/rels/subchrselDll/splits.txt b/config/GMPE01_00/rels/subchrselDll/splits.txt index 62fd2695..5fbeced7 100644 --- a/config/GMPE01_00/rels/subchrselDll/splits.txt +++ b/config/GMPE01_00/rels/subchrselDll/splits.txt @@ -9,7 +9,7 @@ Sections: REL/executor.c: .text start:0x00000000 end:0x000000A0 -REL/subchrselDll/subchrselDll.c: +REL/subchrselDll/main.c: .text start:0x000000A0 end:0x000007B8 .rodata start:0x00000000 end:0x00000018 .data start:0x00000000 end:0x000000E1 diff --git a/config/GMPE01_00/rels/w03Dll/splits.txt b/config/GMPE01_00/rels/w03Dll/splits.txt index 04a55256..63affcf8 100644 --- a/config/GMPE01_00/rels/w03Dll/splits.txt +++ b/config/GMPE01_00/rels/w03Dll/splits.txt @@ -10,14 +10,14 @@ REL/board_executor.c: .text start:0x00000000 end:0x000000E0 REL/w03Dll/main.c: - .text start:0x000000E0 end:0x000010E4 - .rodata start:0x00000000 end:0x00000030 + .text start:0x000000E0 end:0x000012C8 + .rodata start:0x00000000 end:0x00000038 .data start:0x00000000 end:0x00000280 .bss start:0x00000000 end:0x00000028 REL/w03Dll/statue.c: - .text start:0x000010E4 end:0x00003058 - .rodata start:0x00000030 end:0x000000D8 + .text start:0x000012C8 end:0x00003058 + .rodata start:0x00000038 end:0x000000D8 .data start:0x00000280 end:0x00000310 .bss start:0x00000028 end:0x00000070 @@ -31,12 +31,13 @@ REL/w03Dll/river.c: .text start:0x000063F4 end:0x0000785C .rodata start:0x00000218 end:0x000002A8 .data start:0x00000368 end:0x00000410 - .bss start:0x00000120 end:0x00000140 + .bss start:0x00000120 end:0x00000138 REL/w03Dll/smoke.c: .text start:0x0000785C end:0x00007ABC .rodata start:0x000002A8 end:0x000002B0 .data start:0x00000410 end:0x00000450 + .bss start:0x00000138 end:0x00000140 REL/w03Dll/mg_coin.c: .text start:0x00007ABC end:0x00009A7C diff --git a/config/GMPE01_00/rels/w03Dll/symbols.txt b/config/GMPE01_00/rels/w03Dll/symbols.txt index 9eed6f44..4efe98c4 100644 --- a/config/GMPE01_00/rels/w03Dll/symbols.txt +++ b/config/GMPE01_00/rels/w03Dll/symbols.txt @@ -126,41 +126,41 @@ fn_1_BDAC = .text:0x0000BDAC; // type:function size:0x84 fn_1_BE30 = .text:0x0000BE30; // type:function size:0x418 _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_38 = .rodata:0x00000038; // type:object size:0x8 data:double -lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x8 data:double -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_5C = .rodata:0x0000005C; // type:object size:0x4 data:float -lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x4 data:float -lbl_1_rodata_64 = .rodata:0x00000064; // type:object size:0x4 data:float -lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x4 data:float -lbl_1_rodata_6C = .rodata:0x0000006C; // type:object size:0xC data:4byte -lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x24 data:4byte -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:0x4 data:float -lbl_1_rodata_AC = .rodata:0x000000AC; // type:object size:0x4 data:float -lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 data:float -lbl_1_rodata_B4 = .rodata:0x000000B4; // type:object size:0x4 data:float -lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x6 data:2byte -lbl_1_rodata_BE = .rodata:0x000000BE; // type:object size:0x1 data:byte -lbl_1_rodata_C2 = .rodata:0x000000C2; // type:object size:0x6 data:byte -lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x4 data:float -lbl_1_rodata_CC = .rodata:0x000000CC; // type:object size:0x4 data:float -lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x8 data:float +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_38 = .rodata:0x00000038; // type:object size:0x8 scope:local data:double +lbl_1_rodata_40 = .rodata:0x00000040; // type:object size:0x8 scope:local data:double +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_5C = .rodata:0x0000005C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_60 = .rodata:0x00000060; // type:object size:0x4 scope:local data:float +lbl_1_rodata_64 = .rodata:0x00000064; // type:object size:0x4 scope:local data:float +lbl_1_rodata_68 = .rodata:0x00000068; // type:object size:0x4 scope:local data:float +lbl_1_rodata_6C = .rodata:0x0000006C; // type:object size:0xC scope:local data:4byte +lbl_1_rodata_78 = .rodata:0x00000078; // type:object size:0x24 scope:local data:4byte +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:0x4 scope:local data:float +lbl_1_rodata_AC = .rodata:0x000000AC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_B0 = .rodata:0x000000B0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_B4 = .rodata:0x000000B4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_B8 = .rodata:0x000000B8; // type:object size:0x6 scope:local data:2byte +lbl_1_rodata_BE = .rodata:0x000000BE; // type:object size:0x1 scope:local data:byte +lbl_1_rodata_C2 = .rodata:0x000000C2; // type:object size:0x6 scope:local data:byte +lbl_1_rodata_C8 = .rodata:0x000000C8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_CC = .rodata:0x000000CC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_D0 = .rodata:0x000000D0; // type:object size:0x8 scope:local data:float lbl_1_rodata_D8 = .rodata:0x000000D8; // type:object size:0x4 data:float lbl_1_rodata_DC = .rodata:0x000000DC; // type:object size:0x4 data:float lbl_1_rodata_E0 = .rodata:0x000000E0; // type:object size:0x4 data:float @@ -222,36 +222,36 @@ lbl_1_rodata_200 = .rodata:0x00000200; // type:object size:0x8 data:double lbl_1_rodata_208 = .rodata:0x00000208; // type:object size:0x4 data:float lbl_1_rodata_20C = .rodata:0x0000020C; // type:object size:0x4 data:float lbl_1_rodata_210 = .rodata:0x00000210; // type:object size:0x8 data:float -lbl_1_rodata_218 = .rodata:0x00000218; // type:object size:0x4 data:float -lbl_1_rodata_21C = .rodata:0x0000021C; // type:object size:0x4 data:float -lbl_1_rodata_220 = .rodata:0x00000220; // type:object size:0x4 data:float -lbl_1_rodata_228 = .rodata:0x00000228; // type:object size:0x8 data:double -lbl_1_rodata_230 = .rodata:0x00000230; // type:object size:0x8 data:double -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:0x8 data:double -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:0x4 data:float -lbl_1_rodata_264 = .rodata:0x00000264; // type:object size:0x4 data:float -lbl_1_rodata_268 = .rodata:0x00000268; // type:object size:0x4 data:float -lbl_1_rodata_26C = .rodata:0x0000026C; // type:object size:0x4 data:float -lbl_1_rodata_270 = .rodata:0x00000270; // type:object size:0x4 data:float -lbl_1_rodata_274 = .rodata:0x00000274; // type:object size:0x4 data:float -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:0x8 data:double -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_218 = .rodata:0x00000218; // type:object size:0x4 scope:local data:float +lbl_1_rodata_21C = .rodata:0x0000021C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_220 = .rodata:0x00000220; // type:object size:0x4 scope:local data:float +lbl_1_rodata_228 = .rodata:0x00000228; // type:object size:0x8 scope:local data:double +lbl_1_rodata_230 = .rodata:0x00000230; // type:object size:0x8 scope:local data:double +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:0x8 scope:local data:double +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:0x4 scope:local data:float +lbl_1_rodata_264 = .rodata:0x00000264; // type:object size:0x4 scope:local data:float +lbl_1_rodata_268 = .rodata:0x00000268; // type:object size:0x4 scope:local data:float +lbl_1_rodata_26C = .rodata:0x0000026C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_270 = .rodata:0x00000270; // type:object size:0x4 scope:local data:float +lbl_1_rodata_274 = .rodata:0x00000274; // type:object size:0x4 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:0x8 scope:local data:double +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 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 @@ -290,43 +290,43 @@ lbl_1_rodata_34C = .rodata:0x0000034C; // type:object size:0x4 data:float lbl_1_rodata_350 = .rodata:0x00000350; // type:object size:0x8 data:double lbl_1_rodata_358 = .rodata:0x00000358; // type:object size:0x4 data:float lbl_1_rodata_35C = .rodata:0x0000035C; // type:object size:0x4 data:float -lbl_1_rodata_360 = .rodata:0x00000360; // type:object size:0x4 data:float -lbl_1_rodata_364 = .rodata:0x00000364; // type:object size:0x4 data:float -lbl_1_rodata_368 = .rodata:0x00000368; // type:object size:0x4 data:float -lbl_1_rodata_36C = .rodata:0x0000036C; // type:object size:0x4 data:float -lbl_1_rodata_370 = .rodata:0x00000370; // type:object size:0x4 data:float -lbl_1_rodata_378 = .rodata:0x00000378; // type:object size:0x8 data:double -lbl_1_rodata_380 = .rodata:0x00000380; // type:object size:0x8 data:double -lbl_1_rodata_388 = .rodata:0x00000388; // type:object size:0x8 data:double -lbl_1_rodata_390 = .rodata:0x00000390; // type:object size:0x8 data:double -lbl_1_rodata_398 = .rodata:0x00000398; // type:object size:0x8 data:double -lbl_1_rodata_3A0 = .rodata:0x000003A0; // type:object size:0x8 data:double -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:0x4 data:float -lbl_1_rodata_3C8 = .rodata:0x000003C8; // type:object size:0x4 data:float -lbl_1_rodata_3CC = .rodata:0x000003CC; // type:object size:0x4 data:float -lbl_1_rodata_3D0 = .rodata:0x000003D0; // type:object size:0x4 data:float -lbl_1_rodata_3D4 = .rodata:0x000003D4; // type:object size:0x4 data:float -lbl_1_rodata_3D8 = .rodata:0x000003D8; // type:object size:0x4 data:float -lbl_1_rodata_3DC = .rodata:0x000003DC; // type:object size:0x4 data:float -lbl_1_rodata_3E0 = .rodata:0x000003E0; // type:object size:0x4 data:float -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_410 = .rodata:0x00000410; // type:object size:0x8 data:double +lbl_1_rodata_360 = .rodata:0x00000360; // type:object size:0x4 scope:local data:float +lbl_1_rodata_364 = .rodata:0x00000364; // type:object size:0x4 scope:local data:float +lbl_1_rodata_368 = .rodata:0x00000368; // type:object size:0x4 scope:local data:float +lbl_1_rodata_36C = .rodata:0x0000036C; // type:object size:0x4 scope:local data:float +lbl_1_rodata_370 = .rodata:0x00000370; // type:object size:0x4 scope:local data:float +lbl_1_rodata_378 = .rodata:0x00000378; // type:object size:0x8 scope:local data:double +lbl_1_rodata_380 = .rodata:0x00000380; // type:object size:0x8 scope:local data:double +lbl_1_rodata_388 = .rodata:0x00000388; // type:object size:0x8 scope:local data:double +lbl_1_rodata_390 = .rodata:0x00000390; // type:object size:0x8 scope:local data:double +lbl_1_rodata_398 = .rodata:0x00000398; // type:object size:0x8 scope:local data:double +lbl_1_rodata_3A0 = .rodata:0x000003A0; // type:object size:0x8 scope:local data:double +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:0x4 scope:local data:float +lbl_1_rodata_3C8 = .rodata:0x000003C8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3CC = .rodata:0x000003CC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3D0 = .rodata:0x000003D0; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3D4 = .rodata:0x000003D4; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3D8 = .rodata:0x000003D8; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3DC = .rodata:0x000003DC; // type:object size:0x4 scope:local data:float +lbl_1_rodata_3E0 = .rodata:0x000003E0; // type:object size:0x4 scope:local data:float +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_410 = .rodata:0x00000410; // type:object size:0x8 scope:local data:double lbl_1_data_0 = .data:0x00000000; // type:object size:0x1E0 lbl_1_data_1E0 = .data:0x000001E0; // type:object size:0x2 data:2byte lbl_1_data_1E2 = .data:0x000001E2; // type:object size:0x2 data:2byte @@ -366,18 +366,18 @@ lbl_1_data_388 = .data:0x00000388; // type:object size:0x2 data:2byte lbl_1_data_38A = .data:0x0000038A; // type:object size:0x2 data:2byte lbl_1_data_38C = .data:0x0000038C; // type:object size:0x2 data:2byte lbl_1_data_390 = .data:0x00000390; // type:object size:0x10 -lbl_1_data_3A0 = .data:0x000003A0; // type:object size:0xB data:string -lbl_1_data_3AB = .data:0x000003AB; // type:object size:0x6 data:string -lbl_1_data_3B1 = .data:0x000003B1; // type:object size:0x7 +lbl_1_data_3A0 = .data:0x000003A0; // type:object size:0xB scope:local data:string +lbl_1_data_3AB = .data:0x000003AB; // type:object size:0x6 scope:local data:string +lbl_1_data_3B1 = .data:0x000003B1; // type:object size:0x7 scope:local lbl_1_data_3B8 = .data:0x000003B8; // type:object size:0x48 -lbl_1_data_400 = .data:0x00000400; // type:object size:0x3 data:string -lbl_1_data_403 = .data:0x00000403; // type:object size:0xD -lbl_1_data_410 = .data:0x00000410; // type:object size:0x8 data:string -lbl_1_data_418 = .data:0x00000418; // type:object size:0x8 data:string -lbl_1_data_420 = .data:0x00000420; // type:object size:0x8 data:string -lbl_1_data_428 = .data:0x00000428; // type:object size:0x8 data:string -lbl_1_data_430 = .data:0x00000430; // type:object size:0x8 data:string -lbl_1_data_438 = .data:0x00000438; // type:object size:0x18 +lbl_1_data_400 = .data:0x00000400; // type:object size:0x3 scope:local data:string +lbl_1_data_403 = .data:0x00000403; // type:object size:0xD scope:local +lbl_1_data_410 = .data:0x00000410; // type:object size:0x8 scope:local data:string +lbl_1_data_418 = .data:0x00000418; // type:object size:0x8 scope:local data:string +lbl_1_data_420 = .data:0x00000420; // type:object size:0x8 scope:local data:string +lbl_1_data_428 = .data:0x00000428; // type:object size:0x8 scope:local data:string +lbl_1_data_430 = .data:0x00000430; // type:object size:0x8 scope:local data:string +lbl_1_data_438 = .data:0x00000438; // type:object size:0x18 scope:local lbl_1_data_450 = .data:0x00000450; // type:object size:0x4 data:4byte lbl_1_data_454 = .data:0x00000454; // type:object size:0x2 data:2byte lbl_1_data_456 = .data:0x00000456; // type:object size:0x2 data:2byte @@ -396,10 +396,10 @@ lbl_1_data_4DC = .data:0x000004DC; // type:object size:0x2 data:2byte lbl_1_data_4E0 = .data:0x000004E0; // type:object size:0x4 data:4byte lbl_1_data_4E4 = .data:0x000004E4; // type:object size:0x2 data:2byte lbl_1_data_4E6 = .data:0x000004E6; // type:object size:0xE -lbl_1_data_4F4 = .data:0x000004F4; // type:object size:0x5 data:string -lbl_1_data_4F9 = .data:0x000004F9; // type:object size:0x6 data:string -lbl_1_data_4FF = .data:0x000004FF; // type:object size:0x9 -lbl_1_data_508 = .data:0x00000508; // type:object size:0xC +lbl_1_data_4F4 = .data:0x000004F4; // type:object size:0x5 scope:local data:string +lbl_1_data_4F9 = .data:0x000004F9; // type:object size:0x6 scope:local data:string +lbl_1_data_4FF = .data:0x000004FF; // type:object size:0x9 scope:local +lbl_1_data_508 = .data:0x00000508; // type:object size:0xC scope:local lbl_1_data_514 = .data:0x00000514; // type:object size:0x38 lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/w04Dll/splits.txt b/config/GMPE01_00/rels/w04Dll/splits.txt index 531cd645..546e1cac 100644 --- a/config/GMPE01_00/rels/w04Dll/splits.txt +++ b/config/GMPE01_00/rels/w04Dll/splits.txt @@ -5,3 +5,42 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/board_executor.c: + .text start:0x00000000 end:0x000000E0 + +REL/w04Dll/main.c: + .text start:0x000000E0 end:0x000012FC + .rodata start:0x00000000 end:0x00000040 + .data start:0x00000000 end:0x00000298 + .bss start:0x00000000 end:0x00000038 + +REL/w04Dll/bridge.c: + .text start:0x000012FC end:0x00002044 + .rodata start:0x00000040 end:0x00000098 + .data start:0x00000298 end:0x000002D0 + .bss start:0x00000038 end:0x00000048 + +REL/w04Dll/boo_event.c: + .text start:0x00002044 end:0x00006024 + .rodata start:0x00000098 end:0x00000180 + .data start:0x000002D0 end:0x000003A8 + .bss start:0x00000048 end:0x00000100 + +REL/w04Dll/big_boo.c: + .text start:0x00006024 end:0x0000A0F8 + .rodata start:0x00000180 end:0x000002C0 + .data start:0x000003A8 end:0x000004F0 + .bss start:0x00000100 end:0x00000288 + +REL/w04Dll/mg_item.c: + .text start:0x0000A0F8 end:0x0000C7A0 + .rodata start:0x000002C0 end:0x000003A0 + .data start:0x000004F0 end:0x00000588 + .bss start:0x00000288 end:0x000002B0 + +REL/w04Dll/mg_coin.c: + .text start:0x0000C7A0 end:0x0000EA0C + .rodata start:0x000003A0 end:0x00000428 + .data start:0x00000588 end:0x0000063F + .bss start:0x000002B0 end:0x00000328 diff --git a/config/GMPE01_00/rels/w04Dll/symbols.txt b/config/GMPE01_00/rels/w04Dll/symbols.txt index f55c8f4f..c6c37698 100644 --- a/config/GMPE01_00/rels/w04Dll/symbols.txt +++ b/config/GMPE01_00/rels/w04Dll/symbols.txt @@ -1,8 +1,8 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x30 +InitBoard = .text:0x00000000; // type:function size:0x30 scope:local _prolog = .text:0x00000030; // type:function size:0x64 scope:global _epilog = .text:0x00000094; // type:function size:0x4C scope:global -fn_1_E0 = .text:0x000000E0; // type:function size:0x514 -fn_1_5F4 = .text:0x000005F4; // type:function size:0x15C +BoardCreate = .text:0x000000E0; // type:function size:0x514 +BoardDestroy = .text:0x000005F4; // type:function size:0x15C fn_1_750 = .text:0x00000750; // type:function size:0x44 fn_1_794 = .text:0x00000794; // type:function size:0x4 fn_1_798 = .text:0x00000798; // type:function size:0x64 @@ -326,7 +326,7 @@ lbl_1_data_288 = .data:0x00000288; // type:object size:0x8 lbl_1_data_290 = .data:0x00000290; // type:object size:0x8 lbl_1_data_298 = .data:0x00000298; // type:object size:0x8 lbl_1_data_2A0 = .data:0x000002A0; // type:object size:0xC -lbl_1_data_2AC = .data:0x000002AC; // type:object size:0x24 +lbl_1_data_2AC = .data:0x000002AC; // type:object size:0x20 lbl_1_data_2D0 = .data:0x000002D0; // type:object size:0x20 lbl_1_data_2F0 = .data:0x000002F0; // type:object size:0x4 data:4byte lbl_1_data_2F4 = .data:0x000002F4; // type:object size:0x20 @@ -340,12 +340,12 @@ lbl_1_data_358 = .data:0x00000358; // type:object size:0x10 lbl_1_data_368 = .data:0x00000368; // type:object size:0x8 data:string lbl_1_data_370 = .data:0x00000370; // type:object size:0x12 data:string lbl_1_data_382 = .data:0x00000382; // type:object size:0x11 data:string -lbl_1_data_393 = .data:0x00000393; // type:object size:0x15 +lbl_1_data_393 = .data:0x00000393; // type:object size:0x10 lbl_1_data_3A8 = .data:0x000003A8; // type:object size:0x8 data:string lbl_1_data_3B0 = .data:0x000003B0; // type:object size:0x9 data:string lbl_1_data_3B9 = .data:0x000003B9; // type:object size:0x6 data:string lbl_1_data_3BF = .data:0x000003BF; // type:object size:0x5 data:string -lbl_1_data_3C4 = .data:0x000003C4; // type:object size:0x8 +lbl_1_data_3C4 = .data:0x000003C4; // type:object size:0x5 data:string lbl_1_data_3CC = .data:0x000003CC; // type:object size:0x14 data:4byte lbl_1_data_3E0 = .data:0x000003E0; // type:object size:0x14 lbl_1_data_3F4 = .data:0x000003F4; // type:object size:0x20 @@ -356,8 +356,8 @@ lbl_1_data_45F = .data:0x0000045F; // type:object size:0x2 data:string lbl_1_data_461 = .data:0x00000461; // type:object size:0xC data:string lbl_1_data_46D = .data:0x0000046D; // type:object size:0x1B lbl_1_data_488 = .data:0x00000488; // type:object size:0x3 data:string -lbl_1_data_48B = .data:0x0000048B; // type:object size:0x11 -lbl_1_data_49C = .data:0x0000049C; // type:object size:0x54 +lbl_1_data_48B = .data:0x0000048B; // type:object size:0xF data:string +lbl_1_data_49C = .data:0x0000049C; // type:object size:0x50 lbl_1_data_4F0 = .data:0x000004F0; // type:object size:0x6 data:string lbl_1_data_4F6 = .data:0x000004F6; // type:object size:0x6 data:string lbl_1_data_4FC = .data:0x000004FC; // type:object size:0x6 data:string @@ -388,7 +388,7 @@ lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x8 data:2byte lbl_1_bss_10 = .bss:0x00000010; // type:object size:0x4 data:4byte -lbl_1_bss_14 = .bss:0x00000014; // type:object size:0x24 data:2byte +lbl_1_bss_14 = .bss:0x00000014; // type:object size:0x20 data:2byte lbl_1_bss_38 = .bss:0x00000038; // type:object size:0x4 data:4byte lbl_1_bss_3C = .bss:0x0000003C; // type:object size:0xC lbl_1_bss_48 = .bss:0x00000048; // type:object size:0x4 data:4byte @@ -410,7 +410,7 @@ lbl_1_bss_C4 = .bss:0x000000C4; // type:object size:0x10 lbl_1_bss_D4 = .bss:0x000000D4; // type:object size:0x10 lbl_1_bss_E4 = .bss:0x000000E4; // type:object size:0x10 lbl_1_bss_F4 = .bss:0x000000F4; // type:object size:0x6 data:2byte -lbl_1_bss_FA = .bss:0x000000FA; // type:object size:0x6 data:2byte +lbl_1_bss_FA = .bss:0x000000FA; // type:object size:0x2 data:2byte lbl_1_bss_100 = .bss:0x00000100; // type:object size:0x4 data:4byte lbl_1_bss_104 = .bss:0x00000104; // type:object size:0x4 data:4byte lbl_1_bss_108 = .bss:0x00000108; // type:object size:0xC @@ -427,7 +427,7 @@ lbl_1_bss_278 = .bss:0x00000278; // type:object size:0x4 data:4byte lbl_1_bss_27C = .bss:0x0000027C; // type:object size:0x2 data:2byte lbl_1_bss_27E = .bss:0x0000027E; // type:object size:0x2 data:2byte lbl_1_bss_280 = .bss:0x00000280; // type:object size:0x2 data:2byte -lbl_1_bss_282 = .bss:0x00000282; // type:object size:0x6 data:2byte +lbl_1_bss_282 = .bss:0x00000282; // type:object size:0x2 data:2byte lbl_1_bss_288 = .bss:0x00000288; // type:object size:0x4 data:4byte lbl_1_bss_28C = .bss:0x0000028C; // type:object size:0x8 data:4byte lbl_1_bss_294 = .bss:0x00000294; // type:object size:0x4 data:float diff --git a/config/GMPE01_00/rels/w05Dll/splits.txt b/config/GMPE01_00/rels/w05Dll/splits.txt index 531cd645..459fce1e 100644 --- a/config/GMPE01_00/rels/w05Dll/splits.txt +++ b/config/GMPE01_00/rels/w05Dll/splits.txt @@ -5,3 +5,42 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/board_executor.c: + .text start:0x00000000 end:0x000000E0 + +REL/w05Dll/main.c: + .text start:0x000000E0 end:0x000013D4 + .rodata start:0x00000000 end:0x00000048 + .data start:0x00000000 end:0x00000150 + .bss start:0x00000000 end:0x00000028 + +REL/w05Dll/hotel.c: + .text start:0x000013D4 end:0x00002B40 + .rodata start:0x00000048 end:0x00000090 + .data start:0x00000150 end:0x000001A8 + .bss start:0x00000028 end:0x00000030 + +REL/w05Dll/monkey.c: + .text start:0x00002B40 end:0x00003F74 + .rodata start:0x00000090 end:0x000000F8 + .data start:0x000001A8 end:0x00000200 + .bss start:0x00000030 end:0x00000058 + +REL/w05Dll/dolphin.c: + .text start:0x00003F74 end:0x00006B28 + .rodata start:0x000000F8 end:0x000001A8 + .data start:0x00000200 end:0x00000310 + .bss start:0x00000058 end:0x00000078 + +REL/w05Dll/mg_item.c: + .text start:0x00006B28 end:0x00009680 + .rodata start:0x000001A8 end:0x00000268 + .data start:0x00000310 end:0x00000450 + .bss start:0x00000078 end:0x000000B8 + +REL/w05Dll/mg_coin.c: + .text start:0x00009680 end:0x0000B644 + .rodata start:0x00000268 end:0x00000300 + .data start:0x00000450 end:0x000004C7 + .bss start:0x000000B8 end:0x00000108 diff --git a/config/GMPE01_00/rels/w05Dll/symbols.txt b/config/GMPE01_00/rels/w05Dll/symbols.txt index 03b04aa2..456a94ae 100644 --- a/config/GMPE01_00/rels/w05Dll/symbols.txt +++ b/config/GMPE01_00/rels/w05Dll/symbols.txt @@ -1,8 +1,8 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x30 +InitBoard = .text:0x00000000; // type:function size:0x30 scope:local _prolog = .text:0x00000030; // type:function size:0x64 scope:global _epilog = .text:0x00000094; // type:function size:0x4C scope:global -fn_1_E0 = .text:0x000000E0; // type:function size:0x4D8 -fn_1_5B8 = .text:0x000005B8; // type:function size:0x18C +BoardCreate = .text:0x000000E0; // type:function size:0x4D8 +BoardDestroy = .text:0x000005B8; // type:function size:0x18C fn_1_744 = .text:0x00000744; // type:function size:0x44 fn_1_788 = .text:0x00000788; // type:function size:0x4 fn_1_78C = .text:0x0000078C; // type:function size:0xA0 @@ -256,10 +256,10 @@ lbl_1_data_144 = .data:0x00000144; // type:object size:0x8 lbl_1_data_14C = .data:0x0000014C; // type:object size:0x4 lbl_1_data_150 = .data:0x00000150; // type:object size:0x14 lbl_1_data_164 = .data:0x00000164; // type:object size:0x2 data:2byte -lbl_1_data_166 = .data:0x00000166; // type:object size:0xA +lbl_1_data_166 = .data:0x00000166; // type:object size:0x7 data:string lbl_1_data_170 = .data:0x00000170; // type:object size:0x10 lbl_1_data_180 = .data:0x00000180; // type:object size:0x4 data:4byte -lbl_1_data_184 = .data:0x00000184; // type:object size:0x4 +lbl_1_data_184 = .data:0x00000184; // type:object size:0x3 data:string lbl_1_data_188 = .data:0x00000188; // type:object size:0x10 lbl_1_data_198 = .data:0x00000198; // type:object size:0x8 lbl_1_data_1A0 = .data:0x000001A0; // type:object size:0x8 data:string @@ -271,19 +271,19 @@ lbl_1_data_1CC = .data:0x000001CC; // type:object size:0xC lbl_1_data_1D8 = .data:0x000001D8; // type:object size:0x8 data:string lbl_1_data_1E0 = .data:0x000001E0; // type:object size:0x8 data:string lbl_1_data_1E8 = .data:0x000001E8; // type:object size:0xA data:string -lbl_1_data_1F2 = .data:0x000001F2; // type:object size:0xE +lbl_1_data_1F2 = .data:0x000001F2; // type:object size:0xB data:string lbl_1_data_200 = .data:0x00000200; // type:object size:0x8 data:string lbl_1_data_208 = .data:0x00000208; // type:object size:0x8 data:string lbl_1_data_210 = .data:0x00000210; // type:object size:0x6 data:string lbl_1_data_216 = .data:0x00000216; // type:object size:0x6 data:string lbl_1_data_21C = .data:0x0000021C; // type:object size:0x7 data:string -lbl_1_data_223 = .data:0x00000223; // type:object size:0x9 +lbl_1_data_223 = .data:0x00000223; // type:object size:0x7 data:string lbl_1_data_22C = .data:0x0000022C; // type:object size:0x18 lbl_1_data_244 = .data:0x00000244; // type:object size:0x18 lbl_1_data_25C = .data:0x0000025C; // type:object size:0x48 lbl_1_data_2A4 = .data:0x000002A4; // type:object size:0x48 lbl_1_data_2EC = .data:0x000002EC; // type:object size:0x8 -lbl_1_data_2F4 = .data:0x000002F4; // type:object size:0x1C +lbl_1_data_2F4 = .data:0x000002F4; // type:object size:0x18 lbl_1_data_310 = .data:0x00000310; // type:object size:0x8 lbl_1_data_318 = .data:0x00000318; // type:object size:0x7 data:string lbl_1_data_31F = .data:0x0000031F; // type:object size:0x7 data:string @@ -291,8 +291,9 @@ lbl_1_data_326 = .data:0x00000326; // type:object size:0xA lbl_1_data_330 = .data:0x00000330; // type:object size:0xC lbl_1_data_33C = .data:0x0000033C; // type:object size:0x7 data:string lbl_1_data_343 = .data:0x00000343; // type:object size:0xD data:string -lbl_1_data_350 = .data:0x00000350; // type:object size:0xF0 -lbl_1_data_440 = .data:0x00000440; // type:object size:0x10 +lbl_1_data_350 = .data:0x00000350; // type:object size:0x38 +lbl_1_data_388 = .data:0x00000388; // type:object size:0xB8 +lbl_1_data_440 = .data:0x00000440; // type:object size:0xC lbl_1_data_450 = .data:0x00000450; // type:object size:0x6 data:string lbl_1_data_456 = .data:0x00000456; // type:object size:0x7 data:string lbl_1_data_45D = .data:0x0000045D; // type:object size:0x7 data:string @@ -312,20 +313,20 @@ lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x4 data:4byte lbl_1_bss_4 = .bss:0x00000004; // type:object size:0x4 data:4byte lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x8 data:2byte lbl_1_bss_10 = .bss:0x00000010; // type:object size:0x4 data:4byte -lbl_1_bss_14 = .bss:0x00000014; // type:object size:0x14 data:2byte -lbl_1_bss_28 = .bss:0x00000028; // type:object size:0x8 data:2byte +lbl_1_bss_14 = .bss:0x00000014; // type:object size:0xE data:2byte +lbl_1_bss_28 = .bss:0x00000028; // type:object size:0x2 data:2byte lbl_1_bss_30 = .bss:0x00000030; // type:object size:0x8 data:2byte lbl_1_bss_38 = .bss:0x00000038; // type:object size:0xC data:float lbl_1_bss_44 = .bss:0x00000044; // type:object size:0x2 data:2byte lbl_1_bss_48 = .bss:0x00000048; // type:object size:0x2 data:2byte lbl_1_bss_4A = .bss:0x0000004A; // type:object size:0x2 data:2byte lbl_1_bss_4C = .bss:0x0000004C; // type:object size:0x2 data:2byte -lbl_1_bss_4E = .bss:0x0000004E; // type:object size:0xA data:2byte +lbl_1_bss_4E = .bss:0x0000004E; // type:object size:0x4 data:2byte lbl_1_bss_58 = .bss:0x00000058; // type:object size:0xC lbl_1_bss_64 = .bss:0x00000064; // type:object size:0x2 data:2byte lbl_1_bss_68 = .bss:0x00000068; // type:object size:0x4 data:4byte lbl_1_bss_6C = .bss:0x0000006C; // type:object size:0x6 -lbl_1_bss_72 = .bss:0x00000072; // type:object size:0x6 data:2byte +lbl_1_bss_72 = .bss:0x00000072; // type:object size:0x4 data:2byte lbl_1_bss_78 = .bss:0x00000078; // type:object size:0x4 data:4byte lbl_1_bss_7C = .bss:0x0000007C; // type:object size:0xC lbl_1_bss_88 = .bss:0x00000088; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/w06Dll/splits.txt b/config/GMPE01_00/rels/w06Dll/splits.txt index 531cd645..31719105 100644 --- a/config/GMPE01_00/rels/w06Dll/splits.txt +++ b/config/GMPE01_00/rels/w06Dll/splits.txt @@ -5,3 +5,42 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/board_executor.c: + .text start:0x00000000 end:0x000000E0 + +REL/w06Dll/main.c: + .text start:0x000000E0 end:0x00000D70 + .rodata start:0x00000000 end:0x00000040 + .data start:0x00000000 end:0x000001A8 + .bss start:0x00000000 end:0x00000018 + +REL/w06Dll/mg_item.c: + .text start:0x00000D70 end:0x00004878 + .rodata start:0x00000040 end:0x000000F0 + .data start:0x000001A8 end:0x000001D8 + .bss start:0x00000018 end:0x00000048 + +REL/w06Dll/mg_coin.c: + .text start:0x00004878 end:0x00006EF0 + .rodata start:0x000000F0 end:0x000001B0 + .data start:0x000001D8 end:0x00000208 + .bss start:0x00000048 end:0x00000090 + +REL/w06Dll/fire.c: + .text start:0x00006EF0 end:0x00007BB0 + .rodata start:0x000001B0 end:0x000001E8 + .data start:0x00000208 end:0x00000418 + .bss start:0x00000090 end:0x000000C8 + +REL/w06Dll/bridge.c: + .text start:0x00007BB0 end:0x00008F20 + .rodata start:0x000001E8 end:0x00000228 + .data start:0x00000418 end:0x00000498 + .bss start:0x000000C8 end:0x000000E8 + +REL/w06Dll/bowser.c: + .text start:0x00008F20 end:0x0000D0A4 + .rodata start:0x00000228 end:0x000002D8 + .data start:0x00000498 end:0x00000541 + .bss start:0x000000E8 end:0x000000F5 diff --git a/config/GMPE01_00/rels/w06Dll/symbols.txt b/config/GMPE01_00/rels/w06Dll/symbols.txt index 51c6c855..6cea2169 100644 --- a/config/GMPE01_00/rels/w06Dll/symbols.txt +++ b/config/GMPE01_00/rels/w06Dll/symbols.txt @@ -1,8 +1,8 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x30 +InitBoard = .text:0x00000000; // type:function size:0x30 scope:local _prolog = .text:0x00000030; // type:function size:0x64 scope:global _epilog = .text:0x00000094; // type:function size:0x4C scope:global -fn_1_E0 = .text:0x000000E0; // type:function size:0x4C4 -fn_1_5A4 = .text:0x000005A4; // type:function size:0x18C +BoardCreate = .text:0x000000E0; // type:function size:0x4C4 +BoardDestroy = .text:0x000005A4; // type:function size:0x18C fn_1_730 = .text:0x00000730; // type:function size:0x6C fn_1_79C = .text:0x0000079C; // type:function size:0x20 fn_1_7BC = .text:0x000007BC; // type:function size:0x144 @@ -145,11 +145,11 @@ 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_78 = .rodata:0x00000078; // type:object size:0x8 data:double lbl_1_rodata_80 = .rodata:0x00000080; // type:object size:0x8 data:double -lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x1 data:byte +lbl_1_rodata_88 = .rodata:0x00000088; // type:object size:0x2 data:byte lbl_1_rodata_8C = .rodata:0x0000008C; // type:object size:0x4 data:float -lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x1 data:byte +lbl_1_rodata_90 = .rodata:0x00000090; // type:object size:0x3 data:byte lbl_1_rodata_94 = .rodata:0x00000094; // type:object size:0x6 data:2byte -lbl_1_rodata_9A = .rodata:0x0000009A; // type:object size:0x1 data:byte +lbl_1_rodata_9A = .rodata:0x0000009A; // type:object size:0x3 data:byte lbl_1_rodata_9E = .rodata:0x0000009E; // type:object size:0x6 data:2byte lbl_1_rodata_A4 = .rodata:0x000000A4; // type:object size:0x4 data:float lbl_1_rodata_A8 = .rodata:0x000000A8; // type:object size:0x4 data:float @@ -282,12 +282,12 @@ lbl_1_data_1AD = .data:0x000001AD; // type:object size:0x3 lbl_1_data_1B0 = .data:0x000001B0; // type:object size:0x2 data:2byte lbl_1_data_1B4 = .data:0x000001B4; // type:object size:0xC lbl_1_data_1C0 = .data:0x000001C0; // type:object size:0x5 data:string -lbl_1_data_1C5 = .data:0x000001C5; // type:object size:0x13 +lbl_1_data_1C5 = .data:0x000001C5; // type:object size:0xE lbl_1_data_1D8 = .data:0x000001D8; // type:object size:0x2 data:2byte lbl_1_data_1DA = .data:0x000001DA; // type:object size:0x2 data:2byte lbl_1_data_1DC = .data:0x000001DC; // type:object size:0x2 data:2byte lbl_1_data_1DE = .data:0x000001DE; // type:object size:0x6 -lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x24 +lbl_1_data_1E4 = .data:0x000001E4; // type:object size:0x20 lbl_1_data_208 = .data:0x00000208; // type:object size:0x20 lbl_1_data_228 = .data:0x00000228; // type:object size:0x1 data:byte lbl_1_data_22A = .data:0x0000022A; // type:object size:0x2 data:2byte @@ -310,7 +310,9 @@ lbl_1_data_335 = .data:0x00000335; // type:object size:0x15 data:string lbl_1_data_34A = .data:0x0000034A; // type:object size:0x10 data:string lbl_1_data_35A = .data:0x0000035A; // type:object size:0x13 data:string lbl_1_data_36D = .data:0x0000036D; // type:object size:0x13 data:string -lbl_1_data_380 = .data:0x00000380; // type:object size:0x98 +lbl_1_data_380 = .data:0x00000380; // type:object size:0x11 data:string +lbl_1_data_394 = .data:0x00000394; // type:object size:0x38 +lbl_1_data_3CC = .data:0x000003CC; // type:object size:0x4C lbl_1_data_418 = .data:0x00000418; // type:object size:0x2 data:2byte lbl_1_data_41C = .data:0x0000041C; // type:object size:0x18 lbl_1_data_434 = .data:0x00000434; // type:object size:0x18 @@ -344,7 +346,7 @@ lbl_1_bss_30 = .bss:0x00000030; // type:object size:0x1 data:byte lbl_1_bss_33 = .bss:0x00000033; // type:object size:0x1 data:byte lbl_1_bss_34 = .bss:0x00000034; // type:object size:0x2 data:2byte lbl_1_bss_36 = .bss:0x00000036; // type:object size:0x6 -lbl_1_bss_3C = .bss:0x0000003C; // type:object size:0xC data:2byte +lbl_1_bss_3C = .bss:0x0000003C; // type:object size:0x6 data:2byte lbl_1_bss_48 = .bss:0x00000048; // type:object size:0x4 data:4byte lbl_1_bss_4C = .bss:0x0000004C; // type:object size:0x4 data:4byte lbl_1_bss_50 = .bss:0x00000050; // type:object size:0x4 data:4byte diff --git a/config/GMPE01_00/rels/w20Dll/splits.txt b/config/GMPE01_00/rels/w20Dll/splits.txt index 531cd645..3a030c38 100644 --- a/config/GMPE01_00/rels/w20Dll/splits.txt +++ b/config/GMPE01_00/rels/w20Dll/splits.txt @@ -5,3 +5,12 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/board_executor.c: + .text start:0x00000000 end:0x000000E0 + +REL/w21Dll/main.c: + .text start:0x000000E0 end:0x00000678 + .rodata start:0x00000000 end:0x00000030 + .data start:0x00000000 end:0x00000034 + .bss start:0x00000000 end:0x0000000E diff --git a/config/GMPE01_00/rels/w20Dll/symbols.txt b/config/GMPE01_00/rels/w20Dll/symbols.txt index 709c60ad..8e8d1e62 100644 --- a/config/GMPE01_00/rels/w20Dll/symbols.txt +++ b/config/GMPE01_00/rels/w20Dll/symbols.txt @@ -1,8 +1,8 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x30 +InitBoard = .text:0x00000000; // type:function size:0x30 scope:local _prolog = .text:0x00000030; // type:function size:0x64 scope:global _epilog = .text:0x00000094; // type:function size:0x4C scope:global -fn_1_E0 = .text:0x000000E0; // type:function size:0x2B0 -fn_1_390 = .text:0x00000390; // type:function size:0xBC +BoardCreate = .text:0x000000E0; // type:function size:0x2B0 +BoardDestroy = .text:0x00000390; // type:function size:0xBC fn_1_44C = .text:0x0000044C; // type:function size:0x44 fn_1_490 = .text:0x00000490; // type:function size:0x4 fn_1_494 = .text:0x00000494; // type:function size:0x4 @@ -22,6 +22,8 @@ lbl_1_rodata_2C = .rodata:0x0000002C; // type:object size:0x4 data:float lbl_1_data_0 = .data:0x00000000; // type:object size:0x2 data:2byte lbl_1_data_2 = .data:0x00000002; // type:object size:0x2 data:2byte lbl_1_data_6 = .data:0x00000006; // type:object size:0x2 data:2byte -lbl_1_data_8 = .data:0x00000008; // type:object size:0x24 data:2byte +lbl_1_data_8 = .data:0x00000008; // type:object size:0x2 data:2byte +lbl_1_data_A = .data:0x0000000A; // type:object size:0x22 data:2byte lbl_1_data_2C = .data:0x0000002C; // type:object size:0x8 -lbl_1_bss_0 = .bss:0x00000000; // type:object size:0xE +lbl_1_bss_0 = .bss:0x00000000; // type:object size:0x8 +lbl_1_bss_8 = .bss:0x00000008; // type:object size:0x6 diff --git a/config/GMPE01_00/rels/w21Dll/splits.txt b/config/GMPE01_00/rels/w21Dll/splits.txt index be323846..6522def0 100644 --- a/config/GMPE01_00/rels/w21Dll/splits.txt +++ b/config/GMPE01_00/rels/w21Dll/splits.txt @@ -4,3 +4,11 @@ Sections: .dtors type:rodata align:4 .rodata type:rodata align:8 .data type:data align:8 + +REL/board_executor.c: + .text start:0x00000000 end:0x000000E0 + +REL/w21Dll/main.c: + .text start:0x000000E0 end:0x000003E0 + .rodata start:0x00000000 end:0x00000018 + .data start:0x00000000 end:0x00000010 diff --git a/config/GMPE01_00/rels/w21Dll/symbols.txt b/config/GMPE01_00/rels/w21Dll/symbols.txt index 1e9f2fcb..83af6697 100644 --- a/config/GMPE01_00/rels/w21Dll/symbols.txt +++ b/config/GMPE01_00/rels/w21Dll/symbols.txt @@ -1,8 +1,8 @@ -fn_1_0 = .text:0x00000000; // type:function size:0x30 +InitBoard = .text:0x00000000; // type:function size:0x30 scope:local _prolog = .text:0x00000030; // type:function size:0x64 scope:global _epilog = .text:0x00000094; // type:function size:0x4C scope:global -fn_1_E0 = .text:0x000000E0; // type:function size:0x1D4 -fn_1_2B4 = .text:0x000002B4; // type:function size:0xB8 +BoardCreate = .text:0x000000E0; // type:function size:0x1D4 +BoardDestroy = .text:0x000002B4; // type:function size:0xB8 fn_1_36C = .text:0x0000036C; // type:function size:0x44 fn_1_3B0 = .text:0x000003B0; // type:function size:0x20 fn_1_3D0 = .text:0x000003D0; // type:function size:0x8 diff --git a/config/GMPE01_00/rels/ztardll/splits.txt b/config/GMPE01_00/rels/ztardll/splits.txt index 531cd645..3c33f4d7 100644 --- a/config/GMPE01_00/rels/ztardll/splits.txt +++ b/config/GMPE01_00/rels/ztardll/splits.txt @@ -5,3 +5,23 @@ Sections: .rodata type:rodata align:8 .data type:data align:8 .bss type:bss align:8 + +REL/executor.c: + .text start:0x00000000 end:0x000000A0 + +REL/ztardll/main.c: + .text start:0x000000A0 end:0x00007754 + .rodata start:0x00000000 end:0x000001B8 + .data start:0x00000000 end:0x000000B0 + .bss start:0x00000000 end:0x00000070 + +REL/ztardll/font.c: + .text start:0x00007754 end:0x00007C00 + .rodata start:0x000001B8 end:0x000001C0 + .data start:0x000000B0 end:0x000003C8 + +REL/ztardll/select.c: + .text start:0x00007C00 end:0x0001236C + .rodata start:0x000001C0 end:0x00000298 + .data start:0x000003C8 end:0x00000674 + .bss start:0x00000070 end:0x000002D8 diff --git a/config/GMPE01_00/rels/ztardll/symbols.txt b/config/GMPE01_00/rels/ztardll/symbols.txt index 10bab33e..2c9ea7ba 100644 --- a/config/GMPE01_00/rels/ztardll/symbols.txt +++ b/config/GMPE01_00/rels/ztardll/symbols.txt @@ -1,6 +1,6 @@ _prolog = .text:0x00000000; // type:function size:0x54 scope:global _epilog = .text:0x00000054; // type:function size:0x4C scope:global -fn_1_A0 = .text:0x000000A0; // type:function size:0x384 +ModuleProlog = .text:0x000000A0; // type:function size:0x384 fn_1_424 = .text:0x00000424; // type:function size:0x1350 fn_1_1774 = .text:0x00001774; // type:function size:0x57C fn_1_1CF0 = .text:0x00001CF0; // type:function size:0xB0 @@ -201,16 +201,16 @@ 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:0x38 data:4byte lbl_1_data_0 = .data:0x00000000; // type:object size:0x22 data:string -lbl_1_data_22 = .data:0x00000022; // type:object size:0xA +lbl_1_data_22 = .data:0x00000022; // type:object size:0x8 lbl_1_data_2C = .data:0x0000002C; // type:object size:0x18 lbl_1_data_44 = .data:0x00000044; // type:object size:0x6 lbl_1_data_4A = .data:0x0000004A; // type:object size:0xC -lbl_1_data_56 = .data:0x00000056; // type:object size:0xE data:wstring +lbl_1_data_56 = .data:0x00000056; // type:object size:0xE data:2byte lbl_1_data_64 = .data:0x00000064; // type:object size:0x20 lbl_1_data_84 = .data:0x00000084; // type:object size:0x10 lbl_1_data_94 = .data:0x00000094; // type:object size:0xC lbl_1_data_A0 = .data:0x000000A0; // type:object size:0xA data:string -lbl_1_data_AA = .data:0x000000AA; // type:object size:0x6 +lbl_1_data_AA = .data:0x000000AA; // type:object size:0x4 data:string lbl_1_data_B0 = .data:0x000000B0; // type:object size:0x318 lbl_1_data_3C8 = .data:0x000003C8; // type:object size:0x20 lbl_1_data_3E8 = .data:0x000003E8; // type:object size:0x20 diff --git a/config/GMPE01_00/splits.txt b/config/GMPE01_00/splits.txt index 0bc92ed9..19024042 100644 --- a/config/GMPE01_00/splits.txt +++ b/config/GMPE01_00/splits.txt @@ -359,7 +359,7 @@ game/board/com.c: .sdata start:0x801D36F0 end:0x801D36F8 .sdata2 start:0x801D5328 end:0x801D5350 -game/board/overhead.c: +game/board/view.c: .text start:0x800729A4 end:0x80073FF4 .rodata start:0x8011DED0 end:0x8011DEF0 .data start:0x80139BC8 end:0x80139CC8 @@ -407,14 +407,14 @@ game/board/warp.c: .sbss start:0x801D4028 end:0x801D4040 .sdata2 start:0x801D5730 end:0x801D5780 -game/board/char_roulette.c: +game/board/char_wheel.c: .text start:0x800816CC end:0x80082C90 .data start:0x8013A248 end:0x8013A2B0 .sdata start:0x801D3758 end:0x801D3760 .sbss start:0x801D4040 end:0x801D4060 .sdata2 start:0x801D5780 end:0x801D5810 -game/board/mushroom_space.c: +game/board/mushroom.c: .text start:0x80082C90 end:0x80083EDC .sdata start:0x801D3760 end:0x801D3770 .sbss start:0x801D4060 end:0x801D4070 @@ -429,7 +429,7 @@ game/board/star.c: .sbss start:0x801D4070 end:0x801D4088 .sdata2 start:0x801D5898 end:0x801D5938 -game/board/dice_roll.c: +game/board/roll.c: .text start:0x80085CC8 end:0x80088368 .rodata start:0x8011E0B0 end:0x8011E118 .data start:0x8013A368 end:0x8013A408 @@ -447,7 +447,7 @@ game/board/ui.c: .sbss start:0x801D40A8 end:0x801D40E0 .sdata2 start:0x801D59E0 end:0x801D5AA0 -game/board/hidden_block.c: +game/board/block.c: .text start:0x8008DF68 end:0x8008EE28 .rodata start:0x8011E200 end:0x8011E220 .data start:0x8013A608 end:0x8013A620 @@ -483,7 +483,7 @@ game/board/battle.c: .sbss start:0x801D4178 end:0x801D41A0 .sdata2 start:0x801D5DE0 end:0x801D5E88 -game/board/fortune_space.c: +game/board/fortune.c: .text start:0x8009D148 end:0x8009DFD0 .rodata start:0x8011E380 end:0x8011E3A8 .data start:0x8013AB10 end:0x8013AB28 @@ -519,7 +519,7 @@ game/board/boo_house.c: game/board/start.c: .text start:0x800A6EE4 end:0x800A9708 .rodata start:0x8011E3D0 end:0x8011E3F0 - .data start:0x8013AF70 end:0x8013B1F8 + .data start:0x8013AF70 end:0x8013B0D8 .bss start:0x801A4CD8 end:0x801A4CF0 .sdata start:0x801D3840 end:0x801D3850 .sbss start:0x801D4230 end:0x801D4240 @@ -528,9 +528,9 @@ game/board/start.c: game/board/last5.c: .text start:0x800A9708 end:0x800ADB84 .rodata start:0x8011E3F0 end:0x8011E430 - .data start:0x8013B1F8 end:0x8013B3F0 + .data start:0x8013B0D8 end:0x8013B3F0 .bss start:0x801A4CF0 end:0x801A4D38 - .sdata start:0x801D3850 end:0x801D38B8 + .sdata start:0x801D3850 end:0x801D38A8 .sbss start:0x801D4240 end:0x801D4260 .sdata2 start:0x801D6198 end:0x801D6298 @@ -538,6 +538,7 @@ game/board/pause.c: .text start:0x800ADB84 end:0x800B1974 .data start:0x8013B3F0 end:0x8013B518 .bss start:0x801A4D38 end:0x801A4D68 + .sdata start:0x801D38A8 end:0x801D38B8 .sbss start:0x801D4260 end:0x801D4280 .sdata2 start:0x801D6298 end:0x801D6350 diff --git a/config/GMPE01_00/symbols.txt b/config/GMPE01_00/symbols.txt index 447770c7..59d67ca6 100644 --- a/config/GMPE01_00/symbols.txt +++ b/config/GMPE01_00/symbols.txt @@ -441,8 +441,8 @@ GetBitMap = .text:0x800285E8; // type:function size:0x64 Hu3DJointMotion = .text:0x8002864C; // type:function size:0xCC JointModel_Motion = .text:0x80028718; // type:function size:0x124 Hu3DMotionCalc = .text:0x8002883C; // type:function size:0x19C -SearchObjectIndex = .text:0x800289D8; // type:function size:0x90 -SearchAttributeIndex = .text:0x80028A68; // type:function size:0x9C +SearchObjectIndex = .text:0x800289D8; // type:function size:0x90 scope:local +SearchAttributeIndex = .text:0x80028A68; // type:function size:0x9C scope:local Hu3DAnimInit = .text:0x80028B04; // type:function size:0x7C Hu3DAnimCreate = .text:0x80028B80; // type:function size:0x1D0 Hu3DAnimLink = .text:0x80028D50; // type:function size:0x1C4 @@ -545,7 +545,7 @@ XFB_putcProgressive = .text:0x80030514; // type:function size:0x1F0 XFB_putcInterlace = .text:0x80030704; // type:function size:0x1B4 GWInit = .text:0x800308B8; // type:function size:0x14C GWGameStatReset = .text:0x80030A04; // type:function size:0x318 -GWMessSpeedGet = .text:0x80030D1C; // type:function size:0x4C +GWMessDelayGet = .text:0x80030D1C; // type:function size:0x4C GWMGRecordSet = .text:0x80030D68; // type:function size:0x54 GWMGRecordGet = .text:0x80030DBC; // type:function size:0x18 GWCharColorGet = .text:0x80030DD4; // type:function size:0x140 @@ -863,9 +863,9 @@ PlayEffectSound = .text:0x8004C9D4; // type:function size:0x344 scope:local CharMotionCreate = .text:0x8004CD18; // type:function size:0x1D0 CharMotionSet = .text:0x8004CEE8; // type:function size:0x88 CharMotionKill = .text:0x8004CF70; // type:function size:0x9C -CharModelKill = .text:0x8004D00C; // type:function size:0x2B8 -CharModelKillIndex = .text:0x8004D2C4; // type:function size:0x430 -CharModelKillAll = .text:0x8004D6F4; // type:function size:0x244 +CharMotionDataClose = .text:0x8004D00C; // type:function size:0x2B8 +CharModelDataClose = .text:0x8004D2C4; // type:function size:0x430 +CharModelKill = .text:0x8004D6F4; // type:function size:0x244 CharModelMotionSet = .text:0x8004D938; // type:function size:0x7C CharModelTexAnimSet = .text:0x8004D9B4; // type:function size:0x17C CharModelTexNameGet = .text:0x8004DB30; // type:function size:0x7C @@ -895,7 +895,7 @@ fn_8004F578 = .text:0x8004F578; // type:function size:0xB0 fn_8004F628 = .text:0x8004F628; // type:function size:0x2CC fn_8004F8F4 = .text:0x8004F8F4; // type:function size:0x2CC fn_8004FBC0 = .text:0x8004FBC0; // type:function size:0xF80 -CharModelSetStepType = .text:0x80050B40; // type:function size:0x30 +CharModelStepTypeSet = .text:0x80050B40; // type:function size:0x30 PlayStepFX = .text:0x80050B70; // type:function size:0xEC scope:local MapWall = .text:0x80050C5C; // type:function size:0x1B8 MapWallCheck = .text:0x80050E14; // type:function size:0x110 @@ -1005,8 +1005,8 @@ ExecBoardFunc = .text:0x8005B494; // type:function size:0x9C scope:local KillBoardFunc = .text:0x8005B530; // type:function size:0xCC scope:local BoardKill = .text:0x8005B5FC; // type:function size:0xAC BoardIsKill = .text:0x8005B6A8; // type:function size:0x48 -BoardPauseEnableSet = .text:0x8005B6F0; // type:function size:0x74 -BoardPauseEnableGet = .text:0x8005B764; // type:function size:0x48 +BoardPauseDisableSet = .text:0x8005B6F0; // type:function size:0x74 +BoardPauseDisableGet = .text:0x8005B764; // type:function size:0x48 BoardSaveInit = .text:0x8005B7AC; // type:function size:0x524 BoardStoryConfigSet = .text:0x8005BCD0; // type:function size:0x160 BoardPartyConfigSet = .text:0x8005BE30; // type:function size:0x160 @@ -1060,8 +1060,8 @@ CalcCameraPos = .text:0x8005E798; // type:function size:0x764 scope:local BoardMGDoneFlagSet = .text:0x8005EEFC; // type:function size:0x48 BoardMGDoneFlagGet = .text:0x8005EF44; // type:function size:0x48 BoardMGExit = .text:0x8005EF8C; // type:function size:0x170 -BoardMGKill = .text:0x8005F0FC; // type:function size:0x60 -BoardMGExec = .text:0x8005F15C; // type:function size:0xC4 +KillBoardMG = .text:0x8005F0FC; // type:function size:0x60 scope:local +ExecBoardMG = .text:0x8005F15C; // type:function size:0xC4 scope:local BoardMGCreate = .text:0x8005F220; // type:function size:0x74 BoardEventFlagSet = .text:0x8005F294; // type:function size:0x28 BoardEventFlagReset = .text:0x8005F2BC; // type:function size:0x28 @@ -1075,26 +1075,26 @@ BoardRandMod = .text:0x8005FB40; // type:function size:0x50 BoardRandFloat = .text:0x8005FB90; // type:function size:0x58 BoardVecDistXZCalc = .text:0x8005FBE8; // type:function size:0x134 BoardVecMaxDistXZCheck = .text:0x8005FD1C; // type:function size:0x15C -BoardVecCalcDAngleVec = .text:0x8005FE78; // type:function size:0x7C -BoardVecCalcDAngle = .text:0x8005FEF4; // type:function size:0x34 -BoardVecCalcDAngleMod = .text:0x8005FF28; // type:function size:0x1C0 +BoardDAngleCalcVec = .text:0x8005FE78; // type:function size:0x7C +BoardDAngleCalc = .text:0x8005FEF4; // type:function size:0x34 +BoardDAngleCalcRange = .text:0x8005FF28; // type:function size:0x1C0 BoardVecMinDistCheck = .text:0x800600E8; // type:function size:0x6C BoardFilterFadeOut = .text:0x80060154; // type:function size:0xD4 BoardFilterFadeInit = .text:0x80060228; // type:function size:0x174 -BoardFilterFadeDoneCheck = .text:0x8006039C; // type:function size:0x5C -BoardFilterFadeExistCheck = .text:0x800603F8; // type:function size:0x34 +BoardFilterFadePauseCheck = .text:0x8006039C; // type:function size:0x5C +BoardFilterFadeCheck = .text:0x800603F8; // type:function size:0x34 UpdateFilter = .text:0x8006042C; // type:function size:0x178 scope:local DrawFilter = .text:0x800605A4; // type:function size:0x350 scope:local BoardConfettiCreate = .text:0x800608F4; // type:function size:0x164 -BoardConfettiStop = .text:0x80060A58; // type:function size:0x24 -BoardConfettiKill = .text:0x80060A7C; // type:function size:0x88 +BoardConfettiKill = .text:0x80060A58; // type:function size:0x24 +BoardConfettiStop = .text:0x80060A7C; // type:function size:0x88 UpdateConfetti = .text:0x80060B04; // type:function size:0xB8 scope:local SpawnConfetti = .text:0x80060BBC; // type:function size:0x564 scope:local MoveConfetti = .text:0x80061120; // type:function size:0x14C scope:local DrawConfetti = .text:0x8006126C; // type:function size:0x254 scope:local BoardLast5GfxInit = .text:0x800614C0; // type:function size:0x2B4 -BoardLast5GfxUpdate = .text:0x80061774; // type:function size:0x2AC -BoardLast5GfxHide = .text:0x80061A20; // type:function size:0xAC +UpdateLast5Gfx = .text:0x80061774; // type:function size:0x2AC scope:local +BoardLast5GfxShowSet = .text:0x80061A20; // type:function size:0xAC BoardTauntInit = .text:0x80061ACC; // type:function size:0x80 BoardTauntKill = .text:0x80061B4C; // type:function size:0x54 TauntUpdate = .text:0x80061BA0; // type:function size:0x3A4 scope:local @@ -1116,8 +1116,8 @@ BoardPlayerItemAdd = .text:0x80062B74; // type:function size:0xB0 BoardPlayerItemRemove = .text:0x80062C24; // type:function size:0xB4 BoardPlayerItemFind = .text:0x80062CD8; // type:function size:0x58 BoardPlayerItemCount = .text:0x80062D30; // type:function size:0x60 -fn_80062D90 = .text:0x80062D90; // type:function size:0x40 -BoardPlayerCurrSpacePosDirGet = .text:0x80062DD0; // type:function size:0xC4 +BoardPlayerCornerPosSet = .text:0x80062D90; // type:function size:0x40 +BoardPlayerCornerPosGet = .text:0x80062DD0; // type:function size:0xC4 BoardPlayerAmbSet = .text:0x80062E94; // type:function size:0x90 BoardPlayerMtxSet = .text:0x80062F24; // type:function size:0x80 BoardPlayerPosSetV = .text:0x80062FA4; // type:function size:0x9C @@ -1182,9 +1182,9 @@ BoardPlayerDiceJumpStart = .text:0x8006758C; // type:function size:0x1D4 BoardPlayerDiceJumpCheck = .text:0x80067760; // type:function size:0x54 DiceJumpFunc = .text:0x800677B4; // type:function size:0x3E4 scope:local BoardRotateDiceNumbers = .text:0x80067B98; // type:function size:0xF8 -BoardPlayerAnimBlendSet = .text:0x80067C90; // type:function size:0x5A0 -BoardPlayerAnimBlendExec = .text:0x80068230; // type:function size:0x51C -BoardPlayerAnimBlendCheck = .text:0x8006874C; // type:function size:0x2C +BoardPlayerMotBlendSet = .text:0x80067C90; // type:function size:0x5A0 +BoardPlayerMotBlendExec = .text:0x80068230; // type:function size:0x51C +BoardPlayerMotBlendCheck = .text:0x8006874C; // type:function size:0x2C BoardDiceDigit2DInit = .text:0x80068778; // type:function size:0x138 BoardDiceDigit2DUpdateEnable = .text:0x800688B0; // type:function size:0x38 BoardDiceDigit2DShowSet = .text:0x800688E8; // type:function size:0x10C @@ -1221,27 +1221,27 @@ BoardPlayerCopyEyeMat = .text:0x8006CFFC; // type:function size:0x24C BoardPlayerCopyMat = .text:0x8006D248; // type:function size:0xC0 BoardModelInit = .text:0x8006D308; // type:function size:0xF0 BoardModelKillAll = .text:0x8006D3F8; // type:function size:0xA0 -ModelMgrObjFunc = .text:0x8006D498; // type:function size:0x70 scope:local -stubfn_8006D508 = .text:0x8006D508; // type:function size:0x4 +ModelMgrFunc = .text:0x8006D498; // type:function size:0x70 scope:local +BoardModelDummyUpdate = .text:0x8006D508; // type:function size:0x4 BoardModelVisibilityUpdate = .text:0x8006D50C; // type:function size:0xCC -BoardModelShowSetAll = .text:0x8006D5D8; // type:function size:0x90 -BoardModelPosSetAll = .text:0x8006D668; // type:function size:0x70 +BoardModelHideSetAll = .text:0x8006D5D8; // type:function size:0x90 +BoardModelAmbSetAll = .text:0x8006D668; // type:function size:0x70 BoardModelCameraSetAll = .text:0x8006D6D8; // type:function size:0x7C -BoardModelCreateInstance = .text:0x8006D754; // type:function size:0x250 +CreateInstance = .text:0x8006D754; // type:function size:0x250 scope:local BoardModelCreate = .text:0x8006D9A4; // type:function size:0x40 BoardModelCreateCharacter = .text:0x8006D9E4; // type:function size:0x44 BoardModelCreateParam = .text:0x8006DA28; // type:function size:0x168 BoardModelKill = .text:0x8006DB90; // type:function size:0x44 BoardModelIDGet = .text:0x8006DBD4; // type:function size:0x48 fn_8006DC1C = .text:0x8006DC1C; // type:function size:0x60 -BoardModelSetPass = .text:0x8006DC7C; // type:function size:0x74 +BoardModelPassSet = .text:0x8006DC7C; // type:function size:0x74 BoardModelAmbSet = .text:0x8006DCF0; // type:function size:0x68 BoardModelExistCheck = .text:0x8006DD58; // type:function size:0x48 BoardModelExistDupe = .text:0x8006DDA0; // type:function size:0x48 fn_8006DDE8 = .text:0x8006DDE8; // type:function size:0x70 BoardModelMotionCreate = .text:0x8006DE58; // type:function size:0x140 BoardModelMotionKill = .text:0x8006DF98; // type:function size:0x118 -BoardModelMotionTimeRangeSet = .text:0x8006E0B0; // type:function size:0xE8 +BoardModelMotionStartEndSet = .text:0x8006E0B0; // type:function size:0xE8 BoardModelMotionUpdateSet = .text:0x8006E198; // type:function size:0x7C BoardModelVoiceEnableSet = .text:0x8006E214; // type:function size:0xA4 BoardModelMotionStart = .text:0x8006E2B8; // type:function size:0x174 @@ -1256,7 +1256,7 @@ BoardModelMotionSpeedGet = .text:0x8006E814; // type:function size:0x64 BoardModelMotionSpeedSet = .text:0x8006E878; // type:function size:0xA4 BoardModelMotionEndCheck = .text:0x8006E91C; // type:function size:0x80 BoardModelMotionShapeSet = .text:0x8006E99C; // type:function size:0x100 -BoardModelMotionShapeTimeSet = .text:0x8006EA9C; // type:function size:0x7C +BoardModelMotionShapeTimeGet = .text:0x8006EA9C; // type:function size:0x7C BoardModelMotionShapeMaxTimeGet = .text:0x8006EB18; // type:function size:0xBC BoardModelMotionShapeSpeedSet = .text:0x8006EBD4; // type:function size:0x88 BoardModelMotionShapeSpeedGet = .text:0x8006EC5C; // type:function size:0x64 @@ -1301,8 +1301,8 @@ BoardWinCreate = .text:0x80070530; // type:function size:0x1A0 BoardWinInsertMesSet = .text:0x800706D0; // type:function size:0x18 BoardWinWait = .text:0x800706E8; // type:function size:0x50 BoardWinKill = .text:0x80070738; // type:function size:0x38 -BoardWinSetAttr = .text:0x80070770; // type:function size:0x48 -BoardWinResetAttr = .text:0x800707B8; // type:function size:0x48 +BoardWinAttrSet = .text:0x80070770; // type:function size:0x48 +BoardWinAttrReset = .text:0x800707B8; // type:function size:0x48 BoardWinChoiceDisable = .text:0x80070800; // type:function size:0x1C BoardWinKeyWait = .text:0x8007081C; // type:function size:0xC BoardWinSpeedGet = .text:0x80070828; // type:function size:0x64 @@ -1315,63 +1315,63 @@ BoardWinPortraitGetStar = .text:0x800709C8; // type:function size:0x38 BoardWinPlayerSet = .text:0x80070A00; // type:function size:0x168 BoardWinStartComKeySet = .text:0x80070B68; // type:function size:0x214 BoardWinComKeyFuncSet = .text:0x80070D7C; // type:function size:0x8 -fn_80070D84 = .text:0x80070D84; // type:function size:0x68 -fn_80070DEC = .text:0x80070DEC; // type:function size:0xD0 -fn_80070EBC = .text:0x80070EBC; // type:function size:0x2C -fn_80070EE8 = .text:0x80070EE8; // type:function size:0x60 -fn_80070F48 = .text:0x80070F48; // type:function size:0x5C -fn_80070FA4 = .text:0x80070FA4; // type:function size:0x90 -fn_80071034 = .text:0x80071034; // type:function size:0x94 -fn_800710C8 = .text:0x800710C8; // type:function size:0x54 -fn_8007111C = .text:0x8007111C; // type:function size:0x50 -fn_8007116C = .text:0x8007116C; // type:function size:0x74 -fn_800711E0 = .text:0x800711E0; // type:function size:0x78 -fn_80071258 = .text:0x80071258; // type:function size:0x38 -fn_80071290 = .text:0x80071290; // type:function size:0x38 -fn_800712C8 = .text:0x800712C8; // type:function size:0x28 -fn_800712F0 = .text:0x800712F0; // type:function size:0x38 -fn_80071328 = .text:0x80071328; // type:function size:0x28 -fn_80071350 = .text:0x80071350; // type:function size:0x38 -fn_80071388 = .text:0x80071388; // type:function size:0x28 -fn_800713B0 = .text:0x800713B0; // type:function size:0x38 -fn_800713E8 = .text:0x800713E8; // type:function size:0x28 -fn_80071410 = .text:0x80071410; // type:function size:0xE8 -fn_800714F8 = .text:0x800714F8; // type:function size:0x100 -fn_800715F8 = .text:0x800715F8; // type:function size:0x120 -BoardCOMGetItemWeight = .text:0x80071718; // type:function size:0x74 -fn_8007178C = .text:0x8007178C; // type:function size:0xD0 -fn_8007185C = .text:0x8007185C; // type:function size:0x6C -fn_800718C8 = .text:0x800718C8; // type:function size:0x68 -fn_80071930 = .text:0x80071930; // type:function size:0x16C -fn_80071A9C = .text:0x80071A9C; // type:function size:0x220 -fn_80071CBC = .text:0x80071CBC; // type:function size:0x248 -fn_80071F04 = .text:0x80071F04; // type:function size:0x158 -fn_8007205C = .text:0x8007205C; // type:function size:0x314 -fn_80072370 = .text:0x80072370; // type:function size:0x198 -fn_80072508 = .text:0x80072508; // type:function size:0x7C -fn_80072584 = .text:0x80072584; // type:function size:0x74 -fn_800725F8 = .text:0x800725F8; // type:function size:0x304 -fn_800728FC = .text:0x800728FC; // type:function size:0xA8 -fn_800729A4 = .text:0x800729A4; // type:function size:0x134 -fn_80072AD8 = .text:0x80072AD8; // type:function size:0x3C -fn_80072B14 = .text:0x80072B14; // type:function size:0xF0 -fn_80072C04 = .text:0x80072C04; // type:function size:0x128 -fn_80072D2C = .text:0x80072D2C; // type:function size:0x34 -fn_80072D60 = .text:0x80072D60; // type:function size:0xC -fn_80072D6C = .text:0x80072D6C; // type:function size:0x3C -fn_80072DA8 = .text:0x80072DA8; // type:function size:0xC8 -fn_80072E70 = .text:0x80072E70; // type:function size:0x398 -fn_80073208 = .text:0x80073208; // type:function size:0x170 -fn_80073378 = .text:0x80073378; // type:function size:0x158 -fn_800734D0 = .text:0x800734D0; // type:function size:0x80 -fn_80073550 = .text:0x80073550; // type:function size:0x178 -fn_800736C8 = .text:0x800736C8; // type:function size:0x4C -fn_80073714 = .text:0x80073714; // type:function size:0xE0 -fn_800737F4 = .text:0x800737F4; // type:function size:0x38 -fn_8007382C = .text:0x8007382C; // type:function size:0x374 -fn_80073BA0 = .text:0x80073BA0; // type:function size:0x24 -fn_80073BC4 = .text:0x80073BC4; // type:function size:0x400 -fn_80073FC4 = .text:0x80073FC4; // type:function size:0x30 +BoardMusStartBoard = .text:0x80070D84; // type:function size:0x68 +BoardMusStart = .text:0x80070DEC; // type:function size:0xD0 +BoardAudSeqFadeOutFast = .text:0x80070EBC; // type:function size:0x2C +BoardAudSeqFadeOut = .text:0x80070EE8; // type:function size:0x60 +BoardMusLoudSet = .text:0x80070F48; // type:function size:0x5C +BoardMusVolPanSet = .text:0x80070FA4; // type:function size:0x90 +BoardAudSeqPause = .text:0x80071034; // type:function size:0x94 +BoardMusStatusGet = .text:0x800710C8; // type:function size:0x54 +BoardAudSeqClear = .text:0x8007111C; // type:function size:0x50 +BoardAudSeqFadeOutAll = .text:0x8007116C; // type:function size:0x74 +BoardAudFXPlay = .text:0x800711E0; // type:function size:0x78 +BoardAudFXStop = .text:0x80071258; // type:function size:0x38 +ExecComKeyLeft = .text:0x80071290; // type:function size:0x38 scope:local +BoardComKeySetLeft = .text:0x800712C8; // type:function size:0x28 +ExecComKeyRight = .text:0x800712F0; // type:function size:0x38 scope:local +BoardComKeySetRight = .text:0x80071328; // type:function size:0x28 +ExecComKeyUp = .text:0x80071350; // type:function size:0x38 scope:local +BoardComKeySetUp = .text:0x80071388; // type:function size:0x28 +ExecComKeyDown = .text:0x800713B0; // type:function size:0x38 scope:local +BoardComKeySetDown = .text:0x800713E8; // type:function size:0x28 +ExecComKey = .text:0x80071410; // type:function size:0xE8 scope:local +BoardComPreferItemGet = .text:0x800714F8; // type:function size:0x100 +BoardComPreferItemCheck = .text:0x800715F8; // type:function size:0x120 +BoardComItemWeightGet = .text:0x80071718; // type:function size:0x74 +BoardComTutorialItemGet = .text:0x8007178C; // type:function size:0xD0 +BoardComUseItemSet = .text:0x8007185C; // type:function size:0x6C +BoardComUseItemCheck = .text:0x800718C8; // type:function size:0x68 +ChooseUseItem = .text:0x80071930; // type:function size:0x16C scope:local +CheckMiniUse = .text:0x80071A9C; // type:function size:0x220 scope:local +CheckMegaUse = .text:0x80071CBC; // type:function size:0x248 scope:local +CheckSparkUse = .text:0x80071F04; // type:function size:0x158 scope:local +CheckBoardChangeUse = .text:0x8007205C; // type:function size:0x314 scope:local +CheckSwapUse = .text:0x80072370; // type:function size:0x198 scope:local +CheckBooUse = .text:0x80072508; // type:function size:0x7C scope:local +CheckLampUse = .text:0x80072584; // type:function size:0x74 scope:local +BoardComJunctionInputGet = .text:0x800725F8; // type:function size:0x304 +BoardComBestPlayerFind = .text:0x800728FC; // type:function size:0xA8 +BoardViewOverheadExec = .text:0x800729A4; // type:function size:0x134 +BoardViewFocusGetPos = .text:0x80072AD8; // type:function size:0x3C +BoardViewFocusSet = .text:0x80072B14; // type:function size:0xF0 +BoardViewMoveStart = .text:0x80072C04; // type:function size:0x128 +BoardViewMoveCheck = .text:0x80072D2C; // type:function size:0x34 +BoardViewMoveEnd = .text:0x80072D60; // type:function size:0xC +BoardViewWait = .text:0x80072D6C; // type:function size:0x3C +BoardViewMapExec = .text:0x80072DA8; // type:function size:0xC8 +ExecMapView = .text:0x80072E70; // type:function size:0x398 scope:local +ExecStarView = .text:0x80073208; // type:function size:0x170 scope:local +ExecOverheadView = .text:0x80073378; // type:function size:0x158 scope:local +DestroyView = .text:0x800734D0; // type:function size:0x80 scope:local +SetTargetView = .text:0x80073550; // type:function size:0x178 scope:local +DestroyFocus = .text:0x800736C8; // type:function size:0x4C scope:local +CreateButtonWin = .text:0x80073714; // type:function size:0xE0 scope:local +DestroyButtonWin = .text:0x800737F4; // type:function size:0x38 scope:local +InitOverheadView = .text:0x8007382C; // type:function size:0x374 scope:local +DestroyOverheadView = .text:0x80073BA0; // type:function size:0x24 scope:local +UpdateOverheadView = .text:0x80073BC4; // type:function size:0x400 scope:local +WaitOverheadView = .text:0x80073FC4; // type:function size:0x30 scope:local BoardSpaceWalkEventFuncSet = .text:0x80073FF4; // type:function size:0x8 BoardSpaceWalkMiniEventFuncSet = .text:0x80073FFC; // type:function size:0x8 BoardSpaceLandEventFuncSet = .text:0x80074004; // type:function size:0x8 @@ -1394,7 +1394,7 @@ BoardSpaceLinkTypeListGet = .text:0x800748F8; // type:function size:0x148 BoardSpaceLinkTargetListGet = .text:0x80074A40; // type:function size:0x104 BoardSpaceLinkTypeSearch = .text:0x80074B44; // type:function size:0x110 BoardSpaceLinkTransformGet = .text:0x80074C54; // type:function size:0x1FC -BoardSpaceStarSet = .text:0x80074E50; // type:function size:0x1BC +BoardSpaceHostSet = .text:0x80074E50; // type:function size:0x1BC BoardSpaceStarSetIndex = .text:0x8007500C; // type:function size:0x4AC BoardSpaceStarGetNext = .text:0x800754B8; // type:function size:0x344 BoardSpaceStarGetRandom = .text:0x800757FC; // type:function size:0x9C @@ -1405,85 +1405,85 @@ BoardSpaceStarCheck = .text:0x800759E0; // type:function size:0x110 BoardSpaceLandExec = .text:0x80075AF0; // type:function size:0x474 BoardSpaceWalkExec = .text:0x80075F64; // type:function size:0x2A4 BoardSpaceBlockExec = .text:0x80076208; // type:function size:0x180 -BoardSpacePipeExec = .text:0x80076388; // type:function size:0x268 +ExecPipeSpace = .text:0x80076388; // type:function size:0x268 scope:local BoardSpaceTypeForce = .text:0x800765F0; // type:function size:0x5C BoardSpaceHide = .text:0x8007664C; // type:function size:0x48 DrawSpaces = .text:0x80076694; // type:function size:0x9E8 scope:local BoardSpaceRead = .text:0x8007707C; // type:function size:0x174 -BoardSpaceSetCamera = .text:0x800771F0; // type:function size:0x2C -BoardSpaceBlockSetPos = .text:0x8007721C; // type:function size:0xD0 +BoardSpaceCameraSet = .text:0x800771F0; // type:function size:0x2C +BoardSpaceBlockPosSet = .text:0x8007721C; // type:function size:0xD0 BoardSpaceInit = .text:0x800772EC; // type:function size:0x750 BoardSpaceDestroy = .text:0x80077A3C; // type:function size:0x70 -fn_80077AAC = .text:0x80077AAC; // type:function size:0x8 -fn_80077AB4 = .text:0x80077AB4; // type:function size:0x8 -fn_80077ABC = .text:0x80077ABC; // type:function size:0xD4 -fn_80077B90 = .text:0x80077B90; // type:function size:0xA0 +BoardShopHostSet = .text:0x80077AAC; // type:function size:0x8 +BoardShopHostGet = .text:0x80077AB4; // type:function size:0x8 +BoardShopInit = .text:0x80077ABC; // type:function size:0xD4 +BoardShopKill = .text:0x80077B90; // type:function size:0xA0 BoardShopExec = .text:0x80077C30; // type:function size:0x9C -fn_80077CCC = .text:0x80077CCC; // type:function size:0x800 -fn_800784CC = .text:0x800784CC; // type:function size:0xD4 -fn_800785A0 = .text:0x800785A0; // type:function size:0x1B4 -fn_80078754 = .text:0x80078754; // type:function size:0xBC -fn_80078810 = .text:0x80078810; // type:function size:0x13C -fn_8007894C = .text:0x8007894C; // type:function size:0x314 -fn_80078C60 = .text:0x80078C60; // type:function size:0x168 -fn_80078DC8 = .text:0x80078DC8; // type:function size:0x2C -fn_80078DF4 = .text:0x80078DF4; // type:function size:0x18C -fn_80078F80 = .text:0x80078F80; // type:function size:0x168 -fn_800790E8 = .text:0x800790E8; // type:function size:0x34C -fn_80079434 = .text:0x80079434; // type:function size:0x144 -fn_80079578 = .text:0x80079578; // type:function size:0x6C -fn_800795E4 = .text:0x800795E4; // type:function size:0x280 -fn_80079864 = .text:0x80079864; // type:function size:0xA0 -fn_80079904 = .text:0x80079904; // type:function size:0x14C -fn_80079A50 = .text:0x80079A50; // type:function size:0x1C8 -fn_80079C18 = .text:0x80079C18; // type:function size:0x60 -COMGetShopItemSelect = .text:0x80079C78; // type:function size:0x158 scope:local -fn_80079DD0 = .text:0x80079DD0; // type:function size:0x30 -fn_80079E00 = .text:0x80079E00; // type:function size:0x188 -fn_80079F88 = .text:0x80079F88; // type:function size:0xC -fn_80079F94 = .text:0x80079F94; // type:function size:0x38 -fn_80079FCC = .text:0x80079FCC; // type:function size:0x260 -fn_8007A22C = .text:0x8007A22C; // type:function size:0x104 -fn_8007A330 = .text:0x8007A330; // type:function size:0x30 -fn_8007A360 = .text:0x8007A360; // type:function size:0x4DC -fn_8007A83C = .text:0x8007A83C; // type:function size:0x8 -fn_8007A844 = .text:0x8007A844; // type:function size:0x8 +ExecShop = .text:0x80077CCC; // type:function size:0x800 scope:local +DestroyShop = .text:0x800784CC; // type:function size:0xD4 scope:local +PopupShop = .text:0x800785A0; // type:function size:0x1B4 scope:local +CloseShop = .text:0x80078754; // type:function size:0xBC scope:local +CreateShopWin = .text:0x80078810; // type:function size:0x13C scope:local +UpdateShopWin = .text:0x8007894C; // type:function size:0x314 scope:local +SetShopWinItem = .text:0x80078C60; // type:function size:0x168 scope:local +PauseShopWin = .text:0x80078DC8; // type:function size:0x2C scope:local +StartItemGive = .text:0x80078DF4; // type:function size:0x18C scope:local +ExecItemGive = .text:0x80078F80; // type:function size:0x168 scope:local +MoveItemGive = .text:0x800790E8; // type:function size:0x34C scope:local +ShrinkItemGive = .text:0x80079434; // type:function size:0x144 scope:local +WaitItemGive = .text:0x80079578; // type:function size:0x6C scope:local +GetShopItems = .text:0x800795E4; // type:function size:0x280 scope:local +GetDefaultShopItems = .text:0x80079864; // type:function size:0xA0 scope:local +SortShopItems = .text:0x80079904; // type:function size:0x14C scope:local +DecideComEnter = .text:0x80079A50; // type:function size:0x1C8 scope:local +DecideComBuy = .text:0x80079C18; // type:function size:0x60 scope:local +GetComItemChoice = .text:0x80079C78; // type:function size:0x158 scope:local +WaitItemChoice = .text:0x80079DD0; // type:function size:0x30 scope:local +CreateShopItemChoice = .text:0x80079E00; // type:function size:0x188 scope:local +GetShopItemChoice = .text:0x80079F88; // type:function size:0xC scope:local +GetShopItemWinChoice = .text:0x80079F94; // type:function size:0x38 scope:local +MoveShopItemChoice = .text:0x80079FCC; // type:function size:0x260 scope:local +UpdateShopItemChoice = .text:0x8007A22C; // type:function size:0x104 scope:local +GetShopItemChoiceInput = .text:0x8007A330; // type:function size:0x30 scope:local +BoardShopTutorialExec = .text:0x8007A360; // type:function size:0x4DC +BoardLotteryHostSet = .text:0x8007A83C; // type:function size:0x8 +BoardLotteryHostGet = .text:0x8007A844; // type:function size:0x8 BoardLotteryExec = .text:0x8007A84C; // type:function size:0x8C -fn_8007A8D8 = .text:0x8007A8D8; // type:function size:0x16C -fn_8007AA44 = .text:0x8007AA44; // type:function size:0x3B4 -fn_8007ADF8 = .text:0x8007ADF8; // type:function size:0x1FC -fn_8007AFF4 = .text:0x8007AFF4; // type:function size:0x64 -fn_8007B058 = .text:0x8007B058; // type:function size:0xB0 -fn_8007B108 = .text:0x8007B108; // type:function size:0x798 -fn_8007B8A0 = .text:0x8007B8A0; // type:function size:0x20C -fn_8007BAAC = .text:0x8007BAAC; // type:function size:0x1BC -fn_8007BC68 = .text:0x8007BC68; // type:function size:0xF0 -fn_8007BD58 = .text:0x8007BD58; // type:function size:0x3C8 -fn_8007C120 = .text:0x8007C120; // type:function size:0x140 -fn_8007C260 = .text:0x8007C260; // type:function size:0x914 -fn_8007CB74 = .text:0x8007CB74; // type:function size:0xC8 -fn_8007CC3C = .text:0x8007CC3C; // type:function size:0x27C -fn_8007CEB8 = .text:0x8007CEB8; // type:function size:0x30C -fn_8007D1C4 = .text:0x8007D1C4; // type:function size:0x3AC -fn_8007D570 = .text:0x8007D570; // type:function size:0x6C -fn_8007D5DC = .text:0x8007D5DC; // type:function size:0x21C -fn_8007D7F8 = .text:0x8007D7F8; // type:function size:0x68 -fn_8007D860 = .text:0x8007D860; // type:function size:0x288 -fn_8007DAE8 = .text:0x8007DAE8; // type:function size:0x3DC -fn_8007DEC4 = .text:0x8007DEC4; // type:function size:0x14C -fn_8007E010 = .text:0x8007E010; // type:function size:0xD0 -fn_8007E0E0 = .text:0x8007E0E0; // type:function size:0x160 -fn_8007E240 = .text:0x8007E240; // type:function size:0xA8 -fn_8007E2E8 = .text:0x8007E2E8; // type:function size:0x84 -fn_8007E36C = .text:0x8007E36C; // type:function size:0x6B0 -fn_8007EA1C = .text:0x8007EA1C; // type:function size:0x440 -fn_8007EE5C = .text:0x8007EE5C; // type:function size:0x338 -fn_8007F194 = .text:0x8007F194; // type:function size:0x68 -fn_8007F1FC = .text:0x8007F1FC; // type:function size:0x4C0 -fn_8007F6BC = .text:0x8007F6BC; // type:function size:0xA4 -fn_8007F760 = .text:0x8007F760; // type:function size:0xFC -fn_8007F85C = .text:0x8007F85C; // type:function size:0x38 -fn_8007F894 = .text:0x8007F894; // type:function size:0x2BC +BoardLotteryInit = .text:0x8007A8D8; // type:function size:0x16C +CreateModel = .text:0x8007AA44; // type:function size:0x3B4 scope:local +KillModel = .text:0x8007ADF8; // type:function size:0x1FC scope:local +BoardLotteryKill = .text:0x8007AFF4; // type:function size:0x64 +DestroyLottery = .text:0x8007B058; // type:function size:0xB0 scope:local +ExecLottery = .text:0x8007B108; // type:function size:0x798 scope:local +DoMiniJumpUp = .text:0x8007B8A0; // type:function size:0x20C scope:local +DoMiniJumpDown = .text:0x8007BAAC; // type:function size:0x1BC scope:local +PayEnterFee = .text:0x8007BC68; // type:function size:0xF0 scope:local +ShowTicket = .text:0x8007BD58; // type:function size:0x3C8 scope:local +SetupTicket = .text:0x8007C120; // type:function size:0x140 scope:local +ExecBallGame = .text:0x8007C260; // type:function size:0x914 scope:local +SetBallPrize = .text:0x8007CB74; // type:function size:0xC8 scope:local +ExecBallPrize = .text:0x8007CC3C; // type:function size:0x27C scope:local +ExecScratchTicket = .text:0x8007CEB8; // type:function size:0x30C scope:local +ExecScratch = .text:0x8007D1C4; // type:function size:0x3AC scope:local +KillScratch = .text:0x8007D570; // type:function size:0x6C scope:local +ExecScratchSpr = .text:0x8007D5DC; // type:function size:0x21C scope:local +HideScratchSpr = .text:0x8007D7F8; // type:function size:0x68 scope:local +InitScratchSpr = .text:0x8007D860; // type:function size:0x288 scope:local +ExecScratchPick = .text:0x8007DAE8; // type:function size:0x3DC scope:local +InitScratchPick = .text:0x8007DEC4; // type:function size:0x14C scope:local +InitTicketPrizes = .text:0x8007E010; // type:function size:0xD0 scope:local +ExecTicketFocus = .text:0x8007E0E0; // type:function size:0x160 scope:local +ScratchTicketCheckDone = .text:0x8007E240; // type:function size:0xA8 scope:local +TicketGetPixel = .text:0x8007E2E8; // type:function size:0x84 scope:local +TicketUpdate = .text:0x8007E36C; // type:function size:0x6B0 scope:local +ExecCoinPrize = .text:0x8007EA1C; // type:function size:0x440 scope:local +ExecItemPrize = .text:0x8007EE5C; // type:function size:0x338 scope:local +KillCoin = .text:0x8007F194; // type:function size:0x68 scope:local +ExecPrize = .text:0x8007F1FC; // type:function size:0x4C0 scope:local +ExecLose = .text:0x8007F6BC; // type:function size:0xA4 scope:local +CreateLotteryWin = .text:0x8007F760; // type:function size:0xFC scope:local +KillLotteryWin = .text:0x8007F85C; // type:function size:0x38 scope:local +BoardLotteryTutorialExec = .text:0x8007F894; // type:function size:0x2BC BoardLandBlueExec = .text:0x8007FB50; // type:function size:0x184 BoardLandRedExec = .text:0x8007FCD4; // type:function size:0x19C BoardCoinChgCreate = .text:0x8007FE70; // type:function size:0x1E8 @@ -1503,90 +1503,90 @@ WarpLaunch = .text:0x800811BC; // type:function size:0xBC scope:local WarpStartImpact = .text:0x80081278; // type:function size:0x1B0 scope:local WarpFall = .text:0x80081428; // type:function size:0xA4 scope:local WarpImpact = .text:0x800814CC; // type:function size:0x200 scope:local -fn_800816CC = .text:0x800816CC; // type:function size:0x11C -fn_800817E8 = .text:0x800817E8; // type:function size:0x34 -fn_8008181C = .text:0x8008181C; // type:function size:0x50 -fn_8008186C = .text:0x8008186C; // type:function size:0x18 -fn_80081884 = .text:0x80081884; // type:function size:0x1C -fn_800818A0 = .text:0x800818A0; // type:function size:0xFC -fn_8008199C = .text:0x8008199C; // type:function size:0x754 -fn_800820F0 = .text:0x800820F0; // type:function size:0x314 -fn_80082404 = .text:0x80082404; // type:function size:0x164 -fn_80082568 = .text:0x80082568; // type:function size:0x120 -fn_80082688 = .text:0x80082688; // type:function size:0x10C -fn_80082794 = .text:0x80082794; // type:function size:0x38 -fn_800827CC = .text:0x800827CC; // type:function size:0xBC -fn_80082888 = .text:0x80082888; // type:function size:0x224 -fn_80082AAC = .text:0x80082AAC; // type:function size:0x10 -fn_80082ABC = .text:0x80082ABC; // type:function size:0x148 -fn_80082C04 = .text:0x80082C04; // type:function size:0x8C +BoardCharWheelInit = .text:0x800816CC; // type:function size:0x11C +BoardCharWheelCheck = .text:0x800817E8; // type:function size:0x34 +BoardCharWheelWait = .text:0x8008181C; // type:function size:0x50 +BoardCharWheelResultGet = .text:0x8008186C; // type:function size:0x18 +BoardCharWheelSpeedSet = .text:0x80081884; // type:function size:0x1C +ExecCharWheel = .text:0x800818A0; // type:function size:0xFC scope:local +InitCharWheel = .text:0x8008199C; // type:function size:0x754 scope:local +UpdateCharWheel = .text:0x800820F0; // type:function size:0x314 scope:local +StopCharWheel = .text:0x80082404; // type:function size:0x164 scope:local +GrowCharWheel = .text:0x80082568; // type:function size:0x120 scope:local +ShrinkCharWheel = .text:0x80082688; // type:function size:0x10C scope:local +KillCharWheelSpr = .text:0x80082794; // type:function size:0x38 scope:local +SetCharWheelChars = .text:0x800827CC; // type:function size:0xBC scope:local +GetInput = .text:0x80082888; // type:function size:0x224 scope:local +BoardCharWheelSetTarget = .text:0x80082AAC; // type:function size:0x10 +GetComDelay = .text:0x80082ABC; // type:function size:0x148 scope:local +GetComInput = .text:0x80082C04; // type:function size:0x8C scope:local BoardMushroomExec = .text:0x80082C90; // type:function size:0xA4 -fn_80082D34 = .text:0x80082D34; // type:function size:0x38C -fn_800830C0 = .text:0x800830C0; // type:function size:0x58 -fn_80083118 = .text:0x80083118; // type:function size:0x118 -fn_80083230 = .text:0x80083230; // type:function size:0x114 -fn_80083344 = .text:0x80083344; // type:function size:0x160 -fn_800834A4 = .text:0x800834A4; // type:function size:0x68 -fn_8008350C = .text:0x8008350C; // type:function size:0xD4 -fn_800835E0 = .text:0x800835E0; // type:function size:0x2EC -fn_800838CC = .text:0x800838CC; // type:function size:0x64 -fn_80083930 = .text:0x80083930; // type:function size:0x34 -fn_80083964 = .text:0x80083964; // type:function size:0x54 -fn_800839B8 = .text:0x800839B8; // type:function size:0x34 -fn_800839EC = .text:0x800839EC; // type:function size:0x5C -fn_80083A48 = .text:0x80083A48; // type:function size:0x58 -fn_80083AA0 = .text:0x80083AA0; // type:function size:0x60 -fn_80083B00 = .text:0x80083B00; // type:function size:0x240 -fn_80083D40 = .text:0x80083D40; // type:function size:0xD4 -fn_80083E14 = .text:0x80083E14; // type:function size:0x38 -fn_80083E4C = .text:0x80083E4C; // type:function size:0x48 -fn_80083E94 = .text:0x80083E94; // type:function size:0x48 -fn_80083EDC = .text:0x80083EDC; // type:function size:0xA8 +MushroomMain = .text:0x80082D34; // type:function size:0x38C scope:local +KillMushroom = .text:0x800830C0; // type:function size:0x58 scope:local +BoxMain = .text:0x80083118; // type:function size:0x118 scope:local +ShowBox = .text:0x80083230; // type:function size:0x114 scope:local +ExitBox = .text:0x80083344; // type:function size:0x160 scope:local +HideBox = .text:0x800834A4; // type:function size:0x68 scope:local +CenterBox = .text:0x8008350C; // type:function size:0xD4 scope:local +InitBox = .text:0x800835E0; // type:function size:0x2EC scope:local +MarkKillBox = .text:0x800838CC; // type:function size:0x64 scope:local +SetBoxHide = .text:0x80083930; // type:function size:0x34 scope:local +SetBoxCenter = .text:0x80083964; // type:function size:0x54 scope:local +SetBoxShow = .text:0x800839B8; // type:function size:0x34 scope:local +WaitBoxOpen = .text:0x800839EC; // type:function size:0x5C scope:local +WaitBoxCenter = .text:0x80083A48; // type:function size:0x58 scope:local +CheckBox = .text:0x80083AA0; // type:function size:0x60 scope:local +DoItemGive = .text:0x80083B00; // type:function size:0x240 scope:local +StartItemGive = .text:0x80083D40; // type:function size:0xD4 scope:local +KillItemMdl = .text:0x80083E14; // type:function size:0x38 scope:local +ShowItemMdl = .text:0x80083E4C; // type:function size:0x48 scope:local +WaitItemGive = .text:0x80083E94; // type:function size:0x48 scope:local +BoardStarHostSet = .text:0x80083EDC; // type:function size:0xA8 BoardStarHostMdlGet = .text:0x80083F84; // type:function size:0x8 BoardStarExec = .text:0x80083F8C; // type:function size:0xCC -fn_80084058 = .text:0x80084058; // type:function size:0x8F4 -fn_8008494C = .text:0x8008494C; // type:function size:0x84 -fn_800849D0 = .text:0x800849D0; // type:function size:0x160 -fn_80084B30 = .text:0x80084B30; // type:function size:0x144 -fn_80084C74 = .text:0x80084C74; // type:function size:0x10C -fn_80084D80 = .text:0x80084D80; // type:function size:0x180 -fn_80084F00 = .text:0x80084F00; // type:function size:0x204 -fn_80085104 = .text:0x80085104; // type:function size:0x38 -fn_8008513C = .text:0x8008513C; // type:function size:0xB4 -fn_800851F0 = .text:0x800851F0; // type:function size:0x40 -fn_80085230 = .text:0x80085230; // type:function size:0x31C -fn_8008554C = .text:0x8008554C; // type:function size:0x628 -fn_80085B74 = .text:0x80085B74; // type:function size:0x130 -fn_80085CA4 = .text:0x80085CA4; // type:function size:0x24 -fn_80085CC8 = .text:0x80085CC8; // type:function size:0x1EC -fn_80085EB4 = .text:0x80085EB4; // type:function size:0x38 -fn_80085EEC = .text:0x80085EEC; // type:function size:0x84 -fn_80085F70 = .text:0x80085F70; // type:function size:0x4C -fn_80085FBC = .text:0x80085FBC; // type:function size:0x490 -fn_8008644C = .text:0x8008644C; // type:function size:0x280 -fn_800866CC = .text:0x800866CC; // type:function size:0x1C8 -fn_80086894 = .text:0x80086894; // type:function size:0x60 -fn_800868F4 = .text:0x800868F4; // type:function size:0x130 -fn_80086A24 = .text:0x80086A24; // type:function size:0x60 -fn_80086A84 = .text:0x80086A84; // type:function size:0x7E4 -fn_80087268 = .text:0x80087268; // type:function size:0x40 -fn_800872A8 = .text:0x800872A8; // type:function size:0x90 -fn_80087338 = .text:0x80087338; // type:function size:0xE0 -fn_80087418 = .text:0x80087418; // type:function size:0x84 -fn_8008749C = .text:0x8008749C; // type:function size:0x94 -fn_80087530 = .text:0x80087530; // type:function size:0x8C -fn_800875BC = .text:0x800875BC; // type:function size:0x58 -fn_80087614 = .text:0x80087614; // type:function size:0xC0 -fn_800876D4 = .text:0x800876D4; // type:function size:0x200 -fn_800878D4 = .text:0x800878D4; // type:function size:0xAC -fn_80087980 = .text:0x80087980; // type:function size:0x68 -fn_800879E8 = .text:0x800879E8; // type:function size:0xB4 -fn_80087A9C = .text:0x80087A9C; // type:function size:0x390 -fn_80087E2C = .text:0x80087E2C; // type:function size:0x110 -fn_80087F3C = .text:0x80087F3C; // type:function size:0x248 -fn_80088184 = .text:0x80088184; // type:function size:0x110 -fn_80088294 = .text:0x80088294; // type:function size:0x88 -fn_8008831C = .text:0x8008831C; // type:function size:0x4C +ExecStar = .text:0x80084058; // type:function size:0x8F4 scope:local +DestroyStar = .text:0x8008494C; // type:function size:0x84 scope:local +GiveStarMain = .text:0x800849D0; // type:function size:0x160 scope:local +UpdateStarAngle = .text:0x80084B30; // type:function size:0x144 scope:local +InitGiveStar = .text:0x80084C74; // type:function size:0x10C scope:local +MoveGiveStar = .text:0x80084D80; // type:function size:0x180 scope:local +ShrinkGiveStar = .text:0x80084F00; // type:function size:0x204 scope:local +StopGiveStar = .text:0x80085104; // type:function size:0x38 scope:local +InitGiveStarEffect = .text:0x8008513C; // type:function size:0xB4 scope:local +KillGiveStarEffect = .text:0x800851F0; // type:function size:0x40 scope:local +BoardStarGive = .text:0x80085230; // type:function size:0x31C +BoardStarShowNext = .text:0x8008554C; // type:function size:0x628 +ShowNextUpdate = .text:0x80085B74; // type:function size:0x130 scope:local +HideNextHost = .text:0x80085CA4; // type:function size:0x24 scope:local +BoardRollExec = .text:0x80085CC8; // type:function size:0x1EC +BoardRollKill = .text:0x80085EB4; // type:function size:0x38 +BoardRollUPauseSet = .text:0x80085EEC; // type:function size:0x84 +BoardRollWinDispSet = .text:0x80085F70; // type:function size:0x4C +RollMain = .text:0x80085FBC; // type:function size:0x490 scope:local +DiceCreate = .text:0x8008644C; // type:function size:0x280 scope:local +DoInput = .text:0x800866CC; // type:function size:0x1C8 scope:local +DiceWaitFull = .text:0x80086894; // type:function size:0x60 scope:local +DiceSetHit = .text:0x800868F4; // type:function size:0x130 scope:local +RollDestroy = .text:0x80086A24; // type:function size:0x60 scope:local +DiceMain = .text:0x80086A84; // type:function size:0x7E4 scope:local +DicePause = .text:0x80087268; // type:function size:0x40 scope:local +DicePauseAll = .text:0x800872A8; // type:function size:0x90 scope:local +BoardDiceEffectCreate = .text:0x80087338; // type:function size:0xE0 +DiceHideEffect = .text:0x80087418; // type:function size:0x84 scope:local +BoardDicePauseAll = .text:0x8008749C; // type:function size:0x94 +BoardDiceDoneCheck = .text:0x80087530; // type:function size:0x8C +BoardDiceStop = .text:0x800875BC; // type:function size:0x58 +BoardDiceVisibleSet = .text:0x80087614; // type:function size:0xC0 +BoardDiceValueSet = .text:0x800876D4; // type:function size:0x200 +DiceDigitMain = .text:0x800878D4; // type:function size:0xAC scope:local +DiceDigitKill = .text:0x80087980; // type:function size:0x68 scope:local +DiceKill = .text:0x800879E8; // type:function size:0xB4 scope:local +DiceDigitMove = .text:0x80087A9C; // type:function size:0x390 scope:local +DiceDigitRotate = .text:0x80087E2C; // type:function size:0x110 scope:local +SameRollExec = .text:0x80087F3C; // type:function size:0x248 scope:local +GetBtnRoll = .text:0x80088184; // type:function size:0x110 scope:local +GetComBtnRoll = .text:0x80088294; // type:function size:0x88 scope:local +BoardRollTutorialSet = .text:0x8008831C; // type:function size:0x4C BoardItemModelGet = .text:0x80088368; // type:function size:0x90 BoardItemNameGet = .text:0x800883F8; // type:function size:0x98 BoardStatusStopCheck = .text:0x80088490; // type:function size:0x48 @@ -1654,304 +1654,304 @@ UpdateItemWindow = .text:0x8008DA8C; // type:function size:0x350 scope:local CreatePickerWindow = .text:0x8008DDDC; // type:function size:0x148 scope:local KillPickerWindow = .text:0x8008DF24; // type:function size:0x44 scope:local BoardBlockExec = .text:0x8008DF68; // type:function size:0x84 -fn_8008DFEC = .text:0x8008DFEC; // type:function size:0x358 -fn_8008E344 = .text:0x8008E344; // type:function size:0x54 -fn_8008E398 = .text:0x8008E398; // type:function size:0x1F4 -fn_8008E58C = .text:0x8008E58C; // type:function size:0x12C -fn_8008E6B8 = .text:0x8008E6B8; // type:function size:0x38 -fn_8008E6F0 = .text:0x8008E6F0; // type:function size:0x120 -fn_8008E810 = .text:0x8008E810; // type:function size:0xCC -fn_8008E8DC = .text:0x8008E8DC; // type:function size:0x140 -fn_8008EA1C = .text:0x8008EA1C; // type:function size:0x2C -fn_8008EA48 = .text:0x8008EA48; // type:function size:0x2C -fn_8008EA74 = .text:0x8008EA74; // type:function size:0x48 -fn_8008EABC = .text:0x8008EABC; // type:function size:0x94 -fn_8008EB50 = .text:0x8008EB50; // type:function size:0x9C -fn_8008EBEC = .text:0x8008EBEC; // type:function size:0x10C -fn_8008ECF8 = .text:0x8008ECF8; // type:function size:0x130 -fn_8008EE28 = .text:0x8008EE28; // type:function size:0x74 -fn_8008EE9C = .text:0x8008EE9C; // type:function size:0x1C -fn_8008EEB8 = .text:0x8008EEB8; // type:function size:0x6C -fn_8008EF24 = .text:0x8008EF24; // type:function size:0x64 -fn_8008EF88 = .text:0x8008EF88; // type:function size:0x64 -fn_8008EFEC = .text:0x8008EFEC; // type:function size:0xC -fn_8008EFF8 = .text:0x8008EFF8; // type:function size:0xC -fn_8008F004 = .text:0x8008F004; // type:function size:0x180 -fn_8008F184 = .text:0x8008F184; // type:function size:0x1BC -fn_8008F340 = .text:0x8008F340; // type:function size:0x220 -fn_8008F560 = .text:0x8008F560; // type:function size:0x374 -fn_8008F8D4 = .text:0x8008F8D4; // type:function size:0x204 -fn_8008FAD8 = .text:0x8008FAD8; // type:function size:0xA4 -fn_8008FB7C = .text:0x8008FB7C; // type:function size:0xA4 -fn_8008FC20 = .text:0x8008FC20; // type:function size:0xA4 -fn_8008FCC4 = .text:0x8008FCC4; // type:function size:0xA4 -fn_8008FD68 = .text:0x8008FD68; // type:function size:0x584 -fn_800902EC = .text:0x800902EC; // type:function size:0xD34 -fn_80091020 = .text:0x80091020; // type:function size:0xEBC -fn_80091EDC = .text:0x80091EDC; // type:function size:0x4FC -fn_800923D8 = .text:0x800923D8; // type:function size:0xC8 -fn_800924A0 = .text:0x800924A0; // type:function size:0xE3C -fn_800932DC = .text:0x800932DC; // type:function size:0x3D4 -fn_800936B0 = .text:0x800936B0; // type:function size:0x1370 -fn_80094A20 = .text:0x80094A20; // type:function size:0x488 -fn_80094EA8 = .text:0x80094EA8; // type:function size:0x388 -fn_80095230 = .text:0x80095230; // type:function size:0xB0 -fn_800952E0 = .text:0x800952E0; // type:function size:0x7A4 -fn_80095A84 = .text:0x80095A84; // type:function size:0x9D8 -fn_8009645C = .text:0x8009645C; // type:function size:0x628 -fn_80096A84 = .text:0x80096A84; // type:function size:0x3C -fn_80096AC0 = .text:0x80096AC0; // type:function size:0x13C -fn_80096BFC = .text:0x80096BFC; // type:function size:0xDC -fn_80096CD8 = .text:0x80096CD8; // type:function size:0x584 -fn_8009725C = .text:0x8009725C; // type:function size:0x1C -fn_80097278 = .text:0x80097278; // type:function size:0x2C -fn_800972A4 = .text:0x800972A4; // type:function size:0x2C -fn_800972D0 = .text:0x800972D0; // type:function size:0x2C -fn_800972FC = .text:0x800972FC; // type:function size:0x2C -fn_80097328 = .text:0x80097328; // type:function size:0x284 +BlockProc = .text:0x8008DFEC; // type:function size:0x358 scope:local +DestroyBlock = .text:0x8008E344; // type:function size:0x54 scope:local +CreateBlockObj = .text:0x8008E398; // type:function size:0x1F4 scope:local +ExecBlockObj = .text:0x8008E58C; // type:function size:0x12C scope:local +DestroyBlockObj = .text:0x8008E6B8; // type:function size:0x38 scope:local +SpawnBlock = .text:0x8008E6F0; // type:function size:0x120 scope:local +HitBlock = .text:0x8008E810; // type:function size:0xCC scope:local +OpenBlock = .text:0x8008E8DC; // type:function size:0x140 scope:local +SetBlockOpen = .text:0x8008EA1C; // type:function size:0x2C scope:local +SetBlockStop = .text:0x8008EA48; // type:function size:0x2C scope:local +WaitBlockHit = .text:0x8008EA74; // type:function size:0x48 scope:local +CreateCoinMdl = .text:0x8008EABC; // type:function size:0x94 scope:local +KillCoinMdl = .text:0x8008EB50; // type:function size:0x9C scope:local +PopupCoin = .text:0x8008EBEC; // type:function size:0x10C scope:local +PopupCoinExec = .text:0x8008ECF8; // type:function size:0x130 scope:local +BoardItemStart = .text:0x8008EE28; // type:function size:0x74 +BoardItemDoneCheck = .text:0x8008EE9C; // type:function size:0x1C +BoardItemPlayerRestore = .text:0x8008EEB8; // type:function size:0x6C +ItemProcess = .text:0x8008EF24; // type:function size:0x64 scope:local +RestoreProcess = .text:0x8008EF88; // type:function size:0x64 scope:local +ItemDestroy = .text:0x8008EFEC; // type:function size:0xC scope:local +RestoreDestroy = .text:0x8008EFF8; // type:function size:0xC scope:local +ItemSizeShowAnim = .text:0x8008F004; // type:function size:0x180 scope:local +ItemRotProc = .text:0x8008F184; // type:function size:0x1BC scope:local +ItemShowProc = .text:0x8008F340; // type:function size:0x220 scope:local +ItemGetTarget = .text:0x8008F560; // type:function size:0x374 scope:local +ItemSizeSet = .text:0x8008F8D4; // type:function size:0x204 scope:local +ExecItemMini = .text:0x8008FAD8; // type:function size:0xA4 scope:local +ExecItemMega = .text:0x8008FB7C; // type:function size:0xA4 scope:local +ExecItemMiniSuper = .text:0x8008FC20; // type:function size:0xA4 scope:local +ExecItemMegaSuper = .text:0x8008FCC4; // type:function size:0xA4 scope:local +ExecItemHammer = .text:0x8008FD68; // type:function size:0x584 scope:local +ExecItemPipe = .text:0x800902EC; // type:function size:0xD34 scope:local +ExecItemSwap = .text:0x80091020; // type:function size:0xEBC scope:local +ExecItemSpark = .text:0x80091EDC; // type:function size:0x4FC scope:local +ExecItemLight = .text:0x800923D8; // type:function size:0xC8 scope:local +ExecItemWhistle = .text:0x800924A0; // type:function size:0xE3C scope:local +ExecItemBowser = .text:0x800932DC; // type:function size:0x3D4 scope:local +ExecItemBooBall = .text:0x800936B0; // type:function size:0x1370 scope:local +LampParticleUpdate = .text:0x80094A20; // type:function size:0x488 scope:local +GenieParticleUpdate = .text:0x80094EA8; // type:function size:0x388 scope:local +GenieCameraProc = .text:0x80095230; // type:function size:0xB0 scope:local +GenieCameraCalc = .text:0x800952E0; // type:function size:0x7A4 scope:local +GenieSceneExec = .text:0x80095A84; // type:function size:0x9D8 scope:local +ExecItemGenie = .text:0x8009645C; // type:function size:0x628 scope:local +BoardItemBagItemSet = .text:0x80096A84; // type:function size:0x3C +ExecItemBagJump = .text:0x80096AC0; // type:function size:0x13C scope:local +ExecItemBagShow = .text:0x80096BFC; // type:function size:0xDC scope:local +ExecItemBag = .text:0x80096CD8; // type:function size:0x584 scope:local +RestoreItemNull = .text:0x8009725C; // type:function size:0x1C scope:local +RestoreItemMini = .text:0x80097278; // type:function size:0x2C scope:local +RestoreItemMega = .text:0x800972A4; // type:function size:0x2C scope:local +RestoreItemMiniSuper = .text:0x800972D0; // type:function size:0x2C scope:local +RestoreItemMegaSuper = .text:0x800972FC; // type:function size:0x2C scope:local +RestoreItemBowser = .text:0x80097328; // type:function size:0x284 scope:local BoardBowserExec = .text:0x800975AC; // type:function size:0x144 -fn_800976F0 = .text:0x800976F0; // type:function size:0x28C -fn_8009797C = .text:0x8009797C; // type:function size:0x208 -fn_80097B84 = .text:0x80097B84; // type:function size:0x1DC -fn_80097D60 = .text:0x80097D60; // type:function size:0x30 -fn_80097D90 = .text:0x80097D90; // type:function size:0x148 -fn_80097ED8 = .text:0x80097ED8; // type:function size:0x1B4 -fn_8009808C = .text:0x8009808C; // type:function size:0x250 -fn_800982DC = .text:0x800982DC; // type:function size:0x220 -fn_800984FC = .text:0x800984FC; // type:function size:0x2B0 -fn_800987AC = .text:0x800987AC; // type:function size:0x160 -fn_8009890C = .text:0x8009890C; // type:function size:0xB8 -fn_800989C4 = .text:0x800989C4; // type:function size:0x1C -fn_800989E0 = .text:0x800989E0; // type:function size:0x148 -fn_80098B28 = .text:0x80098B28; // type:function size:0x210 -fn_80098D38 = .text:0x80098D38; // type:function size:0x228 -fn_80098F60 = .text:0x80098F60; // type:function size:0x230 -fn_80099190 = .text:0x80099190; // type:function size:0x270 -fn_80099400 = .text:0x80099400; // type:function size:0x58 -fn_80099458 = .text:0x80099458; // type:function size:0x44 -fn_8009949C = .text:0x8009949C; // type:function size:0x150 -fn_800995EC = .text:0x800995EC; // type:function size:0x128 -fn_80099714 = .text:0x80099714; // type:function size:0x34 -fn_80099748 = .text:0x80099748; // type:function size:0x5C -fn_800997A4 = .text:0x800997A4; // type:function size:0xD4 -fn_80099878 = .text:0x80099878; // type:function size:0x1C -fn_80099894 = .text:0x80099894; // type:function size:0x18C -fn_80099A20 = .text:0x80099A20; // type:function size:0x1E8 -fn_80099C08 = .text:0x80099C08; // type:function size:0x38 -fn_80099C40 = .text:0x80099C40; // type:function size:0x24 -fn_80099C64 = .text:0x80099C64; // type:function size:0xEC -fn_80099D50 = .text:0x80099D50; // type:function size:0x1C8 -fn_80099F18 = .text:0x80099F18; // type:function size:0x108 -fn_8009A020 = .text:0x8009A020; // type:function size:0x160 -fn_8009A180 = .text:0x8009A180; // type:function size:0x1AC -fn_8009A32C = .text:0x8009A32C; // type:function size:0xB8 -fn_8009A3E4 = .text:0x8009A3E4; // type:function size:0x90 -fn_8009A474 = .text:0x8009A474; // type:function size:0x160 -fn_8009A5D4 = .text:0x8009A5D4; // type:function size:0xE4 -fn_8009A6B8 = .text:0x8009A6B8; // type:function size:0xCC -fn_8009A784 = .text:0x8009A784; // type:function size:0x40 -fn_8009A7C4 = .text:0x8009A7C4; // type:function size:0x188 -fn_8009A94C = .text:0x8009A94C; // type:function size:0x2C4 -fn_8009AC10 = .text:0x8009AC10; // type:function size:0x2B8 -fn_8009AEC8 = .text:0x8009AEC8; // type:function size:0x24 -fn_8009AEEC = .text:0x8009AEEC; // type:function size:0xC -fn_8009AEF8 = .text:0x8009AEF8; // type:function size:0x10 -fn_8009AF08 = .text:0x8009AF08; // type:function size:0x14C -fn_8009B054 = .text:0x8009B054; // type:function size:0x120 -fn_8009B174 = .text:0x8009B174; // type:function size:0xB4 -fn_8009B228 = .text:0x8009B228; // type:function size:0x88 -fn_8009B2B0 = .text:0x8009B2B0; // type:function size:0x80 -fn_8009B330 = .text:0x8009B330; // type:function size:0xD8 -fn_8009B408 = .text:0x8009B408; // type:function size:0x6C -fn_8009B474 = .text:0x8009B474; // type:function size:0x60 +ExecBowser = .text:0x800976F0; // type:function size:0x28C scope:local +ExecBowserMain = .text:0x8009797C; // type:function size:0x208 scope:local +ExecMGReturn = .text:0x80097B84; // type:function size:0x1DC scope:local +DestroyBowser = .text:0x80097D60; // type:function size:0x30 scope:local +SquishPlayers = .text:0x80097D90; // type:function size:0x148 scope:local +ExecBowserSpecial = .text:0x80097ED8; // type:function size:0x1B4 scope:local +ExecBowserGame = .text:0x8009808C; // type:function size:0x250 scope:local +DoMGReturnEffect = .text:0x800982DC; // type:function size:0x220 scope:local +ExecBowserShuffle = .text:0x800984FC; // type:function size:0x2B0 scope:local +ExecBowserRevo = .text:0x800987AC; // type:function size:0x160 scope:local +ExecBowserSuit = .text:0x8009890C; // type:function size:0xB8 scope:local +CheckSuitGive = .text:0x800989C4; // type:function size:0x1C scope:local +StartSuitGive = .text:0x800989E0; // type:function size:0x148 scope:local +SuitGiveMain = .text:0x80098B28; // type:function size:0x210 scope:local +CreateBowserObj = .text:0x80098D38; // type:function size:0x228 scope:local +ExecBowserObj = .text:0x80098F60; // type:function size:0x230 scope:local +ExecBowserFall = .text:0x80099190; // type:function size:0x270 scope:local +ExecBowserLaugh = .text:0x80099400; // type:function size:0x58 scope:local +ExecBowserFire = .text:0x80099458; // type:function size:0x44 scope:local +ExecBowserJump = .text:0x8009949C; // type:function size:0x150 scope:local +ExecBowserPowerUp = .text:0x800995EC; // type:function size:0x128 scope:local +SetBowserState = .text:0x80099714; // type:function size:0x34 scope:local +CheckBowserIdle = .text:0x80099748; // type:function size:0x5C scope:local +CreateMiniBowser = .text:0x800997A4; // type:function size:0xD4 scope:local +CheckMiniBowser = .text:0x80099878; // type:function size:0x1C scope:local +ExecMiniBowser = .text:0x80099894; // type:function size:0x18C scope:local +CreateBowserEvent = .text:0x80099A20; // type:function size:0x1E8 scope:local +CheckBowserEvent = .text:0x80099C08; // type:function size:0x38 scope:local +StopBowserEvent = .text:0x80099C40; // type:function size:0x24 scope:local +ExecBowserEvent = .text:0x80099C64; // type:function size:0xEC scope:local +ShowBowserEvent = .text:0x80099D50; // type:function size:0x1C8 scope:local +HideBowserEvent = .text:0x80099F18; // type:function size:0x108 scope:local +ConfigBowserEvent = .text:0x8009A020; // type:function size:0x160 scope:local +CreatePlayerMot = .text:0x8009A180; // type:function size:0x1AC scope:local +KillPlayerMot = .text:0x8009A32C; // type:function size:0xB8 scope:local +InitBowserFire = .text:0x8009A3E4; // type:function size:0x90 scope:local +BowserFireHook = .text:0x8009A474; // type:function size:0x160 scope:local +SpawnBowserFire = .text:0x8009A5D4; // type:function size:0xE4 scope:local +CheckBowserFire = .text:0x8009A6B8; // type:function size:0xCC scope:local +KillBowserFire = .text:0x8009A784; // type:function size:0x40 scope:local +ExecMiniBowserEvent = .text:0x8009A7C4; // type:function size:0x188 scope:local +MiniBowserTakeAll = .text:0x8009A94C; // type:function size:0x2C4 scope:local +MiniBowserTake = .text:0x8009AC10; // type:function size:0x2B8 scope:local +MiniBowserBalloonStop = .text:0x8009AEC8; // type:function size:0x24 scope:local +GetMiniBowserBalloonState = .text:0x8009AEEC; // type:function size:0xC scope:local +SetMiniBowserBalloonState = .text:0x8009AEF8; // type:function size:0x10 scope:local +CreateMiniBowserBalloon = .text:0x8009AF08; // type:function size:0x14C scope:local +ExecMiniBowserBalloon = .text:0x8009B054; // type:function size:0x120 scope:local +MiniBowserBalloonHover = .text:0x8009B174; // type:function size:0xB4 scope:local +MiniBowserBalloonFall = .text:0x8009B228; // type:function size:0x88 scope:local +MiniBowserBalloonRaise = .text:0x8009B2B0; // type:function size:0x80 scope:local +SetMiniBowserMotion = .text:0x8009B330; // type:function size:0xD8 scope:local +SetMiniBowserMotionPause = .text:0x8009B408; // type:function size:0x6C scope:local +WaitMiniBowserMotion = .text:0x8009B474; // type:function size:0x60 scope:local BoardBattleExec = .text:0x8009B4D4; // type:function size:0x124 -fn_8009B5F8 = .text:0x8009B5F8; // type:function size:0x2C -fn_8009B624 = .text:0x8009B624; // type:function size:0x708 -fn_8009BD2C = .text:0x8009BD2C; // type:function size:0x1D4 -fn_8009BF00 = .text:0x8009BF00; // type:function size:0x1FC -fn_8009C0FC = .text:0x8009C0FC; // type:function size:0x24 -fn_8009C120 = .text:0x8009C120; // type:function size:0x2D0 -fn_8009C3F0 = .text:0x8009C3F0; // type:function size:0x1E8 -fn_8009C5D8 = .text:0x8009C5D8; // type:function size:0x1A0 -fn_8009C778 = .text:0x8009C778; // type:function size:0x64 -fn_8009C7DC = .text:0x8009C7DC; // type:function size:0x88 -fn_8009C864 = .text:0x8009C864; // type:function size:0x124 -fn_8009C988 = .text:0x8009C988; // type:function size:0x8C -fn_8009CA14 = .text:0x8009CA14; // type:function size:0x260 -fn_8009CC74 = .text:0x8009CC74; // type:function size:0x128 -fn_8009CD9C = .text:0x8009CD9C; // type:function size:0x12C -fn_8009CEC8 = .text:0x8009CEC8; // type:function size:0x58 -fn_8009CF20 = .text:0x8009CF20; // type:function size:0x64 -fn_8009CF84 = .text:0x8009CF84; // type:function size:0x24 -fn_8009CFA8 = .text:0x8009CFA8; // type:function size:0x10 -fn_8009CFB8 = .text:0x8009CFB8; // type:function size:0x34 -fn_8009CFEC = .text:0x8009CFEC; // type:function size:0x15C +DestroyBattle = .text:0x8009B5F8; // type:function size:0x2C scope:local +ExecBattle = .text:0x8009B624; // type:function size:0x708 scope:local +TakeCoins = .text:0x8009BD2C; // type:function size:0x1D4 scope:local +InitExplode = .text:0x8009BF00; // type:function size:0x1FC scope:local +CheckExplode = .text:0x8009C0FC; // type:function size:0x24 scope:local +UpdateExplode = .text:0x8009C120; // type:function size:0x2D0 scope:local +CreateBattleMain = .text:0x8009C3F0; // type:function size:0x1E8 scope:local +UpdateBattleMain = .text:0x8009C5D8; // type:function size:0x1A0 scope:local +DescendBattleBomb = .text:0x8009C778; // type:function size:0x64 scope:local +EndBattle = .text:0x8009C7DC; // type:function size:0x88 scope:local +ShowBattleGame = .text:0x8009C864; // type:function size:0x124 scope:local +RaiseBattleGame = .text:0x8009C988; // type:function size:0x8C scope:local +UpdateBattleCoin = .text:0x8009CA14; // type:function size:0x260 scope:local +ShowBattleCoin = .text:0x8009CC74; // type:function size:0x128 scope:local +InitBattleGameSpr = .text:0x8009CD9C; // type:function size:0x12C scope:local +HideBattleSpr = .text:0x8009CEC8; // type:function size:0x58 scope:local +VibratePad = .text:0x8009CF20; // type:function size:0x64 scope:local +StopBattleBomb = .text:0x8009CF84; // type:function size:0x24 scope:local +GetBattleBombState = .text:0x8009CFA8; // type:function size:0x10 scope:local +SetBattleBombState = .text:0x8009CFB8; // type:function size:0x34 scope:local +SetBattleCoinValue = .text:0x8009CFEC; // type:function size:0x15C scope:local BoardFortuneExec = .text:0x8009D148; // type:function size:0x124 -fn_8009D26C = .text:0x8009D26C; // type:function size:0x74 -fn_8009D2E0 = .text:0x8009D2E0; // type:function size:0xC -fn_8009D2EC = .text:0x8009D2EC; // type:function size:0x340 -fn_8009D62C = .text:0x8009D62C; // type:function size:0xF8 -fn_8009D724 = .text:0x8009D724; // type:function size:0x160 -fn_8009D884 = .text:0x8009D884; // type:function size:0x5C -fn_8009D8E0 = .text:0x8009D8E0; // type:function size:0x198 -fn_8009DA78 = .text:0x8009DA78; // type:function size:0x18C -fn_8009DC04 = .text:0x8009DC04; // type:function size:0x20C -fn_8009DE10 = .text:0x8009DE10; // type:function size:0x78 -fn_8009DE88 = .text:0x8009DE88; // type:function size:0x78 -fn_8009DF00 = .text:0x8009DF00; // type:function size:0x68 -fn_8009DF68 = .text:0x8009DF68; // type:function size:0x68 -fn_8009DFD0 = .text:0x8009DFD0; // type:function size:0x11C -fn_8009E0EC = .text:0x8009E0EC; // type:function size:0x2C -fn_8009E118 = .text:0x8009E118; // type:function size:0x2A8 -fn_8009E3C0 = .text:0x8009E3C0; // type:function size:0x1D4 -fn_8009E594 = .text:0x8009E594; // type:function size:0xE8 -fn_8009E67C = .text:0x8009E67C; // type:function size:0x280 -fn_8009E8FC = .text:0x8009E8FC; // type:function size:0xC0 -fn_8009E9BC = .text:0x8009E9BC; // type:function size:0xA8 -fn_8009EA64 = .text:0x8009EA64; // type:function size:0x94 -fn_8009EAF8 = .text:0x8009EAF8; // type:function size:0x10 -fn_8009EB08 = .text:0x8009EB08; // type:function size:0xBC -fn_8009EBC4 = .text:0x8009EBC4; // type:function size:0x1D4 -fn_8009ED98 = .text:0x8009ED98; // type:function size:0xAC -fn_8009EE44 = .text:0x8009EE44; // type:function size:0x28 -fn_8009EE6C = .text:0x8009EE6C; // type:function size:0x4C -fn_8009EEB8 = .text:0x8009EEB8; // type:function size:0x300 -fn_8009F1B8 = .text:0x8009F1B8; // type:function size:0x4A0 -fn_8009F658 = .text:0x8009F658; // type:function size:0x9C -fn_8009F6F4 = .text:0x8009F6F4; // type:function size:0x1DC -fn_8009F8D0 = .text:0x8009F8D0; // type:function size:0x358 -fn_8009FC28 = .text:0x8009FC28; // type:function size:0x24 -fn_8009FC4C = .text:0x8009FC4C; // type:function size:0x2C -fn_8009FC78 = .text:0x8009FC78; // type:function size:0x214 -fn_8009FE8C = .text:0x8009FE8C; // type:function size:0x15C -fn_8009FFE8 = .text:0x8009FFE8; // type:function size:0x110 -fn_800A00F8 = .text:0x800A00F8; // type:function size:0x68 -fn_800A0160 = .text:0x800A0160; // type:function size:0x1E0 -fn_800A0340 = .text:0x800A0340; // type:function size:0x10C -fn_800A044C = .text:0x800A044C; // type:function size:0x190 -fn_800A05DC = .text:0x800A05DC; // type:function size:0x328 -fn_800A0904 = .text:0x800A0904; // type:function size:0x170 -fn_800A0A74 = .text:0x800A0A74; // type:function size:0x24 -fn_800A0A98 = .text:0x800A0A98; // type:function size:0x128 -fn_800A0BC0 = .text:0x800A0BC0; // type:function size:0x54 -fn_800A0C14 = .text:0x800A0C14; // type:function size:0x104 -fn_800A0D18 = .text:0x800A0D18; // type:function size:0x218 -fn_800A0F30 = .text:0x800A0F30; // type:function size:0xF4 -fn_800A1024 = .text:0x800A1024; // type:function size:0x178 -fn_800A119C = .text:0x800A119C; // type:function size:0x1B0 -fn_800A134C = .text:0x800A134C; // type:function size:0xDC -fn_800A1428 = .text:0x800A1428; // type:function size:0x9C -fn_800A14C4 = .text:0x800A14C4; // type:function size:0x68 -fn_800A152C = .text:0x800A152C; // type:function size:0x168 -fn_800A1694 = .text:0x800A1694; // type:function size:0x184 -fn_800A1818 = .text:0x800A1818; // type:function size:0x1C -fn_800A1834 = .text:0x800A1834; // type:function size:0x30 -fn_800A1864 = .text:0x800A1864; // type:function size:0x20 -fn_800A1884 = .text:0x800A1884; // type:function size:0x1B0 -fn_800A1A34 = .text:0x800A1A34; // type:function size:0x60 -fn_800A1A94 = .text:0x800A1A94; // type:function size:0x1C -fn_800A1AB0 = .text:0x800A1AB0; // type:function size:0x6FC -fn_800A21AC = .text:0x800A21AC; // type:function size:0x3B0 -fn_800A255C = .text:0x800A255C; // type:function size:0x3A8 -fn_800A2904 = .text:0x800A2904; // type:function size:0x388 -fn_800A2C8C = .text:0x800A2C8C; // type:function size:0x3A4 -fn_800A3030 = .text:0x800A3030; // type:function size:0x194 -fn_800A31C4 = .text:0x800A31C4; // type:function size:0x198 -fn_800A335C = .text:0x800A335C; // type:function size:0x174 -fn_800A34D0 = .text:0x800A34D0; // type:function size:0x200 -fn_800A36D0 = .text:0x800A36D0; // type:function size:0x20C -fn_800A38DC = .text:0x800A38DC; // type:function size:0x1C8 -fn_800A3AA4 = .text:0x800A3AA4; // type:function size:0x204 -fn_800A3CA8 = .text:0x800A3CA8; // type:function size:0xA8 -fn_800A3D50 = .text:0x800A3D50; // type:function size:0x430 -fn_800A4180 = .text:0x800A4180; // type:function size:0x8FC -fn_800A4A7C = .text:0x800A4A7C; // type:function size:0x74 -fn_800A4AF0 = .text:0x800A4AF0; // type:function size:0xC8 -fn_800A4BB8 = .text:0x800A4BB8; // type:function size:0xD0 -fn_800A4C88 = .text:0x800A4C88; // type:function size:0x2E4 -fn_800A4F6C = .text:0x800A4F6C; // type:function size:0x8 -fn_800A4F74 = .text:0x800A4F74; // type:function size:0x8 -fn_800A4F7C = .text:0x800A4F7C; // type:function size:0xB4 -fn_800A5030 = .text:0x800A5030; // type:function size:0x50 +FortuneExec = .text:0x8009D26C; // type:function size:0x74 scope:local +DestroyFortune = .text:0x8009D2E0; // type:function size:0xC scope:local +FortuneMain = .text:0x8009D2EC; // type:function size:0x340 scope:local +FortunePostMG = .text:0x8009D62C; // type:function size:0xF8 scope:local +CreateFortunePlatform = .text:0x8009D724; // type:function size:0x160 scope:local +CameraCalcFortune = .text:0x8009D884; // type:function size:0x5C scope:local +ExecFortunePlatform = .text:0x8009D8E0; // type:function size:0x198 scope:local +ExecComFortuneWin = .text:0x8009DA78; // type:function size:0x18C scope:local +ConfigComFortune = .text:0x8009DC04; // type:function size:0x20C scope:local +ComFortuneAddStar = .text:0x8009DE10; // type:function size:0x78 scope:local +ComFortuneAddCoin = .text:0x8009DE88; // type:function size:0x78 scope:local +ComFortuneSwapCoin = .text:0x8009DF00; // type:function size:0x68 +ComFortuneSwapStar = .text:0x8009DF68; // type:function size:0x68 +BoardBooCreate = .text:0x8009DFD0; // type:function size:0x11C +BoardBooKill = .text:0x8009E0EC; // type:function size:0x2C +BoardBooStealTypeSet = .text:0x8009E118; // type:function size:0x2A8 +ComSetupStealPlayer = .text:0x8009E3C0; // type:function size:0x1D4 scope:local +ComSetStealPlayerInput = .text:0x8009E594; // type:function size:0xE8 scope:local +BoardBooStealMain = .text:0x8009E67C; // type:function size:0x280 +ExecCoinSteal = .text:0x8009E8FC; // type:function size:0xC0 scope:local +ExecStarSteal = .text:0x8009E9BC; // type:function size:0xA8 scope:local +ExecLightSteal = .text:0x8009EA64; // type:function size:0x94 scope:local +SetBooMode = .text:0x8009EAF8; // type:function size:0x10 scope:local +CreateBallMdl = .text:0x8009EB08; // type:function size:0xBC scope:local +CreateBallView = .text:0x8009EBC4; // type:function size:0x1D4 scope:local +SetBallView = .text:0x8009ED98; // type:function size:0xAC scope:local +SetBallActive = .text:0x8009EE44; // type:function size:0x28 scope:local +CheckBallKill = .text:0x8009EE6C; // type:function size:0x4C scope:local +BallMain = .text:0x8009EEB8; // type:function size:0x300 scope:local +BallRenderHook = .text:0x8009F1B8; // type:function size:0x4A0 scope:local +ExecBoo = .text:0x8009F658; // type:function size:0x9C scope:local +UpdateBallCamera = .text:0x8009F6F4; // type:function size:0x1DC scope:local +CreateBallPlayer = .text:0x8009F8D0; // type:function size:0x358 scope:local +GetBallPlayerState = .text:0x8009FC28; // type:function size:0x24 scope:local +SetBallPlayerState = .text:0x8009FC4C; // type:function size:0x2C scope:local +ExecBallPlayer = .text:0x8009FC78; // type:function size:0x214 scope:local +BallPlayerZoomOut = .text:0x8009FE8C; // type:function size:0x15C scope:local +BallPlayerScare = .text:0x8009FFE8; // type:function size:0x110 scope:local +BallPlayerTurn = .text:0x800A00F8; // type:function size:0x68 scope:local +BallPlayerPunch = .text:0x800A0160; // type:function size:0x1E0 scope:local +BallPlayerUseLight = .text:0x800A0340; // type:function size:0x10C scope:local +BallPlayerCatch = .text:0x800A044C; // type:function size:0x190 scope:local +BallBooCreate = .text:0x800A05DC; // type:function size:0x328 scope:local +SetBallBooState = .text:0x800A0904; // type:function size:0x170 scope:local +GetBallBooState = .text:0x800A0A74; // type:function size:0x24 scope:local +ExecBallBoo = .text:0x800A0A98; // type:function size:0x128 scope:local +BallBooSpawn = .text:0x800A0BC0; // type:function size:0x54 scope:local +BallBooChase = .text:0x800A0C14; // type:function size:0x104 scope:local +BallBooBattle = .text:0x800A0D18; // type:function size:0x218 scope:local +BallBooAttack = .text:0x800A0F30; // type:function size:0xF4 scope:local +BallBooFlash = .text:0x800A1024; // type:function size:0x178 scope:local +TakeBallCoin = .text:0x800A119C; // type:function size:0x1B0 scope:local +ExecTakeBallCoin = .text:0x800A134C; // type:function size:0xDC scope:local +TakeBallCoinPosSet = .text:0x800A1428; // type:function size:0x9C scope:local +CheckBallCoinDone = .text:0x800A14C4; // type:function size:0x68 +TakeBallStar = .text:0x800A152C; // type:function size:0x168 +ExecTakeBallStar = .text:0x800A1694; // type:function size:0x184 +CheckTakeBallStarDone = .text:0x800A1818; // type:function size:0x1C +BoardBooStealValueGet = .text:0x800A1834; // type:function size:0x30 +BoardBooStealLightCheck = .text:0x800A1864; // type:function size:0x20 +UpdatePlayerCoins = .text:0x800A1884; // type:function size:0x1B0 scope:local +BoardMGSetupExec = .text:0x800A1A34; // type:function size:0x60 +DestroyMGSetup = .text:0x800A1A94; // type:function size:0x1C scope:local +ExecMGSetup = .text:0x800A1AB0; // type:function size:0x6FC scope:local +DetermineMGList = .text:0x800A21AC; // type:function size:0x3B0 scope:local +SetupStatusLayout = .text:0x800A255C; // type:function size:0x3A8 scope:local +GetMGType = .text:0x800A2904; // type:function size:0x388 scope:local +GetMGTypeTeam = .text:0x800A2C8C; // type:function size:0x3A4 scope:local +CreateMGSetup = .text:0x800A3030; // type:function size:0x194 scope:local +UpdateMGSetup = .text:0x800A31C4; // type:function size:0x198 scope:local +CenterStatus = .text:0x800A335C; // type:function size:0x174 scope:local +SeparateStatus = .text:0x800A34D0; // type:function size:0x200 scope:local +PopupVS = .text:0x800A36D0; // type:function size:0x20C scope:local +FallMGType = .text:0x800A38DC; // type:function size:0x1C8 scope:local +LuckyMGFall = .text:0x800A3AA4; // type:function size:0x204 scope:local +HideLuckyValue = .text:0x800A3CA8; // type:function size:0xA8 scope:local +UpdateLuckyValue = .text:0x800A3D50; // type:function size:0x430 scope:local +UpdateMGList = .text:0x800A4180; // type:function size:0x8FC scope:local +BoardMGSetupPlayClear = .text:0x800A4A7C; // type:function size:0x74 +BoardMGSetupPlayPush = .text:0x800A4AF0; // type:function size:0xC8 +BoardMGSetupPlayPop = .text:0x800A4BB8; // type:function size:0xD0 +BoardMGSetupTutorialExec = .text:0x800A4C88; // type:function size:0x2E4 +BoardBooHouseHostSet = .text:0x800A4F6C; // type:function size:0x8 +BoardBooHouseHostGet = .text:0x800A4F74; // type:function size:0x8 +BoardBooHouseCreate = .text:0x800A4F7C; // type:function size:0xB4 +BoardBooHouseKill = .text:0x800A5030; // type:function size:0x50 BoardBooHouseExec = .text:0x800A5080; // type:function size:0x94 -fn_800A5114 = .text:0x800A5114; // type:function size:0x538 -fn_800A564C = .text:0x800A564C; // type:function size:0xF0 -fn_800A573C = .text:0x800A573C; // type:function size:0xFC -fn_800A5838 = .text:0x800A5838; // type:function size:0x3A0 -fn_800A5BD8 = .text:0x800A5BD8; // type:function size:0x124 -fn_800A5CFC = .text:0x800A5CFC; // type:function size:0xB0 -fn_800A5DAC = .text:0x800A5DAC; // type:function size:0xD4 -fn_800A5E80 = .text:0x800A5E80; // type:function size:0x68 -fn_800A5EE8 = .text:0x800A5EE8; // type:function size:0x2AC -fn_800A6194 = .text:0x800A6194; // type:function size:0x2AC -fn_800A6440 = .text:0x800A6440; // type:function size:0x188 -fn_800A65C8 = .text:0x800A65C8; // type:function size:0x16C -fn_800A6734 = .text:0x800A6734; // type:function size:0x164 -fn_800A6898 = .text:0x800A6898; // type:function size:0x70 -fn_800A6908 = .text:0x800A6908; // type:function size:0x60 -fn_800A6968 = .text:0x800A6968; // type:function size:0x1A8 -fn_800A6B10 = .text:0x800A6B10; // type:function size:0x3D4 -fn_800A6EE4 = .text:0x800A6EE4; // type:function size:0x64 -fn_800A6F48 = .text:0x800A6F48; // type:function size:0x84 -fn_800A6FCC = .text:0x800A6FCC; // type:function size:0x400 -fn_800A73CC = .text:0x800A73CC; // type:function size:0x2FC -fn_800A76C8 = .text:0x800A76C8; // type:function size:0x17C -fn_800A7844 = .text:0x800A7844; // type:function size:0x2D8 -fn_800A7B1C = .text:0x800A7B1C; // type:function size:0x188 -fn_800A7CA4 = .text:0x800A7CA4; // type:function size:0x1C8 -fn_800A7E6C = .text:0x800A7E6C; // type:function size:0xEC -fn_800A7F58 = .text:0x800A7F58; // type:function size:0x1A8 -fn_800A8100 = .text:0x800A8100; // type:function size:0x454 -fn_800A8554 = .text:0x800A8554; // type:function size:0xD8 -fn_800A862C = .text:0x800A862C; // type:function size:0x250 -fn_800A887C = .text:0x800A887C; // type:function size:0xC8 -fn_800A8944 = .text:0x800A8944; // type:function size:0x3C -fn_800A8980 = .text:0x800A8980; // type:function size:0x6D4 -fn_800A9054 = .text:0x800A9054; // type:function size:0x318 -fn_800A936C = .text:0x800A936C; // type:function size:0xA4 -fn_800A9410 = .text:0x800A9410; // type:function size:0xDC -fn_800A94EC = .text:0x800A94EC; // type:function size:0x21C -fn_800A9708 = .text:0x800A9708; // type:function size:0x84 -fn_800A978C = .text:0x800A978C; // type:function size:0x30 -fn_800A97BC = .text:0x800A97BC; // type:function size:0x1D4 -fn_800A9990 = .text:0x800A9990; // type:function size:0x184 -fn_800A9B14 = .text:0x800A9B14; // type:function size:0x48 -fn_800A9B5C = .text:0x800A9B5C; // type:function size:0x10C -fn_800A9C68 = .text:0x800A9C68; // type:function size:0xA4 -fn_800A9D0C = .text:0x800A9D0C; // type:function size:0xCC0 -fn_800AA9CC = .text:0x800AA9CC; // type:function size:0xA4 -fn_800AAA70 = .text:0x800AAA70; // type:function size:0x1FC -fn_800AAC6C = .text:0x800AAC6C; // type:function size:0xD4 -fn_800AAD40 = .text:0x800AAD40; // type:function size:0x170 -fn_800AAEB0 = .text:0x800AAEB0; // type:function size:0x88 -fn_800AAF38 = .text:0x800AAF38; // type:function size:0x20 -fn_800AAF58 = .text:0x800AAF58; // type:function size:0x24 -fn_800AAF7C = .text:0x800AAF7C; // type:function size:0x2D0 -fn_800AB24C = .text:0x800AB24C; // type:function size:0x1D8 -fn_800AB424 = .text:0x800AB424; // type:function size:0x950 -fn_800ABD74 = .text:0x800ABD74; // type:function size:0x4C -fn_800ABDC0 = .text:0x800ABDC0; // type:function size:0x488 -fn_800AC248 = .text:0x800AC248; // type:function size:0x2A4 -fn_800AC4EC = .text:0x800AC4EC; // type:function size:0x1C0 -fn_800AC6AC = .text:0x800AC6AC; // type:function size:0x7C -fn_800AC728 = .text:0x800AC728; // type:function size:0x78 -fn_800AC7A0 = .text:0x800AC7A0; // type:function size:0xB0 -fn_800AC850 = .text:0x800AC850; // type:function size:0x1CC -fn_800ACA1C = .text:0x800ACA1C; // type:function size:0x228 -fn_800ACC44 = .text:0x800ACC44; // type:function size:0x1C -fn_800ACC60 = .text:0x800ACC60; // type:function size:0xC0 -fn_800ACD20 = .text:0x800ACD20; // type:function size:0x180 -fn_800ACEA0 = .text:0x800ACEA0; // type:function size:0x2B0 -fn_800AD150 = .text:0x800AD150; // type:function size:0x44 -fn_800AD194 = .text:0x800AD194; // type:function size:0x38 -fn_800AD1CC = .text:0x800AD1CC; // type:function size:0x38 -fn_800AD204 = .text:0x800AD204; // type:function size:0x44 -fn_800AD248 = .text:0x800AD248; // type:function size:0x2B4 -fn_800AD4FC = .text:0x800AD4FC; // type:function size:0x340 -fn_800AD83C = .text:0x800AD83C; // type:function size:0x58 -fn_800AD894 = .text:0x800AD894; // type:function size:0x58 -fn_800AD8EC = .text:0x800AD8EC; // type:function size:0x38 -fn_800AD924 = .text:0x800AD924; // type:function size:0x260 +ExecBooHouse = .text:0x800A5114; // type:function size:0x538 scope:local +DestroyBooHouse = .text:0x800A564C; // type:function size:0xF0 scope:local +PickComStealType = .text:0x800A573C; // type:function size:0xFC scope:local +OpenBooHouse = .text:0x800A5838; // type:function size:0x3A0 scope:local +CloseBooHouse = .text:0x800A5BD8; // type:function size:0x124 scope:local +CreateBooHouseModel = .text:0x800A5CFC; // type:function size:0xB0 scope:local +KillBooHouseModel = .text:0x800A5DAC; // type:function size:0xD4 scope:local +ExecNullSteal = .text:0x800A5E80; // type:function size:0x68 scope:local +ExecStarSteal = .text:0x800A5EE8; // type:function size:0x2AC scope:local +ExecCoinSteal = .text:0x800A6194; // type:function size:0x2AC scope:local +ApplySteal = .text:0x800A6440; // type:function size:0x188 scope:local +ApplyCoinSteal = .text:0x800A65C8; // type:function size:0x16C scope:local +ApplyStarSteal = .text:0x800A6734; // type:function size:0x164 scope:local +ApplyBooLight = .text:0x800A6898; // type:function size:0x70 scope:local +SetBooBallPos = .text:0x800A6908; // type:function size:0x60 scope:local +BoardBooComUseCheck = .text:0x800A6968; // type:function size:0x1A8 +BoardBooHouseTutorialExec = .text:0x800A6B10; // type:function size:0x3D4 +BoardStartExec = .text:0x800A6EE4; // type:function size:0x64 +DestroyStart = .text:0x800A6F48; // type:function size:0x84 scope:local +ExecStart = .text:0x800A6FCC; // type:function size:0x400 scope:local +ShowLogo = .text:0x800A73CC; // type:function size:0x2FC scope:local +FocusStart = .text:0x800A76C8; // type:function size:0x17C scope:local +CreatePlayerStart = .text:0x800A7844; // type:function size:0x2D8 scope:local +ExecPlayerStart = .text:0x800A7B1C; // type:function size:0x188 scope:local +PlayerFall = .text:0x800A7CA4; // type:function size:0x1C8 scope:local +PlayerWaitSpeak = .text:0x800A7E6C; // type:function size:0xEC scope:local +PlayerDiceFall = .text:0x800A7F58; // type:function size:0x1A8 scope:local +PlayerDiceRoll = .text:0x800A8100; // type:function size:0x454 scope:local +PlayerDiceNumShow = .text:0x800A8554; // type:function size:0xD8 scope:local +PlayerDiceNumHide = .text:0x800A862C; // type:function size:0x250 scope:local +SetPlayerStartState = .text:0x800A887C; // type:function size:0xC8 scope:local +GetPlayerStartState = .text:0x800A8944; // type:function size:0x3C scope:local +ExecStartRoll = .text:0x800A8980; // type:function size:0x6D4 scope:local +InitCamera = .text:0x800A9054; // type:function size:0x318 scope:local +InitHost = .text:0x800A936C; // type:function size:0xA4 scope:local +CreateTapWin = .text:0x800A9410; // type:function size:0xDC scope:local +OrderPlayers = .text:0x800A94EC; // type:function size:0x21C scope:local +BoardLast5Exec = .text:0x800A9708; // type:function size:0x84 +DestroyLast5 = .text:0x800A978C; // type:function size:0x30 scope:local +ExecLast5 = .text:0x800A97BC; // type:function size:0x1D4 scope:local +CreateLast5 = .text:0x800A9990; // type:function size:0x184 scope:local +DestroyLast5 = .text:0x800A9B14; // type:function size:0x48 scope:local +InitHost = .text:0x800A9B5C; // type:function size:0x10C scope:local +KillHost = .text:0x800A9C68; // type:function size:0xA4 scope:local +Last5Main = .text:0x800A9D0C; // type:function size:0xCC0 scope:local +CheckJump = .text:0x800AA9CC; // type:function size:0xA4 scope:local +CreateLotteryDrawWheel = .text:0x800AAA70; // type:function size:0x1FC scope:local +CreateBlock = .text:0x800AAC6C; // type:function size:0xD4 scope:local +UpdateLotteryDraw = .text:0x800AAD40; // type:function size:0x170 scope:local +SetLotteryDrawState = .text:0x800AAEB0; // type:function size:0x88 scope:local +GetLotteryDrawState = .text:0x800AAF38; // type:function size:0x20 scope:local +KillLotteryWheel = .text:0x800AAF58; // type:function size:0x24 scope:local +UpdateLotteryDrawWheel = .text:0x800AAF7C; // type:function size:0x2D0 scope:local +SetLotteryWheelState = .text:0x800AB24C; // type:function size:0x1D8 scope:local +ExecLotteryDraw = .text:0x800AB424; // type:function size:0x950 scope:local +KillLotteryTicket = .text:0x800ABD74; // type:function size:0x4C scope:local +InitLotteryTicket = .text:0x800ABDC0; // type:function size:0x488 scope:local +UpdateLotteryTicket = .text:0x800AC248; // type:function size:0x2A4 scope:local +SetLotteryTicketState = .text:0x800AC4EC; // type:function size:0x1C0 scope:local +GetLotteryTicketPlayer = .text:0x800AC6AC; // type:function size:0x7C scope:local +CheckLotteryTicket = .text:0x800AC728; // type:function size:0x78 scope:local +UpdateLotteryTicketMatch = .text:0x800AC7A0; // type:function size:0xB0 scope:local +StartHostMove = .text:0x800AC850; // type:function size:0x1CC scope:local +ExecHostMove = .text:0x800ACA1C; // type:function size:0x228 scope:local +CheckHostMove = .text:0x800ACC44; // type:function size:0x1C scope:local +CreateStopWin = .text:0x800ACC60; // type:function size:0xC0 scope:local +CreateLast5Roulette = .text:0x800ACD20; // type:function size:0x180 scope:local +UpdateLast5Roulette = .text:0x800ACEA0; // type:function size:0x2B0 scope:local +SetLast5RouletteFade = .text:0x800AD150; // type:function size:0x44 scope:local +SetLast5RouletteState = .text:0x800AD194; // type:function size:0x38 scope:local +GetLast5RouletteState = .text:0x800AD1CC; // type:function size:0x38 scope:local +GetLast5RouletteResult = .text:0x800AD204; // type:function size:0x44 scope:local +CreateTeamResult = .text:0x800AD248; // type:function size:0x2B4 scope:local +CreateTeamResultSprite = .text:0x800AD4FC; // type:function size:0x340 scope:local +SetTeamResultTarget = .text:0x800AD83C; // type:function size:0x58 scope:local +GetTeamResultTarget = .text:0x800AD894; // type:function size:0x58 scope:local +KillTeamResult = .text:0x800AD8EC; // type:function size:0x38 scope:local +UpdateTeamResult = .text:0x800AD924; // type:function size:0x260 scope:local BoardPauseStart = .text:0x800ADB84; // type:function size:0x88 PauseExit = .text:0x800ADC0C; // type:function size:0x3C0 scope:local PauseProcess = .text:0x800ADFCC; // type:function size:0x108 scope:local @@ -1983,20 +1983,20 @@ BoardPauseActiveCheck = .text:0x800B1708; // type:function size:0x34 BoardPauseReqCheck = .text:0x800B173C; // type:function size:0x12C CheckPort = .text:0x800B1868; // type:function size:0x4C scope:local RotateBox = .text:0x800B18B4; // type:function size:0xC0 scope:local -fn_800B1974 = .text:0x800B1974; // type:function size:0x60 -fn_800B19D4 = .text:0x800B19D4; // type:function size:0x180 -fn_800B1B54 = .text:0x800B1B54; // type:function size:0xE4 -fn_800B1C38 = .text:0x800B1C38; // type:function size:0xB4 -fn_800B1CEC = .text:0x800B1CEC; // type:function size:0xD0 -fn_800B1DBC = .text:0x800B1DBC; // type:function size:0x30 -fn_800B1DEC = .text:0x800B1DEC; // type:function size:0xAC -fn_800B1E98 = .text:0x800B1E98; // type:function size:0xF0 -fn_800B1F88 = .text:0x800B1F88; // type:function size:0x74C -fn_800B26D4 = .text:0x800B26D4; // type:function size:0x3E4 -fn_800B2AB8 = .text:0x800B2AB8; // type:function size:0x65C -fn_800B3114 = .text:0x800B3114; // type:function size:0x488 -fn_800B359C = .text:0x800B359C; // type:function size:0x45C -fn_800B39F8 = .text:0x800B39F8; // type:function size:0x4E0 +SearchPathNodeSpace = .text:0x800B1974; // type:function size:0x60 scope:local +InitPathNode = .text:0x800B19D4; // type:function size:0x180 scope:local +FindChildNode = .text:0x800B1B54; // type:function size:0xE4 scope:local +GetNumValidLinks = .text:0x800B1C38; // type:function size:0xB4 scope:local +AddValidLinks = .text:0x800B1CEC; // type:function size:0xD0 scope:local +CheckPathSpace = .text:0x800B1DBC; // type:function size:0x30 scope:local +FindValidLink = .text:0x800B1DEC; // type:function size:0xAC scope:local +CheckEndSpace = .text:0x800B1E98; // type:function size:0xF0 scope:local +BoardComPathReachCheck = .text:0x800B1F88; // type:function size:0x74C +BoardComPathBestGet = .text:0x800B26D4; // type:function size:0x3E4 +BoardComPathLenGet = .text:0x800B2AB8; // type:function size:0x65C +CheckPath = .text:0x800B3114; // type:function size:0x488 scope:local +BoardComPathW20BestGet = .text:0x800B359C; // type:function size:0x45C +CheckW20Path = .text:0x800B39F8; // type:function size:0x4E0 scope:local TutorialProcFunc = .text:0x800B3ED8; // type:function size:0x34 scope:local BoardTutorialInit = .text:0x800B3F0C; // type:function size:0x80 BoardTutorialKill = .text:0x800B3F8C; // type:function size:0x4C @@ -4604,7 +4604,7 @@ __destroy_global_chain_reference = .dtors:0x8011DCE0; // type:object size:0x4 sc __fini_cpp_exceptions_reference = .dtors:0x8011DCE4; // type:object size:0x4 scope:global lbl_8011DD00 = .rodata:0x8011DD00; // type:object size:0x10 data:4byte lbl_8011DD10 = .rodata:0x8011DD10; // type:object size:0x10 data:4byte -lbl_8011DD20 = .rodata:0x8011DD20; // type:object size:0x10 data:4byte +lbl_8011DD20 = .rodata:0x8011DD20; // type:object size:0xC data:4byte lbl_8011DD30 = .rodata:0x8011DD30; // type:object size:0x20 data:byte lbl_8011DD50 = .rodata:0x8011DD50; // type:object size:0x10 data:4byte lbl_8011DD60 = .rodata:0x8011DD60; // type:object size:0x24 data:4byte @@ -4627,7 +4627,8 @@ lbl_8011E010 = .rodata:0x8011E010; // type:object size:0x10 lbl_8011E020 = .rodata:0x8011E020; // type:object size:0x20 data:4byte lbl_8011E040 = .rodata:0x8011E040; // type:object size:0x24 lbl_8011E064 = .rodata:0x8011E064; // type:object size:0x4C -lbl_8011E0B0 = .rodata:0x8011E0B0; // type:object size:0x68 data:4byte +lbl_8011E0B0 = .rodata:0x8011E0B0; // type:object size:0x10 data:4byte +lbl_8011E0C0 = .rodata:0x8011E0C0; // type:object size:0x54 data:4byte lbl_8011E118 = .rodata:0x8011E118; // type:object size:0x38 data:4byte lbl_8011E150 = .rodata:0x8011E150; // type:object size:0x3C data:4byte lbl_8011E18C = .rodata:0x8011E18C; // type:object size:0x14 data:2byte @@ -4639,16 +4640,17 @@ lbl_8011E220 = .rodata:0x8011E220; // type:object size:0xC data:4byte lbl_8011E22C = .rodata:0x8011E22C; // type:object size:0xC data:4byte lbl_8011E238 = .rodata:0x8011E238; // type:object size:0xC data:4byte lbl_8011E244 = .rodata:0x8011E244; // type:object size:0xC data:4byte -lbl_8011E250 = .rodata:0x8011E250; // type:object size:0x18 -lbl_8011E268 = .rodata:0x8011E268; // type:object size:0x70 data:4byte +bowserMotTbl = .rodata:0x8011E250; // type:object size:0x18 scope:local +lbl_8011E268 = .rodata:0x8011E268; // type:object size:0x10 data:4byte +lbl_8011E278 = .rodata:0x8011E278; // type:object size:0x60 data:4byte lbl_8011E2D8 = .rodata:0x8011E2D8; // type:object size:0xC data:byte -lbl_8011E2E4 = .rodata:0x8011E2E4; // type:object size:0x1C +miniBowserMotTbl = .rodata:0x8011E2E4; // type:object size:0x1C scope:local lbl_8011E300 = .rodata:0x8011E300; // type:object size:0x24 data:4byte lbl_8011E324 = .rodata:0x8011E324; // type:object size:0x20 data:4byte lbl_8011E344 = .rodata:0x8011E344; // type:object size:0x2C data:4byte lbl_8011E370 = .rodata:0x8011E370; // type:object size:0x10 data:4byte lbl_8011E380 = .rodata:0x8011E380; // type:object size:0x28 data:4byte -lbl_8011E3A8 = .rodata:0x8011E3A8; // type:object size:0x28 data:4byte +lbl_8011E3A8 = .rodata:0x8011E3A8; // type:object size:0x24 data:4byte lbl_8011E3D0 = .rodata:0x8011E3D0; // type:object size:0x20 data:4byte lbl_8011E3F0 = .rodata:0x8011E3F0; // type:object size:0x20 data:4byte lbl_8011E410 = .rodata:0x8011E410; // type:object size:0x20 data:4byte @@ -5157,10 +5159,10 @@ jumptable_801397BC = .data:0x801397BC; // type:object size:0x24 scope:local confettiLightTbl = .data:0x801397E0; // type:object size:0x48 scope:local last5GfxSprTbl = .data:0x80139828; // type:object size:0xC scope:local last5GfxPosTbl = .data:0x80139834; // type:object size:0x30 scope:local -tauntActiveSfxTbl = .data:0x80139864; // type:object size:0x10 scope:local -tauntSfxTbl = .data:0x80139874; // type:object size:0x24 scope:local +tauntActiveFXTbl = .data:0x80139864; // type:object size:0x10 scope:local +tauntFXTbl = .data:0x80139874; // type:object size:0x24 scope:local diceJumpObj = .data:0x80139898; // type:object size:0x10 scope:local -animDoneF = .data:0x801398A8; // type:object size:0x10 scope:local +motDoneF = .data:0x801398A8; // type:object size:0x10 scope:local bowserSuitMot = .data:0x801398B8; // type:object size:0xA scope:local data:2byte lbl_801398C2 = .data:0x801398C2; // type:object size:0x17 data:string lbl_801398D9 = .data:0x801398D9; // type:object size:0x17 data:string @@ -5170,8 +5172,8 @@ lbl_8013990C = .data:0x8013990C; // type:object size:0x18 data:string lbl_80139924 = .data:0x80139924; // type:object size:0x18 data:string lbl_8013993C = .data:0x8013993C; // type:object size:0x40 lbl_8013997C = .data:0x8013997C; // type:object size:0x20 -boardAnimTbl = .data:0x8013999C; // type:object size:0x20 scope:local -boardAnimRevTbl = .data:0x801399BC; // type:object size:0x20 scope:local +boardMotTbl = .data:0x8013999C; // type:object size:0x20 scope:local +boardMotRevTbl = .data:0x801399BC; // type:object size:0x20 scope:local bowserSuitCharMdlTbl = .data:0x801399DC; // type:object size:0x20 scope:local bowserSuitMotTbl = .data:0x801399FC; // type:object size:0x34 scope:local boardSparkSfxTbl = .data:0x80139A30; // type:object size:0x20 scope:local @@ -5180,44 +5182,58 @@ megaSquishObj = .data:0x80139A70; // type:object size:0x10 scope:local megaSquishSfxTbl = .data:0x80139A80; // type:object size:0x20 scope:local PortraitTbl = .data:0x80139AA0; // type:object size:0x24 scope:local StarPortraitTbl = .data:0x80139AC4; // type:object size:0x24 scope:local -lbl_80139AE8 = .data:0x80139AE8; // type:object size:0x18 -COMItemWeightTbl = .data:0x80139B00; // type:object size:0x60 scope:local -COMItemUseCheckFuncTbl = .data:0x80139B60; // type:object size:0x38 scope:local -lbl_80139B98 = .data:0x80139B98; // type:object size:0x30 -lbl_80139BC8 = .data:0x80139BC8; // type:object size:0xB8 -lbl_80139C80 = .data:0x80139C80; // type:object size:0x24 -lbl_80139CA4 = .data:0x80139CA4; // type:object size:0x24 +boardMusTbl = .data:0x80139AE8; // type:object size:0x12 scope:local +comItemWeightTbl = .data:0x80139B00; // type:object size:0x60 scope:local +comItemUseCheckFuncTbl = .data:0x80139B60; // type:object size:0x38 scope:local +comJunctionDirTbl = .data:0x80139B98; // type:object size:0x30 scope:local +overhead2DPos = .data:0x80139BC8; // type:object size:0x28 scope:local +mapViewMinZ = .data:0x80139BF0; // type:object size:0x24 scope:local +mapViewMaxZ = .data:0x80139C14; // type:object size:0x24 scope:local +mapViewMinX = .data:0x80139C38; // type:object size:0x24 scope:local +mapViewMaxX = .data:0x80139C5C; // type:object size:0x24 scope:local +overheadCamZoom = .data:0x80139C80; // type:object size:0x24 scope:local +overheadCamPosZ = .data:0x80139CA4; // type:object size:0x24 scope:local spaceImgIdx = .data:0x80139CC8; // type:object size:0xC scope:local spaceHiliteImgIdx = .data:0x80139CD4; // type:object size:0xC scope:local jumptable_80139CE0 = .data:0x80139CE0; // type:object size:0x28 scope:local -lbl_80139D08 = .data:0x80139D08; // type:object size:0x24 -ItemPriceTbl = .data:0x80139D2C; // type:object size:0x10 scope:local -lbl_80139D3C = .data:0x80139D3C; // type:object size:0x6C -lbl_80139DA8 = .data:0x80139DA8; // type:object size:0xB0 -lbl_80139E58 = .data:0x80139E58; // type:object size:0x30 data:float -lbl_80139E88 = .data:0x80139E88; // type:object size:0x1A8 -lbl_8013A030 = .data:0x8013A030; // type:object size:0xDA -lbl_8013A10A = .data:0x8013A10A; // type:object size:0x13 -lbl_8013A11D = .data:0x8013A11D; // type:object size:0x23 +hostMessTbl = .data:0x80139D08; // type:object size:0x24 scope:local +itemPriceTbl = .data:0x80139D2C; // type:object size:0x10 scope:local +shopMotTbl = .data:0x80139D3C; // type:object size:0x6C scope:local +lbl_80139DA8 = .data:0x80139DA8; // type:object size:0xA data:string +itemPrioTbl = .data:0x80139DB2; // type:object size:0x8C scope:local +rankItemGroupTbl = .data:0x80139E3E; // type:object size:0x18 scope:local +cursorPosTbl = .data:0x80139E58; // type:object size:0x30 scope:local data:float +comInputDraw1 = .data:0x80139E88; // type:object size:0xEE scope:local +comInputDraw2 = .data:0x80139F76; // type:object size:0xBA scope:local +comInputBall = .data:0x8013A030; // type:object size:0xCE scope:local +lbl_8013A0FE = .data:0x8013A0FE; // type:object size:0xC data:string +lbl_8013A10A = .data:0x8013A10A; // type:object size:0xA data:string +lbl_8013A114 = .data:0x8013A114; // type:object size:0x9 data:string +lbl_8013A11D = .data:0x8013A11D; // type:object size:0xE data:string +lbl_8013A12B = .data:0x8013A12B; // type:object size:0xA data:string +lbl_8013A135 = .data:0x8013A135; // type:object size:0xB data:string jumptable_8013A140 = .data:0x8013A140; // type:object size:0x24 scope:local -lbl_8013A164 = .data:0x8013A164; // type:object size:0x30 -lbl_8013A194 = .data:0x8013A194; // type:object size:0xC -lbl_8013A1A0 = .data:0x8013A1A0; // type:object size:0xC data:4byte -lbl_8013A1AC = .data:0x8013A1AC; // type:object size:0x20 -lbl_8013A1CC = .data:0x8013A1CC; // type:object size:0x24 +ticketObj = .data:0x8013A164; // type:object size:0x30 scope:local +ticketPrize = .data:0x8013A194; // type:object size:0xC scope:local +handLastPos = .data:0x8013A1A0; // type:object size:0xC scope:local data:4byte +loseSoundTbl = .data:0x8013A1AC; // type:object size:0x20 scope:local +loseMotTbl = .data:0x8013A1CC; // type:object size:0x20 scope:local coinChgObj = .data:0x8013A1F0; // type:object size:0x10 scope:local coinDigitMdl = .data:0x8013A200; // type:object size:0x28 scope:local jumptable_8013A228 = .data:0x8013A228; // type:object size:0x1C scope:local -lbl_8013A248 = .data:0x8013A248; // type:object size:0x58 -lbl_8013A2A0 = .data:0x8013A2A0; // type:object size:0x10 -lbl_8013A2B0 = .data:0x8013A2B0; // type:object size:0x20 -lbl_8013A2D0 = .data:0x8013A2D0; // type:object size:0x48 -lbl_8013A318 = .data:0x8013A318; // type:object size:0x50 noreloc -lbl_8013A368 = .data:0x8013A368; // type:object size:0xC data:4byte -lbl_8013A374 = .data:0x8013A374; // type:object size:0xC data:4byte -lbl_8013A380 = .data:0x8013A380; // type:object size:0xC -lbl_8013A38C = .data:0x8013A38C; // type:object size:0x50 -lbl_8013A3DC = .data:0x8013A3DC; // type:object size:0x2C +wheelSprTbl = .data:0x8013A248; // type:object size:0x28 scope:local +wheelSprPrio = .data:0x8013A270; // type:object size:0xA scope:local +wheelCharIconPrioTbl = .data:0x8013A27A; // type:object size:0x4 scope:local data:byte +wheelCharIconTbl = .data:0x8013A280; // type:object size:0x20 scope:local +lbl_8013A2A0 = .data:0x8013A2A0; // type:object size:0xF data:string +boardStarSndTbl = .data:0x8013A2B0; // type:object size:0x20 +hostMotTbl = .data:0x8013A2D0; // type:object size:0x48 scope:local +starEffParam = .data:0x8013A318; // type:object size:0x50 scope:local noreloc +diceObj = .data:0x8013A368; // type:object size:0xC scope:local data:4byte +diceDigitObj = .data:0x8013A374; // type:object size:0xC scope:local data:4byte +diceSndStatus = .data:0x8013A380; // type:object size:0xC scope:local +diceEffParam = .data:0x8013A38C; // type:object size:0x50 scope:local +diceDigitMdlTbl = .data:0x8013A3DC; // type:object size:0x28 scope:local uiStatus = .data:0x8013A408; // type:object size:0x70 scope:local data:4byte statusSprTbl = .data:0x8013A478; // type:object size:0x2C scope:local statusSprPrioTbl = .data:0x8013A4A4; // type:object size:0x18 scope:local @@ -5228,10 +5244,12 @@ statusSprPosTbl = .data:0x8013A4FC; // type:object size:0x88 scope:local data:fl statusItemPosTbl = .data:0x8013A584; // type:object size:0x30 scope:local data:float itemMdlTbl = .data:0x8013A5B4; // type:object size:0x38 scope:local teamItemStatusPosTbl = .data:0x8013A5EC; // type:object size:0x18 scope:local data:float -lbl_8013A608 = .data:0x8013A608; // type:object size:0x18 -lbl_8013A620 = .data:0x8013A620; // type:object size:0x38 -lbl_8013A658 = .data:0x8013A658; // type:object size:0x38 -lbl_8013A690 = .data:0x8013A690; // type:object size:0x70 +coinMdl = .data:0x8013A608; // type:object size:0x14 scope:local +itemFuncTbl = .data:0x8013A620; // type:object size:0x38 scope:local +itemRestoreFuncTbl = .data:0x8013A658; // type:object size:0x38 scope:local +itemMdlTbl = .data:0x8013A690; // type:object size:0x38 scope:local +forceMoveSfxTbl = .data:0x8013A6C8; // type:object size:0x18 scope:local +callMotTbl = .data:0x8013A6E0; // type:object size:0x20 scope:local lbl_8013A700 = .data:0x8013A700; // type:object size:0x13 data:string lbl_8013A713 = .data:0x8013A713; // type:object size:0x13 data:string lbl_8013A726 = .data:0x8013A726; // type:object size:0x13 data:string @@ -5239,47 +5257,72 @@ lbl_8013A739 = .data:0x8013A739; // type:object size:0x13 data:string lbl_8013A74C = .data:0x8013A74C; // type:object size:0x13 data:string lbl_8013A75F = .data:0x8013A75F; // type:object size:0x13 data:string lbl_8013A772 = .data:0x8013A772; // type:object size:0x13 data:string -lbl_8013A785 = .data:0x8013A785; // type:object size:0x63 -lbl_8013A7E8 = .data:0x8013A7E8; // type:object size:0x40 -lbl_8013A828 = .data:0x8013A828; // type:object size:0x10 -lbl_8013A838 = .data:0x8013A838; // type:object size:0x1D8 -lbl_8013AA10 = .data:0x8013AA10; // type:object size:0x20 +lbl_8013A785 = .data:0x8013A785; // type:object size:0x13 data:string +callHookTbl = .data:0x8013A798; // type:object size:0x20 scope:local +callAttackMotTbl = .data:0x8013A7B8; // type:object size:0x18 scope:local +callAttackMotTbl2 = .data:0x8013A7D0; // type:object size:0x18 scope:local +suitMotTbl = .data:0x8013A7E8; // type:object size:0x40 scope:local +lbl_8013A828 = .data:0x8013A828; // type:object size:0xE data:string +booMotTbl = .data:0x8013A838; // type:object size:0xC scope:local +shadowPos = .data:0x8013A844; // type:object size:0xC scope:local +shadowTarget = .data:0x8013A850; // type:object size:0xC scope:local +shadowUp = .data:0x8013A85C; // type:object size:0xC scope:local +armUpMotTbl = .data:0x8013A868; // type:object size:0x20 scope:local +scareMotTbl = .data:0x8013A888; // type:object size:0x20 scope:local +impactMotTbl = .data:0x8013A8A8; // type:object size:0x20 scope:local +cameraDataTbl = .data:0x8013A8C8; // type:object size:0x134 scope:local +genieMotTbl = .data:0x8013A9FC; // type:object size:0x10 scope:local +scareFXTbl = .data:0x8013AA10; // type:object size:0x20 scope:local jumptable_8013AA30 = .data:0x8013AA30; // type:object size:0x1C scope:local -lbl_8013AA4C = .data:0x8013AA4C; // type:object size:0x14 -lbl_8013AA60 = .data:0x8013AA60; // type:object size:0x18 -lbl_8013AA78 = .data:0x8013AA78; // type:object size:0x20 -lbl_8013AA98 = .data:0x8013AA98; // type:object size:0x18 +lbl_8013AA4C = .data:0x8013AA4C; // type:object size:0xD data:string +battleCursorPosTbl = .data:0x8013AA60; // type:object size:0x18 scope:local data:float +bombFXTbl = .data:0x8013AA78; // type:object size:0x20 scope:local +battleSprPrioTbl = .data:0x8013AA98; // type:object size:0x16 scope:local jumptable_8013AAB0 = .data:0x8013AAB0; // type:object size:0x24 scope:local -lbl_8013AAD4 = .data:0x8013AAD4; // type:object size:0x3C -lbl_8013AB10 = .data:0x8013AB10; // type:object size:0x18 -lbl_8013AB28 = .data:0x8013AB28; // type:object size:0xC0 -lbl_8013ABE8 = .data:0x8013ABE8; // type:object size:0x80 -lbl_8013AC68 = .data:0x8013AC68; // type:object size:0x18 +battleChanceTbl = .data:0x8013AAD4; // type:object size:0x3C scope:local +comFortuneMessTbl = .data:0x8013AB10; // type:object size:0x18 scope:local +booPlayerMotTbl = .data:0x8013AB28; // type:object size:0xC0 scope:local +booSfxTbl = .data:0x8013ABE8; // type:object size:0x80 scope:local +hostMess = .data:0x8013AC68; // type:object size:0x18 scope:local lbl_8013AC80 = .data:0x8013AC80; // type:object size:0xC data:string -lbl_8013AC8C = .data:0x8013AC8C; // type:object size:0x18 +ballBooMdl = .data:0x8013AC8C; // type:object size:0x18 scope:local jumptable_8013ACA4 = .data:0x8013ACA4; // type:object size:0x20 scope:local -lbl_8013ACC4 = .data:0x8013ACC4; // type:object size:0x24 -lbl_8013ACE8 = .data:0x8013ACE8; // type:object size:0x18 -lbl_8013AD00 = .data:0x8013AD00; // type:object size:0x34 -lbl_8013AD34 = .data:0x8013AD34; // type:object size:0x30 -lbl_8013AD64 = .data:0x8013AD64; // type:object size:0x30 -lbl_8013AD94 = .data:0x8013AD94; // type:object size:0x30 -lbl_8013ADC4 = .data:0x8013ADC4; // type:object size:0x24 +stealSuccessTbl = .data:0x8013ACC4; // type:object size:0x24 scope:local +stealTbl = .data:0x8013ACE8; // type:object size:0x12 scope:local +mgSetupSprTbl = .data:0x8013AD00; // type:object size:0x34 scope:local +statusLayout4P = .data:0x8013AD34; // type:object size:0x30 scope:local data:float +statusLayout1Vs3 = .data:0x8013AD64; // type:object size:0x30 scope:local data:float +statusLayout2Vs2 = .data:0x8013AD94; // type:object size:0x30 scope:local data:float +luckyMessTbl = .data:0x8013ADC4; // type:object size:0x24 scope:local jumptable_8013ADE8 = .data:0x8013ADE8; // type:object size:0x20 scope:local -lbl_8013AE38 = .data:0x8013AE38; // type:object size:0x90 -lbl_8013AEC8 = .data:0x8013AEC8; // type:object size:0x30 -lbl_8013AEF8 = .data:0x8013AEF8; // type:object size:0xC -lbl_8013AF04 = .data:0x8013AF04; // type:object size:0x6C -lbl_8013AF70 = .data:0x8013AF70; // type:object size:0x10 data:4byte -lbl_8013AF80 = .data:0x8013AF80; // type:object size:0xC4 -lbl_8013B044 = .data:0x8013B044; // type:object size:0x24 +cursorYTbl = .data:0x8013AE08; // type:object size:0x20 scope:local +hiliteColTbl = .data:0x8013AE28; // type:object size:0xC scope:local +hostMesTbl = .data:0x8013AE38; // type:object size:0x90 scope:local +houseMdlTbl = .data:0x8013AEC8; // type:object size:0x30 scope:local +booMotTbl = .data:0x8013AEF8; // type:object size:0xC scope:local +houseMotTbl = .data:0x8013AF04; // type:object size:0x6C scope:local +playerStartObj = .data:0x8013AF70; // type:object size:0x10 scope:local data:4byte +hitFX = .data:0x8013AF80; // type:object size:0x10 scope:local +startMesTbl = .data:0x8013AF90; // type:object size:0xB4 scope:local +logoSprTbl = .data:0x8013B044; // type:object size:0x24 scope:local jumptable_8013B068 = .data:0x8013B068; // type:object size:0x1C scope:local -lbl_8013B084 = .data:0x8013B084; // type:object size:0x30 +digitMdlTbl = .data:0x8013B084; // type:object size:0x24 scope:local +playerOrderMesTbl = .data:0x8013B0A8; // type:object size:0xC scope:local jumptable_8013B0B4 = .data:0x8013B0B4; // type:object size:0x24 scope:local -lbl_8013B0D8 = .data:0x8013B0D8; // type:object size:0x120 -lbl_8013B1F8 = .data:0x8013B1F8; // type:object size:0x24 -lbl_8013B21C = .data:0x8013B21C; // type:object size:0x28 -lbl_8013B244 = .data:0x8013B244; // type:object size:0x1AC +hostMotTbl = .data:0x8013B0D8; // type:object size:0x120 scope:local +messBaseTbl = .data:0x8013B1F8; // type:object size:0x24 scope:local +playerOfsTbl = .data:0x8013B21C; // type:object size:0x18 scope:local +plateObjNameTbl = .data:0x8013B234; // type:object size:0x10 scope:local +hiliteObjNameTbl = .data:0x8013B244; // type:object size:0x20 scope:local +resultRankFX12Tbl = .data:0x8013B264; // type:object size:0x20 scope:local +resultRankFX3Tbl = .data:0x8013B284; // type:object size:0x20 scope:local +resultRankFX4Tbl = .data:0x8013B2A4; // type:object size:0x20 scope:local +impactFXTbl = .data:0x8013B2C4; // type:object size:0x20 scope:local +lotteryWheelMdlTbl = .data:0x8013B2E4; // type:object size:0x20 scope:local +lotterySprPrioTbl = .data:0x8013B304; // type:object size:0x1E scope:local +lotterySprTbl = .data:0x8013B324; // type:object size:0x34 scope:local +lotterySprPosTbl = .data:0x8013B358; // type:object size:0x78 scope:local +teamCharSprTbl = .data:0x8013B3D0; // type:object size:0x20 scope:local boxModelID = .data:0x8013B3F0; // type:object size:0x10 scope:local data:2byte boxPosTbl = .data:0x8013B400; // type:object size:0x40 scope:local data:float padConfigPosTbl = .data:0x8013B440; // type:object size:0x20 scope:local @@ -5531,46 +5574,51 @@ postTurnHook = .bss:0x8019D978; // type:object size:0x10 scope:local playerMatCopy = .bss:0x8019D988; // type:object size:0x10 scope:local winInsertMesTbl = .bss:0x8019D998; // type:object size:0x20 scope:local choiceDisableTbl = .bss:0x8019D9B8; // type:object size:0x40 scope:local -lbl_8019D9F8 = .bss:0x8019D9F8; // type:object size:0xC data:float -lbl_8019DA04 = .bss:0x8019DA04; // type:object size:0xC data:4byte +focusPos = .bss:0x8019D9F8; // type:object size:0xC scope:local data:float +focusPosTarget = .bss:0x8019DA04; // type:object size:0xC scope:local data:4byte spaceData = .bss:0x8019DA10; // type:object size:0x7000 scope:local data:float boardSpaceStarTbl = .bss:0x801A4A10; // type:object size:0x10 spaceTex = .bss:0x801A4A20; // type:object size:0x20 scope:local spaceHiliteTex = .bss:0x801A4A40; // type:object size:0x20 scope:local -lbl_801A4A60 = .bss:0x801A4A60; // type:object size:0x14 data:4byte -lbl_801A4A74 = .bss:0x801A4A74; // type:object size:0x1C -lbl_801A4A90 = .bss:0x801A4A90; // type:object size:0xC data:2byte -lbl_801A4A9C = .bss:0x801A4A9C; // type:object size:0xC -lbl_801A4AA8 = .bss:0x801A4AA8; // type:object size:0x18 data:2byte +activeItemTbl = .bss:0x801A4A60; // type:object size:0x14 scope:local data:4byte +choiceEnableTbl = .bss:0x801A4A74; // type:object size:0x18 scope:local +lotteryMdl = .bss:0x801A4A90; // type:object size:0xC scope:local data:2byte +coinF = .bss:0x801A4A9C; // type:object size:0xC scope:local +coinMdl = .bss:0x801A4AA8; // type:object size:0x14 scope:local data:2byte warpPos = .bss:0x801A4AC0; // type:object size:0x10 scope:local -lbl_801A4AD0 = .bss:0x801A4AD0; // type:object size:0x10 data:4byte -lbl_801A4AE0 = .bss:0x801A4AE0; // type:object size:0x10 +starCharPos = .bss:0x801A4AD0; // type:object size:0xC scope:local data:4byte +tutorialRoll = .bss:0x801A4AE0; // type:object size:0xC scope:local itemMdlId = .bss:0x801A4AF0; // type:object size:0x18 scope:local pickerPos = .bss:0x801A4B08; // type:object size:0x30 scope:local itemPosTemp = .bss:0x801A4B38; // type:object size:0x48 scope:local -lbl_801A4B80 = .bss:0x801A4B80; // type:object size:0x28 -lbl_801A4BA8 = .bss:0x801A4BA8; // type:object size:0xC data:4byte -lbl_801A4BB4 = .bss:0x801A4BB4; // type:object size:0x34 data:float -lbl_801A4BE8 = .bss:0x801A4BE8; // type:object size:0x30 -lbl_801A4C18 = .bss:0x801A4C18; // type:object size:0x18 -lbl_801A4C30 = .bss:0x801A4C30; // type:object size:0x10 data:2byte -lbl_801A4C40 = .bss:0x801A4C40; // type:object size:0xC data:4byte -lbl_801A4C4C = .bss:0x801A4C4C; // type:object size:0xC data:float -lbl_801A4C58 = .bss:0x801A4C58; // type:object size:0x20 data:2byte -lbl_801A4C78 = .bss:0x801A4C78; // type:object size:0x40 data:2byte -lbl_801A4CB8 = .bss:0x801A4CB8; // type:object size:0x10 -lbl_801A4CC8 = .bss:0x801A4CC8; // type:object size:0x10 data:2byte -lbl_801A4CD8 = .bss:0x801A4CD8; // type:object size:0xC data:float -lbl_801A4CE4 = .bss:0x801A4CE4; // type:object size:0xC data:float -lbl_801A4CF0 = .bss:0x801A4CF0; // type:object size:0xC data:float -lbl_801A4CFC = .bss:0x801A4CFC; // type:object size:0xC data:float -lbl_801A4D08 = .bss:0x801A4D08; // type:object size:0xC -lbl_801A4D14 = .bss:0x801A4D14; // type:object size:0x10 data:2byte -lbl_801A4D24 = .bss:0x801A4D24; // type:object size:0x14 data:4byte +coinF = .bss:0x801A4B80; // type:object size:0x28 scope:local +booBallPos = .bss:0x801A4BA8; // type:object size:0xC scope:local data:4byte +booBallScale = .bss:0x801A4BB4; // type:object size:0xC scope:local data:float +booCamPos = .bss:0x801A4BC0; // type:object size:0xC scope:local data:float +booCamTarget = .bss:0x801A4BCC; // type:object size:0xC scope:local data:float +booCamUp = .bss:0x801A4BD8; // type:object size:0xC scope:local data:float +playerPosTemp = .bss:0x801A4BE8; // type:object size:0x30 scope:local +bowserSpr = .bss:0x801A4C18; // type:object size:0x16 scope:local +battleMGList = .bss:0x801A4C30; // type:object size:0x10 scope:local data:2byte +camPosFortune = .bss:0x801A4C40; // type:object size:0xC scope:local data:4byte +camTargetFortune = .bss:0x801A4C4C; // type:object size:0xC scope:local data:float +activeMG = .bss:0x801A4C58; // type:object size:0x20 scope:local data:2byte +mgListAll = .bss:0x801A4C78; // type:object size:0x40 scope:local data:2byte +mgPlay4P = .bss:0x801A4CB8; // type:object size:0x10 scope:local +houseMdl = .bss:0x801A4CC8; // type:object size:0xC scope:local data:2byte +spacePos = .bss:0x801A4CD8; // type:object size:0xC scope:local data:float +camStartFocusPos = .bss:0x801A4CE4; // type:object size:0xC scope:local data:float +spacePos = .bss:0x801A4CF0; // type:object size:0xC scope:local data:float +focusPos = .bss:0x801A4CFC; // type:object size:0xC scope:local data:float +hostPos = .bss:0x801A4D08; // type:object size:0xC scope:local +hostMot = .bss:0x801A4D14; // type:object size:0x10 scope:local data:2byte +lotteryTicketObj = .bss:0x801A4D24; // type:object size:0x14 scope:local data:4byte boxRot = .bss:0x801A4D38; // type:object size:0x20 scope:local padBoxPos = .bss:0x801A4D58; // type:object size:0xC scope:local data:float -lbl_801A4D68 = .bss:0x801A4D68; // type:object size:0x500 data:byte -lbl_801A5268 = .bss:0x801A5268; // type:object size:0x80 +pathNodeData = .bss:0x801A4D68; // type:object size:0x500 scope:local data:byte +candidateNodes = .bss:0x801A5268; // type:object size:0x40 scope:local +startPathSpaceSearch = .bss:0x801A52A8; // type:object size:0x20 scope:local +startPathSpace = .bss:0x801A52C8; // type:object size:0x20 scope:local boardTutorialData = .bss:0x801A52E8; // type:object size:0x10 data:4byte DriveInfo = .bss:0x801A5300; // type:object size:0x20 scope:local align:32 DriveBlock = .bss:0x801A5320; // type:object size:0x30 scope:local @@ -5807,7 +5855,7 @@ SR_PushTime = .sdata:0x801D3658; // type:object size:0x8 scope:local data:2byte SR_ResetPad = .sdata:0x801D3660; // type:object size:0x1 scope:local data:byte Xfb = .sdata:0x801D3664; // type:object size:0x8 scope:local data:4byte nextOvl = .sdata:0x801D3670; // type:object size:0x4 scope:local data:4byte -filterColor = .sdata:0x801D3674; // type:object size:0x4 scope:local data:byte +colorN$488 = .sdata:0x801D3674; // type:object size:0x4 scope:local data:byte lbl_801D3678 = .sdata:0x801D3678; // type:object size:0x8 suitMdl = .sdata:0x801D3680; // type:object size:0x2 scope:local data:2byte suitPlayerMdl = .sdata:0x801D3682; // type:object size:0x2 scope:local data:2byte @@ -5827,68 +5875,68 @@ lbl_801D36C6 = .sdata:0x801D36C6; // type:object size:0x6 data:string lbl_801D36CC = .sdata:0x801D36CC; // type:object size:0x6 data:string lbl_801D36D2 = .sdata:0x801D36D2; // type:object size:0x8 data:string windowID = .sdata:0x801D36E0; // type:object size:0x2 scope:local data:2byte -lbl_801D36E8 = .sdata:0x801D36E8; // type:object size:0x8 data:4byte -lbl_801D36F0 = .sdata:0x801D36F0; // type:object size:0x8 data:byte -lbl_801D36F8 = .sdata:0x801D36F8; // type:object size:0x2 data:2byte -lbl_801D36FA = .sdata:0x801D36FA; // type:object size:0x6 data:2byte +boardFX = .sdata:0x801D36E8; // type:object size:0x4 scope:local data:4byte +itemUse = .sdata:0x801D36F0; // type:object size:0x1 scope:local data:byte +buttonWin = .sdata:0x801D36F8; // type:object size:0x2 scope:local data:2byte +focusMdl = .sdata:0x801D36FA; // type:object size:0x2 scope:local data:2byte spaceDrawMdl = .sdata:0x801D3700; // type:object size:0x2 scope:local data:2byte -starMdl = .sdata:0x801D3702; // type:object size:0x2 scope:local data:2byte -lbl_801D3708 = .sdata:0x801D3708; // type:object size:0x2 data:2byte -lbl_801D370A = .sdata:0x801D370A; // type:object size:0x1 data:byte -lbl_801D370C = .sdata:0x801D370C; // type:object size:0x8 -lbl_801D3714 = .sdata:0x801D3714; // type:object size:0x2 data:2byte -lbl_801D3716 = .sdata:0x801D3716; // type:object size:0x6 data:2byte -lbl_801D371C = .sdata:0x801D371C; // type:object size:0x1 data:byte -lbl_801D371D = .sdata:0x801D371D; // type:object size:0xB -lbl_801D3728 = .sdata:0x801D3728; // type:object size:0x2 data:2byte -lbl_801D372A = .sdata:0x801D372A; // type:object size:0x8 data:2byte -lbl_801D3732 = .sdata:0x801D3732; // type:object size:0x2 data:2byte -lbl_801D3734 = .sdata:0x801D3734; // type:object size:0x2 data:2byte -lbl_801D3736 = .sdata:0x801D3736; // type:object size:0x2 data:2byte -lbl_801D373A = .sdata:0x801D373A; // type:object size:0x2 data:2byte -lbl_801D373C = .sdata:0x801D373C; // type:object size:0x8 -lbl_801D3744 = .sdata:0x801D3744; // type:object size:0x2 data:2byte -lbl_801D3746 = .sdata:0x801D3746; // type:object size:0x2 data:2byte +starPlatMdl = .sdata:0x801D3702; // type:object size:0x2 scope:local data:2byte +itemMdl = .sdata:0x801D3708; // type:object size:0x2 scope:local data:2byte +itemChoice = .sdata:0x801D370A; // type:object size:0x1 scope:local data:byte +shopMdlParam = .sdata:0x801D370C; // type:object size:0x8 scope:local +hostMdl = .sdata:0x801D3714; // type:object size:0x2 scope:local data:2byte +shopMot = .sdata:0x801D3716; // type:object size:0x6 scope:local data:2byte +itemCurChoice = .sdata:0x801D371C; // type:object size:0x1 scope:local data:byte +defaultItemTbl = .sdata:0x801D371D; // type:object size:0x5 scope:local +hostMdl = .sdata:0x801D3728; // type:object size:0x2 scope:local data:2byte +lotteryMot = .sdata:0x801D372A; // type:object size:0x8 scope:local data:2byte +lotterySpr = .sdata:0x801D3732; // type:object size:0x2 scope:local data:2byte +lotteryInstWin = .sdata:0x801D3734; // type:object size:0x2 scope:local data:2byte +gripMdl = .sdata:0x801D3736; // type:object size:0x4 scope:local data:2byte +turnMot = .sdata:0x801D373A; // type:object size:0x2 scope:local data:2byte +ballMdl = .sdata:0x801D373C; // type:object size:0x8 scope:local +loseMot = .sdata:0x801D3744; // type:object size:0x2 scope:local data:2byte +ticketSprGrp = .sdata:0x801D3746; // type:object size:0x2 scope:local data:2byte warpSpringMdl = .sdata:0x801D3748; // type:object size:0x2 scope:local data:2byte warpImpactMdl = .sdata:0x801D374A; // type:object size:0x2 scope:local data:2byte warpImpactPlayer = .sdata:0x801D374C; // type:object size:0x4 scope:local lbl_801D3750 = .sdata:0x801D3750; // type:object size:0x8 -lbl_801D3758 = .sdata:0x801D3758; // type:object size:0x1 data:byte -lbl_801D375A = .sdata:0x801D375A; // type:object size:0x2 data:2byte -lbl_801D375C = .sdata:0x801D375C; // type:object size:0x4 data:4byte -lbl_801D3760 = .sdata:0x801D3760; // type:object size:0x8 -lbl_801D3768 = .sdata:0x801D3768; // type:object size:0x8 data:2byte -lbl_801D3770 = .sdata:0x801D3770; // type:object size:0x2 data:2byte -lbl_801D3772 = .sdata:0x801D3772; // type:object size:0x6 data:2byte -lbl_801D3778 = .sdata:0x801D3778; // type:object size:0x6 -lbl_801D377E = .sdata:0x801D377E; // type:object size:0x6 -lbl_801D3784 = .sdata:0x801D3784; // type:object size:0x2 data:2byte -lbl_801D3786 = .sdata:0x801D3786; // type:object size:0xA +wheelPos = .sdata:0x801D3758; // type:object size:0x1 scope:local data:byte +wheelSprGrp = .sdata:0x801D375A; // type:object size:0x2 scope:local data:2byte +wheelFXStat = .sdata:0x801D375C; // type:object size:0x4 scope:local data:4byte +boxObj = .sdata:0x801D3760; // type:object size:0x8 scope:local +itemMdl = .sdata:0x801D3768; // type:object size:0x2 scope:local data:2byte +starParman = .sdata:0x801D3770; // type:object size:0x2 scope:local data:2byte +hostMdl = .sdata:0x801D3772; // type:object size:0x2 scope:local data:2byte +diceMdl = .sdata:0x801D3778; // type:object size:0x6 scope:local +diceEff = .sdata:0x801D377E; // type:object size:0x6 scope:local +rollWin = .sdata:0x801D3784; // type:object size:0x2 scope:local data:2byte +lbl_801D3786 = .sdata:0x801D3786; // type:object size:0x3 scope:local data:string itemPickupMdlId = .sdata:0x801D3790; // type:object size:0x2 scope:local data:2byte yourTurnSprGrp = .sdata:0x801D3792; // type:object size:0x2 scope:local data:2byte -lbl_801D3798 = .sdata:0x801D3798; // type:object size:0x2 data:2byte -lbl_801D379A = .sdata:0x801D379A; // type:object size:0x6 data:2byte +jumpMot = .sdata:0x801D3798; // type:object size:0x2 scope:local data:2byte +starMdl = .sdata:0x801D379A; // type:object size:0x2 scope:local data:2byte lbl_801D37A0 = .sdata:0x801D37A0; // type:object size:0x8 lbl_801D37A8 = .sdata:0x801D37A8; // type:object size:0x8 lbl_801D37B0 = .sdata:0x801D37B0; // type:object size:0x2 data:2byte lbl_801D37B2 = .sdata:0x801D37B2; // type:object size:0x2 data:2byte -lbl_801D37B4 = .sdata:0x801D37B4; // type:object size:0x2 data:2byte -lbl_801D37B6 = .sdata:0x801D37B6; // type:object size:0x2 data:2byte +suitItemMdl = .sdata:0x801D37B4; // type:object size:0x2 scope:local data:2byte +bowserMdl = .sdata:0x801D37B6; // type:object size:0x2 scope:local data:2byte lbl_801D37B8 = .sdata:0x801D37B8; // type:object size:0x3 data:string -lbl_801D37BB = .sdata:0x801D37BB; // type:object size:0xD -lbl_801D37C8 = .sdata:0x801D37C8; // type:object size:0x8 -lbl_801D37D0 = .sdata:0x801D37D0; // type:object size:0x8 -lbl_801D37D8 = .sdata:0x801D37D8; // type:object size:0x8 -lbl_801D37E0 = .sdata:0x801D37E0; // type:object size:0x8 -lbl_801D37E8 = .sdata:0x801D37E8; // type:object size:0x1 data:byte -lbl_801D37E9 = .sdata:0x801D37E9; // type:object size:0x7 data:byte -lbl_801D37F0 = .sdata:0x801D37F0; // type:object size:0x2 data:2byte -lbl_801D37F2 = .sdata:0x801D37F2; // type:object size:0x2 data:2byte -lbl_801D37F4 = .sdata:0x801D37F4; // type:object size:0x2 data:2byte -lbl_801D37F6 = .sdata:0x801D37F6; // type:object size:0x2 data:2byte -lbl_801D37F8 = .sdata:0x801D37F8; // type:object size:0x2 data:2byte -lbl_801D37FA = .sdata:0x801D37FA; // type:object size:0x2 data:2byte -lbl_801D37FC = .sdata:0x801D37FC; // type:object size:0x6 data:2byte +lbl_801D37BB = .sdata:0x801D37BB; // type:object size:0x8 data:string +lbl_801D37C8 = .sdata:0x801D37C8; // type:object size:0x3 data:string +lbl_801D37D0 = .sdata:0x801D37D0; // type:object size:0x7 data:string +ballMdlTbl = .sdata:0x801D37D8; // type:object size:0x8 scope:local +lbl_801D37E0 = .sdata:0x801D37E0; // type:object size:0x4 data:string +luckyValue = .sdata:0x801D37E8; // type:object size:0x1 scope:local data:byte +cursorPos = .sdata:0x801D37E9; // type:object size:0x1 scope:local data:byte +houseShowMot = .sdata:0x801D37F0; // type:object size:0x2 scope:local data:2byte +houseHideMot = .sdata:0x801D37F2; // type:object size:0x2 scope:local data:2byte +ballMdl = .sdata:0x801D37F4; // type:object size:0x2 scope:local data:2byte +booMdl = .sdata:0x801D37F6; // type:object size:0x2 scope:local data:2byte +lbl_801D37F8 = .sdata:0x801D37F8; // type:object size:0x2 scope:local data:2byte +hostMdl = .sdata:0x801D37FA; // type:object size:0x2 scope:local data:2byte +houseMot = .sdata:0x801D37FC; // type:object size:0x6 scope:local data:2byte lbl_801D3802 = .sdata:0x801D3802; // type:object size:0x7 data:string lbl_801D3809 = .sdata:0x801D3809; // type:object size:0x7 data:string lbl_801D3810 = .sdata:0x801D3810; // type:object size:0x7 data:string @@ -5897,18 +5945,18 @@ lbl_801D381E = .sdata:0x801D381E; // type:object size:0x7 data:string lbl_801D3825 = .sdata:0x801D3825; // type:object size:0x6 data:string lbl_801D382B = .sdata:0x801D382B; // type:object size:0x7 data:string lbl_801D3832 = .sdata:0x801D3832; // type:object size:0x6 data:string -lbl_801D3838 = .sdata:0x801D3838; // type:object size:0x8 -lbl_801D3840 = .sdata:0x801D3840; // type:object size:0x2 data:2byte -lbl_801D3842 = .sdata:0x801D3842; // type:object size:0x2 data:2byte -lbl_801D3844 = .sdata:0x801D3844; // type:object size:0x2 data:2byte -lbl_801D3846 = .sdata:0x801D3846; // type:object size:0x2 data:2byte -lbl_801D3848 = .sdata:0x801D3848; // type:object size:0x4 data:4byte -lbl_801D384C = .sdata:0x801D384C; // type:object size:0x4 -lbl_801D3850 = .sdata:0x801D3850; // type:object size:0x2 data:2byte -lbl_801D3852 = .sdata:0x801D3852; // type:object size:0x2 data:2byte +lbl_801D3838 = .sdata:0x801D3838; // type:object size:0x3 data:string +logoSprGrp = .sdata:0x801D3840; // type:object size:0x2 scope:local data:2byte +logoSpr = .sdata:0x801D3842; // type:object size:0x2 scope:local data:2byte +camFocus = .sdata:0x801D3844; // type:object size:0x2 scope:local data:2byte +tapWin = .sdata:0x801D3846; // type:object size:0x2 scope:local data:2byte +streamStatus = .sdata:0x801D3848; // type:object size:0x4 scope:local data:4byte +tutorialRollTbl = .sdata:0x801D384C; // type:object size:0x4 scope:local +stopWin = .sdata:0x801D3850; // type:object size:0x2 scope:local data:2byte +wheelMdl = .sdata:0x801D3852; // type:object size:0x2 scope:local data:2byte lbl_801D3854 = .sdata:0x801D3854; // type:object size:0x2 data:2byte -lbl_801D3856 = .sdata:0x801D3856; // type:object size:0x2 data:2byte -lbl_801D3858 = .sdata:0x801D3858; // type:object size:0x4 data:4byte +focusMdl = .sdata:0x801D3856; // type:object size:0x2 scope:local data:2byte +messBase = .sdata:0x801D3858; // type:object size:0x4 scope:local data:4byte lbl_801D385C = .sdata:0x801D385C; // type:object size:0x6 data:string lbl_801D3862 = .sdata:0x801D3862; // type:object size:0x7 data:string lbl_801D3869 = .sdata:0x801D3869; // type:object size:0x7 data:string @@ -5920,15 +5968,15 @@ lbl_801D3888 = .sdata:0x801D3888; // type:object size:0x6 data:string lbl_801D388E = .sdata:0x801D388E; // type:object size:0x4 data:string lbl_801D3892 = .sdata:0x801D3892; // type:object size:0x5 data:string lbl_801D3897 = .sdata:0x801D3897; // type:object size:0x5 data:string -lbl_801D389C = .sdata:0x801D389C; // type:object size:0xC -lbl_801D38A8 = .sdata:0x801D38A8; // type:object size:0x1 data:byte -lbl_801D38AA = .sdata:0x801D38AA; // type:object size:0x2 data:2byte -lbl_801D38AC = .sdata:0x801D38AC; // type:object size:0x2 data:2byte -lbl_801D38AE = .sdata:0x801D38AE; // type:object size:0x2 data:2byte -lbl_801D38B0 = .sdata:0x801D38B0; // type:object size:0x2 data:2byte -lbl_801D38B2 = .sdata:0x801D38B2; // type:object size:0x2 data:2byte -lbl_801D38B4 = .sdata:0x801D38B4; // type:object size:0x2 data:2byte -lbl_801D38B6 = .sdata:0x801D38B6; // type:object size:0x2 data:2byte +lbl_801D389C = .sdata:0x801D389C; // type:object size:0x5 data:string +pausePad = .sdata:0x801D38A8; // type:object size:0x1 scope:local data:byte +pauseSprGrp = .sdata:0x801D38AA; // type:object size:0x2 scope:local data:2byte +padConfigSprGrp = .sdata:0x801D38AC; // type:object size:0x2 scope:local data:2byte +pauseCursorPos = .sdata:0x801D38AE; // type:object size:0x2 scope:local data:2byte +settingsControlWin = .sdata:0x801D38B0; // type:object size:0x2 scope:local data:2byte +controlWin = .sdata:0x801D38B2; // type:object size:0x2 scope:local data:2byte +quitWin = .sdata:0x801D38B4; // type:object size:0x2 scope:local data:2byte +settingsWin = .sdata:0x801D38B6; // type:object size:0x2 scope:local data:2byte __OSCurrHeap = .sdata:0x801D38B8; // type:object size:0x8 data:4byte __OSArenaLo = .sdata:0x801D38C0; // type:object size:0x4 scope:local data:4byte @32 = .sdata:0x801D38C8; // type:object size:0x2 scope:local data:string @@ -6128,7 +6176,7 @@ Hu3DShadowCamBit = .sbss:0x801D3C50; // type:object size:0x2 data:2byte toonAnim = .sbss:0x801D3C54; // type:object size:0x4 data:4byte reflectMapNo = .sbss:0x801D3C58; // type:object size:0x2 data:2byte BGColor = .sbss:0x801D3C5A; // type:object size:0x4 data:byte -bitMapPtr = .sbss:0x801D3C60; // type:object size:0x8 scope:local data:4byte +bitMapPtr = .sbss:0x801D3C60; // type:object size:0x4 scope:local data:4byte metf = .sbss:0x801D3C68; // type:object size:0x1 scope:local data:byte tokenEndF = .sbss:0x801D3C6A; // type:object size:0x2 scope:local data:2byte total_copy_clks = .sbss:0x801D3C6C; // type:object size:0x4 scope:local data:4byte @@ -6196,7 +6244,7 @@ objtop = .sbss:0x801D3D60; // type:object size:0x4 scope:local data:4byte nMesh = .sbss:0x801D3D64; // type:object size:0x4 scope:local data:4byte nObj = .sbss:0x801D3D68; // type:object size:0x4 scope:local data:4byte MtxTop = .sbss:0x801D3D6C; // type:object size:0x4 data:4byte -Vertextop = .sbss:0x801D3D70; // type:object size:0x8 data:4byte +Vertextop = .sbss:0x801D3D70; // type:object size:0x4 data:4byte SeqLanguage = .sbss:0x801D3D78; // type:object size:0x4 scope:local data:4byte PauseProcess = .sbss:0x801D3D7C; // type:object size:0x4 scope:local data:4byte PauseActive = .sbss:0x801D3D80; // type:object size:0x4 scope:local data:4byte @@ -6208,7 +6256,7 @@ SeqSpeed = .sbss:0x801D3D92; // type:object size:0x2 scope:local data:2byte lbl_801D3D94 = .sbss:0x801D3D94; // type:object size:0x1 data:byte SeqDone = .sbss:0x801D3D95; // type:object size:0x1 scope:local data:byte SeqTimer = .sbss:0x801D3D96; // type:object size:0x2 scope:local data:2byte -gid = .sbss:0x801D3D98; // type:object size:0x8 scope:local data:2byte +gid = .sbss:0x801D3D98; // type:object size:0x2 scope:local data:2byte lbl_801D3DA0 = .sbss:0x801D3DA0; // type:object size:0x8 wipeFadeInF = .sbss:0x801D3DA8; // type:object size:0x8 data:4byte fontAnim = .sbss:0x801D3DB0; // type:object size:0x4 data:4byte @@ -6252,7 +6300,7 @@ AudioSystem = .sbss:0x801D3E40; // type:object size:0x4 scope:local data:4byte bufIdx = .sbss:0x801D3E44; // type:object size:0x4 scope:local data:4byte CurAudioBuffer = .sbss:0x801D3E48; // type:object size:0x4 scope:local data:4byte LastAudioBuffer = .sbss:0x801D3E4C; // type:object size:0x4 scope:local data:4byte -SoundBufferIndex = .sbss:0x801D3E50; // type:object size:0x8 scope:local data:4byte +SoundBufferIndex = .sbss:0x801D3E50; // type:object size:0x4 scope:local data:4byte THPProc = .sbss:0x801D3E58; // type:object size:0x4 data:4byte THPStart = .sbss:0x801D3E5C; // type:object size:0x2 scope:local data:2byte THPFrame = .sbss:0x801D3E60; // type:object size:0x4 scope:local data:4byte @@ -6261,7 +6309,7 @@ THPLoopF = .sbss:0x801D3E66; // type:object size:0x2 scope:local data:2byte decodeThread = .sbss:0x801D3E68; // type:object size:0x4 scope:local data:4byte decodeStackP = .sbss:0x801D3E6C; // type:object size:0x4 scope:local data:4byte decodeRate = .sbss:0x801D3E70; // type:object size:0x4 scope:local data:4byte -audioTrack = .sbss:0x801D3E74; // type:object size:0xC scope:local data:4byte +audioTrack = .sbss:0x801D3E74; // type:object size:0x8 scope:local data:4byte lbl_801D3E80 = .sbss:0x801D3E80; // type:object size:0x4 lbl_801D3E84 = .sbss:0x801D3E84; // type:object size:0x4 lbl_801D3E88 = .sbss:0x801D3E88; // type:object size:0x4 data:4byte @@ -6291,9 +6339,9 @@ destroyFunc = .sbss:0x801D3EE8; // type:object size:0x4 scope:local data:4byte boardLightSetHook = .sbss:0x801D3EEC; // type:object size:0x4 data:4byte boardLightResetHook = .sbss:0x801D3EF0; // type:object size:0x4 data:4byte boardTurnFunc = .sbss:0x801D3EF4; // type:object size:0x4 data:4byte -lbl_801D3EF8 = .sbss:0x801D3EF8; // type:object size:0x4 data:4byte -lbl_801D3EFC = .sbss:0x801D3EFC; // type:object size:0x4 data:4byte -lbl_801D3F00 = .sbss:0x801D3F00; // type:object size:0x4 data:4byte +boardStarGiveHook = .sbss:0x801D3EF8; // type:object size:0x4 data:4byte +boardStarShowNextHook = .sbss:0x801D3EFC; // type:object size:0x4 data:4byte +boardBowserHook = .sbss:0x801D3F00; // type:object size:0x4 data:4byte boardTurnStartFunc = .sbss:0x801D3F04; // type:object size:0x4 data:4byte filterObj = .sbss:0x801D3F08; // type:object size:0x4 scope:local data:4byte confettiObj = .sbss:0x801D3F0C; // type:object size:0x4 scope:local data:4byte @@ -6329,15 +6377,15 @@ winPosIdx = .sbss:0x801D3F89; // type:object size:0x1 scope:local data:byte winPortrait = .sbss:0x801D3F8A; // type:object size:0x1 scope:local data:byte autoPickF = .sbss:0x801D3F8B; // type:object size:0x1 scope:local data:byte winChoice = .sbss:0x801D3F8C; // type:object size:0x1 scope:local data:byte -lbl_801D3F90 = .sbss:0x801D3F90; // type:object size:0x8 -lbl_801D3F98 = .sbss:0x801D3F98; // type:object size:0x4 data:4byte -lbl_801D3F9C = .sbss:0x801D3F9C; // type:object size:0x1 data:byte -lbl_801D3FA0 = .sbss:0x801D3FA0; // type:object size:0x4 data:4byte -lbl_801D3FA4 = .sbss:0x801D3FA4; // type:object size:0x2 data:2byte -lbl_801D3FA6 = .sbss:0x801D3FA6; // type:object size:0x1 data:byte -lbl_801D3FA7 = .sbss:0x801D3FA7; // type:object size:0x1 data:byte -lbl_801D3FA8 = .sbss:0x801D3FA8; // type:object size:0x1 data:byte -lbl_801D3FA9 = .sbss:0x801D3FA9; // type:object size:0x7 data:byte +boardSeq = .sbss:0x801D3F90; // type:object size:0x8 scope:local +viewProc = .sbss:0x801D3F98; // type:object size:0x4 scope:local data:4byte +pauseDisableF = .sbss:0x801D3F9C; // type:object size:0x1 scope:local data:byte +overheadObj = .sbss:0x801D3FA0; // type:object size:0x4 scope:local data:4byte +focusTimer = .sbss:0x801D3FA4; // type:object size:0x2 scope:local data:2byte +focusDestroyF = .sbss:0x801D3FA6; // type:object size:0x1 scope:local data:byte +viewMoveF = .sbss:0x801D3FA7; // type:object size:0x1 scope:local data:byte +viewPlayer = .sbss:0x801D3FA8; // type:object size:0x1 scope:local data:byte +viewControls = .sbss:0x801D3FA9; // type:object size:0x1 scope:local data:byte spaceDrawF = .sbss:0x801D3FB0; // type:object size:0x2 scope:local data:2byte spaceDrawCnt = .sbss:0x801D3FB4; // type:object size:0x4 scope:local data:4byte walkEventFunc = .sbss:0x801D3FB8; // type:object size:0x4 scope:local data:4byte @@ -6350,26 +6398,26 @@ spaceHiliteTexData = .sbss:0x801D3FD4; // type:object size:0x4 scope:local data: spaceTexData = .sbss:0x801D3FD8; // type:object size:0x4 scope:local data:4byte spaceAttr = .sbss:0x801D3FDC; // type:object size:0x8 scope:local data:4byte spaceCnt = .sbss:0x801D3FE4; // type:object size:0x4 scope:local data:2byte -lbl_801D3FE8 = .sbss:0x801D3FE8; // type:object size:0x4 data:4byte -lbl_801D3FEC = .sbss:0x801D3FEC; // type:object size:0x4 data:4byte -lbl_801D3FF0 = .sbss:0x801D3FF0; // type:object size:0x4 data:4byte -lbl_801D3FF4 = .sbss:0x801D3FF4; // type:object size:0x4 data:4byte -lbl_801D3FF8 = .sbss:0x801D3FF8; // type:object size:0x4 data:4byte -lbl_801D3FFC = .sbss:0x801D3FFC; // type:object size:0x2 data:2byte -lbl_801D3FFE = .sbss:0x801D3FFE; // type:object size:0x1 data:byte -lbl_801D4000 = .sbss:0x801D4000; // type:object size:0x4 data:4byte -lbl_801D4004 = .sbss:0x801D4004; // type:object size:0x4 -lbl_801D4008 = .sbss:0x801D4008; // type:object size:0x4 data:4byte -lbl_801D400C = .sbss:0x801D400C; // type:object size:0x4 data:4byte -lbl_801D4010 = .sbss:0x801D4010; // type:object size:0x4 data:4byte -lbl_801D4014 = .sbss:0x801D4014; // type:object size:0x4 data:4byte -lbl_801D4018 = .sbss:0x801D4018; // type:object size:0x1 data:byte -lbl_801D4019 = .sbss:0x801D4019; // type:object size:0x1 data:byte -lbl_801D401A = .sbss:0x801D401A; // type:object size:0x1 data:byte +shopProc = .sbss:0x801D3FE8; // type:object size:0x4 scope:local data:4byte +shopWinObj = .sbss:0x801D3FEC; // type:object size:0x4 scope:local data:4byte +itemGiveObj = .sbss:0x801D3FF0; // type:object size:0x4 scope:local data:4byte +itemChoiceObj = .sbss:0x801D3FF4; // type:object size:0x4 scope:local data:4byte +comF = .sbss:0x801D3FF8; // type:object size:0x4 scope:local data:4byte +angleVal = .sbss:0x801D3FFC; // type:object size:0x2 scope:local data:2byte +shopPlayer = .sbss:0x801D3FFE; // type:object size:0x1 scope:local data:byte +shopMdlPtr = .sbss:0x801D4000; // type:object size:0x4 scope:local data:4byte +shopMdlIdx = .sbss:0x801D4004; // type:object size:0x4 scope:local +lotteryProc = .sbss:0x801D4008; // type:object size:0x4 data:4byte +comInputDrawP = .sbss:0x801D400C; // type:object size:0x4 scope:local data:4byte +lotteryTicketPickObj = .sbss:0x801D4010; // type:object size:0x4 scope:local data:4byte +handUpdateF = .sbss:0x801D4014; // type:object size:0x4 scope:local data:4byte +comInputPos = .sbss:0x801D4018; // type:object size:0x1 scope:local data:byte +comLotteryWinType = .sbss:0x801D4019; // type:object size:0x1 scope:local data:byte +comLotteryType = .sbss:0x801D401A; // type:object size:0x1 scope:local data:byte lbl_801D401B = .sbss:0x801D401B; // type:object size:0x1 data:byte -lbl_801D401C = .sbss:0x801D401C; // type:object size:0x1 data:byte -lbl_801D401E = .sbss:0x801D401E; // type:object size:0x2 data:2byte -lbl_801D4020 = .sbss:0x801D4020; // type:object size:0x8 data:4byte +currPrize = .sbss:0x801D401C; // type:object size:0x1 scope:local data:byte +lotterySpace = .sbss:0x801D401E; // type:object size:0x2 scope:local data:2byte +lotteryMessBase = .sbss:0x801D4020; // type:object size:0x4 scope:local data:4byte warpProcess = .sbss:0x801D4028; // type:object size:0x4 scope:local data:4byte warpYVel = .sbss:0x801D402C; // type:object size:0x4 scope:local data:float warpYFloor = .sbss:0x801D4030; // type:object size:0x4 scope:local data:float @@ -6377,35 +6425,35 @@ warpSpace = .sbss:0x801D4034; // type:object size:0x2 scope:local data:2byte warpImpactCnt = .sbss:0x801D4036; // type:object size:0x1 scope:local data:byte warpTarget = .sbss:0x801D4037; // type:object size:0x1 scope:local data:byte warpState = .sbss:0x801D4038; // type:object size:0x1 scope:local data:byte -lbl_801D4040 = .sbss:0x801D4040; // type:object size:0x4 data:4byte -lbl_801D4044 = .sbss:0x801D4044; // type:object size:0x2 data:2byte -lbl_801D4048 = .sbss:0x801D4048; // type:object size:0x4 data:float -lbl_801D404C = .sbss:0x801D404C; // type:object size:0x2 data:2byte -lbl_801D4050 = .sbss:0x801D4050; // type:object size:0x4 data:float -lbl_801D4054 = .sbss:0x801D4054; // type:object size:0x2 data:2byte -lbl_801D4056 = .sbss:0x801D4056; // type:object size:0x2 data:2byte -lbl_801D4058 = .sbss:0x801D4058; // type:object size:0x8 data:byte -lbl_801D4060 = .sbss:0x801D4060; // type:object size:0x4 data:4byte -lbl_801D4064 = .sbss:0x801D4064; // type:object size:0x4 data:4byte -lbl_801D4068 = .sbss:0x801D4068; // type:object size:0x1 data:byte -lbl_801D4069 = .sbss:0x801D4069; // type:object size:0x7 data:byte -lbl_801D4070 = .sbss:0x801D4070; // type:object size:0x4 data:4byte -lbl_801D4074 = .sbss:0x801D4074; // type:object size:0x4 data:4byte -lbl_801D4078 = .sbss:0x801D4078; // type:object size:0x4 data:4byte -lbl_801D407C = .sbss:0x801D407C; // type:object size:0x2 data:2byte -lbl_801D4080 = .sbss:0x801D4080; // type:object size:0x4 data:4byte -lbl_801D4084 = .sbss:0x801D4084; // type:object size:0x2 data:2byte -lbl_801D4088 = .sbss:0x801D4088; // type:object size:0x4 data:4byte -lbl_801D408C = .sbss:0x801D408C; // type:object size:0x1 data:byte -lbl_801D408D = .sbss:0x801D408D; // type:object size:0xB +charWheelObj = .sbss:0x801D4040; // type:object size:0x4 scope:local data:4byte +targetF = .sbss:0x801D4044; // type:object size:0x2 scope:local data:2byte +angleOfs = .sbss:0x801D4048; // type:object size:0x4 scope:local data:float +targetVal = .sbss:0x801D404C; // type:object size:0x2 scope:local data:2byte +wheelSpeed = .sbss:0x801D4050; // type:object size:0x4 scope:local data:float +wheelTimer = .sbss:0x801D4054; // type:object size:0x2 scope:local data:2byte +comDelay = .sbss:0x801D4056; // type:object size:0x2 scope:local data:2byte +wheelChars = .sbss:0x801D4058; // type:object size:0x4 scope:local data:byte +mushroomProc = .sbss:0x801D4060; // type:object size:0x4 scope:local data:4byte +itemGiveObj = .sbss:0x801D4064; // type:object size:0x4 scope:local data:4byte +pickerChoice = .sbss:0x801D4068; // type:object size:0x1 scope:local data:byte +itemResult = .sbss:0x801D4069; // type:object size:0x1 scope:local data:byte +starProc = .sbss:0x801D4070; // type:object size:0x4 scope:local data:4byte +giveStarObj = .sbss:0x801D4074; // type:object size:0x4 scope:local data:4byte +starEffAnim = .sbss:0x801D4078; // type:object size:0x4 scope:local data:4byte +starDoneF = .sbss:0x801D407C; // type:object size:0x2 scope:local data:2byte +showNextObj = .sbss:0x801D4080; // type:object size:0x4 scope:local data:4byte +hostMot = .sbss:0x801D4084; // type:object size:0x4 scope:local data:2byte +rollProc = .sbss:0x801D4088; // type:object size:0x4 scope:local data:4byte +tutorialRollF = .sbss:0x801D408C; // type:object size:0x1 scope:local data:byte +sameRollCoinStr = .sbss:0x801D408D; // type:object size:0x8 scope:local lbl_801D4098 = .sbss:0x801D4098; // type:object size:0x4 data:4byte -lbl_801D409C = .sbss:0x801D409C; // type:object size:0x1 data:byte -lbl_801D409D = .sbss:0x801D409D; // type:object size:0x1 data:byte -lbl_801D409E = .sbss:0x801D409E; // type:object size:0x1 data:byte -lbl_801D409F = .sbss:0x801D409F; // type:object size:0x1 data:byte -lbl_801D40A0 = .sbss:0x801D40A0; // type:object size:0x1 data:byte -lbl_801D40A1 = .sbss:0x801D40A1; // type:object size:0x1 data:byte -lbl_801D40A2 = .sbss:0x801D40A2; // type:object size:0x6 data:byte +diceSize = .sbss:0x801D409C; // type:object size:0x1 scope:local data:byte +destMode = .sbss:0x801D409D; // type:object size:0x1 scope:local data:byte +maxRoll = .sbss:0x801D409E; // type:object size:0x1 scope:local data:byte +inputTimer = .sbss:0x801D409F; // type:object size:0x1 scope:local data:byte +numDice = .sbss:0x801D40A0; // type:object size:0x1 scope:local data:byte +rollPlayer = .sbss:0x801D40A1; // type:object size:0x1 scope:local data:byte +diceValue = .sbss:0x801D40A2; // type:object size:0x3 scope:local data:byte statusProc = .sbss:0x801D40A8; // type:object size:0x4 scope:local data:4byte itemWindowObj = .sbss:0x801D40AC; // type:object size:0x4 scope:local data:4byte pickerObj = .sbss:0x801D40B0; // type:object size:0x4 scope:local data:4byte @@ -6425,113 +6473,113 @@ pickerChoice = .sbss:0x801D40D9; // type:object size:0x1 scope:local data:byte boardItemUser = .sbss:0x801D40DA; // type:object size:0x1 data:byte itemTeamF = .sbss:0x801D40DB; // type:object size:0x1 scope:local data:byte itemTeam = .sbss:0x801D40DC; // type:object size:0x1 scope:local data:byte -lbl_801D40E0 = .sbss:0x801D40E0; // type:object size:0x4 data:4byte -lbl_801D40E4 = .sbss:0x801D40E4; // type:object size:0x4 data:4byte -lbl_801D40E8 = .sbss:0x801D40E8; // type:object size:0x4 data:float -lbl_801D40EC = .sbss:0x801D40EC; // type:object size:0x4 data:float -lbl_801D40F0 = .sbss:0x801D40F0; // type:object size:0x8 data:float -lbl_801D40F8 = .sbss:0x801D40F8; // type:object size:0x4 data:4byte -lbl_801D40FC = .sbss:0x801D40FC; // type:object size:0x8 data:2byte -lbl_801D4104 = .sbss:0x801D4104; // type:object size:0x4 data:4byte -lbl_801D4108 = .sbss:0x801D4108; // type:object size:0x4 data:float -lbl_801D410C = .sbss:0x801D410C; // type:object size:0x8 -lbl_801D4114 = .sbss:0x801D4114; // type:object size:0x4 data:float -lbl_801D4118 = .sbss:0x801D4118; // type:object size:0x2 data:2byte -lbl_801D411C = .sbss:0x801D411C; // type:object size:0x8 data:4byte -lbl_801D4124 = .sbss:0x801D4124; // type:object size:0x8 data:4byte -lbl_801D412C = .sbss:0x801D412C; // type:object size:0x2 data:2byte -lbl_801D412E = .sbss:0x801D412E; // type:object size:0x1 data:byte -lbl_801D412F = .sbss:0x801D412F; // type:object size:0x1 data:byte -lbl_801D4130 = .sbss:0x801D4130; // type:object size:0x8 -lbl_801D4138 = .sbss:0x801D4138; // type:object size:0x4 data:4byte -lbl_801D413C = .sbss:0x801D413C; // type:object size:0x4 data:4byte -lbl_801D4140 = .sbss:0x801D4140; // type:object size:0x4 data:4byte -lbl_801D4144 = .sbss:0x801D4144; // type:object size:0x4 data:4byte -lbl_801D4148 = .sbss:0x801D4148; // type:object size:0x4 data:4byte -lbl_801D414C = .sbss:0x801D414C; // type:object size:0x4 data:4byte -lbl_801D4150 = .sbss:0x801D4150; // type:object size:0x8 -lbl_801D4158 = .sbss:0x801D4158; // type:object size:0x8 -lbl_801D4160 = .sbss:0x801D4160; // type:object size:0x4 data:4byte -lbl_801D4164 = .sbss:0x801D4164; // type:object size:0x2 data:2byte -lbl_801D4166 = .sbss:0x801D4166; // type:object size:0x8 data:2byte -lbl_801D416E = .sbss:0x801D416E; // type:object size:0x2 data:2byte -lbl_801D4170 = .sbss:0x801D4170; // type:object size:0x1 data:byte -lbl_801D4171 = .sbss:0x801D4171; // type:object size:0x7 data:byte -lbl_801D4178 = .sbss:0x801D4178; // type:object size:0x4 data:4byte -lbl_801D417C = .sbss:0x801D417C; // type:object size:0x4 data:4byte -lbl_801D4180 = .sbss:0x801D4180; // type:object size:0x4 data:4byte -lbl_801D4184 = .sbss:0x801D4184; // type:object size:0x4 data:float -lbl_801D4188 = .sbss:0x801D4188; // type:object size:0x4 data:float -lbl_801D418C = .sbss:0x801D418C; // type:object size:0x8 -lbl_801D4194 = .sbss:0x801D4194; // type:object size:0x1 data:byte -lbl_801D4196 = .sbss:0x801D4196; // type:object size:0x1 data:byte -lbl_801D4198 = .sbss:0x801D4198; // type:object size:0x2 data:2byte -lbl_801D419A = .sbss:0x801D419A; // type:object size:0x1 data:byte -lbl_801D419B = .sbss:0x801D419B; // type:object size:0x1 data:byte -lbl_801D419C = .sbss:0x801D419C; // type:object size:0x1 data:byte -lbl_801D41A0 = .sbss:0x801D41A0; // type:object size:0x4 data:4byte -lbl_801D41A4 = .sbss:0x801D41A4; // type:object size:0x4 data:4byte -lbl_801D41A8 = .sbss:0x801D41A8; // type:object size:0x1 data:byte -lbl_801D41A9 = .sbss:0x801D41A9; // type:object size:0x1 data:byte -lbl_801D41AA = .sbss:0x801D41AA; // type:object size:0x1 data:byte -lbl_801D41AB = .sbss:0x801D41AB; // type:object size:0x1 data:byte -lbl_801D41AC = .sbss:0x801D41AC; // type:object size:0x1 data:byte -lbl_801D41AD = .sbss:0x801D41AD; // type:object size:0x1 data:byte -lbl_801D41B0 = .sbss:0x801D41B0; // type:object size:0x4 data:4byte -lbl_801D41B4 = .sbss:0x801D41B4; // type:object size:0x4 data:4byte -lbl_801D41B8 = .sbss:0x801D41B8; // type:object size:0x4 data:4byte -lbl_801D41BC = .sbss:0x801D41BC; // type:object size:0x4 data:4byte -lbl_801D41C0 = .sbss:0x801D41C0; // type:object size:0x4 data:4byte -lbl_801D41C4 = .sbss:0x801D41C4; // type:object size:0x4 data:4byte -lbl_801D41C8 = .sbss:0x801D41C8; // type:object size:0x4 data:4byte -lbl_801D41CC = .sbss:0x801D41CC; // type:object size:0x4 data:4byte -lbl_801D41D0 = .sbss:0x801D41D0; // type:object size:0x3 -lbl_801D41D3 = .sbss:0x801D41D3; // type:object size:0x3 -lbl_801D41D6 = .sbss:0x801D41D6; // type:object size:0x1 data:byte -lbl_801D41D7 = .sbss:0x801D41D7; // type:object size:0x1 data:byte -lbl_801D41D8 = .sbss:0x801D41D8; // type:object size:0x1 data:byte -lbl_801D41DC = .sbss:0x801D41DC; // type:object size:0x4 data:4byte -lbl_801D41E0 = .sbss:0x801D41E0; // type:object size:0x1 data:byte -lbl_801D41E1 = .sbss:0x801D41E1; // type:object size:0x1 data:byte -lbl_801D41E2 = .sbss:0x801D41E2; // type:object size:0x6 data:byte -lbl_801D41E8 = .sbss:0x801D41E8; // type:object size:0x4 data:4byte -lbl_801D41EC = .sbss:0x801D41EC; // type:object size:0x4 data:4byte -lbl_801D41F0 = .sbss:0x801D41F0; // type:object size:0x1 data:byte -lbl_801D41F1 = .sbss:0x801D41F1; // type:object size:0x1 data:byte -lbl_801D41F2 = .sbss:0x801D41F2; // type:object size:0x1 data:byte -lbl_801D41F4 = .sbss:0x801D41F4; // type:object size:0x4 -lbl_801D41F8 = .sbss:0x801D41F8; // type:object size:0x6 -lbl_801D41FE = .sbss:0x801D41FE; // type:object size:0x6 -lbl_801D4204 = .sbss:0x801D4204; // type:object size:0x1 data:byte -lbl_801D4205 = .sbss:0x801D4205; // type:object size:0x1 data:byte -lbl_801D4206 = .sbss:0x801D4206; // type:object size:0x1 data:byte -lbl_801D4207 = .sbss:0x801D4207; // type:object size:0x1 data:byte -lbl_801D4208 = .sbss:0x801D4208; // type:object size:0x2 data:2byte -lbl_801D420C = .sbss:0x801D420C; // type:object size:0x4 data:float -lbl_801D4210 = .sbss:0x801D4210; // type:object size:0x4 data:4byte -lbl_801D4214 = .sbss:0x801D4214; // type:object size:0x1 data:byte -lbl_801D4218 = .sbss:0x801D4218; // type:object size:0x4 data:4byte -lbl_801D421C = .sbss:0x801D421C; // type:object size:0x8 -lbl_801D4224 = .sbss:0x801D4224; // type:object size:0x4 data:4byte -lbl_801D4228 = .sbss:0x801D4228; // type:object size:0x1 data:byte -lbl_801D4229 = .sbss:0x801D4229; // type:object size:0x1 data:byte -lbl_801D422A = .sbss:0x801D422A; // type:object size:0x6 data:byte -lbl_801D4230 = .sbss:0x801D4230; // type:object size:0x4 data:4byte -lbl_801D4234 = .sbss:0x801D4234; // type:object size:0x4 -lbl_801D4238 = .sbss:0x801D4238; // type:object size:0x4 -lbl_801D423C = .sbss:0x801D423C; // type:object size:0x2 data:2byte -lbl_801D423E = .sbss:0x801D423E; // type:object size:0x2 data:2byte -lbl_801D4240 = .sbss:0x801D4240; // type:object size:0x4 data:4byte -lbl_801D4244 = .sbss:0x801D4244; // type:object size:0x4 data:4byte -lbl_801D4248 = .sbss:0x801D4248; // type:object size:0x4 data:4byte -lbl_801D424C = .sbss:0x801D424C; // type:object size:0x4 data:4byte -lbl_801D4250 = .sbss:0x801D4250; // type:object size:0x4 data:4byte -lbl_801D4254 = .sbss:0x801D4254; // type:object size:0x4 data:4byte -lbl_801D4258 = .sbss:0x801D4258; // type:object size:0x2 data:2byte -lbl_801D425A = .sbss:0x801D425A; // type:object size:0x2 data:2byte -lbl_801D425C = .sbss:0x801D425C; // type:object size:0x1 data:byte -lbl_801D425D = .sbss:0x801D425D; // type:object size:0x1 data:byte -lbl_801D425E = .sbss:0x801D425E; // type:object size:0x1 data:byte +blockProc = .sbss:0x801D40E0; // type:object size:0x4 scope:local data:4byte +blockObj = .sbss:0x801D40E4; // type:object size:0x4 scope:local data:4byte +rotY = .sbss:0x801D40E8; // type:object size:0x4 scope:local data:float +scaleAngle = .sbss:0x801D40EC; // type:object size:0x4 scope:local data:float +rotMax = .sbss:0x801D40F0; // type:object size:0x4 scope:local data:float +itemProc = .sbss:0x801D40F8; // type:object size:0x4 scope:local data:4byte +geniePlayerMot = .sbss:0x801D40FC; // type:object size:0x6 scope:local data:2byte +genieParticleAnim = .sbss:0x801D4104; // type:object size:0x4 scope:local data:4byte +genieFov = .sbss:0x801D4108; // type:object size:0x4 scope:local data:float +booCoinStr = .sbss:0x801D410C; // type:object size:0x8 scope:local +booBallAlpha = .sbss:0x801D4114; // type:object size:0x4 scope:local data:float +booBallMdl = .sbss:0x801D4118; // type:object size:0x2 scope:local data:2byte +suitCommonMot = .sbss:0x801D411C; // type:object size:0x8 scope:local data:4byte +suitMot = .sbss:0x801D4124; // type:object size:0x8 scope:local data:4byte +suitMdl = .sbss:0x801D412C; // type:object size:0x2 scope:local data:2byte +currItem = .sbss:0x801D412E; // type:object size:0x1 scope:local data:byte +currItemRestore = .sbss:0x801D412F; // type:object size:0x1 scope:local data:byte +itemBagItems = .sbss:0x801D4130; // type:object size:0x6 scope:local +bowserProc = .sbss:0x801D4138; // type:object size:0x4 scope:local data:4byte +bowserObj = .sbss:0x801D413C; // type:object size:0x4 scope:local data:4byte +miniBowserObj = .sbss:0x801D4140; // type:object size:0x4 scope:local data:4byte +bowserEventObj = .sbss:0x801D4144; // type:object size:0x4 scope:local data:4byte +miniBowserBalloonObj = .sbss:0x801D4148; // type:object size:0x4 scope:local data:4byte +suitGiveObj = .sbss:0x801D414C; // type:object size:0x4 scope:local data:4byte +coinStealStr = .sbss:0x801D4150; // type:object size:0x8 scope:local +coinStealStrAll = .sbss:0x801D4158; // type:object size:0x8 scope:local +fireAnim = .sbss:0x801D4160; // type:object size:0x4 scope:local data:4byte +fireParMan = .sbss:0x801D4164; // type:object size:0x2 scope:local data:2byte +playerMot = .sbss:0x801D4166; // type:object size:0x8 scope:local data:2byte +eventSpace = .sbss:0x801D416E; // type:object size:0x2 scope:local data:2byte +eventType = .sbss:0x801D4170; // type:object size:0x1 scope:local data:byte +eventPlayer = .sbss:0x801D4171; // type:object size:0x1 scope:local data:byte +battleProc = .sbss:0x801D4178; // type:object size:0x4 scope:local data:4byte +battleObj = .sbss:0x801D417C; // type:object size:0x4 scope:local data:4byte +explodeObj = .sbss:0x801D4180; // type:object size:0x4 scope:local data:4byte +battleCoinPosF = .sbss:0x801D4184; // type:object size:0x4 scope:local data:float +battleCoinSpeed = .sbss:0x801D4188; // type:object size:0x4 scope:local data:float +totalCoinStr = .sbss:0x801D418C; // type:object size:0x8 scope:local +battleMGIdx = .sbss:0x801D4194; // type:object size:0x1 scope:local data:byte +battleCoinIdx = .sbss:0x801D4196; // type:object size:0x1 scope:local data:byte +currSpace = .sbss:0x801D4198; // type:object size:0x2 scope:local data:2byte +mgChoice = .sbss:0x801D419A; // type:object size:0x1 scope:local data:byte +coinTakeMax = .sbss:0x801D419B; // type:object size:0x1 scope:local data:byte +currPlayer = .sbss:0x801D419C; // type:object size:0x1 scope:local data:byte +fortuneProc = .sbss:0x801D41A0; // type:object size:0x4 scope:local data:4byte +fortunePlatformObj = .sbss:0x801D41A4; // type:object size:0x4 scope:local data:4byte +comStar = .sbss:0x801D41A8; // type:object size:0x1 scope:local data:byte +comCoin = .sbss:0x801D41A9; // type:object size:0x1 scope:local data:byte +comType = .sbss:0x801D41AA; // type:object size:0x1 scope:local data:byte +comPlayer1 = .sbss:0x801D41AB; // type:object size:0x1 scope:local data:byte +comPlayer2 = .sbss:0x801D41AC; // type:object size:0x1 scope:local data:byte +currPlayer = .sbss:0x801D41AD; // type:object size:0x1 scope:local data:byte +booEventObj = .sbss:0x801D41B0; // type:object size:0x4 scope:local data:4byte +ballObj = .sbss:0x801D41B4; // type:object size:0x4 scope:local data:4byte +ballCameraObj = .sbss:0x801D41B8; // type:object size:0x4 scope:local data:4byte +ballBooObj = .sbss:0x801D41BC; // type:object size:0x4 scope:local data:4byte +ballPlayerObj = .sbss:0x801D41C0; // type:object size:0x4 scope:local data:4byte +ballTakeCoinObj = .sbss:0x801D41C4; // type:object size:0x4 scope:local data:4byte +attackTimer = .sbss:0x801D41C8; // type:object size:0x4 scope:local data:4byte +battleTimer = .sbss:0x801D41CC; // type:object size:0x4 scope:local data:4byte +starChoiceEnable = .sbss:0x801D41D0; // type:object size:0x3 scope:local +stealAvail = .sbss:0x801D41D3; // type:object size:0x3 scope:local +punchCount = .sbss:0x801D41D6; // type:object size:0x1 scope:local data:byte +stealSuccess = .sbss:0x801D41D7; // type:object size:0x1 scope:local data:byte +stealValue = .sbss:0x801D41D8; // type:object size:0x1 scope:local data:byte +booKillF = .sbss:0x801D41DC; // type:object size:0x4 scope:local data:4byte +stealType = .sbss:0x801D41E0; // type:object size:0x1 scope:local data:byte +stealTarget = .sbss:0x801D41E1; // type:object size:0x1 scope:local data:byte +lbl_801D41E2 = .sbss:0x801D41E2; // type:object size:0x1 data:byte +mgSetupProc = .sbss:0x801D41E8; // type:object size:0x4 scope:local data:4byte +mgSetupObj = .sbss:0x801D41EC; // type:object size:0x4 scope:local data:4byte +hiliteShowF = .sbss:0x801D41F0; // type:object size:0x1 scope:local data:byte +hiliteBlinkLen = .sbss:0x801D41F1; // type:object size:0x1 scope:local data:byte +hiliteTimer = .sbss:0x801D41F2; // type:object size:0x1 scope:local data:byte +mgPlayBattle = .sbss:0x801D41F4; // type:object size:0x4 scope:local +mgPlay2Vs2 = .sbss:0x801D41F8; // type:object size:0x6 scope:local +mgPlay1Vs3 = .sbss:0x801D41FE; // type:object size:0x6 scope:local +mgPlayBattleLen = .sbss:0x801D4204; // type:object size:0x1 scope:local data:byte +mgPlay2Vs2Len = .sbss:0x801D4205; // type:object size:0x1 scope:local data:byte +mgPlay1Vs3Len = .sbss:0x801D4206; // type:object size:0x1 scope:local data:byte +mgPlay4PLen = .sbss:0x801D4207; // type:object size:0x1 scope:local data:byte +mgNext = .sbss:0x801D4208; // type:object size:0x2 scope:local data:2byte +hilitePos = .sbss:0x801D420C; // type:object size:0x4 scope:local data:float +luckyF = .sbss:0x801D4210; // type:object size:0x4 scope:local data:4byte +mgType = .sbss:0x801D4214; // type:object size:0x1 scope:local data:byte +houseProc = .sbss:0x801D4218; // type:object size:0x4 scope:local data:4byte +stealAmountStr = .sbss:0x801D421C; // type:object size:0x8 scope:local +comCoinStealTarget = .sbss:0x801D4224; // type:object size:0x4 scope:local data:4byte +comStarStealTarget = .sbss:0x801D4228; // type:object size:0x1 scope:local data:byte +stealTarget = .sbss:0x801D4229; // type:object size:0x1 scope:local data:byte +currPlayer = .sbss:0x801D422A; // type:object size:0x1 scope:local data:byte +startProc = .sbss:0x801D4230; // type:object size:0x4 scope:local data:4byte +playerOrderOld = .sbss:0x801D4234; // type:object size:0x4 scope:local +playerOrderNew = .sbss:0x801D4238; // type:object size:0x4 scope:local +startSpace = .sbss:0x801D423C; // type:object size:0x2 scope:local data:2byte +hostMdl = .sbss:0x801D423E; // type:object size:0x2 scope:local data:2byte +lotteryDrawWheelObj = .sbss:0x801D4240; // type:object size:0x4 scope:local data:4byte +lotteryDrawObj = .sbss:0x801D4244; // type:object size:0x4 scope:local data:4byte +hostMoveObj = .sbss:0x801D4248; // type:object size:0x4 scope:local data:4byte +teamResultObj = .sbss:0x801D424C; // type:object size:0x4 scope:local data:4byte +last5Proc = .sbss:0x801D4250; // type:object size:0x4 scope:local data:4byte +last5RouletteObj = .sbss:0x801D4254; // type:object size:0x4 scope:local data:4byte +hostMdl = .sbss:0x801D4258; // type:object size:0x2 scope:local data:2byte +last5Space = .sbss:0x801D425A; // type:object size:0x2 scope:local data:2byte +last5Player = .sbss:0x801D425C; // type:object size:0x1 scope:local data:byte +numTickets = .sbss:0x801D425D; // type:object size:0x1 scope:local data:byte +currTicket = .sbss:0x801D425E; // type:object size:0x1 scope:local data:byte mainProcess = .sbss:0x801D4260; // type:object size:0x4 scope:local data:4byte quitProcess = .sbss:0x801D4264; // type:object size:0x4 scope:local data:4byte configObj = .sbss:0x801D4268; // type:object size:0x4 scope:local data:4byte @@ -6541,8 +6589,8 @@ hostMdl = .sbss:0x801D4276; // type:object size:0x2 scope:local data:2byte hostOldLayer = .sbss:0x801D4278; // type:object size:0x1 scope:local data:byte mainScreenF = .sbss:0x801D4279; // type:object size:0x1 scope:local data:byte pauseQuitF = .sbss:0x801D427A; // type:object size:0x1 scope:local data:byte -lbl_801D4280 = .sbss:0x801D4280; // type:object size:0x2 data:2byte -lbl_801D4282 = .sbss:0x801D4282; // type:object size:0x6 data:2byte +childNodeCnt = .sbss:0x801D4280; // type:object size:0x2 scope:local data:2byte +numCandidates = .sbss:0x801D4282; // type:object size:0x2 scope:local data:2byte gameStatCopy = .sbss:0x801D4288; // type:object size:0x4 scope:local data:4byte systemCopy = .sbss:0x801D428C; // type:object size:0x4 scope:local data:4byte playerCopy = .sbss:0x801D4290; // type:object size:0x4 scope:local data:4byte @@ -7629,7 +7677,7 @@ lbl_801D57F0 = .sdata2:0x801D57F0; // type:object size:0x8 data:double lbl_801D57F8 = .sdata2:0x801D57F8; // type:object size:0x4 data:float lbl_801D5800 = .sdata2:0x801D5800; // type:object size:0x8 data:double lbl_801D5808 = .sdata2:0x801D5808; // type:object size:0x8 data:float -lbl_801D5810 = .sdata2:0x801D5810; // type:object size:0x8 +boxOfs = .sdata2:0x801D5810; // type:object size:0x8 scope:local data:float lbl_801D5818 = .sdata2:0x801D5818; // type:object size:0x4 data:float lbl_801D581C = .sdata2:0x801D581C; // type:object size:0x4 data:float lbl_801D5820 = .sdata2:0x801D5820; // type:object size:0x4 data:float @@ -7946,7 +7994,7 @@ lbl_801D5DCA = .sdata2:0x801D5DCA; // type:object size:0x1 data:byte lbl_801D5DCC = .sdata2:0x801D5DCC; // type:object size:0x4 data:float lbl_801D5DD0 = .sdata2:0x801D5DD0; // type:object size:0x8 data:double lbl_801D5DD8 = .sdata2:0x801D5DD8; // type:object size:0x8 data:float -lbl_801D5DE0 = .sdata2:0x801D5DE0; // type:object size:0x8 +battleCoinTbl = .sdata2:0x801D5DE0; // type:object size:0x5 scope:local lbl_801D5DE8 = .sdata2:0x801D5DE8; // type:object size:0x4 data:float lbl_801D5DEC = .sdata2:0x801D5DEC; // type:object size:0x4 data:float lbl_801D5DF0 = .sdata2:0x801D5DF0; // type:object size:0x4 data:float diff --git a/configure.py b/configure.py index eda83503..f3c6f0f2 100644 --- a/configure.py +++ b/configure.py @@ -317,7 +317,7 @@ config.libs = [ Object(Matching, "game/decode.c"), Object(Matching, "game/font.c"), Object(Matching, "game/init.c"), - Object(NonMatching, "game/jmp.c"), + Object(Matching, "game/jmp.c"), Object(Matching, "game/malloc.c"), Object(Matching, "game/memory.c"), Object(Matching, "game/printfunc.c"), @@ -327,9 +327,9 @@ config.libs = [ Object(Matching, "game/hsfload.c"), Object(NonMatching, "game/hsfdraw.c"), Object(Matching, "game/hsfman.c"), - Object(NonMatching, "game/hsfmotion.c"), + Object(Matching, "game/hsfmotion.c"), Object(Matching, "game/hsfanim.c"), - Object(NonMatching, "game/hsfex.c"), + Object(Matching, "game/hsfex.c"), Object(Matching, "game/perf.c"), Object(Matching, "game/objmain.c"), Object(NonMatching, "game/fault.c"), @@ -338,13 +338,13 @@ config.libs = [ Object(NonMatching, "game/objdll.c"), Object(Matching, "game/frand.c"), Object(Matching, "game/audio.c"), - Object(NonMatching, "game/EnvelopeExec.c"), + Object(Matching, "game/EnvelopeExec.c"), Object(NonMatching, "game/minigame_seq.c"), Object(Matching, "game/ovllist.c"), - Object(NonMatching, "game/esprite.c"), + Object(Matching, "game/esprite.c"), Object(NonMatching, "game/code_8003FF68.c"), - Object(NonMatching, "game/ClusterExec.c"), - Object(NonMatching, "game/ShapeExec.c"), + Object(Matching, "game/ClusterExec.c"), + Object(Matching, "game/ShapeExec.c"), Object(Matching, "game/wipe.c"), Object(Matching, "game/window.c"), Object(Matching, "game/messdata.c"), @@ -352,35 +352,35 @@ config.libs = [ Object(Matching, "game/armem.c"), Object(NonMatching, "game/chrman.c"), Object(NonMatching, "game/mapspace.c"), - Object(NonMatching, "game/THPSimple.c"), - Object(NonMatching, "game/THPDraw.c"), - Object(NonMatching, "game/thpmain.c"), + Object(Matching, "game/THPSimple.c"), + Object(Matching, "game/THPDraw.c"), + Object(Matching, "game/thpmain.c"), Object(NonMatching, "game/objsub.c"), Object(Matching, "game/flag.c"), Object(Matching, "game/saveload.c"), Object(NonMatching, "game/sreset.c"), - Object(NonMatching, "game/board/main.c"), + Object(Matching, "game/board/main.c"), Object(NonMatching, "game/board/player.c"), - Object(NonMatching, "game/board/model.c"), + Object(Matching, "game/board/model.c"), Object(Matching, "game/board/window.c"), Object(NonMatching, "game/board/audio.c"), Object(NonMatching, "game/board/com.c"), - Object(NonMatching, "game/board/overhead.c"), + Object(NonMatching, "game/board/view.c"), Object(NonMatching, "game/board/space.c"), Object(NonMatching, "game/board/shop.c"), Object(NonMatching, "game/board/lottery.c"), Object(Matching, "game/board/basic_space.c"), Object(Matching, "game/board/warp.c"), - Object(NonMatching, "game/board/char_roulette.c"), - Object(NonMatching, "game/board/mushroom_space.c"), + Object(NonMatching, "game/board/char_wheel.c"), + Object(NonMatching, "game/board/mushroom.c"), Object(NonMatching, "game/board/star.c"), - Object(NonMatching, "game/board/dice_roll.c"), + Object(NonMatching, "game/board/roll.c"), Object(NonMatching, "game/board/ui.c"), - Object(NonMatching, "game/board/hidden_block.c"), + Object(NonMatching, "game/board/block.c"), Object(NonMatching, "game/board/item.c"), Object(NonMatching, "game/board/bowser.c"), Object(NonMatching, "game/board/battle.c"), - Object(NonMatching, "game/board/fortune_space.c"), + Object(NonMatching, "game/board/fortune.c"), Object(NonMatching, "game/board/boo.c"), Object(NonMatching, "game/board/mg_setup.c"), Object(NonMatching, "game/board/boo_house.c"), @@ -767,7 +767,7 @@ config.libs = [ Rel('bootDll', objects = { Object(Matching, "REL/executor.c"), - Object(NonMatching, "REL/bootDll/bootDll.c"), + Object(NonMatching, "REL/bootDll/main.c"), Object(Matching, "REL/bootDll/nintendo_data.c"), } ), @@ -810,12 +810,44 @@ config.libs = [ Object(NonMatching, "REL/m404Dll/main.c"), } ), + Rel('m405Dll', + objects = { + Object(NonMatching, "REL/m405Dll/main.c"), + } + ), + Rel('m406Dll', + objects = { + Object(Matching, "REL/executor.c"), + Object(NonMatching, "REL/m406Dll/main.c"), + Object(NonMatching, "REL/m406Dll/map.c"), + Object(NonMatching, "REL/m406Dll/player.c"), + } + ), + Rel('m407dll', + objects = { + Object(Matching, "REL/executor.c"), + Object(NonMatching, "REL/m407dll/player.c"), + Object(NonMatching, "REL/m407dll/map.c"), + Object(NonMatching, "REL/m407dll/camera.c"), + Object(NonMatching, "REL/m407dll/whomp.c"), + Object(NonMatching, "REL/m407dll/whomp_score.c"), + Object(NonMatching, "REL/m407dll/effect.c"), + Object(NonMatching, "REL/m407dll/main.c"), + Object(NonMatching, "REL/m407dll/score.c"), + } + ), Rel('mentDll', objects = { Object(NonMatching, "REL/mentDll/common.c"), Object(NonMatching, "REL/mentDll/main.c"), } ), + Rel('messDll', + objects = { + Object(Matching, "REL/executor.c"), + Object(NonMatching, "REL/messDll/main.c"), + } + ), Rel('mgmodedll', objects = { Object(Matching, "REL/executor.c"), @@ -846,6 +878,41 @@ config.libs = [ Object(NonMatching, "REL/mpexDll/mgname.c"), } ), + Rel('mstory2Dll', + objects = { + Object(NonMatching, "REL/mstory2Dll/main.c"), + Object(NonMatching, "REL/mstory2Dll/board_entrance.c"), + Object(NonMatching, "REL/mstory2Dll/board_clear.c"), + Object(NonMatching, "REL/mstory2Dll/board_miss.c"), + Object(NonMatching, "REL/mstory2Dll/mg_clear.c"), + Object(NonMatching, "REL/mstory2Dll/mg_miss.c"), + Object(NonMatching, "REL/mstory2Dll/ending.c"), + Object(NonMatching, "REL/mstory2Dll/save.c"), + } + ), + Rel('mstory3Dll', + objects = { + Object(NonMatching, "REL/mstory3Dll/main.c"), + Object(NonMatching, "REL/mstory3Dll/result_seq.c"), + Object(NonMatching, "REL/mstory3Dll/result.c"), + Object(NonMatching, "REL/mstory3Dll/win_effect.c"), + } + ), + Rel('mstory4Dll', + objects = { + Object(NonMatching, "REL/mstory4Dll/main.c"), + } + ), + Rel('mstoryDll', + objects = { + Object(NonMatching, "REL/mstoryDll/main.c"), + Object(NonMatching, "REL/mstoryDll/board_clear.c"), + Object(NonMatching, "REL/mstoryDll/board_miss.c"), + Object(NonMatching, "REL/mstoryDll/mg_clear.c"), + Object(NonMatching, "REL/mstoryDll/mg_miss.c"), + Object(NonMatching, "REL/mstoryDll/save.c"), + } + ), Rel('option', objects = { Object(Matching, "REL/executor.c"), @@ -870,22 +937,35 @@ config.libs = [ Object(NonMatching, "REL/present/common.c"), } ), + Rel('resultDll', + objects = { + Object(Matching, "REL/executor.c"), + Object(NonMatching, "REL/resultDll/main.c"), + Object(NonMatching, "REL/resultDll/battle.c"), + Object(NonMatching, "REL/resultDll/datalist.c"), + } + ), + Rel('safDll', + objects = { + Object(NonMatching, "REL/safDll/main.c"), + } + ), Rel('selmenuDll', objects = { Object(Matching, "REL/executor.c"), - Object(NonMatching, "REL/selmenuDll/selmenuDll.c"), + Object(NonMatching, "REL/selmenuDll/main.c"), } ), Rel('staffDll', objects = { Object(Matching, "REL/executor.c"), - Object(NonMatching, "REL/staffDll/staffDll.c"), + Object(NonMatching, "REL/staffDll/main.c"), } ), Rel('subchrselDll', objects = { Object(Matching, "REL/executor.c"), - Object(NonMatching, "REL/subchrselDll/subchrselDll.c"), + Object(Matching, "REL/subchrselDll/main.c"), } ), Rel('w01Dll', @@ -911,13 +991,46 @@ config.libs = [ Rel('w03Dll', objects = { Object(Matching, "REL/board_executor.c"), - Object(NonMatching, "REL/w03Dll/main.c"), - Object(NonMatching, "REL/w03Dll/statue.c"), + Object(Matching, "REL/w03Dll/main.c"), + Object(Matching, "REL/w03Dll/statue.c"), Object(NonMatching, "REL/w03Dll/condor.c"), - Object(NonMatching, "REL/w03Dll/river.c"), - Object(NonMatching, "REL/w03Dll/smoke.c"), + Object(Matching, "REL/w03Dll/river.c"), + Object(Matching, "REL/w03Dll/smoke.c"), Object(NonMatching, "REL/w03Dll/mg_coin.c"), - Object(NonMatching, "REL/w03Dll/mg_item.c"), + Object(Matching, "REL/w03Dll/mg_item.c"), + } + ), + Rel('w04Dll', + objects = { + Object(Matching, "REL/board_executor.c"), + Object(NonMatching, "REL/w04Dll/main.c"), + Object(NonMatching, "REL/w04Dll/bridge.c"), + Object(NonMatching, "REL/w04Dll/boo_event.c"), + Object(NonMatching, "REL/w04Dll/big_boo.c"), + Object(NonMatching, "REL/w04Dll/mg_item.c"), + Object(NonMatching, "REL/w04Dll/mg_coin.c"), + } + ), + Rel('w05Dll', + objects = { + Object(Matching, "REL/board_executor.c"), + Object(NonMatching, "REL/w05Dll/main.c"), + Object(NonMatching, "REL/w05Dll/hotel.c"), + Object(NonMatching, "REL/w05Dll/monkey.c"), + Object(NonMatching, "REL/w05Dll/dolphin.c"), + Object(NonMatching, "REL/w05Dll/mg_item.c"), + Object(NonMatching, "REL/w05Dll/mg_coin.c"), + } + ), + Rel('w05Dll', + objects = { + Object(Matching, "REL/board_executor.c"), + Object(NonMatching, "REL/w06Dll/main.c"), + Object(NonMatching, "REL/w06Dll/mg_item.c"), + Object(NonMatching, "REL/w06Dll/mg_coin.c"), + Object(NonMatching, "REL/w06Dll/fire.c"), + Object(NonMatching, "REL/w06Dll/bridge.c"), + Object(NonMatching, "REL/w06Dll/bowser.c"), } ), Rel('w10Dll', @@ -929,6 +1042,26 @@ config.libs = [ Object(Matching, "REL/w10Dll/tutorial.c"), } ), + Rel('w20Dll', + objects = { + Object(Matching, "REL/board_executor.c"), + Object(NonMatching, "REL/w20Dll/main.c"), + } + ), + Rel('w21Dll', + objects = { + Object(Matching, "REL/board_executor.c"), + Object(NonMatching, "REL/w21Dll/main.c"), + } + ), + Rel('ztardll', + objects = { + Object(Matching, "REL/executor.c"), + Object(NonMatching, "REL/ztardll/main.c"), + Object(NonMatching, "REL/ztardll/font.c"), + Object(NonMatching, "REL/ztardll/select.c"), + } + ), ] if args.mode == "configure": diff --git a/include/REL/w03Dll.h b/include/REL/w03Dll.h new file mode 100644 index 00000000..ce63d4d8 --- /dev/null +++ b/include/REL/w03Dll.h @@ -0,0 +1,29 @@ +#include "game/gamework_data.h" +#include "dolphin.h" +#include "REL/executor.h" +#include "game/process.h" +#include "game/window.h" +#include "game/object.h" + +#define ARRAY_COUNT(arr) (s32)(sizeof(arr) / sizeof(arr[0])) + +typedef struct w03StructUnk0 { +/* 0x00 */ Vec unk_00; +/* 0x0C */ Vec unk_0C; +/* 0x18 */ Vec unk_18; +/* 0x24 */ s32 datanum; +} w03StructUnk0; + +typedef struct w03UnkStruct2{ + u8 unk0 : 1; +} w03UnkStruct2; + +typedef struct w03State { + s8 unk0; + u8 unk1; + u8 unk2; + s8 unk3; + u16 unk4; + u16 unk6; + s16 unk8; +} w03State; \ No newline at end of file diff --git a/include/board_unsplit.h b/include/board_unsplit.h index d37d0ae3..c7af0a90 100644 --- a/include/board_unsplit.h +++ b/include/board_unsplit.h @@ -3,18 +3,28 @@ #include "dolphin.h" +#ifndef _BOARD_SPACE_EVENT_FUNC +#define _BOARD_SPACE_EVENT_FUNC +typedef s32 (*BoardSpaceEventFunc)(void); +#endif + +#ifndef _BOARD_MAIN_H +typedef void (*BoardLightHook)(void); +#endif + void BoardCameraTargetModelSet(s16 model); void BoardCameraMotionStartEx(s16, Vec *, Vec *, f32, f32, s16); void BoardCameraMotionWait(void); -void fn_8007A360(s32); -void fn_8007F894(void); +s32 BoardSpacePosGet(s32, s32, Vec*); +void BoardShopTutorialExec(s32); +void BoardLotteryTutorialExec(void); s16 BoardStarHostMdlGet(void); void BoardStatusShowSetAll(s32); -void fn_800A4C88(void); -void fn_800A6B10(void); +void BoardMGSetupTutorialExec(void); +void BoardBooHouseTutorialExec(void); void BoardStatusItemSet(s32); void BoardTutorialItemSet(s32); -void fn_80082AAC(s32); +void BoardCharWheelSetTarget(s32); void BoardTutorialDirInputSet(s32, s32, s32); void BoardSpaceStarSetIndex(s32); void BoardModelRotYSet(s16, f32); @@ -23,7 +33,7 @@ void BoardModelLayerSet(s16, u8); void BoardTutorialHostSet(s16); s16 BoardModelIDGet(s16); void BoardModelScaleSetV(s16, Vec*); -void BoardLightHookSet(void*, void*); +void BoardLightHookSet(BoardLightHook set, BoardLightHook reset); s16 BoardModelCreate(s32, void*, s32); void BoardModelKill(s16); void fn_8006DDE8(s16, f32); @@ -33,18 +43,26 @@ void BoardModelPosSetV(s16, Vec*); void BoardModelPosSet(s16, f32, f32, f32); void BoardModelRotSetV(s16 arg0, Vec* arg1); void BoardModelVisibilitySet(s16, s32); +void BoardSpaceWalkEventFuncSet(BoardSpaceEventFunc func); +void BoardSpaceWalkMiniEventFuncSet(BoardSpaceEventFunc func); +void BoardSpaceLandEventFuncSet(BoardSpaceEventFunc func); +s32 BoardSpaceFlagSearch(s32, u32); void BoardSpaceInit(s32); void BoardSpaceDestroy(void); -void fn_80077AAC(s16); -void fn_8007A83C(s16); -void fn_80083EDC(s16); -void fn_800A4F6C(s16); +void BoardShopHostSet(s16); +void BoardLotteryHostSet(s16); +void BoardStarHostSet(s16); +void BoardBooHouseHostSet(s16); void BoardTutorialHookSet(void*); void BoardTutorialBlockSetPos(s32, s32); s32 BoardCameraRotGet(Vec*); void BoardModelScaleSet(s16, f32, f32, f32); s32 BoardIsKill(void); -void BoardModelMtxSet(s16, Mtx); +void BoardModelMtxSet(s16, Mtx*); void BoardModelRotSet(s16, f32, f32, f32); +void BoardBowserExec(s32 player, s32 space); +void BoardBattleExec(s32 player, s32 space); +void BoardFortuneExec(s32 player, s32 space); + #endif diff --git a/include/dolphin/gx/GXVert.h b/include/dolphin/gx/GXVert.h index e3ababdd..d870fc51 100644 --- a/include/dolphin/gx/GXVert.h +++ b/include/dolphin/gx/GXVert.h @@ -149,6 +149,18 @@ static inline void GXColor1x8(u8 index) { GXWGFifo.u8 = index; } +static inline void GXPosition1x16(u16 index) { + GXWGFifo.u16 = index; +} + +static inline void GXColor1x16(u16 index) { + GXWGFifo.u16 = index; +} + +static inline void GXTexCoord1x16(u16 index) { + GXWGFifo.u16 = index; +} + static inline void GXEnd(void) {} #endif diff --git a/include/dolphin/os/OSFastCast.h b/include/dolphin/os/OSFastCast.h index cd81d882..696b7953 100644 --- a/include/dolphin/os/OSFastCast.h +++ b/include/dolphin/os/OSFastCast.h @@ -76,6 +76,24 @@ static inline u8 __OSf32tou8(register f32 inF) static inline void OSf32tou8(f32 *f, u8 *out) { *out = __OSf32tou8(*f); } +static inline s8 __OSf32tos8(register f32 inF) +{ + u32 tmp; + register u32 *tmpPtr = &tmp; + register s8 out; + // clang-format off + asm { + psq_st inF, 0(tmpPtr), 0x1, OS_FASTCAST_S8 + lbz out, 0(tmpPtr) + extsb out, out //HACK to match fast cast inlines + } + // clang-format on + + return out; +} + +static inline void OSf32tos8(f32 *f, s8 *out) { *out = __OSf32tos8(*f); } + static inline u16 __OSf32tou16(register f32 inF) { u32 tmp; diff --git a/include/game/ClusterExec.h b/include/game/ClusterExec.h new file mode 100644 index 00000000..785e3fe0 --- /dev/null +++ b/include/game/ClusterExec.h @@ -0,0 +1,13 @@ +#ifndef _GAME_CLUSTER_EXEC_H +#define _GAME_CLUSTER_EXEC_H + +#include "game/hsfformat.h" +#include "game/hsfman.h" + +float GetClusterCurve(HsfTrack *arg0, float arg1); +float GetClusterWeightCurve(HsfTrack *arg0, float arg1); +void SetClusterMain(HsfCluster *arg0); +void ClusterProc(ModelData *arg0); +void ClusterMotionExec(ModelData *arg0); + +#endif diff --git a/include/game/EnvelopeExec.h b/include/game/EnvelopeExec.h new file mode 100644 index 00000000..0cbcb61f --- /dev/null +++ b/include/game/EnvelopeExec.h @@ -0,0 +1,12 @@ +#ifndef _GAME_ENVELOPE_EXEC_H +#define _GAME_ENVELOPE_EXEC_H + +#include "game/hsfformat.h" + +void InitEnvelope(HsfData *arg0); +void EnvelopeProc(HsfData *arg0); +void InitVtxParm(HsfData *arg0); + +extern Vec *Vertextop; + +#endif diff --git a/include/game/ShapeExec.h b/include/game/ShapeExec.h new file mode 100755 index 00000000..62b3b62d --- /dev/null +++ b/include/game/ShapeExec.h @@ -0,0 +1,8 @@ +#ifndef _GAME_SHAPE_EXEC_H +#define _GAME_SHAPE_EXEC_H + +#include "game/hsfformat.h" + +void ShapeProc(HsfData *arg0); + +#endif diff --git a/include/game/THPDraw.h b/include/game/THPDraw.h new file mode 100755 index 00000000..dcaa8f3c --- /dev/null +++ b/include/game/THPDraw.h @@ -0,0 +1,10 @@ +#ifndef _GAME_THPDRAW_H +#define _GAME_THPDRAW_H + +#include "dolphin.h" + +void THPGXRestore(void); +void THPGXYuv2RgbSetup(GXRenderModeObj *obj, GXColor *arg1, Mtx arg2); +void THPGXYuv2RgbDraw(u32 *yImage, u32 *uImage, u32 *vImage, s16 x, s16 y, s16 texWidth, s16 texHeight, s16 polyWidth, s16 polyHeight); + +#endif diff --git a/include/game/THPSimple.h b/include/game/THPSimple.h new file mode 100755 index 00000000..dcc31892 --- /dev/null +++ b/include/game/THPSimple.h @@ -0,0 +1,84 @@ +#ifndef _GAME_THPSIMPLE_H +#define _GAME_THPSIMPLE_H + +#include "dolphin.h" +#include "dolphin/thp/THPFile.h" +#include "dolphin/thp/THPInfo.h" + +// THPReadBuffer? +typedef struct { + /* 0x00 */ s32 *unk00; + /* 0x04 */ s32 unk04; + /* 0x08 */ s32 unk08; +} UnkThpStruct01; // Size 0xC + +typedef struct { + /* 0x00 */ void *unk00; + /* 0x04 */ void *unk04; + /* 0x08 */ void *unk08; + /* 0x0C */ s32 unk0C; +} UnkThpStruct02; // Size 0x10 + +typedef struct { + /* 0x00 */ void *unk00; + /* 0x04 */ void *unk04; + /* 0x08 */ u32 unk08; +} UnkThpStruct03; // Size 0xC + +typedef struct { + /* 0x00 */ u32 unk00; + /* 0x04 */ u32 unk04; +} UnkThpStruct04; // Size 8 + +typedef struct { + /* 0x000 */ DVDFileInfo unk00; + /* 0x03C */ THPHeader unk3C; + /* 0x06C */ THPFrameCompInfo unk6C; + /* 0x080 */ UnkThpStruct04 unk80; + /* 0x088 */ u8 unk88[0xC]; + /* 0x094 */ void *unk94; + /* 0x098 */ s32 unk98; + /* 0x09C */ u8 unk9C; + /* 0x09D */ u8 unk9D; + /* 0x09E */ u8 unk9E; + /* 0x09F */ u8 unk9F; + /* 0x0A0 */ s32 unkA0; + /* 0x0A4 */ s32 unkA4; + /* 0x0A8 */ u32 unkA8; + /* 0x0AC */ s32 unkAC; + /* 0x0B0 */ s32 unkB0; + /* 0x0B4 */ s32 unkB4; + /* 0x0B8 */ s32 unkB8; + /* 0x0BC */ float unkBC; + /* 0x0C0 */ float unkC0; + /* 0x0C4 */ float unkC4; + /* 0x0C8 */ s32 unkC8; + /* 0x0CC */ UnkThpStruct01 unkCC[10]; + /* 0x144 */ UnkThpStruct02 unk144[2]; + /* 0x164 */ UnkThpStruct03 unk164[4]; + /* 0x194 */ s32 unk194; + /* 0x198 */ s32 unk198; + /* 0x19C */ u8 unk19C; + /* 0x19D */ char unk19D[1]; + /* 0x19E */ s16 unk19E; +} UnkThpStruct10; // Size 0x1A0 + +s32 THPSimpleInit(s32 arg0); +void THPSimpleQuit(void); +s32 THPSimpleOpen(char *arg0); +s32 THPSimpleClose(void); +s32 THPSimpleCalcNeedMemory(void); +s32 THPSimpleSetBuffer(void *arg0); +s32 THPSimplePreLoad(s32 arg0); +void THPSimpleAudioStart(void); +void THPSimpleAudioStop(void); +s32 THPSimpleLoadStop(void); +s32 THPSimpleDecode(void); +s32 THPSimpleDrawCurrentFrame(GXRenderModeObj *arg0, GXColor *arg1, Mtx arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6); +s32 THPSimpleGetVideoInfo(UnkThpStruct04 *arg0); +s32 THPSimpleGetTotalFrame(void); +s32 THPSimpleSetVolume(s32 left, s32 right); + +extern UnkThpStruct10 SimpleControl; + +#endif diff --git a/include/game/audio.h b/include/game/audio.h index 5c058fee..09fd50cf 100644 --- a/include/game/audio.h +++ b/include/game/audio.h @@ -18,8 +18,8 @@ void HuAudFXStop(s32 arg0); void HuAudFXAllStop(void); void HuAudFXFadeOut(s32 arg0, s32 arg1); void HuAudFXPanning(s32 arg0, s16 arg1); -void HuAudFXListnerSet(s32 arg0, s32 arg1, float arg2, float arg3); -void HuAudFXListnerSetEX(s32 arg0, s32 arg1, float sndDist, float sndSpeed, float arg4, float arg5, float arg6); +void HuAudFXListnerSet(Vec* arg0, Vec* arg1, float arg2, float arg3); +void HuAudFXListnerSetEX(Vec* arg0, Vec* arg1, float sndDist, float sndSpeed, float arg4, float arg5, float arg6); void HuAudFXListnerUpdate(s32 arg0, s32 arg1); s32 HuAudFXEmiterPlay(s32 arg0, Vec *arg1); void HuAudFXEmiterUpDate(s32 arg0, Vec *arg1); diff --git a/include/game/board/basic_space.h b/include/game/board/basic_space.h index 38924130..d786b2b7 100644 --- a/include/game/board/basic_space.h +++ b/include/game/board/basic_space.h @@ -3,8 +3,8 @@ #include "dolphin.h" -void BoardEventLandBlue(s32, s16); -void BoardEventLandRed(s32, s16); +void BoardEventLandBlue(s32, s32); +void BoardEventLandRed(s32, s32); s8 BoardCoinChgCreate(Vec*, s8); s32 BoardCoinChgExist(s32); void BoardCoinChgHide(s32); diff --git a/include/game/board/main.h b/include/game/board/main.h index d3506e72..214b65f3 100644 --- a/include/game/board/main.h +++ b/include/game/board/main.h @@ -58,8 +58,7 @@ static inline s32 BoardCurrGet() static inline s32 BoardPartyFlagGet() { - s32 value = GWSystem.party; - return value; + return GWSystem.party; } extern BoardCameraData boardCamera; @@ -73,17 +72,27 @@ typedef void (*BoardFunc)(void); typedef void (*BoardLightHook)(void); typedef void (*BoardCameraPosCalcFunc)(BoardCameraData *camera); +typedef void (*BoardTurnStartHook)(s32 player, s32 space); + +extern BoardTurnStartHook boardTurnStartFunc; +extern BoardFunc boardTurnFunc; +extern BoardLightHook boardLightResetHook; +extern BoardLightHook boardLightSetHook; + void BoardCommonInit(BoardFunc create, BoardFunc destroy); void BoardKill(void); s32 BoardIsKill(void); -void BoardPauseEnableSet(s32 value); -s32 BoardPauseEnableGet(); +void BoardPauseDisableSet(s32 value); +s32 BoardPauseDisableGet(); void BoardSaveInit(s32 board); void BoardStoryConfigSet(s32 mg_type, s32 diff_story); void BoardPartyConfigSet(s32 team, s32 bonus_star, s32 mg_type, s32 max_turn, s32 p1_handicap, s32 p2_handicap, s32 p3_handicap, s32 p4_handicap); -BOOL BoardTurnNext(void); +s32 BoardTurnNext(void); void BoardNextOvlSet(OverlayID overlay); s32 BoardStartCheck(void); +void BoardLightHookSet(BoardLightHook set, BoardLightHook reset); +void BoardLightSetExec(void); +void BoardLightResetExec(void); void BoardCameraBackup(void); void BoardCameraRestore(void); void BoardCameraScissorSet(s32 x, s32 y, s32 w, s32 h); @@ -117,6 +126,14 @@ s32 BoardCameraCullCheck(Vec *point, float radius); s32 BoardCameraMotionIsDone(void); void BoardCameraMotionWait(void); void BoardCameraInit(void); +void BoardMGDoneFlagSet(s32 flag); +s32 BoardMGDoneFlagGet(); +void BoardMGExit(void); +void BoardMGCreate(s32 arg0); +void BoardEventFlagSet(void); +void BoardEventFlagReset(void); +s32 BoardEventFlagGet(void); +void BoardMTXCalcLookAt(Mtx dest, Vec *eye, Vec *up, Vec *target); float BoardArcSin(float value); float BoardArcCos(float value); void BoardRandInit(void); @@ -125,7 +142,21 @@ u32 BoardRandMod(u32 value); float BoardRandFloat(void); float BoardVecDistXZCalc(Vec *vec1, Vec *vec2); s32 BoardVecMaxDistXZCheck(Vec *vec1, Vec *vec2, float max_dist); +void BoardDAngleCalcVec(Vec *vec1); +float BoardDAngleCalc(float value); +s32 BoardDAngleCalcRange(float *value, float min, float range); s32 BoardVecMinDistCheck(Vec *vec1, Vec *vec2, float min_dist); +void BoardFilterFadeOut(s16 len); +void BoardFilterFadeInit(s16 len, u8 max_alpha); +s32 BoardFilterFadePauseCheck(void); +s32 BoardFilterFadeCheck(void); +void BoardConfettiCreate(Vec *pos, s16 count, float range); +void BoardConfettiKill(void); +void BoardConfettiStop(void); +void BoardLast5GfxInit(void); +void BoardLast5GfxShowSet(s32 show); +void BoardTauntInit(void); +void BoardTauntKill(void); s32 BoardDataDirReadAsync(s32 data_num); void BoardDataAsyncWait(s32 status); diff --git a/include/game/board/model.h b/include/game/board/model.h new file mode 100644 index 00000000..31f0577b --- /dev/null +++ b/include/game/board/model.h @@ -0,0 +1,58 @@ +#ifndef _BOARD_WARP_H +#define _BOARD_WARP_H + +#include "game/hsfman.h" +#include "game/data.h" + +typedef struct board_model_param { + s32 data_num; + struct { + u8 field04_bit0 : 2; + u8 visible : 1; + u8 link : 1; + u8 start_mot : 1; + u8 pause : 1; + }; + s16 unk6; +} BoardModelParam; + +void BoardModelInit(void); +void BoardModelKillAll(void); +void BoardModelDummyUpdate(void); +void BoardModelVisibilityUpdate(void); +void BoardModelHideSetAll(s32 flag); +void BoardModelAmbSetAll(float r, float g, float b); +void BoardModelCameraSetAll(u16 camera); +s16 BoardModelCreate(s32 data_num, s32 *mot_list, s32 link); +s16 BoardModelCreateCharacter(s32 character, s32 data_num, s32 *mot_list, s32 link); +s16 BoardModelCreateParam(BoardModelParam *param, Vec *pos, Vec *rot); +void BoardModelKill(s16 model); +s16 BoardModelIDGet(s16 model); +s32 fn_8006DC1C(s16 model, s32 arg1); +s32 BoardModelPassSet(s16 model, s32 pass); +s32 BoardModelAmbSet(s16 model, float r, float g, float b); +s32 BoardModelExistCheck(s16 model, s32 arg1); +s32 BoardModelExistDupe(s16 model, s32 arg1); +s32 fn_8006DDE8(s16 model, float arg1); +s32 BoardModelMotionStart(s16 model, s32 slot, u32 attr); +s32 BoardModelMotionSpeedSet(s16 model, float speed); +s32 BoardModelPosSet(s16 model, float x, float y, float z); +s32 BoardModelPosSetV(s16 model, Vec *pos); +s32 BoardModelRotSet(s16 model, float x, float y, float z); +s32 BoardModelRotSetV(s16 model, Vec *rot); +s32 BoardModelScaleSet(s16 model, float x, float y, float z); +s32 BoardModelScaleSetV(s16 model, Vec *scale); +s32 BoardModelPosGet(s16 model, Vec *dst); +s32 BoardModelRotGet(s16 model, Vec *dst); +s32 BoardModelScaleGet(s16 model, Vec *dst); +s32 BoardModelVisibilitySet(s16 model, s32 flag); +s32 BoardModelVisibilityGet(s16 model); +s32 BoardModelCameraSet(s16 model, u16 camera); +s32 BoardModelLayerSet(s16 model, u8 layer); +s32 BoardModelLayerGet(s16 model); +void BoardModelLayerSetAll(s32 layer); +s32 BoardModelHookSet(s16 model, char *name, s16 hook); +s32 BoardModelHookReset(s16 model); +s32 BoardModelHookObjReset(s16 model, char *name); + +#endif \ No newline at end of file diff --git a/include/game/board/player.h b/include/game/board/player.h index 45ec3740..943d6c43 100644 --- a/include/game/board/player.h +++ b/include/game/board/player.h @@ -113,10 +113,15 @@ void BoardDiceDigit2DUpdateEnable(s32); void BoardPlayerMoveTo(s32, s16); void BoardPlayerZoomRestore(s32); void BoardRotateDiceNumbers(s32); -s32 DoDebugMove(s32, s16*); s32 DoSparkSpace(s32, s16*); -s32 ExecJunction(s32, s16*); s32 MegaPlayerPassFunc(s32, s16); s32 BoardPlayerAnimBlendCheck(s32); +void BoardPlayerCoinsSet(s32 player, s32 value); +s32 BoardPlayerSizeGet(s32 player); +void BoardPlayerAutoSizeSet(s32 player, s32 value); +void BoardPlayerMotionStart(s32, s32, s32); +void BoardPlayerMotionShiftSet(s32 player, s32 arg1, float start, float end, u32 attr); +void BoardPlayerRotYSet(s32 player, float rot_y); +void BoardPlayerZoomRestore(s32 player); #endif \ No newline at end of file diff --git a/include/game/board/space.h b/include/game/board/space.h index 911507de..a4e68b27 100644 --- a/include/game/board/space.h +++ b/include/game/board/space.h @@ -5,7 +5,10 @@ #define BOARD_SPACE_LINKMAX 4 +#ifndef _BOARD_SPACE_EVENT_FUNC +#define _BOARD_SPACE_EVENT_FUNC typedef s32 (*BoardSpaceEventFunc)(void); +#endif typedef struct board_space { Vec pos; @@ -22,8 +25,7 @@ void BoardSpaceWalkMiniEventFuncSet(BoardSpaceEventFunc func); void BoardSpaceLandEventFuncSet(BoardSpaceEventFunc func); s32 BoardSpaceWalkEventExec(void); s32 BoardSpaceWalkMiniEventExec(void); -s16 BoardSpaceCountGet(s32 layer); -s16 BoardSpaceCountGet(s32 layer); +s32 BoardSpaceCountGet(s32 layer); BoardSpace *BoardSpaceGet(s32 layer, s32 index); void BoardSpaceAttrSet(s32 layer, u32 attr); void BoardSpaceAttrReset(s32 layer, u32 attr); @@ -32,6 +34,7 @@ s32 BoardSpaceTypeGet(s32 layer, s32 index); void BoardSpaceTypeSet(s32 layer, s32 index, s32 type); s32 BoardSpacePosGet(s32 layer, s32 index, Vec *pos); void BoardSpaceCornerPosGet(s32 index, s32 corner, Vec *pos); +s32 BoardSpaceRotGet(s32 layer, s32 index, Vec *rot); s32 BoardSpaceFlagSearch(s32 layer, u32 flag); s32 BoardSpaceFlagPosGet(s32 layer, u32 flag, Vec *pos); s32 BoardSpaceLinkFlagSearch(s32 layer, s32 index, u32 flag); @@ -39,7 +42,7 @@ s32 BoardSpaceLinkTypeListGet(s32 layer, s32 index, s32 type, s16 *list); s32 BoardSpaceLinkTargetListGet(s32 layer, s32 target, s16 *list); s32 BoardSpaceLinkTypeSearch(s32 layer, s32 target, u16 type); s32 BoardSpaceLinkTransformGet(s32 flag, Vec *pos, Vec *rot, Vec *scale); -void BoardSpaceStarSet(s32 space); +void BoardSpaceHostSet(s32 space); void BoardSpaceStarSetIndex(s32 index); s32 BoardSpaceStarGetNext(void); s32 BoardSpaceStarGetRandom(s32 excl_pos); @@ -48,5 +51,6 @@ s32 BoardSpaceStarGet(s32 index); s32 BoardSpaceStarGetCurr(void); s32 BoardSpaceStarCheck(s32 index); void BoardSpaceLandExec(s32 player, s32 space); +void BoardSpaceBlockPosSet(void); #endif diff --git a/include/game/board/warp.h b/include/game/board/warp.h index 8b118caf..71175832 100644 --- a/include/game/board/warp.h +++ b/include/game/board/warp.h @@ -4,6 +4,6 @@ #include "game/process.h" #include "game/wipe.h" -void BoardWarpExec(s32 player, s16 space); +void BoardWarpExec(s32 player, s32 space); #endif \ No newline at end of file diff --git a/include/game/board/window.h b/include/game/board/window.h index b77cc8c0..6a307621 100644 --- a/include/game/board/window.h +++ b/include/game/board/window.h @@ -17,8 +17,8 @@ void BoardWinCreate(s32 pos, u32 mess, s32 portrait); void BoardWinInsertMesSet(u32 value, s32 index); void BoardWinWait(void); void BoardWinKill(void); -void BoardWinSetAttr(s32 attr); -void BoardWinResetAttr(s32 attr); +void BoardWinAttrSet(s32 attr); +void BoardWinAttrReset(s32 attr); void BoardWinChoiceDisable(s32 choice); void BoardWinKeyWait(void); int BoardWinSpeedGet(void); diff --git a/include/game/esprite.h b/include/game/esprite.h new file mode 100755 index 00000000..d38f0299 --- /dev/null +++ b/include/game/esprite.h @@ -0,0 +1,24 @@ +#ifndef _GAME_ESPRITE_H +#define _GAME_ESPRITE_H + +#include "dolphin.h" + +void espInit(void); +s16 espEntry(s32 arg0, s16 arg1, s16 arg2); +void espKill(s16 arg0); +s16 espGrpIDGet(void); +void espDispOn(s16 arg0); +void espDispOff(s16 arg0); +void espAttrSet(s16 arg0, u16 arg1); +void espAttrReset(s16 arg0, u16 arg1); +void espPosSet(s16 arg0, float arg1, float arg2); +void espScaleSet(s16 arg0, float arg1, float arg2); +void espZRotSet(s16 arg0, float arg1); +void espTPLvlSet(s16 arg0, float arg1); +void espColorSet(s16 arg0, u8 arg1, u8 arg2, u8 arg3); +void espSpeedSet(s16 arg0, float arg1); +void espBankSet(s16 arg0, s16 arg1); +void espDrawNoSet(s16 arg0, s16 arg1); +void espPriSet(s16 arg0, s16 arg1); + +#endif diff --git a/include/game/gamework_data.h b/include/game/gamework_data.h index d86c21c1..ab0e3ad3 100644 --- a/include/game/gamework_data.h +++ b/include/game/gamework_data.h @@ -46,7 +46,7 @@ typedef struct system_state { /* 0x32 */ s8 unk_32; /* 0x34 */ u16 mg_next; /* 0x36 */ s16 mg_next_extra; -/* 0x38 */ s16 unk_38; +/* 0x38 */ u16 unk_38; /* 0x3A */ u8 flag[3][16]; /* 0x6A */ u8 unk_6A[0x72]; } SystemState; //8018fcf8, sizeof 0xDC @@ -105,7 +105,7 @@ typedef struct player_state { typedef struct game_stat { /* 0x0 */ s16 unk_00; -/* 0x2 */ s8 language; +/* 0x2 */ u8 language; /* 0x3 */ u8 sound_mode; /* 0x4 */ s8 rumble; /* 0x6 */ u16 total_stars; @@ -147,4 +147,19 @@ extern PlayerState GWPlayer[4]; extern SystemState GWSystem; extern GameStat GWGameStat; +static inline s32 GWLanguageGet(void) +{ + return GWGameStat.language; +} + +static inline s32 GWMGTypeGet() +{ + return GWSystem.mg_type; +} + +static inline s32 GWMessSpeedGet() +{ + return GWSystem.mess_speed; +} + #endif diff --git a/include/game/hsfdraw.h b/include/game/hsfdraw.h index 9632e55d..7ece73ec 100755 --- a/include/game/hsfdraw.h +++ b/include/game/hsfdraw.h @@ -4,6 +4,30 @@ #include "game/hsfman.h" #include "dolphin.h" +typedef struct model_data ModelData; + +typedef struct { + /* 0x00 */ u16 unk00; + /* 0x02 */ s16 unk02; + /* 0x04 */ s16 unk04; + /* 0x06 */ char unk06[2]; + /* 0x08 */ float unk08; + /* 0x0C */ float unk0C; + /* 0x10 */ float unk10; + /* 0x14 */ float unk14; + /* 0x18 */ float unk18; + /* 0x1C */ float unk1C; + /* 0x20 */ float unk20; + /* 0x24 */ float unk24; + /* 0x28 */ float unk28; + /* 0x2C */ float unk2C; + /* 0x30 */ float unk30; + /* 0x34 */ float unk34; + /* 0x38 */ float unk38; + /* 0x3C */ HsfBitmap *unk3C; + /* 0x40 */ char unk40[4]; +} HsfdrawStruct01; // Size 0x44 + void Hu3DDrawPreInit(void); void Hu3DDraw(ModelData *arg0, Mtx arg1, Vec *arg2); s32 ObjCullCheck(HsfData *arg0, HsfObject *arg1, Mtx arg2); @@ -25,4 +49,13 @@ HsfObject *Hu3DObjDuplicate(HsfData *arg0, u32 arg1); void Hu3DModelObjDrawInit(void); void Hu3DModelObjDraw(s16 arg0, char *arg1, Mtx arg2); +extern u32 totalPolyCnt; +extern u32 totalPolyCnted; +extern u32 totalMatCnt; +extern u32 totalMatCnted; +extern u32 totalTexCnt; +extern u32 totalTexCnted; +extern u32 totalTexCacheCnt; +extern u32 totalTexCacheCnted; + #endif diff --git a/include/game/hsfex.h b/include/game/hsfex.h new file mode 100644 index 00000000..a84695c1 --- /dev/null +++ b/include/game/hsfex.h @@ -0,0 +1,15 @@ +#ifndef _GAME_HSFEX_H +#define _GAME_HSFEX_H + +#include "dolphin.h" + +void CamMotionEx2(s16 arg0, s16 arg1, float arg2, s16 arg3); +void CamMotionEx(s16 arg0, s16 arg1, Vec *arg2, Vec *arg3, Vec *arg4, float arg5, s16 arg6); +float InterpolateBMLine(float *arg0, float *arg1, float arg2); +void Hu3D2Dto3D(Vec *arg0, s16 arg1, Vec *arg2); +void Hu3D3Dto2D(Vec *arg0, s16 arg1, Vec *arg2); +void Hu3DMtxTransGet(Mtx arg0, Vec *arg1); +void Hu3DMtxRotGet(Mtx arg0, Vec *arg1); +void Hu3DMtxScaleGet(Mtx arg0, Vec *arg1); + +#endif diff --git a/include/game/hsfformat.h b/include/game/hsfformat.h index 5eac6a3b..d3104319 100644 --- a/include/game/hsfformat.h +++ b/include/game/hsfformat.h @@ -238,10 +238,12 @@ typedef struct hsf_cluster { char *name[2]; union { char *targetName; - u32 target; + s32 target; }; HsfPart *part; - u8 unk10[132]; + float unk10; + float unk14[1]; // unknown array size + u8 unk18[124]; u8 adjusted; u8 unk95; u16 type; @@ -269,7 +271,7 @@ typedef struct hsf_object_data { HsfVector3f min; HsfVector3f max; float baseMorph; - float *morphWeight[33]; + float morphWeight[33]; } mesh; struct hsf_object *replica; }; @@ -339,9 +341,23 @@ typedef struct hsf_bitmap_keyframe { typedef struct hsf_track { u8 type; u8 start; - u16 target; - u16 param; - u16 channel; + union { + u16 target; + s16 target_s16; + }; + union { + s32 unk04; + struct { + union { + s16 param; + u16 param_u16; + }; + union { + u16 channel; + s16 channel_s16; + }; + }; + }; u16 curveType; u16 numKeyframes; union { @@ -352,7 +368,7 @@ typedef struct hsf_track { typedef struct hsf_motion { char *name; - u32 numTracks; + s32 numTracks; HsfTrack *track; float len; } HsfMotion; diff --git a/include/game/hsfman.h b/include/game/hsfman.h index aeb7e68d..d967a058 100644 --- a/include/game/hsfman.h +++ b/include/game/hsfman.h @@ -1,20 +1,17 @@ #ifndef _GAME_HSFMAN_H #define _GAME_HSFMAN_H -#include "math.h" -#include "game/memory.h" #include "game/hsfanim.h" #include "game/hsfformat.h" -#include "game/sprite.h" -#include "game/init.h" -#include "game/data.h" #include "game/memory.h" -#include "dolphin/gx/GXVert.h" +#include "game/data.h" #define Hu3DModelCreateFile(data_id) (Hu3DModelCreate(HuDataSelHeapReadNum((data_id), MEMORY_DEFAULT_NUM, HEAP_DATA))) typedef struct particle_data ParticleData; +typedef void (*ModelHookFunc)(struct model_data *, Mtx); + typedef struct model_data { u8 unk_00; u8 unk_01; @@ -41,12 +38,27 @@ typedef struct model_data { u32 motion_attr; Point3d unk_58; f32 unk_64; - Point3d unk_68; + f32 unk_68; + f32 unk_6C; + f32 unk_70; f32 unk_74; - char unk_78[0x1C]; + f32 unk_78; + f32 unk_7C; + f32 unk_80; + f32 unk_84; + f32 unk_88; + f32 unk_8C; + f32 unk_90; f32 unk_94; - char unk_98[0x2C]; - HsfData *hsfData; + f32 unk_98; + f32 unk_9C; + f32 unk_A0; + f32 unk_A4[4]; + f32 unk_B4[4]; + union { + HsfData *hsfData; + ModelHookFunc hook; + }; HsfData *unk_C8; Vec pos; Vec rot; @@ -97,11 +109,6 @@ typedef struct shadow_data { Mtx unk_38; Mtx unk_68; } ShadowData; // sizeof 0x98 -typedef struct motion_data { - s16 unk_00; - s16 unk_02; - HsfData *unk_04; -} MotionData; typedef struct light_data { s16 unk_00; s16 unk_02; @@ -114,49 +121,7 @@ typedef struct light_data { GXColor color; } LightData; -extern void ClusterMotionExec(ModelData*); /* extern */ -extern void ClusterProc(ModelData*); /* extern */ -extern void EnvelopeProc(HsfData*); /* extern */ extern void GXWaitDrawDone(); /* extern */ -extern void Hu3DAnimExec(); /* extern */ -extern void Hu3DCameraMotionExec(s16); /* extern */ -extern void Hu3DDraw(ModelData*, Mtx, Vec*); /* extern */ -extern void Hu3DDrawPost(); /* extern */ -extern void Hu3DDrawPreInit(); /* extern */ -extern void Hu3DMotionNext(s16); /* extern */ -extern void Hu3DShadowExec(); /* extern */ -extern void Hu3DSubMotionExec(s16); /* extern */ -extern void HuPerfBegin(s32); /* extern */ -extern void HuPerfEnd(s32); /* extern */ -extern void HuSprBegin(void); /* extern */ -extern void HuSprDispInit(void); /* extern */ -extern void HuSprExec(s16); /* extern */ -extern void HuSprFinish(void); /* extern */ -extern void InitVtxParm(HsfData*); /* extern */ -extern void ShapeProc(HsfData*); /* extern */ -extern void mtxRot(Mtx, f32, f32, f32); /* extern */ -extern void mtxScaleCat(Mtx, f32, f32, f32); /* extern */ -extern void mtxTransCat(Mtx, f32, f32, f32); -extern void Hu3DAnimInit(void); -extern void Hu3DMotionInit(void); -extern void Hu3DParManInit(void); -extern void Hu3DMotionClusterSet(s16, s16); /* extern */ -extern void Hu3DMotionExec(s16, s16, f32, s32); -extern f32 Hu3DMotionMaxTimeGet(s16); /* extern */ -extern s16 Hu3DMotionModelCreate(s16); /* extern */ -extern void Hu3DMotionShapeSet(s16, s16); /* extern */ -extern void MakeDisplayList(s16, HsfData*); /* extern */ -extern void ClusterAdjustObject(HsfData*, HsfData*); /* extern */ -extern HsfObject* Hu3DObjDuplicate(HsfData*, u32); /* extern */ -extern void Hu3DAnimModelKill(s16); /* extern */ -extern void Hu3DGLightKill(s16); /* extern */ -extern void Hu3DLLightKill(s16, s16); /* extern */ -extern s32 Hu3DMotionKill(s16); -extern void Hu3DModelKill(s16); -extern void Hu3DParManAllKill(void); -extern f32 Hu3DMotionMotionMaxTimeGet(s16); -extern void Hu3DMotionStartEndSet(s16, f32, f32); -extern void Hu3DMotionTimeSet(s16, f32); extern void GXInitSpecularDir(GXLightObj*, f32, f32, f32); void Hu3DInit(void); @@ -169,14 +134,14 @@ void Hu3DPauseSet(s32); void Hu3DNoSyncSet(s32); s16 Hu3DModelCreate(void *); s16 Hu3DModelLink(s16); -s16 Hu3DHookFuncCreate(HsfData*); +s16 Hu3DHookFuncCreate(ModelHookFunc); void Hu3DModelAllKill(void); void Hu3DModelPosSet(s16, f32, f32, f32); -void Hu3DModelPosSetV(s16, Vec); +void Hu3DModelPosSetV(s16, Vec *); void Hu3DModelRotSet(s16, f32, f32, f32); -void Hu3DModelRotSetV(s16, Vec); +void Hu3DModelRotSetV(s16, Vec *); void Hu3DModelScaleSet(s16, f32, f32, f32); -void Hu3DModelScaleSetV(s16, Vec); +void Hu3DModelScaleSetV(s16, Vec *); void Hu3DModelAttrSet(s16, u32); void Hu3DModelAttrReset(s16, u32); u32 Hu3DModelAttrGet(s16); @@ -278,13 +243,4 @@ extern s16 Hu3DCameraNo; extern s16 Hu3DCameraBit; extern s16 Hu3DPauseF; -extern MotionData Hu3DMotion[0x100]; -extern u32 totalMatCnt; -extern u32 totalMatCnted; -extern u32 totalPolyCnt; -extern u32 totalPolyCnted; -extern u32 totalTexCacheCnt; -extern u32 totalTexCacheCnted; -extern u32 totalTexCnt; -extern u32 totalTexCnted; #endif diff --git a/include/game/hsfmotion.h b/include/game/hsfmotion.h new file mode 100644 index 00000000..fa8dc409 --- /dev/null +++ b/include/game/hsfmotion.h @@ -0,0 +1,76 @@ +#ifndef _GAME_HSFMOTION_H +#define _GAME_HSFMOTION_H + +#include "dolphin.h" +#include "game/hsfformat.h" + +typedef struct motion_data { + s16 unk_00; + s16 unk_02; + HsfData *unk_04; +} MotionData; + +typedef struct { + /* 0x00 */ float unk00; + /* 0x04 */ HsfBitmap *unk04; +} UnknownHsfMotionStruct01; // Size 8 + +void Hu3DMotionInit(void); +s16 Hu3DMotionCreate(void *arg0); +s16 Hu3DMotionModelCreate(s16 arg0); +s32 Hu3DMotionKill(s16 arg0); +void Hu3DMotionAllKill(void); +void Hu3DMotionSet(s16 arg0, s16 arg1); +void Hu3DMotionOverlaySet(s16 arg0, s16 arg1); +void Hu3DMotionOverlayReset(s16 arg0); +float Hu3DMotionOverlayTimeGet(s16 arg0); +void Hu3DMotionOverlayTimeSet(s16 arg0, float arg1); +void Hu3DMotionOverlaySpeedSet(s16 arg0, float arg1); +void Hu3DMotionShiftSet(s16 arg0, s16 arg1, float arg2, float arg3, u32 arg4); +void Hu3DMotionShapeSet(s16 arg0, s16 arg1); +s16 Hu3DMotionShapeIDGet(s16 arg0); +void Hu3DMotionShapeSpeedSet(s16 arg0, float arg1); +void Hu3DMotionShapeTimeSet(s16 arg0, float arg1); +float Hu3DMotionShapeMaxTimeGet(s16 arg0); +void Hu3DMotionShapeStartEndSet(s16 arg0, float arg1, float arg2); +s16 Hu3DMotionClusterSet(s16 arg0, s16 arg1); +s16 Hu3DMotionClusterNoSet(s16 arg0, s16 arg1, s16 arg2); +void Hu3DMotionShapeReset(s16 arg0); +void Hu3DMotionClusterReset(s16 arg0, s16 arg1); +s16 Hu3DMotionIDGet(s16 arg0); +s16 Hu3DMotionShiftIDGet(s16 arg0); +void Hu3DMotionTimeSet(s16 arg0, float arg1); +float Hu3DMotionTimeGet(s16 arg0); +float Hu3DMotionShiftTimeGet(s16 arg0); +float Hu3DMotionMaxTimeGet(s16 arg0); +float Hu3DMotionShiftMaxTimeGet(s16 arg0); +void Hu3DMotionShiftStartEndSet(s16 arg0, float arg1, float arg2); +float Hu3DMotionMotionMaxTimeGet(s16 arg0); +void Hu3DMotionStartEndSet(s16 arg0, float arg1, float arg2); +s32 Hu3DMotionEndCheck(s16 arg0); +void Hu3DMotionSpeedSet(s16 arg0, float arg1); +void Hu3DMotionShiftSpeedSet(s16 arg0, float arg1); +void Hu3DMotionNoMotSet(s16 arg0, char *arg1, u32 arg2); +void Hu3DMotionNoMotReset(s16 arg0, char *arg1, u32 arg2); +void Hu3DMotionForceSet(s16 arg0, char *arg1, u32 arg2, float arg3); +void Hu3DMotionNext(s16 arg0); +void Hu3DMotionExec(s16 arg0, s16 arg1, float arg2, s32 arg3); +void Hu3DCameraMotionExec(s16 arg0); +void Hu3DSubMotionExec(s16 arg0); +float *GetObjTRXPtr(HsfObject *arg0, u16 arg1); +void SetObjMatMotion(s16 arg0, HsfTrack *arg1, float arg2); +void SetObjAttrMotion(s16 arg0, HsfTrack *arg1, float arg2); +void SetObjCameraMotion(s16 arg0, HsfTrack *arg1, float arg2); +void SetObjLightMotion(s16 arg0, HsfTrack *arg1, float arg2); +float GetCurve(HsfTrack *arg0, float arg1); +float GetConstant(s32 arg0, float *arg1, float arg2); +float GetLinear(s32 arg0, float arg1[][2], float arg2); +float GetBezier(s32 arg0, HsfTrack *arg1, float arg2); +HsfBitmap *GetBitMap(s32 arg0, UnknownHsfMotionStruct01 *arg1, float arg2); +s16 Hu3DJointMotion(s16 arg0, void *arg1); +void JointModel_Motion(s16 arg0, s16 arg1); +void Hu3DMotionCalc(s16 arg0); + +extern MotionData Hu3DMotion[256]; + +#endif diff --git a/include/game/jmp.h b/include/game/jmp.h new file mode 100755 index 00000000..5e2b8434 --- /dev/null +++ b/include/game/jmp.h @@ -0,0 +1,19 @@ +#ifndef _GAME_JMP_H +#define _GAME_JMP_H + +#include "dolphin.h" + +typedef struct jump_buf { + u32 lr; + u32 cr; + u32 sp; + u32 r2; + u32 pad; + u32 regs[19]; + double flt_regs[19]; +} jmp_buf; + +int gcsetjmp(jmp_buf *jump); +int gclongjmp(jmp_buf *jump, int status); + +#endif diff --git a/include/game/msm.h b/include/game/msm.h index f1c0f006..07df3881 100644 --- a/include/game/msm.h +++ b/include/game/msm.h @@ -54,7 +54,7 @@ void msmMusStop(s32 arg0, s32 arg1); s32 msmMusPlay(s32 arg0, s32 arg1); void msmSeDelListener(void); void msmSeUpdataListener(s32 arg0, s32 arg1); -void msmSeSetListener(s32 arg0, s32 arg1, float arg2, float arg3, UnkMsmStruct_02 *arg4); +void msmSeSetListener(Vec* arg0, Vec* arg1, float arg2, float arg3, UnkMsmStruct_02 *arg4); s32 msmSeGetEntryID(s32 arg0, void *arg1); s32 msmSeGetNumPlay(s32 arg0); s32 msmSeGetStatus(s32 arg0); diff --git a/include/game/object.h b/include/game/object.h index b5b5d3de..a175d01d 100644 --- a/include/game/object.h +++ b/include/game/object.h @@ -22,6 +22,9 @@ typedef enum { #define OM_STAT_NOPAUSE 0x20 #define OM_STAT_MODEL_PAUSED 0x100 + +#define OM_GET_WORK_PTR(object, type) ((type *)(&((object)->work[0]))) + typedef void (*omObjFunc)(struct om_obj_data *); typedef struct om_ovl_his_data { diff --git a/include/game/process.h b/include/game/process.h index fe3efcb0..aad4d97a 100644 --- a/include/game/process.h +++ b/include/game/process.h @@ -1,6 +1,7 @@ #ifndef _GAME_PROCESS_H #define _GAME_PROCESS_H +#include "game/jmp.h" #include "dolphin/types.h" #define PROCESS_STAT_PAUSE 0x1 @@ -8,16 +9,6 @@ #define PROCESS_STAT_PAUSE_EN 0x4 #define PROCESS_STAT_UPAUSE_EN 0x8 -typedef struct jump_buf { - u32 lr; - u32 cr; - u32 sp; - u32 r2; - u32 pad; - u32 regs[19]; - double flt_regs[19]; -} jmp_buf; - typedef struct process { struct process *next; struct process *prev; diff --git a/include/game/thpmain.h b/include/game/thpmain.h index 37ac9565..b0d5b0d1 100644 --- a/include/game/thpmain.h +++ b/include/game/thpmain.h @@ -10,9 +10,9 @@ s16 HuTHP3DCreate(char *path, s16 loop); void HuTHPStop(void); void HuTHPClose(void); void HuTHPRestart(void); -int HuTHPEndCheck(void); -int HuTHPFrameGet(void); -int HuTHPTotalFrameGet(void); -void HuTHPSetVolume(int left, int right); +BOOL HuTHPEndCheck(void); +s32 HuTHPFrameGet(void); +s32 HuTHPTotalFrameGet(void); +void HuTHPSetVolume(s32 left, s32 right); #endif \ No newline at end of file diff --git a/include/math.h b/include/math.h index 494acd68..30110a0c 100644 --- a/include/math.h +++ b/include/math.h @@ -73,6 +73,7 @@ _MATH_INLINE float sinf(float x) { return (float)sin((double)x); } _MATH_INLINE float cosf(float x) { return (float)cos((double)x); } _MATH_INLINE float atan2f(float y, float x) { return (float)atan2((double)y, (double)x); } _MATH_INLINE float atanf(float x) { return (float)atan((double)x); } +_MATH_INLINE float asinf(float x) { return (float)asin((double)x); } _MATH_INLINE float fmodf(float x, float m) { return (float)fmod((double)x, (double)m); } diff --git a/include/unsplit.h b/include/unsplit.h index 06e6374f..b1f96683 100644 --- a/include/unsplit.h +++ b/include/unsplit.h @@ -3,28 +3,23 @@ #include "dolphin.h" -void Hu3D2Dto3D(Vec*, s32, Vec*); -void HuAudFadeOut(s32 arg0); - -void Hu3DModelPosSet(s16 index, float x, float y, float z); -void Hu3DModelRotSet(s16 index, float x, float y, float z); -void Hu3DModelScaleSet(s16 index, float x, float y, float z); - -void espInit(void); -void espScaleSet(s16, f32, f32); -s16 espEntry(s32, s32, s32); -void espDispOff(s16); -void espKill(s16); -void espDispOn(s16); -void espPosSet(s16, f32, f32); - -void HuAudFXListnerKill(void); -void HuAudDllSndGrpSet(u16 ovl); -void HuAudVoiceInit(s16 ovl); - void MGSeqKillAll(void); void MGSeqPracticeStart(void); -void fn_8004D6F4(s16 arg); +void CharMotionClose(s16 character); +void CharModelClose(s16 character); +void CharModelKill(s16 character); +s16 CharModelCreate(s16 character, s16 lod); +s16 CharMotionCreate(s16 character, s32 data_num); +void CharModelMotionSet(s16 character, s16 motion); +float CharModelMotionMaxTimeGet(s16 character); +float CharModelMotionTimeGet(s16 character); +void CharModelMotionShiftSet(s16 model, s16 motion, float time, float shift_time, u32 attr); +void CharModelMotionTimeSet(s16 character, float time); +void CharModelMotionSpeedSet(s16 character, float speed); +void CharMotionKill(s16 character, s32 motion); +void CharModelVoiceEnableSet(s16 character, s16 motion, s32 flag); + +s32 CharModelMotionEndCheck(s16 character); #endif diff --git a/src/REL/bootDll/bootDll.c b/src/REL/bootDll/main.c similarity index 78% rename from src/REL/bootDll/bootDll.c rename to src/REL/bootDll/main.c index 237f2d75..461baf08 100644 --- a/src/REL/bootDll/bootDll.c +++ b/src/REL/bootDll/main.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "game/gamework_data.h" #include "game/process.h" #include "game/data.h" #include "game/sprite.h" @@ -19,7 +19,7 @@ extern int SystemInitF; -static Process *objman; +static Process *objman[2]; Vec lbl_1_bss_3C[2]; Vec lbl_1_bss_24[2]; float lbl_1_bss_1C[2]; @@ -42,11 +42,13 @@ static BOOL TitleProc(void); void *logoReadNintendo(void); +#define M_PI 3.141592653589793 + void ModuleProlog(void) { omOvlHisData *history; OSReport("******* Boot ObjectSetup *********\n"); - objman = omInitObjMan(50, 8192); + objman[0] = omInitObjMan(50, 8192); lbl_1_bss_3C[0].x = -67; lbl_1_bss_3C[0].y = 40; lbl_1_bss_3C[0].z = 0; @@ -384,9 +386,62 @@ void fn_1_1178(void) } } -void fn_1_152C(void) -{ - +//NON_MATCHING, only one in file +void fn_1_152C(void) { + Point3d temp_f0; + Point3d temp_f0_4; + Point3d temp_f0_7; + Point3d sp8; + + f32 temp_f31; + s32 var_r30; + s8 temp_r31; + + if ((HuPadBtnDown[0] & 0x800)) { + if (lbl_1_bss_0 != 0) { + var_r30 = 0; + } else { + var_r30 = 1; + } + lbl_1_bss_0 = var_r30; + } + if (lbl_1_bss_0 != 0) { + lbl_1_bss_3C->y += 0.1f * HuPadStkX[0]; + lbl_1_bss_3C->x += 0.1f * HuPadStkY[0]; + *lbl_1_bss_1C += HuPadTrigL[0] / 2; + *lbl_1_bss_1C -= HuPadTrigR[0] / 2; + if (*lbl_1_bss_1C < 100.0f) { + *lbl_1_bss_1C = 100.0f; + } + temp_f0.x = lbl_1_bss_24->x + (*lbl_1_bss_1C * (sin((M_PI * lbl_1_bss_3C->y) / 180.0) * cos((M_PI * lbl_1_bss_3C->x) / 180.0))); + temp_f0.y = (lbl_1_bss_24->y + (*lbl_1_bss_1C * -sin((M_PI * lbl_1_bss_3C->x) / 180.0))); + temp_f0.z = (lbl_1_bss_24->z + (*lbl_1_bss_1C * (cos((M_PI * lbl_1_bss_3C->y) / 180.0) * cos((M_PI * lbl_1_bss_3C->x) / 180.0)))); + temp_f0_4.x = lbl_1_bss_24->x - temp_f0.x; + temp_f0_4.y = lbl_1_bss_24->y - temp_f0.y; + temp_f0_4.z = lbl_1_bss_24->z - temp_f0.z; + temp_f0_7.x = (sin((M_PI * lbl_1_bss_3C->y) / 180.0) * sin((M_PI * lbl_1_bss_3C->x) / 180.0)); + temp_f0_7.y = cos((M_PI * lbl_1_bss_3C->x) / 180.0); + temp_f0_7.z = (cos((M_PI * lbl_1_bss_3C->y) / 180.0) * sin((M_PI * lbl_1_bss_3C->x) / 180.0)); + temp_f31 = lbl_1_bss_3C->z; + sp8.x = ((temp_f0_7.x * ((temp_f0_4.x * temp_f0_4.x) + ((1.0f - (temp_f0_4.x * temp_f0_4.x)) * cos((M_PI * temp_f31) / 180.0)))) + temp_f0_7.y * (((temp_f0_4.x * temp_f0_4.y) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.z * sin((M_PI * temp_f31) / 180.0)) + temp_f0_7.z * (((temp_f0_4.x * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.y * sin((M_PI * temp_f31) / 180.0))); + sp8.y = ((temp_f0_7.y * ((temp_f0_4.y * temp_f0_4.y) + ((1.0f - (temp_f0_4.y * temp_f0_4.y)) * cos((M_PI * temp_f31) / 180.0)))) + temp_f0_7.x * (((temp_f0_4.x * temp_f0_4.y) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.z * sin((M_PI * temp_f31) / 180.0)) + temp_f0_7.z * (((temp_f0_4.y * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.x * sin((M_PI * temp_f31) / 180.0))); + sp8.z = ((temp_f0_7.z * (temp_f0_4.z * temp_f0_4.z + ((1.0f - (temp_f0_4.z * temp_f0_4.z)) * cos((M_PI * temp_f31) / 180.0)))) + (temp_f0_7.x * (((temp_f0_4.x * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) - temp_f0_4.y * sin((M_PI * temp_f31) / 180.0))) + temp_f0_7.y * (((temp_f0_4.y * temp_f0_4.z) * (1.0 - cos((M_PI * temp_f31) / 180.0))) + temp_f0_4.x * sin((M_PI * temp_f31) / 180.0))); + PSVECCrossProduct(&temp_f0_7, &temp_f0_4, &temp_f0_4); + PSVECNormalize(&temp_f0_4, &temp_f0_4); + temp_r31 = (HuPadSubStkX[0] & 0xF8); + if (temp_r31 != 0) { + lbl_1_bss_24->x += 0.05f * (temp_f0_4.x * temp_r31); + lbl_1_bss_24->y += 0.05f * (temp_f0_4.y * temp_r31); + lbl_1_bss_24->z += 0.05f * (temp_f0_4.z * temp_r31); + } + PSVECNormalize(&sp8, &temp_f0_4); + temp_r31 = -(HuPadSubStkY[0] & 0xF8); + if (temp_r31 != 0) { + lbl_1_bss_24->x += 0.05f * (temp_f0_4.x * temp_r31); + lbl_1_bss_24->y += 0.05f * (temp_f0_4.y * temp_r31); + lbl_1_bss_24->z += 0.05f * (temp_f0_4.z * temp_r31); + } + } } static void TitleInit(void) @@ -486,5 +541,6 @@ static BOOL TitleProc(void) HuSprAttrSet(titleGroup, 1, SPRITE_ATTR_HIDDEN); HuSprAttrSet(titleGroup, 2, SPRITE_ATTR_HIDDEN); HuSprAttrSet(titleGroup, 3, SPRITE_ATTR_HIDDEN); + fn_1_152C(); return 0; } \ No newline at end of file diff --git a/src/REL/safDll/safDll.c b/src/REL/safDll/main.c similarity index 100% rename from src/REL/safDll/safDll.c rename to src/REL/safDll/main.c diff --git a/src/REL/subchrselDll/subchrselDll.c b/src/REL/subchrselDll/main.c similarity index 98% rename from src/REL/subchrselDll/subchrselDll.c rename to src/REL/subchrselDll/main.c index 82ebe51f..eda20c61 100644 --- a/src/REL/subchrselDll/subchrselDll.c +++ b/src/REL/subchrselDll/main.c @@ -1,5 +1,6 @@ -#include "common.h" +#include "game/audio.h" #include "game/object.h" +#include "game/gamework_data.h" #include "game/printfunc.h" #include "game/pad.h" #include "game/wipe.h" diff --git a/src/REL/w03Dll/file1.c b/src/REL/w03Dll/file1.c deleted file mode 100644 index 8aeef64a..00000000 --- a/src/REL/w03Dll/file1.c +++ /dev/null @@ -1,75 +0,0 @@ -#include "common.h" -#include "dolphin.h" -#include "REL/executor.h" -#include "game/process.h" -#include "game/data.h" - -//DATA file1 -s16 lbl_1_data_280 = -1; -s16 lbl_1_data_282 = -1; -s16 lbl_1_data_284 = -1; -s16 lbl_1_data_286 = -1; -s32 lbl_1_data_288 = -1; - -//char lbl_1_data_28C[] = "%d"; - -//shouldn't use MAKE_DATA_NUM -s32 lbl_1_data_290[] = { - MAKE_DATA_NUM(0x005F, 0x0062), - MAKE_DATA_NUM(0x001A, 0x0062), - MAKE_DATA_NUM(0x006D, 0x0062), - MAKE_DATA_NUM(0x008A, 0x0062), - MAKE_DATA_NUM(0x0085, 0x0062), - MAKE_DATA_NUM(0x0011, 0x0062), - MAKE_DATA_NUM(0x000D, 0x0062), - MAKE_DATA_NUM(0x0081, 0x0062), -}; - -//shouldn't use MAKE_DATA_NUM -s32 lbl_1_data_2B0[] = { - MAKE_DATA_NUM(0x005F, 0x0033), - MAKE_DATA_NUM(0x001A, 0x0033), - MAKE_DATA_NUM(0x006D, 0x0033), - MAKE_DATA_NUM(0x008A, 0x0033), - MAKE_DATA_NUM(0x0085, 0x0033), - MAKE_DATA_NUM(0x0011, 0x0033), - MAKE_DATA_NUM(0x000D, 0x0033), - MAKE_DATA_NUM(0x0081, 0x0033), -}; - -s32 lbl_1_data_2D0[] = { - 0x125, 0x165, 0x1A5, 0x1E5, 0x225, 0x265, 0x2A5, 0x2E5 -}; - -s32 lbl_1_data_2F0[] = { - 0x12E, 0x16E, 0x1AE, 0x1EE, 0x22E, 0x26E, 0x2AE, 0x2EE -}; - -s16 lbl_1_data_310 = -1; -s16 lbl_1_data_312 = -1; -s16 lbl_1_data_314 = -1; -s16 lbl_1_data_316 = -1; - - -s32 lbl_1_data_318[] = { - MAKE_DATA_NUM(0x0077, 0x0016), - MAKE_DATA_NUM(0x0077, 0x0017), - MAKE_DATA_NUM(0x0077, 0x0018), - MAKE_DATA_NUM(0x0077, 0x0019), - MAKE_DATA_NUM(0x0077, 0x001A), - DATA_NUM_LISTEND -}; - -char lbl_1_data_330[] = "itemhook_oya"; -char lbl_1_data_33D[] = "jyanA"; -char lbl_1_data_343[] = "jyanB"; - -char* lbl_1_data_34C[] = { - &lbl_1_data_33D, &lbl_1_data_343 -}; - -char lbl_1_data_354[] = "coin"; - -char* lbl_1_data_35C[] = { - &lbl_1_data_33D, &lbl_1_data_343 -}; \ No newline at end of file diff --git a/src/REL/w03Dll/file0.c b/src/REL/w03Dll/main.c similarity index 55% rename from src/REL/w03Dll/file0.c rename to src/REL/w03Dll/main.c index 1558b9d2..697b0d50 100644 --- a/src/REL/w03Dll/file0.c +++ b/src/REL/w03Dll/main.c @@ -1,38 +1,52 @@ -#include "common.h" #include "dolphin.h" #include "REL/executor.h" #include "game/process.h" #include "game/data.h" +#include "game/gamework_data.h" +#include "REL/w03Dll.h" +#include "game/board/space.h" +#include "game/object.h" +#include "game/board/player.h" +#include "math.h" +#include "board_unsplit.h" +#include "game/hsfman.h" + +void BoardModelPosSet(s16, f32, f32, f32); +s32 BoardModelMotionStart(s16, s32, s32); void fn_8005B150(void*, void*); void fn_1_740(void); void fn_1_E0(void); +void fn_1_2930(void); +void fn_1_884(void); +void fn_1_8F0(void); +s32 fn_1_910(void); +s32 fn_1_A74(void); +void fn_1_AF8(void); +void fn_1_DEC(void); +void fn_1_10B0(void); +s32 fn_1_12C8(void); +void fn_8006DDE8(s16, f32); +void fn_1_10E4(omObjData* arg0); +extern Process *boardObjMan; typedef void (*VoidFunc)(void); extern const VoidFunc _ctors[]; extern const VoidFunc _dtors[]; -typedef struct w03StructUnk0 { -/* 0x00 */ Vec unk_00; -/* 0x0C */ Vec unk_0C; -/* 0x18 */ Vec unk_18; -/* 0x24 */ s32 datanum; -} w03StructUnk0; -typedef struct w03State { - s8 unk0; - u8 unk1; - u8 unk2; - s8 unk3; - u16 unk4; - u16 unk6; - s16 unk8; -} w03State; +f32 BoardModelMotionTimeGet(s16); +s16 BoardModelCreate(s32, void*, s32); +void BoardModelKill(s16); +void BoardModelMotionStartEndSet(s16, s32, s32); +void Hu3DFogSet(f32, f32, u8, u8, u8); +void HuAudFXListnerSetEX(Vec* arg0, Vec* arg1, float sndDist, float sndSpeed, float arg4, float arg5, float arg6); +u8 WipeStatGet(void); //DATA w03StructUnk0 lbl_1_data_0[] = { {{0.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x0004)}, -{{145.099f, 65.6173f, -2004.14f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x0005)}, -{{-2004.14f, -1148.76f, -1095.54f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x0006)}, +{{145.0988f, 65.6173f, -2004.14f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x0005)}, +{{-1548.14f, -1148.76f, -1095.54f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x0006)}, {{1050.0f, 50.0f, -1810.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x000B)}, {{-1950.0f, 50.0f, 1790.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, 0.914f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x000B)}, {{1050.0f, 0.0f, -1750.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0077, 0x000A)}, @@ -44,11 +58,11 @@ w03StructUnk0 lbl_1_data_0[] = { {{-3000.0f, 0.0f, -500.0f}, {0.0f, 0.0f, 0.0f}, {1.0f, 1.0f, 1.0f}, MAKE_DATA_NUM(0x0002, 0x000D)}, }; -s16 lbl_1_data_1E0 = 1; -s16 lbl_1_data_1E2 = 1; -s16 lbl_1_data_1E4 = 1; -s16 lbl_1_data_1E6 = 1; -s16 lbl_1_data_1E8 = 1; +s16 lbl_1_data_1E0 = -1; +s16 lbl_1_data_1E2 = -1; +s16 lbl_1_data_1E4 = -1; +s16 lbl_1_data_1E6 = -1; +s16 lbl_1_data_1E8 = -1; typedef struct w03StructUnk1 { f32 unk_00; @@ -65,12 +79,12 @@ w03StructUnk1 lbl_1_data_1EC = { 0.0f, 118.0f, 120.0f, 180.0f, 180.0f, 240.0f, 240.0f, 300.0f }; -s32 lbl_1_data_20C = { +s32 lbl_1_data_20C[] = { MAKE_DATA_NUM(0x0077, 0x001C), DATA_NUM_LISTEND }; -s32 lbl_1_data_214 = { +s32 lbl_1_data_214[] = { MAKE_DATA_NUM(0x0002, 0x000E), DATA_NUM_LISTEND }; @@ -94,35 +108,18 @@ s32 lbl_1_data_26C[] = { 0x0000044C, 0x0000043A, 0x0000043A, 0x0000044E }; +s32 pad_27C[] = {0}; + //BSS +s16 lbl_1_bss_C[14]; +s32 lbl_1_bss_8; +omObjData* lbl_1_bss_4; w03State* lbl_1_bss_0; void fn_1_CF4(void); -void fn_1_0(void) { - fn_8005B150(&fn_1_E0, &fn_1_740); -} - -int _prolog(void) { - const VoidFunc* ctors = _ctors; - while (*ctors != 0) { - (**ctors)(); - ctors++; - } - fn_8005B150(&fn_1_E0, &fn_1_740); - return 0; -} - -void _epilog(void) { - const VoidFunc* dtors = _dtors; - while (*dtors != 0) { - (**dtors)(); - dtors++; - } -} - -void fn_1_E0(void) { - Vec* var_r29; +void BoardCreate(void) { + s32* var_r29; f32 var_f30; f32 var_f31; s32 var_r31; @@ -132,62 +129,62 @@ void fn_1_E0(void) { lbl_1_bss_0 = (w03State*)&GWSystem.board_data; lbl_1_bss_0->unk3 = 0; - fn_800772EC(0x770000); - lbl_1_data_1E0 = fn_8006D9A4(0x770001, NULL, 0); + BoardSpaceInit(0x770000); + lbl_1_data_1E0 = BoardModelCreate(0x770001, NULL, 0); fn_8006DDE8(lbl_1_data_1E0, -1.0f); - fn_8006F1A8(lbl_1_data_1E0, 0.0f, 0.0f, 0.0f); - fn_8006E2B8(lbl_1_data_1E0, 0, 0x40000001); - lbl_1_data_1E8 = fn_8006D9A4(0x770003, NULL, 0); + BoardModelPosSet(lbl_1_data_1E0, 0.0f, 0.0f, 0.0f); + BoardModelMotionStart(lbl_1_data_1E0, 0, 0x40000001); + lbl_1_data_1E8 = BoardModelCreate(0x770003, NULL, 0); fn_8006DDE8(lbl_1_data_1E8, -1.0f); - fn_8006F1A8(lbl_1_data_1E8, 0.0f, 0.0f, 0.0f); - fn_8006F61C(lbl_1_data_1E8, 2); - lbl_1_data_1E2 = fn_8006D9A4(0x770002, NULL, 0); + BoardModelPosSet(lbl_1_data_1E8, 0.0f, 0.0f, 0.0f); + BoardModelLayerSet(lbl_1_data_1E8, 2); + lbl_1_data_1E2 = BoardModelCreate(0x770002, NULL, 0); fn_8006DDE8(lbl_1_data_1E2, -1.0f); - fn_8006F1A8(lbl_1_data_1E2, 0.0f, 0.0f, 0.0f); - fn_8006E2B8(lbl_1_data_1E2, 0, 0x40000001); - lbl_1_data_1E4 = fn_8006D9A4(0x77001B, &lbl_1_data_20C, 0); - fn_8006F1A8(lbl_1_data_1E4, 0.0f, 0.0f, 0.0f); - fn_8006E2B8(lbl_1_data_1E4, 1, 0x40000001); - lbl_1_data_1E6 = fn_8006D9A4(0x2000D, &lbl_1_data_214, 0); - fn_8006F1A8(lbl_1_data_1E6, 0.0f, 0.0f, 0.0f); - fn_8006E2B8(lbl_1_data_1E6, 1, 0x40000001); + BoardModelPosSet(lbl_1_data_1E2, 0.0f, 0.0f, 0.0f); + BoardModelMotionStart(lbl_1_data_1E2, 0, 0x40000001); + lbl_1_data_1E4 = BoardModelCreate(0x77001B, &lbl_1_data_20C, 0); + BoardModelPosSet(lbl_1_data_1E4, 0.0f, 0.0f, 0.0f); + BoardModelMotionStart(lbl_1_data_1E4, 1, 0x40000001); + lbl_1_data_1E6 = BoardModelCreate(0x2000D, &lbl_1_data_214, 0); + BoardModelPosSet(lbl_1_data_1E6, 0.0f, 0.0f, 0.0f); + BoardModelMotionStart(lbl_1_data_1E6, 1, 0x40000001); - for (i = 0; i < 0xC; i++) { + for (i = 0; i < 12; i++) { temp_r30 = &lbl_1_data_0[i]; if (temp_r30->datanum != -1) { if ((i == 10) || (i == 11)) { - var_r29 = &lbl_1_data_214; + var_r29 = lbl_1_data_214; } else { var_r29 = NULL; } - lbl_1_bss_C[i]= fn_8006D9A4(temp_r30->datanum, var_r29, 0); - fn_8006F158(lbl_1_bss_C[i], temp_r30); - fn_8006F220(lbl_1_bss_C[i], &temp_r30->unk_0C); - fn_8006F2E8(lbl_1_bss_C[i], &temp_r30->unk_18); - fn_8006F50C(lbl_1_bss_C[i], 1); + lbl_1_bss_C[i]= BoardModelCreate(temp_r30->datanum, var_r29, 0); + BoardModelPosSetV(lbl_1_bss_C[i], &temp_r30->unk_00); + BoardModelRotSetV(lbl_1_bss_C[i], &temp_r30->unk_0C); + BoardModelScaleSetV(lbl_1_bss_C[i], &temp_r30->unk_18); + BoardModelVisibilitySet(lbl_1_bss_C[i], 1); } } - fn_8006E2B8(lbl_1_bss_C[10], 1, 0x40000001); - fn_8006E2B8(lbl_1_bss_C[11], 1, 0x40000001); - fn_8006E2B8(lbl_1_bss_C[7], 0, 0x40000002); - fn_8006E2B8(lbl_1_bss_C[9], 0, 0x40000002); - fn_8006E2B8(lbl_1_bss_C[1], 0, 0x40000002); + BoardModelMotionStart(lbl_1_bss_C[10], 1, 0x40000001); + BoardModelMotionStart(lbl_1_bss_C[11], 1, 0x40000001); + BoardModelMotionStart(lbl_1_bss_C[7], 0, 0x40000002); + BoardModelMotionStart(lbl_1_bss_C[9], 0, 0x40000002); + BoardModelMotionStart(lbl_1_bss_C[1], 0, 0x40000002); fn_1_3058(); fn_1_6494(); fn_1_7ABC(); fn_1_9A7C(); - fn_8005D10C(&fn_1_884, &fn_1_8F0); - fn_80073FF4(&fn_1_910); - fn_80073FFC(&fn_1_A74); - fn_80074004(&fn_1_AF8); - fn_80083EDC(lbl_1_data_1E4); - fn_800A4F6C(lbl_1_data_1E6); - fn_8007A83C(lbl_1_data_1E6); - fn_80077AAC(lbl_1_data_1E6); - fn_80064D84(0x0000C000); - fn_80064D84(0x3000); + BoardLightHookSet(&fn_1_884, &fn_1_8F0); + BoardSpaceWalkEventFuncSet(&fn_1_910); + BoardSpaceWalkMiniEventFuncSet((void*)&fn_1_A74); + BoardSpaceLandEventFuncSet((void*)&fn_1_AF8); + BoardStarHostSet(lbl_1_data_1E4); + BoardBooHouseHostSet(lbl_1_data_1E6); + BoardLotteryHostSet(lbl_1_data_1E6); + BoardShopHostSet(lbl_1_data_1E6); + BoardJunctionMaskSet(0x0000C000); + BoardJunctionMaskSet(0x3000); fn_1_CF4(); - fn_8006E2B8(lbl_1_bss_C[0], 0, 0x40000001); + BoardModelMotionStart(lbl_1_bss_C[0], 0, 0x40000001); if (lbl_1_bss_0->unk0 != 0) { var_f30 = lbl_1_data_1EC.unk_10; var_f31 = lbl_1_data_1EC.unk_14; @@ -197,14 +194,14 @@ void fn_1_E0(void) { var_f31 = lbl_1_data_1EC.unk_04; fn_1_63F4(1); } - fn_8006E0B0(lbl_1_bss_C[0], var_f30, var_f31); - fn_8006E2B8(lbl_1_bss_C[2], 0, 0x40000001); - fn_8006E0B0(lbl_1_bss_C[2], 1, 0x64); + BoardModelMotionStartEndSet(lbl_1_bss_C[0], var_f30, var_f31); + BoardModelMotionStart(lbl_1_bss_C[2], 0, 0x40000001); + BoardModelMotionStartEndSet(lbl_1_bss_C[2], 1, 0x64); fn_1_785C(); if (lbl_1_bss_0->unk2 != 0) { for (i = 0; i < 4; i++) { if ((lbl_1_bss_0->unk2 & (1 << i)) != 0) { - fn_80064338(i, &fn_1_2930); + BoardPlayerPreTurnHookSet(i, &fn_1_2930); break; } } @@ -212,41 +209,38 @@ void fn_1_E0(void) { fn_1_DEC(); } -void fn_1_740(void) { +void BoardDestroy(void) { s32 i; fn_1_10B0(); fn_1_9A9C(); fn_1_7B58(); for (i = 0; i < 0x0C; i++) { - fn_8006DB90(lbl_1_bss_C[i]); + BoardModelKill(lbl_1_bss_C[i]); lbl_1_bss_C[i] = -1; } if (lbl_1_data_1E6 != -1) { - fn_8006DB90(lbl_1_data_1E6); + BoardModelKill(lbl_1_data_1E6); lbl_1_data_1E6 = -1; } if (lbl_1_data_1E4 != -1) { - fn_8006DB90(lbl_1_data_1E4); + BoardModelKill(lbl_1_data_1E4); lbl_1_data_1E4 = -1; } if (lbl_1_data_1E0 != -1) { - fn_8006DB90(lbl_1_data_1E0); + BoardModelKill(lbl_1_data_1E0); lbl_1_data_1E0 = -1; } if (lbl_1_data_1E2 != -1) { - fn_8006DB90(lbl_1_data_1E2); + BoardModelKill(lbl_1_data_1E2); lbl_1_data_1E2 = -1; } } -extern f32 lbl_1_rodata_18; -extern f32 lbl_1_rodata_1C; - void fn_1_884(void) { - s32 var = fn_8006DBD4(lbl_1_data_1E0); + s16 var = BoardModelIDGet(lbl_1_data_1E0); Hu3DModelLightInfoSet(var, 1); - Hu3DFogSet(lbl_1_rodata_18, lbl_1_rodata_1C, 0xE4U, 0xF0U, 0xFFU); + Hu3DFogSet(5000.0f, 30000.0f, 0xE4U, 0xF0U, 0xFFU); } void fn_1_8F0(void) { @@ -256,13 +250,13 @@ void fn_1_8F0(void) { s32 fn_1_910(void) { u32 temp_r3; s32 cur_player_index; - s32 unkC; + s32 space; cur_player_index = GWSystem.player_curr; - unkC = GWPlayer[cur_player_index].unkC; - temp_r3 = fn_80074138(0, unkC); + space = GWPlayer[cur_player_index].space_curr; + temp_r3 = BoardSpaceFlagGet(0, space); if (temp_r3 & 0xC000) { - if ((fn_8006413C(cur_player_index) == 2) || ((u8) (( GWPlayer[cur_player_index].placement >> 4U) & 1))) { + if ((BoardPlayerSizeGet(cur_player_index) == 2) || ((u8) (( GWPlayer[cur_player_index].bowser_suit)))) { return 0; } if (temp_r3 & 0x4000) { @@ -277,7 +271,7 @@ s32 fn_1_910(void) { return fn_1_309C(); } if (temp_r3 & 0x200) { - if ((fn_8006413C(cur_player_index) == 2) || ((u8) ((GWPlayer[cur_player_index].placement >> 4U) & 1) != 0)) { + if ((BoardPlayerSizeGet(cur_player_index) == 2) || ((u8) ((GWPlayer[cur_player_index].bowser_suit)) != 0)) { return 0; } return fn_1_675C(); @@ -285,9 +279,9 @@ s32 fn_1_910(void) { return 0; } -void fn_1_A74(void) { - s16 temp = GWPlayer[GWSystem.player_curr].unkC; - u32 var = fn_80074138(0, temp) & 0x600000; +s32 fn_1_A74(void) { + s16 space = GWPlayer[GWSystem.player_curr].space_curr; + u32 var = BoardSpaceFlagGet(0, space) & 0x600000; if (var + -0x200000 == 0) { fn_1_7BA8(); return; @@ -298,8 +292,8 @@ void fn_1_A74(void) { } void fn_1_AF8(void) { - if ((fn_8006413C(GWSystem.player_curr) == 0) && (fn_1_12C8() != 0) && (lbl_1_bss_0->unk2 != 0)) { - fn_80064D84(0xC00); + if ((BoardPlayerSizeGet(GWSystem.player_curr) == 0) && (fn_1_12C8() != 0) && (lbl_1_bss_0->unk2 != 0)) { + BoardJunctionMaskSet(0xC00); } } void fn_1_B5C(s32 arg0) { @@ -322,38 +316,38 @@ void fn_1_B5C(s32 arg0) { var_f28 = lbl_1_data_1EC.unk_04; fn_1_63F4(1); } - fn_8006E2B8(lbl_1_bss_C[0], 0, 0); - fn_8006E674(lbl_1_bss_C[0], var_f30); + BoardModelMotionStart(lbl_1_bss_C[0], 0, 0); + BoardModelMotionTimeSet(lbl_1_bss_C[0], var_f30); while (1) { - temp = fn_8006E6F8(lbl_1_bss_C[0]); + temp = BoardModelMotionTimeGet(lbl_1_bss_C[0]); if (temp >= var_f29) { break; } HuPrcVSleep(); } - fn_8006E5C4(lbl_1_bss_C[0], 0x40000001); - fn_8006E674(lbl_1_bss_C[0], var_f31); - fn_8006E0B0(lbl_1_bss_C[0], (s32) var_f31, (s32) var_f28); + BoardModelAttrSet(lbl_1_bss_C[0], 0x40000001); + BoardModelMotionTimeSet(lbl_1_bss_C[0], var_f31); + BoardModelMotionStartEndSet(lbl_1_bss_C[0], (s32) var_f31, (s32) var_f28); } void fn_1_CF4(void) { s16 var; s32 i, j; - spaceData* temp_r28; - spaceData* temp_r31; + BoardSpace* temp_r28; + BoardSpace* temp_r31; - for (i = 0; i < fn_800740B4(0); i++) { + for (i = 0; i < BoardSpaceCountGet(0); i++) { var = i + 1; - temp_r31 = fn_800740C4(0, var); - for (j = 0; j < temp_r31->num_links; j++) { - if (fn_80074138(0, temp_r31->links[j]) & 0xC00) { - temp_r28 = fn_800740C4(0, temp_r31->links[j]); + temp_r31 = BoardSpaceGet(0, var); + for (j = 0; j < temp_r31->link_cnt; j++) { + if (BoardSpaceFlagGet(0, temp_r31->link[j]) & 0xC00) { + temp_r28 = BoardSpaceGet(0, temp_r31->link[j]); if (lbl_1_bss_0->unk0 != 0) { temp_r28->flag |= 0x04000000; - fn_80064D84(0xC00); + BoardJunctionMaskSet(0xC00); } else { temp_r28->flag &= ~0x04000000; - fn_80064D94(0xC00); + BoardJunctionMaskReset(0xC00); } } } @@ -370,14 +364,14 @@ void fn_1_DEC(void) { w03UnkStruct2* temp_r29; s32 i; - temp_r3 = omAddObjEx(lbl_801D3ED4, 0x101, 0, 0, -1, &fn_1_10E4); + temp_r3 = omAddObjEx(boardObjMan, 0x101, 0, 0, -1, &fn_1_10E4); lbl_1_bss_4 = temp_r3; - temp_r29 = (w03UnkStruct2*)&temp_r3->work[0]; + temp_r29 = OM_GET_WORK_PTR(temp_r3, w03UnkStruct2); temp_r29->unk0 = 0; lbl_1_bss_8 = 0; - fn_8005D530(&sp20); - fn_8005D628(&sp14); - HuAudFXListnerSetEX(&sp20, &sp14, 1200.0f, 4800.0f, 36000.0f, 0.0f, 1200.0f); + BoardCameraPosGet(&sp20); + BoardCameraDirGet(&sp14); + HuAudFXListnerSetEX(&sp20, &sp14, 4800.0f, 36000.0f, 0.0f, 1200.0f, 1200.0f); for (i = 0; i < 4; i++) { sp8.x = lbl_1_data_22C[i].x - 3600.0f; sp8.y = lbl_1_data_22C[i].y; @@ -410,7 +404,7 @@ void fn_1_DEC(void) { void fn_1_10B0(void) { if (lbl_1_bss_4) { - ((w03UnkStruct2*)&lbl_1_bss_4->work[0])->unk0 = 1; + OM_GET_WORK_PTR(lbl_1_bss_4, w03UnkStruct2)->unk0 = 1; } } @@ -420,9 +414,9 @@ void fn_1_10E4(omObjData* arg0) { s32 i; w03UnkStruct2* temp_r29; - temp_r29 = (w03UnkStruct2*)&arg0->work[0]; - if (temp_r29->unk0 != 0 || (fn_8005B6A8() != 0)) { - for (i = 0; i < 4; i++) { + temp_r29 = OM_GET_WORK_PTR(arg0, w03UnkStruct2); + if (temp_r29->unk0 != 0 || (BoardIsKill() != 0)) { + for (i = 0; i < ARRAY_COUNT(lbl_1_data_21C); i++) { if (lbl_1_data_21C[i] != -1) { HuAudFXFadeOut(lbl_1_data_21C[i], 100); } @@ -432,8 +426,8 @@ void fn_1_10E4(omObjData* arg0) { omDelObjEx(HuPrcCurrentGet(), arg0); return; } - fn_8005D628(&sp8); - fn_8005D578(&sp14); + BoardCameraDirGet(&sp8); + BoardCameraTargetGet(&sp14); for (i = 0; i < 4; i++) { if ((WipeStatGet() != 0) || (_CheckFlag(0x1001C) != 0)) { @@ -454,4 +448,6 @@ void fn_1_10E4(omObjData* arg0) { lbl_1_bss_8 = 0; } HuAudFXListnerUpdate(&sp14, &sp8); -} \ No newline at end of file +} + +f32 const padMain = 0.0f; \ No newline at end of file diff --git a/src/REL/w03Dll/mg_item.c b/src/REL/w03Dll/mg_item.c new file mode 100644 index 00000000..99b745fe --- /dev/null +++ b/src/REL/w03Dll/mg_item.c @@ -0,0 +1,956 @@ +#include "dolphin.h" +#include "REL/executor.h" +#include "game/process.h" +#include "game/data.h" +#include "game/gamework_data.h" +#include "REL/w03Dll.h" +#include "game/board/space.h" +#include "game/object.h" +#include "game/board/player.h" +// #include "math.h" +#include "board_unsplit.h" +#include "game/hsfman.h" +#include "dolphin/os/OSFastCast.h" + +double sin(double x); +double cos(double x); +double atan2(double y, double x); + +#define OM_GET_WORK_PTR(object, type) ((type *)(&((object)->work[0]))) + +typedef struct someBits { + /* 0x00 */ struct { + u8 unk00_bit0 : 1; + u8 unk00_bit1 : 3; + u8 unk00_bit4 : 2; + u8 unk00_bit6 : 1; + u8 unk00_bit7 : 1; + }; + u8 unk1; + u8 unk2; + u8 unk3; + s16 unk4; + s16 unk_06[3]; +} someBits; + +typedef struct someBits2 { + /* 0x00 */ struct { + u8 unk00_bit0 : 1; + u8 unk00_bit1 : 3; + u8 unk00_bit4 : 2; + u8 unk00_bit6 : 1; + u8 unk00_bit7 : 1; + }; + s8 unk1; + s8 unk2; + u8 unk3[3]; + s16 unk_06[3]; +} someBits2; + +typedef struct w03UnkMG { + /* 0x00 */ char unk_00[0x10]; + /* 0x10 */ s16 unk_10; + /* 0x12 */ s16 unk_12; + /* 0x14 */ s16 unk_14; + /* 0x16 */ s16 unk_16; +} w03UnkMG; + +//external symbols +extern Process *boardMainProc; +extern s16 lbl_1_bss_C[14]; +extern Process *boardObjMan; +extern u16 HuPadBtnDown[4]; + +//function signatures +s32 BoardModelMotionShiftSet(s16, s32, f32, f32, u32); +s32 BoardVecDAngleCalcRange(float *value, float min, float range); +void BoardCameraQuakeSet(s32 duration, float strength); +s16 MGSeqCreate(s32, ...); +u8 MGSeqGetStat(s16); +void omVibrate(s16, s16, s16, s16); +void BoardPlayerMotBlendSet(s32, s32, s32); +f32 BoardPlayerRotYGet(s32); +f32 BoardModelMotionTimeGet(s16); +s32 BoardVecMinDistCheck(Vec *vec1, Vec *vec2, float min_dist); +s32 BoardModelScaleGet(s16 model, Vec *dst); +s32 BoardModelMotionTimeSet(s16 model, float time); +s32 BoardDAngleCalcRange(float *value, float min, float range); +u32 BoardRandMod(u32 value); +void BoardModelMotionStartEndSet(s16, s32, s32); +void Hu3DModelObjPosGet(s16 arg0, char *arg1, Vec *arg2); +s32 BoardModelPosGet(s16 model, Vec *dst); +s16 Hu3DMotionShiftIDGet(s16 arg0); +f32 BoardPlayerMotionTimeGet(s32); +s32 frand(void); + +void fn_1_BE30(s32 arg0, ParticleData* arg1); +void fn_1_BDAC(void); +void fn_1_BC7C(s16 arg0); +void fn_1_BBF8(void); +s32 fn_1_BBC4(void); +void fn_1_BB74(s8* arg0); +s32 fn_1_BB48(void); +void fn_1_B8E8(s32 arg0); +void fn_1_B748(omObjData* arg0, someBits2* arg1); +void fn_1_B688(omObjData* arg0, someBits2* arg1); +void fn_1_B4AC(omObjData* arg0, someBits2* arg1); +void fn_1_B350(omObjData* arg0); +void fn_1_B0A4(s32 arg0); +u32 fn_1_AF24(s32 arg0); +s32 fn_1_AE4C(s32 arg0, s8* arg1); +s32 fn_1_AE20(void); +void fn_1_ACD8(s32 arg0); +void fn_1_ABD0(omObjData* arg0, someBits* arg1); +void fn_1_AB18(omObjData* arg0, someBits* arg1); +void fn_1_A8AC(s32 arg0); +void fn_1_A7A0(s32 arg0); +void fn_1_A994(omObjData* arg0); +void fn_1_A5E0(s32 arg0); +void fn_1_A6B0(void); +void fn_1_A44C(s32 arg0); +void fn_1_9C8C(void); +void fn_1_9B30(void); +s32 fn_1_9CF4(s32 arg0); +void fn_1_9F78(void); +void fn_1_9FE4(void); + +//DATA +s16 lbl_1_data_4D8 = -1; +s16 lbl_1_data_4DA = -1; +s16 lbl_1_data_4DC = -1; +s32 lbl_1_data_4E0 = -1; +s16 lbl_1_data_4E4 = -1; +s8 lbl_1_data_4E6[] = {1, 1, 3, 3, 2, 2, 2, 1, 2, 3, 0, 4, 5, 0}; + +char itemString[] = "item"; +char item1String[] = "item1"; +char item2String[] = "item2"; + +char* lbl_1_data_508[] = { + itemString, item1String, item2String +}; + +s32 lbl_1_data_514[] = { + MAKE_DATA_NUM(7, 0x6D), + MAKE_DATA_NUM(7, 0x6E), + MAKE_DATA_NUM(7, 0x6F), + MAKE_DATA_NUM(7, 0x70), + MAKE_DATA_NUM(7, 0x71), + MAKE_DATA_NUM(7, 0x72), + MAKE_DATA_NUM(7, 0x73), + MAKE_DATA_NUM(7, 0x74), + MAKE_DATA_NUM(7, 0x76), + MAKE_DATA_NUM(7, 0x77), + MAKE_DATA_NUM(7, 0x78), + MAKE_DATA_NUM(7, 0x79), + MAKE_DATA_NUM(7, 0x7A), + MAKE_DATA_NUM(7, 0x7B), +}; + +//BSS +s8 lbl_1_bss_194[3]; +AnimData* lbl_1_bss_190; +s8 lbl_1_bss_18C; +omObjData* lbl_1_bss_188; +omObjData* lbl_1_bss_184; +Process* lbl_1_bss_180; + +void fn_1_9A7C(void) { + fn_1_BBF8(); +} + +void fn_1_9A9C(void) { + +} + +void fn_1_9AA0(void) { + BoardDiceDigit2DShowSet(0); + lbl_1_bss_180 = HuPrcChildCreate(fn_1_9C8C, 0x2003, 0x2000, 0, boardMainProc); + HuPrcDestructorSet2(lbl_1_bss_180, fn_1_9B30); + while (lbl_1_bss_180 != 0) { + HuPrcVSleep(); + } + BoardDiceDigit2DShowSet(1); +} + +void fn_1_9B30(void) { + fn_1_BDAC(); + if (lbl_1_bss_188) { + lbl_1_bss_188; + } + if (lbl_1_bss_184) { + OM_GET_WORK_PTR(lbl_1_bss_184, someBits2)->unk00_bit0 = 1; + } + if (lbl_1_data_4E0 != -1) { + HuAudFXStop(lbl_1_data_4E0); + lbl_1_data_4E0 = -1; + } + if (lbl_1_data_4DC != -1) { + BoardModelMotionKill(lbl_1_bss_C[11], lbl_1_data_4DC); + lbl_1_data_4DC = -1; + } + if (lbl_1_data_4DA != -1) { + BoardModelMotionKill(lbl_1_bss_C[11], lbl_1_data_4DA); + lbl_1_data_4DA = -1; + } + if (lbl_1_data_4D8 != -1) { + HuWinKill(lbl_1_data_4D8); + lbl_1_data_4D8 = -1; + } + lbl_1_bss_180 = 0U; +} + +void fn_1_9C8C(void) { + s32 temp_r31; + + temp_r31 = GWSystem.player_curr; + lbl_1_data_4E0 = -1; + if (fn_1_9CF4(temp_r31) != 0) { + fn_1_A44C(temp_r31); + fn_1_A5E0(temp_r31); + } + HuPrcEnd(); +} + +s32 fn_1_9CF4(s32 arg0) { + Vec sp38; + Vec sp2C; + Vec sp20; + Vec sp14; + Vec sp8; + s16 spaceCur; + s16 temp_r29; + + if (BoardPlayerItemCount(arg0) == 3) { + BoardWinCreate(2, 0x16001E, 2); + BoardWinWait(); + BoardWinKill(); + return 0; + } + BoardWinCreateChoice(2, 0x16001A, 2, 0); + if (GWPlayer[arg0].com != 0) { + BoardComKeySetLeft(); + } + BoardWinWait(); + if (BoardWinChoiceGet() != 0) { + BoardWinCreate(2, 0x16001B, 2); + BoardWinWait(); + BoardWinKill(); + return 0; + } + BoardWinKill(); + sp14.x = 0.0f; + sp14.y = 200.0f; + sp14.z = 0.0f; + sp8.x = -10.0f; + sp8.y = 0.0f; + sp8.z = 0.0f; + BoardCameraMotionStartEx(lbl_1_bss_C[8], &sp8, &sp14, 1500.0f, -1.0f, 0x15); + spaceCur = GWPlayer[arg0].space_curr; + temp_r29 = BoardSpaceLinkFlagSearch(0, spaceCur, 0x02000000); + BoardPlayerPosGet(arg0, &sp2C); + BoardSpacePosGet(0, temp_r29, &sp38); + PSVECSubtract(&sp38, &sp2C, &sp20); + PSVECNormalize(&sp20, &sp20); + BoardPlayerRotYSet(arg0, (f32) (180.0 * (atan2(-sp20.x, -sp20.z) / 3.141592653589793))); + BoardPlayerPosLerpStart(arg0, &sp2C, &sp38, 0x14); + while (GWPlayer[arg0].moving != 0) { + HuPrcVSleep(); + } + BoardRotateDiceNumbers(arg0); + HuPrcSleep(0x3C); + fn_1_B0A4(arg0); + fn_1_9F78(); + fn_1_9FE4(); + fn_1_A8AC(arg0); + return 1; +} + +void fn_1_9F78(void) { + lbl_1_data_4DA = BoardModelMotionCreate(lbl_1_bss_C[11], 0x770023); + lbl_1_data_4DC = BoardModelMotionCreate(lbl_1_bss_C[11], 0x770024); +} + +void fn_1_9FE4(void) { + Vec sp30; + Vec sp24; + Vec sp18; + Vec spC; + f32 sp8; + f32 temp_f30; + f32 var_f31; + + BoardModelPosGet(lbl_1_bss_C[11], &sp24); + sp18.x = (-3179.800048828125 + (200.0 * sin(0.0))); + sp18.z = (-907.7000122070313 + 200.0 * cos(0.0)); + sp18.y = sp24.y; + PSVECSubtract(&sp18, &sp24, &spC); + temp_f30 = (atan2(spC.z, spC.x) / 3.141592653589793 * 180.0); + sp8 = BoardModelRotYGet(lbl_1_bss_C[11]); + BoardModelMotionShiftSet(lbl_1_bss_C[11], lbl_1_data_4DA, 0.0f, 10.0, 0x40000001); + while (BoardDAngleCalcRange(&sp8, temp_f30, 10.0) == 0) { + BoardModelRotYSet(lbl_1_bss_C[11], sp8); + HuPrcVSleep(); + } + BoardModelRotYSet(lbl_1_bss_C[11], temp_f30); + BoardModelMotionSpeedSet(lbl_1_bss_C[11], 2.0f); + spC.x /= 20.0f; + spC.z /= 20.0f; + spC.y = 0.0f; + sp30 = sp24; + var_f31 = 0.0f; + while (var_f31 < 20.0f) { + PSVECAdd(&sp30, &spC, &sp30); + BoardModelPosSetV(lbl_1_bss_C[11], &sp30); + HuPrcVSleep(); + var_f31 += 1.0f; + } + BoardAudSeqPause(0, 1, 0x3E8); + HuAudFXPlay(0x450); + HuAudFXPlay(0x362); + BoardCameraQuakeSet(3, 100.0f); + fn_1_B8E8(1); + BoardModelMotionShiftSet(lbl_1_bss_C[11], lbl_1_data_4DC, 0.0f, 10.0, 0x40000005); + PSVECSubtract(&sp24, &sp30, &spC); + spC.x /= 60.0f; + spC.z /= 60.0f; + spC.y = 0.0f; + var_f31 = 0.0f; + while (var_f31 < 60.0f) { + PSVECAdd(&sp30, &spC, &sp30); + BoardModelPosSetV(lbl_1_bss_C[11], &sp30); + HuPrcVSleep(); + var_f31 += 1.0f; + } + temp_f30 = 0.0f; + sp8 = BoardModelRotYGet(lbl_1_bss_C[11]); + BoardModelMotionShiftSet(lbl_1_bss_C[11], lbl_1_data_4DA, 0.0f, 10.0, 0x40000001); + while (BoardDAngleCalcRange(&sp8, temp_f30, 10.0) == 0) { + BoardModelRotYSet(lbl_1_bss_C[11], sp8); + HuPrcVSleep(); + } + BoardModelMotionShiftSet(lbl_1_bss_C[11], 1, 0.0f, 10.0, 0x40000001); +} + +void fn_1_A44C(s32 arg0) { + s16 temp_r30; + s32 temp_r29; + s32 temp_r28; + + BoardMusStart(1, 0x17, 0x7F, 0); + temp_r30 = MGSeqCreate(3, 0U); + while (MGSeqGetStat(temp_r30) != 0) { + HuPrcVSleep(); + } + fn_1_A7A0(arg0); + fn_1_A6B0(); + fn_1_ACD8(1); + while (fn_1_AE20() != 0) { + HuPrcVSleep(); + } + temp_r29 = fn_1_BBC4() + 0x80000; + BoardWinCreate(2, 0x16001C, 2); + BoardWinInsertMesSet(temp_r29, 0); + BoardWinWait(); + fn_1_B8E8(4); + while (fn_1_BB48() != 0) { + HuPrcVSleep(); + } + omVibrate(arg0, 0xC, 6, 6); + BoardPlayerItemAdd(arg0, fn_1_BBC4()); + fn_1_ACD8(3); + temp_r28 = HuAudSStreamPlay(2); + while (HuAudSStreamStatGet(temp_r28) != 0) { + HuPrcVSleep(); + } + BoardAudSeqPause(0, 0, 0x3E8); + while (lbl_1_bss_188) { + HuPrcVSleep(); + } + HuPrcSleep(0x1E); + BoardWinCreate(2, 0x16001D, 2); + BoardWinWait(); + BoardWinKill(); +} + +void fn_1_A5E0(s32 arg0) { + Vec sp14; + Vec sp8; + s16 spaceCur; + + spaceCur = GWPlayer[arg0].space_curr; + BoardPlayerPosGet(arg0, &sp14); + BoardSpacePosGet(0, spaceCur, &sp8); + BoardCameraTargetPlayerSet(arg0); + BoardCameraViewSet(1); + BoardPlayerPosLerpStart(arg0, &sp14, &sp8, 0x14); + while (GWPlayer[arg0].moving != 0) { + HuPrcVSleep(); + } + BoardModelRotYSet(lbl_1_bss_C[11], 0.0f); + BoardCameraMotionWait(); +} + +void fn_1_A6B0(void) { + f32 sp8[2]; + f32 val1, val2; + + HuWinMesMaxSizeGet(1, sp8, 0x16001F); + val1 = -10000.0f; + val2 = 392.0f; + lbl_1_data_4D8 = HuWinCreate(val1, val2, sp8[0], sp8[1], 0); + HuWinBGTPLvlSet(lbl_1_data_4D8, 0.0f); + HuWinMesSpeedSet(lbl_1_data_4D8, 0); + HuWinMesSet(lbl_1_data_4D8, 0x16001FU); +} + +void fn_1_A7A0(s32 arg0) { + someBits* temp_r31; + omObjData* temp_r3; + + temp_r3 = omAddObjEx(boardObjMan, 0x101, 0, 0, -1, (void*)fn_1_A994); + lbl_1_bss_188 = temp_r3; + temp_r31 = (someBits*)&temp_r3->work[0]; + temp_r31->unk00_bit0 = 0; + temp_r31->unk00_bit6 = 0; + temp_r31->unk00_bit4 = arg0; + temp_r31->unk00_bit1 = 0; + temp_r31->unk1 = 5U; + temp_r31->unk2 = 0x3C; + temp_r31->unk4 = MGSeqCreate(1, temp_r31->unk1, 0x120, 0x40); + fn_1_BB74(lbl_1_bss_194); + lbl_1_bss_18C = fn_1_AE4C(arg0, lbl_1_bss_194); +} + +void fn_1_A8AC(s32 arg0) { + Vec sp14; + Vec sp8; + f32 playerYRot; + + BoardModelPosGet(lbl_1_bss_C[9], &sp8); + BoardPlayerPosGet(arg0, &sp14); + sp8.y = sp14.y; + BoardPlayerPosLerpStart(arg0, &sp14, &sp8, 0x14); + while (GWPlayer[arg0].moving != 0) { + HuPrcVSleep(); + } + playerYRot = BoardPlayerRotYGet(arg0) + 180.0f; + BoardPlayerMotBlendSet(arg0, playerYRot, 0xF); + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } +} + +void fn_1_A994(omObjData* arg0) { + s32 temp_r0; + someBits* temp_r31; + + temp_r31 = (someBits*)&lbl_1_bss_188->work[0]; + if ((temp_r31->unk00_bit0 != 0)|| (BoardIsKill() != 0)) { + if (temp_r31->unk4 != -1) { + MGSeqSetParam(temp_r31->unk4, 2, -1U); + temp_r31->unk4 = -1; + } + lbl_1_bss_188 = NULL; + + omDelObjEx(HuPrcCurrentGet(), arg0); + return; + } + if (temp_r31->unk00_bit6 == 0) { + if (temp_r31->unk2 != 0) { + temp_r31->unk2--; + } else { + if (temp_r31->unk1 != 0) { + temp_r31->unk1--; + } else { + fn_1_ACD8(2); + } + MGSeqSetParam(temp_r31->unk4, 1, temp_r31->unk1); + temp_r31->unk2 = 0x3CU; + } + } + switch (temp_r31->unk00_bit1) { + case 1: + fn_1_AB18(arg0, temp_r31); + return; + case 2: + fn_1_ABD0(arg0, temp_r31); + return; + case 3: + if (BoardPlayerMotionEndCheck(temp_r31->unk00_bit4) != 0) { + temp_r31->unk00_bit0 = 1; + } + case 0: + break; + } +} + +void fn_1_AB18(omObjData* arg0, someBits* arg1) { + u32 var_r31 = 0; + + if (GWPlayer[arg1->unk00_bit4].com != 0) { + var_r31 = fn_1_AF24(arg1->unk00_bit4); + } else { + var_r31 = HuPadBtnDown[GWPlayer[arg1->unk00_bit4].port]; + } + if (var_r31 == 0x100) { + fn_1_ACD8(2); + } +} + +//TODO properly use inlines +void fn_1_ABD0(omObjData* arg0, someBits* arg1) { + s16 boardModelID; + PlayerState* playerStateCopy; + s32 bit; + PlayerState* playerState; + s16 temp, temp2; + + bit = arg1->unk00_bit4; + playerState = &GWPlayer[bit]; + playerStateCopy = playerState; + temp = boardPlayerMdl[playerStateCopy->player_idx]; + temp2 = temp; + boardModelID = BoardModelIDGet(temp2); + + if (Hu3DMotionShiftIDGet(boardModelID) == -1) { + if (!(arg1->unk00_bit7)) { + if (BoardPlayerMotionTimeGet(arg1->unk00_bit4) >= 27.0f) { + arg1->unk00_bit7 = 1; + BoardAudSeqFadeOut(1, 0x64); + fn_1_B8E8(2); + return; + } + } + if (BoardPlayerMotionEndCheck(arg1->unk00_bit4)) { + fn_1_ACD8(0); + } + } +} + +void fn_1_ACD8(s32 arg0) { + someBits* temp_r31; + + temp_r31 = (someBits*)&lbl_1_bss_188->work[0]; + temp_r31->unk00_bit1 = arg0; + switch (arg0) { + case 0: + BoardRotateDiceNumbers(temp_r31->unk00_bit4); + return; + case 2: + temp_r31->unk00_bit6 = 1; + if (lbl_1_data_4D8 != -1) { + HuWinKill(lbl_1_data_4D8); + lbl_1_data_4D8 = -1; + } + if (temp_r31->unk4 != -1) { + MGSeqSetParam(temp_r31->unk4, 2, -1U); + temp_r31->unk4 = -1; + } + BoardPlayerMotionShiftSet(temp_r31->unk00_bit4, 0xB, 0.0f, 10.0f, 0); + return; + case 3: + BoardPlayerMotionShiftSet(temp_r31->unk00_bit4, 7, 0.0f, 10.0f, 0); + break; + } +} + +s32 fn_1_AE20(void) { + someBits* temp_r31 = (someBits*)&lbl_1_bss_188->work[0]; + return temp_r31->unk00_bit1; +} + +s32 fn_1_AE4C(s32 arg0, s8* arg1) { + s32 temp_r30; + s32 temp_r29; + s32 temp_r28; + s32 var_r31; + + temp_r29 = lbl_1_data_4E6[arg1[0]]; + temp_r28 = lbl_1_data_4E6[arg1[1]]; + temp_r30 = lbl_1_data_4E6[arg1[2]]; + if (temp_r29 > temp_r28) { + if (temp_r29 > temp_r30) { + var_r31 = 0; + } else if (temp_r30 > temp_r28) { + var_r31 = 2; + } else { + var_r31 = 1; + } + } else if (temp_r28 > temp_r30) { + var_r31 = 1; + } else if (temp_r30 > temp_r29) { + var_r31 = 2; + } else { + var_r31 = 0; + } + return var_r31; +} + +u32 fn_1_AF24(s32 arg0) { + s32 spC; + s32 sp8; + s16 temp_r31; + s16 var_r30; + s8 temp_r0_2; + + spC = 0; + switch (GWPlayer[arg0].diff) { + case 3: + var_r30 = 0; + break; + case 2: + var_r30 = 5; + break; + case 1: + var_r30 = 15; + break; + case 0: + var_r30 = 40; + break; + } + if ((var_r30 != 0) && (BoardRandMod(100) < var_r30)) { + return 0x100U; + } + + temp_r31 = BoardModelMotionTimeGet(lbl_1_bss_C[9]); + + switch (lbl_1_bss_18C) { + case 0: + if ((temp_r31 < 33) || (temp_r31 > 35)) { + break; + } + return 0x100U; + case 1: + if (((temp_r31 >= 40) && (temp_r31 <= 42)) || ((temp_r31 >= 20) && (temp_r31 <= 22))) { + return 0x100U; + } + break; + case 2: + if (temp_r31 >= 50) { + return 0x100U; + } + break; + } + return 0; +} + +void fn_1_B0A4(s32 arg0) { + Mtx sp18; + s32 spC[3]; + s32 j; + s32 i; + s32 var_r31_2; + s32 temp_r29; + someBits2* temp_r30; + omObjData* temp_r3; + + temp_r3 = omAddObjEx(boardObjMan, 0x101, 0U, 0U, -1, (void*)fn_1_B350); + lbl_1_bss_184 = (void*)temp_r3; + temp_r30 = (someBits2*)&temp_r3->work[0]; + + temp_r30->unk00_bit0 = 0; + temp_r30->unk00_bit1 = 0; + temp_r30->unk00_bit4 = arg0; + + for (i = 0; i < 3;) { + spC[i] = BoardRandMod(14); + if ((spC[i] != 10) && (spC[i] != 13)) { + for (j = 0; j < i; j++) { + if (spC[i] == spC[j]) { + spC[i] = -1; + } + } + if (spC[i] == -1) { + continue; + } + } else { + continue; + } + i++; + } + + fn_1_BBF8(); + + for (i = 0; i < 3; i++) { + temp_r29 = spC[i]; + temp_r30->unk3[i] = temp_r29; + temp_r30->unk_06[i] = BoardModelCreate(lbl_1_data_514[temp_r29], NULL, 0); + BoardModelHookSet(lbl_1_bss_C[9], lbl_1_data_508[i], temp_r30->unk_06[i]); + BoardModelMotionSpeedSet(temp_r30->unk_06[i], 0.0f); + if (temp_r29 == 0xB) { + BoardModelMotionStart(temp_r30->unk_06[i], 0, 0x40000001); + } + if (temp_r29 == 5) { + PSMTXTrans(sp18, 0.0f, -50.0f, 0.0f); + BoardModelMtxSet(temp_r30->unk_06[i], &sp18); + } + if ((temp_r29 == 6) || (temp_r29 == 7)) { + PSMTXTrans(sp18, 0.0f, 0.0f, 8.0f); + BoardModelMtxSet(temp_r30->unk_06[i], &sp18); + } + } +} + +void fn_1_B350(omObjData* arg0) { + s32 i; + someBits2* temp_r31; + + temp_r31 = (someBits2*)&arg0->work[0]; + if ((temp_r31->unk00_bit0 != 0) || (BoardIsKill() != 0)) { + BoardModelHookReset(lbl_1_bss_C[9]); + for (i = 0; i < 3; i++) { + BoardModelKill(temp_r31->unk_06[i]); + } + fn_1_BBF8(); + omDelObjEx(HuPrcCurrentGet(), arg0); + lbl_1_bss_184 = NULL; + return; + } + + switch (temp_r31->unk00_bit1) { + case 1: + if (!(BoardModelMotionTimeGet(lbl_1_bss_C[9]) < 20.0f)) { + BoardModelMotionStartEndSet(lbl_1_bss_C[9], 0x14, 0x3A); + fn_1_B8E8(0); + return; + } + case 0: + break; + case 2: + fn_1_B4AC(arg0, temp_r31); + return; + case 3: + fn_1_B688(arg0, temp_r31); + return; + case 4: + fn_1_B748(arg0, temp_r31); + break; + } +} + +void fn_1_B4AC(omObjData* arg0, someBits2* arg1) { + Point3d sp20; + Point3d sp14; + Point3d sp8; + f32 temp_f31; + s8 temp_r0; + s32 i; + + arg1->unk2 = -1; + + for (i = 0; i < 3; i++) { + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_bss_C[9]), lbl_1_data_508[i], &sp20); + BoardPlayerPosGet(arg1->unk00_bit4, &sp14); + sp14.y += 66.0f; + if (BoardVecMinDistCheck(&sp20, &sp14, 100.0f) != 0) { + sp8 = sp20; + arg1->unk2 = i; + break; + } + } + + HuAudFXPlay(0x30C); + BoardModelHookObjReset(lbl_1_bss_C[9], lbl_1_data_508[arg1->unk2]); + temp_f31 = BoardModelMotionTimeGet(lbl_1_bss_C[9]); + BoardModelMotionShiftSet(lbl_1_bss_C[9], 0, 15.0f, 10.0f, 0x40000004U); + BoardModelMotionSpeedSet(lbl_1_bss_C[9], 0.5f); + BoardModelMotionTimeSet(lbl_1_bss_C[9], temp_f31); + BoardModelPosSetV(arg1->unk_06[arg1->unk2], &sp8); + fn_1_B8E8(3); + fn_1_BC7C(arg1->unk_06[arg1->unk2]); +} + +void fn_1_B688(omObjData* arg0, someBits2* arg1) { + Point3d sp8; + + if (arg1->unk1-- != 0) { + BoardModelPosGet(arg1->unk_06[arg1->unk2], &sp8); + sp8.x = sp8.x + arg0->trans.x; + sp8.y += arg0->trans.y; + sp8.z = sp8.z + arg0->trans.z; + BoardModelPosSetV(arg1->unk_06[arg1->unk2], &sp8); + return; + } + + fn_1_B8E8(0); +} + +void fn_1_B748(omObjData* arg0, someBits2* arg1) { + Vec sp14; + Point3d sp8; + f32 temp_f0; + s16 temp_r29; + + temp_r29 = arg1->unk_06[arg1->unk2]; + + if (arg1->unk1 == 0) { + HuAudFXPlay(781); + } + + if (arg1->unk1 < 90) { + f32 temp; + temp_f0 = __OSu8tof32((u8*)&arg1->unk1); + BoardModelPosGet(temp_r29, &sp8); + sp8.y += arg0->trans.y; + BoardModelPosSetV(temp_r29, &sp8); + BoardModelRotYSet(temp_r29, 8.0f + BoardModelRotYGet(temp_r29)); + BoardModelScaleGet(temp_r29, &sp14); + sp14.x = sp14.y = sp14.z = cos(3.141592653589793 * temp_f0 / 180.0); + BoardModelScaleSetV(temp_r29, &sp14); + arg1->unk1 += 4; + return; + } + + if (lbl_1_data_4E0 != -1) { + HuAudFXStop(lbl_1_data_4E0); + lbl_1_data_4E0 = -1; + } + + fn_1_B8E8(0); +} + +void fn_1_B8E8(s32 arg0) { + Point3d sp14; + Point3d sp8; + f32 temp_f31; + someBits2* temp_r31; + f32 temp; + + temp_r31 = (someBits2*)&lbl_1_bss_184->work[0]; + temp_r31->unk00_bit1 = arg0; + switch (arg0) { + case 1: + temp_f31 = 0.31666666f; + BoardModelMotionStart(lbl_1_bss_C[9], 0, 0x40000001); + BoardModelMotionSpeedSet(lbl_1_bss_C[9], temp_f31); + BoardModelMotionTimeSet(lbl_1_bss_C[9], 8.0f); + return; + case 2: + temp_r31->unk00_bit6 = 1; + return; + case 3: + lbl_1_data_4E0 = HuAudFXPlay(0x35F); + BoardModelPosGet(temp_r31->unk_06[temp_r31->unk2], &sp8); + BoardPlayerPosGet(temp_r31->unk00_bit4, &sp14); + temp = 50.0f + sp8.y; + lbl_1_bss_184->trans.x = (sp14.x - sp8.x) / 10.0f; + lbl_1_bss_184->trans.z = (sp14.z - sp8.z) / 10.0f; + lbl_1_bss_184->trans.y = (temp - sp8.y) / 10.0f; + temp_r31->unk1 = 10; + return; + case 4: + BoardPlayerPosGet(temp_r31->unk00_bit4, &sp14); + sp14.y += 30.000002f; + BoardModelPosGet(temp_r31->unk_06[temp_r31->unk2], &sp8); + lbl_1_bss_184->trans.y = (sp14.y - sp8.y) / 22.0f; + temp_r31->unk1 = 0; + } +} + +s32 fn_1_BB48(void) { + someBits2* temp = (someBits2*)&lbl_1_bss_184->work[0]; + return temp->unk00_bit1; +} + +void fn_1_BB74(s8* arg0) { + someBits2* bits = OM_GET_WORK_PTR(lbl_1_bss_184, someBits2); + s32 i; + + for (i = 0; i < 3; i++) { + arg0[i] = bits->unk3[i]; + } +} + +s32 fn_1_BBC4(void) { + someBits2* bits = OM_GET_WORK_PTR(lbl_1_bss_184, someBits2); + return bits->unk3[bits->unk2]; +} + +void fn_1_BBF8(void) { + BoardModelMotionStart(lbl_1_bss_C[9], 0, 0); + BoardModelMotionSpeedSet(lbl_1_bss_C[9], 0.0f); + BoardModelMotionTimeSet(lbl_1_bss_C[9], 0.0f); + BoardModelAttrReset(lbl_1_bss_C[9], 0x40000004); +} + + +void fn_1_BC7C(s16 arg0) { + ParticleData* particle; + + lbl_1_bss_190 = HuSprAnimRead(HuDataSelHeapReadNum(0x120000, 0x10000000, 2)); + HuSprAnimLock(lbl_1_bss_190); + lbl_1_data_4E4 = Hu3DParticleCreate(lbl_1_bss_190, 100); + Hu3DParticleHookSet(lbl_1_data_4E4, fn_1_BE30); + Hu3DParticleColSet(lbl_1_data_4E4, 0xFF, 0xFF, 0); + Hu3DModelPosSet(lbl_1_data_4E4, 0.0f, 0.0f, 0.0f); + Hu3DParticleBlendModeSet(lbl_1_data_4E4, 1); + Hu3DModelLayerSet(lbl_1_data_4E4, 2); + particle = Hu3DData[lbl_1_data_4E4].unk_120; + particle->unk_02 = arg0; +} + +void fn_1_BDAC(void) { + if (lbl_1_data_4E4 != -1) { + Hu3DModelKill(lbl_1_data_4E4); + lbl_1_data_4E4 = -1; + } + if (lbl_1_bss_190) { + HuSprAnimKill(lbl_1_bss_190); + lbl_1_bss_190 = NULL; + } +} + +void fn_1_BE30(s32 arg0, ParticleData* arg1) { + Point3d sp8; + + f32 temp_f30; + f32 temp_f29; + f32 temp_f31; + HsfanimStruct01* var_r31; + s32 i, j; + + if (arg1->unk_34 == 0U) { + var_r31 = arg1->unk_48; + for (i = 0; i < arg1->unk_30; i++, var_r31++) { + var_r31->unk40.a = 0; + var_r31->unk2C = 0.0f; + } + arg1->unk_00 = 0; + } + + BoardModelScaleGet(arg1->unk_02, &sp8); + temp_f31 = sp8.x; + BoardModelPosGet(arg1->unk_02, &sp8); + + for (i = 0; i < 0x16; i++) { + var_r31 = arg1->unk_48; + for (j = 0; j < arg1->unk_30; j++, var_r31++) { + if (0.0f == var_r31->unk2C) { + break; + } + } + if (j != arg1->unk_30) { + temp_f30 = 360.0f * (0.003921569f * (frand() & 0xFF)); + temp_f29 = temp_f31 * (20.0f + (60.0f * (0.003921569f * (frand() & 0xFF)))); + var_r31->unk34.x = (sp8.x + (temp_f29 * sin((3.141592653589793 * temp_f30) / 180.0))); + var_r31->unk34.z = (sp8.z + (temp_f29 * cos((3.141592653589793 * temp_f30) / 180.0))); + var_r31->unk34.y = (sp8.y + (temp_f31 * (-30.0f + (40.0f * (0.003921569f * (frand() & 0xFF)))))); + var_r31->unk08.x = (0.5f + (3.0f * (0.003921569f * (frand() & 0xFF)))); + var_r31->unk08.y = (0.3f + (2.0f * (0.003921569f * (frand() & 0xFF)))); + var_r31->unk40.a = 180; + var_r31->unk2C = (15.0f * temp_f31); + } + } + var_r31 = arg1->unk_48; + + for (i = 0; i < arg1->unk_30; i++, var_r31++) { + if (0.0f != var_r31->unk2C) { + var_r31->unk34.y = (var_r31->unk34.y - var_r31->unk08.x); + var_r31->unk2C = (var_r31->unk2C - var_r31->unk08.y); + if (var_r31->unk2C <= 0.0f) { + var_r31->unk2C = 0.0f; + } + } + } +} \ No newline at end of file diff --git a/src/REL/w03Dll/river.c b/src/REL/w03Dll/river.c new file mode 100644 index 00000000..160e0a18 --- /dev/null +++ b/src/REL/w03Dll/river.c @@ -0,0 +1,477 @@ +#include "dolphin.h" +#include "game/object.h" +#include "REL/w03Dll.h" +#include "board_unsplit.h" +#include "game/board/main.h" + +double sin(double x); +double cos(double x); +double atan2(double y, double x); +s16 BoardModelIDGet(s16 model); +void Hu3DModelObjPosGet(s16 arg0, char *arg1, Vec *arg2); +void BoardPlayerMotBlendSet(s32, s32, s32); +float BoardModelMotionTimeGet(s16 model); +s32 BoardModelMotionShiftSet(s16 model, s32 motion, float time, float shift_time, u32 attr); +void BoardPlayerPosSet(s32, f32, f32, f32); +s32 BoardModelHookSet(s16 model, char *name, s16 hook); +void BoardPlayerMotionShiftSet(s32, s32, f32, f32, s32); + + +#define OM_GET_WORK_PTR(object, type) ((type *)(&((object)->work[0]))) + +extern s16 lbl_1_bss_C[14]; +extern s16 boardPlayerMdl[4]; + +char lbl_1_bss_130[8]; +omObjData* lbl_1_bss_12C; +s16 lbl_1_bss_128; +s32 lbl_1_bss_124; +Process* lbl_1_bss_120; + +//function signatures +void fn_1_67F8(void); +void fn_1_6884(void); +void fn_1_767C(omObjData* arg0); +s32 fn_1_6898(s32 arg0); +void fn_1_6B98(s32 arg0); +void fn_1_6F9C(s32 arg0); +void fn_1_767C(omObjData* arg0); +void fn_1_735C(s32 arg0); +void fn_1_77E4(s32 arg0); + +typedef struct unkWorkStruct { + struct { + u8 temp1 : 1; + }; + s8 unk_01[3]; + f32 unk_04; +} unkWorkStruct; + +//DATA +s32 lbl_1_data_368[] = { + 0x00000105, 0x00000145, 0x00000185, + 0x000001C5, 0x00000205, 0x00000245, + 0x00000285, 0x000002C5 +}; + +s16 lbl_1_data_388 = -1; +s16 lbl_1_data_38A = -1; +s16 lbl_1_data_38C = -1; +s32 lbl_1_data_390[] = { + 0x00770026, + 0x00770027, + 0x00770028, + -1 +}; + +char itemhook_RString[] = "itemhook_R"; +char hei01String[] = "hei01"; +char ikadaString[] = "ikada"; + +typedef struct unkPos { + s32 x; + s32 y; + s32 z; +} unkPos; + +unkPos lbl_1_data_3B8[6] = { + {5, 20, 5}, + {21, 35, 7}, + {31, 50, 10}, + {51, 80, 15}, + {81, 100, 17}, + {101, 999, 20}, +}; + +void fn_1_63F4(s32 arg0) { + Vec spC; + unkWorkStruct* work = OM_GET_WORK_PTR(lbl_1_bss_12C, unkWorkStruct); + +work->unk_04 = 0.0f; + BoardModelPosGet(lbl_1_data_388, &spC); + if (arg0 != 0) { + spC.y = -185.0f; + } else { + spC.y = 10.0f; + } + BoardModelPosSetV(lbl_1_data_388, &spC); +} + +void fn_1_6494(void) { + Vec sp14; + Vec sp8; + unkWorkStruct* temp_r31; + + lbl_1_data_388 = BoardModelCreate(0x77000E, NULL, 0); + lbl_1_data_38C = BoardModelCreate(0x77000F, NULL, 0); + lbl_1_data_38A = BoardModelCreate(0x2000D, &lbl_1_data_390[0], 0); + BoardModelMotionStart(lbl_1_data_38A, 1, 0x40000001); + BoardModelHookSet(lbl_1_data_38A, itemhook_RString, lbl_1_data_38C); + BoardModelHookSet(lbl_1_data_388, hei01String, lbl_1_data_38A); + + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_bss_C[0]), ikadaString, &sp14); + BoardSpaceFlagPosGet(0, 0x200, &sp8); + sp14.x = sp8.x + (400.0 * sin(-1.5707963267948966)); + sp14.z = sp8.z + (400.0 * cos(-1.5707963267948966)); + BoardModelPosSetV(lbl_1_data_388, &sp14); + lbl_1_bss_12C = omAddObjEx(boardObjMan, 0x101, 0, 0, -1, (void*)fn_1_767C); + temp_r31 = OM_GET_WORK_PTR(lbl_1_bss_12C, unkWorkStruct); + temp_r31->temp1 = 0; + temp_r31->unk_04 = 0.0f; + lbl_1_bss_124 = 0; +} + +s32 fn_1_6698(void) { + Vec sp14; + Vec sp8; + + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_bss_C[0]), ikadaString, &sp14); + BoardSpaceFlagPosGet(0, 0x200, &sp8); + sp14.x = sp8.x + (400.0 * sin(-1.5707963267948966)); + sp14.z = sp8.z + (400.0 * cos(-1.5707963267948966)); + BoardModelPosSetV(lbl_1_data_388, (Point3d* ) &sp14); + return 1; +} + +s16 fn_1_675C(void) { + BoardDiceDigit2DShowSet(0); + lbl_1_bss_120 = HuPrcChildCreate(fn_1_67F8, 0x2003, 0x2000, 0, boardMainProc); + HuPrcDestructorSet2(lbl_1_bss_120, fn_1_6884); + while ((u32) lbl_1_bss_120 != 0U) { + HuPrcVSleep(); + } + BoardDiceDigit2DShowSet(1); + return lbl_1_bss_128; +} + +void fn_1_67F8(void) { + s32 temp_r31; + + temp_r31 = GWSystem.player_curr; + lbl_1_bss_128 = 0; + if (fn_1_6898(temp_r31) != 0) { + fn_1_6F9C(temp_r31); + fn_1_6B98(temp_r31); + fn_1_735C(temp_r31); + lbl_1_bss_128 = 1; + } + BoardCameraViewSet(1); + BoardCameraMotionWait(); + HuPrcEnd(); +} + +void fn_1_6884(void) { + lbl_1_bss_120 = 0; +} + +s32 fn_1_6898(s32 arg0) { + Vec sp20; + Vec sp14; + Vec sp8; + f32 temp_f31; + s32 var_r27; + s32 temp_r3; + s32 i, j; + s32 temp, temp2; + + BoardRotateDiceNumbers(arg0); + BoardCameraViewSet(2); + BoardCameraMotionWait(); + + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_data_388), hei01String, &sp20); + BoardPlayerPosGet(arg0, &sp14); + PSVECSubtract(&sp20, &sp14, &sp8); + temp_f31 = 180.0 * (atan2(sp8.x, sp8.z) / 3.141592653589793); + BoardCameraTargetModelSet(lbl_1_data_388); + BoardPlayerMotBlendSet(arg0, temp_f31, 0xF); + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } + BoardCameraTargetModelSet(-1); + BoardWinCreate(2, 0x160009, 2); + BoardWinWait(); + temp_r3 = BoardPlayerCoinsGet(arg0); + if (temp_r3 < 5) { + BoardWinCreate(2, 0x16000A, 2); + BoardWinWait(); + BoardWinKill(); + return 0; + } + + for (var_r27 = i = 0; i < 6; i++) { + temp = lbl_1_data_3B8[i].x; + temp2 = lbl_1_data_3B8[i].y; + if (temp_r3 >= temp) { + if (temp_r3 <= temp2) { + var_r27 = lbl_1_data_3B8[i].z; + break; + } + } + } + sprintf(lbl_1_bss_130, "%d", var_r27); + j = 0; + while (j == 0) { + BoardWinCreateChoice(2, 0x16000B, 2, 0); + BoardWinInsertMesSet(lbl_1_bss_130, 2); + BoardWinAttrSet(0x10); + if (GWPlayer[arg0].com != 0) { + fn_1_77E4(arg0); + } + BoardWinWait(); + BoardWinKill(); + switch (BoardWinChoiceGet()) { + case 0: + j = 1; + break; + case 1: + case -1: + BoardWinCreate(2, 0x16000E, 2); + BoardWinWait(); + BoardWinKill(); + return 0; + default: + BoardViewMapExec(arg0); + } + } + for (i = 0; i < var_r27; i++) { + BoardPlayerCoinsAdd(arg0, -1); + HuAudFXPlay(0xE); + HuPrcSleep(6); + } + HuAudFXPlay(0xF); + BoardWinCreate(2, 0x0016000C, 2); + BoardWinWait(); + BoardWinKill(); + return 1; +} + +float BoardModelRotYGet(s16 model); +s32 BoardDAngleCalcRange(float *value, float min, float range); +float BoardModelRotYGet(s16 model); + +void fn_1_6B98(s32 arg0) { + Vec sp30; + Point3d sp24; + Vec sp18; + Point3d spC; + f32 sp8; + f32 temp_f1; + f32 temp_f31; + s16 var_r31; + s16 i; + + BoardModelMotionShiftSet(lbl_1_data_38A, 2, 0.0f, 10.0f, 0); + sp8 = BoardModelRotYGet(lbl_1_data_38A); + temp_f31 = sp8 + 180.0f; + while (BoardDAngleCalcRange(&sp8, temp_f31, 3.0f) == 0) { + BoardModelRotYSet(lbl_1_data_38A, sp8); + HuPrcVSleep(); + } + while (BoardModelMotionEndCheck(lbl_1_data_38A) == 0) { + HuPrcVSleep(); + } + BoardModelPosGet(lbl_1_data_388, &sp24); + BoardSpaceFlagPosGet(0, 0x100, &sp30); + sp18.x = sp30.x + (400.0 * sin(1.5707963267948966)); + sp18.z = sp30.z + (400.0 * cos(1.5707963267948966)); + sp18.y = sp24.y; + PSVECSubtract(&sp18, &sp24, &spC); + spC.x = spC.x / 120.0f; + spC.y /= 120.0f; + spC.z = spC.z / 120.0f; + BoardCameraTargetModelSet(lbl_1_data_388); + BoardModelMotionShiftSet(lbl_1_data_38A, 3, 0.0f, 4.0f, 0x40000001U); + HuPrcSleep(4); + var_r31 = 0; + for (i = 0; i < 0x78U; i++) { + PSVECAdd(&spC, &sp24, &sp24); + temp_f1 = BoardModelMotionTimeGet(lbl_1_data_38A); + if ((temp_f1 >= 5.0f) && (temp_f1 < 15.0f) && ((s16) var_r31 == 0)) { + HuAudFXPlay(0x451); + var_r31 = 1; + } + if ((BoardModelMotionTimeGet(lbl_1_data_38A) >= 21.0f) && ((s16) var_r31 != 0)) { + var_r31 = 0; + } + BoardModelPosSetV(lbl_1_data_388, &sp24); + HuPrcVSleep(); + } + + BoardModelPosSetV(lbl_1_data_388, &sp18); + BoardCameraTargetModelSet(-1); + BoardModelMotionShiftSet(lbl_1_data_38A, 2, 0.0f, 10.0f, 0x40000004U); + sp8 = BoardModelRotYGet(lbl_1_data_38A); + temp_f31 = 0.0f; + while (BoardDAngleCalcRange(&sp8, temp_f31, 3.0f) == 0) { + BoardModelRotYSet(lbl_1_data_38A, sp8); + HuPrcVSleep(); + } + while (BoardModelMotionEndCheck(lbl_1_data_38A) == 0) { + HuPrcVSleep(); + } + BoardModelMotionShiftSet(lbl_1_data_38A, 1, 0.0f, 10.0f, 0x40000001U); +} + +extern s32 lbl_1_data_368[]; +extern w03State* lbl_1_bss_0; + +static inline PlayerState *BoardPlayerGet(s32 player) { + return &GWPlayer[player]; +} + +static inline s16 BoardPlayerModelGet(s32 player) { + PlayerState *player_ptr = BoardPlayerGet(player); + return boardPlayerMdl[player_ptr->player_idx]; +} + +void fn_1_6F9C(s32 arg0) { + Vec sp20; + Vec sp14; + Vec sp8; + f32 var_f30; + f32 var_f29; + f32 var_f31; + s32 temp_r4; + s32 var_r30; + s16 model; + + BoardPlayerPosGet(arg0, &sp14); + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_data_388), "chara01", &sp20); + PSVECSubtract(&sp20, &sp14, &sp8); + sp8.x /= 60.0f; + sp8.z /= 60.0f; + sp8.y = 0.0f; + if (lbl_1_bss_0->unk0 != 0) { + var_f30 = 10.0f; + var_f29 = 0.21f; + sp14.y += sp20.y; + } else { + var_f30 = 0.0f; + var_f29 = 0.15f; + } + lbl_1_bss_124 = 1; + HuAudFXPlay(lbl_1_data_368[GWPlayer[arg0].character]); + BoardPlayerMotionShiftSet(arg0, 4, 0.0f, 10.0f, 0U); + for (var_r30 = 0, var_f31 = 0.0f; var_f31 < 60.0f; var_f31 += 1.0f) { + PSVECAdd(&sp14, &sp8, &sp14); + sp14.y += 10.0f + var_f30 + (var_f29 * (-0.08166667f * var_f31 * var_f31)); + if (sp14.y <= sp20.y) { + sp14.y = sp20.y; + if (var_r30 == 0) { + BoardPlayerMotionShiftSet(arg0, 5, 0.0f, 8.0f, 0U); + var_r30 = 1; + } + } + BoardPlayerPosSetV(arg0, &sp14); + HuPrcVSleep(); + } + + BoardPlayerMotionShiftSet(arg0, 5, 0.0f, 8.0f, 0U); + HuPrcSleep(10); + BoardRotateDiceNumbers(arg0); + if (GWPlayer[arg0].bowser_suit != 0) { + BoardModelHookSet(lbl_1_data_388, "chara01", BoardPlayerModelGet(arg0)); + } else { + BoardModelHookSet(lbl_1_data_388, "chara01", BoardPlayerModelGet(arg0)); + } + BoardPlayerPosSet(arg0, 0.0f, 0.0f, 0.0f); + lbl_1_bss_124 = 0; +} + +void fn_1_735C(s32 arg0) { + Vec sp20; + Vec sp14; + Point3d sp8; + f32 temp_f1; + f32 var_f30; + f32 var_f31; + s32 temp_r29; + s32 temp_r4; + s32 var_r30; + + temp_r29 = BoardSpaceFlagPosGet(0, 0x100, &sp20); + Hu3DModelObjPosGet(BoardModelIDGet(lbl_1_data_388), "chara01", &sp14); + BoardPlayerPosSetV(arg0, &sp14); + BoardModelHookObjReset(lbl_1_data_388, "chara01"); + PSVECSubtract(&sp20, &sp14, &sp8); + + sp8.x = sp8.x / 60.0f; + sp8.z = sp8.z / 60.0f; + sp8.y = 0.0f; + + HuAudFXPlay(lbl_1_data_368[GWPlayer[arg0].character]); + BoardPlayerMotionShiftSet(arg0, 4, 0.0f, 10.0f, 0U); + if (lbl_1_bss_0->unk0 != 0) { + var_f30 = 0.25f; + } else { + var_f30 = 0.2f; + } + + for (var_r30 = 0, var_f31 = 0.0f; var_f31 < 60.0f; var_f31 += 1.0f) { + PSVECAdd(&sp14, &sp8, &sp14); + sp14.y += 20.0f + (var_f30 * (-0.08166667f * var_f31 * var_f31)); + if (sp14.y <= sp20.y && var_f31 > 48.0f) { + sp14.y = sp20.y; + if (var_r30 == 0) { + BoardPlayerMotionShiftSet(arg0, 5, 0.0f, 8.0f, 0U); + var_r30 = 1; + } + } + BoardPlayerPosSetV(arg0, &sp14); + HuPrcVSleep(); + } + + BoardPlayerPosSetV(arg0, &sp20); + HuPrcSleep(0xA); + BoardPlayerMotBlendSet(arg0, 0, 0xF); + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } + BoardRotateDiceNumbers(arg0); + GWPlayer[arg0].space_curr = temp_r29; + GWPlayer[arg0].space_prev = -1; + BoardPlayerPostTurnHookSet(arg0, fn_1_6698); + BoardWinCreate(2, 0x16000D, 2); + BoardWinWait(); + BoardWinKill(); +} + + +void fn_1_767C(omObjData* arg0) { + Point3d sp8; + s32 temp_r30; + unkWorkStruct* temp_r31; + + temp_r31 = OM_GET_WORK_PTR(arg0, unkWorkStruct); + if ( (temp_r31->temp1 != 0) || (BoardIsKill() != 0)) { + lbl_1_bss_12C = NULL; + omDelObjEx(HuPrcCurrentGet(), arg0); + return; + } + if ((lbl_1_data_388 != -1) && (lbl_1_bss_124 == 0)) { + temp_r31->unk_04 += 3.0f; + if (temp_r31->unk_04 >= 360.0f) { + temp_r31->unk_04 = (f32) (temp_r31->unk_04 - 360.0f); + } + BoardModelPosGet(lbl_1_data_388, &sp8); + sp8.y = (f32) ((f64) sp8.y + (0.25 * (2.0 * sin((3.141592653589793 * (f64) temp_r31->unk_04) / 180.0)))); + BoardModelPosSetV(lbl_1_data_388, &sp8); + } +} + +void fn_1_77E4(s32 arg0) { + s32 boardIndex; + s32 var_r30 = 0; + + boardIndex = GWSystem.star_pos; + if ((boardIndex == 1) || (boardIndex == 2) || (boardIndex == 3) || (boardIndex == 4)) { + var_r30 = 1; + } + if (var_r30 != 0) { + BoardComKeySetLeft(); + return; + } + BoardComKeySetRight(); +} + +char padRiver[] = "\0\0\0\0"; \ No newline at end of file diff --git a/src/REL/w03Dll/smoke.c b/src/REL/w03Dll/smoke.c new file mode 100644 index 00000000..65a1088e --- /dev/null +++ b/src/REL/w03Dll/smoke.c @@ -0,0 +1,83 @@ +#include "dolphin.h" +#include "game/object.h" +#include "REL/w03Dll.h" +#include "board_unsplit.h" +#include "game/board/main.h" + +typedef struct w03UnkWorkStruct { + s16 unk_00[5]; + char unk_0A[2]; + f32 unk_0C; +} w03UnkWorkStruct; + +extern w03State* lbl_1_bss_0; +omObjData* lbl_1_bss_138[2]; +extern Process *boardObjMan; +extern s16 lbl_1_data_1E0; + +void fn_1_79E0(omObjData* arg0); +f32 BoardModelMotionMaxTimeGet(s16); + +char kemuri1[] = "kemuri1"; +char kemuri2[] = "kemuri2"; +char kemuri3[] = "kemuri3"; +char kemuri4[] = "kemuri4"; +char kemuri5[] = "kemuri5"; + +char* kemuri_strings[] = { + kemuri1, kemuri2, kemuri3, + kemuri4, kemuri5 +}; + +void fn_1_785C(void) { + f32 var_f31; + s32 i; + w03UnkWorkStruct* temp_r31; + char* temp_r29; + + lbl_1_bss_138[0] = omAddObjEx(boardObjMan, 0x101, 0U, 0U, -1, fn_1_79E0); + temp_r31 = (w03UnkWorkStruct*)&lbl_1_bss_138[0]->work[0]; + for (i = 0; i < 5; i++) { + temp_r31->unk_00[i] = BoardModelCreate(0x770008, NULL, 0); + temp_r29 = kemuri_strings[i]; + if (0.0f == temp_r31->unk_0C) { + temp_r31->unk_0C = BoardModelMotionMaxTimeGet(temp_r31->unk_00[i]); + } + var_f31 = temp_r31->unk_0C * BoardRandFloat(); + if (var_f31 < 1.0f) { + var_f31 = 1.0f; + } + BoardModelHookSet(lbl_1_data_1E0, temp_r29, temp_r31->unk_00[i]); + BoardModelMotionStart(temp_r31->unk_00[i], 0, 0x40000001); + BoardModelMotionTimeSet(temp_r31->unk_00[i], var_f31); + BoardModelLayerSet(temp_r31->unk_00[i], 2); + BoardModelPassSet(temp_r31->unk_00[i], 0); + } +} + +void fn_1_79E0(omObjData* arg0) { + s32 var_r29; + s32 i; + w03UnkWorkStruct* temp_r30; + + temp_r30 = (w03UnkWorkStruct*)&arg0->work[0]; + + if (BoardIsKill() != 0) { + for (i = 0; i < 5; i++) { + BoardModelKill(temp_r30->unk_00[i]); + } + lbl_1_bss_138[0] = NULL; + omDelObjEx(HuPrcCurrentGet(), arg0); + return; + } + if (lbl_1_bss_0->unk3 != 0) { + var_r29 = 0; + } else { + var_r29 = 1; + } + for (i = 0; i < 5; i++) { + BoardModelVisibilitySet(temp_r30->unk_00[i], var_r29); + } +} + +char pad[4] = "\0\0\0\0"; \ No newline at end of file diff --git a/src/REL/w03Dll/statue.c b/src/REL/w03Dll/statue.c new file mode 100644 index 00000000..511a4913 --- /dev/null +++ b/src/REL/w03Dll/statue.c @@ -0,0 +1,651 @@ +#include "dolphin.h" +#include "REL/executor.h" +#include "game/process.h" +#include "game/data.h" +#include "game/gamework_data.h" +#include "REL/w03Dll.h" +#include "game/audio.h" +#include "game/board/space.h" +#include "game/board/player.h" +#include "board_unsplit.h" +#include "game/hsfman.h" +#include "game/board/main.h" + +void fn_1_1358(void); +void fn_1_152C(void); +s32 fn_1_15E8(void); +s32 fn_1_1650(s32 arg0); +void fn_1_19DC(s32 arg0, s32 arg1); +s32 fn_1_1D1C(void); +void fn_1_1ED4(s32 arg0); +void fn_1_20E0(s32 arg0); +void fn_1_26E0(s32 arg0); +void fn_1_2AC0(void); +void fn_1_2818(void); +void fn_1_2A40(void); +void fn_1_2B44(void); +s32 BoardDAngleCalcRange(f32*, f32, f32); +s32 BoardPlayerMotBlendCheck(s32); +void BoardPlayerMotBlendSet(s32, s32, s32); +f32 BoardPlayerRotYGet(s32); +void BoardConfettiCreate(Point3d*, s16, f32); +double atan2(double y, double x); +void omVibrate(s16, s16, s16, s16); +f32 BoardModelMotionTimeGet(s16); + +//DATA +s16 lbl_1_data_280 = -1; +s16 lbl_1_data_282 = -1; +s16 lbl_1_data_284 = -1; +s16 lbl_1_data_286 = -1; +s32 lbl_1_data_288 = -1; + +char lbl_1_data_28C[] = "%d"; + +s32 lbl_1_data_290[] = { //TODO: make sure this actually uses MAKE_DATA_NUM macro + MAKE_DATA_NUM(0x5F, 0x62), + MAKE_DATA_NUM(0x1A, 0x62), + MAKE_DATA_NUM(0x6D, 0x62), + MAKE_DATA_NUM(0x8A, 0x62), + MAKE_DATA_NUM(0x85, 0x62), + MAKE_DATA_NUM(0x11, 0x62), + MAKE_DATA_NUM(0x0D, 0x62), + MAKE_DATA_NUM(0x81, 0x62), +}; + +s32 lbl_1_data_2B0[] = { //TODO: make sure this actually uses MAKE_DATA_NUM macro + MAKE_DATA_NUM(0x5F, 0x33), + MAKE_DATA_NUM(0x1A, 0x33), + MAKE_DATA_NUM(0x6D, 0x33), + MAKE_DATA_NUM(0x8A, 0x33), + MAKE_DATA_NUM(0x85, 0x33), + MAKE_DATA_NUM(0x11, 0x33), + MAKE_DATA_NUM(0x0D, 0x33), + MAKE_DATA_NUM(0x81, 0x33), +}; + +s32 lbl_1_data_2D0[] = { + 0x00000125, 0x00000165, 0x000001A5, + 0x000001E5, 0x00000225, 0x00000265, + 0x000002A5, 0x000002E5 +}; + +s32 lbl_1_data_2F0[] = { + 0x0000012E, 0x0000016E, 0x000001AE, + 0x000001EE, 0x0000022E, 0x0000026E, + 0x000002AE, 0x000002EE +}; + +//BSS Extern +extern w03State* lbl_1_bss_0; +extern Process *boardMainProc; +extern s16 lbl_1_bss_C[14]; + +//BSS +s8 lbl_1_bss_6F; +s8 lbl_1_bss_6E; +s16 lbl_1_bss_6C; +s16 lbl_1_bss_6A; +s16 lbl_1_bss_68; +GXTexObj lbl_1_bss_48; +char lbl_1_bss_44[4]; +char lbl_1_bss_38[12]; +void* lbl_1_bss_34; +f32 lbl_1_bss_30; +s8 lbl_1_bss_2C; +Process* lbl_1_bss_28; + +s32 fn_1_12C8(void) { + BoardDiceDigit2DShowSet(0); + lbl_1_bss_28 = HuPrcChildCreate(&fn_1_1358, 0x2003, 0x2000, 0, boardMainProc); + HuPrcDestructorSet2(lbl_1_bss_28, &fn_1_152C); + + while (lbl_1_bss_28) { + HuPrcVSleep(); + } + return BoardDiceDigit2DShowSet(1); +} + +void fn_1_1358(void) { + s32 cur_player_index; + s32 unkC; + + cur_player_index = GWSystem.player_curr; + unkC = GWPlayer[cur_player_index].space_curr; + lbl_1_bss_2C = 0; + if ((BoardSpaceFlagGet(0, GWPlayer[cur_player_index].space_curr) & 0x2000)) { + lbl_1_bss_6E = 0; + lbl_1_bss_6C = lbl_1_bss_C[3]; + } else { + lbl_1_bss_6E = 1; + lbl_1_bss_6C = lbl_1_bss_C[4]; + } + if (fn_1_1650(cur_player_index) != 0) { + if (fn_1_1D1C() != 0) { + fn_1_1ED4(cur_player_index); + } else { + fn_1_20E0(cur_player_index); + } + if (lbl_1_bss_2C) { + sprintf(lbl_1_bss_44, lbl_1_data_28C, lbl_1_bss_2C); + BoardWinCreate(0, 0x160006, -1); + BoardWinInsertMesSet((s32)lbl_1_bss_44, 0); + BoardWinWait(); + BoardWinKill(); + lbl_1_bss_0->unk2 = 1 << cur_player_index; + lbl_1_bss_0->unk0 = lbl_1_bss_2C; + fn_1_CF4(); + } + fn_1_26E0(cur_player_index); + BoardStatusShowSetAll(1); + } + BoardPlayerPostTurnHookSet(cur_player_index, &fn_1_15E8); + BoardWinKill(); + HuPrcEnd(); +} + +void fn_1_152C(void) { + BoardConfettiKill(); + if (lbl_1_data_282 != -1) { + BoardPlayerMotionKill(GWSystem.player_curr, lbl_1_data_282); + lbl_1_data_282 = -1; + } + if (lbl_1_data_280 != -1) { + BoardPlayerMotionKill(GWSystem.player_curr, lbl_1_data_280); + lbl_1_data_280 = -1; + } + fn_1_2AC0(); + lbl_1_bss_28 = NULL; +} + +s32 fn_1_15E8(void) { + BoardModelVisibilitySet(lbl_1_bss_6C, 1); + if (lbl_1_data_284 != -1) { + BoardModelKill(lbl_1_data_284); + lbl_1_data_284 = -1; + } + return 1; +} + +s32 fn_1_1650(s32 arg0) { + Point3d sp38; + Point3d sp2C; + Point3d sp20; + Point3d sp14; + Point3d sp8; + f32 temp; + s32 temp2; + + BoardRotateDiceNumbers(arg0); + + if (lbl_1_bss_0->unk2) { + BoardWinCreate(0, 0x160000, -1); + BoardWinWait(); + BoardWinKill(); + return 0; + } + + temp2 = BoardSpaceLinkFlagSearch(0, GWPlayer[arg0].space_curr, 0x02000000); + BoardSpacePosGet(0, temp2, &sp38); + BoardPlayerPosGet(arg0, &sp2C); + PSVECSubtract(&sp38, &sp2C, &sp20); + temp = (atan2(-sp20.x, -sp20.z) / 3.141592653589793) * 180.0f; + BoardPlayerRotYSet(arg0, temp); + sp14.x = 0.0f; + sp14.y = 100.0f; + sp14.z = 0.0f; + sp8.x = -20.0f; + sp8.y = 0.0f; + sp8.z = 0.0f; + BoardCameraMotionStartEx(lbl_1_bss_6C, &sp8, &sp14, 1360.0f, -1.0f, 0x15); + BoardPlayerPosLerpStart(arg0, &sp2C, &sp38, 0x28); + + while (GWPlayer[arg0].moving) { + HuPrcVSleep(); + } + + BoardStatusShowSetAll(0); + BoardPlayerMotBlendSet(arg0, 0xB4, 0xF); + + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } + + BoardRotateDiceNumbers(arg0); + BoardWinCreate(2, 0x160001, 2); + BoardWinWait(); + BoardWinCreateChoice(0, 0x160002, -1, 0); + BoardWinAttrSet(0x10); + if (GWPlayer[arg0].com) { + if (BoardRandMod(0x64) > 0x32U) { + BoardComKeySetLeft(); + } else { + BoardComKeySetRight(); + } + } + BoardWinWait(); + lbl_1_bss_6F = BoardWinChoiceGet(); + BoardWinKill(); + fn_1_19DC(arg0, lbl_1_bss_6F); + BoardFilterFadeInit(0x1E, 0xA0); + BoardMusStart(1, 0x19, 0x7F, 0); + HuAudFXPlay(0x435); + sp8.y = BoardModelRotYGet(lbl_1_bss_6C); + + while (BoardDAngleCalcRange(&sp8.y, 180.0f, 2.0f) == 0) { + BoardModelRotYSet(lbl_1_bss_6C, sp8.y); + HuPrcVSleep(); + } + + HuAudFXPlay(0x445); + BoardModelRotYSet(lbl_1_bss_6C, 180.0f); + + while (BoardMusStatusGet(1) != 0) { + HuPrcVSleep(); + } + return 1; +} + +void fn_1_19DC(s32 arg0, s32 arg1) { + s32 temp_r30; + s32 temp_r5; + s32 temp_r5_2; + s32 var_r29; + f32 temp; + + temp_r30 = GWPlayer[arg0].character; + if (arg1 != 0) { + lbl_1_data_282 = BoardPlayerMotionCreate(arg0, lbl_1_data_2B0[temp_r30]); + lbl_1_bss_6A = 8; + lbl_1_bss_68 = lbl_1_data_282; + var_r29 = lbl_1_data_2F0[GWPlayer[arg0].character]; + } else { + lbl_1_bss_6A = 7; + lbl_1_bss_68 = 1; + var_r29 = lbl_1_data_2D0[GWPlayer[arg0].character]; + } + lbl_1_data_280 = BoardPlayerMotionCreate(arg0, lbl_1_data_290[temp_r30]); + temp = (180.0f + BoardPlayerRotYGet(arg0)); + BoardPlayerMotBlendSet(arg0, temp, 0xF); + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } + HuAudFXPlay(var_r29); + BoardPlayerVoiceEnableSet(arg0, lbl_1_bss_6A, 0); + BoardPlayerMotionShiftSet(arg0, lbl_1_bss_6A, 0.0f, 8.0f, 0); + HuPrcSleep(9); + + while (BoardPlayerMotionEndCheck(arg0) == 0) { + HuPrcVSleep(); + + } + HuPrcSleep(0x3C); + + if (arg1 != 0) { + BoardPlayerMotionShiftSet(arg0, lbl_1_bss_68, 0.0f, 8.0f, 0); + HuPrcSleep(9); + while (BoardPlayerMotionEndCheck(arg0) == 0) { + HuPrcVSleep(); + } + } + BoardRotateDiceNumbers(arg0); + HuPrcSleep(0x14); + temp = (180.0f + BoardPlayerRotYGet(arg0)); + BoardPlayerMotBlendSet(arg0, temp, 0xF); + while (BoardPlayerMotBlendCheck(arg0) == 0) { + HuPrcVSleep(); + } + BoardAudSeqPause(0, 1, 0x3E8); + BoardPlayerMotionShiftSet(arg0, lbl_1_data_280, 0.0f, 10.0f, 0); + HuPrcSleep(0xB); + while (BoardPlayerMotionEndCheck(arg0) == 0) { + HuPrcVSleep(); + } +} + +s32 fn_1_1D1C(void) { + s32 sp34; + s32 sp30; + s32 sp2C; + s32 sp28; + s32 sp24; + s32 sp20; + s32 modRand2; + s32 var_r31; + s32 temp2; + s32 modRand; + s32 prevTurn; + s32 maxTurn; + + s32 sp8[3] = { 70, 50, 45 }; + s32 sp14[3][3] = { + {3, 5, 22}, + {5, 10, 35}, + {5, 15, 35} + }; + + while (BoardMusStatusGet(1) != 0) { + HuPrcVSleep(); + } + BoardWinCreate(2, 0x160003, 2); + BoardWinWait(); + BoardWinKill(); + prevTurn = GWSystem.turn - 1; + maxTurn = GWSystem.max_turn; + var_r31 = prevTurn / (maxTurn / 3); + if (var_r31 >= 3) { + var_r31 = 2; + } + modRand = BoardRandMod(100); + if (modRand < sp8[var_r31] ) { + return 1; + } + modRand2 = BoardRandMod(100 - sp8[var_r31]); + if (modRand2 < sp14[var_r31][0]) { + lbl_1_bss_2C = 3; + } else if (modRand2 < sp14[var_r31][1]) { + lbl_1_bss_2C = 2; + } else { + lbl_1_bss_2C = 1; + } + return 0; +} + +void fn_1_1ED4(s32 arg0) { + Point3d spC; + f32 sp8; + + lbl_1_data_284 = BoardModelCreate(0x77000C, NULL, 0); + BoardModelVisibilitySet(lbl_1_data_284, 0); + BoardModelVisibilitySet(lbl_1_bss_6C, 0); + BoardModelPosGet(lbl_1_bss_6C, &spC); + BoardModelVisibilitySet(lbl_1_data_284, 1); + BoardModelPosSetV(lbl_1_data_284, &spC); + BoardFilterFadeOut(0x1E); + BoardPlayerPosGet(arg0, &spC); + spC.y += 700.0f; + BoardConfettiCreate(&spC, 0x64, 300.0f); + sp8 = BoardModelRotYGet(lbl_1_bss_6C); + + while (BoardDAngleCalcRange(&sp8, 0.0f, 30.0f) == 0) { + BoardModelRotYSet(lbl_1_data_284, sp8); + HuPrcVSleep(); + } + + omVibrate(arg0, 0xC, 4, 2); + BoardMusStart(1, 0x1A, 0x7F, 0); + BoardModelRotYSet(lbl_1_data_284, 0.0f); + BoardModelRotYSet(lbl_1_bss_6C, 0.0f); + + while (BoardFilterFadePauseCheck() == 0) { + HuPrcVSleep(); + } + BoardRotateDiceNumbers(arg0); + + while (BoardMusStatusGet(1) != 0) { + HuPrcVSleep(); + } + BoardAudSeqPause(0, 0, 1000); + BoardWinCreate(2, 0x160004, 2); + BoardWinWait(); + BoardWinKill(); + BoardConfettiStop(); +} + +void fn_1_20E0(s32 arg0) { + Point3d sp24; + Point3d sp18; + Point3d spC; + f32 sp8; + f32 var_f31; + s32 i; + + lbl_1_data_284 = BoardModelCreate(0x77000D, NULL, 0); + BoardModelVisibilitySet(lbl_1_data_284, 0); + BoardModelVisibilitySet(lbl_1_bss_6C, 0); + BoardModelPosGet(lbl_1_bss_6C, &spC); + BoardModelVisibilitySet(lbl_1_data_284, 1); + BoardModelPosSetV(lbl_1_data_284, &spC); + BoardFilterFadeOut(0x1E); + sp8 = BoardModelRotYGet(lbl_1_bss_6C); + while (BoardDAngleCalcRange(&sp8, 0.0f, 30.0f) == 0) { + BoardModelRotYSet(lbl_1_data_284, sp8); + HuPrcVSleep(); + } + omVibrate(arg0, 0xC, 4, 2); + BoardModelRotYSet(lbl_1_data_284, 0.0f); + BoardModelRotYSet(lbl_1_bss_6C, 0.0f); + + while (BoardFilterFadePauseCheck() == 0) { + HuPrcVSleep(); + } + + BoardMusStart(1, 0x1B, 0x7F, 0); + HuAudFXPlay(0x44A); + fn_1_2A40(); + lbl_1_bss_30 = 0.0f; + + while (lbl_1_bss_30 < 128.0f) { + HuPrcVSleep(); + lbl_1_bss_30 += 12.0f; + } + + if (lbl_1_bss_30 > 128.0f) { + lbl_1_bss_30 = 128.0f; + } + HuPrcSleep(0x28); + lbl_1_bss_30 = 128.0f; + + while (lbl_1_bss_30 > 0.0f) { + HuPrcVSleep(); + lbl_1_bss_30 -= 12.0f; + } + if (lbl_1_bss_30 < 0.0f) { + lbl_1_bss_30 = 0.0f; + } + fn_1_2AC0(); + + for (i = 0; i < 3; i++) { + BoardCameraMotionStartEx(-1, NULL, 0, 680.0f, -1.0f, 0xD); + BoardCameraMotionWait(); + BoardCameraMotionStartEx(-1, NULL, 0, 1360.0f, -1.0f, 0xD); + BoardCameraMotionWait(); + } + + BoardRotateDiceNumbers(arg0); + while (BoardMusStatusGet(1) != 0) { + HuPrcVSleep(); + } + + BoardAudSeqPause(0, 0, 1000); + BoardWinCreate(2, 0x160005, 2); + BoardWinWait(); + BoardCameraQuakeSet(0x8CA0, 100.0f); + omVibrate(arg0, 0xE10, 4, 2); + lbl_1_data_288 = HuAudFXPlay(0x436); + BoardCameraViewSet(1); + HuPrcSleep(0x3C); + BoardCameraMotionWait(); + sp24.x = 0.0f; + sp24.y = 100.0f; + sp24.z = 0.0f; + sp18.x = -20.0f; + sp18.y = 0.0f; + sp18.z = 0.0f; + BoardCameraMotionStartEx(lbl_1_bss_C[1], &sp18, &sp24, 3000.0f, -1.0f, 0x3C); + BoardCameraMotionWait(); + omVibrate(arg0, 0x1E, 6, 6); + HuPrcSleep(0x1E); + + for (var_f31 = 100.0f; var_f31 > 0.0f; var_f31 -= 2.0f) { + BoardCameraQuakeSet(0xA, var_f31); + HuPrcVSleep(); + } + + BoardCameraQuakeReset(); + if (lbl_1_data_288 != 0) { + HuAudFXStop(lbl_1_data_288); + lbl_1_data_288 = -1; + } + + fn_1_2818(); + omVibrate(arg0, 0xC, 0xC, 0); + HuAudFXPlay(0x438); + fn_1_B5C(1); + HuPrcSleep(0x3C); + sp24.x = 0.0f; + sp24.y = 100.0f; + sp24.z = 0.0f; + sp18.x = -20.0f; + sp18.y = 0.0f; + sp18.z = 0.0f; + BoardCameraMotionStartEx(lbl_1_bss_6C, &sp18, &sp24, 1360.0f, -1.0f, 0x3C); + BoardCameraMotionWait(); + HuPrcSleep(0x3C); +} + +void fn_1_26E0(s32 arg0) { + Point3d sp20; + Point3d sp14; + Point3d sp8; + f32 temp; + + BoardSpacePosGet(0, GWPlayer[arg0].space_curr, &sp20); + BoardPlayerPosGet(arg0, &sp14); + PSVECSubtract(&sp20, &sp14, &sp8); + PSVECNormalize(&sp8, &sp8); + temp = (180.0f * (atan2(-sp8.x, -sp8.z) / 3.141592653589793)); + BoardPlayerRotYSet(arg0, temp); + BoardCameraViewSet(1); + BoardCameraTargetPlayerSet(arg0); + BoardPlayerPosLerpStart(arg0, &sp14, &sp20, 0x28); + while (GWPlayer[arg0].moving != 0) { + HuPrcVSleep(); + } + BoardCameraMotionWait(); + BoardModelMotionStart(lbl_1_bss_C[1], 0, 0); + BoardRotateDiceNumbers(arg0); +} + +void fn_1_2818(void) { + s16 temp_r29; + s16 temp_r30; + s16 j; + s16 sp8[3] = {0x0002, 0x003E, 0x007A}; + + temp_r29 = (4 - lbl_1_bss_2C) * 0x3C; + BoardModelMotionStart(lbl_1_bss_C[1], 0, 0); + while (1) { + temp_r30 = BoardModelMotionTimeGet(lbl_1_bss_C[1]); + if (temp_r29 > temp_r30) { + for (j = 0; j < ARRAY_COUNT(sp8); j++) { + if (temp_r30 == sp8[j]) { + HuAudFXPlay(0x446); + } + } + HuPrcVSleep(); + } else { + break; + } + } + + BoardModelAttrSet(lbl_1_bss_C[1], 0x40000002); + HuPrcSleep(0x3C); +} + +s32 fn_1_2930(s32 arg0) { + lbl_1_bss_0->unk0--; + if (lbl_1_bss_0->unk0 <= 0) { + lbl_1_bss_0->unk2 = 0; + lbl_1_bss_0->unk0 = 0; + fn_1_B5C(0); + BoardWinCreate(0, 0x160008, -1); + BoardWinWait(); + BoardWinKill(); + fn_1_CF4(); + return 1; + } + sprintf(lbl_1_bss_38, lbl_1_data_28C, lbl_1_bss_0->unk0); + BoardWinCreate(0, 0x160007, -1); + BoardWinInsertMesSet((s32)lbl_1_bss_38, 1); + BoardWinWait(); + BoardWinKill(); + fn_1_CF4(); + return 0; +} + +void fn_1_2A40(void) { + lbl_1_bss_30 = 0.0f; + lbl_1_bss_34 = HuMemDirectMallocNum(HEAP_SYSTEM, 0x96000, 0x10000000U); + lbl_1_data_286 = Hu3DHookFuncCreate((void*)&fn_1_2B44); + Hu3DModelLayerSet(lbl_1_data_286, 3); +} + +void fn_1_2AC0(void) { + if (lbl_1_bss_34) { + HuMemDirectFree(lbl_1_bss_34); + lbl_1_bss_34 = NULL; + } + if (lbl_1_data_286 != -1) { + Hu3DModelKill(lbl_1_data_286); + lbl_1_data_286 = -1; + } +} + +void fn_1_2B44(void) { + Mtx44 sp50; + Mtx sp20; + GXColor sp14; + GXColor sp10; + GXColor spC; + u8 sp8; + GXColor sp1C = {0xFF, 0xFF, 0xFF, 0xFF}; + GXColor sp18 = {0xFF, 0xFF, 0xFF, 0xFF}; + + f32 temp_f28 = 0.0f; + f32 temp_f30 = 640.0f; + f32 temp_f27 = 0.0f; + f32 temp_f29 = 480.0f; + + sp18.a = __OSf32tou8(lbl_1_bss_30); + GXInvalidateTexAll(); + GXLoadTexObj(&lbl_1_bss_48, GX_TEXMAP0); + C_MTXOrtho(sp50, temp_f27, temp_f29, temp_f28, temp_f30, 0.0f, 10.0f); + GXSetProjection(sp50, GX_ORTHOGRAPHIC); + PSMTXIdentity(sp20); + GXLoadPosMtxImm(sp20, 0); + GXSetCurrentMtx(0); + GXSetViewport(0.0f, 0.0f, temp_f30, 1.0f + temp_f29, 0.0f, 1.0f); + GXSetScissor(0, 0, temp_f30, (1.0f + temp_f29)); + GXClearVtxDesc(); + GXSetNumTexGens(0); + GXSetNumTevStages(1); + GXSetNumChans(1); + GXSetTevOp(GX_TEVSTAGE0, GX_PASSCLR); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0); + GXSetChanCtrl(GX_COLOR0, 1, GX_SRC_REG, GX_SRC_REG, 1, GX_DF_CLAMP, GX_AF_NONE); + GXSetChanCtrl(GX_ALPHA0, 0, GX_SRC_REG, GX_SRC_REG, 1, GX_DF_NONE, GX_AF_NONE); + GXSetChanAmbColor(GX_COLOR0A0, sp18); + GXSetChanMatColor(GX_COLOR0A0, sp18); + GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1); + GXSetBlendMode(GX_BM_BLEND, GX_BL_INVDSTCLR, GX_BL_SRCALPHA, GX_LO_NOOP); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_TEX_S, GX_RGBX8, 0); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_RGBA6, 0); + GXSetZMode(1, GX_LEQUAL, 0); + GXSetAlphaUpdate(1); + GXSetColorUpdate(1); + GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXPosition2u16(temp_f28, temp_f27); + GXPosition2f32(0.0f, 0.0f); + GXPosition2u16(temp_f30, temp_f27); + GXPosition2f32(1.0f, 0.0f); + GXPosition2u16(temp_f30, temp_f29); + GXPosition2f32(1.0f, 1.0f); + GXPosition2u16(temp_f28, temp_f29); + GXPosition2f32(0.0f, 1.0f); + GXSetChanMatColor(GX_COLOR0A0, sp1C); +} + +f32 const padStatue = 0.0f; \ No newline at end of file diff --git a/src/REL/w10Dll/host.c b/src/REL/w10Dll/host.c index 68edcfbb..4ef6f9b8 100644 --- a/src/REL/w10Dll/host.c +++ b/src/REL/w10Dll/host.c @@ -56,7 +56,7 @@ void fn_1_C20(void) { BoardModelPosSetV(lbl_1_bss_1E, &sp14); BoardCameraRotGet(&sp8); PSMTXRotRad(sp20, 'y', 0.2617994f); - BoardModelMtxSet(lbl_1_bss_1E, sp20); + BoardModelMtxSet(lbl_1_bss_1E, &sp20); BoardModelRotSet(lbl_1_bss_1E, sp8.x, 0.0f, 0.0f); BoardModelScaleSet(lbl_1_bss_1E, 0.2f, 0.2f, 0.2f); HuPrcVSleep(); diff --git a/src/REL/w10Dll/main.c b/src/REL/w10Dll/main.c index 4e517f0d..a447042d 100644 --- a/src/REL/w10Dll/main.c +++ b/src/REL/w10Dll/main.c @@ -124,13 +124,13 @@ void BoardCreate(void) { BoardModelVisibilitySet(lbl_1_bss_10[0], 0); lbl_1_bss_0->unk8 = BoardModelCreate(0x7000A, NULL, 0); BoardModelVisibilitySet(lbl_1_bss_0->unk8, 0); - BoardSpaceWalkEventFuncSet(&fn_1_90C); - BoardSpaceWalkMiniEventFuncSet(&fn_1_91C); - BoardSpaceLandEventFuncSet(&fn_1_908); - fn_80083EDC(lbl_1_data_2C); - fn_800A4F6C(lbl_1_data_32); - fn_80077AAC(lbl_1_data_2E); - fn_8007A83C(lbl_1_data_30); + BoardSpaceWalkEventFuncSet((void*)&fn_1_90C); + BoardSpaceWalkMiniEventFuncSet((void*)&fn_1_91C); + BoardSpaceLandEventFuncSet((void*)&fn_1_908); + BoardStarHostSet(lbl_1_data_2C); + BoardBooHouseHostSet(lbl_1_data_32); + BoardShopHostSet(lbl_1_data_2E); + BoardLotteryHostSet(lbl_1_data_30); HuWinMesMaxSizeGet(1, spC, 0x2E003A); lbl_1_bss_E = HuWinCreate(-10000.0f, 390.0f, spC[0], spC[1], 1); HuWinMesSet(lbl_1_bss_E, 0x2E003A); diff --git a/src/REL/w10Dll/scene.c b/src/REL/w10Dll/scene.c index 43b09f0a..420a5450 100644 --- a/src/REL/w10Dll/scene.c +++ b/src/REL/w10Dll/scene.c @@ -107,7 +107,7 @@ void fn_1_1134(void) { fn_1_1E3C(7, 0x122, 0x8C); fn_1_BA0(0x2E0017); fn_1_1FB0(); - fn_80082AAC(1); + BoardCharWheelSetTarget(1); } void fn_1_1178(void) { @@ -176,7 +176,7 @@ void fn_1_13A4(void) { for (i = 0; i < 4; i++) { GWPlayer[i].color = 1; } - fn_800A4C88(); + BoardMGSetupTutorialExec(); BoardStatusShowSetAll(0); fn_1_C10(0); fn_1_BA0(0x2E002B); @@ -188,7 +188,7 @@ void fn_1_13A4(void) { BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); fn_1_BA0(0x2E002C); - fn_8007A360(temp_r3_2); + BoardShopTutorialExec(temp_r3_2); BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); temp_r3_2 = BoardSpaceFlagSearch(0, 0x10000000); @@ -197,7 +197,7 @@ void fn_1_13A4(void) { BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); fn_1_BA0(0x2E002E); - fn_8007F894(); + BoardLotteryTutorialExec(); BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); temp_r3_2 = BoardSpaceFlagSearch(0, 0x08000000); @@ -206,7 +206,7 @@ void fn_1_13A4(void) { BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); fn_1_BA0(0x2E0030); - fn_800A6B10(); + BoardBooHouseTutorialExec(); BoardCameraMotionStartEx(lbl_1_bss_0->unk8, &sp8, NULL, 3200.0f, -1.0f, 30); BoardCameraMotionWait(); fn_1_BA0(0x2E0032); @@ -227,7 +227,7 @@ void fn_1_13A4(void) { fn_1_BA0(0x2E0039); if (lbl_1_bss_C == 0) { lbl_1_bss_C = 1; - fn_80070EE8(0, 0x1F3); + BoardAudSeqFadeOut(0, 0x1F3); BoardKill(); } BoardTutorialHookSet(NULL); diff --git a/src/REL/w10Dll/tutorial.c b/src/REL/w10Dll/tutorial.c index 9e13732c..2425dadf 100644 --- a/src/REL/w10Dll/tutorial.c +++ b/src/REL/w10Dll/tutorial.c @@ -1,4 +1,5 @@ #include "REL/w10Dll.h" +#include "game/esprite.h" #include "game/pad.h" #include "game/data.h" #include "game/wipe.h" @@ -152,7 +153,7 @@ void fn_1_1984(void) { if (i != 4) { lbl_1_bss_C = 1; OSReport(lbl_1_data_98); - fn_80070EE8(0, 0x1F3); + BoardAudSeqFadeOut(0, 0x1F3); BoardKill(); BoardTutorialHookSet(NULL); } @@ -181,7 +182,7 @@ int fn_1_1AAC(s16 arg0, s32 arg1) { if (i != 4) { lbl_1_bss_C = 1; OSReport(lbl_1_data_98); - fn_80070EE8(0, 0x1F3); + BoardAudSeqFadeOut(0, 0x1F3); BoardKill(); BoardTutorialHookSet(NULL); } @@ -197,7 +198,7 @@ int fn_1_1AAC(s16 arg0, s32 arg1) { lbl_1_bss_0->unk0, arg0, arg1, lbl_1_bss_0->unk4, lbl_1_bss_0->unk6); if (lbl_1_data_108[lbl_1_bss_0->unk0].unk0 != -1) { if (arg0 == 5) { - fn_8008831C(&lbl_1_data_C6[lbl_1_bss_0->unk4++]); + BoardRollTutorialSet(&lbl_1_data_C6[lbl_1_bss_0->unk4++]); } if (arg0 == lbl_1_data_108[lbl_1_bss_0->unk0].unk0) { void (*temp_r3_3)() = lbl_1_data_108[lbl_1_bss_0->unk0++].unk4; diff --git a/src/game/ClusterExec.c b/src/game/ClusterExec.c new file mode 100644 index 00000000..f1494664 --- /dev/null +++ b/src/game/ClusterExec.c @@ -0,0 +1,174 @@ +#include "game/ClusterExec.h" +#include "game/EnvelopeExec.h" +#include "game/hsfmotion.h" + +float GetClusterCurve(HsfTrack *arg0, float arg1) { + float *var_r30; + + switch (arg0->curveType) { + case 1: + return GetLinear(arg0->numKeyframes, arg0->data, arg1); + case 2: + return GetBezier(arg0->numKeyframes, arg0, arg1); + case 4: + var_r30 = &arg0->value; + return *var_r30; + } + return 0.0f; +} + +float GetClusterWeightCurve(HsfTrack *arg0, float arg1) { + float *var_r30; + + switch (arg0->curveType) { + case 1: + return GetLinear(arg0->numKeyframes, arg0->data, arg1); + case 2: + return GetBezier(arg0->numKeyframes, arg0, arg1); + case 4: + var_r30 = &arg0->value; + return *var_r30; + } + return 0.0f; +} + +void SetClusterMain(HsfCluster *arg0) { + float var_f30; + float var_f31; + s32 temp_r24; + s32 temp_r29; + u16 *var_r28; + s32 var_r23; + s32 i; + s32 j; + HsfBuffer *temp_r25; + HsfPart *temp_r27; + HsfBuffer *temp_r30; + + temp_r27 = arg0->part; + if (arg0->vertexCnt != 0) { + if (arg0->type == 2) { + var_r28 = temp_r27->vertex; + temp_r30 = *arg0->vertex; + var_f30 = 0.0f; + for (i = 0; i < arg0->vertexCnt; i++) { + var_f30 += arg0->unk14[i]; + } + for (i = 0; i < temp_r27->count; i++, var_r28++) { + temp_r29 = *var_r28; + Vertextop[temp_r29].x = ((Vec*) temp_r30->data)[i].x; + Vertextop[temp_r29].y = ((Vec*) temp_r30->data)[i].y; + Vertextop[temp_r29].z = ((Vec*) temp_r30->data)[i].z; + } + for (i = 1; i < arg0->vertexCnt; i++) { + temp_r30 = arg0->vertex[i]; + var_r28 = temp_r27->vertex; + var_f31 = arg0->unk14[i]; + if (var_f31 < 0.0f) { + var_f31 = 0.0f; + } else if (var_f30 > 1.0f) { + var_f31 /= var_f30; + } + for (j = 0; j < temp_r27->count; j++, var_r28++) { + temp_r29 = *var_r28; + Vertextop[temp_r29].x += var_f31 * (((Vec*) temp_r30->data)[j].x - Vertextop[temp_r29].x); + Vertextop[temp_r29].y += var_f31 * (((Vec*) temp_r30->data)[j].y - Vertextop[temp_r29].y); + Vertextop[temp_r29].z += var_f31 * (((Vec*) temp_r30->data)[j].z - Vertextop[temp_r29].z); + } + } + return; + } + temp_r24 = arg0->unk10; + var_r23 = temp_r24 + 1; + if (var_r23 >= arg0->vertexCnt) { + var_r23 = temp_r24; + } + var_f31 = arg0->unk10 - temp_r24; + temp_r30 = arg0->vertex[temp_r24]; + temp_r25 = arg0->vertex[var_r23]; + var_r28 = temp_r27->vertex; + for (i = 0; i < temp_r27->count; i++, var_r28++) { + temp_r29 = *var_r28; + Vertextop[temp_r29].x = ((Vec*) temp_r30->data)[i].x + var_f31 * (((Vec*) temp_r25->data)[i].x - ((Vec*) temp_r30->data)[i].x); + Vertextop[temp_r29].y = ((Vec*) temp_r30->data)[i].y + var_f31 * (((Vec*) temp_r25->data)[i].y - ((Vec*) temp_r30->data)[i].y); + Vertextop[temp_r29].z = ((Vec*) temp_r30->data)[i].z + var_f31 * (((Vec*) temp_r25->data)[i].z - ((Vec*) temp_r30->data)[i].z); + } + } +} + +void ClusterProc(ModelData *arg0) { + s32 temp_r24; + s32 i; + s32 j; + s32 k; + HsfData *temp_r27; + HsfData *temp_r23; + MotionData *temp_r22; + HsfCluster *var_r29; + HsfObject *temp_r31; + + for (i = 0; i < 4; i++) { + temp_r24 = arg0->unk_10[i]; + if (temp_r24 != -1) { + temp_r22 = &Hu3DMotion[temp_r24]; + temp_r27 = temp_r22->unk_04; + temp_r23 = arg0->hsfData; + var_r29 = temp_r27->cluster; + for (j = 0; j < temp_r27->clusterCnt; j++, var_r29++) { + if (var_r29->target != -1) { + temp_r31 = temp_r23->object; + temp_r31 += var_r29->target; + Vertextop = temp_r31->data.vertex->data; + if (temp_r31->data.hook) { + for (k = 0; k < temp_r31->data.vertex->count; k++) { + Vertextop[k].x = ((Vec*) temp_r31->data.file[0])[k].x; + Vertextop[k].y = ((Vec*) temp_r31->data.file[0])[k].y; + Vertextop[k].z = ((Vec*) temp_r31->data.file[0])[k].z; + } + } + SetClusterMain(var_r29); + DCStoreRangeNoSync(Vertextop, temp_r31->data.vertex->count * sizeof(Vec)); + temp_r31->data.unk120[0]++; + } + } + } + } +} + +void ClusterMotionExec(ModelData *arg0) { + float temp_f31; + s32 i; + s32 j; + s16 var_r20; + HsfCluster *temp_r26; + HsfData *temp_r28; + HsfMotion *temp_r27; + HsfTrack *var_r31; + HsfTrack *var_r30; + MotionData *var_r23; + + var_r31 = temp_r27->track; + for (i = 0; i < 4; i++) { + if (arg0->unk_10[i] != -1) { + var_r20 = arg0->unk_10[i]; + var_r23 = &Hu3DMotion[var_r20]; + temp_r28 = var_r23->unk_04; + temp_r27 = temp_r28->motion; + var_r31 = temp_r27->track; + temp_f31 = arg0->unk_A4[i]; + for (j = 0; j < temp_r27->numTracks; j++, var_r31++) { + switch (var_r31->type) { + case 5: + temp_r26 = &temp_r28->cluster[var_r31->target_s16]; + temp_r26->unk10 = GetClusterCurve(var_r31, temp_f31); + break; + case 6: + var_r30 = var_r31; + temp_r26 = &temp_r28->cluster[var_r30->target_s16]; + temp_r26->unk14[var_r30->unk04] = GetClusterCurve(var_r30, temp_f31); + break; + } + } + } + } +} diff --git a/src/game/EnvelopeExec.c b/src/game/EnvelopeExec.c new file mode 100644 index 00000000..b67b1117 --- /dev/null +++ b/src/game/EnvelopeExec.c @@ -0,0 +1,463 @@ +#include "game/EnvelopeExec.h" +#include "game/hsfex.h" + +#include "string.h" + +static void SetEnvelopMtx(HsfObject *arg0, HsfObject *arg1, Mtx arg2); +static void SetEnvelopMain(HsfData *arg0); +static void SetEnvelop(HsfCenv *arg0); +static void SetMtx(HsfObject *arg0, Mtx arg1); +static void SetRevMtx(void); +static HsfSkeleton *SearchSklenton(char *arg0); + +Vec *Vertextop; +Mtx *MtxTop; +static u32 nObj; +static u32 nMesh; +static HsfObject *objtop; +static HsfData *CurHsf; +static Vec *vtxenv; +static Vec *normenv; +static Vec *normtop; +static s32 Meshcnt; +static s32 Meshno; + +void InitEnvelope(HsfData *arg0) { + HsfBuffer *spC; + HsfBuffer *sp8; + HsfMatrix *temp_r28; + HsfObject *var_r31; + HsfSkeleton *var_r30; + Mtx sp10; + s32 i; + s32 j; + + if (arg0->cenvCnt != 0) { + var_r31 = arg0->object; + for (Meshcnt = i = 0; i < arg0->objectCnt; i++, var_r31++) { + if (var_r31->type == 2) { + if (var_r31->data.file[0]) { + spC = var_r31->data.vertex; + sp8 = var_r31->data.normal; + Meshcnt++; + } else { + continue; + } + } + var_r30 = arg0->skeleton; + for (j = 0; j < arg0->skeletonCnt; j++, var_r30++) { + if (strcmp(var_r31->name, var_r30->name) == 0) { + var_r31->data.base.pos.x = var_r30->transform.pos.x; + var_r31->data.base.pos.y = var_r30->transform.pos.y; + var_r31->data.base.pos.z = var_r30->transform.pos.z; + var_r31->data.base.rot.x = var_r30->transform.rot.x; + var_r31->data.base.rot.y = var_r30->transform.rot.y; + var_r31->data.base.rot.z = var_r30->transform.rot.z; + var_r31->data.base.scale.x = var_r30->transform.scale.x; + var_r31->data.base.scale.y = var_r30->transform.scale.y; + var_r31->data.base.scale.z = var_r30->transform.scale.z; + } + } + var_r31->data.curr.pos.x = var_r31->data.base.pos.x; + var_r31->data.curr.pos.y = var_r31->data.base.pos.y; + var_r31->data.curr.pos.z = var_r31->data.base.pos.z; + var_r31->data.curr.rot.x = var_r31->data.base.rot.x; + var_r31->data.curr.rot.y = var_r31->data.base.rot.y; + var_r31->data.curr.rot.z = var_r31->data.base.rot.z; + var_r31->data.curr.scale.x = var_r31->data.base.scale.x; + var_r31->data.curr.scale.y = var_r31->data.base.scale.y; + var_r31->data.curr.scale.z = var_r31->data.base.scale.z; + } + CurHsf = arg0; + objtop = arg0->object; + temp_r28 = CurHsf->matrix; + if (temp_r28) { + MtxTop = temp_r28->data; + nObj = temp_r28->count; + nMesh = temp_r28->base_idx; + } + PSMTXIdentity(sp10); + SetMtx(arg0->root, sp10); + SetRevMtx(); + } +} + +static void SetEnvelopMtx(HsfObject *arg0, HsfObject *arg1, Mtx arg2) { + Mtx sp6C; + Mtx sp3C; + Mtx spC; + s32 var_r29; + s32 i; + + PSMTXTrans(spC, arg1->data.curr.pos.x, arg1->data.curr.pos.y, arg1->data.curr.pos.z); + PSMTXConcat(arg2, spC, sp3C); + if (arg1->data.curr.rot.z) { + PSMTXRotRad(sp6C, 'z', MTXDegToRad(arg1->data.curr.rot.z)); + PSMTXConcat(sp3C, sp6C, sp3C); + } + if (arg1->data.curr.rot.y) { + PSMTXRotRad(sp6C, 'y', MTXDegToRad(arg1->data.curr.rot.y)); + PSMTXConcat(sp3C, sp6C, sp3C); + } + if (arg1->data.curr.rot.x) { + PSMTXRotRad(sp6C, 'x', MTXDegToRad(arg1->data.curr.rot.x)); + PSMTXConcat(sp3C, sp6C, sp3C); + } + if (arg1->data.curr.scale.x != 1.0f) { + sp3C[0][0] *= arg1->data.curr.scale.x; + sp3C[1][0] *= arg1->data.curr.scale.x; + sp3C[2][0] *= arg1->data.curr.scale.x; + } + if (arg1->data.curr.scale.y != 1.0f) { + sp3C[0][1] *= arg1->data.curr.scale.y; + sp3C[1][1] *= arg1->data.curr.scale.y; + sp3C[2][1] *= arg1->data.curr.scale.y; + } + if (arg1->data.curr.scale.z != 1.0f) { + sp3C[0][2] *= arg1->data.curr.scale.z; + sp3C[1][2] *= arg1->data.curr.scale.z; + sp3C[2][2] *= arg1->data.curr.scale.z; + } + var_r29 = arg1 - arg0; + PSMTXCopy(sp3C, MtxTop[nMesh + var_r29]); + for (i = 0; i < arg1->data.childrenCount; i++) { + SetEnvelopMtx(arg0, arg1->data.children[i], sp3C); + } +} + +void EnvelopeProc(HsfData *arg0) { + HsfMatrix *temp_r31; + HsfObject *temp_r29; + Mtx sp8; + + CurHsf = arg0; + temp_r31 = CurHsf->matrix; + MtxTop = temp_r31->data; + nObj = temp_r31->count; + nMesh = temp_r31->base_idx; + temp_r29 = arg0->root; + PSMTXIdentity(sp8); + SetEnvelopMtx(arg0->object, temp_r29, sp8); + SetEnvelopMain(arg0); +} + +void InitVtxParm(HsfData *arg0) { + HsfObject *var_r31; + s32 i; + + var_r31 = arg0->object; + for (i = 0; i < arg0->objectCnt; i++, var_r31++) { + if (var_r31->type == 2) { + var_r31->data.unk120[0] = 0; + } + } +} + +static void SetEnvelopMain(HsfData *arg0) { + void *sp10; + void *spC; + void *sp8; + HsfBuffer *temp_r28; + HsfBuffer *temp_r30; + HsfObject *var_r31; + s32 i; + s32 j; + HsfCenv *var_r25; + + var_r31 = arg0->object; + for (Meshno = i = 0; i < arg0->objectCnt; i++, var_r31++) { + if (var_r31->type == 2) { + PSMTXInverse(MtxTop[&var_r31[nMesh] - arg0->object], MtxTop[Meshno]); + temp_r30 = var_r31->data.vertex; + temp_r28 = var_r31->data.normal; + if (var_r31->data.unk120[0] != 0) { + Vertextop = temp_r30->data; + } else { + Vertextop = var_r31->data.file[0]; + } + vtxenv = temp_r30->data; + normtop = var_r31->data.file[1]; + normenv = temp_r28->data; + var_r25 = var_r31->data.cenv; + for (j = 0; j < var_r31->data.hook; j++, var_r25++) { + SetEnvelop(var_r25); + } + sp10 = temp_r30->data; + spC = var_r31->data.file[0]; + sp8 = temp_r30->data; + DCStoreRangeNoSync(normenv, temp_r28->count * sizeof(Vec)); + DCStoreRangeNoSync(vtxenv, temp_r30->count * sizeof(Vec)); + Meshno++; + } + } +} + +static void SetEnvelop(HsfCenv *arg0) { + Vec sp44; + Vec sp38; + Vec sp2C; + Vec sp20; + Vec sp14; + s32 sp10; + u32 spC; + u32 sp8; + HsfCenvDual *var_r20; + HsfCenvDualWeight *var_r30; + HsfCenvMulti *var_r19; + HsfCenvMultiWeight *var_r25; + HsfCenvSingle *var_r27; + Vec *temp_r22; + Vec *temp_r26; + Vec *temp_r28; + Vec *temp_r31; + float temp_f31; + MtxPtr var_r29; + s32 temp_r18; + s32 temp_r21; + s32 i; + s32 j; + Mtx sp1A0; + Mtx sp170; + Mtx sp140; + Mtx sp110; + Mtx spE0; + Mtx spB0; + Mtx sp80; + Mtx sp50; + + var_r27 = arg0->singleData; + for (i = 0; i < arg0->singleCount; i++, var_r27++) { + temp_r18 = var_r27->normal; + temp_r21 = var_r27->pos; + temp_r28 = &vtxenv[temp_r21]; + temp_r31 = &Vertextop[temp_r21]; + temp_r22 = &normenv[temp_r18]; + temp_r26 = &normtop[temp_r18]; + PSMTXConcat(MtxTop[nMesh + var_r27->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r27->target], sp140); + PSMTXConcat(MtxTop[Meshno], sp140, sp1A0); + Hu3DMtxScaleGet(&sp1A0[0], &sp14); + if (sp14.x != 1.0f || sp14.y != 1.0f || sp14.z != 1.0f) { + PSMTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z); + PSMTXConcat(spE0, sp1A0, sp170); + PSMTXInvXpose(sp170, sp170); + } else { + PSMTXInvXpose(sp1A0, sp170); + } + if (var_r27->posCnt == 1) { + PSMTXMultVec(sp1A0, temp_r31, temp_r28); + PSMTXMultVec(sp170, temp_r26, temp_r22); + } else if (var_r27->posCnt <= 6) { + PSMTXMultVecArray(sp1A0, temp_r31, temp_r28, var_r27->posCnt); + PSMTXMultVecArray(sp170, temp_r26, temp_r22, var_r27->normalCnt); + } else { + PSMTXReorder(sp1A0, (ROMtxPtr) sp140); + PSMTXReorder(sp170, (ROMtxPtr) sp110); + PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r27->posCnt); + PSMTXROMultVecArray((ROMtxPtr) sp110, temp_r26, temp_r22, var_r27->normalCnt); + } + } + var_r20 = arg0->dualData; + for (i = 0; i < arg0->dualCount; i++, var_r20++) { + spC = var_r20->target1; + sp8 = var_r20->target2; + PSMTXConcat(MtxTop[nMesh + spC], MtxTop[nMesh + nObj + nObj * Meshno + spC], sp140); + PSMTXConcat(MtxTop[Meshno], sp140, sp1A0); + PSMTXConcat(MtxTop[nMesh + sp8], MtxTop[nMesh + nObj + nObj * Meshno + sp8], sp140); + PSMTXConcat(MtxTop[Meshno], sp140, (float (*)[4]) &spB0[0]); + var_r30 = var_r20->weight; + for (j = 0; j < var_r20->weightCnt; j++, var_r30++) { + temp_r18 = var_r30->normal; + temp_r21 = var_r30->pos; + temp_r28 = &vtxenv[temp_r21]; + temp_r31 = &Vertextop[temp_r21]; + temp_r22 = &normenv[temp_r18]; + temp_r26 = &normtop[temp_r18]; + temp_f31 = var_r30->weight; + sp140[0][0] = sp1A0[0][0] * temp_f31; + sp140[1][0] = sp1A0[1][0] * temp_f31; + sp140[2][0] = sp1A0[2][0] * temp_f31; + sp140[0][1] = sp1A0[0][1] * temp_f31; + sp140[1][1] = sp1A0[1][1] * temp_f31; + sp140[2][1] = sp1A0[2][1] * temp_f31; + sp140[0][2] = sp1A0[0][2] * temp_f31; + sp140[1][2] = sp1A0[1][2] * temp_f31; + sp140[2][2] = sp1A0[2][2] * temp_f31; + sp140[0][3] = sp1A0[0][3] * temp_f31; + sp140[1][3] = sp1A0[1][3] * temp_f31; + sp140[2][3] = sp1A0[2][3] * temp_f31; + temp_f31 = 1.0f - var_r30->weight; + sp110[0][0] = spB0[0][0] * temp_f31; + sp110[1][0] = spB0[1][0] * temp_f31; + sp110[2][0] = spB0[2][0] * temp_f31; + sp110[0][1] = spB0[0][1] * temp_f31; + sp110[1][1] = spB0[1][1] * temp_f31; + sp110[2][1] = spB0[2][1] * temp_f31; + sp110[0][2] = spB0[0][2] * temp_f31; + sp110[1][2] = spB0[1][2] * temp_f31; + sp110[2][2] = spB0[2][2] * temp_f31; + sp110[0][3] = spB0[0][3] * temp_f31; + sp110[1][3] = spB0[1][3] * temp_f31; + sp110[2][3] = spB0[2][3] * temp_f31; + if (sp80 == sp110 || sp80 == sp140) { + var_r29 = sp50; + } else { + var_r29 = sp80; + } + var_r29[0][0] = sp110[0][0] + sp140[0][0]; + var_r29[0][1] = sp110[0][1] + sp140[0][1]; + var_r29[0][2] = sp110[0][2] + sp140[0][2]; + var_r29[0][3] = sp110[0][3] + sp140[0][3]; + var_r29[1][0] = sp110[1][0] + sp140[1][0]; + var_r29[1][1] = sp110[1][1] + sp140[1][1]; + var_r29[1][2] = sp110[1][2] + sp140[1][2]; + var_r29[1][3] = sp110[1][3] + sp140[1][3]; + var_r29[2][0] = sp110[2][0] + sp140[2][0]; + var_r29[2][1] = sp110[2][1] + sp140[2][1]; + var_r29[2][2] = sp110[2][2] + sp140[2][2]; + var_r29[2][3] = sp110[2][3] + sp140[2][3]; + if (var_r29 == sp50) { + PSMTXCopy(sp50, sp80); + } + Hu3DMtxScaleGet(&sp80[0], &sp14); + if (sp14.x != 1.0f || sp14.y != 1.0f || sp14.z != 1.0f) { + PSMTXScale(spE0, 1.0 / sp14.x, 1.0 / sp14.y, 1.0 / sp14.z); + PSMTXConcat(spE0, sp80, sp110); + PSMTXInvXpose(sp110, sp110); + } else { + PSMTXInvXpose(sp80, sp110); + } + if (var_r30->posCnt == 1) { + PSMTXMultVec(sp80, temp_r31, temp_r28); + } else if (var_r30->posCnt <= 6) { + PSMTXMultVecArray(sp80, temp_r31, temp_r28, var_r30->posCnt); + } else { + PSMTXReorder(sp80, (ROMtxPtr) sp140); + PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r31, temp_r28, var_r30->posCnt); + } + if (var_r30->normalCnt != 0) { + if (var_r30->normalCnt == 1) { + PSMTXMultVec(sp110, temp_r26, temp_r22); + } else if (var_r30->normalCnt <= 6) { + PSMTXMultVecArray(sp110, temp_r26, temp_r22, var_r30->normalCnt); + } else { + PSMTXReorder(sp110, (ROMtxPtr) sp140); + PSMTXROMultVecArray((ROMtxPtr) sp140, temp_r26, temp_r22, var_r30->normalCnt); + } + } + } + } + var_r19 = arg0->multiData; + for (i = 0; i < arg0->multiCount; i++, var_r19++) { + var_r25 = var_r19->weight; + temp_r18 = var_r19->normal; + temp_r21 = var_r19->pos; + temp_r28 = &vtxenv[temp_r21]; + temp_r31 = &Vertextop[temp_r21]; + temp_r22 = &normenv[temp_r18]; + temp_r26 = &normtop[temp_r18]; + sp38.x = sp38.y = sp38.z = 0.0f; + sp20.x = sp20.y = sp20.z = 0.0f; + sp10 = 0; + for (j = 0; j < var_r19->weightCnt; j++, var_r25++) { + PSMTXConcat(MtxTop[nMesh + var_r25->target], MtxTop[nMesh + nObj + nObj * Meshno + var_r25->target], sp1A0); + PSMTXConcat(MtxTop[Meshno], sp1A0, sp1A0); + PSMTXInvXpose(sp1A0, sp170); + PSMTXMultVec(sp1A0, temp_r31, &sp44); + PSMTXMultVec(sp170, temp_r26, &sp2C); + sp44.x = var_r25->value * (sp44.x - temp_r31->x); + sp44.y = var_r25->value * (sp44.y - temp_r31->y); + sp44.z = var_r25->value * (sp44.z - temp_r31->z); + PSVECAdd(&sp38, &sp44, &sp38); + sp2C.x = var_r25->value * (sp2C.x - temp_r26->x); + sp2C.y = var_r25->value * (sp2C.y - temp_r26->y); + sp2C.z = var_r25->value * (sp2C.z - temp_r26->z); + PSVECAdd(&sp20, &sp2C, &sp20); + } + temp_r28->x = temp_r31->x + sp38.x; + temp_r28->y = temp_r31->y + sp38.y; + temp_r28->z = temp_r31->z + sp38.z; + temp_r22->x = temp_r26->x + sp20.x; + temp_r22->y = temp_r26->y + sp20.y; + temp_r22->z = temp_r26->z + sp20.z; + } + temp_r21 = arg0->vtxCount; + temp_r28 = &vtxenv[temp_r21]; + temp_r31 = &Vertextop[temp_r21]; + for (i = 0; i < arg0->copyCount; i++, temp_r28++, temp_r31++) { + temp_r28->x = temp_r31->x; + temp_r28->y = temp_r31->y; + temp_r28->z = temp_r31->z; + } +} + +static void SetMtx(HsfObject *arg0, Mtx arg1) { + HsfSkeleton *temp_r3; + Mtx spFC; + Mtx spCC; + Mtx sp9C; + s32 temp_r25; + s32 i; + + temp_r3 = SearchSklenton(arg0->name); + if (temp_r3) { + arg0->data.base.pos.x = temp_r3->transform.pos.x; + arg0->data.base.pos.y = temp_r3->transform.pos.y; + arg0->data.base.pos.z = temp_r3->transform.pos.z; + arg0->data.base.rot.x = temp_r3->transform.rot.x; + arg0->data.base.rot.y = temp_r3->transform.rot.y; + arg0->data.base.rot.z = temp_r3->transform.rot.z; + arg0->data.base.scale.x = temp_r3->transform.scale.x; + arg0->data.base.scale.y = temp_r3->transform.scale.y; + arg0->data.base.scale.z = temp_r3->transform.scale.z; + } + PSMTXTrans(spFC, arg0->data.base.pos.x, arg0->data.base.pos.y, arg0->data.base.pos.z); + PSMTXScale(spCC, arg0->data.base.scale.x, arg0->data.base.scale.y, arg0->data.base.scale.z); + PSMTXConcat(arg1, spFC, spFC); + PSMTXRotRad(sp9C, 'z', MTXDegToRad(arg0->data.base.rot.z)); + PSMTXConcat(spFC, sp9C, spFC); + PSMTXRotRad(sp9C, 'y', MTXDegToRad(arg0->data.base.rot.y)); + PSMTXConcat(spFC, sp9C, spFC); + PSMTXRotRad(sp9C, 'x', MTXDegToRad(arg0->data.base.rot.x)); + PSMTXConcat(spFC, sp9C, spFC); + PSMTXConcat(spFC, spCC, spFC); + temp_r25 = arg0 - objtop; + PSMTXCopy(spFC, MtxTop[nMesh + temp_r25]); + for (i = 0; i < arg0->data.childrenCount; i++) { + SetMtx(arg0->data.children[i], spFC); + } +} + +static void SetRevMtx(void) { + HsfObject *var_r29; + s32 var_r28; + s32 i; + s32 var_r30; + Mtx sp38; + Mtx sp8; + + var_r29 = CurHsf->object; + for (var_r28 = i = 0; i < CurHsf->objectCnt; i++, var_r29++) { + if (var_r29->type == 2) { + PSMTXCopy(MtxTop[nMesh + i], sp8); + for (var_r30 = 0; var_r30 < CurHsf->objectCnt; var_r30++) { + PSMTXInverse(MtxTop[nMesh + var_r30], sp38); + PSMTXConcat(sp38, sp8, MtxTop[nMesh + nObj + nObj * var_r28 + var_r30]); + } + PSMTXInverse(MtxTop[nMesh + i], sp8); + var_r28++; + } + } +} + +static HsfSkeleton *SearchSklenton(char *arg0) { + HsfSkeleton *var_r31; + s32 i; + + var_r31 = CurHsf->skeleton; + for (i = 0; i < CurHsf->skeletonCnt; i++, var_r31++) { + if (strcmp(arg0, var_r31->name) == 0) { + return var_r31; + } + } + return NULL; +} diff --git a/src/game/ShapeExec.c b/src/game/ShapeExec.c new file mode 100755 index 00000000..b3b8921f --- /dev/null +++ b/src/game/ShapeExec.c @@ -0,0 +1,69 @@ +#include "game/ShapeExec.h" +#include "game/EnvelopeExec.h" + +static void SetShapeMain(HsfObject *arg0) { + HsfBuffer *temp_r28; + HsfBuffer *temp_r30; + float var_f30; + float var_f31; + s32 temp_r27; + s32 var_r29; + s32 var_r26; + s32 i; + + if (arg0->data.shapeType == 2) { + var_f30 = 0.0f; + for (i = 0; i < arg0->data.vertexShapeCnt; i++) { + var_f30 += arg0->data.mesh.morphWeight[i]; + } + temp_r30 = *arg0->data.vertexShape; + for (i = 0; i < temp_r30->count; i++) { + Vertextop[i].x = ((Vec*) temp_r30->data)[i].x; + Vertextop[i].y = ((Vec*) temp_r30->data)[i].y; + Vertextop[i].z = ((Vec*) temp_r30->data)[i].z; + } + for (i = 0; i < arg0->data.vertexShapeCnt; i++) { + temp_r30 = arg0->data.vertexShape[i]; + var_f31 = arg0->data.mesh.morphWeight[i]; + if (var_f31 < 0.0f) { + var_f31 = 0.0f; + } else if (var_f30 > 1.0f) { + var_f31 /= var_f30; + } + for (var_r29 = 0; var_r29 < temp_r30->count; var_r29++) { + Vertextop[var_r29].x += var_f31 * (((Vec*) temp_r30->data)[var_r29].x - Vertextop[var_r29].x); + Vertextop[var_r29].y += var_f31 * (((Vec*) temp_r30->data)[var_r29].y - Vertextop[var_r29].y); + Vertextop[var_r29].z += var_f31 * (((Vec*) temp_r30->data)[var_r29].z - Vertextop[var_r29].z); + } + } + } else { + temp_r27 = arg0->data.mesh.baseMorph; + var_r26 = temp_r27 + 1; + if (var_r26 >= arg0->data.vertexShapeCnt) { + var_r26 = temp_r27; + } + var_f31 = arg0->data.mesh.baseMorph - temp_r27; + temp_r30 = arg0->data.vertexShape[temp_r27]; + temp_r28 = arg0->data.vertexShape[var_r26]; + for (i = 0; i < temp_r30->count; i++) { + Vertextop[i].x = ((Vec*) temp_r30->data)[i].x + var_f31 * (((Vec*) temp_r28->data)[i].x - ((Vec*) temp_r30->data)[i].x); + Vertextop[i].y = ((Vec*) temp_r30->data)[i].y + var_f31 * (((Vec*) temp_r28->data)[i].y - ((Vec*) temp_r30->data)[i].y); + Vertextop[i].z = ((Vec*) temp_r30->data)[i].z + var_f31 * (((Vec*) temp_r28->data)[i].z - ((Vec*) temp_r30->data)[i].z); + } + } +} + +void ShapeProc(HsfData *arg0) { + HsfObject *var_r31; + s32 i; + + var_r31 = arg0->object; + for (i = 0; i < arg0->objectCnt; i++, var_r31++) { + if (var_r31->type == 2 && var_r31->data.vertexShapeCnt != 0) { + Vertextop = var_r31->data.vertex->data; + SetShapeMain(var_r31); + DCStoreRange(Vertextop, var_r31->data.vertex->count * sizeof(Vec)); + var_r31->data.unk120[0]++; + } + } +} diff --git a/src/game/THPDraw.c b/src/game/THPDraw.c new file mode 100755 index 00000000..79eb5554 --- /dev/null +++ b/src/game/THPDraw.c @@ -0,0 +1,109 @@ +#include "game/THPDraw.h" + +void THPGXRestore(void) { + GXSetZMode(GX_TRUE, GX_ALWAYS, GX_FALSE); + GXSetBlendMode(GX_BM_NONE, GX_BL_ONE, GX_BL_ZERO, GX_LO_SET); + GXSetNumTexGens(1); + GXSetNumChans(0); + GXSetNumTevStages(1); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL); + GXSetTevOp(GX_TEVSTAGE0, GX_REPLACE); + GXSetTevSwapMode(GX_TEVSTAGE0, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevSwapMode(GX_TEVSTAGE1, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevSwapMode(GX_TEVSTAGE2, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevSwapMode(GX_TEVSTAGE3, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA); + GXSetTevSwapModeTable(GX_TEV_SWAP1, GX_CH_RED, GX_CH_RED, GX_CH_RED, GX_CH_ALPHA); + GXSetTevSwapModeTable(GX_TEV_SWAP2, GX_CH_GREEN, GX_CH_GREEN, GX_CH_GREEN, GX_CH_ALPHA); + GXSetTevSwapModeTable(GX_TEV_SWAP3, GX_CH_BLUE, GX_CH_BLUE, GX_CH_BLUE, GX_CH_ALPHA); + GXSetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_1); + GXSetTevKAlphaSel(GX_TEVSTAGE1, GX_TEV_KASEL_1); +} + +void THPGXYuv2RgbSetup(GXRenderModeObj *obj, GXColor *arg1, Mtx arg2) { + s32 sp2C = obj->fbWidth; + s32 sp28 = obj->efbHeight; + + GXLoadPosMtxImm(arg2, GX_PNMTX0); + GXSetCurrentMtx(GX_PNMTX0); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); + GXSetColorUpdate(GX_TRUE); + GXSetAlphaUpdate(GX_FALSE); + GXSetNumChans(0); + GXSetNumTexGens(2); + GXSetTexCoordGen2(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE, GX_PTIDENTITY); + GXSetTexCoordGen2(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY, GX_FALSE, GX_PTIDENTITY); + GXInvalidateTexAll(); + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT7, GX_VA_POS, GX_TEX_ST, GX_RGBA4, 0); + GXSetVtxAttrFmt(GX_VTXFMT7, GX_VA_TEX0, GX_TEX_ST, GX_RGBX8, 0); + GXSetNumTevStages(5); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD1, GX_TEXMAP1, GX_COLOR_NULL); + GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_TEXC, GX_CC_KONST, GX_CC_C0); + GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_TEXA, GX_CA_KONST, GX_CA_A0); + GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_SUB, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV); + GXSetTevKColorSel(GX_TEVSTAGE0, GX_TEV_KCSEL_K0); + GXSetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A); + GXSetTevSwapMode(GX_TEVSTAGE0, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevOrder(GX_TEVSTAGE1, GX_TEXCOORD1, GX_TEXMAP2, GX_COLOR_NULL); + GXSetTevColorIn(GX_TEVSTAGE1, GX_CC_ZERO, GX_CC_TEXC, GX_CC_KONST, GX_CC_CPREV); + GXSetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_2, GX_FALSE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE1, GX_CA_ZERO, GX_CA_TEXA, GX_CA_KONST, GX_CA_APREV); + GXSetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_SUB, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV); + GXSetTevKColorSel(GX_TEVSTAGE1, GX_TEV_KCSEL_K1); + GXSetTevKAlphaSel(GX_TEVSTAGE1, GX_TEV_KASEL_K1_A); + GXSetTevSwapMode(GX_TEVSTAGE1, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevOrder(GX_TEVSTAGE2, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL); + GXSetTevColorIn(GX_TEVSTAGE2, GX_CC_ZERO, GX_CC_TEXC, GX_CC_ONE, GX_CC_CPREV); + GXSetTevColorOp(GX_TEVSTAGE2, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE2, GX_CA_TEXA, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV); + GXSetTevAlphaOp(GX_TEVSTAGE2, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevSwapMode(GX_TEVSTAGE2, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevOrder(GX_TEVSTAGE3, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL); + GXSetTevColorIn(GX_TEVSTAGE3, GX_CC_APREV, GX_CC_CPREV, GX_CC_KONST, GX_CC_ZERO); + GXSetTevColorOp(GX_TEVSTAGE3, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE3, GX_CA_KONST, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO); + GXSetTevAlphaOp(GX_TEVSTAGE3, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevSwapMode(GX_TEVSTAGE3, GX_TEV_SWAP0, GX_TEV_SWAP0); + GXSetTevKColorSel(GX_TEVSTAGE3, GX_TEV_KCSEL_K2); + GXSetTevColor(GX_TEVREG1, *arg1); + GXSetTevOrder(GX_TEVSTAGE4, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR_NULL); + GXSetTevColorIn(GX_TEVSTAGE4, GX_CC_ZERO, GX_CC_CPREV, GX_CC_C1, GX_CC_ZERO); + GXSetTevColorOp(GX_TEVSTAGE4, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevAlphaIn(GX_TEVSTAGE4, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_A1); + GXSetTevAlphaOp(GX_TEVSTAGE4, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV); + GXSetTevColorS10(GX_TEVREG0, (GXColorS10) { 0xFFA6, 0, 0xFF8E, 0x0087 }); + GXSetTevKColor(GX_KCOLOR0, (GXColor) { 0, 0, 0xE2, 0x58 }); + GXSetTevKColor(GX_KCOLOR1, (GXColor) { 0xB3, 0, 0, 0xB6 }); + GXSetTevKColor(GX_KCOLOR2, (GXColor) { 0xFF, 0, 0xFF, 0x80 }); + GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA); +} + +void THPGXYuv2RgbDraw(u32 *yImage, u32 *uImage, u32 *vImage, s16 x, s16 y, s16 texWidth, s16 texHeight, s16 polyWidth, s16 polyHeight) { + GXTexObj sp54; + GXTexObj sp34; + GXTexObj sp14; + + GXInitTexObj(&sp54, yImage, texWidth, texHeight, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE); + GXInitTexObjLOD(&sp54, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1); + GXLoadTexObj(&sp54, GX_TEXMAP0); + GXInitTexObj(&sp34, uImage, texWidth >> 1, texHeight >> 1, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE); + GXInitTexObjLOD(&sp34, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1); + GXLoadTexObj(&sp34, GX_TEXMAP1); + GXInitTexObj(&sp14, vImage, texWidth >> 1, texHeight >> 1, GX_TF_I8, GX_CLAMP, GX_CLAMP, GX_FALSE); + GXInitTexObjLOD(&sp14, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1); + GXLoadTexObj(&sp14, GX_TEXMAP2); + GXBegin(GX_QUADS, GX_VTXFMT7, 4); + GXPosition3s16(x, y, 0); + GXTexCoord2s16(0, 0); + GXPosition3s16(x + polyWidth, y, 0); + GXTexCoord2s16(1, 0); + GXPosition3s16(x + polyWidth, y + polyHeight, 0); + GXTexCoord2s16(1, 1); + GXPosition3s16(x, y + polyHeight, 0); + GXTexCoord2s16(0, 1); + GXEnd(); +} diff --git a/src/game/THPSimple.c b/src/game/THPSimple.c new file mode 100755 index 00000000..c48f2462 --- /dev/null +++ b/src/game/THPSimple.c @@ -0,0 +1,657 @@ +#include "game/THPSimple.h" +#include "game/THPDraw.h" + +#define ALIGN32(val) (((val) + 0x1F) & ~0x1F) + +static void __THPSimpleDVDCallback(s32 result, DVDFileInfo *fileInfo); +static s32 VideoDecode(void *arg0); +static void THPAudioMixCallback(void); + +UnkThpStruct10 SimpleControl; +static u8 SoundBuffer[2][0x280]; +static u8 WorkBuffer[0x40]; + +static s32 SoundBufferIndex; +static void *LastAudioBuffer; +static void *CurAudioBuffer; +static s32 bufIdx; +static s32 AudioSystem; +static void (*OldAIDCallback)(); +static s32 Initialized; + +s32 THPSimpleInit(s32 arg0) { + s32 temp_r31; + + memset(&SimpleControl, 0, sizeof(SimpleControl)); + LCEnable(); + if (THPInit() == 0) { + return 0; + } + temp_r31 = OSDisableInterrupts(); + AudioSystem = arg0; + SoundBufferIndex = 0; + LastAudioBuffer = NULL; + CurAudioBuffer = NULL; + OldAIDCallback = AIRegisterDMACallback(THPAudioMixCallback); + if (OldAIDCallback == NULL && AudioSystem != 0) { + AIRegisterDMACallback(NULL); + OSRestoreInterrupts(temp_r31); + return 0; + } + OSRestoreInterrupts(temp_r31); + if (AudioSystem == 0) { + memset(SoundBuffer, 0, sizeof(SoundBuffer)); + DCFlushRange(SoundBuffer, sizeof(SoundBuffer)); + AIInitDMA((u32) &SoundBuffer[SoundBufferIndex], sizeof(SoundBuffer[0])); + AIStartDMA(); + } + Initialized = 1; + return 1; +} + +void THPSimpleQuit(void) { + s32 temp_r31; + + LCDisable(); + temp_r31 = OSDisableInterrupts(); + if (OldAIDCallback) { + AIRegisterDMACallback(OldAIDCallback); + } + OSRestoreInterrupts(temp_r31); + Initialized = 0; +} + +s32 THPSimpleOpen(char *arg0) { + s32 var_r31; + s32 i; + + if (Initialized == 0) { + return 0; + } + if (SimpleControl.unk98 != 0) { + return 0; + } + memset(&SimpleControl.unk80, 0, sizeof(SimpleControl.unk80)); + memset(SimpleControl.unk88, 0, sizeof(SimpleControl.unk88)); + if (DVDOpen(arg0, &SimpleControl.unk00) == 0) { + return 0; + } + if (DVDReadPrio(&SimpleControl.unk00, &WorkBuffer, 0x40, 0, 2) < 0) { + DVDClose(&SimpleControl.unk00); + return 0; + } + memcpy(&SimpleControl.unk3C, &WorkBuffer, sizeof(SimpleControl.unk3C)); + if (strcmp(SimpleControl.unk3C.mMagic, "THP") != 0) { + DVDClose(&SimpleControl.unk00); + return 0; + } + if (SimpleControl.unk3C.mVersion != 0x10000) { + DVDClose(&SimpleControl.unk00); + return 0; + } + var_r31 = SimpleControl.unk3C.mCompInfoDataOffsets; + if (DVDReadPrio(&SimpleControl.unk00, &WorkBuffer, 0x20, var_r31, 2) < 0) { + DVDClose(&SimpleControl.unk00); + return 0; + } + memcpy(&SimpleControl.unk6C, &WorkBuffer, sizeof(SimpleControl.unk6C)); + var_r31 += sizeof(SimpleControl.unk6C); + SimpleControl.unk9F = 0; + for (i = 0; i < SimpleControl.unk6C.mNumComponents; i++) { + switch (SimpleControl.unk6C.mFrameComp[i]) { + case 0: + if (DVDReadPrio(&SimpleControl.unk00, &WorkBuffer, 0x20, var_r31, 2) < 0) { + DVDClose(&SimpleControl.unk00); + return 0; + } + memcpy(&SimpleControl.unk80, &WorkBuffer, sizeof(SimpleControl.unk80)); + var_r31 += sizeof(SimpleControl.unk80); + break; + case 1: + if (DVDReadPrio(&SimpleControl.unk00, &WorkBuffer, 0x20, var_r31, 2) < 0) { + DVDClose(&SimpleControl.unk00); + return 0; + } + memcpy(SimpleControl.unk88, &WorkBuffer, sizeof(SimpleControl.unk88)); + SimpleControl.unk9F = 1; + var_r31 += sizeof(SimpleControl.unk88); + break; + default: + return 0; + } + } + SimpleControl.unkA0 = SimpleControl.unk3C.mMovieDataOffsets; + SimpleControl.unkB4 = SimpleControl.unk3C.mFirstFrameSize; + SimpleControl.unkB0 = 0; + SimpleControl.unkB8 = 0; + SimpleControl.unkA4 = 0; + SimpleControl.unk144[0].unk0C = -1; + SimpleControl.unkAC = 0; + SimpleControl.unk194 = 0; + SimpleControl.unk198 = 0; + SimpleControl.unk9C = 0; + SimpleControl.unk9D = 0; + SimpleControl.unk9E = 0; + SimpleControl.unk98 = 1; + SimpleControl.unkC0 = SimpleControl.unkBC; + SimpleControl.unkC8 = 0; + return 1; +} + +s32 THPSimpleClose(void) { + if (SimpleControl.unk98 != 0 && SimpleControl.unk9C == 0) { + if (SimpleControl.unk9F != 0) { + if (SimpleControl.unk9D == 1) { + return 0; + } + } else { + SimpleControl.unk9D = 0; + } + if (SimpleControl.unkA8 == 0) { + SimpleControl.unk98 = 0; + DVDClose(&SimpleControl.unk00); + return 1; + } + } + return 0; +} + +s32 THPSimpleCalcNeedMemory(void) { + s32 var_r31; + + if (SimpleControl.unk98 != 0) { + var_r31 = ALIGN32(SimpleControl.unk3C.mBufferSize) * 10; + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04); + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04 / 4); + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04 / 4); + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04); + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04 / 4); + var_r31 += ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04 / 4); + if (SimpleControl.unk9F != 0) { + var_r31 += ALIGN32(SimpleControl.unk3C.mAudioMaxSamples * 4) * 4; + } + var_r31 += 0x1000; + return var_r31; + } + return 0; +} + +s32 THPSimpleSetBuffer(void *arg0) { + u8 *var_r31; + u32 temp_r28; + u32 temp_r29; + u32 i; + + if (SimpleControl.unk98 != 0 && SimpleControl.unk9C == 0) { + if (SimpleControl.unk9D == 1) { + return 0; + } + temp_r28 = ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04); + temp_r29 = ALIGN32(SimpleControl.unk80.unk00 * SimpleControl.unk80.unk04 / 4); + var_r31 = arg0; + for (i = 0; i < 2; i++) { + SimpleControl.unk144[i].unk00 = var_r31; + DCInvalidateRange(var_r31, temp_r28); + var_r31 += temp_r28; + SimpleControl.unk144[i].unk04 = var_r31; + DCInvalidateRange(var_r31, temp_r29); + var_r31 += temp_r29; + SimpleControl.unk144[i].unk08 = var_r31; + DCInvalidateRange(var_r31, temp_r29); + var_r31 += temp_r29; + } + for (i = 0; i < 10; i++) { + SimpleControl.unkCC[i].unk00 = (s32*) var_r31; + var_r31 += ALIGN32(SimpleControl.unk3C.mBufferSize); + SimpleControl.unkCC[i].unk08 = 0; + } + if (SimpleControl.unk9F != 0) { + for (i = 0; i < 4; i++) { + SimpleControl.unk164[i].unk00 = var_r31; + SimpleControl.unk164[i].unk04 = var_r31; + SimpleControl.unk164[i].unk08 = 0; + var_r31 += ALIGN32(SimpleControl.unk3C.mAudioMaxSamples * 4); + } + } + SimpleControl.unk94 = var_r31; + } + return 1; +} + +static inline void THPSimpleInlineFunc(void) { + if (SimpleControl.unkB8 > SimpleControl.unk3C.mNumFrames - 1) { + if (SimpleControl.unk9E != 1) { + return; + } + SimpleControl.unkB8 = 0; + SimpleControl.unkA0 = SimpleControl.unk3C.mMovieDataOffsets; + SimpleControl.unkB4 = SimpleControl.unk3C.mFirstFrameSize; + } + SimpleControl.unkA8 = 1; + if (DVDReadAsyncPrio(&SimpleControl.unk00, SimpleControl.unkCC[SimpleControl.unkB0].unk00, SimpleControl.unkB4, SimpleControl.unkA0, __THPSimpleDVDCallback, 2) != 1) { + SimpleControl.unkA8 = 0; + SimpleControl.unkA4 = 1; + } +} + +static void __THPSimpleDVDCallback(s32 result, DVDFileInfo *fileInfo) { + s32 var_r31; + + if (result == -1) { + SimpleControl.unkA4 = 1; + return; + } + if (result != -3) { + SimpleControl.unkA8 = 0; + SimpleControl.unkCC[SimpleControl.unkB0].unk04 = SimpleControl.unkB8; + SimpleControl.unkB8++; + SimpleControl.unkCC[SimpleControl.unkB0].unk08 = 1; + SimpleControl.unkA0 += SimpleControl.unkB4; + SimpleControl.unkB4 = *SimpleControl.unkCC[SimpleControl.unkB0].unk00; + if (SimpleControl.unkB0 + 1 >= 10) { + var_r31 = 0; + } else { + var_r31 = SimpleControl.unkB0 + 1; + } + SimpleControl.unkB0 = var_r31; + if (SimpleControl.unkCC[SimpleControl.unkB0].unk08 == 0 && SimpleControl.unkA4 == 0 && SimpleControl.unk9C == 1) { + THPSimpleInlineFunc(); + } + } +} + +s32 THPSimplePreLoad(s32 arg0) { + u32 var_r30; + s32 var_r29; + s32 i; + + if (SimpleControl.unk98 != 0 && SimpleControl.unk9C == 0) { + var_r30 = 10; + if (arg0 == 0 && SimpleControl.unk3C.mNumFrames < 10) { + var_r30 = SimpleControl.unk3C.mNumFrames; + } + for (i = 0; i < var_r30; i++) { + if (DVDReadPrio(&SimpleControl.unk00, SimpleControl.unkCC[SimpleControl.unkB0].unk00, SimpleControl.unkB4, SimpleControl.unkA0, 2) < 0) { + SimpleControl.unkA4 = 1; + return 0; + } + SimpleControl.unkA0 += SimpleControl.unkB4; + SimpleControl.unkB4 = *SimpleControl.unkCC[SimpleControl.unkB0].unk00; + SimpleControl.unkCC[SimpleControl.unkB0].unk08 = 1; + SimpleControl.unkCC[SimpleControl.unkB0].unk04 = SimpleControl.unkB8; + if (SimpleControl.unkB0 + 1 >= 10) { + var_r29 = 0; + } else { + var_r29 = SimpleControl.unkB0 + 1; + } + SimpleControl.unkB0 = var_r29; + SimpleControl.unkB8++; + if (SimpleControl.unkB8 > SimpleControl.unk3C.mNumFrames - 1 && SimpleControl.unk9E == 1) { + SimpleControl.unkB8 = 0; + SimpleControl.unkA0 = SimpleControl.unk3C.mMovieDataOffsets; + SimpleControl.unkB4 = SimpleControl.unk3C.mFirstFrameSize; + } + } + SimpleControl.unk9E = arg0; + SimpleControl.unk9C = 1; + return 1; + } + return 0; +} + +void THPSimpleAudioStart(void) { + SimpleControl.unk9D = 1; +} + +void THPSimpleAudioStop(void) { + SimpleControl.unk9D = 0; +} + +s32 THPSimpleLoadStop(void) { + s32 i; + + if (SimpleControl.unk98 != 0 && SimpleControl.unk9D == 0) { + SimpleControl.unk9C = 0; + if (SimpleControl.unkA8 != 0) { + DVDCancel(&SimpleControl.unk00.cb); + SimpleControl.unkA8 = 0; + } + for (i = 0; i < 10; i++) { + SimpleControl.unkCC[i].unk08 = 0; + } + for (i = 0; i < 4; i++) { + SimpleControl.unk164[i].unk08 = 0; + } + SimpleControl.unk144[0].unk0C = -1; + SimpleControl.unkA0 = SimpleControl.unk3C.mMovieDataOffsets; + SimpleControl.unkB4 = SimpleControl.unk3C.mFirstFrameSize; + SimpleControl.unkB0 = 0; + SimpleControl.unkB8 = 0; + SimpleControl.unkA4 = 0; + SimpleControl.unkAC = 0; + SimpleControl.unk194 = 0; + SimpleControl.unk198 = 0; + SimpleControl.unkBC = SimpleControl.unkC0; + SimpleControl.unkC8 = 0; + return 1; + } + return 0; +} + +s32 THPSimpleDecode(void) { + u8 *var_r29; + s32 *var_r30; + s32 temp_r27; + s32 temp_r26; + s32 temp_r25; + s32 var_r28; + s32 i; + + if (SimpleControl.unkCC[SimpleControl.unkAC].unk08 != 0) { + var_r30 = SimpleControl.unkCC[SimpleControl.unkAC].unk00 + 2; + var_r29 = (u8*) (&SimpleControl.unkCC[SimpleControl.unkAC].unk00[SimpleControl.unk6C.mNumComponents] + 2); + if (SimpleControl.unk9F != 0) { + if (SimpleControl.unk164[SimpleControl.unk194].unk08 == 0) { + for (i = 0; i < SimpleControl.unk6C.mNumComponents; var_r29 += *var_r30, var_r30++, i++) { + switch (SimpleControl.unk6C.mFrameComp[i]) { + case 0: + if (VideoDecode(var_r29) == 0) { + return 1; + } + break; + case 1: + temp_r26 = THPAudioDecode(SimpleControl.unk164[SimpleControl.unk194].unk00, var_r29, 0); + temp_r27 = OSDisableInterrupts(); + SimpleControl.unk164[SimpleControl.unk194].unk08 = temp_r26; + SimpleControl.unk164[SimpleControl.unk194].unk04 = SimpleControl.unk164[SimpleControl.unk194].unk00; + OSRestoreInterrupts(temp_r27); + SimpleControl.unk194++; + if (SimpleControl.unk194 >= 4) { + SimpleControl.unk194 = 0; + } + break; + } + } + } else { + return 3; + } + } else { + for (i = 0; i < SimpleControl.unk6C.mNumComponents; var_r29 += *var_r30, var_r30++, i++) { + if ((s32) SimpleControl.unk6C.mFrameComp[i] != 0) { + (void) i; // required to match. Optimized out unreachable code? + } else if (VideoDecode(var_r29) == 0) { + return 1; + } + } + } + SimpleControl.unkCC[SimpleControl.unkAC].unk08 = 0; + if (SimpleControl.unkAC + 1 >= 10) { + var_r28 = 0; + } else { + var_r28 = SimpleControl.unkAC + 1; + } + SimpleControl.unkAC = var_r28; + temp_r25 = OSDisableInterrupts(); + if (SimpleControl.unkCC[SimpleControl.unkB0].unk08 == 0 && SimpleControl.unkA8 == 0 && SimpleControl.unkA4 == 0 && SimpleControl.unk9C == 1) { + THPSimpleInlineFunc(); + } + OSRestoreInterrupts(temp_r25); + return 0; + } else { + return 2; + } +} + +static s32 VideoDecode(void *arg0) { + s32 temp_r31; + + bufIdx = (bufIdx + 1) & 1; + temp_r31 = THPVideoDecode(arg0, SimpleControl.unk144[bufIdx].unk00, SimpleControl.unk144[bufIdx].unk04, SimpleControl.unk144[bufIdx].unk08, SimpleControl.unk94); + if (temp_r31 == 0) { + SimpleControl.unk144[0].unk0C = SimpleControl.unkCC[SimpleControl.unkAC].unk04; + return 1; + } + return 0; +} + +s32 THPSimpleDrawCurrentFrame(GXRenderModeObj *arg0, GXColor *arg1, Mtx arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6) { + if (SimpleControl.unk144[0].unk0C >= 0) { + THPGXYuv2RgbSetup(arg0, arg1, arg2); + THPGXYuv2RgbDraw(SimpleControl.unk144[bufIdx].unk00, SimpleControl.unk144[bufIdx].unk04, SimpleControl.unk144[bufIdx].unk08, arg3, arg4, SimpleControl.unk80.unk00, SimpleControl.unk80.unk04, arg5, arg6); + THPGXRestore(); + return SimpleControl.unk144[0].unk0C; + } + return -1; +} + +static u16 VolumeTable[] = { + 0x0000, 0x0002, 0x0008, 0x0012, 0x0020, 0x0032, 0x0049, 0x0063, + 0x0082, 0x00A4, 0x00CB, 0x00F5, 0x0124, 0x0157, 0x018E, 0x01C9, + 0x0208, 0x024B, 0x0292, 0x02DD, 0x032C, 0x037F, 0x03D7, 0x0432, + 0x0492, 0x04F5, 0x055D, 0x05C9, 0x0638, 0x06AC, 0x0724, 0x07A0, + 0x0820, 0x08A4, 0x092C, 0x09B8, 0x0A48, 0x0ADD, 0x0B75, 0x0C12, + 0x0CB2, 0x0D57, 0x0DFF, 0x0EAC, 0x0F5D, 0x1012, 0x10CA, 0x1187, + 0x1248, 0x130D, 0x13D7, 0x14A4, 0x1575, 0x164A, 0x1724, 0x1801, + 0x18E3, 0x19C8, 0x1AB2, 0x1BA0, 0x1C91, 0x1D87, 0x1E81, 0x1F7F, + 0x2081, 0x2187, 0x2291, 0x239F, 0x24B2, 0x25C8, 0x26E2, 0x2801, + 0x2923, 0x2A4A, 0x2B75, 0x2CA3, 0x2DD6, 0x2F0D, 0x3048, 0x3187, + 0x32CA, 0x3411, 0x355C, 0x36AB, 0x37FF, 0x3956, 0x3AB1, 0x3C11, + 0x3D74, 0x3EDC, 0x4048, 0x41B7, 0x432B, 0x44A3, 0x461F, 0x479F, + 0x4923, 0x4AAB, 0x4C37, 0x4DC7, 0x4F5C, 0x50F4, 0x5290, 0x5431, + 0x55D6, 0x577E, 0x592B, 0x5ADC, 0x5C90, 0x5E49, 0x6006, 0x61C7, + 0x638C, 0x6555, 0x6722, 0x68F4, 0x6AC9, 0x6CA2, 0x6E80, 0x7061, + 0x7247, 0x7430, 0x761E, 0x7810, 0x7A06, 0x7C00, 0x7DFE, 0x8000 +}; + +static void MixAudio(void *arg0, void *arg1, u32 arg2) { + s32 var_r31; + u32 var_r27; + u32 var_r28; + s32 i; + u16 temp_r24; + s16 *var_r26; + s16 *var_r30; + s16 *var_r29; + + if (arg1) { + if (SimpleControl.unk98 != 0 && SimpleControl.unk9D == 1 && SimpleControl.unk9F != 0) { + var_r28 = arg2; + var_r30 = arg0; + var_r26 = arg1; + while (1) { + if (SimpleControl.unk164[SimpleControl.unk198].unk08 == 0) { + break; + } + if (SimpleControl.unk164[SimpleControl.unk198].unk08 >= var_r28) { + var_r27 = var_r28; + } else { + var_r27 = SimpleControl.unk164[SimpleControl.unk198].unk08; + } + var_r29 = SimpleControl.unk164[SimpleControl.unk198].unk04; + for (i = 0; i < var_r27; i++) { + if (SimpleControl.unkC8 != 0) { + SimpleControl.unkC8--; + SimpleControl.unkBC += SimpleControl.unkC4; + } else { + SimpleControl.unkBC = SimpleControl.unkC0; + } + temp_r24 = VolumeTable[(s32) SimpleControl.unkBC]; + var_r31 = *var_r26 + ((temp_r24 * *var_r29) >> 0xF); + if (var_r31 < -0x8000) { + var_r31 = -0x8000; + } + if (var_r31 > 0x7FFF) { + var_r31 = 0x7FFF; + } + *var_r30 = var_r31; + var_r30++; + var_r26++; + var_r29++; + var_r31 = *var_r26 + ((temp_r24 * *var_r29) >> 0xF); + if (var_r31 < -0x8000) { + var_r31 = -0x8000; + } + if (var_r31 > 0x7FFF) { + var_r31 = 0x7FFF; + } + *var_r30 = var_r31; + var_r30++; + var_r26++; + var_r29++; + } + var_r28 -= var_r27; + SimpleControl.unk164[SimpleControl.unk198].unk08 -= var_r27; + SimpleControl.unk164[SimpleControl.unk198].unk04 = var_r29; + if (SimpleControl.unk164[SimpleControl.unk198].unk08 == 0) { + SimpleControl.unk198++; + if (SimpleControl.unk198 >= 4) { + SimpleControl.unk198 = 0; + } + } + if (var_r28 == 0) { + return; + } + } + memcpy(var_r30, var_r26, var_r28 * 4); + } else { + memcpy(arg0, arg1, arg2 * 4); + } + } else if (SimpleControl.unk98 != 0 && SimpleControl.unk9D == 1 && SimpleControl.unk9F != 0) { + var_r28 = arg2; + var_r30 = arg0; + while (1) { + if (SimpleControl.unk164[SimpleControl.unk198].unk08 == 0) { + break; + } + if (SimpleControl.unk164[SimpleControl.unk198].unk08 >= var_r28) { + var_r27 = var_r28; + } else { + var_r27 = SimpleControl.unk164[SimpleControl.unk198].unk08; + } + var_r29 = SimpleControl.unk164[SimpleControl.unk198].unk04; + for (i = 0; i < var_r27; i++) { + if (SimpleControl.unkC8 != 0) { + SimpleControl.unkC8--; + SimpleControl.unkBC += SimpleControl.unkC4; + } else { + SimpleControl.unkBC = SimpleControl.unkC0; + } + temp_r24 = VolumeTable[(s32) SimpleControl.unkBC]; + var_r31 = (temp_r24 * *var_r29) >> 0xF; + if (var_r31 < -0x8000) { + var_r31 = -0x8000; + } + if (var_r31 > 0x7FFF) { + var_r31 = 0x7FFF; + } + *var_r30 = var_r31; + var_r30++; + var_r29++; + var_r31 = (temp_r24 * *var_r29) >> 0xF; + if (var_r31 < -0x8000) { + var_r31 = -0x8000; + } + if (var_r31 > 0x7FFF) { + var_r31 = 0x7FFF; + } + *var_r30 = var_r31; + var_r30++; + var_r29++; + } + var_r28 -= var_r27; + SimpleControl.unk164[SimpleControl.unk198].unk08 -= var_r27; + SimpleControl.unk164[SimpleControl.unk198].unk04 = var_r29; + if (SimpleControl.unk164[SimpleControl.unk198].unk08 == 0) { + SimpleControl.unk198++; + if (SimpleControl.unk198 >= 4) { + SimpleControl.unk198 = 0; + } + } + if (var_r28 == 0) { + return; + } + } + memset(var_r30, 0, var_r28 * 4); + } else { + memset(arg0, 0, arg2 * 4); + } +} + +s32 THPSimpleGetVideoInfo(UnkThpStruct04 *arg0) { + if (SimpleControl.unk98 != 0) { + memcpy(arg0, &SimpleControl.unk80, 8); + return 1; + } + return 0; +} + +s32 THPSimpleGetTotalFrame(void) { + if (SimpleControl.unk98 != 0) { + return SimpleControl.unk3C.mNumFrames; + } + return 0; +} + +static void THPAudioMixCallback(void) { + s32 temp_r31; + + if (AudioSystem == 0) { + SoundBufferIndex ^= 1; + AIInitDMA((u32) SoundBuffer[SoundBufferIndex], sizeof(SoundBuffer[0])); + temp_r31 = OSEnableInterrupts(); + MixAudio(SoundBuffer[SoundBufferIndex], 0, 0xA0); + DCFlushRange(SoundBuffer[SoundBufferIndex], sizeof(SoundBuffer[0])); + OSRestoreInterrupts(temp_r31); + } else { + if (AudioSystem == 1) { + if (LastAudioBuffer) { + CurAudioBuffer = LastAudioBuffer; + } + OldAIDCallback(); + LastAudioBuffer = (u8*) AIGetDMAStartAddr() + 0x80000000; + } else { + OldAIDCallback(); + CurAudioBuffer = (u8*) AIGetDMAStartAddr() + 0x80000000; + } + SoundBufferIndex ^= 1; + AIInitDMA((u32) SoundBuffer[SoundBufferIndex], sizeof(SoundBuffer[0])); + temp_r31 = OSEnableInterrupts(); + if (CurAudioBuffer) { + DCInvalidateRange(CurAudioBuffer, sizeof(SoundBuffer[0])); + } + MixAudio(SoundBuffer[SoundBufferIndex], CurAudioBuffer, 0xA0); + DCFlushRange(SoundBuffer[SoundBufferIndex], sizeof(SoundBuffer[0])); + OSRestoreInterrupts(temp_r31); + } +} + +s32 THPSimpleSetVolume(s32 left, s32 right) { + s32 temp_r29; + + if (SimpleControl.unk98 != 0 && SimpleControl.unk9F != 0) { + if (left > 127) { + left = 127; + } + if (left < 0) { + left = 0; + } + if (right > 60000) { + right = 60000; + } + if (right < 0) { + right = 0; + } + temp_r29 = OSDisableInterrupts(); + SimpleControl.unkC0 = left; + if (right != 0) { + SimpleControl.unkC8 = (right << 5); + SimpleControl.unkC4 = (SimpleControl.unkC0 - SimpleControl.unkBC) / SimpleControl.unkC8; + } else { + SimpleControl.unkC8 = 0; + SimpleControl.unkBC = SimpleControl.unkC0; + } + OSRestoreInterrupts(temp_r29); + return 1; + } + return 0; +} diff --git a/src/game/audio.c b/src/game/audio.c index 25b3006b..238122eb 100644 --- a/src/game/audio.c +++ b/src/game/audio.c @@ -160,7 +160,7 @@ void HuAudFXPanning(s32 arg0, s16 arg1) { } } -void HuAudFXListnerSet(s32 arg0, s32 arg1, float arg2, float arg3) { +void HuAudFXListnerSet(Vec* arg0, Vec* arg1, float arg2, float arg3) { if (omSysExitReq == 0) { HuAudFXListnerSetEX(arg0, arg1, arg2 + Snd3DDistOffset, @@ -171,7 +171,7 @@ void HuAudFXListnerSet(s32 arg0, s32 arg1, float arg2, float arg3) { } } -void HuAudFXListnerSetEX(s32 arg0, s32 arg1, float sndDist, float sndSpeed, float arg4, float arg5, float arg6) { +void HuAudFXListnerSetEX(Vec* arg0, Vec* arg1, float sndDist, float sndSpeed, float arg4, float arg5, float arg6) { UnkMsmStruct_02 sp1C; if (omSysExitReq == 0) { diff --git a/src/game/board/basic_space.c b/src/game/board/basic_space.c index 3fbb9bfb..58036f3c 100644 --- a/src/game/board/basic_space.c +++ b/src/game/board/basic_space.c @@ -41,8 +41,8 @@ extern void BoardPlayerMotionEndWait(s32); extern void BoardPlayerMotionShiftSet(s32, s32, f32, f32, s32); extern void BoardPlayerCoinsAdd(s32, s32); extern void BoardRotateDiceNumbers(s32); -extern void BoardCameraAnimBlendSet(s32, s16, s16); -extern s32 BoardPlayerAnimBlendCheck(s32); +extern void BoardCameraMotBlendSet(s32, s16, s16); +extern s32 BoardPlayerMotBlendCheck(s32); static omObjData *coinChgObj[4] = { NULL, @@ -64,7 +64,7 @@ static s32 coinDigitMdl[10] = { MAKE_DATA_NUM(DATADIR_BOARD, 21), }; -void BoardLandBlueExec(s32 player, s16 space) { +void BoardLandBlueExec(s32 player, s32 space) { Vec pos; s32 i; s8 coin_chg; @@ -72,8 +72,8 @@ void BoardLandBlueExec(s32 player, s16 space) { BoardCameraViewSet(2); - BoardPlayerAnimBlendSet(player, 0, 15); - while (BoardPlayerAnimBlendCheck(player) == 0) { + BoardPlayerMotBlendSet(player, 0, 15); + while (BoardPlayerMotBlendCheck(player) == 0) { HuPrcVSleep(); } if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) { @@ -105,7 +105,7 @@ void BoardLandBlueExec(s32 player, s16 space) { BoardRotateDiceNumbers(player); } -void BoardLandRedExec(s32 player, s16 space) { +void BoardLandRedExec(s32 player, s32 space) { Vec pos; s32 i; s8 coin_chg; @@ -113,8 +113,8 @@ void BoardLandRedExec(s32 player, s16 space) { BoardCameraViewSet(2); omVibrate(player, 12, 6, 6); - BoardPlayerAnimBlendSet(player, 0, 15); - while (BoardPlayerAnimBlendCheck(player) == 0) { + BoardPlayerMotBlendSet(player, 0, 15); + while (BoardPlayerMotBlendCheck(player) == 0) { HuPrcVSleep(); } if (_CheckFlag(FLAG_ID_MAKE(1, 11)) != 0) { @@ -162,7 +162,7 @@ s8 BoardCoinChgCreate(Vec *pos, s8 value) { obj = omAddObjEx(boardObjMan, 266, 0, 0, -1, &UpdateCoinChg); coinChgObj[i] = obj; - coin_chg = (coinChg *)obj->work; + coin_chg = OM_GET_WORK_PTR(obj, coinChg); coin_chg->hide = 0; coin_chg->update = 0; coin_chg->minus = (value < 0) ? 1 : 0; @@ -189,7 +189,7 @@ s32 BoardCoinChgExist(s32 index) { return index; } if (coinChgObj[index - 1] != 0) { - coin_chg = (coinChg *)coinChgObj[index - 1]->work; + coin_chg = OM_GET_WORK_PTR(coinChgObj[index - 1], coinChg); return 0; } return 1; @@ -201,7 +201,7 @@ void BoardCoinChgHide(s32 index) { return; } if (coinChgObj[index - 1] != 0) { - ((coinChg *)coinChgObj[index - 1]->work)->hide = 1; + OM_GET_WORK_PTR(coinChgObj[index - 1], coinChg)->hide = 1; } } @@ -251,7 +251,7 @@ static void CreateCoinChg(coinChg *coin_chg, Vec *pos) { static void UpdateCoinChg(omObjData *object) { coinChg *coin_chg; - coin_chg = (coinChg *)object->work; + coin_chg = OM_GET_WORK_PTR(object, coinChg); if ((coin_chg->hide != 0) || (BoardIsKill() != 0)) { if (coin_chg->coin_model != -1) { BoardModelKill(coin_chg->coin_model); diff --git a/src/game/board/main.c b/src/game/board/main.c index 4aa316e9..c71a7ebe 100644 --- a/src/game/board/main.c +++ b/src/game/board/main.c @@ -7,8 +7,11 @@ #include "game/wipe.h" #include "string.h" #include "game/hsfman.h" +#include "game/hsfdraw.h" #include "game/board/main.h" #include "game/board/player.h" +#include "game/pad.h" +#include "game/msm.h" typedef struct camera_view { s16 x_rot; @@ -22,23 +25,23 @@ u32 boardRandSeed; static omObjData *last5GfxObj; static omObjData *confettiObj; static omObjData *filterObj; -void *boardTurnStartFunc; -u32 lbl_801D3F00; -u32 lbl_801D3EFC; -u32 lbl_801D3EF8; +BoardTurnStartHook boardTurnStartFunc; +void *boardBowserHook; +void *boardStarShowNextHook; +void *boardStarGiveHook; BoardFunc boardTurnFunc; -BoardLightHook boardLightSetHook; BoardLightHook boardLightResetHook; +BoardLightHook boardLightSetHook; static BoardFunc destroyFunc; static BoardFunc createFunc; -static BOOL cameraUseBackup; +static s32 cameraUseBackup; static omObjData *tauntObj; static omObjData *cameraObj; Process *boardObjMan; Process *boardMainProc; -static BoardCameraData cameraBackup; BoardCameraData boardCamera; +static BoardCameraData cameraBackup; static OverlayID nextOvl = OVL_INVALID; @@ -53,26 +56,12 @@ static CameraView camViewTbl[] = { extern void BoardModelPosGet(s16 model, Vec *pos); -extern void BoardSpacePosGet(s32 layer, s32 space, Vec *pos); +extern s32 BoardSpacePosGet(s32 layer, s32 space, Vec *pos); -extern void fn_800A4A7C(void); -extern void fn_800A6EE4(void); +extern void BoardMGSetupPlayClear(void); +extern void BoardStartExec(void); extern s8 boardTutorialF; -extern s16 boardPlayerMdl[4]; - -void BoardKill(void); -void BoardCameraInit(void); -void BoardCameraMotionWait(void); -void BoardCameraTargetPlayerSet(s32 player); -void BoardCameraViewSet(s32 type); -void BoardCameraOffsetSet(float x, float y, float z); -void BoardCameraMoveSet(s32 move); -void BoardCameraMotionStartEx(s16 model_target, Vec *rot_target, Vec *offset_end, float zoom_target, float fov_target, s16 max_time); -void BoardRandInit(void); -float BoardRandFloat(void); -s32 BoardDataDirReadAsync(s32 data_num); -void BoardDataAsyncWait(s32 status); static void InitBoardFunc(omObjData *object); static void ExecBoardFunc(omObjData *object); @@ -82,23 +71,14 @@ static void UpdateCamera(omObjData *object); static void CalcCameraTarget(BoardCameraData *camera); static void CalcCameraPos(BoardCameraData *camera); - static void MainFunc(void); static void DestroyMainFunc(void); +static s32 ExecTurnStart(void); + static void CreateBoard(void); static void DestroyBoard(void); -static inline int GWMGTypeGet() -{ - return GWSystem.mg_type; -} - -static inline int GWMessSpeedGet() -{ - return GWSystem.mess_speed; -} - #define BOARD_FABS(value) ((value < 0) ? -(value) : (value)) void BoardCommonInit(BoardFunc create, BoardFunc destroy) @@ -116,7 +96,7 @@ void BoardCommonInit(BoardFunc create, BoardFunc destroy) _ClearFlag(FLAG_ID_MAKE(1, 9)); _ClearFlag(FLAG_ID_MAKE(0, 8)); _ClearFlag(FLAG_ID_MAKE(0, 10)); - fn_800A4A7C(); + BoardMGSetupPlayClear(); } nextOvl = OVL_INVALID; @@ -135,9 +115,9 @@ void BoardCommonInit(BoardFunc create, BoardFunc destroy) createFunc = create; destroyFunc = destroy; boardTurnFunc = NULL; - lbl_801D3EFC = 0; - lbl_801D3F00 = 0; - lbl_801D3EF8 = 0; + boardStarShowNextHook = NULL; + boardBowserHook = NULL; + boardStarGiveHook = NULL; boardTurnStartFunc = NULL; boardObjMan = omInitObjMan(64, 8192); omSystemKeyCheckSetup(boardObjMan); @@ -267,7 +247,7 @@ s32 BoardIsKill(void) return (_CheckFlag(FLAG_ID_MAKE(1, 17))) ? 1 : 0; } -void BoardPauseEnableSet(s32 value) +void BoardPauseDisableSet(s32 value) { if(_CheckFlag(FLAG_ID_MAKE(1, 11))) { _SetFlag(FLAG_ID_MAKE(1, 25)); @@ -281,7 +261,7 @@ void BoardPauseEnableSet(s32 value) } } -s32 BoardPauseEnableGet() +s32 BoardPauseDisableGet() { return (_CheckFlag(FLAG_ID_MAKE(1, 25))) ? 1 : 0; } @@ -317,6 +297,7 @@ void BoardSaveInit(s32 board) GWSystem.block_pos = 0; memset(GWSystem.board_data, 0, 32); for(i=0; i<4; i++) { + s32 party_flag; BoardPlayerAutoSizeSet(i, 0); GWPlayer[i].field00_bit9 = 0; GWPlayer[i].color = 0; @@ -347,7 +328,7 @@ void BoardSaveInit(s32 board) GWPlayer[i].items[0] = -1; GWPlayer[i].items[1] = -1; GWPlayer[i].items[2] = -1; - if(!BoardPartyFlagGet() || _CheckFlag(FLAG_ID_MAKE(1, 11))) { + if(BoardPartyFlagGet() == 0 || _CheckFlag(FLAG_ID_MAKE(1, 11))) { GWStarsSet(i, 0); } else { GWStarsSet(i, BoardPlayerHandicapGet(i)); @@ -408,7 +389,7 @@ static void MainFunc(void) s32 fade_enable, turn_cont, fade_type; fade_enable = 0; turn_cont = 0; - BoardPauseEnableSet(1); + BoardPauseDisableSet(1); if(_CheckFlag(FLAG_ID_MAKE(0, 10))) { _ClearFlag(FLAG_ID_MAKE(0, 10)); _SetFlag(FLAG_ID_MAKE(1, 16)); @@ -426,7 +407,7 @@ static void MainFunc(void) CreateBoard(); if(!_CheckFlag(FLAG_ID_MAKE(1, 1))) { GWSystem.player_curr = -1; - fn_800A6EE4(); + BoardStartExec(); GWSystem.player_curr = 0; fade_enable = 1; _SetFlag(FLAG_ID_MAKE(1, 1)); @@ -438,7 +419,7 @@ static void MainFunc(void) } if((int)(GWSystem.max_turn-GWSystem.turn) < 5 && GWSystem.player_curr == 0 && !turn_cont) { if(!_CheckFlag(FLAG_ID_MAKE(0, 8))) { - fn_800A9708(); + BoardLast5Exec(); _SetFlag(FLAG_ID_MAKE(0, 8)); } else { BoardLast5GfxInit(); @@ -457,7 +438,7 @@ static void MainFunc(void) boardTurnFunc(); GWSystem.player_curr = 0; } - fn_80070D84(); + BoardMusStartBoard(); for(i=GWSystem.player_curr; i<4; i++) { if(BoardCurrGet() == 7 || BoardCurrGet() == 8) { if((int)(GWSystem.max_turn-GWSystem.turn) < 5 && i == 0 && !turn_cont) { @@ -536,7 +517,7 @@ static void MainFunc(void) if(BoardCurrGet() == 7 || BoardCurrGet() == 8) { GWSystem.player_curr = 0; if(BoardTurnNext()) { - fn_80070EE8(0, 500); + BoardAudSeqFadeOut(0, 500); BoardKill(); HuPrcEnd(); HuPrcSleep(-1); @@ -544,7 +525,7 @@ static void MainFunc(void) } else { _SetFlag(FLAG_ID_MAKE(1, 28)); _SetFlag(FLAG_ID_MAKE(1, 14)); - BoardPauseEnableSet(1); + BoardPauseDisableSet(1); _ClearFlag(FLAG_ID_MAKE(1, 9)); if(_CheckFlag(FLAG_ID_MAKE(2, 0)) || _CheckFlag(FLAG_ID_MAKE(1, 11)) ) { for(i=0; i<4; i++) { @@ -552,14 +533,14 @@ static void MainFunc(void) } GWSystem.player_curr = (GWSystem.player_curr+1)&3; } else { - fn_800A1A34(); + BoardMGSetupExec(); HuPrcSleep(-1); } } } while(1); } -BOOL BoardTurnNext(void) +s32 BoardTurnNext(void) { s32 i; for(i=0; i<4; i++) { @@ -573,10 +554,49 @@ BOOL BoardTurnNext(void) } } +static s32 ExecTurnStart(void) +{ + s32 player; + s32 space; + if(!BoardStartCheck()) { + return 0; + } + player = GWSystem.player_curr; + space = GWPlayer[player].space_curr; + if(_CheckFlag(FLAG_ID_MAKE(1, 5))) { + BoardFortuneExec(player, space); + _ClearFlag(FLAG_ID_MAKE(1, 5)); + } else if(_CheckFlag(FLAG_ID_MAKE(1, 4))) { + BoardMusStartBoard(); + BoardBattleExec(player, space); + _ClearFlag(FLAG_ID_MAKE(1, 4)); + } else if(_CheckFlag(FLAG_ID_MAKE(1, 3))) { + BoardBowserExec(player, space); + _ClearFlag(FLAG_ID_MAKE(1, 3)); + } else if(_CheckFlag(FLAG_ID_MAKE(1, 2))) { + s32 turn_end = 0; + BoardCameraMoveSet(0); + BoardCameraViewSet(2); + BoardCameraMotionWait(); + turn_end = BoardTurnNext(); + if(turn_end) { + BoardKill(); + HuPrcEnd(); + } + _ClearFlag(FLAG_ID_MAKE(1, 2)); + return 0; + } else if(_CheckFlag(FLAG_ID_MAKE(1, 6))) { + boardTurnStartFunc(player, space); + return 1; + } + BoardPlayerZoomRestore(player); + return 1; +} + void BoardNextOvlSet(OverlayID overlay) { nextOvl = overlay; - fn_80070EE8(0, 1000); + BoardAudSeqFadeOut(0, 1000); BoardKill(); } @@ -654,19 +674,19 @@ static void CreateBoard(void) if(guest_status != -1) { BoardDataAsyncWait(guest_status); } - fn_8007111C(); + BoardAudSeqClear(); BoardModelInit(); BoardRandInit(); BoardWinInit(); BoardPlayerModelInit(); createFunc(); BoardLightSetExec(); - fn_8007A8D8(); - fn_80077ABC(); - fn_800A4F7C(); + BoardLotteryInit(); + BoardShopInit(); + BoardBooHouseCreate(); BoardCameraInit(); BoardStatusCreate(); - CharModelKillIndex(-1); + CharModelDataClose(-1); BoardPlayerInit(); if(GWSystem.last5_effect == 2) { BoardSpaceTypeForce(2, 3); @@ -705,13 +725,13 @@ static void DestroyBoard(void) MAKE_DIR_NUM(DATADIR_W21), }; BoardTauntKill(); - fn_8007116C(); + BoardAudSeqFadeOutAll(); HuAudAllStop(); - fn_80085EB4(); + BoardRollKill(); BoardStatusKill(); - fn_800A5030(); - fn_80077B90(); - fn_8007AFF4(); + BoardBooHouseKill(); + BoardShopKill(); + BoardLotteryKill(); BoardSpaceDestroy(); BoardPlayerModelKill(); if(destroyFunc) { @@ -731,6 +751,35 @@ static void DestroyBoard(void) createFunc = destroyFunc = NULL; } +void BoardLightHookSet(BoardLightHook set, BoardLightHook reset) +{ + boardLightSetHook = set; + boardLightResetHook = reset; +} + +void BoardLightSetExec(void) +{ + Hu3DBGColorSet(0, 0, 0); + if(boardLightSetHook) { + boardLightSetHook(); + } +} + +void BoardLightResetExec(void) +{ + if(boardLightResetHook) { + boardLightResetHook(); + } + Hu3DBGColorSet(0, 0, 0); + Hu3DFogClear(); + Hu3DReflectNoSet(0); +} + +static BoardCameraData *BoardCameraGet(void) +{ + return &boardCamera; +} + void BoardCameraBackup(void) { cameraUseBackup = TRUE; @@ -1150,7 +1199,7 @@ void BoardCameraInit(void) cameraObj = omAddObjEx(boardObjMan, 32258, 0, 0, -1, UpdateCamera); } -static void CalcCameraView(void) +static inline void CalcCameraView(void) { BoardCameraData *camera = &boardCamera; CalcCameraTarget(camera); @@ -1269,6 +1318,101 @@ static void CalcCameraPos(BoardCameraData *camera) CAM_LERP_VEC(time, focus->target_start, focus->target_end, camera->target) } +void BoardMGDoneFlagSet(s32 flag) +{ + if(flag) { + _SetFlag(FLAG_ID_MAKE(1, 20)); + } else { + _ClearFlag(FLAG_ID_MAKE(1, 20)); + } +} + +s32 BoardMGDoneFlagGet() +{ + return (_CheckFlag(FLAG_ID_MAKE(1, 20))) ? 1 : 0; +} + +void BoardMGExit(void) +{ + s32 player = GWSystem.player_curr; + BoardPlayerMoveToAsync(player, GWPlayer[GWSystem.player_curr].space_curr); + BoardCameraTargetPlayerSet(player); + BoardCameraMoveSet(1); + BoardCameraViewSet(1); + _ClearFlag(FLAG_ID_MAKE(1, 19)); +} + +static void KillBoardMG(omObjData *object) +{ + if(!BoardMGDoneFlagGet()) { + BoardEventFlagReset(); + omDelObjEx(HuPrcCurrentGet(), object); + } +} + +static void ExecBoardMG(omObjData *object) +{ + if(_CheckFlag(FLAG_ID_MAKE(1, 19))) { + return; + } + if(GWPlayer[GWSystem.player_curr].moving == 0) { + BoardPlayerMotionShiftSet(GWSystem.player_curr, 1, 0.0f, 10.0f, 0x40000001); + if(!_CheckFlag(FLAG_ID_MAKE(1, 21))) { + _SetFlag(FLAG_ID_MAKE(1, 20)); + object->func = KillBoardMG; + } + } +} + +void BoardMGCreate(s32 arg0) +{ + _SetFlag(FLAG_ID_MAKE(1, 19)); + _ClearFlag(FLAG_ID_MAKE(1, 20)); + GWSystem.unk_38 = arg0; + omAddObjEx(boardObjMan, 0x201, 0, 0, -1, ExecBoardMG); + BoardEventFlagSet(); + BoardSpaceWalkMiniEventExec(); +} + +void BoardEventFlagSet(void) +{ + _SetFlag(FLAG_ID_MAKE(1, 18)); +} + +void BoardEventFlagReset(void) +{ + _ClearFlag(FLAG_ID_MAKE(1, 18)); +} + +s32 BoardEventFlagGet(void) +{ + return _CheckFlag(FLAG_ID_MAKE(1, 18)) ? 1 : 0; +} + +void BoardMTXCalcLookAt(Mtx dest, Vec *eye, Vec *up, Vec *target) +{ + Vec f, u, s; + f.x = eye->x-target->x; + f.y = eye->y-target->y; + f.z = eye->z-target->z; + VECNormalize(&f, &f); + VECCrossProduct(up, &f, &u); + VECNormalize(&u, &u); + VECCrossProduct(&f, &u, &s); + dest[0][0] = u.x; + dest[0][1] = u.y; + dest[0][2] = u.z; + dest[0][3] = 0; + dest[1][0] = s.x; + dest[1][1] = s.y; + dest[1][2] = s.z; + dest[1][3] = 0; + dest[2][0] = f.x; + dest[2][1] = f.y; + dest[2][2] = f.z; + dest[2][3] = 0; +} + float BoardArcSin(float value) { float result; @@ -1285,7 +1429,7 @@ float BoardArcSin(float value) if(value <= (float)(M_PI/2)) { result = atanf(value/(float)sqrtf(1-(value*value))); } else { - result = 1.0f-atanf((float)sqrtf(1-(value*value))/value); + result = ((float)M_PI/2.0f)-atanf((float)sqrtf(1-(value*value))/value); } if(sign) { result = BOARD_FABS(result); @@ -1298,7 +1442,7 @@ float BoardArcCos(float value) if(BOARD_FABS(value) > 1) { return 0; } - return 1.0f-BoardArcSin(value); + return ((float)M_PI/2.0f)-BoardArcSin(value); } void BoardRandInit(void) @@ -1343,6 +1487,58 @@ s32 BoardVecMaxDistXZCheck(Vec *vec1, Vec *vec2, float max_dist) } } +void BoardDAngleCalcVec(Vec *vec1) +{ + int i; + float *data = (float *)(&vec1->x); + for(i=0; i<3; i++) { + while(*data > 180.0f) { + *data -= 360.0f; + } + while(*data < -180.0f) { + *data += 360.0f; + } + data++; + } +} + +float BoardDAngleCalc(float value) +{ + while(value > 180.0f) { + value -= 360.0f; + } + while(value < -180.0f) { + value += 360.0f; + } + return value; +} + +s32 BoardDAngleCalcRange(float *value, float min, float range) +{ + float diff = min-(*value); + if(diff >= 180.0f) { + min -= 360.0f; + } + if(diff <= -180.0f) { + min += 360.0f; + } + if(min > *value) { + *value += range; + if(*value >= min) { + *value = BoardDAngleCalc(min); + return 1; + } + } else { + *value -= range; + if(*value <= min) { + *value = BoardDAngleCalc(min); + return 1; + } + } + *value = BoardDAngleCalc(*value); + return 0; +} + s32 BoardVecMinDistCheck(Vec *vec1, Vec *vec2, float min_dist) { Vec temp; @@ -1355,6 +1551,678 @@ s32 BoardVecMinDistCheck(Vec *vec1, Vec *vec2, float min_dist) } } +typedef struct filter_work { + struct { + u8 kill : 1; + u8 paused : 1; + }; + u8 max_alpha; + s16 time; + s16 len; + s16 model; + GXColor color; + float speed; +} FilterWork; + +static void UpdateFilter(omObjData *object); +static void DrawFilter(ModelData *model, Mtx matrix); + +void BoardFilterFadeOut(s16 len) +{ + FilterWork *work; + float speed; + if(!filterObj) { + return; + } + if(len <= 0) { + len = 1; + } + work = OM_GET_WORK_PTR(filterObj, FilterWork); + work->len = len; + OSs16tof32(&len, &speed); + work->speed = -(work->color.a)/speed; + work->paused = 0; + work->time = work->len; +} + +void BoardFilterFadeInit(s16 len, u8 max_alpha) +{ + FilterWork *work; + if(filterObj) { + work = OM_GET_WORK_PTR(filterObj, FilterWork); + work->kill = 1; + while(filterObj) { + HuPrcVSleep(); + } + } + filterObj = omAddObjEx(boardObjMan, 32000, 0, 0, -1, UpdateFilter); + omSetStatBit(filterObj, OM_STAT_NOPAUSE|0x80); + if(len <= 0) { + len = 1; + } + work = OM_GET_WORK_PTR(filterObj, FilterWork); + work->kill = 0; + work->paused = 0; + work->color.r = 0; + work->color.g = 0; + work->color.b = 0; + work->color.a = 0; + work->max_alpha = max_alpha; + work->speed = (float)(max_alpha-work->color.a)/(float)len; + work->time = len; + work->len = len; + work->model = Hu3DHookFuncCreate(DrawFilter); + Hu3DModelLayerSet(work->model, 1); +} + +s32 BoardFilterFadePauseCheck(void) +{ + FilterWork *work; + if(!filterObj) { + return 1; + } + work = OM_GET_WORK_PTR(filterObj, FilterWork); + return (work->paused) ? 1 : 0; +} + +s32 BoardFilterFadeCheck(void) +{ + return (filterObj != NULL) ? 0 : 1; +} + +static void UpdateFilter(omObjData *object) +{ + float alpha; + FilterWork *work = OM_GET_WORK_PTR(object, FilterWork); + if(work->kill || BoardIsKill()) { + if(work->model != -1) { + Hu3DModelKill(work->model); + } + filterObj = NULL; + omDelObjEx(HuPrcCurrentGet(), object); + return; + } + if(work->paused) { + return; + } + OSu8tof32(&work->color.a, &alpha); + alpha += work->speed; + OSf32tou8(&alpha, &work->color.a); + if(work->time > 0) { + work->time--; + return; + } + if(work->speed > 0) { + work->paused = 1; + work->color.a = work->max_alpha; + } else { + work->kill = 1; + } +} + +static void DrawFilter(ModelData *model, Mtx matrix) +{ + static GXColor colorN = { 0xFF, 0xFF, 0xFF, 0xFF }; + Mtx44 proj; + Mtx modelview; + + float x1, x2, y1, y2; + FilterWork *work; + if(!filterObj) { + return; + } + work = OM_GET_WORK_PTR(filterObj, FilterWork); + x1 = 0.0f; + x2 = 640.0f; + y1 = 0.0f; + y2 = 480.0f; + MTXOrtho(proj, y1, y2, x1, x2, 0, 10); + GXSetProjection(proj, GX_ORTHOGRAPHIC); + MTXIdentity(modelview); + GXLoadPosMtxImm(modelview, GX_PNMTX0); + GXSetCurrentMtx(GX_PNMTX0); + GXSetViewport(0, 0, x2, 1.0f+y2, 0, 1); + GXSetScissor(0, 0, x2, 1.0f+y2); + GXClearVtxDesc(); + GXSetChanMatColor(GX_COLOR0A0, work->color); + GXSetNumChans(1); + GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 0, GX_DF_NONE, GX_AF_NONE); + GXSetChanCtrl(GX_COLOR1A1, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 0, GX_DF_NONE, GX_AF_NONE); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0); + GXSetTevOp(GX_TEVSTAGE0, GX_PASSCLR); + GXSetNumTexGens(0); + GXSetNumTevStages(1); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_U16, 0); + GXSetZMode(GX_TRUE, GX_ALWAYS, GX_FALSE); + GXSetAlphaUpdate(GX_FALSE); + GXSetColorUpdate(GX_TRUE); + GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); + GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXPosition2u16(x1, y1); + GXPosition2u16(x2, y1); + GXPosition2u16(x2, y2); + GXPosition2u16(x1, y2); + GXEnd(); + GXSetChanMatColor(GX_COLOR0A0, colorN); + +} + +typedef struct confetti_particle { + s16 time; + u8 alpha; + u8 light_col; + Vec pos; + Vec rot; + Vec pos_vel; + Vec rot_vel; +} ConfettiParticle; + +typedef struct confetti_work { + struct { + u8 kill : 1; + u8 paused : 1; + }; + s8 spawn_speed; + s8 time; + s8 delay; + s16 count; + s16 gfx_mdl; + s16 draw_mdl; + ConfettiParticle *data; +} ConfettiWork; + +static void UpdateConfetti(omObjData *object); +static void SpawnConfetti(omObjData *object); +static void MoveConfetti(omObjData *object); +static void DrawConfetti(ModelData *model, Mtx matrix); + + +void BoardConfettiCreate(Vec *pos, s16 count, float range) +{ + omObjData *object; + ConfettiWork *work; + if(confettiObj) { + BoardConfettiStop(); + HuPrcSleep(17); + } + object = omAddObjEx(boardObjMan, 257, 0, 0, -1, UpdateConfetti); + confettiObj = object; + work = OM_GET_WORK_PTR(object, ConfettiWork); + work->kill = 0; + work->paused = 0; + work->count = count; + work->spawn_speed = 1; + work->time = 0; + work->delay = 10; + work->draw_mdl = Hu3DHookFuncCreate(DrawConfetti); + work->data = HuMemDirectMallocNum(HEAP_SYSTEM, work->count*sizeof(ConfettiParticle), MEMORY_DEFAULT_NUM); + object->trans.x = pos->x; + object->trans.y = pos->y; + object->trans.z = pos->z; + object->rot.x = range; + work->gfx_mdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 7), NULL, 0); + BoardModelLayerSet(work->gfx_mdl, 2); + BoardModelVisibilitySet(work->gfx_mdl, 0); + { + ConfettiParticle *particle; + s32 i; + particle = work->data; + for(i=0; icount; i++, particle++) { + particle->time = -1; + } + } + HuAudFXPlay(774); +} + +void BoardConfettiKill(void) +{ + if(confettiObj) { + OM_GET_WORK_PTR(confettiObj, ConfettiWork)->kill = 1; + } +} + +void BoardConfettiStop(void) +{ + if(confettiObj) { + s32 i; + ConfettiParticle *particle; + ConfettiWork *work = OM_GET_WORK_PTR(confettiObj, ConfettiWork); + work->paused = 1; + particle = work->data; + for(i=0; icount; i++, particle++) { + if(particle->time != -1) { + if(particle->time > 16) { + particle->time = 16; + } + } + } + } +} + +static void UpdateConfetti(omObjData *object) +{ + ConfettiWork *work = OM_GET_WORK_PTR(object, ConfettiWork); + if(work->kill || BoardIsKill()) { + BoardModelKill(work->gfx_mdl); + Hu3DModelKill(work->draw_mdl); + HuMemDirectFree(work->data); + confettiObj = NULL; + omDelObjEx(HuPrcCurrentGet(), object); + } else { + SpawnConfetti(object); + MoveConfetti(object); + } +} + +static void SpawnConfetti(omObjData *object) +{ + ConfettiWork *work = OM_GET_WORK_PTR(object, ConfettiWork); + int i; + if(work->paused) { + return; + } + if(work->spawn_speed < 5) { + if(work->time++ > work->delay) { + work->time = 0; + work->spawn_speed++; + } + } + for(i=0; ispawn_speed; i++) { + ConfettiParticle *particle; + float angle; + int j; + particle = work->data; + for(j=0; jcount; j++, particle++) { + if(particle->time == -1) { + break; + } + } + if(j == work->count) { + break; + } + particle->time = BoardRandMod(60)+120; + angle = BoardRandFloat()*360.0f; + particle->pos.x = (sin((angle*M_PI)/180.0)*object->rot.x)+object->trans.x; + particle->pos.y = object->trans.y; + particle->pos.z = (cos((angle*M_PI)/180.0)*object->rot.x)+object->trans.z; + particle->pos_vel.x = 2.0f*(BoardRandFloat()-0.5f); + particle->pos_vel.y = (-98.00001f/15.0f)*BoardRandFloat(); + particle->pos_vel.z = 2.0f*(BoardRandFloat()-0.5f); + particle->rot_vel.x = 8.0f+((BoardRandFloat()-0.5f)*20.0f); + particle->rot_vel.y = 8.0f+((BoardRandFloat()-0.5f)*20.0f); + particle->rot_vel.z = 8.0f+((BoardRandFloat()-0.5f)*20.0f); + particle->rot.x = 0; + particle->rot.y = 0; + particle->rot.z = 0; + particle->alpha = 255; + particle->light_col = BoardRandMod(6); + } +} + +static void MoveConfetti(omObjData *object) +{ + ConfettiWork *work = OM_GET_WORK_PTR(object, ConfettiWork); + int i; + int existF; + ConfettiParticle *particle; + + existF = 0; + particle = work->data; + + for(i=0; icount; i++, particle++) { + if(particle->time == -1) { + continue; + } + if(particle->time <= 0) { + particle->time = -1; + continue; + } + particle->time--; + particle->pos.x += particle->pos_vel.x; + particle->pos.y += particle->pos_vel.y; + particle->pos.z += particle->pos_vel.z; + particle->rot.x += particle->rot_vel.x; + particle->rot.y += particle->rot_vel.y; + particle->rot.z += particle->rot_vel.z; + if(particle->time < 16) { + if(particle->alpha >= 15) { + particle->alpha -= 15; + } else { + particle->alpha = 0; + } + } + if(!existF) { + existF = 1; + } + } + if(existF == 0 && work->paused) { + work->kill = 1; + } +} + +static Vec confettiLightTbl[6] = { + { 0.1, 0.4, 1 }, + { 0.2, 1, 0.1 }, + { 0.3, 1, 1 }, + { 1, 0.2, 0.1 }, + { 1, 0.2, 0.8 }, + { 1, 8, 0.3 } +}; + +static void DrawConfetti(ModelData *model, Mtx matrix) +{ + if(!confettiObj || BoardIsKill()) { + return; + } else { + ConfettiWork *work = OM_GET_WORK_PTR(confettiObj, ConfettiWork); + ModelData *model = &Hu3DData[work->gfx_mdl]; + ConfettiParticle *particle; + int i; + if(!model->hsfData) { + return; + } + particle = work->data; + for(i=0; icount; i++, particle++) { + Mtx result, temp; + float r, g, b, a; + if(particle->time == -1) { + continue; + } + MTXRotDeg(temp, 'z', particle->rot.z); + MTXRotDeg(result, 'x', particle->rot.x); + MTXConcat(temp, result, result); + MTXRotDeg(temp, 'y', particle->rot.y); + MTXConcat(temp, result, result); + MTXTrans(temp, particle->pos.x, particle->pos.y, particle->pos.z); + MTXConcat(temp, result, result); + MTXConcat(matrix, result, result); + r = confettiLightTbl[particle->light_col].x; + g = confettiLightTbl[particle->light_col].y; + b = confettiLightTbl[particle->light_col].z; + OSu8tof32(&particle->alpha, &a); + a = a*(1.0f/255.0f); + Hu3DModelTPLvlSet(BoardModelIDGet(work->gfx_mdl), a); + Hu3DModelAmbSet(BoardModelIDGet(work->gfx_mdl), r, g, b); + Hu3DModelObjDraw(BoardModelIDGet(work->gfx_mdl), "grid2", result); + } + } +} + +typedef struct last5_gfx_work { + struct { + u8 kill : 1; + u8 state : 3; + u8 is_last : 1; + u8 : 4; + }; + u8 stop_time; + s16 time; + s16 group; + s16 sprites[3]; +} Last5GfxWork; + +static s32 last5GfxSprTbl[3] = { + MAKE_DATA_NUM(DATADIR_BOARD, 95), + MAKE_DATA_NUM(DATADIR_BOARD, 97), + MAKE_DATA_NUM(DATADIR_BOARD, 96), +}; + +static float last5GfxPosTbl[2][3][2] = { + { + { -80, 0 }, + { 0, 0 }, + { 80, 0 } + }, + { + { -52, 0 }, + { 0, 0 }, + { 52, 0 } + } +}; + +static void UpdateLast5Gfx(omObjData *object); + +void BoardSpriteCreate(s32 file, s16 prio, AnimData **anim, s16 *sprite); + +void BoardLast5GfxInit(void) +{ + Last5GfxWork *work; + omObjData *object; + s32 turn_remain; + s32 lastF; + turn_remain = GWSystem.max_turn-GWSystem.turn; + if(turn_remain > 4 || turn_remain < 0) { + return; + } else { + s32 i; + turn_remain = 4-turn_remain; + object = omAddObjEx(boardObjMan, 0, 0, 0, -1, UpdateLast5Gfx); + last5GfxObj = object; + work = OM_GET_WORK_PTR(object, Last5GfxWork); + work->kill = 0; + work->stop_time = 0; + work->time = 0; + work->group = HuSprGrpCreate(3); + if((s32)(GWSystem.max_turn-GWSystem.turn) == 0) { + work->is_last = 1; + lastF = 1; + } else { + work->is_last = 0; + lastF = 0; + } + for(i=0; i<3; i++) { + s16 prio; + s32 spr_file; + + if(i == 1) { + prio = 1000; + } else { + prio = 1400; + } + spr_file = last5GfxSprTbl[i]; + if(i == 2 && work->is_last && GWLanguageGet() != 0) { + spr_file = MAKE_DATA_NUM(DATADIR_BOARD, 98); + } + BoardSpriteCreate(spr_file, prio, NULL, &work->sprites[i]); + HuSprGrpMemberSet(work->group, i, work->sprites[i]); + HuSprAttrSet(work->group, i, SPIRTE_ATTR_BILINEAR); + HuSprPosSet(work->group, i, last5GfxPosTbl[lastF][i][0], last5GfxPosTbl[lastF][i][1]); + } + if(!work->is_last) { + SpriteData *sprite = &HuSprData[HuSprGrpData[work->group].members[1]]; + HuSprBankSet(work->group, 1, 0); + sprite->frame = turn_remain; + } else { + HuSprAttrSet(work->group, 1, SPRITE_ATTR_HIDDEN); + } + HuSprAttrSet(work->group, 1, SPRITE_ATTR_PAUSED); + object->trans.x = 0.0f; + HuSprGrpTPLvlSet(work->group, object->trans.x); + HuSprGrpPosSet(work->group, 288, 72); + HuAudFXPlay(838); + work->time = 0; + } +} + +static void UpdateLast5Gfx(omObjData *object) +{ + Last5GfxWork *work = OM_GET_WORK_PTR(object, Last5GfxWork); + if(work->kill || BoardIsKill()) { + HuSprGrpKill(work->group); + last5GfxObj = NULL; + omDelObjEx(HuPrcCurrentGet(), object); + return; + } + if(work->stop_time != 0) { + work->stop_time--; + return; + } + switch(work->state) { + case 0: + object->trans.x += 1.0f/30.0f; + if(object->trans.x > 1.0f) { + object->trans.x = 1.0f; + work->state = 1; + } + HuSprGrpTPLvlSet(work->group, object->trans.x); + break; + + case 1: + if(work->time >= 720) { + work->state = 2; + work->stop_time = 90; + if(work->is_last) { + HuSprGrpScaleSet(work->group, 1.0f, 1.0f); + } else { + HuSprScaleSet(work->group, 1, 1.0f, 1.0f); + } + } else { + s16 angle; + angle = work->time%180; + OSs16tof32(&angle, &object->trans.y); + object->trans.y = sin((object->trans.y*M_PI)/180.0)+0.5; + if(work->is_last) { + HuSprGrpScaleSet(work->group, object->trans.y, object->trans.y); + } else { + HuSprScaleSet(work->group, 1, object->trans.y, object->trans.y); + } + work->time += 9; + } + break; + + case 2: + object->trans.x -= 1.0f/30.0f; + if(object->trans.x < 0.0f) { + object->trans.x = 0.0f; + work->kill = 1; + } + HuSprGrpTPLvlSet(work->group, object->trans.x); + break; + } +} + +void BoardLast5GfxShowSet(s32 show) +{ + s32 i; + Last5GfxWork *work; + if(!last5GfxObj) { + return; + } + + work = OM_GET_WORK_PTR(last5GfxObj, Last5GfxWork); + for(i=0; i<3; i++) { + if(show) { + HuSprAttrReset(work->group, i, SPRITE_ATTR_HIDDEN); + } else { + HuSprAttrSet(work->group, i, SPRITE_ATTR_HIDDEN); + } + if(work->is_last) { + HuSprAttrSet(work->group, 1, SPRITE_ATTR_HIDDEN); + } + } +} + +static s32 tauntActiveFXTbl[4] = { -1, -1, -1, -1 }; +static s32 tauntFXTbl[8] = { + 294, + 358, + 422, + 486, + 550, + 614, + 678, + 742 +}; + +typedef struct taunt_work { + u8 kill : 1; +} TauntWork; + +static void TauntUpdate(omObjData *object); + +void BoardTauntInit(void) +{ + int i; + tauntObj = omAddObjEx(boardObjMan, 32258, 0, 0, -1, TauntUpdate); + for(i=0; i<4; i++) { + tauntActiveFXTbl[i] = -1; + } + _SetFlag(FLAG_ID_MAKE(1, 14)); +} + +void BoardTauntKill(void) +{ + TauntWork *work; + if(!tauntObj) { + return; + } + work = OM_GET_WORK_PTR(tauntObj, TauntWork); + work->kill = 1; + _SetFlag(FLAG_ID_MAKE(1, 14)); +} + +static void TauntUpdate(omObjData *object) +{ + int i; + s32 port; + s32 character; + TauntWork *work; + work = OM_GET_WORK_PTR(object, TauntWork); + if(work->kill || BoardIsKill()) { + for(i=0; i<4; i++) { + if(tauntActiveFXTbl[i] >= 0) { + HuAudFXStop(tauntActiveFXTbl[i]); + tauntActiveFXTbl[i] = -1; + } + } + tauntObj = NULL; + omDelObjEx(HuPrcCurrentGet(), object); + return; + } + for(i=0; i<4; i++) { + if(tauntActiveFXTbl[i] >= 0 && HuAudFXStatusGet(tauntActiveFXTbl[i]) == 0) { + tauntActiveFXTbl[i] = -1; + } + } + if(BoardPauseActiveCheck()) { + return; + } + if(_CheckFlag(FLAG_ID_MAKE(1, 14))) { + return; + } + if(WipeStatGet() != 0) { + return; + } + if(GWSystem.player_curr == -1) { + return; + } + for(i=0; i<4; i++) { + + if(i == GWSystem.player_curr || GWPlayer[i].com) { + continue; + } + port = GWPlayer[i].port & 0x3; + character = GWPlayer[i].character & 0x7; + if(tauntActiveFXTbl[port] >= 0) { + UnkMsmStruct_01 param; + float vol, pan; + vol = (64.0f*(HuPadSubStkX[port]/59.0f))+64.0f; + pan = 8191.0f*(HuPadSubStkY[port]/59.0f); + memset(¶m, 0, sizeof(UnkMsmStruct_01)); + param.unk00 = 6; + OSf32tos8(&vol, ¶m.unk05); + OSf32tos16(&pan, ¶m.unk06); + msmSeSetParam(tauntActiveFXTbl[port], ¶m); + } else { + if(HuPadBtnDown[port] & PAD_TRIGGER_L) { + tauntActiveFXTbl[port] = HuAudFXPlay(tauntFXTbl[character]); + } + } + } +} + s32 BoardDataDirReadAsync(s32 data_num) { s32 status = HuDataDirReadAsync(data_num); diff --git a/src/game/board/model.c b/src/game/board/model.c new file mode 100644 index 00000000..ef7bb9c8 --- /dev/null +++ b/src/game/board/model.c @@ -0,0 +1,1183 @@ +#include "game/board/main.h" +#include "game/board/model.h" +#include "game/hsfman.h" +#include "game/hsfmotion.h" +#include "game/memory.h" +#include "game/object.h" +#include "unsplit.h" + +#define BOARD_MODEL_MAX 256 +#define BOARD_MOT_MAX 32 + +typedef struct board_model { + struct { + u8 visible : 1; + u8 visible_old : 1; + u8 field00_bit2 : 1; + u8 field00_bit3 : 1; + u8 field00_bit4 : 1; + }; + s8 mot_count; + s8 character; + u8 alpha; + u8 layer; + u16 camera; + s16 index; + s16 id; + s16 mot_id[BOARD_MOT_MAX]; + s16 curr_mot; + HsfData *data; + HsfData *mot_data[BOARD_MOT_MAX]; + float unk_D4; + s32 data_num; + float mot_start; + float mot_end; + Vec pos; + Vec rot; + Vec scale; +} BoardModel; + +static s16 modelDataNum; +static omObjData *modelMgrObj; +static BoardModel *modelDataList; + +static void ModelMgrFunc(omObjData *object); + +static BoardModel *SearchBoardModel(s16 id); +static void KillBoardModel(BoardModel *model); +static s32 CreateBoardModel(BoardModel *model, s32 data_num, s32 link); +static s32 CreateBoardModelMotion(BoardModel *model, s32 count, s32 *data_num); + +void BoardModelDummyUpdate(void); +void BoardModelVisibilityUpdate(void); + +typedef struct modelmgr_work { + u8 kill : 1; +} ModelMgrWork; + +void BoardModelInit(void) +{ + ModelMgrWork *work; + s32 i; + modelDataList = HuMemDirectMallocNum(HEAP_SYSTEM, BOARD_MODEL_MAX*sizeof(BoardModel), MEMORY_DEFAULT_NUM); + reflectMapNo = 0; + modelDataNum = 0; + memset(modelDataList, 0, BOARD_MODEL_MAX*sizeof(BoardModel)); + for(i=0; ikill = 0; + omSetStatBit(modelMgrObj, OM_STAT_NOPAUSE|0x80); +} + +void BoardModelKillAll(void) +{ + if(modelMgrObj) { + ModelMgrWork *work = OM_GET_WORK_PTR(modelMgrObj, ModelMgrWork); + work->kill = 1; + } + if(modelDataList) { + BoardModel *model; + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + KillBoardModel(model); + } + if(modelDataList) { + HuMemDirectFree(modelDataList); + modelDataList = NULL; + } + + } +} + +static void ModelMgrFunc(omObjData *object) +{ + ModelMgrWork *work = OM_GET_WORK_PTR(modelMgrObj, ModelMgrWork); + if(work->kill || BoardIsKill()) { + modelMgrObj = NULL; + omDelObjEx(HuPrcCurrentGet(), object); + return; + } + BoardModelDummyUpdate(); + BoardModelVisibilityUpdate(); +} + +void BoardModelDummyUpdate(void) +{ + +} + +void BoardModelVisibilityUpdate(void) +{ + s32 i; + BoardModel *model; + u32 temp[2]; + Vec pos, target; + temp[1] = temp[0] = 0; + BoardCameraPosGet(&pos); + BoardCameraTargetGet(&target); + for(i=0, model = modelDataList; iindex == -1) { + continue; + } + attr = Hu3DModelAttrGet(model->id); + if(!model->visible) { + if(!(attr & 0x1)) { + Hu3DModelAttrSet(model->id, 1); + } + } else { + if(attr & 0x1) { + Hu3DModelAttrReset(model->id, 1); + } + } + } +} + +void BoardModelHideSetAll(s32 flag) +{ + BoardModel *model; + if(!modelDataList) { + return; + } + + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + if(model->index == -1) { + continue; + } + if(flag) { + model->visible_old = model->visible; + model->visible = 0; + } else { + model->visible = model->visible_old; + } + } +} + +void BoardModelAmbSetAll(float r, float g, float b) +{ + BoardModel *model; + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + if(model->index == -1) { + continue; + } + BoardModelAmbSet(model->index, r, g, b); + } +} + +void BoardModelCameraSetAll(u16 camera) +{ + BoardModel *model; + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + if(model->index == -1) { + continue; + } + if(model->character != -1) { + continue; + } + Hu3DModelCameraSet(model->id, camera); + model->camera = camera; + } +} + +static s16 CreateInstance(s32 character, s32 data_num, s32 *mot_list, s32 link, s32 arg4) +{ + BoardModel *model; + s32 i; + model = NULL; + for(i=0; iindex = i+1; + model->character = character; + modelDataNum++; + if(CreateBoardModel(model, data_num, link) == 0) { + s32 count; + count = 0; + if(mot_list) { + for(count=0; mot_list[count] >= 0; count++); + if(count >= BOARD_MOT_MAX) { + count = BOARD_MOT_MAX; + } + } + for(i=0; imot_id[i] = -1; + } + if(CreateBoardModelMotion(model, count, mot_list) == 0) { + model->visible = 1; + model->visible_old = model->visible; + model->field00_bit2 = 0; + model->field00_bit4 = 0; + model->unk_D4 = 100.0f; + model->scale.x = model->scale.y = model->scale.z = 1.0f; + model->curr_mot = 0; + Hu3DModelCameraSet(model->id, 1); + Hu3DModelLayerSet(model->id, 0); + model->field00_bit3 = 0; + model->alpha = 255; + BoardModelPosSet(model->index, 0.0f, 0.0f, 0.0f); + BoardModelRotSet(model->index, 0.0f, 0.0f, 0.0f); + BoardModelScaleSet(model->index, 1.0f, 1.0f, 1.0f); + BoardModelAmbSet(model->index, 1.0f, 1.0f, 1.0f); + return model->index; + } + } + BoardModelKill(model->index); + return -1; +} + +s16 BoardModelCreate(s32 data_num, s32 *mot_list, s32 link) +{ + return CreateInstance(-1, data_num, mot_list, link, 0); +} + +s16 BoardModelCreateCharacter(s32 character, s32 data_num, s32 *mot_list, s32 link) +{ + return CreateInstance(character, data_num, mot_list, link, 0); +} + +s16 BoardModelCreateParam(BoardModelParam *param, Vec *pos, Vec *rot) +{ + float unk_param; + s16 model = BoardModelCreate(param->data_num, NULL, param->link); + if(model == -1) { + return -1; + } + BoardModelMotionStart(model, 0, (param->pause) ? 0x40000001 : 0); + if(!param->start_mot) { + BoardModelMotionSpeedSet(model, 0.0f); + } + BoardModelExistDupe(model, param->field04_bit0); + BoardModelVisibilitySet(model, param->visible); + if(pos) { + BoardModelPosSetV(model, pos); + } + if(rot) { + BoardModelRotSetV(model, rot); + } + OSs16tof32(¶m->unk6, &unk_param); + fn_8006DDE8(model, unk_param); + return model; +} + +void BoardModelKill(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(model_ptr) { + KillBoardModel(model_ptr); + } +} + +s16 BoardModelIDGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + return model_ptr->id; + } +} + +s32 fn_8006DC1C(s16 model, s32 arg1) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->field00_bit3 = arg1; + return 0; + } +} + +s32 BoardModelPassSet(s16 model, s32 pass) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(pass != 0) { + Hu3DModelAttrSet(model_ptr->id, 2); + } else { + Hu3DModelAttrReset(model_ptr->id, 2); + } + return 0; + } +} + +s32 BoardModelAmbSet(s16 model, float r, float g, float b) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelAmbSet(model_ptr->id, r, g, b); + return 0; + } +} + +s32 BoardModelExistCheck(s16 model, s32 arg1) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + return 0; + } +} + +s32 BoardModelExistDupe(s16 model, s32 arg1) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + return 0; + } +} + +s32 fn_8006DDE8(s16 model, float arg1) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(arg1 < 0) { + arg1 = -1; + } + model_ptr->unk_D4 = arg1; + return 0; + } +} + +s32 BoardModelMotionCreate(s16 model, s32 data_num) +{ + BoardModel *model_ptr = SearchBoardModel(model); + s32 i; + if(!model_ptr) { + return -1; + } else { + s16 id; + if(model_ptr->mot_count >= BOARD_MOT_MAX) { + return -1; + } + for(i=1; imot_id[i] == -1) { + break; + } + } + if(model_ptr->character == -1) { + model_ptr->mot_data[i] = HuDataSelHeapReadNum(data_num, MEMORY_DEFAULT_NUM, HEAP_DATA); + if(!model_ptr->mot_data[i]) { + return -1; + } + model = Hu3DJointMotion(model_ptr->id, model_ptr->mot_data[i]); + } else { + model = CharMotionCreate(model_ptr->character, data_num); + CharMotionDataClose(model_ptr->character); + } + model_ptr->mot_id[i] = model; + model_ptr->mot_count++; + return i; + } +} + +s32 BoardModelMotionKill(s16 model, s32 motion) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(motion >= BOARD_MOT_MAX || motion <= 0) { + return -1; + } + if(motion == model_ptr->curr_mot && model_ptr->curr_mot != 0) { + BoardModelMotionStart(model, 0, 0); + } + if(model_ptr->mot_id[motion] > 0) { + if(model_ptr->character == -1) { + Hu3DMotionKill(model_ptr->mot_id[motion]); + } else { + CharMotionKill(model_ptr->character, model_ptr->mot_id[motion]); + } + model_ptr->mot_id[motion] = -1; + } + model_ptr->mot_data[motion] = NULL; + model_ptr->mot_count--; + return 0; + } +} + +s32 BoardModelMotionStartEndSet(s16 model, s16 start, s16 end) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(start >= 0) { + OSs16tof32(&start, &model_ptr->mot_start); + } + if(end >= 0) { + OSs16tof32(&end, &model_ptr->mot_end); + } + Hu3DMotionStartEndSet(model_ptr->id, model_ptr->mot_start, model_ptr->mot_end); + return 0; + } +} + +s32 BoardModelMotionUpdateSet(s16 model, s32 flag) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(flag) { + Hu3DModelAttrSet(model_ptr->id, 0x40000001); + } else { + Hu3DModelAttrReset(model_ptr->id, 0x40000001); + } + return 0; + } +} + +s32 BoardModelVoiceEnableSet(s16 model, s32 motion, s32 flag) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(motion >= BOARD_MOT_MAX || motion < 0) { + return 0; + } + if(model_ptr->character == -1) { + return 0; + } + CharModelVoiceEnableSet(model_ptr->character, model_ptr->mot_id[motion], flag); + return 0; + } +} + +s32 BoardModelMotionStart(s16 model, s32 motion, u32 attr) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(motion >= BOARD_MOT_MAX || motion < 0) { + return 0; + } + Hu3DMotionSpeedSet(model_ptr->id, 1.0f); + if(model_ptr->character == -1) { + Hu3DMotionSet(model_ptr->id, model_ptr->mot_id[motion]); + } else { + CharModelMotionSet(model_ptr->character, model_ptr->mot_id[motion]); + } + model_ptr->mot_start = 0.0f; + if(model_ptr->character == -1) { + model_ptr->mot_end = Hu3DMotionMaxTimeGet(model_ptr->id); + } else { + model_ptr->mot_end = CharModelMotionMaxTimeGet(model_ptr->character); + } + model_ptr->field00_bit4 = 0; + if(attr & 0x40000024) { + if(model_ptr->character == -1) { + Hu3DMotionTimeSet(model_ptr->id, model_ptr->mot_end); + } else { + CharModelMotionTimeSet(model_ptr->character, model_ptr->mot_end); + } + } + Hu3DModelAttrReset(model_ptr->id, 0x40000003); + Hu3DModelAttrSet(model_ptr->id, attr); + model_ptr->curr_mot = motion; + return 0; + } +} + +s32 BoardModelMotionShiftIDGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + return Hu3DMotionShiftIDGet(model_ptr->id); + } +} + +s32 BoardModelMotionShiftSet(s16 model, s32 motion, float time, float shift_time, u32 attr) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(motion >= BOARD_MOT_MAX || motion < 0) { + return -1; + } + model_ptr->mot_start = 0.0f; + if(model_ptr->character == -1) { + model_ptr->mot_end = Hu3DMotionMaxTimeGet(model_ptr->id); + } else { + model_ptr->mot_end = CharModelMotionMaxTimeGet(model_ptr->character); + } + model_ptr->field00_bit4 = 0; + if(model_ptr->character == -1) { + Hu3DMotionShiftSet(model_ptr->id, model_ptr->mot_id[motion], time, shift_time, attr); + } else { + CharModelMotionShiftSet(model_ptr->character, model_ptr->mot_id[motion], time, shift_time, attr); + } + model_ptr->curr_mot = motion; + return 0; + } +} + +s32 BoardModelAttrSet(s16 model, u32 attr) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelAttrSet(model_ptr->id, attr); + return 0; + } +} + +s32 BoardModelAttrReset(s16 model, u32 attr) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelAttrReset(model_ptr->id, attr); + return 0; + } +} + +s32 BoardModelMotionTimeSet(s16 model, float time) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(model_ptr->character == -1) { + Hu3DMotionTimeSet(model_ptr->id, time); + } else { + CharModelMotionTimeSet(model_ptr->character, time); + } + return 0; + } +} + +float BoardModelMotionTimeGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + float time; + if(model_ptr->character == -1) { + time = Hu3DData[model_ptr->id].unk_64; + } else { + time = CharModelMotionTimeGet(model_ptr->character); + } + return time; + } +} + +float BoardModelMotionMaxTimeGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + float time; + if(model_ptr->character == -1) { + time = Hu3DMotionMaxTimeGet(model_ptr->id); + } else { + time = CharModelMotionMaxTimeGet(model_ptr->character); + } + return time; + } +} + +float BoardModelMotionSpeedGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model = &Hu3DData[model_ptr->id]; + return hsf_model->unk_68; + } +} + +s32 BoardModelMotionSpeedSet(s16 model, float speed) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(model_ptr->character == -1) { + Hu3DMotionSpeedSet(model_ptr->id, speed); + } else { + CharModelMotionSpeedSet(model_ptr->character, speed); + } + hsf_model = &Hu3DData[model_ptr->id]; + hsf_model->unk_88 = speed; + return 0; + } +} + +s32 BoardModelMotionEndCheck(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return 1; + } else { + s32 result; + if(model_ptr->character == -1) { + result = Hu3DMotionEndCheck(model_ptr->id); + } else { + result = CharModelMotionEndCheck(model_ptr->character); + } + return result; + } +} + +s32 BoardModelMotionShapeSet(s16 model, s32 motion, u32 attr) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(model_ptr->character != -1) { + return -1; + } + if(motion >= BOARD_MOT_MAX) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + hsf_model->unk_98 = 1.0f; + Hu3DMotionShapeSet(model_ptr->id, model_ptr->mot_id[motion]); + if(attr & 0x40000100) { + float max_time = Hu3DMotionMaxTimeGet(model_ptr->id); + hsf_model->unk_94 = max_time; + } + Hu3DModelAttrSet(model_ptr->id, attr); + return 0; + } +} + +float BoardModelMotionShapeTimeGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(model_ptr->character != -1) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + return hsf_model->unk_94; + } +} + +float BoardModelMotionShapeMaxTimeGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + MotionData *motion; + HsfMotion *motion_hsf; + if(model_ptr->character != -1) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + if(hsf_model->unk_0E == -1) { + return 0; + } + motion = &Hu3DMotion[hsf_model->unk_0E]; + motion_hsf = motion->unk_04->motion; + return motion_hsf->len; + } +} + +s32 BoardModelMotionShapeSpeedSet(s16 model, float speed) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(model_ptr->character != -1) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + hsf_model->unk_98 = speed; + return 0; + } +} + +float BoardModelMotionShapeSpeedGet(s16 model, float speed) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + hsf_model = &Hu3DData[model_ptr->id]; + return hsf_model->unk_98; + } +} + +s32 BoardModelMotionShapeEndCheck(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return 1; + } else { + ModelData *hsf_model; + if(model_ptr->character != -1) { + return 1; + } + hsf_model = &Hu3DData[model_ptr->id]; + if(hsf_model->attr & 0x40000100) { + return hsf_model->unk_94 <= 0.0f; + } + return BoardModelMotionShapeMaxTimeGet(model) <= hsf_model->unk_94; + } +} + +s32 BoardModelMotionShapeStartEndSet(s16 model, s16 start, s16 end) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + if(model_ptr->character != -1) { + return -1; + } + if(start >= 0) { + OSs16tof32(&start, &model_ptr->mot_start); + } + if(end >= 0) { + OSs16tof32(&end, &model_ptr->mot_end); + } + Hu3DMotionShapeStartEndSet(model_ptr->id, model_ptr->mot_start, model_ptr->mot_end); + return 0; + } +} + +s32 BoardModelAlphaSet(s16 model, u8 alpha) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + float tp_lvl; + model_ptr->alpha = alpha; + OSu8tof32(&alpha, &tp_lvl); + tp_lvl = tp_lvl*(1.0f/255.0f); + Hu3DModelTPLvlSet(model_ptr->id, tp_lvl); + return 0; + } +} + +s32 BoardModelMtxSet(s16 model, Mtx *src) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(!src) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + MTXCopy(*src, hsf_model->unk_F0); + return 0; + } +} + +s32 BoardModelMtxGet(s16 model, Mtx *dst) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + ModelData *hsf_model; + if(!dst) { + return -1; + } + hsf_model = &Hu3DData[model_ptr->id]; + MTXCopy(hsf_model->unk_F0, *dst); + return 0; + } +} + +s32 BoardModelRotYSet(s16 model, float rot) +{ + Vec rot_orig; + BoardModelRotGet(model, &rot_orig); + return BoardModelRotSet(model, rot_orig.x, BoardDAngleCalc(rot), rot_orig.z); +} + +float BoardModelRotYGet(s16 model) +{ + Vec rot; + BoardModelRotGet(model, &rot); + return rot.y; +} + +s32 BoardModelPosSetV(s16 model, Vec *pos) +{ + if(!pos) { + return -1; + } else { + return BoardModelPosSet(model, pos->x, pos->y, pos->z); + } +} + + +s32 BoardModelPosSet(s16 model, float x, float y, float z) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->pos.x = x; + model_ptr->pos.y = y; + model_ptr->pos.z = z; + Hu3DModelPosSetV(model_ptr->id, &model_ptr->pos); + return 0; + } +} + +s32 BoardModelRotSetV(s16 model, Vec *pos) +{ + if(!pos) { + return -1; + } else { + return BoardModelRotSet(model, pos->x, pos->y, pos->z); + } +} + +s32 BoardModelRotSet(s16 model, float x, float y, float z) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->rot.x = x; + model_ptr->rot.y = y; + model_ptr->rot.z = z; + Hu3DModelRotSetV(model_ptr->id, &model_ptr->rot); + return 0; + } +} + +s32 BoardModelScaleSetV(s16 model, Vec *pos) +{ + if(!pos) { + return -1; + } else { + return BoardModelScaleSet(model, pos->x, pos->y, pos->z); + } +} + +s32 BoardModelScaleSet(s16 model, float x, float y, float z) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->scale.x = x; + model_ptr->scale.y = y; + model_ptr->scale.z = z; + Hu3DModelScaleSetV(model_ptr->id, &model_ptr->scale); + return 0; + } +} + +s32 BoardModelPosGet(s16 model, Vec *dst) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr || !dst) { + return -1; + } else { + *dst = model_ptr->pos; + return 0; + } +} + +s32 BoardModelRotGet(s16 model, Vec *dst) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr || !dst) { + return -1; + } else { + *dst = model_ptr->rot; + return 0; + } +} + +s32 BoardModelScaleGet(s16 model, Vec *dst) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr || !dst) { + return -1; + } else { + *dst = model_ptr->scale; + return 0; + } +} + +s32 BoardModelVisibilitySet(s16 model, s32 visible) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->visible = visible; + return 0; + } +} + +s32 BoardModelVisibilityGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return 0; + } else { + return model_ptr->visible; + } +} + +s32 BoardModelCameraSet(s16 model, u16 camera) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelCameraSet(model_ptr->id, camera); + model_ptr->camera = camera; + return 0; + } +} + +s32 BoardModelLayerSet(s16 model, u8 layer) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + model_ptr->layer = layer; + Hu3DModelLayerSet(model_ptr->id, layer); + return 0; + } +} + +s32 BoardModelLayerGet(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + return model_ptr->layer; + } +} + +void BoardModelLayerSetAll(s32 layer) +{ + BoardModel *model; + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + if(model->index == -1 || model->character != -1) { + continue; + } + Hu3DModelLayerSet(model->id, layer); + } +} + +s32 BoardModelHookSet(s16 model, char *name, s16 hook) +{ + BoardModel *model_ptr = SearchBoardModel(model); + + if(!model_ptr) { + return -1; + } else { + BoardModel *hook_ptr = SearchBoardModel(hook); + if(!hook_ptr || !name) { + return -1; + } + Hu3DModelHookSet(model_ptr->id, name, hook_ptr->id); + BoardModelPosSet(hook, 0, 0, 0); + return 0; + } +} + +s32 BoardModelHookReset(s16 model) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelHookReset(model_ptr->id); + return 0; + } +} + +s32 BoardModelHookObjReset(s16 model, char *name) +{ + BoardModel *model_ptr = SearchBoardModel(model); + if(!model_ptr) { + return -1; + } else { + Hu3DModelHookObjReset(model_ptr->id, name); + return 0; + } +} + +static BoardModel *SearchBoardModel(s16 id) +{ + BoardModel *model; + if(id <= 0 || id > BOARD_MODEL_MAX || !modelDataList || BoardIsKill()) { + return NULL; + } + model = &modelDataList[id-1]; + if(model->index != id) { + return NULL; + } + return model; +} + +static void KillBoardModel(BoardModel *model) +{ + s32 i; + if(model->index == -1) { + return; + } + if(model->character == -1) { + model->mot_id[0] = -1; + if(model->id >= 0) { + Hu3DModelKill(model->id); + model->id = -1; + } + for(i=1; imot_id[i] >= 0) { + if(i != 0) { + Hu3DMotionKill(model->mot_id[i]); + } + model->mot_id[i] = -1; + } + model->mot_data[i] = NULL; + } + model->data = NULL; + model->data_num = 0; + } else { + for(i=0; imot_id[i] = -1; + model->mot_data[i] = NULL; + } + if(model->data) { + if(model->id >= 0) { + model->id = -1; + } + model->data = NULL; + } + CharModelKill(model->character); + model->character = -1; + } + modelDataNum--; + model->index = -1; + model->visible = 0; +} + +static BoardModel *FindLinkModel(s32 data_num) +{ + BoardModel *model; + for(model=modelDataList; model < &modelDataList[BOARD_MODEL_MAX]; model++) { + if(model->data_num == data_num) { + return model; + } + } + return NULL; +} + +static s32 CreateBoardModel(BoardModel *model, s32 data_num, s32 link) +{ + BoardModel *linked_mdl = NULL; + if(link && model->character == -1) { + linked_mdl = FindLinkModel(data_num); + if(linked_mdl) { + model->id = Hu3DModelLink(linked_mdl->id); + model->data = NULL; + model->data_num = 0; + return 0; + } + } + if(model->character == -1) { + model->data = HuDataSelHeapReadNum(data_num, MEMORY_DEFAULT_NUM, HEAP_DATA); + if(!model->data) { + s32 size_data, size_dvd; + size_data = HuMemHeapSizeGet(HEAP_DATA)-HuMemUsedMallocSizeGet(HEAP_DATA); + size_dvd = HuMemHeapSizeGet(HEAP_DVD)-HuMemUsedMallocSizeGet(HEAP_DVD); + return -1; + } + } else { + model->data = NULL; + } + if(model->character == -1) { + model->id = Hu3DModelCreate(model->data); + } else { + model->id = CharModelCreate(model->character, 2); + } + Hu3DModelAttrSet(model->id, 0x4000); + if(model->id < 0) { + return -1; + } else { + model->data_num = data_num; + return 0; + } +} + +static s32 CreateBoardModelMotion(BoardModel *model, s32 count, s32 *data_num) +{ + void *data; + s32 i; + model->mot_id[0] = Hu3DData[model->id].unk_08; + if(!data_num) { + model->mot_count = 1; + return 0; + } + data = NULL; + for(i=0; icharacter == -1) { + data = HuDataSelHeapReadNum(data_num[i], MEMORY_DEFAULT_NUM, HEAP_DATA); + if(!data) { + return -1; + } + index = Hu3DJointMotion(model->id, data); + } else { + index = CharMotionCreate(model->character, data_num[i]); + } + if(index < 0) { + return -1; + } + model->mot_id[i+1] = index; + model->mot_data[i+1] = data; + } + model->mot_count = count+1; + return 0; +} \ No newline at end of file diff --git a/src/game/board/player.c b/src/game/board/player.c index 3f5c3a39..056fc9a8 100644 --- a/src/game/board/player.c +++ b/src/game/board/player.c @@ -41,7 +41,7 @@ extern void BoardModelMotionCreate(s16, s32); extern void BoardModelMotionKill(s16, s32); extern s32 BoardModelMotionEndCheck(s16); extern s32 BoardModelMotionStart(s16, s32, s32); -extern s32 BoardModelMotionShiftSet(s16, s32, f32, f32, s32); +extern s32 BoardModelMotionShiftSet(s16, s32, f32, f32, u32); extern void BoardModelMotionSpeedSet(s16, f32); extern void BoardModelMotionTimeSet(s16, f32); extern f32 BoardModelMotionTimeGet(s16); @@ -52,16 +52,16 @@ extern void BoardModelAttrReset(s16, s32); //// #include "game/board/tutorial.h" extern BoardTutorialHookExec(s16, s32); //// #include "game/board/com.h" -extern void fn_8007185C(s32, s32); +extern void BoardComUseItemSet(s32, s32); //// #include "game/board/overhead.h" -extern void fn_800729A4(s32); -extern void fn_80072DA8(s32); -//// #include "game/board/dice_roll.h" +extern void BoardViewOverheadExec(s32); +extern void BoardViewMapExec(s32); +//// #include "game/board/roll.h" extern s32 fn_80085CC8(s32); extern void fn_80085EB4(void); //// #include "game/chrman.h" -extern void CharModelKillIndex(s16); -extern void CharModelSetStepType(s16, s32); +extern void CharModelDataClose(s16); +extern void CharModelStepTypeSet(s16, s32); //// static void UpdateJunctionGfx(omObjData*); @@ -82,7 +82,7 @@ s32 DoDebugMove(s32, s16*); s32 DoSparkSpace(s32, s16*); s32 ExecJunction(s32, s16*); s32 MegaPlayerPassFunc(s32, s16); -s32 BoardPlayerAnimBlendCheck(s32); +s32 BoardPlayerMotBlendCheck(s32); typedef struct bitcopy { struct { @@ -115,7 +115,7 @@ static s16 suitPlayerMdl = -1; static s16 suitCurrMot = -1; static s32 diceJumpObj[4] = {0, 0, 0, 0}; -static s32 animDoneF[4] = {0, 0, 0, 0}; +static s32 motDoneF[4] = {0, 0, 0, 0}; static s16 bowserSuitMot[5] = {-1, -1, -1, -1, -1}; char* lbl_8013993C[] = { "eye1", @@ -179,7 +179,7 @@ void BoardPlayerInit(void) { for (var_r31 = 0; var_r31 < 4; var_r31++) { GWPlayer[var_r31].space_curr = temp_r30; - fn_80062D90(var_r31); + BoardPlayerCornerPosSet(var_r31); BoardPlayerSizeSet(var_r31, 0); GWPlayer[var_r31].color = 0; GWPlayer[var_r31].bowser_suit = 0; @@ -190,7 +190,7 @@ void BoardPlayerInit(void) { } for (var_r31 = 0; var_r31 < 4; var_r31++) { - fn_80062D90(var_r31); + BoardPlayerCornerPosSet(var_r31); if (BoardPlayerAutoSizeGet(var_r31) != 0) { BoardPlayerAutoSizeSet(var_r31, BoardPlayerAutoSizeGet(var_r31)); BoardStatusHammerShowSet(var_r31, 0); @@ -227,7 +227,7 @@ void BoardPlayerModelInit(void) { for (var_r31 = 0; var_r31 < 4; var_r31++) { preTurnHook[var_r31] = 0; postTurnHook[var_r31] = 0; - animDoneF[var_r31] = 0; + motDoneF[var_r31] = 0; diceJumpObj[var_r31] = 0; temp_r22 = &GWPlayer[var_r31]; temp_r27 = temp_r22; @@ -266,7 +266,7 @@ void BoardPlayerModelInit(void) { GWPlayer[var_r31].diff = GWPlayerCfg[var_r31].diff; GWPlayerCfg[var_r31].diff = GWPlayerCfg[var_r31].diff; temp_r27->space_prev = -1; - CharModelKillIndex(GWPlayer[var_r31].character); + CharModelDataClose(GWPlayer[var_r31].character); } CharModelLayerSetAll(2); } @@ -375,14 +375,14 @@ s32 BoardPlayerItemCount(s32 arg0) { return var_r30; } -void fn_80062D90(s32 arg0) { +void BoardPlayerCornerPosSet(s32 arg0) { Vec sp8; - BoardPlayerCurrSpacePosDirGet(arg0, &sp8); + BoardPlayerCornerPosGet(arg0, &sp8); BoardPlayerPosSetV(arg0, &sp8); } -void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) { +void BoardPlayerCornerPosGet(s32 arg0, Point3d* arg1) { s32 var_r31; s32 var_r30; s32 var_r29; @@ -400,7 +400,7 @@ void BoardPlayerCurrSpacePosDirGet(s32 arg0, Point3d* arg1) { var_r29 += 1; } } - BoardSpaceDirPosGet(temp_r28, var_r29, arg1); + BoardSpaceCornerPosGet(temp_r28, var_r29, arg1); } } @@ -531,7 +531,7 @@ void BoardPlayerMotionStart(s32 arg0, s32 arg1, s32 arg2) { } } -void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, s32 arg2) { +void BoardPlayerMotionShiftSet(s32 arg0, s32 arg1, f32 arg8, f32 arg9, u32 arg2) { PlayerState* player; s32 temp_r29; @@ -607,11 +607,11 @@ void BoardPlayerSizeSet(s32 arg0, s32 arg1) { temp_r27 = BoardPlayerGet(arg0); temp_r27->size = arg1; if (arg1 == 2) { - CharModelSetStepType(GWPlayer[arg0].character, 4); + CharModelStepTypeSet(GWPlayer[arg0].character, 4); } else if (arg1 == 1) { - CharModelSetStepType(GWPlayer[arg0].character, 5); + CharModelStepTypeSet(GWPlayer[arg0].character, 5); } else { - CharModelSetStepType(GWPlayer[arg0].character, 0); + CharModelStepTypeSet(GWPlayer[arg0].character, 0); } BoardModelScaleSetV(BoardPlayerModelGet(arg0), &temp_r4[arg1]); } @@ -682,7 +682,7 @@ void BoardPlayerPostTurnHookSet(s32 arg0, s32 (*arg1)()) { void BoardPlayerTurnExec(s32 arg0) { BoardPauseEnableSet(1); - fn_8007185C(arg0, -1); + BoardComUseItemSet(arg0, -1); GWSystem.field31_bit4 = 0xF; _ClearFlag(0x10016); _ClearFlag(0x1000E); @@ -741,11 +741,11 @@ void BoardPlayerTurnRollExec(s32 arg0) { break; case -3: fn_80085EB4(); - fn_80072DA8(arg0); + BoardViewMapExec(arg0); break; case -4: fn_80085EB4(); - fn_800729A4(arg0); + BoardViewOverheadExec(arg0); break; } } while (temp_r30 <= 0); @@ -918,10 +918,10 @@ void BoardPlayerZoomRestore(s32 arg0) { var_r31 = (var_r31 + 1) & 3; (void)var_r29; // } - BoardSpaceDirPosGet(temp_r27, var_r29, &sp18); - BoardPlayerAnimBlendSet(arg0, 0, 0xF); + BoardSpaceCornerPosGet(temp_r27, var_r29, &sp18); + BoardPlayerMotBlendSet(arg0, 0, 0xF); - while (BoardPlayerAnimBlendCheck(arg0) == 0) { + while (BoardPlayerMotBlendCheck(arg0) == 0) { HuPrcVSleep(); } BoardRotateDiceNumbers(arg0); diff --git a/src/game/board/space.c b/src/game/board/space.c index ff4a96a2..5d1d899c 100644 --- a/src/game/board/space.c +++ b/src/game/board/space.c @@ -1,18 +1,39 @@ #include "game/gamework_data.h" #include "game/flag.h" #include "game/board/main.h" +#include "game/board/player.h" #include "game/board/space.h" +#include "game/hsfman.h" +#include "game/data.h" +#include "game/sprite.h" #include "math.h" +#include "string.h" + +extern void omVibrate(s16, s16, s16, s16); + extern s16 BoardStarHostMdlGet(void); extern void BoardModelPosSetV(s16 model, Vec *pos); +extern s16 BoardModelCreate(s32 file, s32 *data, s32 arg3); +extern s16 BoardModelIDGet(s16 model); - +static BoardSpace spaceData[2][256]; +s16 boardSpaceStarTbl[8]; static GXTexObj spaceHiliteTex; static GXTexObj spaceTex; -s16 boardSpaceStarTbl[8]; -static BoardSpace spaceData[2][256]; + +static s8 spaceImgIdx[12] = { + 0, 1, 2, 7, + 6, 5, 3, 4, + 9, 10, 11, 0 +}; + +static s8 spaceHiliteImgIdx[12] = { + -1, 0, 1, 1, + 2, 2, 2, 2, + -1, 3, -1, -1 +}; static s16 spaceCnt[2]; static u32 spaceAttr[2]; @@ -28,11 +49,13 @@ static s32 spaceDrawCnt; static s16 spaceDrawF; static s16 spaceDrawMdl = -1; -static s16 starMdl = -1; +static s16 starPlatMdl = -1; + +static s32 ExecPipeSpace(s32 player, s32 space); + +extern s8 boardTutorialBlockF; +extern s32 boardTutorialBlockPos; -s32 BoardSpaceRotGet(s32 layer, s32 index, Vec *rot); -s32 BoardSpaceStarGet(s32 index); -s32 BoardSpaceStarGetCurr(void); void BoardSpaceWalkEventFuncSet(BoardSpaceEventFunc func) { @@ -69,7 +92,7 @@ s32 BoardSpaceWalkMiniEventExec(void) return ret; } -s16 BoardSpaceCountGet(s32 layer) +s32 BoardSpaceCountGet(s32 layer) { return spaceCnt[layer]; } @@ -281,7 +304,7 @@ s32 BoardSpaceLinkTransformGet(s32 flag, Vec *pos, Vec *rot, Vec *scale) return -1; } -void BoardSpaceStarSet(s32 space) +void BoardSpaceHostSet(s32 space) { s16 host_space; Vec pos; @@ -292,9 +315,9 @@ void BoardSpaceStarSet(s32 space) BoardModelPosSetV(BoardStarHostMdlGet(), &pos); } -static inline s16 BoardStarMdlGet(void) +static inline s16 StarPlatGetMdl(void) { - return starMdl; + return starPlatMdl; } static inline s32 BoardStarSpaceTypeGet(s16 index) @@ -311,13 +334,13 @@ void BoardSpaceStarSetIndex(s32 index) BoardSpaceTypeSet(0, boardSpaceStarTbl[GWSystem.star_pos], 1); } GWSystem.star_pos = index & 0x7; - BoardSpaceStarSet(BoardSpaceStarGetCurr()); + BoardSpaceHostSet(BoardSpaceStarGetCurr()); space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000); BoardSpacePosGet(0, space, &pos); - BoardModelPosSetV(BoardStarMdlGet(), &pos); + BoardModelPosSetV(StarPlatGetMdl(), &pos); BoardSpaceRotGet(0, space, &rot); - BoardModelRotYSet(BoardStarMdlGet(), rot.y); - BoardModelVisibilitySet(BoardStarMdlGet(), 1); + BoardModelRotYSet(StarPlatGetMdl(), rot.y); + BoardModelVisibilitySet(StarPlatGetMdl(), 1); } s32 BoardSpaceStarGetNext(void) @@ -550,8 +573,8 @@ void BoardSpaceLandExec(s32 player, s32 space) if(_CheckFlag(FLAG_ID_MAKE(1, 11))) { HuAudFXPlay(842); BoardCameraViewSet(2); - BoardPlayerAnimBlendSet(player, 0, 15); - while(!BoardPlayerAnimBlendCheck(player)) { + BoardPlayerMotBlendSet(player, 0, 15); + while(!BoardPlayerMotBlendCheck(player)) { HuPrcVSleep(); } BoardCameraMotionWait(); @@ -586,4 +609,492 @@ void BoardSpaceLandExec(s32 player, s32 space) BoardStarExec(player, space); break; } +} + +s32 BoardSpaceWalkExec(s32 player, s32 space) +{ + s32 is_star; + BoardSpace *space_ptr; + BoardSpace *star_space; + if(_CheckFlag(FLAG_ID_MAKE(1, 11))) { + space_ptr = BoardSpaceGet(0, space); + if(space_ptr->flag & 0x180000) { + BoardTutorialHookExec(25, 0); + } + } + if(BoardPlayerSizeGet(player) == 2 || GWPlayer[player].bowser_suit) { + return 0; + } + space_ptr = BoardSpaceGet(0, space); + if(BoardCurrGet() == 7 || BoardCurrGet() == 8) { + is_star = 0; + } else { + star_space = BoardSpaceGet(0, boardSpaceStarTbl[GWSystem.star_pos]); + if(space_ptr == star_space) { + is_star = 1; + } else { + is_star = 0; + } + } + if(is_star) { + BoardStarExec(player, space); + return 1; + } + if(space_ptr->flag & 0x600000) { + u16 mg_param = GWSystem.unk_38; + if(BoardPlayerSizeGet(player) == 1) { + BoardRotateDiceNumbers(player); + BoardMGCreate(mg_param); + } + return 1; + } + if(space_ptr->flag & 0x180000) { + BoardShopExec(player, space); + return 1; + } + if(space_ptr->flag & 0x08000000) { + BoardBooHouseExec(player, space); + return 1; + } + if(space_ptr->flag & 0x10000000) { + BoardLotteryExec(); + return 1; + } + if(space_ptr->flag & 0x20000000) { + ExecPipeSpace(player, space); + return 1; + } + return 0; +} + +s32 BoardSpaceBlockExec(s32 player, s32 space) +{ + s32 event_exec; + BoardSpace *space_ptr; + event_exec = 0; + if(BoardPlayerSizeGet(player) == 2 || GWPlayer[player].bowser_suit) { + return 0; + } + space_ptr = BoardSpaceGet(0, space); + event_exec = 0; + if(space == GWSystem.block_pos) { + event_exec = 1; + } + if((int)GWSystem.bonus_star == 0 && BoardPartyFlagGet() == 1 && !_CheckFlag(FLAG_ID_MAKE(1, 11))) { + event_exec = 0; + } + if(BoardCurrGet() == 7 || BoardCurrGet() == 8) { + event_exec = 0; + } + if(event_exec) { + BoardBlockExec(player, space); + if(_CheckFlag(FLAG_ID_MAKE(1, 11))) { + BoardBlockExec(player, space); + } + BoardSpaceBlockPosSet(); + } + return 0; +} + +static s32 ExecPipeSpace(s32 player, s32 space) +{ + Vec pos_link; + Vec pos; + Vec dir; + float radius, y_vel; + s32 mot_disable; + BoardSpace *space_ptr; + mot_disable = 0; + if(BoardPlayerSizeGet(player) != 1) { + return 0; + } + BoardPlayerPosGet(player, &pos); + pos.y += 200.0f; + space_ptr = BoardSpaceGet(0, space); + BoardSpacePosGet(0, space_ptr->link[0], &pos_link); + VECSubtract(&pos_link, &pos, &dir); + VECNormalize(&dir, &dir); + BoardPlayerRotYSet(player, 90-((atan2(dir.z, dir.x)/M_PI)*180)); + radius = 0.75f*BoardVecDistXZCalc(&pos_link, &pos); + BoardPlayerMotionStart(player, 4, 0); + y_vel = 0; + while(1) { + if(BoardVecDistXZCalc(&pos_link, &pos) < 2) { + break; + } + pos.x += (dir.x*radius)/60.0f; + pos.z += (dir.z*radius)/60.0f; + if(pos.y <= pos_link.y) { + pos.y = pos_link.y; + if(!mot_disable) { + BoardPlayerMotionShiftSet(player, 3, 0, 4, 0x40000001); + break; + } + } else { + pos.y += 10.0f+(-((1/2399.99f)+(1/50.0f))*y_vel*y_vel); + y_vel += 1.0f; + } + BoardPlayerPosSetV(player, &pos); + HuPrcVSleep(); + } + return 0; +} + +void BoardSpaceTypeForce(u16 from, u16 to) +{ + s32 i; + for(i=0; itype == from) { + space->type = to; + } + } +} + +void BoardSpaceHide(s32 value) +{ + if(value) { + Hu3DModelAttrSet(spaceDrawMdl, 1); + } else { + Hu3DModelAttrReset(spaceDrawMdl, 1); + } +} + +//Some stack allocation issues. code around BoardPlayerGetCurr is incorrect too +static void DrawSpaces(ModelData *model, Mtx matrix) +{ + s32 i; + + Vec player_pos; + Vec target; + Vec pos; + + Mtx lookat, final, rot_x, rot_y, rot_z, scale; + Mtx44 proj; + BoardCameraData *camera; + if(!spaceDrawF) { + return; + } + spaceDrawCnt = 0; + camera = &boardCamera; + BoardCameraPosGet(&pos); + BoardCameraTargetGet(&target); + MTXPerspective(proj, camera->fov, camera->aspect, camera->near, camera->far); + GXSetProjection(proj, GX_PERSPECTIVE); + MTXLookAt(lookat, &pos, &camera->up, &target); + GXSetViewport(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h, camera->viewport_near, camera->viewport_far); + GXSetScissor(camera->viewport_x, camera->viewport_y, camera->viewport_w, camera->viewport_h); + { + GXColor color = { 0xFF, 0xFF, 0xFF, 0xFF }; + BoardSpace *space_curr; + BoardSpace *space_hilite; + PlayerState *player; + PlayerState *player_temp; + s16 player_mdl; + float y_dist; + s32 space_img; + u16 space_type; + float uv_x, uv_y, uv_size; + + GXClearVtxDesc(); + GXSetVtxDesc(GX_VA_POS, GX_DIRECT); + GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0); + GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0); + GXInvalidateTexAll(); + GXLoadTexObj(&spaceTex, GX_TEXMAP0); + GXSetNumTexGens(1); + GXSetNumTevStages(1); + GXSetTevColor(GX_TEVREG0, color); + GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY); + GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0); + GXSetTevOp(GX_TEVSTAGE0, GX_MODULATE); + GXSetNumChans(1); + GXSetChanAmbColor(GX_COLOR0A0, color); + GXSetChanMatColor(GX_COLOR0A0, color); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); + GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 1, GX_DF_CLAMP, GX_AF_SPOT); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); + GXSetAlphaCompare(GX_GEQUAL, 1, GX_AOP_AND, GX_GEQUAL, 1); + GXSetCullMode(GX_CULL_BACK); + player = player_temp = BoardPlayerGetCurr(); + BoardPlayerPosGet(GWSystem.player_curr, &player_pos); + player_mdl = BoardModelIDGet(BoardPlayerModelGetCurr()); + space_curr = &spaceData[0][0]; + space_hilite = NULL; + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + for(i=0; itype == 0) { + continue; + } + if(!BoardCameraCullCheck(&space_curr->pos, 200.0f) || (space_curr->flag & spaceAttr[0])) { + continue; + } + if(!space_hilite) { + if(player_pos.x > space_curr->pos.x-100.0f + && player_pos.z > space_curr->pos.z-100.0f + && player_pos.x < space_curr->pos.x+100.0f + && player_pos.z < space_curr->pos.z+100.0f) { + if(player_pos.y-space_curr->pos.y < 0.0f) { + y_dist = -(player_pos.y-space_curr->pos.y); + } else { + y_dist = player_pos.y-space_curr->pos.y; + } + if(y_dist < 10.0f) { + space_hilite = space_curr; + } + } + } + space_type = space_curr->type; + space_img = spaceImgIdx[space_type]-1; + uv_x = (float)(space_img%4)/4.0f; + uv_y = (float)(space_img/4)/4.0f; + uv_size = 63.0f/256.0f; + MTXRotRad(rot_z, 'z', MTXDegToRad(space_curr->rot.y)); + MTXRotRad(rot_y, 'y', MTXDegToRad(space_curr->rot.z)); + MTXRotRad(rot_x, 'x', MTXDegToRad(space_curr->rot.x+90.0f)); + MTXTrans(final, space_curr->pos.x, 3.0f+space_curr->pos.y, space_curr->pos.z); + MTXConcat(rot_x, rot_y, rot_y); + MTXConcat(rot_y, rot_z, rot_z); + MTXConcat(final, rot_z, final); + MTXConcat(lookat, final, final); + GXLoadPosMtxImm(final, GX_PNMTX0); + GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXPosition3f32(-100, -100, 0); + GXTexCoord2f32(uv_x, uv_y); + GXPosition3f32(100, -100, 0); + GXTexCoord2f32(uv_x+uv_size, uv_y); + GXPosition3f32(100, 100, 0); + GXTexCoord2f32(uv_x+uv_size, uv_y+uv_size+(1.5f/256.0f)); + GXPosition3f32(-100, 100, 0); + GXTexCoord2f32(uv_x, uv_y+uv_size+(1.5f/256.0f)); + GXEnd(); + spaceDrawCnt++; + } + if(space_hilite) { + space_curr = space_hilite; + space_type = space_curr->type; + if(player->show_next && space_type != 0 && (space_img = spaceHiliteImgIdx[space_type]) >= 0) { + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_FALSE); + GXLoadTexObj(&spaceHiliteTex, GX_TEXMAP0); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_ONE, GX_LO_NOOP); + uv_x = (float)(space_img%4)/4.0f; + uv_y = (float)(space_img/4)/4.0f; + uv_size = 63.0f/256.0f; + MTXScale(scale, 1.5f, 1.5f, 1.5f); + MTXRotRad(rot_z, 'z', MTXDegToRad(space_curr->rot.y)); + MTXRotRad(rot_y, 'y', MTXDegToRad(space_curr->rot.z)); + MTXRotRad(rot_x, 'x', MTXDegToRad(space_curr->rot.x+90.0f)); + MTXTrans(final, space_curr->pos.x, 3.5f+space_curr->pos.y, space_curr->pos.z); + MTXConcat(scale, rot_x, rot_x); + MTXConcat(rot_x, rot_y, rot_y); + MTXConcat(rot_y, rot_z, rot_z); + MTXConcat(final, rot_z, final); + MTXConcat(lookat, final, final); + GXLoadPosMtxImm(final, GX_PNMTX0); + GXBegin(GX_QUADS, GX_VTXFMT0, 4); + GXPosition3f32(-100, -100, 0); + GXTexCoord2f32(uv_x, uv_y); + GXPosition3f32(100, -100, 0); + GXTexCoord2f32(uv_x+uv_size, uv_y); + GXPosition3f32(100, 100, 0); + GXTexCoord2f32(uv_x+uv_size, uv_y+uv_size); + GXPosition3f32(-100, 100, 0); + GXTexCoord2f32(uv_x, uv_y+uv_size); + GXEnd(); + spaceDrawCnt++; + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + return; + } + } + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + } + +} + +s32 BoardSpaceRead(s32 layer, s32 data_num) +{ + int j; + int i; + BoardSpace *space; + u8 *data; + s32 star_idx; + u8 *data_base; + data_base = data = HuDataSelHeapReadNum(data_num, MEMORY_DEFAULT_NUM, HEAP_DATA); + spaceCnt[layer] = *(u32 *)data; + data += sizeof(u32); + space = &spaceData[layer][0]; + for(i=0; ipos, data, sizeof(Vec)); + data += sizeof(Vec); + memcpy(&space->rot, data, sizeof(Vec)); + data += sizeof(Vec); + memcpy(&space->scale, data, sizeof(Vec)); + data += sizeof(Vec); + space->flag = *(u32 *)data; + data += sizeof(u32); + space->type = *(u16 *)data; + data += sizeof(u16); + space->link_cnt = *(u16 *)data; + data += sizeof(u16); + for(j=0; jlink_cnt; j++) { + space->link[j] = (*(u16 *)data)+1; + data += sizeof(u16); + } + if(space->type == 8) { + + space->type = 1; + star_idx = (space->flag & 0x70000) >> 16; + boardSpaceStarTbl[star_idx] = i+1; + } + } + HuDataClose(data_base); + return 0; +} + +void BoardSpaceCameraSet(u16 mask) +{ + Hu3DModelCameraSet(spaceDrawMdl, mask); +} + +void BoardSpaceBlockPosSet(void) +{ + BoardSpace *space; + s32 block_pos; + begin: + if(boardTutorialBlockF) { + GWSystem.block_pos = boardTutorialBlockPos; + return; + } + block_pos = BoardRandMod(spaceCnt[0])+1; + if(block_pos == GWSystem.block_pos) { + goto begin; + } + space = BoardSpaceGet(0, block_pos); + if(space->type != 1) { + goto begin; + } + GWSystem.block_pos = block_pos; +} + +void BoardSpaceInit(s32 data_num) +{ + s32 board; + BoardJunctionMaskZero(); + memset(spaceData, 0, sizeof(spaceData)); + memset(spaceAttr, 0, sizeof(spaceAttr)); + lbl_801D3FC4[0] = lbl_801D3FC4[1] = lbl_801D3FC4[2] = lbl_801D3FC4[3] = -1; + spaceDrawF = 0; + board = BoardCurrGet(); + { + AnimBmpData *bmp; + AnimData *data; + void *data_base; + s32 size; + data = data_base = HuDataSelHeapReadNum(MAKE_DATA_NUM(DATADIR_BOARD, 29), MEMORY_DEFAULT_NUM, HEAP_DATA); + data->bmp = (void *)((u32)data_base+(u32)data->bmp); + data->pat = (void *)((u32)data_base+(u32)data->pat); + data->bank = (void *)((u32)data_base+(u32)data->bank); + bmp = data->bmp; + size = bmp->sizeX; + spaceHiliteTexFmt = -1; + switch(bmp->dataFmt) { + case SPRITE_BMP_RGBA8: + spaceHiliteTexFmt = GX_TF_RGBA8; + break; + + case SPRITE_BMP_RGB5A3_DUPE: + spaceHiliteTexFmt = GX_TF_RGB5A3; + break; + + case SPRITE_BMP_CMPR: + spaceHiliteTexFmt = GX_TF_CMPR; + break; + } + spaceHiliteTexData = HuMemDirectMallocNum(HEAP_SYSTEM, bmp->dataSize, MEMORY_DEFAULT_NUM); + bmp->data = (void *)((u32)bmp->data+(u32)data_base); + memcpy(spaceHiliteTexData, bmp->data, bmp->dataSize); + HuDataClose(data_base); + GXInitTexObj(&spaceHiliteTex, spaceHiliteTexData, size, size, spaceHiliteTexFmt, GX_CLAMP, GX_CLAMP, GX_FALSE); + GXInitTexObjLOD(&spaceHiliteTex, GX_LINEAR, GX_LINEAR, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1); + } + { + AnimBmpData *bmp; + AnimData *data; + void *data_base; + s32 size; + data = data_base = HuDataSelHeapReadNum(MAKE_DATA_NUM(DATADIR_BOARD, 28), MEMORY_DEFAULT_NUM, HEAP_DATA); + data->bmp = (void *)((u32)data_base+(u32)data->bmp); + data->pat = (void *)((u32)data_base+(u32)data->pat); + data->bank = (void *)((u32)data_base+(u32)data->bank); + bmp = data->bmp; + size = bmp->sizeX; + spaceTexFmt = -1; + switch(bmp->dataFmt) { + case SPRITE_BMP_RGBA8: + spaceTexFmt = GX_TF_RGBA8; + break; + + case SPRITE_BMP_RGB5A3_DUPE: + spaceTexFmt = GX_TF_RGB5A3; + break; + + case SPRITE_BMP_CMPR: + spaceTexFmt = GX_TF_CMPR; + break; + } + spaceTexData = HuMemDirectMallocNum(HEAP_SYSTEM, bmp->dataSize, MEMORY_DEFAULT_NUM); + bmp->data = (void *)((u32)bmp->data+(u32)data_base); + memcpy(spaceTexData, bmp->data, bmp->dataSize); + HuDataClose(data_base); + GXInitTexObj(&spaceTex, spaceTexData, size, size, spaceTexFmt, GX_CLAMP, GX_CLAMP, GX_FALSE); + GXInitTexObjLOD(&spaceTex, GX_LINEAR, GX_LINEAR, 0, 0, 0, GX_FALSE, GX_FALSE, GX_ANISO_1); + } + BoardSpaceRead(0, data_num); + spaceDrawMdl = Hu3DHookFuncCreate(DrawSpaces); + if(!BoardStartCheck() && !_CheckFlag(FLAG_ID_MAKE(1, 1))) { + BoardSpaceBlockPosSet(); + GWSystem.star_total = 0; + GWSystem.star_flag = 0; + } + if(BoardCurrGet() != 7 && BoardCurrGet() != 8) { + starPlatMdl = BoardModelCreate(MAKE_DATA_NUM(DATADIR_BOARD, 6), NULL, 0); + BoardModelMotionStart(starPlatMdl, 0, 0x40000001); + BoardModelVisibilitySet(starPlatMdl, 0); + if(_CheckFlag(FLAG_ID_MAKE(1, 1))) { + Vec pos; + Vec rot; + s16 space; + BoardModelVisibilitySet(starPlatMdl, 1); + GWSystem.star_flag |= (u8)(1 << GWSystem.star_pos); + BoardSpaceTypeSet(0, boardSpaceStarTbl[GWSystem.star_pos], 8); + { + int space; + BoardSpace *space_plat; + space = BoardSpaceLinkFlagSearch(0, BoardSpaceStarGetCurr(), 0x04000000); + BoardSpacePosGet(0, space, &pos); + BoardModelPosSetV(StarPlatGetMdl(), &pos); + BoardSpaceRotGet(0, space, &rot); + BoardModelRotYSet(StarPlatGetMdl(), rot.y); + } + } + } + spaceDrawF = 1; +} + +void BoardSpaceDestroy(void) +{ + if(spaceDrawMdl >= 0) { + Hu3DModelKill(spaceDrawMdl); + spaceDrawMdl = -1; + } + if(spaceHiliteTexData) { + HuMemDirectFree(spaceHiliteTexData); + spaceHiliteTexData = NULL; + } + if(spaceTexData) { + HuMemDirectFree(spaceTexData); + spaceTexData = NULL; + } } \ No newline at end of file diff --git a/src/game/board/warp.c b/src/game/board/warp.c index 2be517d8..0aaec5ef 100644 --- a/src/game/board/warp.c +++ b/src/game/board/warp.c @@ -3,8 +3,8 @@ #include "game/board/player.h" #include "game/wipe.h" #include "game/gamework_data.h" +#include "game/hsfex.h" #include "board_unsplit.h" -#include "unsplit.h" #include "math.h" static void WarpInit(s32); @@ -15,10 +15,10 @@ static void WarpImpact(s32); extern void omVibrate(s16, s16, s16, s16); -extern void fn_800816CC(s32, s32); -extern void fn_80081884(f32); -extern void fn_8008181C(void); -extern s32 fn_8008186C(void); +extern void BoardCharWheelInit(s32, s32); +extern void BoardCharWheelSpeedSet(f32); +extern void BoardCharWheelWait(void); +extern s32 BoardCharWheelResultGet(void); extern f32 BoardModelMotionTimeGet(s16); extern void BoardModelHookReset(s16); extern s32 BoardModelHookSet(s16, char*, s16); @@ -46,7 +46,7 @@ static s8 warpImpactPlayer[4] = {-1, -1, -1, -1}; static void WarpProcess(void); static void WarpKill(void); -void BoardWarpExec(s32 player, s16 space) { +void BoardWarpExec(s32 player, s32 space) { omVibrate(player, 12, 4, 2); warpProcess = HuPrcChildCreate(WarpProcess, 8195, 14336, 0, boardMainProc); HuPrcDestructorSet2(warpProcess, WarpKill); @@ -66,9 +66,9 @@ void WarpProcess(void) { HuAudFXPlay(842); BoardCameraViewSet(3); BoardCameraMotionWait(); - BoardPlayerAnimBlendSet(curr_player, 0, 15); + BoardPlayerMotBlendSet(curr_player, 0, 15); - while (BoardPlayerAnimBlendCheck(curr_player) == 0) { + while (BoardPlayerMotBlendCheck(curr_player) == 0) { HuPrcVSleep(); } @@ -77,10 +77,10 @@ void WarpProcess(void) { BoardTutorialHookExec(18, 0); boardTutorialData[0] = 0; } - fn_800816CC(curr_player, 3); - fn_80081884(18.0f); - fn_8008181C(); - warpTarget = fn_8008186C(); + BoardCharWheelInit(curr_player, 3); + BoardCharWheelSpeedSet(18.0f); + BoardCharWheelWait(); + warpTarget = BoardCharWheelResultGet(); BoardCameraViewSet(1); BoardCameraMotionWait(); WarpInit(curr_player); @@ -232,7 +232,7 @@ static void WarpImpact(s32 player) { BoardModelMotionStart(warpImpactMdl, 0, 0x40000001); for (i = 0; i < warpImpactCnt; i++) { - s32 player = warpImpactPlayer[i]; + s16 player = warpImpactPlayer[i]; omVibrate(player, 0xC, 4, 2); BoardPlayerMotionStart(player, 6, 0x40000001); } diff --git a/src/game/board/window.c b/src/game/board/window.c index 3137125b..7dbd1780 100644 --- a/src/game/board/window.c +++ b/src/game/board/window.c @@ -182,7 +182,6 @@ void BoardWinPause(void) { void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) { s32 i; - s32 speed; winPosIdx = pos; @@ -213,13 +212,11 @@ void BoardWinCreateChoice(s32 pos, u32 mess, s32 portrait, s32 choice) { if (GWSystem.mess_speed == 3) { GWSystem.mess_speed = 1; } - speed = GWSystem.mess_speed; - BoardWinSpeedSet(speed); + BoardWinSpeedSet(GWMessSpeedGet()); BoardWinPlayerSet(GWSystem.player_curr); } void BoardWinCreate(s32 pos, u32 mess, s32 portrait) { - s32 speed; s32 i; winPosIdx = pos; @@ -250,8 +247,7 @@ void BoardWinCreate(s32 pos, u32 mess, s32 portrait) { if (GWSystem.mess_speed == 3) { GWSystem.mess_speed = 1; } - speed = GWSystem.mess_speed; - BoardWinSpeedSet(speed); + BoardWinSpeedSet(GWMessSpeedGet()); BoardWinPlayerSet(GWSystem.player_curr); autoPickF = 0; } @@ -281,14 +277,14 @@ void BoardWinKill(void) { } } -void BoardWinSetAttr(s32 attr) { +void BoardWinAttrSet(s32 attr) { winAttr |= attr; if (windowID >= 0) { HuWinAttrSet(windowID, winAttr); } } -void BoardWinResetAttr(s32 attr) { +void BoardWinAttrReset(s32 attr) { winAttr &= ~attr; if (windowID >= 0) { HuWinAttrSet(windowID, winAttr); @@ -381,7 +377,7 @@ void BoardWinPlayerSet(s32 player) { void BoardWinStartComKeySet(void) { s32 comkey[4]; - s32 speed; + s32 delay; s32 waitnum; s32 i; @@ -410,12 +406,12 @@ void BoardWinStartComKeySet(void) { } } } - speed = GWMessSpeedGet(); + delay = GWMessDelayGet(); waitnum = HuWinKeyWaitNumGet(winMess); if (waitnum != 0) { HuWinComKeyReset(); for (i = 0; i < waitnum; i++) { - HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], speed); + HuWinComKeyWait(comkey[0], comkey[1], comkey[2], comkey[3], delay); } } } diff --git a/src/game/esprite.c b/src/game/esprite.c new file mode 100755 index 00000000..0af4ce64 --- /dev/null +++ b/src/game/esprite.c @@ -0,0 +1,145 @@ +#include "game/esprite.h" +#include "game/data.h" +#include "game/sprite.h" + +typedef struct { + /* 0x00 */ u32 unk00; + /* 0x04 */ u16 unk04; + /* 0x06 */ char unk06[2]; + /* 0x08 */ AnimData *unk08; +} UnkEspriteStruct01; // Size 0xC + +s16 esprite[0x180][2]; +UnkEspriteStruct01 espanim[0x180]; + +static s16 gid; + +void espInit(void) { + s32 i; + + gid = HuSprGrpCreate(0x180); + for (i = 0; i < 0x180; i++) { + esprite[i][0] = i; + esprite[i][1] = -1; + } + for (i = 0; i < 0x180; i++) { + espanim[i].unk04 = 0; + } +} + +s16 espEntry(s32 arg0, s16 arg1, s16 arg2) { + UnkEspriteStruct01 *var_r30; + UnkEspriteStruct01 *var_r31; + s16 (*var_r29)[2]; + void *temp_r26; + s16 temp_r25; + s16 var_r28; + s32 var_r27; + + var_r29 = esprite; + for (var_r28 = 0; var_r28 < 0x180; var_r29++, var_r28++) { + if (var_r29[0][1] == -1) { + break; + } + } + if (var_r28 == 0x180) { + return -1; + } + var_r31 = espanim; + var_r30 = NULL; + for (var_r27 = 0; var_r27 < 0x180; var_r31++, var_r27++) { + if (var_r31->unk04 != 0) { + if (var_r31->unk00 == arg0) { + var_r30 = NULL; + break; + } + } else if (var_r30 == NULL) { + var_r30 = var_r31; + } + } + if (var_r27 == 0x180) { + if (var_r30 == NULL) { + return -1; + } + temp_r26 = HuDataSelHeapReadNum(arg0, MEMORY_DEFAULT_NUM, HEAP_DATA); + if (temp_r26 == NULL) { + return -1; + } + var_r30->unk00 = arg0; + var_r30->unk08 = HuSprAnimRead(temp_r26); + var_r31 = var_r30; + } + temp_r25 = HuSprCreate(var_r31->unk08, arg1, arg2); + if (temp_r25 == -1) { + if (var_r30 != NULL) { + HuSprAnimKill(var_r31->unk08); + } + return -1; + } + var_r31->unk04++; + var_r29[0][1] = var_r31 - espanim; + HuSprGrpMemberSet(gid, var_r29[0][0], temp_r25); + return var_r28; +} + +void espKill(s16 arg0) { + HuSprGrpMemberKill(gid, esprite[arg0][0]); + espanim[esprite[arg0][1]].unk04--; + esprite[arg0][1] = -1; +} + +s16 espGrpIDGet(void) { + return gid; +} + +void espDispOn(s16 arg0) { + HuSprAttrReset(gid, esprite[arg0][0], 4); +} + +void espDispOff(s16 arg0) { + HuSprAttrSet(gid, esprite[arg0][0], 4); +} + +void espAttrSet(s16 arg0, u16 arg1) { + HuSprAttrSet(gid, esprite[arg0][0], arg1); +} + +void espAttrReset(s16 arg0, u16 arg1) { + HuSprAttrReset(gid, esprite[arg0][0], arg1); +} + +void espPosSet(s16 arg0, float arg1, float arg2) { + HuSprPosSet(gid, esprite[arg0][0], arg1, arg2); +} + +void espScaleSet(s16 arg0, float arg1, float arg2) { + HuSprScaleSet(gid, esprite[arg0][0], arg1, arg2); +} + +void espZRotSet(s16 arg0, float arg1) { + HuSprZRotSet(gid, esprite[arg0][0], arg1); +} + +void espTPLvlSet(s16 arg0, float arg1) { + HuSprTPLvlSet(gid, esprite[arg0][0], arg1); +} + +void espColorSet(s16 arg0, u8 arg1, u8 arg2, u8 arg3) { + HuSprColorSet(gid, esprite[arg0][0], arg1, arg2, arg3); +} + +void espSpeedSet(s16 arg0, float arg1) { + HuSprSpeedSet(gid, esprite[arg0][0], arg1); +} + +void espBankSet(s16 arg0, s16 arg1) { + HuSprBankSet(gid, esprite[arg0][0], arg1); +} + +void espDrawNoSet(s16 arg0, s16 arg1) { + HuSprDrawNoSet(gid, esprite[arg0][0], arg1); +} + +void espPriSet(s16 arg0, s16 arg1) { + HuSprPriSet(gid, esprite[arg0][0], arg1); +} diff --git a/src/game/fault.c b/src/game/fault.c index 5ebd2183..b2e9efa4 100644 --- a/src/game/fault.c +++ b/src/game/fault.c @@ -1,4 +1,4 @@ -#include "common.h" +#include "game/gamework_data.h" #include "stdarg.h" #include "stdio.h" diff --git a/src/game/frand.c b/src/game/frand.c index ca352d6d..69e83264 100644 --- a/src/game/frand.c +++ b/src/game/frand.c @@ -2,26 +2,25 @@ static u32 frand_seed; -static inline u32 frandom(void) +static inline u32 frandom(u32 param) { - u32 rand = frand_seed; s32 rand2, rand3; - if (rand == 0) { - rand = rand8(); - rand = rand ^ (s64)OSGetTime(); - rand ^= 0xD826BC89; + if (param == 0) { + param = rand8(); + param = param ^ (s64)OSGetTime(); + param ^= 0xD826BC89; } - rand2 = rand / (u32)0x1F31D; - rand3 = rand - (rand2 * 0x1F31D); - rand = rand2 * 0xB14; - rand = rand - rand3 * 0x41A7; - return rand; + rand2 = param / (u32)0x1F31D; + rand3 = param - (rand2 * 0x1F31D); + param = rand2 * 0xB14; + param = param - rand3 * 0x41A7; + return param; } u32 frand(void) { - return frand_seed = frandom(); + return frand_seed = frandom(frand_seed); } f32 frandf(void) { @@ -34,7 +33,7 @@ f32 frandf(void) { u32 frandmod(u32 arg0) { u32 ret; - frand_seed = frandom(); + frand_seed = frandom(frand_seed); ret = (frand_seed & 0x7FFFFFFF)%arg0; return ret; } \ No newline at end of file diff --git a/src/game/gamework.c b/src/game/gamework.c index 3bf28b97..dedd6670 100644 --- a/src/game/gamework.c +++ b/src/game/gamework.c @@ -134,7 +134,7 @@ void GWGameStatReset(void) ResetBoardSettings(); } -s32 GWMessSpeedGet(void) +s32 GWMessDelayGet(void) { if(GWSystem.mess_delay > 48) { GWSystem.mess_speed = 1; diff --git a/src/game/hsfanim.c b/src/game/hsfanim.c index 8e8ca948..87df68ca 100755 --- a/src/game/hsfanim.c +++ b/src/game/hsfanim.c @@ -1,5 +1,6 @@ #include "game/hsfanim.h" #include "game/hsfdraw.h" +#include "game/init.h" #include "game/memory.h" #include "game/process.h" @@ -34,13 +35,6 @@ Hu3DTexAnimDataStruct Hu3DTexAnimData[256]; Hu3DTexScrDataStruct Hu3DTexScrData[16]; static Process *parManProc[64]; -// TODO: move to GXVert -static inline void GXUnknownu16(const u16 x, const u16 y, const u16 z) { - GXWGFifo.u16 = x; - GXWGFifo.u16 = y; - GXWGFifo.u16 = z; -} - void Hu3DAnimInit(void) { Hu3DTexAnimDataStruct *var_r30; Hu3DTexScrDataStruct *var_r29; @@ -536,10 +530,18 @@ s16 Hu3DParticleCreate(AnimData *arg0, s16 arg1) { GXBeginDisplayList(temp_r24, 0x20000); GXBegin(GX_QUADS, GX_VTXFMT0, arg1 * 4); for (i = 0; i < arg1; i++) { - GXUnknownu16(i * 4, i, 0); - GXUnknownu16(i * 4 + 1, i, 1); - GXUnknownu16(i * 4 + 2, i, 2); - GXUnknownu16(i * 4 + 3, i, 3); + GXPosition1x16(i*4); + GXColor1x16(i); + GXTexCoord1x16(0); + GXPosition1x16((i*4)+1); + GXColor1x16(i); + GXTexCoord1x16(1); + GXPosition1x16((i*4)+2); + GXColor1x16(i); + GXTexCoord1x16(2); + GXPosition1x16((i*4)+3); + GXColor1x16(i); + GXTexCoord1x16(3); } temp_r31->unk_40 = GXEndDisplayList(); return temp_r25; diff --git a/src/game/hsfdraw.c b/src/game/hsfdraw.c index 93a8f6d0..5d360457 100755 --- a/src/game/hsfdraw.c +++ b/src/game/hsfdraw.c @@ -16,27 +16,6 @@ typedef struct { /* 0x3C */ Vec unk3C; } HsfdrawStruct00; // Size 0x48 -typedef struct { - /* 0x00 */ u16 unk00; - /* 0x02 */ s16 unk02; - /* 0x04 */ s16 unk04; - /* 0x06 */ char unk06[2]; - /* 0x08 */ float unk08; - /* 0x0C */ float unk0C; - /* 0x10 */ float unk10; - /* 0x14 */ float unk14; - /* 0x18 */ float unk18; - /* 0x1C */ float unk1C; - /* 0x20 */ float unk20; - /* 0x24 */ float unk24; - /* 0x28 */ float unk28; - /* 0x2C */ float unk2C; - /* 0x30 */ float unk30; - /* 0x34 */ float unk34; - /* 0x38 */ float unk38; - /* 0x3C */ HsfBitmap *unk3C; -} HsfdrawStruct01; // Size unknown - typedef struct { s32 unk00; s32 unk04; diff --git a/src/game/hsfex.c b/src/game/hsfex.c new file mode 100644 index 00000000..33562538 --- /dev/null +++ b/src/game/hsfex.c @@ -0,0 +1,572 @@ +#include "game/hsfex.h" +#include "game/hsfman.h" +#include "game/hsfmotion.h" + +#include "math.h" + +typedef struct { + /* 0x00 */ float unk00; + /* 0x04 */ float unk04; + /* 0x08 */ Vec unk08; + /* 0x14 */ Vec unk14; + /* 0x20 */ Vec unk20; +} HsfexStruct02; // Size 0x2C + +static void SetObjCamMotion(s16 arg0, HsfTrack *arg1, float arg2, HsfexStruct02 *arg3); + +void CamMotionEx2(s16 arg0, s16 arg1, float arg2, s16 arg3) { + CameraData *temp_r30; + s16 i; + + for (i = 0; i < 16; i++) { + if (arg1 & (1 << i)) { + break; + } + } + temp_r30 = &Hu3DCamera[i]; + CamMotionEx(arg0, arg1, &temp_r30->pos, &temp_r30->up, &temp_r30->target, arg2, arg3); +} + +void CamMotionEx(s16 arg0, s16 arg1, Vec *arg2, Vec *arg3, Vec *arg4, float arg5, s16 arg6) { + Vec sp3C; + float sp2C[4]; + float sp1C[4]; + float temp_f29; + float var_f27; + float var_f26; + float var_f30; + float var_f31; + s16 sp1A; + s16 var_r25; + s16 var_r29; + s16 var_r30; + HsfexStruct02 *var_r31; + CameraData *temp_r27; + ModelData *temp_r23; + HsfData *temp_r22; + MotionData *temp_r19; + HsfData *temp_r18; + HsfObject *temp_r24; + HsfTrack *temp_r20; + HsfMotion *temp_r26; + HsfexStruct02 *temp_r21; + HsfTrack *var_r28; + + temp_r23 = &Hu3DData[arg0]; + temp_r19 = &Hu3DMotion[temp_r23->unk_08]; + temp_r22 = temp_r23->hsfData; + temp_r18 = temp_r19->unk_04; + temp_r26 = temp_r18->motion; + for (var_r25 = 0; var_r25 < 16; var_r25++) { + if (arg1 & (1 << var_r25)) { + break; + } + } + temp_r27 = &Hu3DCamera[var_r25]; + temp_f29 = temp_r26->len; + sp1A = 0.5f + (temp_f29 / 6.0f) + 1.0f; + var_r31 = temp_r21 = HuMemDirectMallocNum(HEAP_SYSTEM, (sp1A + 1) * sizeof(HsfexStruct02), MEMORY_DEFAULT_NUM); + var_r31->unk00 = 0.0f; + var_r31->unk08 = *arg2; + var_r31->unk20 = *arg4; + var_r31->unk14 = *arg3; + var_r31++; + for (var_r29 = 1, var_f31 = 0.0f; var_f31 <= temp_f29; var_r31++, var_r29++) { + var_r31->unk00 = var_f31; + var_r28 = temp_r26->track; + temp_r20 = &var_r28[temp_r26->numTracks]; + while (var_r28 < temp_r20) { + if (var_r28->type == 2) { + temp_r24 = &temp_r22->object[var_r28->target]; + if (temp_r24->type == 7) { + SetObjCamMotion(arg0, var_r28, GetCurve(var_r28, var_f31), var_r31); + } + } + var_r28++; + } + var_f31 += 6.0f; + } + if (var_f31 != temp_f29) { + var_r31->unk00 = temp_f29; + var_r28 = temp_r26->track; + temp_r20 = &var_r28[temp_r26->numTracks]; + while (var_r28 < temp_r20) { + if (var_r28->type == 2) { + temp_r24 = &temp_r22->object[var_r28->target]; + if (temp_r24->type == 7) { + SetObjCamMotion(arg0, var_r28, GetCurve(var_r28, temp_f29), var_r31); + } + } + var_r28++; + } + var_r29++; + } + var_r31 = temp_r21; + var_r31->unk04 = 0.0f; + var_f26 = 0.0f; + for (var_f31 = var_f26; var_f31 < var_r29 - 1; var_f31 += 1.0f, var_r31++) { + PSVECSubtract(&var_r31[1].unk08, &var_r31[0].unk08, &sp3C); + var_r31[1].unk04 = PSVECMag(&sp3C); + var_f26 += var_r31[1].unk04; + } + var_r31 = temp_r21; + var_f27 = 0.0f; + var_f31 = var_f27; + while (var_f31 < var_r29) { + var_f27 += var_r31->unk04; + var_r31->unk00 = arg5 * (var_f27 / var_f26); + var_f31 += 1.0f; + var_r31++; + } + var_f31 = 0.0f; + while (var_f31 <= arg5) { + switch (arg6) { + case 0: + var_f30 = var_f31; + break; + case 1: + var_f30 = arg5 * sin(90.0f * (var_f31 / arg5) * M_PI / 180.0); + break; + case 2: + var_f30 = arg5 * (1.0 - cos(90.0f * (var_f31 / arg5) * M_PI / 180.0)); + break; + } + var_r31 = temp_r21; + for (var_r30 = 0; var_r30 < var_r29; var_r30++, var_r31++) { + if (var_r31->unk00 <= var_f30 && var_r31[1].unk00 > var_f30) { + break; + } + } + if (var_r30 != var_r29) { + if (var_r30 == 0) { + sp1C[0] = -1.0f; + } else { + sp1C[0] = var_r31[-1].unk00; + } + sp1C[1] = var_r31->unk00; + if (var_r30 >= var_r29 - 1) { + sp1C[2] = 1.0f + var_r31->unk00; + } + sp1C[2] = var_r31[1].unk00; + if (var_r30 >= var_r29 - 2) { + sp1C[3] = 1.0f + sp1C[2]; + } else { + sp1C[3] = var_r31[2].unk00; + } + if (var_r30 == 0) { + sp2C[0] = var_r31[0].unk08.x; + } else { + sp2C[0] = var_r31[-1].unk08.x; + } + sp2C[1] = var_r31[0].unk08.x; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk08.x; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk08.x; + } + temp_r27->pos.x = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31[0].unk08.y; + } else { + sp2C[0] = var_r31[-1].unk08.y; + } + sp2C[1] = var_r31[0].unk08.y; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk08.y; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk08.y; + } + temp_r27->pos.y = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31[0].unk08.z; + } else { + sp2C[0] = var_r31[-1].unk08.z; + } + sp2C[1] = var_r31[0].unk08.z; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk08.z; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk08.z; + } + temp_r27->pos.z = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31[0].unk20.x; + } else { + sp2C[0] = var_r31[-1].unk20.x; + } + sp2C[1] = var_r31[0].unk20.x; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk20.x; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk20.x; + } + temp_r27->target.x = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31->unk20.y; + } else { + sp2C[0] = var_r31[-1].unk20.y; + } + sp2C[1] = var_r31->unk20.y; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk20.y; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk20.y; + } + temp_r27->target.y = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31->unk20.z; + } else { + sp2C[0] = var_r31[-1].unk20.z; + } + sp2C[1] = var_r31->unk20.z; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk20.z; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk20.z; + } + temp_r27->target.z = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31->unk14.x; + } else { + sp2C[0] = var_r31[-1].unk14.x; + } + sp2C[1] = var_r31->unk14.x; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk14.x; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk14.x; + } + temp_r27->up.x = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31->unk14.y; + } else { + sp2C[0] = var_r31[-1].unk14.y; + } + sp2C[1] = var_r31->unk14.y; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk14.y; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk14.y; + } + temp_r27->up.y = InterpolateBMLine(sp2C, sp1C, var_f30); + if (var_r30 == 0) { + sp2C[0] = var_r31->unk14.z; + } else { + sp2C[0] = var_r31[-1].unk14.z; + } + sp2C[1] = var_r31->unk14.z; + if (var_r30 >= var_r29 - 1) { + sp2C[2] = sp2C[1]; + } else { + sp2C[2] = var_r31[1].unk14.z; + } + if (var_r30 >= var_r29 - 2) { + sp2C[3] = sp2C[2]; + } else { + sp2C[3] = var_r31[2].unk14.z; + } + temp_r27->up.z = InterpolateBMLine(sp2C, sp1C, var_f30); + HuPrcVSleep(); + var_f31 += 1.0f; + } else { + break; + } + } + HuMemDirectFree(temp_r21); +} + +static void SetObjCamMotion(s16 arg0, HsfTrack *arg1, float arg2, HsfexStruct02 *arg3) { + ModelData *temp_r31 = &Hu3DData[arg0]; + Vec sp18; + Vec spC; + + switch (arg1->channel) { + case 8: + arg3->unk08.x = temp_r31->scale.x * (arg2 + temp_r31->pos.x); + break; + case 9: + arg3->unk08.y = temp_r31->scale.y * (arg2 + temp_r31->pos.y); + break; + case 10: + arg3->unk08.z = temp_r31->scale.z * (arg2 + temp_r31->pos.z); + break; + case 11: + arg3->unk20.x = temp_r31->scale.x * (arg2 + temp_r31->pos.x); + break; + case 12: + arg3->unk20.y = temp_r31->scale.y * (arg2 + temp_r31->pos.y); + break; + case 13: + arg3->unk20.z = temp_r31->scale.z * (arg2 + temp_r31->pos.z); + break; + case 14: + PSVECSubtract(&arg3->unk08, &arg3->unk20, &spC); + PSVECNormalize(&spC, &spC); + sp18.x = spC.x * spC.y * (1.0 - cos(M_PI * arg2 / 180.0)) - spC.z * sin(M_PI * arg2 / 180.0); + sp18.y = spC.y * spC.y + (1.0f - spC.y * spC.y) * cos(M_PI * arg2 / 180.0); + sp18.z = spC.y * spC.z * (1.0 - cos(M_PI * arg2 / 180.0)) + spC.x * sin(M_PI * arg2 / 180.0); + PSVECNormalize(&sp18, &arg3->unk14); + break; + } +} + +float InterpolateBMLine(float *arg0, float *arg1, float arg2) { + float sp8[2]; + float temp_f22; + float var_f21; + float temp_f20; + float temp_f29; + float temp_f31; + float var_f28; + float var_f27; + float var_f26; + float var_f25; + float var_f24; + float var_f23; + float var_f30; + s32 var_r30; + s32 var_r29; + s32 i; + + if (arg0[0] == arg0[1] && arg0[0] == arg0[2] && arg0[0] == arg0[3]) { + return arg0[0]; + } + for (i = 1; i <= 2; i++) { + sp8[i - 1] = 0.5f * ((arg0[i] - arg0[i - 1]) / (arg1[i] - arg1[i - 1]) + (arg0[i + 1] - arg0[i]) / (arg1[i + 1] - arg1[i])); + } + temp_f29 = 0.5f * (arg1[2] + arg1[1]); + var_r30 = 0; + if (sp8[1] - sp8[0] != 0.0f) { + temp_f22 = (sp8[1] * arg1[2] - sp8[0] * arg1[1] - (arg0[2] - arg0[1])) / (sp8[1] - sp8[0]); + var_r29 = 0; + if (arg1[1] <= temp_f22 && temp_f22 <= arg1[2]) { + var_r29 = 1; + } + var_r30 = (var_r29 != 0) ? 1 : 0; + } + if (var_r30 == 1) { + temp_f31 = temp_f29 - arg1[1]; + temp_f20 = (arg0[2] - arg0[1]) / (arg1[2] - arg1[1]) - (sp8[1] - sp8[0]) / 2; + var_f28 = temp_f20 * temp_f31 + ((sp8[1] - sp8[0]) / (2.0f * (arg1[2] - arg1[1]))) * temp_f31 * temp_f31 + arg0[1]; + var_f27 = temp_f20 + temp_f31 * ((sp8[1] - sp8[0]) / (arg1[2] - arg1[1])); + } else { + temp_f31 = temp_f29 - arg1[1]; + var_f28 = (arg0[2] + arg0[1]) * (temp_f31 / (arg1[2] - arg1[1])); + var_f27 = 2.0f * (arg0[2] - arg0[1]) / (arg1[2] - arg1[1]) - (sp8[1] + sp8[0]) * (temp_f31 / (arg1[2] - arg1[1])); + } + if (arg2 < temp_f29) { + var_f30 = arg1[1]; + var_f26 = arg0[1]; + var_f25 = sp8[0]; + var_f24 = temp_f29; + var_f21 = var_f28; + var_f23 = var_f27; + } else { + var_f30 = temp_f29; + var_f26 = var_f28; + var_f25 = var_f27; + var_f24 = arg1[2]; + var_f21 = arg0[2]; + var_f23 = sp8[1]; + } + return ((var_f23 - var_f25) / (2.0f * (var_f24 - var_f30))) * (arg2 - var_f30) * (arg2 - var_f30) + (arg2 - var_f30) * ((var_f21 - var_f26) / (var_f24 - var_f30) - (var_f23 - var_f25) / 2) + var_f26; +} + +void Hu3D2Dto3D(Vec *arg0, s16 arg1, Vec *arg2) { + CameraData *temp_r31; + float temp_f31; + float temp_f30; + float temp_f29; + float temp_f28; + float temp_f27; + s16 i; + Mtx spC; + + for (i = 0; i < 16; i++) { + if (arg1 & (1 << i)) { + break; + } + } + temp_r31 = &Hu3DCamera[i]; + temp_f30 = sin((temp_r31->fov / 2) * M_PI / 180.0) / cos((temp_r31->fov / 2) * M_PI / 180.0); + temp_f31 = temp_f30 * arg0->z * 2.0f; + temp_f29 = temp_f31 * 1.2f; + temp_f28 = arg0->x / 576.0f; + temp_f27 = arg0->y / 480.0f; + arg2->x = (temp_f28 - 0.5) * temp_f29; + arg2->y = -(temp_f27 - 0.5) * temp_f31; + arg2->z = -arg0->z; + C_MTXLookAt(spC, &temp_r31->pos, &temp_r31->up, &temp_r31->target); + PSMTXInverse(spC, spC); + PSMTXMultVec(spC, arg2, arg2); +} + +void Hu3D3Dto2D(Vec *arg0, s16 arg1, Vec *arg2) { + Vec sp10; + CameraData *temp_r31; + float temp_f31; + float temp_f30; + s16 i; + Mtx sp1C; + + for (i = 0; i < 16; i++) { + if (arg1 & (1 << i)) { + break; + } + } + temp_r31 = &Hu3DCamera[i]; + C_MTXLookAt(sp1C, &temp_r31->pos, &temp_r31->up, &temp_r31->target); + PSMTXMultVec(sp1C, arg0, &sp10); + temp_f31 = (sin((temp_r31->fov / 2) * M_PI / 180.0) / cos((temp_r31->fov / 2) * M_PI / 180.0)) * sp10.z * 1.2000000476837158; + temp_f30 = (sin((temp_r31->fov / 2) * M_PI / 180.0) / cos((temp_r31->fov / 2) * M_PI / 180.0)) * sp10.z; + arg2->x = 288.0f + sp10.x * (288.0f / -temp_f31); + arg2->y = 240.0f + sp10.y * (240.0f / temp_f30); + arg2->z = 0.0f; +} + +void Hu3DMtxTransGet(Mtx arg0, Vec *arg1) { + arg1->x = arg0[0][3]; + arg1->y = arg0[1][3]; + arg1->z = arg0[2][3]; +} + +static inline float GetAngleXY(float arg0, float arg1) { + if (arg1 == 0.0f) { + if (arg0 >= 0.0f) { + return M_PI / 2; + } else { + return -(M_PI / 2); + } + } else { + return atan2f(arg0, arg1); + } +} + +void Hu3DMtxRotGet(Mtx arg0, Vec *arg1) { + float sp48; + float sp44; + float sp3C; + float sp34; + float temp_f28; + float temp_f27; + float temp_f26; + float var_f25; + float temp_f24; + + temp_f28 = arg0[0][0] * arg0[0][0] + arg0[1][0] * arg0[1][0] + arg0[2][0] * arg0[2][0]; + sp44 = sqrtf(temp_f28); + if (!(sp44 < 0.00000001f)) { + temp_f27 = arg0[0][1] * arg0[0][1] + arg0[1][1] * arg0[1][1] + arg0[2][1] * arg0[2][1]; + sp3C = sqrtf(temp_f27); + if (!(sp3C < 0.00000001f)) { + temp_f26 = arg0[0][2] * arg0[0][2] + arg0[1][2] * arg0[1][2] + arg0[2][2] * arg0[2][2]; + sp34 = sqrtf(temp_f26); + if (!(sp34 < 0.00000001f)) { + temp_f24 = -arg0[2][0] / sp44; + if (temp_f24 >= 1.0f) { + var_f25 = M_PI / 2; + } else if (temp_f24 <= -1.0f) { + var_f25 = -(M_PI / 2); + } else { + var_f25 = asinf(temp_f24); + } + arg1->y = var_f25; + sp48 = cos(arg1->y); + if (sp48 >= 0.00000001f) { + arg1->x = GetAngleXY(arg0[2][1] / sp3C, arg0[2][2] / sp34); + arg1->z = GetAngleXY(arg0[1][0], arg0[0][0]); + } else { + arg1->x = GetAngleXY(arg0[0][1], arg0[1][1]); + arg1->z = 0.0f; + } + arg1->x = MTXRadToDeg(arg1->x); + arg1->y = MTXRadToDeg(arg1->y); + arg1->z = MTXRadToDeg(arg1->z); + return; + } + } + } + arg1->x = 0.0f; + arg1->y = 0.0f; + arg1->z = 0.0f; +} + +void Hu3DMtxScaleGet(Mtx arg0, Vec *arg1) { + Vec sp38; + Vec sp2C; + Vec sp20; + Vec sp14; + Vec sp8; + + sp2C.x = arg0[0][0]; + sp2C.y = arg0[1][0]; + sp2C.z = arg0[2][0]; + arg1->x = PSVECMag(&sp2C); + PSVECNormalize(&sp2C, &sp2C); + sp20.x = arg0[0][1]; + sp20.y = arg0[1][1]; + sp20.z = arg0[2][1]; + sp38.x = PSVECDotProduct(&sp2C, &sp20); + PSVECScale(&sp2C, &sp8, sp38.x); + PSVECSubtract(&sp20, &sp8, &sp20); + arg1->y = PSVECMag(&sp20); + PSVECNormalize(&sp20, &sp20); + sp38.x /= arg1->y; + sp14.x = arg0[0][2]; + sp14.y = arg0[1][2]; + sp14.z = arg0[2][2]; + sp38.z = PSVECDotProduct(&sp20, &sp14); + PSVECScale(&sp20, &sp8, sp38.z); + PSVECSubtract(&sp14, &sp8, &sp14); + sp38.y = PSVECDotProduct(&sp2C, &sp14); + PSVECScale(&sp2C, &sp8, sp38.y); + PSVECSubtract(&sp14, &sp8, &sp14); + arg1->z = PSVECMag(&sp14); + PSVECNormalize(&sp14, &sp14); + PSVECCrossProduct(&sp20, &sp14, &sp8); + if (PSVECDotProduct(&sp2C, &sp8) < 0.0) { + arg1->x *= -1.0; + arg1->y *= -1.0; + arg1->z *= -1.0; + } +} diff --git a/src/game/hsfman.c b/src/game/hsfman.c index 836ab428..19b39d33 100644 --- a/src/game/hsfman.c +++ b/src/game/hsfman.c @@ -1,5 +1,18 @@ #include "game/hsfman.h" +#include "game/ClusterExec.h" +#include "game/data.h" +#include "game/EnvelopeExec.h" +#include "game/hsfdraw.h" #include "game/hsfload.h" +#include "game/hsfmotion.h" +#include "game/init.h" +#include "game/memory.h" +#include "game/perf.h" +#include "game/ShapeExec.h" +#include "game/sprite.h" +#include "dolphin/gx/GXVert.h" + +#include "math.h" ModelData Hu3DData[0x200]; CameraData Hu3DCamera[0x10]; @@ -335,7 +348,7 @@ s16 Hu3DModelCreate(void *arg0) { var_r31->motion_attr = 0; var_r31->unk_02 = 0; MakeDisplayList(var_r30, (HsfData* ) var_r31->unk_48); - var_r31->unk_68.x = 1.0f; + var_r31->unk_68 = 1.0f; for (i = 0; i < 4; i++) { var_r31->unk_10[i] = -1; } @@ -356,8 +369,8 @@ s16 Hu3DModelCreate(void *arg0) { if (var_r31->hsfData->shapeCnt != 0) { Hu3DMotionShapeSet(var_r30, var_r31->unk_08); } - var_r31->unk_68.y = 0.0f; - var_r31->unk_68.z = Hu3DMotionMaxTimeGet(var_r30); + var_r31->unk_6C = 0.0f; + var_r31->unk_70 = Hu3DMotionMaxTimeGet(var_r30); } else { var_r31->unk_20 = var_r31->unk_08 = -1; } @@ -426,8 +439,8 @@ s16 Hu3DModelLink(s16 arg0) { var_r31->scale.x = var_r31->scale.y = var_r31->scale.z = 1.0f; var_r31->unk_08 = temp_r30->unk_08; if (var_r31->unk_08 != -1) { - var_r31->unk_68.y = 0.0f; - var_r31->unk_68.z = Hu3DMotionMaxTimeGet(var_r28); + var_r31->unk_6C = 0.0f; + var_r31->unk_70 = Hu3DMotionMaxTimeGet(var_r28); } var_r31->unk_0C = var_r31->unk_0A = var_r31->unk_0E = -1; for (i = 0; i < 4; i++) { @@ -438,7 +451,7 @@ s16 Hu3DModelLink(s16 arg0) { } } var_r31->unk_64 = temp_r30->unk_64; - var_r31->unk_68.x = temp_r30->unk_68.x; + var_r31->unk_68 = temp_r30->unk_68; var_r31->unk_20 = temp_r30->unk_20; var_r31->camera = -1; var_r31->layer = 0; @@ -458,7 +471,7 @@ s16 Hu3DModelLink(s16 arg0) { return var_r28; } -s16 Hu3DHookFuncCreate(HsfData* arg0) { +s16 Hu3DHookFuncCreate(ModelHookFunc hook) { HsfData* sp8; ModelData* var_r31; s16 var_r29; @@ -473,8 +486,8 @@ s16 Hu3DHookFuncCreate(HsfData* arg0) { if (var_r29 == 0x200) { return -1; } - var_r31->hsfData = arg0; - var_r31->unk_48 = (HsfData *)(var_r29 + 0x2710); + var_r31->hook = hook; + var_r31->unk_48 = (HsfData *)(var_r29 + 10000); var_r31->attr = 0x10; var_r31->motion_attr = 0; var_r31->pos.x = var_r31->pos.y = var_r31->pos.z = 0.0f; @@ -486,7 +499,7 @@ s16 Hu3DHookFuncCreate(HsfData* arg0) { var_r31->unk_10[i] = -1; } var_r31->unk_64 = 0.0f; - var_r31->unk_68.x = 1.0f; + var_r31->unk_68 = 1.0f; var_r31->unk_20 = -1; var_r31->camera = -1; var_r31->layer = 0; @@ -628,11 +641,11 @@ void Hu3DModelPosSet(s16 index, f32 x, f32 y, f32 z) { temp_r31->pos.z = z; } -void Hu3DModelPosSetV(s16 arg0, Vec arg1) { +void Hu3DModelPosSetV(s16 arg0, Vec *arg1) { ModelData* temp_r31; temp_r31 = &Hu3DData[arg0]; - temp_r31->pos = arg1; + temp_r31->pos = *arg1; } void Hu3DModelRotSet(s16 index, f32 x, f32 y, f32 z) { @@ -644,11 +657,11 @@ void Hu3DModelRotSet(s16 index, f32 x, f32 y, f32 z) { temp_r31->rot.z = z; } -void Hu3DModelRotSetV(s16 arg0, Vec arg1) { +void Hu3DModelRotSetV(s16 arg0, Vec *arg1) { ModelData* temp_r31; temp_r31 = &Hu3DData[arg0]; - temp_r31->rot = arg1; + temp_r31->rot = *arg1; } void Hu3DModelScaleSet(s16 index, f32 x, f32 y, f32 z) { @@ -660,11 +673,11 @@ void Hu3DModelScaleSet(s16 index, f32 x, f32 y, f32 z) { temp_r31->scale.z = z; } -void Hu3DModelScaleSetV(s16 arg0, Vec arg1) { +void Hu3DModelScaleSetV(s16 arg0, Vec *arg1) { ModelData* temp_r31; temp_r31 = &Hu3DData[arg0]; - temp_r31->scale = arg1; + temp_r31->scale = *arg1; } void Hu3DModelAttrSet(s16 arg0, u32 arg1) { @@ -1289,7 +1302,7 @@ s16 Hu3DModelCameraCreate(s16 arg0, u16 arg1) { ModelData* temp_r31; s16 temp_r3; - temp_r3 = Hu3DHookFuncCreate((HsfData* )-1); + temp_r3 = Hu3DHookFuncCreate((ModelHookFunc)-1); temp_r31 = &Hu3DData[(s16) temp_r3]; temp_r31->attr &= ~0x10; temp_r31->attr |= 0x10000 | 0x2000; diff --git a/src/game/hsfmotion.c b/src/game/hsfmotion.c new file mode 100644 index 00000000..5492499f --- /dev/null +++ b/src/game/hsfmotion.c @@ -0,0 +1,1430 @@ +#include "game/hsfmotion.h" +#include "game/ClusterExec.h" +#include "game/EnvelopeExec.h" +#include "game/hsfdraw.h" +#include "game/hsfload.h" +#include "game/hsfman.h" +#include "game/init.h" +#include "game/ShapeExec.h" + +#include "math.h" +#include "string.h" + +static s32 SearchObjectIndex(HsfData *arg0, u32 arg1); +static s32 SearchAttributeIndex(HsfData *arg0, u32 arg1); + +MotionData Hu3DMotion[256]; + +static HsfBitmap *bitMapPtr; + +void Hu3DMotionInit(void) { + MotionData *var_r31; + s16 i; + + var_r31 = (MotionData*) Hu3DData; + for (i = 0; i < 256; i++, var_r31++) { + var_r31->unk_04 = 0; + } +} + +s16 Hu3DMotionCreate(void *arg0) { + MotionData *var_r31; + s16 i; + + var_r31 = Hu3DMotion; + for (i = 0; i < 256; i++, var_r31++) { + if (var_r31->unk_04 == 0) { + break; + } + } + if (i == 256) { + OSReport("Error: Create Motion Over!\n"); + return -1; + } + var_r31->unk_04 = LoadHSF(arg0); + var_r31->unk_00 = 0; + var_r31->unk_02 = -1; + return i; +} + +s16 Hu3DMotionModelCreate(s16 arg0) { + ModelData *temp_r29 = &Hu3DData[arg0]; + MotionData *var_r31; + s16 i; + + var_r31 = Hu3DMotion; + for (i = 0; i < 256; i++, var_r31++) { + if (var_r31->unk_04 == 0) { + break; + } + } + if (i == 256) { + OSReport("Error: Create Motion Over!\n"); + return -1; + } + var_r31->unk_04 = temp_r29->hsfData; + var_r31->unk_00 = 0; + var_r31->unk_02 = arg0; + temp_r29->unk_20 = i; + return i; +} + +s32 Hu3DMotionKill(s16 arg0) { + ModelData *var_r30; + MotionData *temp_r31; + s16 i; + + temp_r31 = &Hu3DMotion[arg0]; + if (temp_r31->unk_04 == 0) { + return 0; + } + var_r30 = Hu3DData; + for (i = 0; i < 512; i++, var_r30++) { + if (var_r30->hsfData && var_r30->unk_08 == arg0 && temp_r31->unk_02 != i) { + break; + } + } + if (i != 512) { + return 0; + } + if (temp_r31->unk_02 == -1) { + HuMemDirectFree(temp_r31->unk_04); + } else { + Hu3DData[temp_r31->unk_02].unk_20 = -1; + } + temp_r31->unk_04 = NULL; + return 1; +} + +void Hu3DMotionAllKill(void) { + MotionData *var_r27; + s16 i; + + var_r27 = Hu3DMotion; + for (i = 0; i < 256; i++, var_r27++) { + if (var_r27->unk_04) { + Hu3DMotionKill(i); + } + } +} + +void Hu3DMotionSet(s16 arg0, s16 arg1) { + Hu3DData[arg0].unk_0C = -1; + Hu3DData[arg0].unk_08 = arg1; + Hu3DData[arg0].unk_64 = 0.0f; + Hu3DData[arg0].unk_6C = 0.0f; + Hu3DData[arg0].unk_70 = Hu3DMotionMaxTimeGet(arg0); +} + +void Hu3DMotionOverlaySet(s16 arg0, s16 arg1) { + Hu3DData[arg0].unk_0A = arg1; + Hu3DData[arg0].unk_74 = 0.0f; + Hu3DData[arg0].unk_78 = 1.0f; +} + +void Hu3DMotionOverlayReset(s16 arg0) { + Hu3DData[arg0].unk_0A = -1; +} + +float Hu3DMotionOverlayTimeGet(s16 arg0) { + return Hu3DData[arg0].unk_74; +} + +void Hu3DMotionOverlayTimeSet(s16 arg0, float arg1) { + Hu3DData[arg0].unk_74 = arg1; +} + +void Hu3DMotionOverlaySpeedSet(s16 arg0, float arg1) { + Hu3DData[arg0].unk_78 = arg1; +} + +void Hu3DMotionShiftSet(s16 arg0, s16 arg1, float arg2, float arg3, u32 arg4) { + ModelData *temp_r31 = &Hu3DData[arg0]; + MotionData *sp10 = &Hu3DMotion[arg1]; + s32 var_r30; + + arg4 &= ~0x40000000; + var_r30 = 0; + if (temp_r31->unk_0C != -1) { + temp_r31->unk_08 = temp_r31->unk_0C; + temp_r31->unk_64 = temp_r31->unk_84; + temp_r31->unk_68 = temp_r31->unk_88; + temp_r31->unk_6C = temp_r31->unk_8C; + temp_r31->unk_70 = temp_r31->unk_90; + if (arg4 & 0x40000008) { + var_r30 |= 0x40000000 | 1; + } + if (arg4 & 0x40000010) { + var_r30 |= 0x40000000 | 2; + } + if (arg4 & 0x40000020) { + var_r30 |= 0x40000000 | 4; + } + temp_r31->motion_attr &= ~0x4000003F; + temp_r31->motion_attr |= var_r30; + temp_r31->motion_attr &= ~0x40000000; + } else { + temp_r31->motion_attr &= ~0x40000038; + } + temp_r31->unk_0C = arg1; + temp_r31->unk_84 = arg2; + temp_r31->unk_88 = 1.0f; + temp_r31->unk_7C = 0.0f; + temp_r31->unk_80 = arg3; + temp_r31->unk_8C = 0.0f; + temp_r31->unk_90 = Hu3DMotionShiftMaxTimeGet(arg0); + if (arg4 & 0x40000001) { + var_r30 |= 0x40000000 | 8; + } + if (arg4 & 0x40000002) { + var_r30 |= 0x40000000 | 0x10; + } + if (arg4 & 0x40000004) { + var_r30 |= 0x40000000 | 0x20; + } + arg4 &= ~0x40000007; + temp_r31->motion_attr |= var_r30 | arg4; + temp_r31->motion_attr &= ~0x40000000; +} + +void Hu3DMotionShapeSet(s16 arg0, s16 arg1) { + Hu3DData[arg0].unk_0E = arg1; + Hu3DData[arg0].unk_94 = 0.0f; + Hu3DData[arg0].unk_98 = 1.0f; + Hu3DData[arg0].unk_9C = 0.0f; + Hu3DData[arg0].unk_A0 = Hu3DMotionShapeMaxTimeGet(arg0); +} + +s16 Hu3DMotionShapeIDGet(s16 arg0) { + return Hu3DData[arg0].unk_0E; +} + +void Hu3DMotionShapeSpeedSet(s16 arg0, float arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_98 = arg1; +} + +void Hu3DMotionShapeTimeSet(s16 arg0, float arg1) { + Hu3DData[arg0].unk_94 = arg1; +} + +float Hu3DMotionShapeMaxTimeGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + return Hu3DMotionMotionMaxTimeGet(temp_r31->unk_0E); +} + +void Hu3DMotionShapeStartEndSet(s16 arg0, float arg1, float arg2) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_9C = arg1; + temp_r31->unk_A0 = arg2; +} + +s16 Hu3DMotionClusterSet(s16 arg0, s16 arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + s16 i; + + for (i = 0; i < 4; i++) { + if (temp_r31->unk_10[i] == -1) { + temp_r31->unk_10[i] = arg1; + temp_r31->unk_A4[i] = 0.0f; + temp_r31->unk_B4[i] = 1.0f; + temp_r31->cluster_attr[i] = 0; + temp_r31->attr |= 0x400; + ClusterAdjustObject(temp_r31->hsfData, Hu3DMotion[arg1].unk_04); + return i; + } + } + OSReport("Error: Cluster Entry Over\n"); + return -1; +} + +s16 Hu3DMotionClusterNoSet(s16 arg0, s16 arg1, s16 arg2) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + Hu3DMotionClusterReset(arg0, arg2); + temp_r31->unk_10[arg2] = arg1; + temp_r31->unk_A4[arg2] = 0.0f; + temp_r31->unk_B4[arg2] = 1.0f; + temp_r31->attr |= 0x400; + ClusterAdjustObject(temp_r31->hsfData, Hu3DMotion[arg1].unk_04); + return arg2; +} + +void Hu3DMotionShapeReset(s16 arg0) { + Hu3DData[arg0].unk_0E = -1; +} + +void Hu3DMotionClusterReset(s16 arg0, s16 arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + s16 i; + + if (arg1 == -1) { + for (i = 0; i < 4; i++) { + temp_r31->unk_10[i] = -1; + } + temp_r31->attr &= ~0x400; + } else { + temp_r31->unk_10[arg1] = -1; + for (i = 0; i < 4; i++) { + if (temp_r31->unk_10[i] != -1) { + return; + } + } + temp_r31->attr &= ~0x400; + } +} + +s16 Hu3DMotionIDGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + return temp_r31->unk_08; +} + +s16 Hu3DMotionShiftIDGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + return temp_r31->unk_0C; +} + +void Hu3DMotionTimeSet(s16 arg0, float arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + if (Hu3DMotionMaxTimeGet(arg0) <= arg1) { + arg1 = Hu3DMotionMaxTimeGet(arg0); + } + if (arg1 < 0.0f) { + arg1 = 0.0f; + } + temp_r31->unk_64 = arg1; + if (temp_r31->hsfData != (HsfData*) -1 && temp_r31->hsfData->cenvCnt != 0 && (temp_r31->motion_attr & 0x40000002)) { + Hu3DMotionExec(arg0, temp_r31->unk_08, arg1, 0); + if (temp_r31->unk_0C != -1) { + Hu3DSubMotionExec(arg0); + } + EnvelopeProc(temp_r31->hsfData); + } +} + +float Hu3DMotionTimeGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + return temp_r31->unk_64; +} + +float Hu3DMotionShiftTimeGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + return temp_r31->unk_84; +} + +float Hu3DMotionMaxTimeGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + MotionData *temp_r30; + HsfMotion *temp_r29; + s16 temp_r28; + + if (temp_r31->unk_08 == -1) { + return 0.0f; + } + temp_r30 = &Hu3DMotion[temp_r31->unk_08]; + temp_r29 = temp_r30->unk_04->motion; + temp_r28 = 0.0001 + temp_r29->len; + return temp_r28; +} + +float Hu3DMotionShiftMaxTimeGet(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + MotionData *temp_r30; + HsfMotion *temp_r29; + s16 temp_r28; + + if (temp_r31->unk_0C == -1) { + return 0.0f; + } + temp_r30 = &Hu3DMotion[temp_r31->unk_0C]; + temp_r29 = temp_r30->unk_04->motion; + temp_r28 = 0.0001 + temp_r29->len; + return temp_r28; +} + +void Hu3DMotionShiftStartEndSet(s16 arg0, float arg1, float arg2) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_8C = arg1; + temp_r31->unk_90 = arg2; +} + +float Hu3DMotionMotionMaxTimeGet(s16 arg0) { + MotionData *temp_r31 = &Hu3DMotion[arg0]; + HsfMotion *temp_r30; + s16 temp_r29; + + if (temp_r31->unk_04 == 0) { + return 0.0f; + } + temp_r30 = temp_r31->unk_04->motion; + temp_r29 = 0.0001 + temp_r30->len; + return temp_r29; +} + +void Hu3DMotionStartEndSet(s16 arg0, float arg1, float arg2) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_6C = arg1; + temp_r31->unk_70 = arg2; +} + +s32 Hu3DMotionEndCheck(s16 arg0) { + if (!(Hu3DData[arg0].motion_attr & 0x40000004)) { + return (Hu3DMotionMaxTimeGet(arg0) <= Hu3DMotionTimeGet(arg0)); + } else { + return (Hu3DMotionTimeGet(arg0) <= 0.0f); + } +} + +void Hu3DMotionSpeedSet(s16 arg0, float arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_68 = arg1; +} + +void Hu3DMotionShiftSpeedSet(s16 arg0, float arg1) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + temp_r31->unk_88 = arg1; +} + +void Hu3DMotionNoMotSet(s16 arg0, char *arg1, u32 arg2) { + HsfConstData *var_r29; + HsfObject *temp_r3; + + temp_r3 = Hu3DModelObjPtrGet(arg0, arg1); + if (temp_r3->constData == 0) { + var_r29 = ObjConstantMake(temp_r3, (u32) Hu3DData[arg0].unk_48); + } else { + var_r29 = temp_r3->constData; + } + var_r29->flags |= arg2; + if (arg2 & 0x10) { + temp_r3->data.curr.pos.x = temp_r3->data.base.pos.x; + } + if (arg2 & 0x20) { + temp_r3->data.curr.pos.y = temp_r3->data.base.pos.y; + } + if (arg2 & 0x40) { + temp_r3->data.curr.pos.z = temp_r3->data.base.pos.z; + } + if (arg2 & 0x80) { + temp_r3->data.curr.rot.x = temp_r3->data.base.rot.x; + } + if (arg2 & 0x100) { + temp_r3->data.curr.rot.y = temp_r3->data.base.rot.y; + } + if (arg2 & 0x200) { + temp_r3->data.curr.rot.z = temp_r3->data.base.rot.z; + } +} + +void Hu3DMotionNoMotReset(s16 arg0, char *arg1, u32 arg2) { + HsfObject *temp_r31; + HsfConstData *temp_r30; + + temp_r31 = Hu3DModelObjPtrGet(arg0, arg1); + temp_r30 = temp_r31->constData; + temp_r30->flags &= ~arg2; +} + +void Hu3DMotionForceSet(s16 arg0, char *arg1, u32 arg2, float arg3) { + HsfConstData *var_r29; + HsfObject *temp_r3; + + temp_r3 = Hu3DModelObjPtrGet(arg0, arg1); + if (temp_r3->constData == 0) { + var_r29 = ObjConstantMake(temp_r3, (u32) Hu3DData[arg0].unk_48); + } else { + var_r29 = temp_r3->constData; + } + var_r29->flags |= arg2; + if (arg2 & 0x10) { + temp_r3->data.curr.pos.x = arg3; + } + if (arg2 & 0x20) { + temp_r3->data.curr.pos.y = arg3; + } + if (arg2 & 0x40) { + temp_r3->data.curr.pos.z = arg3; + } + if (arg2 & 0x80) { + temp_r3->data.curr.rot.x = arg3; + } + if (arg2 & 0x100) { + temp_r3->data.curr.rot.y = arg3; + } + if (arg2 & 0x200) { + temp_r3->data.curr.rot.z = arg3; + } +} + +void Hu3DMotionNext(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + HsfMotion *temp_r29; + MotionData *temp_r27; + u32 temp_r28; + s16 i; + + temp_r27 = &Hu3DMotion[temp_r31->unk_08]; + temp_r29 = temp_r27->unk_04->motion; + temp_r28 = temp_r31->motion_attr; + if (temp_r31->unk_08 != -1) { + temp_r27 = &Hu3DMotion[temp_r31->unk_08]; + if (!(temp_r28 & 0x40000002)) { + if (!(temp_r28 & 0x40000004)) { + temp_r31->unk_64 += temp_r31->unk_68 * minimumVcountf; + } else { + temp_r31->unk_64 -= temp_r31->unk_68 * minimumVcountf; + } + if (temp_r28 & 0x40000001) { + if (temp_r31->unk_64 < temp_r31->unk_6C) { + temp_r31->unk_64 = temp_r31->unk_70 - (temp_r31->unk_6C - temp_r31->unk_64); + } else if (temp_r31->unk_64 >= temp_r31->unk_70) { + temp_r31->unk_64 = temp_r31->unk_6C + (temp_r31->unk_64 - temp_r31->unk_70); + } + } else if (temp_r31->unk_64 < 0.0f) { + temp_r31->unk_64 = 0.0f; + } else if (temp_r31->unk_64 >= temp_r31->unk_70) { + temp_r31->unk_64 = temp_r31->unk_70; + } + } + } + if (temp_r31->unk_0A != -1) { + temp_r27 = &Hu3DMotion[temp_r31->unk_0A]; + temp_r29 = temp_r27->unk_04->motion; + if (!(temp_r28 & 0x40000400)) { + if (!(temp_r28 & 0x40000800)) { + temp_r31->unk_74 += temp_r31->unk_78 * minimumVcountf; + } else { + temp_r31->unk_74 -= temp_r31->unk_78 * minimumVcountf; + } + if (temp_r28 & 0x40000200) { + if (temp_r31->unk_74 < 0.0f) { + temp_r31->unk_74 = temp_r29->len; + } else if (temp_r31->unk_74 >= temp_r29->len) { + temp_r31->unk_74 = 0.0f; + } + } else if (temp_r31->unk_74 < 0.0f) { + temp_r31->unk_74 = 0.0f; + } else if (temp_r31->unk_74 >= temp_r29->len) { + temp_r31->unk_74 = temp_r29->len; + } + } + } + if (temp_r31->unk_0C != -1) { + temp_r31->unk_7C += minimumVcountf; + if (temp_r31->unk_7C >= temp_r31->unk_80) { + temp_r31->unk_08 = temp_r31->unk_0C; + temp_r31->unk_64 = temp_r31->unk_84; + temp_r31->unk_68 = temp_r31->unk_88; + temp_r31->unk_6C = temp_r31->unk_8C; + temp_r31->unk_70 = temp_r31->unk_90; + temp_r31->unk_0C = -1; + temp_r28 = 0; + if (temp_r31->motion_attr & 0x40000008) { + temp_r28 |= 0x40000000 | 1; + } + if (temp_r31->motion_attr & 0x40000010) { + temp_r28 |= 0x40000000 | 2; + } + if (temp_r31->motion_attr & 0x40000020) { + temp_r28 |= 0x40000000 | 4; + } + temp_r31->motion_attr &= ~0x4000003F; + temp_r31->motion_attr |= temp_r28; + temp_r31->motion_attr &= ~0x40000000; + return; + } + if (!(temp_r31->motion_attr & 0x40000010)) { + temp_r27 = &Hu3DMotion[temp_r31->unk_0C]; + if (!(temp_r31->motion_attr & 0x40000020)) { + temp_r31->unk_84 += temp_r31->unk_88 * minimumVcountf; + } else { + temp_r31->unk_84 -= temp_r31->unk_88 * minimumVcountf; + } + if (temp_r31->motion_attr & 0x40000008) { + if (temp_r31->unk_84 < temp_r31->unk_8C) { + temp_r31->unk_84 = temp_r31->unk_90; + } else if (temp_r31->unk_84 >= temp_r31->unk_90) { + temp_r31->unk_84 = temp_r31->unk_8C; + } + } else if (temp_r31->unk_84 < temp_r31->unk_8C) { + temp_r31->unk_84 = temp_r31->unk_8C; + } else if (temp_r31->unk_84 >= temp_r31->unk_90) { + temp_r31->unk_84 = temp_r31->unk_90; + } + } + } + if (temp_r31->unk_0E != -1 && !(temp_r28 & 0x40000080)) { + temp_r27 = &Hu3DMotion[temp_r31->unk_0E]; + temp_r29 = temp_r27->unk_04->motion; + if (!(temp_r28 & 0x40000100)) { + temp_r31->unk_94 += temp_r31->unk_98 * minimumVcountf; + } else { + temp_r31->unk_94 -= temp_r31->unk_98 * minimumVcountf; + } + if (temp_r28 & 0x40000040) { + if (temp_r31->unk_94 < temp_r31->unk_9C) { + temp_r31->unk_94 = temp_r31->unk_A0; + } else if (temp_r31->unk_94 >= temp_r31->unk_A0) { + temp_r31->unk_94 = temp_r31->unk_9C; + } + } else if (temp_r31->unk_94 < temp_r31->unk_9C) { + temp_r31->unk_94 = temp_r31->unk_9C; + } else if (temp_r31->unk_94 >= temp_r31->unk_A0) { + temp_r31->unk_94 = temp_r31->unk_A0; + } + } + if (temp_r31->attr & 0x400) { + for (i = 0; i < 4; i++) { + if (temp_r31->unk_10[i] != -1 && !(temp_r31->cluster_attr[i] & (s32) 0xC0000002)) { + temp_r27 = &Hu3DMotion[temp_r31->unk_10[i]]; + temp_r29 = temp_r27->unk_04->motion; + if (!(temp_r31->cluster_attr[i] & (s32) 0xC0000004)) { + temp_r31->unk_A4[i] += temp_r31->unk_B4[i] * minimumVcountf; + } else { + temp_r31->unk_A4[i] -= temp_r31->unk_B4[i] * minimumVcountf; + } + if (temp_r31->cluster_attr[i] & (s32) 0xC0000001) { + if (temp_r31->unk_A4[i] < 0.0f) { + temp_r31->unk_A4[i] = temp_r29->len; + } else if (temp_r31->unk_A4[i] >= temp_r29->len) { + temp_r31->unk_A4[i] = 0.0f; + } + } else if (temp_r31->unk_A4[i] < 0.0f) { + temp_r31->unk_A4[i] = 0.0f; + } else if (temp_r31->unk_A4[i] >= temp_r29->len) { + temp_r31->unk_A4[i] = temp_r29->len; + } + } + } + } +} + +void Hu3DMotionExec(s16 arg0, s16 arg1, float arg2, s32 arg3) { + MotionData *sp18; + HsfData *sp14; + HsfTrack *sp10; + HsfConstData *temp_r28; + HsfData *temp_r29; + HsfMotion *temp_r21; + HsfObject *temp_r31; + HsfObject *var_r19; + HsfCluster *var_r23; + HsfTrack *var_r30; + HsfTrack *temp_r25; + HsfTrack *temp_r22; + HsfTrack *var_r26; + ModelData *temp_r27; + s16 temp_r24; + s16 var_r18; + float *temp_r17; + + temp_r27 = &Hu3DData[arg0]; + sp18 = &Hu3DMotion[arg1]; + temp_r29 = temp_r27->hsfData; + sp14 = sp18->unk_04; + temp_r21 = sp14->motion; + var_r30 = temp_r21->track; + var_r19 = temp_r29->object; + if (arg3 == 0) { + for (var_r18 = 0; var_r18 < temp_r29->objectCnt; var_r19++, var_r18++) { + temp_r31 = var_r19; + if (temp_r31->constData) { + temp_r28 = temp_r31->constData; + if (temp_r28->flags & 0x3F0) { + temp_r24 = temp_r28->flags; + if (!(temp_r24 & 0x10)) { + temp_r31->data.curr.pos.x = temp_r31->data.base.pos.x; + } + if (!(temp_r24 & 0x20)) { + temp_r31->data.curr.pos.y = temp_r31->data.base.pos.y; + } + if (!(temp_r24 & 0x40)) { + temp_r31->data.curr.pos.z = temp_r31->data.base.pos.z; + } + if (!(temp_r24 & 0x80)) { + temp_r31->data.curr.rot.x = temp_r31->data.base.rot.x; + } + if (!(temp_r24 & 0x100)) { + temp_r31->data.curr.rot.y = temp_r31->data.base.rot.y; + } + if (!(temp_r24 & 0x200)) { + temp_r31->data.curr.rot.z = temp_r31->data.base.rot.z; + } + } else { + temp_r31->data.curr = temp_r31->data.base; + } + } else { + temp_r31->data.curr = temp_r31->data.base; + } + } + } + sp10 = &var_r30[temp_r21->numTracks]; + for (; var_r30 < sp10; var_r30++) { + switch (var_r30->type) { + case 2: + if (var_r30->target < temp_r29->objectCnt && var_r30->target != -1) { + temp_r31 = &temp_r29->object[var_r30->target]; + if (var_r30->channel == 0x28) { + temp_r31->data.mesh.baseMorph = GetCurve(var_r30, arg2); + } else if (temp_r31->type == 7) { + if (temp_r27->attr & 0x2000) { + SetObjCameraMotion(arg0, var_r30, GetCurve(var_r30, arg2)); + } + } else if (temp_r31->type == 8) { + SetObjLightMotion(arg0, var_r30, GetCurve(var_r30, arg2)); + } else if (var_r30->channel == 0x18) { + if (temp_r31->constData) { + temp_r28 = temp_r31->constData; + if (GetCurve(var_r30, arg2) == 1.0f) { + temp_r28->flags &= ~0x1000; + } else { + temp_r28->flags |= 0x1000; + } + } + } else if (var_r30->channel == 0x1A) { + if (temp_r31->constData) { + temp_r28 = temp_r31->constData; + if (GetCurve(var_r30, arg2) == 1.0f) { + temp_r28->flags &= ~0x2000; + } else { + temp_r28->flags |= 0x2000; + } + } + } else { + temp_r17 = GetObjTRXPtr(temp_r31, var_r30->channel); + if (temp_r17 != (float*) -1) { + *temp_r17 = GetCurve(var_r30, arg2); + } + } + } + break; + case 3: + temp_r25 = var_r30; + if (temp_r25->target < temp_r29->objectCnt) { + temp_r31 = &temp_r29->object[temp_r25->target]; + temp_r31->data.mesh.morphWeight[temp_r25->channel_s16] = GetCurve(temp_r25, arg2); + } + break; + case 9: + if (!(temp_r27->attr & 0x80000)) { + if (var_r30->param < temp_r29->materialCnt) { + SetObjMatMotion(arg0, var_r30, GetCurve(var_r30, arg2)); + } + } + break; + case 5: + if (!(temp_r27->attr & 0x80000)) { + var_r23 = &temp_r29->cluster[var_r30->target_s16]; + var_r23->unk10 = GetClusterCurve(var_r30, arg2); + } + break; + case 6: + if (!(temp_r27->attr & 0x80000)) { + temp_r22 = var_r30; + var_r23 = &temp_r29->cluster[temp_r22->target_s16]; + var_r23->unk14[temp_r22->unk04] = GetClusterWeightCurve(temp_r22, arg2); + } + break; + case 10: + var_r26 = var_r30; + if (var_r26->target_s16 != -1 || !(temp_r27->attr & 0x80000)) { + if (var_r26->param != -1 && var_r26->param < temp_r29->attributeCnt) { + SetObjAttrMotion(arg0, var_r26, GetCurve(var_r26, arg2)); + } + } + break; + } + } +} + +void Hu3DCameraMotionExec(s16 arg0) { + ModelData *temp_r30; + MotionData *temp_r28; + HsfData *temp_r27; + HsfMotion *temp_r29; + HsfTrack *var_r31; + HsfTrack *temp_r26; + + temp_r30 = &Hu3DData[arg0]; + temp_r28 = &Hu3DMotion[temp_r30->unk_08]; + temp_r27 = temp_r28->unk_04; + temp_r29 = temp_r27->motion; + var_r31 = temp_r29->track; + if (temp_r30->attr & 0x2000) { + temp_r26 = &var_r31[temp_r29->numTracks]; + for (; var_r31 < temp_r26; var_r31++) { + if (var_r31->type == 2 && var_r31->param_u16 == 7) { + SetObjCameraMotion(arg0, var_r31, GetCurve(var_r31, temp_r30->unk_64)); + } + } + } +} + +void Hu3DSubMotionExec(s16 arg0) { + ModelData *temp_r30; + MotionData *temp_r22; + HsfData *temp_r28; + HsfData *temp_r21; + HsfMotion *temp_r25; + HsfTrack *var_r29; + HsfObject *var_r23; + HsfObject *temp_r26; + float *temp_r31; + float var_f30; + float var_f31; + s16 temp_r24; + s16 var_r27; + + temp_r30 = &Hu3DData[arg0]; + temp_r22 = &Hu3DMotion[temp_r30->unk_0C]; + temp_r28 = temp_r30->hsfData; + temp_r21 = temp_r22->unk_04; + temp_r25 = temp_r21->motion; + var_r29 = temp_r25->track; + var_r23 = temp_r28->object; + if (temp_r30->unk_08 == -1) { + for (var_r27 = 0; var_r27 < temp_r28->objectCnt; var_r23++, var_r27++) { + temp_r26 = var_r23; + temp_r26->data.curr = temp_r26->data.base; + } + } + if (temp_r30->unk_80) { + var_f30 = temp_r30->unk_7C / temp_r30->unk_80; + } else { + var_f30 = 1.0f; + } + for (var_r27 = 0; var_r27 < temp_r25->numTracks; var_r27++, var_r29++) { + switch (var_r29->type) { + case 2: + if (var_r29->target < temp_r28->objectCnt && var_r29->target != -1) { + temp_r26 = &temp_r28->object[var_r29->target]; + temp_r24 = var_r29->channel; + temp_r31 = GetObjTRXPtr(temp_r26, temp_r24); + if (temp_r31 != (float*) -1) { + if (temp_r24 == 0x1C || temp_r24 == 0x1D || temp_r24 == 0x1E) { + var_f31 = GetCurve(var_r29, temp_r30->unk_84); + if (var_f31 < 0.0f) { + var_f31 += 360.0f; + } + if (*temp_r31 < 0.0f) { + *temp_r31 += 360.0f; + } + if (var_f31 < 180.0f) { + if (*temp_r31 > (180.0f + var_f31)) { + *temp_r31 -= 360.0f; + } + } else if (*temp_r31 < (var_f31 - 180.0f)) { + var_f31 -= 360.0f; + } + *temp_r31 = (1.0f - var_f30) * *temp_r31 + var_f30 * var_f31; + } else { + *temp_r31 = (1.0f - var_f30) * *temp_r31 + var_f30 * GetCurve(var_r29, temp_r30->unk_84); + } + } + } + break; + } + } +} + +__declspec(weak) float *GetObjTRXPtr(HsfObject *arg0, u16 arg1) { + HsfConstData *temp_r31 = arg0->constData; + + switch (arg1) { + case 8: + if (temp_r31 && (temp_r31->flags & 0x10)) { + return (float*) -1; + } + return &arg0->data.curr.pos.x; + case 9: + if (temp_r31 && (temp_r31->flags & 0x20)) { + return (float*) -1; + } + return &arg0->data.curr.pos.y; + case 10: + if (temp_r31 && (temp_r31->flags & 0x40)) { + return (float*) -1; + } + return &arg0->data.curr.pos.z; + case 28: + if (temp_r31 && (temp_r31->flags & 0x80)) { + return (float*) -1; + } + return &arg0->data.curr.rot.x; + case 29: + if (temp_r31 && (temp_r31->flags & 0x100)) { + return (float*) -1; + } + return &arg0->data.curr.rot.y; + case 30: + if (temp_r31 && (temp_r31->flags & 0x200)) { + return (float*) -1; + } + return &arg0->data.curr.rot.z; + case 31: + return &arg0->data.curr.scale.x; + case 32: + return &arg0->data.curr.scale.y; + case 33: + return &arg0->data.curr.scale.z; + default: + return (float*) -1; + } +} + +void SetObjMatMotion(s16 arg0, HsfTrack *arg1, float arg2) { + HsfMaterial *temp_r31; + HsfData *temp_r29; + ModelData *temp_r30; + float var_f31; + + temp_r30 = &Hu3DData[arg0]; + temp_r29 = temp_r30->hsfData; + temp_r31 = &temp_r29->material[arg1->param]; + var_f31 = arg2; + if (arg2 > 1.0f) { + var_f31 = 1.0f; + } else if (arg2 < 0.0f) { + var_f31 = 0.0f; + } + switch (arg1->channel) { + case 0: + temp_r31->litColor[0] = var_f31 * 255.0f; + break; + case 1: + temp_r31->litColor[1] = var_f31 * 255.0f; + break; + case 2: + temp_r31->litColor[2] = var_f31 * 255.0f; + break; + case 0x31: + temp_r31->color[0] = var_f31 * 255.0f; + break; + case 0x32: + temp_r31->color[1] = var_f31 * 255.0f; + break; + case 0x33: + temp_r31->color[2] = var_f31 * 255.0f; + break; + case 0x34: + temp_r31->shadowColor[0] = var_f31 * 255.0f; + break; + case 0x35: + temp_r31->shadowColor[1] = var_f31 * 255.0f; + break; + case 0x36: + temp_r31->shadowColor[2] = var_f31 * 255.0f; + break; + case 0x39: + if (!(temp_r30->attr & 0x40000)) { + temp_r31->invAlpha = var_f31; + } + break; + case 0x3C: + temp_r31->refAlpha = var_f31; + break; + } +} + +void SetObjAttrMotion(s16 arg0, HsfTrack *arg1, float arg2) { + ModelData *temp_r28; + HsfData *temp_r27; + HsfAttribute *temp_r30; + HsfdrawStruct01 *var_r31; + float var_f30; + + temp_r28 = &Hu3DData[arg0]; + temp_r27 = temp_r28->hsfData; + temp_r30 = &temp_r27->attribute[arg1->param]; + var_f30 = arg2; + if (arg2 > 1.0f) { + var_f30 = 1.0f; + } else if (arg2 < 0.0f) { + var_f30 = 0.0f; + } + switch (arg1->channel) { + case 8: + case 9: + case 0xA: + case 0x1C: + case 0x1D: + case 0x1E: + case 0x1F: + case 0x20: + case 0x21: + case 0x43: + if (temp_r30->unk04 == 0) { + var_r31 = HuMemDirectMallocNum(HEAP_DATA, sizeof(HsfdrawStruct01), (u32) Hu3DData[arg0].unk_48); + temp_r30->unk04 = var_r31; + var_r31->unk00 = 0; + var_r31->unk08 = var_r31->unk0C = var_r31->unk10 = 0.0f; + var_r31->unk14 = var_r31->unk18 = var_r31->unk1C = 0.0f; + var_r31->unk20 = var_r31->unk24 = var_r31->unk28 = 1.0f; + } else { + var_r31 = temp_r30->unk04; + } + if (arg1->channel != 0x43) { + var_r31->unk00 |= 4; + } else { + var_r31->unk00 |= 8; + } + break; + } + switch (arg1->channel) { + case 8: + var_r31->unk08 = arg2; + break; + case 9: + var_r31->unk0C = arg2; + break; + case 10: + var_r31->unk10 = arg2; + break; + case 28: + var_r31->unk14 = arg2; + break; + case 29: + var_r31->unk18 = arg2; + break; + case 30: + var_r31->unk1C = arg2; + break; + case 31: + var_r31->unk20 = arg2; + break; + case 32: + var_r31->unk24 = arg2; + break; + case 33: + var_r31->unk28 = arg2; + break; + case 64: + temp_r30->unk20 = var_f30; + break; + case 62: + temp_r30->unk0C = var_f30; + break; + case 63: + temp_r30->unk14 = arg2; + break; + case 67: + var_r31->unk3C = bitMapPtr; + break; + } +} + +void SetObjCameraMotion(s16 arg0, HsfTrack *arg1, float arg2) { + ModelData *temp_r29; + Vec sp18; + Vec spC; + float var_f31; + float var_f30; + s16 var_r30; + s16 temp_r28; + s16 i; + + temp_r29 = &Hu3DData[arg0]; + temp_r28 = temp_r29->unk_01; + if (temp_r28 != 0) { + var_f31 = arg2; + if (arg2 > 1.0f) { + var_f31 = 1.0f; + } else if (arg2 < 0.0f) { + var_f31 = 0.0f; + } + switch (arg1->channel) { + case 8: + var_f30 = temp_r29->scale.x * (arg2 + temp_r29->pos.x); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].pos.x = var_f30; + } + } + break; + case 9: + var_f30 = temp_r29->scale.y * (arg2 + temp_r29->pos.y); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].pos.y = var_f30; + } + } + break; + case 10: + var_f30 = temp_r29->scale.z * (arg2 + temp_r29->pos.z); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].pos.z = var_f30; + } + } + break; + case 11: + var_f30 = temp_r29->scale.x * (arg2 + temp_r29->pos.x); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].target.x = var_f30; + } + } + break; + case 12: + var_f30 = temp_r29->scale.y * (arg2 + temp_r29->pos.y); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].target.y = var_f30; + } + } + break; + case 13: + var_f30 = temp_r29->scale.z * (arg2 + temp_r29->pos.z); + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].target.z = var_f30; + } + } + break; + case 14: + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + PSVECSubtract(&Hu3DCamera[i].pos, &Hu3DCamera[i].target, &spC); + PSVECNormalize(&spC, &spC); + sp18.x = spC.x * spC.y * (1.0 - cos(M_PI * arg2 / 180.0)) - spC.z * sin(M_PI * arg2 / 180.0); + sp18.y = spC.y * spC.y + (1.0f - spC.y * spC.y) * cos(M_PI * arg2 / 180.0); + sp18.z = spC.y * spC.z * (1.0 - cos(M_PI * arg2 / 180.0)) + spC.x * sin(M_PI * arg2 / 180.0); + PSVECNormalize(&sp18, &Hu3DCamera[i].up); + Hu3DCamera[i].aspect_dupe = arg2; + } + } + break; + case 15: + for (i = 0, var_r30 = 1; i < 16; i++, var_r30 <<= 1) { + if (var_r30 & temp_r28) { + Hu3DCamera[i].fov = arg2; + } + } + break; + } + } +} + +void SetObjLightMotion(s16 arg0, HsfTrack *arg1, float arg2) { + s16 var_r29; + ModelData *temp_r30; + HsfData *temp_r28; + HsfObject *var_r26; + HsfObject *var_r24; + LightData *temp_r31; + float var_f30; + s16 i; + + temp_r30 = &Hu3DData[arg0]; + temp_r28 = temp_r30->hsfData; + var_r26 = temp_r28->object; + for (i = var_r29 = 0; i < temp_r28->objectCnt; i++, var_r26++) { + var_r24 = var_r26; + if (var_r24->type == 8) { + if (i != arg1->target) { + var_r29++; + } else { + break; + } + } + } + if (i != temp_r28->objectCnt) { + temp_r31 = &Hu3DGlobalLight[temp_r30->unk_28[var_r29]]; + var_f30 = arg2; + if (arg2 > 1.0f) { + var_f30 = 1.0f; + } else if (arg2 < 0.0f) { + var_f30 = 0.0f; + } + switch (arg1->channel) { + case 8: + temp_r31->unk_1C.x = arg2; + break; + case 9: + temp_r31->unk_1C.y = arg2; + break; + case 10: + temp_r31->unk_1C.z = arg2; + break; + case 11: + temp_r31->unk_34.x = arg2; + Hu3DGLightPosAimSetV(temp_r30->unk_28[var_r29], &temp_r31->unk_1C, &temp_r31->unk_34); + break; + case 12: + temp_r31->unk_34.y = arg2; + Hu3DGLightPosAimSetV(temp_r30->unk_28[var_r29], &temp_r31->unk_1C, &temp_r31->unk_34); + break; + case 13: + temp_r31->unk_34.z = arg2; + Hu3DGLightPosAimSetV(temp_r30->unk_28[var_r29], &temp_r31->unk_1C, &temp_r31->unk_34); + break; + } + } +} + +float GetCurve(HsfTrack *arg0, float arg1) { + float *var_r30; + + switch (arg0->curveType) { + case 1: + return GetLinear(arg0->numKeyframes, arg0->data, arg1); + case 2: + return GetBezier(arg0->numKeyframes, arg0, arg1); + case 3: + bitMapPtr = GetBitMap(arg0->numKeyframes, arg0->data, arg1); + break; + case 4: + var_r30 = &arg0->value; + return *var_r30; + case 0: + return GetConstant(arg0->numKeyframes, arg0->data, arg1); + } + return 0.0f; +} + +float GetConstant(s32 arg0, float *arg1, float arg2) { + float *var_r31; + s16 i; + + var_r31 = arg1; + if (arg2 == 0.0f || arg0 == 1) { + return arg1[1]; + } + for (i = 0; i < arg0; i++, var_r31 += 2) { + if (arg2 < var_r31[0]) { + return var_r31[-1]; + } + } + return var_r31[-1]; +} + +float GetLinear(s32 arg0, float arg1[][2], float arg2) { + float var_f31; + float var_f30; + s16 temp_r30; + s16 var_r31; + + if (arg2 == 0.0f || arg0 == 1) { + return arg1[0][1]; + } + for (var_r31 = 0; var_r31 < arg0; var_r31++) { + if (arg2 < arg1[var_r31][0]) { + temp_r30 = var_r31 - 1; + var_f30 = arg1[var_r31][0] - arg1[temp_r30][0]; + var_f31 = arg1[temp_r30][1] + (arg2 - arg1[temp_r30][0]) * ((arg1[var_r31][1] - arg1[temp_r30][1]) / var_f30); + return var_f31; + } + } + return arg1[arg0 - 1][1]; +} + +__declspec(weak) float GetBezier(s32 arg0, HsfTrack *arg1, float arg2) { + float temp_f24; + float temp_f29; + float temp_f28; + float temp_f27; + float temp_f26; + float temp_f25; + float temp_f30; + float temp_f31; + float (*var_r31)[4]; + float (*var_r29)[4]; + s32 i; + + var_r31 = arg1->data; + if (arg2 == 0.0f || arg0 == 1) { + return var_r31[0][1]; + } + i = -1; + if (arg1->start == 0 && arg2 < var_r31[0][0]) { + i = 0; + } + if (i == -1) { + var_r31 = (float(*)[4]) arg1->data + arg1->start; + var_r29 = var_r31 - 1; + for (i = arg1->start; i < arg0; i++, var_r31++) { + if (arg2 >= var_r29[0][0] && arg2 < var_r31[0][0]) { + break; + } + var_r29 = var_r31; + } + if (i >= arg0) { + var_r31 = arg1->data; + for (i = 0; i < arg0; i++, var_r31++) { + if (arg2 < var_r31[0][0]) { + break; + } + } + } + } + arg1->start = i; + if (i == arg0) { + return var_r31[-1][1]; + } + temp_f24 = var_r31[0][0]; + var_r31--; + temp_f29 = var_r31[0][0]; + temp_f31 = (arg2 - temp_f29) / (temp_f24 - temp_f29); + temp_f30 = temp_f31 * temp_f31; + temp_f28 = 2.0f * temp_f30; + temp_f27 = 3.0f * temp_f30; + temp_f26 = temp_f31 * temp_f30; + temp_f25 = temp_f31 * temp_f28; + return var_r31[0][1] * (temp_f25 - temp_f27 + 1.0f) + + var_r31[1][1] * (-temp_f25 + temp_f27) + + var_r31[0][2] * (temp_f26 - temp_f28 + temp_f31) + + var_r31[1][3] * (temp_f26 - temp_f30); +} + +HsfBitmap *GetBitMap(s32 arg0, UnknownHsfMotionStruct01 *arg1, float arg2) { + s16 var_r31; + + if (arg2 == 0.0f || arg0 == 1) { + return arg1->unk04; + } + for (var_r31 = 0; var_r31 < arg0; var_r31++, arg1++) { + if (arg2 < arg1->unk00 * 60.0f) { + break; + } + } + return arg1[-1].unk04; +} + +s16 Hu3DJointMotion(s16 arg0, void *arg1) { + s16 var_r29; + + var_r29 = Hu3DMotionCreate(arg1); + JointModel_Motion(arg0, var_r29); + return var_r29; +} + +void JointModel_Motion(s16 arg0, s16 arg1) { + ModelData *temp_r24; + MotionData *temp_r23; + HsfData *temp_r26; + HsfData *temp_r22; + HsfMotion *temp_r29; + HsfTrack *var_r30; + HsfTrack *var_r28; + HsfTrack *var_r27; + HsfTrack *var_r31; + s32 temp_r21; + s32 i; + + temp_r24 = &Hu3DData[arg0]; + temp_r23 = &Hu3DMotion[arg1]; + temp_r26 = temp_r24->hsfData; + temp_r22 = temp_r23->unk_04; + temp_r29 = temp_r22->motion; + var_r30 = temp_r29->track; + for (i = 0; i < temp_r29->numTracks; i++, var_r30++) { + switch (var_r30->type) { + case 2: + var_r28 = var_r30; + var_r28->target = SearchObjectIndex(temp_r26, var_r28->target); + break; + case 3: + var_r27 = var_r30; + var_r27->target = SearchObjectIndex(temp_r26, var_r27->target); + break; + case 10: + var_r31 = var_r30; + if (var_r31->param == -1) { + temp_r21 = SearchAttributeIndex(temp_r26, var_r31->target_s16); + if (temp_r21 != -1) { + var_r31->param = temp_r21; + } else { + var_r31->param = -1; + } + } + break; + } + } +} + +void Hu3DMotionCalc(s16 arg0) { + ModelData *temp_r31 = &Hu3DData[arg0]; + + if ((temp_r31->attr & 1) || (temp_r31->attr & 0x8000)) { + return; + } + if (temp_r31->unk_08 != -1) { + Hu3DMotionExec(arg0, temp_r31->unk_08, temp_r31->unk_64, 0); + } + if (temp_r31->unk_0C != -1) { + Hu3DSubMotionExec(arg0); + } + if (temp_r31->unk_0A != -1) { + Hu3DMotionExec(arg0, temp_r31->unk_0A, temp_r31->unk_74, 1); + } + if (temp_r31->attr & 0x400) { + ClusterMotionExec(temp_r31); + } + if (temp_r31->unk_0E != -1) { + if (temp_r31->unk_08 == -1) { + Hu3DMotionExec(arg0, temp_r31->unk_0E, temp_r31->unk_94, 0); + } else { + Hu3DMotionExec(arg0, temp_r31->unk_0E, temp_r31->unk_94, 1); + } + } + if (!(temp_r31->attr & 0x90) || !(temp_r31->motion_attr & 0x40000002)) { + InitVtxParm(temp_r31->hsfData); + if (temp_r31->unk_0E != -1) { + ShapeProc(temp_r31->hsfData); + } + if (temp_r31->attr & 0x400) { + ClusterProc(temp_r31); + } + if (temp_r31->hsfData->cenvCnt != 0) { + EnvelopeProc(temp_r31->hsfData); + } + PPCSync(); + } + temp_r31->attr |= 0x800; +} + +static s32 SearchObjectIndex(HsfData *arg0, u32 arg1) { + s32 i; + char *temp_r28; + HsfObject *var_r30; + + var_r30 = arg0->object; + temp_r28 = SetName(&arg1); + for (i = 0; i < arg0->objectCnt; i++, var_r30++) { + if (CmpObjectName(var_r30->name, temp_r28) == 0) { + return i; + } + } + return -1; +} + +static s32 SearchAttributeIndex(HsfData *arg0, u32 arg1) { + HsfAttribute *var_r31; + size_t temp_r28; + char *temp_r27; + s32 i; + + var_r31 = arg0->attribute; + temp_r27 = SetName(&arg1); + for (i = 0; i < arg0->attributeCnt; i++, var_r31++) { + if (var_r31->name) { + temp_r28 = strlen(var_r31->name); + if (strncmp(var_r31->name, temp_r27, temp_r28) == 0) { + return i; + } + } + } + return -1; +} diff --git a/src/game/jmp.c b/src/game/jmp.c new file mode 100755 index 00000000..94ec81b4 --- /dev/null +++ b/src/game/jmp.c @@ -0,0 +1,74 @@ +#include "game/jmp.h" + +int gcsetjmp(register jmp_buf *jump) { + // clang-format off + asm { + mflr r5 + mfcr r6 + stw r5, jump->lr + stw r6, jump->cr + stw r1, jump->sp + stw r2, jump->r2 + stmw r13, jump->regs[0] + mffs f0 + stfd f14, jump->flt_regs[0] + stfd f15, jump->flt_regs[1] + stfd f16, jump->flt_regs[2] + stfd f17, jump->flt_regs[3] + stfd f18, jump->flt_regs[4] + stfd f19, jump->flt_regs[5] + stfd f20, jump->flt_regs[6] + stfd f21, jump->flt_regs[7] + stfd f22, jump->flt_regs[8] + stfd f23, jump->flt_regs[9] + stfd f24, jump->flt_regs[10] + stfd f25, jump->flt_regs[11] + stfd f26, jump->flt_regs[12] + stfd f27, jump->flt_regs[13] + stfd f28, jump->flt_regs[14] + stfd f29, jump->flt_regs[15] + stfd f30, jump->flt_regs[16] + stfd f31, jump->flt_regs[17] + stfd f0, jump->flt_regs[18] + } + // clang-format on + return 0; +} + +// clang-format off +asm int gclongjmp(register jmp_buf *jump, register int status) { + nofralloc + lwz r5, jump->lr + lwz r6, jump->cr + mtlr r5 + mtcrf 255, r6 + lwz r1, jump->sp + lwz r2, jump->r2 + lmw r13, jump->regs[0] + lfd f14, jump->flt_regs[0] + lfd f15, jump->flt_regs[1] + lfd f16, jump->flt_regs[2] + lfd f17, jump->flt_regs[3] + lfd f18, jump->flt_regs[4] + lfd f19, jump->flt_regs[5] + lfd f20, jump->flt_regs[6] + lfd f21, jump->flt_regs[7] + lfd f22, jump->flt_regs[8] + lfd f23, jump->flt_regs[9] + lfd f24, jump->flt_regs[10] + lfd f25, jump->flt_regs[11] + lfd f26, jump->flt_regs[12] + lfd f27, jump->flt_regs[13] + lfd f28, jump->flt_regs[14] + lfd f29, jump->flt_regs[15] + lfd f30, jump->flt_regs[16] + lfd f0, jump->flt_regs[18] + lfd f31, jump->flt_regs[17] + cmpwi status, 0 + mr r3, status + mtfsf 255, f0 + bnelr + li r3, 1 + blr +} +// clang-format on diff --git a/src/game/objmain.c b/src/game/objmain.c index f253bf13..ce30d3d7 100644 --- a/src/game/objmain.c +++ b/src/game/objmain.c @@ -1,4 +1,6 @@ #include "game/audio.h" +#include "game/esprite.h" +#include "game/hsfdraw.h" #include "game/hsfman.h" #include "game/printfunc.h" #include "game/object.h" @@ -140,7 +142,7 @@ void omOvlReturnEx(s16 level, s16 arg2) void omOvlKill(s16 arg) { - CharModelKillAll(-1); + CharModelKill(-1); MGSeqKillAll(); Hu3DAllKill(); HuWinAllKill(); diff --git a/src/game/process.c b/src/game/process.c index 00811161..121089b0 100644 --- a/src/game/process.c +++ b/src/game/process.c @@ -4,9 +4,6 @@ #define PROCESS_MEMORY_RETADDR 0xA5A5A5A5 -extern int gcsetjmp(jmp_buf *jump); -extern void gclongjmp(jmp_buf *jump, int status); - #define EXEC_NORMAL 0 #define EXEC_SLEEP 1 #define EXEC_CHILDWATCH 2 diff --git a/src/game/thpmain.c b/src/game/thpmain.c new file mode 100755 index 00000000..1f8a68a9 --- /dev/null +++ b/src/game/thpmain.c @@ -0,0 +1,252 @@ +#include "game/thpmain.h" +#include "game/hsfdraw.h" +#include "game/hsfman.h" +#include "game/init.h" +#include "game/process.h" +#include "game/sprite.h" +#include "game/THPSimple.h" + +#include "string.h" + +static void THPTestProc(void); +static void THPViewFunc(ModelData *arg0, Mtx arg1); +static void THPViewSprFunc(SpriteData *arg0); +static void THPDecodeFunc(void *param); + +static char THPFileName[64]; + +static UnkThpStruct04 audioTrack; +static s32 decodeRate; +static u8 *decodeStackP; +static OSThread *decodeThread; +static s16 THPLoopF; +static s16 THPStat; +static u32 THPFrame; +static s16 THPStart; +Process *THPProc; + +s16 HuTHPSprCreateVol(char *path, s16 loop, s16 prio, float volume) { + s16 temp_r31; + + if (THPProc) { + return -1; + } + THPStart = 0; + THPProc = HuPrcCreate(THPTestProc, 0x64, 0x3000, 0); + if (THPProc == 0) { + return -1; + } + temp_r31 = HuSprFuncCreate(THPViewSprFunc, prio); + if (temp_r31 == -1) { + return -1; + } + THPSimpleInit(2); + SimpleControl.unk19C = 0; + SimpleControl.unk19E = temp_r31; + SimpleControl.unkBC = volume; + strcpy(THPFileName, path); + THPLoopF = loop; + THPStat = 0; + THPFrame = 0; + return temp_r31; +} + +s16 HuTHPSprCreate(char *path, s16 loop, s16 prio) { + return HuTHPSprCreateVol(path, loop, prio, 110.0f); +} + +s16 HuTHP3DCreateVol(char *path, s16 loop, float volume) { + s16 temp_r31; + + if (THPProc) { + return; + } + THPStart = 0; + THPProc = HuPrcCreate(THPTestProc, 0x64, 0x3000, 0); + if (THPProc == 0) { + return -1; + } + THPSimpleInit(2); + SimpleControl.unk19C = 1; + temp_r31 = Hu3DHookFuncCreate(&THPViewFunc); + SimpleControl.unk19E = temp_r31; + SimpleControl.unkBC = volume; + strcpy(THPFileName, path); + THPLoopF = loop; + THPStat = 0; + THPFrame = 0; + Hu3DModelAttrSet(SimpleControl.unk19E, 1); + return temp_r31; +} + +s16 HuTHP3DCreate(char *path, s16 loop) { + return HuTHP3DCreateVol(path, loop, 110.0f); +} + +void HuTHPStop(void) { + THPStat = 1; +} + +void HuTHPClose(void) { + THPStat = 2; +} + +void HuTHPRestart(void) { + THPStat = 3; +} + +BOOL HuTHPEndCheck(void) { + s32 temp_r31; + + temp_r31 = THPSimpleGetTotalFrame() - 1; + if (temp_r31 <= 0) { + return FALSE; + } + return (temp_r31 <= THPFrame); +} + +s32 HuTHPFrameGet(void) { + return THPFrame; +} + +s32 HuTHPTotalFrameGet(void) { + return THPSimpleGetTotalFrame(); +} + +void HuTHPSetVolume(s32 left, s32 right) { + THPSimpleSetVolume(left, right); +} + +static void THPTestProc(void) { + s32 temp_r29; + u32 var_r28; + void *temp_r30; + + while (THPSimpleOpen(THPFileName) == 0) { + OSReport("THPSimpleOpen fail"); + HuPrcVSleep(); + } + THPSimpleGetVideoInfo(&audioTrack); + temp_r29 = THPSimpleCalcNeedMemory(); + OSReport("Size %x\n", temp_r29); + temp_r30 = HuMemDirectMalloc(HEAP_DATA, temp_r29); + memset(temp_r30, 0, temp_r29); + DCFlushRange(temp_r30, temp_r29); + if (temp_r30 == 0) { + OSReport("Can't allocate the memory\n"); + } + THPSimpleSetBuffer(temp_r30); + while (THPSimplePreLoad(THPLoopF) == 0) { + OSReport("THPSimplePreLoad fail"); + HuPrcVSleep(); + } + HuPrcVSleep(); + decodeStackP = HuMemDirectMalloc(HEAP_SYSTEM, 0x2000); + decodeThread = OSSetIdleFunction(THPDecodeFunc, NULL, decodeStackP + 0x2000, 0x2000); + decodeRate = 0; + THPStart = 1; + if (SimpleControl.unk19C == 1) { + Hu3DModelAttrReset(SimpleControl.unk19E, 1); + } else { + HuSprAttrReset(SimpleControl.unk19E, 0, 4); + } + while (1) { + if (THPStat == 2) { + break; + } + switch (THPStat) { + case 0: + var_r28 = 1; + THPStat = 4; + break; + case 1: + THPSimpleAudioStop(); + THPSimpleLoadStop(); + break; + case 3: + THPSimpleAudioStop(); + THPSimpleLoadStop(); + while (THPSimplePreLoad(THPLoopF) == 0) { + OSReport("THPSimplePreLoad fail"); + HuPrcVSleep(); + } + THPStat = 0; + var_r28 = 1; + break; + } + if (var_r28 != 0) { + THPSimpleAudioStart(); + var_r28 = 0; + } + HuPrcVSleep(); + } + if (SimpleControl.unk19C == 1) { + Hu3DModelKill(SimpleControl.unk19E); + } else { + HuSprKill(SimpleControl.unk19E); + } + OSCancelThread(decodeThread); + HuMemDirectFree(decodeStackP); + THPSimpleAudioStop(); + THPSimpleLoadStop(); + THPSimpleClose(); + HuMemDirectFree(temp_r30); + THPSimpleQuit(); + THPProc = NULL; + HuPrcKill(HuPrcCurrentGet()); + while (1) { + HuPrcVSleep(); + } +} + +static void THPViewFunc(ModelData *arg0, Mtx arg1) { + GXColor spC = { 0xFF, 0xFF, 0xFF, 0xFF }; + + if (THPStart != 0) { + GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); + GXSetCullMode(GX_CULL_NONE); + THPFrame = THPSimpleDrawCurrentFrame(RenderMode, &spC, arg1, -audioTrack.unk00 / 2, audioTrack.unk04 / 2, audioTrack.unk00, -audioTrack.unk04); + THPSimpleAudioStart(); + } +} + +static void THPViewSprFunc(SpriteData *arg0) { + Vec spC = { 0.0f, 0.0f, 1.0f }; + GXColor sp8; + s32 temp_r30; + s32 temp_r29; + Mtx sp48; + Mtx sp18; + + if (THPStart != 0) { + sp8.r = arg0->r; + sp8.g = arg0->g; + sp8.b = arg0->b; + sp8.a = arg0->a; + if (arg0->z_rot != 0.0f) { + PSMTXRotAxisRad(sp18, &spC, MTXDegToRad(arg0->z_rot)); + PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f); + PSMTXConcat(sp18, sp48, sp48); + } else { + PSMTXScale(sp48, arg0->scale_x, arg0->scale_y, 1.0f); + } + mtxTransCat(sp48, arg0->x, arg0->y, 0.0f); + PSMTXConcat(*arg0->group_mtx, sp48, sp48); + temp_r30 = -((s32) audioTrack.unk00 / 2); + temp_r29 = -((s32) audioTrack.unk04 / 2); + GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE); + THPFrame = THPSimpleDrawCurrentFrame(RenderMode, &sp8, sp48, temp_r30, temp_r29, audioTrack.unk00, audioTrack.unk04); + } +} + +static void THPDecodeFunc(void *param) { + while (1) { + if (THPStat == 2) { + break; + } + if (THPSimpleDecode() == 1) { + OSReport("Fail to decode video data"); + } + VIWaitForRetrace(); + } +} diff --git a/src/game/window.c b/src/game/window.c index 92d30fa4..91e72636 100644 --- a/src/game/window.c +++ b/src/game/window.c @@ -201,14 +201,12 @@ void HuWindowInit(void) { void HuWinInit(s32 mess_data_no) { s16 i; void *anim_data; - s8 language; if (!winProc) { HuAR_ARAMtoMRAM(winAMemP); winProc = HuPrcCreate(HuWinProc, 0x64, 0x1000, 0); HuPrcSetStat(winProc, 0xC); - language = GWGameStat.language; - LanguageNo = language; + LanguageNo = GWLanguageGet(); messDataNo = mess_data_no; fontWidthP = (LanguageNo == 0) ? charWJTbl : charWETbl; HuWinMesRead(mess_data_no);