mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-04 16:28:11 -04:00
T3: batch t3_S53 — restruct: batch t3_S53 rung S — 157 files (TUs; 157 drawable) · 863 bodies: 1020 sites → members / 206 kept / 570 skipped · levers off 0 · compiles 205 in 402 s wall · final 157/157 identical · written 53 files | R22 check-all: 218 passed, 0 failed of 218 | type_census: 1650 definitions (523 layouts, 53 duplicate classes, 0 variant camps) · 341400 cast sites in 51491 bodies over 8 base classes (4 forms + A, coverage OK) · 229 lying declarations / 24 callees (+5293 K&R sites, +418 cross-binary apart) · controls 4/4 (restruct_cycle)
This commit is contained in:
+151
-151
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"head": "951fc52932",
|
||||
"head": "5b9a1a0964",
|
||||
"stamp": "588cbf38c6e4",
|
||||
"generated": "2026-10-02 00:50",
|
||||
"generated": "2026-10-02 01:02",
|
||||
"aliases": [
|
||||
"main",
|
||||
"md_SC07_004",
|
||||
@@ -21,175 +21,175 @@
|
||||
"main": {
|
||||
"objects": 85,
|
||||
"identical": 85,
|
||||
"seconds": 7.444000000000001,
|
||||
"mean_s": 0.088
|
||||
"seconds": 7.265000000000001,
|
||||
"mean_s": 0.085
|
||||
},
|
||||
"md_SC07_004": {
|
||||
"objects": 1,
|
||||
"identical": 1,
|
||||
"seconds": 0.521,
|
||||
"mean_s": 0.521
|
||||
"seconds": 0.535,
|
||||
"mean_s": 0.535
|
||||
},
|
||||
"ov_SC03_015": {
|
||||
"objects": 32,
|
||||
"identical": 32,
|
||||
"seconds": 5.211,
|
||||
"mean_s": 0.163
|
||||
"seconds": 5.162000000000002,
|
||||
"mean_s": 0.161
|
||||
},
|
||||
"ov_SC04_011": {
|
||||
"objects": 28,
|
||||
"identical": 28,
|
||||
"seconds": 4.444,
|
||||
"mean_s": 0.159
|
||||
"seconds": 4.308000000000001,
|
||||
"mean_s": 0.154
|
||||
}
|
||||
},
|
||||
"per_object_seconds": {
|
||||
"build/src/800.o": 0.792,
|
||||
"build/src/800_b.o": 0.081,
|
||||
"build/src/800_b_2.o": 0.341,
|
||||
"build/src/800_b_o0a.o": 0.074,
|
||||
"build/src/800_c.o": 0.221,
|
||||
"build/src/800b2.o": 0.099,
|
||||
"build/src/apicard1.o": 0.085,
|
||||
"build/src/apicard2.o": 0.092,
|
||||
"build/src/apicard3.o": 0.072,
|
||||
"build/src/apicard4.o": 0.072,
|
||||
"build/src/apicard5.o": 0.106,
|
||||
"build/src/apicard6.o": 0.073,
|
||||
"build/src/apicard7.o": 0.073,
|
||||
"build/src/boot.o": 0.099,
|
||||
"build/src/gap.o": 0.076,
|
||||
"build/src/libapi1.o": 0.08,
|
||||
"build/src/libapi2.o": 0.065,
|
||||
"build/src/libc2_1.o": 0.068,
|
||||
"build/src/libc2_2.o": 0.065,
|
||||
"build/src/libcd1.o": 0.076,
|
||||
"build/src/libcd2.o": 0.069,
|
||||
"build/src/libetc.o": 0.068,
|
||||
"build/src/libgpu.o": 0.068,
|
||||
"build/src/libgpu2.o": 0.074,
|
||||
"build/src/libgs1.o": 0.066,
|
||||
"build/src/libgs2.o": 0.063,
|
||||
"build/src/libgs3.o": 0.07,
|
||||
"build/src/libgs4.o": 0.077,
|
||||
"build/src/libgs5.o": 0.064,
|
||||
"build/src/libgs6.o": 0.083,
|
||||
"build/src/800.o": 0.815,
|
||||
"build/src/800_b.o": 0.085,
|
||||
"build/src/800_b_2.o": 0.332,
|
||||
"build/src/800_b_o0a.o": 0.068,
|
||||
"build/src/800_c.o": 0.208,
|
||||
"build/src/800b2.o": 0.08,
|
||||
"build/src/apicard1.o": 0.061,
|
||||
"build/src/apicard2.o": 0.074,
|
||||
"build/src/apicard3.o": 0.079,
|
||||
"build/src/apicard4.o": 0.09,
|
||||
"build/src/apicard5.o": 0.062,
|
||||
"build/src/apicard6.o": 0.071,
|
||||
"build/src/apicard7.o": 0.1,
|
||||
"build/src/boot.o": 0.12,
|
||||
"build/src/gap.o": 0.08,
|
||||
"build/src/libapi1.o": 0.098,
|
||||
"build/src/libapi2.o": 0.064,
|
||||
"build/src/libc2_1.o": 0.064,
|
||||
"build/src/libc2_2.o": 0.061,
|
||||
"build/src/libcd1.o": 0.073,
|
||||
"build/src/libcd2.o": 0.067,
|
||||
"build/src/libetc.o": 0.072,
|
||||
"build/src/libgpu.o": 0.064,
|
||||
"build/src/libgpu2.o": 0.075,
|
||||
"build/src/libgs1.o": 0.063,
|
||||
"build/src/libgs2.o": 0.068,
|
||||
"build/src/libgs3.o": 0.062,
|
||||
"build/src/libgs4.o": 0.066,
|
||||
"build/src/libgs5.o": 0.066,
|
||||
"build/src/libgs6.o": 0.08,
|
||||
"build/src/libgs7.o": 0.066,
|
||||
"build/src/libgs8.o": 0.064,
|
||||
"build/src/libgte1.o": 0.069,
|
||||
"build/src/libgte10.o": 0.063,
|
||||
"build/src/libgte11.o": 0.067,
|
||||
"build/src/libgte12.o": 0.066,
|
||||
"build/src/libgte13.o": 0.078,
|
||||
"build/src/libgte14.o": 0.076,
|
||||
"build/src/libgte15.o": 0.068,
|
||||
"build/src/libgte16.o": 0.072,
|
||||
"build/src/libgte17.o": 0.071,
|
||||
"build/src/libgte18.o": 0.066,
|
||||
"build/src/libgte19.o": 0.064,
|
||||
"build/src/libgte2.o": 0.069,
|
||||
"build/src/libgte20.o": 0.074,
|
||||
"build/src/libgte21.o": 0.065,
|
||||
"build/src/libgte22.o": 0.074,
|
||||
"build/src/libgte23.o": 0.069,
|
||||
"build/src/libgte24.o": 0.065,
|
||||
"build/src/libgte25.o": 0.066,
|
||||
"build/src/libgte26.o": 0.067,
|
||||
"build/src/libgs8.o": 0.062,
|
||||
"build/src/libgte1.o": 0.066,
|
||||
"build/src/libgte10.o": 0.061,
|
||||
"build/src/libgte11.o": 0.071,
|
||||
"build/src/libgte12.o": 0.067,
|
||||
"build/src/libgte13.o": 0.073,
|
||||
"build/src/libgte14.o": 0.067,
|
||||
"build/src/libgte15.o": 0.069,
|
||||
"build/src/libgte16.o": 0.066,
|
||||
"build/src/libgte17.o": 0.073,
|
||||
"build/src/libgte18.o": 0.072,
|
||||
"build/src/libgte19.o": 0.065,
|
||||
"build/src/libgte2.o": 0.07,
|
||||
"build/src/libgte20.o": 0.066,
|
||||
"build/src/libgte21.o": 0.067,
|
||||
"build/src/libgte22.o": 0.072,
|
||||
"build/src/libgte23.o": 0.063,
|
||||
"build/src/libgte24.o": 0.068,
|
||||
"build/src/libgte25.o": 0.072,
|
||||
"build/src/libgte26.o": 0.073,
|
||||
"build/src/libgte27.o": 0.071,
|
||||
"build/src/libgte28.o": 0.068,
|
||||
"build/src/libgte29.o": 0.06,
|
||||
"build/src/libgte3.o": 0.074,
|
||||
"build/src/libgte30.o": 0.075,
|
||||
"build/src/libgte4.o": 0.077,
|
||||
"build/src/libgte5.o": 0.075,
|
||||
"build/src/libgte6.o": 0.071,
|
||||
"build/src/libgte7.o": 0.077,
|
||||
"build/src/libgte8.o": 0.07,
|
||||
"build/src/libgte9.o": 0.081,
|
||||
"build/src/libmcrd1.o": 0.098,
|
||||
"build/src/libmcrd2.o": 0.083,
|
||||
"build/src/libpad1.o": 0.078,
|
||||
"build/src/libpad2.o": 0.078,
|
||||
"build/src/libgte28.o": 0.065,
|
||||
"build/src/libgte29.o": 0.063,
|
||||
"build/src/libgte3.o": 0.073,
|
||||
"build/src/libgte30.o": 0.069,
|
||||
"build/src/libgte4.o": 0.065,
|
||||
"build/src/libgte5.o": 0.068,
|
||||
"build/src/libgte6.o": 0.066,
|
||||
"build/src/libgte7.o": 0.068,
|
||||
"build/src/libgte8.o": 0.071,
|
||||
"build/src/libgte9.o": 0.069,
|
||||
"build/src/libmcrd1.o": 0.078,
|
||||
"build/src/libmcrd2.o": 0.087,
|
||||
"build/src/libpad1.o": 0.071,
|
||||
"build/src/libpad2.o": 0.093,
|
||||
"build/src/sgap.o": 0.071,
|
||||
"build/src/sgap_2.o": 0.103,
|
||||
"build/src/sgap_3.o": 0.071,
|
||||
"build/src/sgap_4.o": 0.079,
|
||||
"build/src/sgap_5.o": 0.076,
|
||||
"build/src/sgap_6.o": 0.065,
|
||||
"build/src/sgap_8.o": 0.081,
|
||||
"build/src/snd1.o": 0.078,
|
||||
"build/src/snd10.o": 0.08,
|
||||
"build/src/snd11.o": 0.073,
|
||||
"build/src/snd12.o": 0.075,
|
||||
"build/src/snd2.o": 0.081,
|
||||
"build/src/snd3.o": 0.086,
|
||||
"build/src/snd4.o": 0.079,
|
||||
"build/src/snd5.o": 0.072,
|
||||
"build/src/snd6.o": 0.074,
|
||||
"build/src/snd7.o": 0.077,
|
||||
"build/src/snd8.o": 0.066,
|
||||
"build/src/snd9.o": 0.07,
|
||||
"build/src/md_SC07_004/md_SC07_004.o": 0.521,
|
||||
"build/src/ov_SC03_015/ov_SC03_015.o": 0.164,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_after.o": 0.551,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8012ACE0.o": 0.408,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80135888.o": 0.074,
|
||||
"build/src/sgap_2.o": 0.069,
|
||||
"build/src/sgap_3.o": 0.068,
|
||||
"build/src/sgap_4.o": 0.074,
|
||||
"build/src/sgap_5.o": 0.07,
|
||||
"build/src/sgap_6.o": 0.064,
|
||||
"build/src/sgap_8.o": 0.076,
|
||||
"build/src/snd1.o": 0.076,
|
||||
"build/src/snd10.o": 0.075,
|
||||
"build/src/snd11.o": 0.076,
|
||||
"build/src/snd12.o": 0.073,
|
||||
"build/src/snd2.o": 0.079,
|
||||
"build/src/snd3.o": 0.067,
|
||||
"build/src/snd4.o": 0.081,
|
||||
"build/src/snd5.o": 0.064,
|
||||
"build/src/snd6.o": 0.075,
|
||||
"build/src/snd7.o": 0.08,
|
||||
"build/src/snd8.o": 0.075,
|
||||
"build/src/snd9.o": 0.078,
|
||||
"build/src/md_SC07_004/md_SC07_004.o": 0.535,
|
||||
"build/src/ov_SC03_015/ov_SC03_015.o": 0.151,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_after.o": 0.51,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8012ACE0.o": 0.431,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80135888.o": 0.075,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80135A4C.o": 0.076,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80135D20.o": 0.136,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801380E0.o": 0.176,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013C98C.o": 0.135,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013F350.o": 0.116,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013FFD8.o": 0.08,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80140608.o": 0.212,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015444C.o": 0.094,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80154C24.o": 0.187,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801588CC.o": 0.11,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80159C84.o": 0.079,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015A3C8.o": 0.072,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015AE2C.o": 0.104,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015C32C.o": 0.487,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8016AB6C.o": 0.282,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80171B4C.o": 0.114,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801734BC.o": 0.22,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801789AC.o": 0.071,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80178D40.o": 0.116,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017A4AC.o": 0.073,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017AE2C.o": 0.189,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017EB7C.o": 0.22,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80184440.o": 0.068,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801848E4.o": 0.297,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0b.o": 0.062,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0c.o": 0.077,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0d.o": 0.074,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0e.o": 0.087,
|
||||
"build/src/ov_SC04_011/ov_SC04_011.o": 0.148,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_after.o": 0.464,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8012ACE0.o": 0.383,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135888.o": 0.063,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135A4C.o": 0.062,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135D20.o": 0.133,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801380E0.o": 0.169,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013C98C.o": 0.13,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013F350.o": 0.097,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013FFD8.o": 0.074,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80140608.o": 0.202,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015444C.o": 0.09,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80154C24.o": 0.182,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80135D20.o": 0.14,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801380E0.o": 0.184,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013C98C.o": 0.142,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013F350.o": 0.093,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8013FFD8.o": 0.083,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80140608.o": 0.201,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015444C.o": 0.088,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80154C24.o": 0.185,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801588CC.o": 0.115,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80159C84.o": 0.08,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015A3C8.o": 0.088,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015AE2C.o": 0.107,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8015C32C.o": 0.491,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8016AB6C.o": 0.273,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80171B4C.o": 0.112,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801734BC.o": 0.208,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801789AC.o": 0.075,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80178D40.o": 0.115,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017A4AC.o": 0.086,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017AE2C.o": 0.181,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_8017EB7C.o": 0.214,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_80184440.o": 0.072,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_jr_801848E4.o": 0.284,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0b.o": 0.066,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0c.o": 0.08,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0d.o": 0.071,
|
||||
"build/src/ov_SC03_015/ov_SC03_015_o0e.o": 0.085,
|
||||
"build/src/ov_SC04_011/ov_SC04_011.o": 0.135,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_after.o": 0.433,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8012ACE0.o": 0.372,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135888.o": 0.067,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135A4C.o": 0.06,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80135D20.o": 0.129,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801380E0.o": 0.156,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013C98C.o": 0.128,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013F350.o": 0.086,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8013FFD8.o": 0.077,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80140608.o": 0.201,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015444C.o": 0.08,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80154C24.o": 0.18,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801588CC.o": 0.104,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80159C84.o": 0.074,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015A3C8.o": 0.085,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015AE2C.o": 0.111,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015C32C.o": 0.37,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8016AB6C.o": 0.235,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80171B4C.o": 0.116,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801734BC.o": 0.185,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801789AC.o": 0.078,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80178D40.o": 0.113,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017A4AC.o": 0.072,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017AE2C.o": 0.112,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017D494.o": 0.465,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_o0b.o": 0.055,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_o0c.o": 0.072
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80159C84.o": 0.08,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015A3C8.o": 0.087,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015AE2C.o": 0.108,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8015C32C.o": 0.362,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8016AB6C.o": 0.228,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80171B4C.o": 0.113,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801734BC.o": 0.18,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_801789AC.o": 0.073,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_80178D40.o": 0.107,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017A4AC.o": 0.082,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017AE2C.o": 0.115,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_jr_8017D494.o": 0.446,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_o0b.o": 0.058,
|
||||
"build/src/ov_SC04_011/ov_SC04_011_o0c.o": 0.061
|
||||
},
|
||||
"ok": true,
|
||||
"seconds": 2.1
|
||||
|
||||
File diff suppressed because one or more lines are too long
+3290
-1215
File diff suppressed because it is too large
Load Diff
@@ -1,33 +1,33 @@
|
||||
type_census — 2026-10-02T06:59:13Z at 951fc52932 (src stamp e34be599bed25333, tool e17c5fa676); 7306 files (4121 TUs + 3181 headers), 99109 function definitions; walk 44.0 s, total 203.8 s
|
||||
type_census — 2026-10-02T07:14:46Z at 5b9a1a0964 (src stamp 8b05ba4b8d6d56ba, tool e17c5fa676); 7306 files (4121 TUs + 3181 headers), 99109 function definitions; walk 42.1 s, total 204.2 s
|
||||
|
||||
DEFINITIONS 1650 struct/union bodies (+0 enums): canonical header 1021 · .c file-scope 0 · .c block-scope 600 · per-function shared headers 29 · other headers 0 · include/ 326
|
||||
1024 distinct names · 523 distinct layouts (0 unresolved) · 53 duplicate classes covering 496 names (tier 1 0 same-named, tier 2 53 opaque; 44 layout-twin classes / 472 names kept apart) · 42 exact-text classes / 546 copies · 0 VARIANT names (>1 layout) · 55 dead canonical names · 0 canonical names redefined in .c · 4300 scalar/alias typedefs · 145 forward decls
|
||||
CAST SITES deref 342609 = P 262173 + I 51515 + X 13790 + M 15131 (+ A address-of 18889; + C typed cast-member 169535) in 51543 bodies · coverage OK (raw {'P': 262173, 'I': 51515, 'X': 13790, 'A': 18889, 'C': 169535, 'M': 15131, 'K': 20181}) · refused 0 · absolute 0 · readability regex over raw text 265010
|
||||
by base: param 155429 · local 125139 · gaddr 40113 · nested 10177 · global 8638 · other 1614 · addr-of 1338 · ident 161
|
||||
by width: s2 104436 · u2 85719 · s4 82980 · u1 35464 · agg 13415 · p4 11105 · u4 7608 · s1 1882
|
||||
top bases: param_1(param) 57759 · a0(param) 41339 · arg0(param) 31676 · p(local) 13230 · cach(local) 8246 · buf(local) 7056 · s0(local) 6722 · s1(local) 6454 · flag(local) 5453 · dst(local) 4853 · iVar2(local) 4399 · iVar1(local) 3481 · cur(local) 3375 · p(param) 3082 · e(local) 3078 · src(local) 2599
|
||||
CAST SITES deref 341400 = P 260965 + I 51514 + X 13790 + M 15131 (+ A address-of 18889; + C typed cast-member 170355) in 51491 bodies · coverage OK (raw {'P': 260965, 'I': 51514, 'X': 13790, 'A': 18889, 'C': 170355, 'M': 15131, 'K': 20370}) · refused 0 · absolute 0 · readability regex over raw text 263802
|
||||
by base: param 154783 · local 124987 · gaddr 40113 · nested 9773 · global 8631 · other 1614 · addr-of 1338 · ident 161
|
||||
by width: s2 104133 · u2 85303 · s4 82533 · u1 35463 · agg 13415 · p4 11063 · u4 7608 · s1 1882
|
||||
top bases: param_1(param) 57756 · a0(param) 40742 · arg0(param) 31630 · p(local) 13230 · cach(local) 8246 · buf(local) 7056 · s0(local) 6710 · s1(local) 6454 · flag(local) 5453 · dst(local) 4853 · iVar2(local) 4399 · iVar1(local) 3481 · cur(local) 3375 · p(param) 3082 · e(local) 3029 · src(local) 2599
|
||||
DECLARATIONS 99109 function definitions (1894 K&R) · 4279260 extern function declarations over 12088 names (3773 spelled >1 way) · 6421 names with >1 body text · 1078766 data externs over 55542 symbols (18498 typed >1 way) · asm-label aliases 5148 (159 names) · builtins {'memcpy': 301, 'abs': 1} · attributes {'packed': 26, 'aligned': 6}
|
||||
lying declarations 229 over 24 callees {'K&R-empty': 216, 'narrow': 13} · K&R sites (marked, counted apart) 5293 over 200 callees · cross-binary (the fleet's definitions disagree, this binary has none) 418 over 96 callees
|
||||
STRUCT MAP 18652 types explain 338689/342609 deref sites (98.9 %); unassigned 3920; 3945 types span ≥2 bodies (283017 sites), 14707 single-body; types with conflicts 845, suspect 11
|
||||
merges by evidence {'param': 39280, 'assign': 19206, 'ret-of': 5822, 'arg': 10939, 'return': 1530, 'assign&': 1267, 'arg&': 216, 'field': 6826, 'nested': 9}; vetoed {'assign&-multisource': 12225, 'arg-conduit': 139977, 'assign-multisource': 33667, 'arg&-conduit': 14638, 'ret-of-multisource': 6715, 'arg&-no-overlap': 3572, 'arg-no-overlap': 47923, 'field-multisource': 5364, 'ret-of': 167, 'assign': 330, 'assign&': 334, 'return': 6, 'arg': 57, 'field': 44}
|
||||
Unkstruct_800B5CB8 sites 20413 bodies 4390 fields 128 size≥0x10c width-conflicts 50 sign-mixed 56 merges {'param': 9096, 'assign': 8562, 'arg': 7023, 'ret-of': 2553} at D_800B5CB8,D_800D3888,D_80181280 ptr D_8006386C,D_80074778,D_80074780
|
||||
Unkstruct_80126B58 sites 5717 bodies 2664 fields 166 size≥0x24c width-conflicts 48 sign-mixed 51 merges {'param': 2140, 'arg': 1115, 'assign&': 104, 'field': 44} at D_80126B58 ptr D_80126B58
|
||||
Unkstruct_80184154 sites 5261 bodies 256 fields 7 size≥0x10 width-conflicts 0 sign-mixed 0 merges {'arg': 142, 'param': 8, 'assign&': 2} at D_80184154,D_801B3F7C
|
||||
STRUCT MAP 18443 types explain 337480/341400 deref sites (98.9 %); unassigned 3920; 3908 types span ≥2 bodies (282757 sites), 14535 single-body; types with conflicts 833, suspect 12
|
||||
merges by evidence {'param': 39258, 'arg': 11036, 'assign': 19260, 'ret-of': 5845, 'return': 1533, 'assign&': 1276, 'arg&': 189, 'field': 6821, 'nested': 9}; vetoed {'arg-conduit': 140224, 'arg-no-overlap': 43946, 'arg&-no-overlap': 3651, 'arg&-conduit': 14638, 'field-multisource': 5316, 'assign-multisource': 33664, 'ret-of-multisource': 6715, 'assign&-multisource': 12225, 'assign': 264, 'ret-of': 261, 'assign&': 326, 'return': 3, 'arg': 50, 'field': 40}
|
||||
Unkstruct_800D3888 sites 21885 bodies 4631 fields 129 size≥0x10c width-conflicts 50 sign-mixed 56 merges {'param': 9538, 'assign': 8632, 'arg': 7300, 'ret-of': 2709} at D_800D3888,D_800DE5A0,D_801269F0 ptr D_8006386C,D_80074778,D_80074780
|
||||
Unkstruct_cb638a45 sites 6477 bodies 381 fields 6 size≥0x10 width-conflicts 0 sign-mixed 0 merges {'param': 12, 'arg': 5}
|
||||
Unkstruct_80126B58 sites 5715 bodies 2657 fields 164 size≥0x24c width-conflicts 49 sign-mixed 48 merges {'param': 2122, 'arg': 1104, 'assign&': 104, 'assign': 44} at D_80126B58 ptr D_80126B58
|
||||
Unkstruct_dac960ce sites 4464 bodies 124 fields 13 size≥0x24c width-conflicts 0 sign-mixed 2 merges {'param': 2}
|
||||
Unkstruct_0caecd54 sites 4340 bodies 124 fields 23 size≥0xfe width-conflicts 0 sign-mixed 1 merges {'param': 2, 'assign': 1, 'return': 1}
|
||||
Unkstruct_f8ed2b9f sites 4061 bodies 4061 fields 1 size≥0x217 width-conflicts 0 sign-mixed 0 merges {'param': 2}
|
||||
Unkstruct_a32b99a1 sites 3936 bodies 123 fields 8 size≥0x4b width-conflicts 0 sign-mixed 1 merges {}
|
||||
Unkstruct_8e3dbe51 sites 3930 bodies 131 fields 5 size≥0x4c width-conflicts 0 sign-mixed 1 merges {}
|
||||
Unkstruct_80126948 sites 3284 bodies 1098 fields 34 size≥0xa4 width-conflicts 0 sign-mixed 10 merges {'assign': 104, 'arg': 15, 'param': 8, 'assign&': 4} at D_80126948,D_80126E60 ptr D_80114EE8,D_801151D4,D_80126948
|
||||
Unkstruct_80126948 sites 3310 bodies 1104 fields 35 size≥0xa4 width-conflicts 1 sign-mixed 11 merges {'assign': 103, 'param': 20, 'arg': 20, 'assign&': 4} at D_80126948,D_80126E60 ptr D_80114EE8,D_801151D4,D_80126948
|
||||
Unkstruct_57a28935 sites 3271 bodies 196 fields 26 size≥0xa4 width-conflicts 3 sign-mixed 9 merges {'param': 268, 'arg': 133}
|
||||
Unkstruct_1fa9e810 sites 3144 bodies 131 fields 3 size≥0x49 width-conflicts 0 sign-mixed 0 merges {}
|
||||
Unkstruct_30b21035 sites 3100 bodies 124 fields 13 size≥0x54 width-conflicts 0 sign-mixed 0 merges {}
|
||||
GLOBAL BLOCKS 2121 runs of ≥4 adjacent scalar D_ symbols (14224 symbols): 0x800cf10c+0x34 ×29 (D_800CF10C..D_800CF13C) · 0x800a6580+0x3a ×27 (D_800A6580..D_800A65B8) · 0x801998a4+0x57 ×24 (D_801998A4..D_801998FA) · 0x80199840+0x56 ×23 (D_80199840..D_80199895) · 0x801ab708+0x54 ×21 (D_801AB708..D_801AB758) · 0x801b0df0+0x4b ×21 (D_801B0DF0..D_801B0E3A) · 0x801b83a0+0x4e ×21 (D_801B83A0..D_801B83ED) · 0x801b8710+0x54 ×21 (D_801B8710..D_801B8760)
|
||||
GLOBAL BLOCKS 2122 runs of ≥4 adjacent scalar D_ symbols (14253 symbols): 0x800cf10c+0x34 ×29 (D_800CF10C..D_800CF13C) · 0x800a6580+0x3a ×27 (D_800A6580..D_800A65B8) · 0x801998a4+0x57 ×24 (D_801998A4..D_801998FA) · 0x80199840+0x56 ×23 (D_80199840..D_80199895) · 0x801a9608+0x50 ×22 (D_801A9608..D_801A9654) · 0x801ab708+0x54 ×21 (D_801AB708..D_801AB758) · 0x801b0df0+0x4b ×21 (D_801B0DF0..D_801B0E3A) · 0x801b83a0+0x4e ×21 (D_801B83A0..D_801B83ED)
|
||||
PARKED (P36) 24 classes / 453 bodies / 691 needed sites → .run/P37/census/parked.tsv; needs {'signature': 13, 'struct': 7, '?': 4}; 22 PARK names are minimum-lever banks
|
||||
CONTROLS 4/4: player_block_widths OK (D_80078E8C:4/4 D_80078EB2:2/2 D_80078EB4:2/2 D_80078EB6:2/2 D_80078EB8:2/2 D_80078F08:4/4 D_80078F0C:4/4) · matrix_layouts OK (MATRIX=32 MATRIX_L48=48) · prim_layout_class OK (defs in 1 files, 1 spellings, 1/1 in one layout (64 B)) · tu_conflict_D_800A651C OK (s32:1202 | OtBlk[]:9 | u8[]:9 | OtBlk_80016450[]:8 | s32[]:7)
|
||||
|
||||
duplicate-layout classes (top 12): 4B×56 names (0 defs): B4_80165140, B4_8017F154, B4_8018750C, B4_8018AD9C… | 8B×46 names (0 defs): Blk8S16, Blk8_80126940, Blk8_80180A38, D_80195AF4_t… | 8B×45 names (0 defs): B8, B8_17F474, B8_80165140, B8_801851A8… | 8B×34 names (0 defs): Args_80182194, Blk8017FD54, Blk8_801A6AD0, Blk8_801AD914… | 20B×32 names (0 defs): Blk20_8017D110, Buf8017BF34_8017BF34, Buf8017BF50_8017C234, Loc_80180E10… | 16B×28 names (0 defs): Blk16X, Blk16_8017ECD4, Blk16_8018A4C4, Blk16_8018A8B8… | 6B×25 names (0 defs): D80190448_t, Pt6_8017D65C, ResMapCol, S6… | 32B×25 names (0 defs): Blk20_8016DF5C, Blk20_80180B78, Blk20_80184694, Blk32L_80133298… | 8B×22 names (22 defs): B8014, Blk8_80133CD4, Blk8_801463A0, Blk8_8017FF80… | 12B×19 names (19 defs): Blk12, Prim126, PrimC59C, PrimC974… | 4B×14 names (0 defs): D_801D0660_s, Ent_80186AE4, P4, Pair4_801B02DC… | 8B×14 names (0 defs): CdFileLoc, Cmd_801805C8, M8_8016B6BC, Pair8_8017DDC4…
|
||||
VARIANT names (top 12):
|
||||
|
||||
type_census: 1650 definitions (523 layouts, 53 duplicate classes, 0 variant camps) · 342609 cast sites in 51543 bodies over 8 base classes (4 forms + A, coverage OK) · 229 lying declarations / 24 callees (+5293 K&R sites, +418 cross-binary apart) · controls 4/4
|
||||
struct_map: 18652 types over 18652 clusters explain 338689/342609 sites (98.9 %); 3920 unassigned sites; 845 types with conflicts
|
||||
type_census: 1650 definitions (523 layouts, 53 duplicate classes, 0 variant camps) · 341400 cast sites in 51491 bodies over 8 base classes (4 forms + A, coverage OK) · 229 lying declarations / 24 callees (+5293 K&R sites, +418 cross-binary apart) · controls 4/4
|
||||
struct_map: 18443 types over 18443 clusters explain 337480/341400 sites (98.9 %); 3920 unassigned sites; 833 types with conflicts
|
||||
|
||||
@@ -5754,13 +5754,13 @@ s32 func_8018183C(void) {
|
||||
if (D_801EDA24 != 0) {
|
||||
func_800233CC(&D_80188A94, 0x10);
|
||||
func_8001CD9C(D_801EDA24, &D_80188A94);
|
||||
*(s32 *)(D_801EDA24 + 4) |= 0x50000040;
|
||||
CAST_WIDTH(s32, D_801EDA24, 4) |= 0x50000040;
|
||||
}
|
||||
D_801ED9C0 = 0xFF;
|
||||
D_801ED9BC = 0x10;
|
||||
*(s16 *)(D_801EDA24 + 0xA) = -0x2E9;
|
||||
*(s16 *)(D_801EDA24 + 0xC) = -0x2C;
|
||||
*(s16 *)(D_801EDA24 + 0x8) = 0;
|
||||
CAST_ALIAS(s16, D_801EDA24, 0xA) = -0x2E9;
|
||||
CAST_ALIAS(s16, D_801EDA24, 0xC) = -0x2C;
|
||||
CAST_ALIAS(s16, D_801EDA24, 0x8) = 0;
|
||||
D_80188A94 = 0x10;
|
||||
D_80188A95 = 0xFF;
|
||||
D_80188A96 = 0xFF;
|
||||
@@ -5780,13 +5780,13 @@ s32 func_8018183C(void) {
|
||||
D_801ED9C4 = 0;
|
||||
}
|
||||
if (D_801ED9C0 == 0) {
|
||||
*(s16 *)(D_801EDA24 + 0x0) = 0;
|
||||
((Unkstruct_800B5CB8 *)D_801EDA24)->unk0 = 0;
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
D_801ED9BC--;
|
||||
}
|
||||
*(u16 *)(D_801EDA24 + 0xA) = *(u16 *)(D_801EDA24 + 0xA) - 6;
|
||||
((Unkstruct_800B5CB8 *)D_801EDA24)->unkA = ((Unkstruct_800B5CB8 *)D_801EDA24)->unkA - 6;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
@@ -3117,9 +3117,9 @@ void func_8018A3B4(void *a0) {
|
||||
for (j = 0; j < 2; j++) {
|
||||
v1 = (u8 *)func_80132EF4((s32)a0, 0xC);
|
||||
if (v1 != NULL) {
|
||||
*(u16 *)(v1 + 6) = (i != 0) ? *(u16 *)(v1 + 6) + 0x68 : *(u16 *)(v1 + 6) - 0x68;
|
||||
*(u16 *)(v1 + 0xE) = (j != 0) ? *(u16 *)(v1 + 0xE) + 0x82 : *(u16 *)(v1 + 0xE) - 0x1A;
|
||||
*(u16 *)(v1 + 0xA) -= 0x10;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk6 = (i != 0) ? ((Unkstruct_800B5CB8 *)v1)->unk6 + 0x68 : ((Unkstruct_800B5CB8 *)v1)->unk6 - 0x68;
|
||||
((Unkstruct_800B5CB8 *)v1)->unkE = (j != 0) ? ((Unkstruct_800B5CB8 *)v1)->unkE + 0x82 : ((Unkstruct_800B5CB8 *)v1)->unkE - 0x1A;
|
||||
((Unkstruct_800B5CB8 *)v1)->unkA -= 0x10;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2079,18 +2079,18 @@ s32 func_80185FA0(s32 param_1)
|
||||
q = func_80132EF4(param_1, 0x22);
|
||||
if (q != 0) {
|
||||
iVar4 = iVar5 + (D_800B99D8 & 4) * 3 - 0x2A;
|
||||
*(s16 *)(q + 6) = *(u16 *)(q + 6) + iVar4;
|
||||
*(s16 *)(q + 0xA) = *(u16 *)(q + 0xA) - 0x20;
|
||||
*(s16 *)(q + 0xE) = *(u16 *)(q + 0xE) - 0x28;
|
||||
((Unkstruct_800B5CB8 *)q)->unk6 = ((Unkstruct_800B5CB8 *)q)->unk6 + iVar4;
|
||||
((Unkstruct_800B5CB8 *)q)->unkA = ((Unkstruct_800B5CB8 *)q)->unkA - 0x20;
|
||||
((Unkstruct_800B5CB8 *)q)->unkE = ((Unkstruct_800B5CB8 *)q)->unkE - 0x28;
|
||||
iVar4 = iVar4 << 16;
|
||||
if ((iVar4 >> 16) >= 0) {
|
||||
sVar1 = (s16)((iVar4 >> 16) << 7);
|
||||
} else {
|
||||
sVar1 = (s16)(-((iVar4 >> 16) << 7));
|
||||
}
|
||||
*(s16 *)(q + 0x34) = sVar1 + 0x1000;
|
||||
*(s32 *)(q + 0x14) = 0xFFFE0000;
|
||||
*(s32 *)(q + 0x18) = 0xFFFD0000;
|
||||
((Unkstruct_800B5CB8 *)q)->unk34 = sVar1 + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)q)->unk14 = 0xFFFE0000;
|
||||
CAST_WIDTH(s32, q, 0x18) = 0xFFFD0000;
|
||||
}
|
||||
iVar5 += 0x18;
|
||||
} while (iVar5 < 0x49);
|
||||
|
||||
@@ -6736,7 +6736,7 @@ void func_80181F20(void *a0) {
|
||||
|
||||
|
||||
s32 func_80181F5C(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
@@ -7059,12 +7059,12 @@ void func_80182674(s32 a0, s16 *vec, s32 count, s32 flag) {
|
||||
|
||||
ent = func_80132EF4(a0, 0x22);
|
||||
if (ent != 0) {
|
||||
*(u16 *)(ent + 6) = sp10.x;
|
||||
*(u16 *)(ent + 0xA) = sp10.y;
|
||||
*(u16 *)(ent + 0xE) = sp10.z;
|
||||
((Unkstruct_800B5CB8 *)ent)->unk6 = sp10.x;
|
||||
((Unkstruct_800B5CB8 *)ent)->unkA = sp10.y;
|
||||
((Unkstruct_800B5CB8 *)ent)->unkE = sp10.z;
|
||||
r1 = rand();
|
||||
r2 = rand();
|
||||
*(u16 *)(ent + 0x34) = ((((r1 % 0x2000) + 0x3000) & ~0xF) | (r2 % 3));
|
||||
((Unkstruct_800B5CB8 *)ent)->unk34 = ((((r1 % 0x2000) + 0x3000) & ~0xF) | (r2 % 3));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2972,14 +2972,14 @@ void func_801821B4(s32 arg0)
|
||||
|
||||
prim = (s32 *)func_80132EF4(arg0, 0x22);
|
||||
if (prim != NULL) {
|
||||
*(u16 *)((s32)prim + 0x34) = 0x1000;
|
||||
((Unkstruct_800B5CB8 *)prim)->unk34 = 0x1000;
|
||||
ang = *(s16 *)(*(s32 *)(arg0 + 0x20) + 0x12);
|
||||
func_8012B0B4((unsigned int *)&packed, ang, 0x10);
|
||||
ang = (ang - 0x400) & 0xFFF;
|
||||
*(u16 *)((s32)prim + 6) += packed;
|
||||
*(u16 *)((s32)prim + 0xE) += packed >> 16;
|
||||
*(s32 *)((s32)prim + 0x10) = func_80047948(ang) << 8;
|
||||
*(s32 *)((s32)prim + 0x18) = -(func_8004787C(ang) << 8);
|
||||
((Unkstruct_800B5CB8 *)prim)->unk6 += packed;
|
||||
((Unkstruct_800B5CB8 *)prim)->unkE += packed >> 16;
|
||||
CAST_WIDTH(s32, (s32)prim, 0x10) = func_80047948(ang) << 8;
|
||||
CAST_WIDTH(s32, (s32)prim, 0x18) = -(func_8004787C(ang) << 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4169,7 +4169,7 @@ void func_8017ECD4(s32 a0) {
|
||||
for (; i < 0x10; i++) {
|
||||
obj = func_80132EF4(a0, 0x23);
|
||||
if (obj != 0) {
|
||||
*(s16 *)(obj + 0x34) = 0x7001;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk34 = 0x7001;
|
||||
m = D_800AE620;
|
||||
RotMatrixY(i << 8, mp);
|
||||
func_800484EC((s32)mp, (s32)&va, obj + 0x10);
|
||||
@@ -4177,7 +4177,7 @@ void func_8017ECD4(s32 a0) {
|
||||
}
|
||||
obj = func_80132EF4(a0, 0x22);
|
||||
if (obj != 0) {
|
||||
*(s16 *)(obj + 0x34) = 0x7003;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk34 = 0x7003;
|
||||
RotMatrixY((i << 8) + 0x80, &m);
|
||||
func_800484EC((s32)&m, (s32)&vb, obj + 0x10);
|
||||
func_8012931C((void *)obj);
|
||||
@@ -4187,11 +4187,11 @@ void func_8017ECD4(s32 a0) {
|
||||
for (i = 0; i < 4; i++) {
|
||||
obj = func_80132EF4(a0, 0x24);
|
||||
if (obj != 0) {
|
||||
*(u16 *)(obj + 0x6) = *(u16 *)(obj + 0x6) + D_801853A8[i].f0;
|
||||
*(u16 *)(obj + 0xA) = *(u16 *)(obj + 0xA) + D_801853A8[i].f2;
|
||||
*(u16 *)(obj + 0xE) = *(u16 *)(obj + 0xE) + D_801853A8[i].f4;
|
||||
*(s32 *)(obj + 0x2C) = D_801853A8[i].f6 << 16;
|
||||
*(s32 *)(obj + 0x30) = 0x80000;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk6 = ((Unkstruct_800B5CB8 *)obj)->unk6 + D_801853A8[i].f0;
|
||||
((Unkstruct_800B5CB8 *)obj)->unkA = ((Unkstruct_800B5CB8 *)obj)->unkA + D_801853A8[i].f2;
|
||||
((Unkstruct_800B5CB8 *)obj)->unkE = ((Unkstruct_800B5CB8 *)obj)->unkE + D_801853A8[i].f4;
|
||||
CAST_WIDTH(s32, obj, 0x2C) = D_801853A8[i].f6 << 16;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk30 = 0x80000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4960,7 +4960,7 @@ void func_801801A4(void *a0) {
|
||||
|
||||
|
||||
s32 func_801801E0(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
|
||||
@@ -4145,8 +4145,8 @@ void func_8017DCB4(s32 a0) {
|
||||
*(u16 *)(ptr + 0x1C) = magv;
|
||||
*(u16 *)(ptr + 0x1A) = magv;
|
||||
*(u16 *)(ptr + 0x18) = magv;
|
||||
*(s16 *)(result + 6) = (s16)s4;
|
||||
*(s16 *)(result + 0xE) = (s16)s2;
|
||||
((Unkstruct_800B5CB8 *)result)->unk6 = (s16)s4;
|
||||
((Unkstruct_800B5CB8 *)result)->unkE = (s16)s2;
|
||||
}
|
||||
s1 = s1 + s6;
|
||||
s6 = s6 + 1;
|
||||
|
||||
@@ -4985,27 +4985,27 @@ void func_801889B4(s32 arg0)
|
||||
s32 d;
|
||||
s32 z;
|
||||
t = *(u16 *)(arg0 + 0x84) & 4;
|
||||
z = *(u16 *)(e + 0xE);
|
||||
z = ((Unkstruct_800B5CB8 *)e)->unkE;
|
||||
d = i + t * 3 - 0x2A;
|
||||
do { // !FAKE: do-while — its LOOP notes are sched1 barriers (sched.c:2053-2080): the +6 load stays after d, the +E store before the sign extension (P36 S104 e28)
|
||||
v = *(u16 *)(e + 0x6);
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unk6;
|
||||
z -= 0x28;
|
||||
*(u16 *)(e + 0xE) = z;
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = z;
|
||||
} while (0);
|
||||
v -= d;
|
||||
*(u16 *)(e + 0x6) = v;
|
||||
v = *(u16 *)(e + 0xA);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = v;
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unkA;
|
||||
v -= 0x20;
|
||||
*(u16 *)(e + 0xA) = v;
|
||||
((Unkstruct_800B5CB8 *)e)->unkA = v;
|
||||
v = (s16)d;
|
||||
if (v >= 0) {
|
||||
v = v << 7;
|
||||
} else {
|
||||
v = -(v << 7);
|
||||
}
|
||||
*(u16 *)(e + 0x34) = v + 0x1000;
|
||||
*(s32 *)(e + 0x14) = 0xFFFE0000;
|
||||
*(s32 *)(e + 0x18) = 0xFFFD0000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = v + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = 0xFFFE0000;
|
||||
CAST_WIDTH(s32, e, 0x18) = 0xFFFD0000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5703,7 +5703,7 @@ void func_80189970(void *a0) {
|
||||
|
||||
|
||||
s32 func_801899AC(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
@@ -5761,7 +5761,7 @@ void func_80189A60(void *a0) {
|
||||
if (func_80029504() == 0x2DA) {
|
||||
if ((func_80029178(0x11F) & 0xFF) == 0) {
|
||||
func_80029124(0x11F, 1);
|
||||
*(s32 *)((s32)a0 + 0xDC) = func_801899AC(a0, (s32 *)&D_80191BEC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC = func_801899AC(a0, (s32 *)&D_80191BEC);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5455,27 +5455,27 @@ void func_80182108(s32 arg0)
|
||||
s32 d;
|
||||
s32 z;
|
||||
t = *(u16 *)(arg0 + 0x84) & 4;
|
||||
z = *(u16 *)(e + 0xE);
|
||||
z = ((Unkstruct_800B5CB8 *)e)->unkE;
|
||||
d = i + t * 3 - 0x2A;
|
||||
do { // !FAKE: do-while — its LOOP notes are sched1 barriers (sched.c:2053-2080): the +6 load stays after d, the +E store before the sign extension (P36 S104 e28)
|
||||
v = *(u16 *)(e + 0x6);
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unk6;
|
||||
z += 0x28;
|
||||
*(u16 *)(e + 0xE) = z;
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = z;
|
||||
} while (0);
|
||||
v -= d;
|
||||
*(u16 *)(e + 0x6) = v;
|
||||
v = *(u16 *)(e + 0xA);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = v;
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unkA;
|
||||
v -= 0x20;
|
||||
*(u16 *)(e + 0xA) = v;
|
||||
((Unkstruct_800B5CB8 *)e)->unkA = v;
|
||||
v = (s16)d;
|
||||
if (v >= 0) {
|
||||
v = v << 7;
|
||||
} else {
|
||||
v = -(v << 7);
|
||||
}
|
||||
*(u16 *)(e + 0x34) = v + 0x1000;
|
||||
*(s32 *)(e + 0x14) = 0xFFFE0000;
|
||||
*(s32 *)(e + 0x18) = 0x30000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = v + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = 0xFFFE0000;
|
||||
CAST_WIDTH(s32, e, 0x18) = 0x30000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4679,7 +4679,7 @@ void func_8018AE14(void *a0) {
|
||||
|
||||
|
||||
s32 func_8018AE50(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
@@ -4732,7 +4732,7 @@ extern s32 D_80190C8C;
|
||||
void func_8018AF04(void *a0) {
|
||||
if (func_80029504() == 0xC8) {
|
||||
if ((func_80029178(0x118) & 0xFF) == 0) {
|
||||
*(s32 *)((s32)a0 + 0xDC) = func_8018AE50(a0, &D_80190C8C);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC = func_8018AE50(a0, &D_80190C8C);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3400,7 +3400,7 @@ void func_80180AA4(void *a0) {
|
||||
|
||||
|
||||
s32 func_80180AE0(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
|
||||
@@ -3510,7 +3510,7 @@ void func_8017F7E4(void *a0) {
|
||||
|
||||
extern void func_8012AD44(s32 *a0, s16 a1);
|
||||
void func_8017F994(void *arg0) {
|
||||
*(s16 *)((char *)arg0 + 0xfc) = 1;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkFC = 1;
|
||||
((void (*)(s32 *, s32))func_8012AD44)(arg0, 2);
|
||||
}
|
||||
|
||||
@@ -3626,15 +3626,15 @@ void func_8017FB78(void *a0) {
|
||||
extern void func_80016224(s32 a0, s32 a1);
|
||||
|
||||
void func_8017FBB4(void *a0) {
|
||||
s16 v = *(s16 *)((s32)a0 + 0xFE);
|
||||
s16 v = ((Unkstruct_800B5CB8 *)a0)->unkFE;
|
||||
if (v != 0) {
|
||||
s16 t;
|
||||
func_80016224(v & 0xFF, 4);
|
||||
*(s16 *)((s32)a0 + 0x2A) = -2;
|
||||
t = 0x80 - *(s16 *)((s32)a0 + 0xFE) * 3;
|
||||
*(s16 *)((s32)a0 + 0x28) = t;
|
||||
*(s16 *)((s32)a0 + 0x26) = t;
|
||||
*(s16 *)((s32)a0 + 0x24) = t;
|
||||
CAST_ALIAS(s16, (s32)a0, 0x2A) = -2;
|
||||
t = 0x80 - ((Unkstruct_800B5CB8 *)a0)->unkFE * 3;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk28 = t;
|
||||
CAST_WIDTH(s16, (s32)a0, 0x26) = t;
|
||||
CAST_WIDTH(s16, (s32)a0, 0x24) = t;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4406,7 +4406,7 @@ void func_801892CC(void *a0) {
|
||||
|
||||
|
||||
s32 func_80189308(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
@@ -4459,7 +4459,7 @@ extern s32 func_80029504(void);
|
||||
void func_801893BC(void *a0) {
|
||||
if (func_80029504() == 0x258) {
|
||||
if ((func_80029178(0x132) & 0xFF) == 0) {
|
||||
*(s32 *)((s32)a0 + 0xDC) = func_80189308(a0, &D_8018F2F4);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC = func_80189308(a0, &D_8018F2F4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2090,7 +2090,7 @@ s32 func_80155458(s32 param_1)
|
||||
void func_80155580(void *a0) {
|
||||
|
||||
extern void (*D_80184318[])(void);
|
||||
D_80184318[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80184318[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -6360,7 +6360,7 @@ void func_8017D540(void *a0) {
|
||||
|
||||
|
||||
s32 func_8017D57C(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
@@ -6928,9 +6928,9 @@ void func_8017E080(s32 a0) {
|
||||
extern void func_8017E888(s32 arg0);
|
||||
|
||||
void func_8017E110(s32 a0) {
|
||||
*(s32 *)(a0 + 0xDC) &= ~0x10;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC &= ~0x10;
|
||||
func_8017E888(a0);
|
||||
*(s32 *)(a0 + 0x1C) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C = 0xA;
|
||||
}
|
||||
|
||||
|
||||
@@ -6969,13 +6969,13 @@ extern void func_8017E888(s32 arg0);
|
||||
extern s32 func_8017E9CC(s32 a0);
|
||||
|
||||
void func_8017E1E4(s32 arg0) {
|
||||
if (*(s32 *)(arg0 + 0x1C) == *(s32 *)(arg0 + 0x1C) / 5 * 5) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unk1C == ((Unkstruct_800B5CB8 *)arg0)->unk1C / 5 * 5) {
|
||||
func_8017E888(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 = 0xA;
|
||||
}
|
||||
if (*(s32 *)(arg0 + 0xE4) != 0) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unkE4 != 0) {
|
||||
func_8017E9CC(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) -= 1;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7016,30 +7016,30 @@ void func_8017E328(s32 a0) {
|
||||
s32 v1;
|
||||
s32 v0;
|
||||
|
||||
*(s32 *)(a0 + 0x1C) -= 1;
|
||||
if (*(s16 *)(a0 + 0xFE) != 0) {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1A) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1C) += 0x40;
|
||||
v1 = *(s32 *)(a0 + 0x20);
|
||||
if (*(s16 *)(v1 + 0x18) >= 0x1800) {
|
||||
*(u16 *)(v1 + 0x1C) = 0x1800;
|
||||
*(u16 *)(v1 + 0x1A) = 0x1800;
|
||||
*(u16 *)(v1 + 0x18) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C -= 1;
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkFE != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 += 0x40;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk1A += 0x40;
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x1C) += 0x40;
|
||||
v1 = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
if (CAST_SIGN(s16, v1, 0x18) >= 0x1800) {
|
||||
CAST_WIDTH(u16, v1, 0x1C) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk1A = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk18 = 0x1800;
|
||||
}
|
||||
}
|
||||
|
||||
if (*(s32 *)(a0 + 0x1C) == 0xE) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk1C == 0xE) {
|
||||
func_8017E888(a0);
|
||||
v0 = 0xA;
|
||||
} else {
|
||||
if (*(s32 *)(a0 + 0xE4) == 0) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkE4 == 0) {
|
||||
return;
|
||||
}
|
||||
func_8017E9CC(a0);
|
||||
v0 = *(s32 *)(a0 + 0xE4) - 1;
|
||||
v0 = ((Unkstruct_800B5CB8 *)a0)->unkE4 - 1;
|
||||
}
|
||||
*(s32 *)(a0 + 0xE4) = v0;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE4 = v0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7339,14 +7339,14 @@ void func_8017E888(s32 arg0) {
|
||||
s32 v;
|
||||
u32 *bp;
|
||||
|
||||
if (*(s16 *)(arg0 + 0xAA) <= 0) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unkAA <= 0) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
bp = buf;
|
||||
func_8012B0B4(bp, rand() % 4096, 64);
|
||||
v = *(s32 *)buf;
|
||||
sp10[0] = *(u16 *)(arg0 + 0x6) + v;
|
||||
sp10[1] = *(u16 *)(arg0 + 0xA) - 0x60;
|
||||
sp10[2] = *(u16 *)(arg0 + 0xE) + (v >> 16);
|
||||
sp10[0] = ((Unkstruct_800B5CB8 *)arg0)->unk6 + v;
|
||||
sp10[1] = ((Unkstruct_800B5CB8 *)arg0)->unkA - 0x60;
|
||||
sp10[2] = ((Unkstruct_800B5CB8 *)arg0)->unkE + (v >> 16);
|
||||
q = ((s32 (*)(u16 *))func_80143BDC)(sp10);
|
||||
if (q != 0) {
|
||||
*(u8 *)(*(s32 *)(q + 0xCC) + 0x27) = 0x5B;
|
||||
@@ -7364,16 +7364,16 @@ s32 func_8017E960(s32 param_1) {
|
||||
s32 v0;
|
||||
s32 v1;
|
||||
|
||||
if ((*(s32 *)(param_1 + 0xDC) & 1) != 0) {
|
||||
if ((((Unkstruct_800B5CB8 *)param_1)->unkDC & 1) != 0) {
|
||||
return 0;
|
||||
}
|
||||
v0 = func_8012D5E4(param_1, (s32)&D_801920BC, (s32)&D_801920BC + 8, 0x13);
|
||||
if (v0 != 1) {
|
||||
return 0;
|
||||
}
|
||||
v1 = *(s32 *)(param_1 + 0xDC);
|
||||
v1 = ((Unkstruct_800B5CB8 *)param_1)->unkDC;
|
||||
v1 = v1 | 1;
|
||||
*(s32 *)(param_1 + 0xDC) = v1;
|
||||
((Unkstruct_800B5CB8 *)param_1)->unkDC = v1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -7400,10 +7400,10 @@ s32 func_8017E9CC(s32 a0)
|
||||
s16 pointA[3];
|
||||
s32 flags;
|
||||
|
||||
if (*(u16 *)(a0 + 0x5E) == 0x1E) {
|
||||
if (CAST_WIDTH(u16, a0, 0x5E) == 0x1E) {
|
||||
return 0;
|
||||
}
|
||||
if ((*(s32 *)(a0 + 0xDC) & 0x10) != 0) {
|
||||
if ((((Unkstruct_800B5CB8 *)a0)->unkDC & 0x10) != 0) {
|
||||
return 0;
|
||||
}
|
||||
if (((s32 (*)(s32))func_8012BD14)(a0) < 0x2401) {
|
||||
@@ -7411,18 +7411,18 @@ s32 func_8017E9CC(s32 a0)
|
||||
pointA[1] = D_80126B62;
|
||||
pointA[2] = D_80126B66;
|
||||
|
||||
diff[0] = pointA[0] - *(u16 *)(a0 + 0x6);
|
||||
diff[1] = pointA[1] - *(u16 *)(a0 + 0xA);
|
||||
diff[2] = pointA[2] - *(u16 *)(a0 + 0xE);
|
||||
diff[0] = pointA[0] - ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
diff[1] = pointA[1] - ((Unkstruct_800B5CB8 *)a0)->unkA;
|
||||
diff[2] = pointA[2] - ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
|
||||
VectorNormalSS(diff, diff);
|
||||
|
||||
pointA[1] -= 0x20;
|
||||
func_8012F568(1, 0x2001, 0, 0, (s32)pointA, (s32)diff);
|
||||
|
||||
flags = *(s32 *)(a0 + 0xDC);
|
||||
flags = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
flags |= 0x10;
|
||||
*(s32 *)(a0 + 0xDC) = flags;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC = flags;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
@@ -7434,9 +7434,9 @@ s32 func_8017E9CC(s32 a0)
|
||||
extern s32 rand(void);
|
||||
void func_8017EAC8(s32 arg0) {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s16*)(arg0 + 0x2) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0xA;
|
||||
} else {
|
||||
*(s16*)(arg0 + 0x2) = 0x3;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7445,12 +7445,12 @@ extern s32 func_8014CB1C(void);
|
||||
|
||||
void func_8017EB04(s32 a0) {
|
||||
if (func_8014CB1C() != 0) {
|
||||
*(s32 *)(a0 + 0xDC) |= 0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC |= 0x20;
|
||||
} else {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s32 *)(a0 + 0xDC) |= 0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC |= 0x20;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xDC) &= ~0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC &= ~0x20;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7599,19 +7599,19 @@ s32 func_8017ED6C(s32 a0, s32 a1) {
|
||||
sp20[0] = 0;
|
||||
sp20[2] = 0xFFF80000;
|
||||
|
||||
func_800484EC(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp20, (s32)sp10);
|
||||
func_800484EC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34, (s32)sp20, (s32)sp10);
|
||||
|
||||
buf[0] = *(u16 *)(a0 + 0x3A);
|
||||
buf[1] = *(u16 *)(a0 + 0x3E);
|
||||
buf[2] = *(u16 *)(a0 + 0x42);
|
||||
buf[0] = ((Unkstruct_800B5CB8 *)a0)->unk3A;
|
||||
buf[1] = ((Unkstruct_800B5CB8 *)a0)->unk3E;
|
||||
buf[2] = ((Unkstruct_800B5CB8 *)a0)->unk42;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x44);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x48);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0x4C);
|
||||
sp10[0] = sp10[0] + ((Unkstruct_800B5CB8 *)a0)->unk44;
|
||||
sp10[1] = sp10[1] + ((Unkstruct_800B5CB8 *)a0)->unk48;
|
||||
sp10[2] = sp10[2] + ((Unkstruct_800B5CB8 *)a0)->unk4C;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x4);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x8);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0xC);
|
||||
sp10[0] = sp10[0] + CAST_WIDTH(s32, a0, 0x4);
|
||||
sp10[1] = sp10[1] + CAST_WIDTH(s32, a0, 0x8);
|
||||
sp10[2] = sp10[2] + CAST_WIDTH(s32, a0, 0xC);
|
||||
|
||||
buf[4] = *(u16 *)((s32)sp10 + 0x2);
|
||||
buf[5] = *(u16 *)((s32)sp10 + 0x6);
|
||||
@@ -7619,11 +7619,11 @@ s32 func_8017ED6C(s32 a0, s32 a1) {
|
||||
|
||||
func_8012CEB0((s32)&buf[0], (s32)&buf[4], 0);
|
||||
|
||||
if (*(s16 *)(a0 + 0xA) > *(s16 *)&buf[5]) {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFF80000 - (a1 << 19);
|
||||
if (CAST_SIGN(s16, a0, 0xA) > *(s16 *)&buf[5]) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFF80000 - (a1 << 19);
|
||||
return 1;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFFE0000 - (a1 << 17);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFFE0000 - (a1 << 17);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -7976,41 +7976,41 @@ void func_8017F6E8(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -8018,38 +8018,38 @@ void func_8017F6E8(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -8057,66 +8057,66 @@ void func_8017F6E8(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8374,60 +8374,60 @@ void func_801801E4(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8765,14 +8765,14 @@ void func_80180C44(void *a0) {
|
||||
u16 t;
|
||||
|
||||
func_8012B77C((s32)&d, (s32)a0 + 4, (s32)&D_80126B5C);
|
||||
*(s16 *)(*(s32 *)((s32)a0 + 0x20) + 0x12) = d >> 16;
|
||||
*(s16 *)(*(s32 *)((s32)a0 + 0x20) + 0x10) = d;
|
||||
t = *(u16 *)((s32)a0 + 0xA);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)((s32)a0 + 0x20))->unk12 = d >> 16;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)((s32)a0 + 0x20))->unk10 = d;
|
||||
t = ((Unkstruct_800B5CB8 *)a0)->unkA;
|
||||
t = t - 8;
|
||||
*(u16 *)((s32)a0 + 0xA) = t;
|
||||
if (*(s16 *)((s32)a0 + 0x8A) - (s16)t >= 0x81) {
|
||||
*(s16 *)((s32)a0 + 2) = 0xA;
|
||||
*(s16 *)((s32)a0 + 0xFC) = 0xC;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = t;
|
||||
if (CAST_SIGN(s16, (s32)a0, 0x8A) - (s16)t >= 0x81) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0xC;
|
||||
}
|
||||
func_801804D8((s32)a0);
|
||||
}
|
||||
@@ -8803,11 +8803,11 @@ void *a0;
|
||||
{
|
||||
u16 w;
|
||||
|
||||
w = *(u16 *)(a0 + 0xA) + 8;
|
||||
*(u16 *)(a0 + 0xA) = w;
|
||||
if (*(s16 *)(a0 + 0x8A) - (s16)w <= 0) {
|
||||
*(s16 *)(a0 + 2) = 8;
|
||||
*(s16 *)(a0 + 0xFC) = 0x1E;
|
||||
w = ((Unkstruct_800B5CB8 *)a0)->unkA + 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = w;
|
||||
if (CAST_SIGN(s16, a0, 0x8A) - (s16)w <= 0) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0x1E;
|
||||
}
|
||||
func_801804D8((s32)a0);
|
||||
}
|
||||
|
||||
@@ -3714,9 +3714,9 @@ void func_8017E71C(void *a0) {
|
||||
if (s1 != 0) {
|
||||
s32 e = func_80132EF4(s0, 0x22);
|
||||
if (e != 0) {
|
||||
*(s16 *)(e + 0xA) = *(u16 *)(e + 0xA)
|
||||
((Unkstruct_800B5CB8 *)e)->unkA = ((Unkstruct_800B5CB8 *)e)->unkA
|
||||
+ *(u16 *)&D_8018481A[*(s16 *)(s0 + 0x102)][0];
|
||||
*(s16 *)(e + 0x34) = s1 + 1;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = s1 + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4576,41 +4576,41 @@ void func_80182490(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -4618,38 +4618,38 @@ void func_80182490(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -4657,66 +4657,66 @@ void func_80182490(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4978,60 +4978,60 @@ void func_80182F8C(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -4791,30 +4791,30 @@ void func_80180440(s32 a0) {
|
||||
s32 v1;
|
||||
s32 v0;
|
||||
|
||||
*(s32 *)(a0 + 0x1C) -= 1;
|
||||
if (*(s16 *)(a0 + 0xFE) != 0) {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1A) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1C) += 0x40;
|
||||
v1 = *(s32 *)(a0 + 0x20);
|
||||
if (*(s16 *)(v1 + 0x18) >= 0x1800) {
|
||||
*(u16 *)(v1 + 0x1C) = 0x1800;
|
||||
*(u16 *)(v1 + 0x1A) = 0x1800;
|
||||
*(u16 *)(v1 + 0x18) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C -= 1;
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkFE != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 += 0x40;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk1A += 0x40;
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x1C) += 0x40;
|
||||
v1 = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
if (CAST_SIGN(s16, v1, 0x18) >= 0x1800) {
|
||||
CAST_WIDTH(u16, v1, 0x1C) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk1A = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk18 = 0x1800;
|
||||
}
|
||||
}
|
||||
|
||||
if (*(s32 *)(a0 + 0x1C) == 0xE) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk1C == 0xE) {
|
||||
func_801809A0(a0);
|
||||
v0 = 0xA;
|
||||
} else {
|
||||
if (*(s32 *)(a0 + 0xE4) == 0) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkE4 == 0) {
|
||||
return;
|
||||
}
|
||||
func_80180AE4(a0);
|
||||
v0 = *(s32 *)(a0 + 0xE4) - 1;
|
||||
v0 = ((Unkstruct_800B5CB8 *)a0)->unkE4 - 1;
|
||||
}
|
||||
*(s32 *)(a0 + 0xE4) = v0;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE4 = v0;
|
||||
}
|
||||
|
||||
|
||||
@@ -5187,9 +5187,9 @@ s32 aF8018280C(s32 a0) {
|
||||
extern s32 rand(void);
|
||||
void func_80180BE0(s32 arg0) {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s16*)(arg0 + 0x2) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0xA;
|
||||
} else {
|
||||
*(s16*)(arg0 + 0x2) = 0x3;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5340,19 +5340,19 @@ s32 func_80180E84(s32 a0, s32 a1) {
|
||||
sp20[0] = 0;
|
||||
sp20[2] = 0xFFF80000;
|
||||
|
||||
func_800484EC(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp20, (s32)sp10);
|
||||
func_800484EC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34, (s32)sp20, (s32)sp10);
|
||||
|
||||
buf[0] = *(u16 *)(a0 + 0x3A);
|
||||
buf[1] = *(u16 *)(a0 + 0x3E);
|
||||
buf[2] = *(u16 *)(a0 + 0x42);
|
||||
buf[0] = ((Unkstruct_800B5CB8 *)a0)->unk3A;
|
||||
buf[1] = ((Unkstruct_800B5CB8 *)a0)->unk3E;
|
||||
buf[2] = ((Unkstruct_800B5CB8 *)a0)->unk42;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x44);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x48);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0x4C);
|
||||
sp10[0] = sp10[0] + ((Unkstruct_800B5CB8 *)a0)->unk44;
|
||||
sp10[1] = sp10[1] + ((Unkstruct_800B5CB8 *)a0)->unk48;
|
||||
sp10[2] = sp10[2] + ((Unkstruct_800B5CB8 *)a0)->unk4C;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x4);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x8);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0xC);
|
||||
sp10[0] = sp10[0] + CAST_WIDTH(s32, a0, 0x4);
|
||||
sp10[1] = sp10[1] + CAST_WIDTH(s32, a0, 0x8);
|
||||
sp10[2] = sp10[2] + CAST_WIDTH(s32, a0, 0xC);
|
||||
|
||||
buf[4] = *(u16 *)((s32)sp10 + 0x2);
|
||||
buf[5] = *(u16 *)((s32)sp10 + 0x6);
|
||||
@@ -5360,11 +5360,11 @@ s32 func_80180E84(s32 a0, s32 a1) {
|
||||
|
||||
func_8012CEB0((s32)&buf[0], (s32)&buf[4], 0);
|
||||
|
||||
if (*(s16 *)(a0 + 0xA) > *(s16 *)&buf[5]) {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFF80000 - (a1 << 19);
|
||||
if (CAST_SIGN(s16, a0, 0xA) > *(s16 *)&buf[5]) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFF80000 - (a1 << 19);
|
||||
return 1;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFFE0000 - (a1 << 17);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFFE0000 - (a1 << 17);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3051,41 +3051,41 @@ void func_801833A4(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -3093,38 +3093,38 @@ void func_801833A4(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -3132,66 +3132,66 @@ void func_801833A4(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2949,60 +2949,60 @@ void func_80183EA0(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5213,41 +5213,41 @@ void func_80181128(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -5255,38 +5255,38 @@ void func_80181128(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -5294,66 +5294,66 @@ void func_80181128(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5612,60 +5612,60 @@ void func_80181C24(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3913,9 +3913,9 @@ store5:
|
||||
extern void func_8017E998(s32 arg0);
|
||||
|
||||
void func_8017E220(s32 a0) {
|
||||
*(s32 *)(a0 + 0xDC) &= ~0x10;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC &= ~0x10;
|
||||
func_8017E998(a0);
|
||||
*(s32 *)(a0 + 0x1C) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C = 0xA;
|
||||
}
|
||||
|
||||
|
||||
@@ -3954,13 +3954,13 @@ extern void func_8017E998(s32 arg0);
|
||||
extern void func_8017EADC(s32);
|
||||
|
||||
void func_8017E2F4(s32 arg0) {
|
||||
if (*(s32 *)(arg0 + 0x1C) == *(s32 *)(arg0 + 0x1C) / 5 * 5) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unk1C == ((Unkstruct_800B5CB8 *)arg0)->unk1C / 5 * 5) {
|
||||
func_8017E998(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 = 0xA;
|
||||
}
|
||||
if (*(s32 *)(arg0 + 0xE4) != 0) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unkE4 != 0) {
|
||||
func_8017EADC(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) -= 1;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4003,30 +4003,30 @@ void func_8017E438(s32 a0) {
|
||||
s32 v1;
|
||||
s32 v0;
|
||||
|
||||
*(s32 *)(a0 + 0x1C) -= 1;
|
||||
if (*(s16 *)(a0 + 0xFE) != 0) {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1A) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1C) += 0x40;
|
||||
v1 = *(s32 *)(a0 + 0x20);
|
||||
if (*(s16 *)(v1 + 0x18) >= 0x1800) {
|
||||
*(u16 *)(v1 + 0x1C) = 0x1800;
|
||||
*(u16 *)(v1 + 0x1A) = 0x1800;
|
||||
*(u16 *)(v1 + 0x18) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C -= 1;
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkFE != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 += 0x40;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk1A += 0x40;
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x1C) += 0x40;
|
||||
v1 = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
if (CAST_SIGN(s16, v1, 0x18) >= 0x1800) {
|
||||
CAST_WIDTH(u16, v1, 0x1C) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk1A = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk18 = 0x1800;
|
||||
}
|
||||
}
|
||||
|
||||
if (*(s32 *)(a0 + 0x1C) == 0xE) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk1C == 0xE) {
|
||||
func_8017E998(a0);
|
||||
v0 = 0xA;
|
||||
} else {
|
||||
if (*(s32 *)(a0 + 0xE4) == 0) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkE4 == 0) {
|
||||
return;
|
||||
}
|
||||
func_8017EADC(a0);
|
||||
v0 = *(s32 *)(a0 + 0xE4) - 1;
|
||||
v0 = ((Unkstruct_800B5CB8 *)a0)->unkE4 - 1;
|
||||
}
|
||||
*(s32 *)(a0 + 0xE4) = v0;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE4 = v0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4318,14 +4318,14 @@ void func_8017E998(s32 arg0) {
|
||||
s32 v;
|
||||
u32 *bp;
|
||||
|
||||
if (*(s16 *)(arg0 + 0xAA) <= 0) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unkAA <= 0) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
bp = buf;
|
||||
func_8012B0B4(bp, rand() % 4096, 64);
|
||||
v = *(s32 *)buf;
|
||||
sp10[0] = *(u16 *)(arg0 + 0x6) + v;
|
||||
sp10[1] = *(u16 *)(arg0 + 0xA) - 0x60;
|
||||
sp10[2] = *(u16 *)(arg0 + 0xE) + (v >> 16);
|
||||
sp10[0] = ((Unkstruct_800B5CB8 *)arg0)->unk6 + v;
|
||||
sp10[1] = ((Unkstruct_800B5CB8 *)arg0)->unkA - 0x60;
|
||||
sp10[2] = ((Unkstruct_800B5CB8 *)arg0)->unkE + (v >> 16);
|
||||
q = ((s32 (*)(u16 *))func_80143BDC)(sp10);
|
||||
if (q != 0) {
|
||||
*(u8 *)(*(s32 *)(q + 0xCC) + 0x27) = 0x5B;
|
||||
@@ -4407,9 +4407,9 @@ s32 aF8018280C(s32 a0) {
|
||||
extern s32 rand(void);
|
||||
void func_8017EBD8(s32 arg0) {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s16*)(arg0 + 0x2) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0xA;
|
||||
} else {
|
||||
*(s16*)(arg0 + 0x2) = 0x3;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4516,19 +4516,19 @@ s32 func_8017EE7C(s32 a0, s32 a1) {
|
||||
sp20[0] = 0;
|
||||
sp20[2] = 0xFFF80000;
|
||||
|
||||
func_800484EC(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp20, (s32)sp10);
|
||||
func_800484EC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34, (s32)sp20, (s32)sp10);
|
||||
|
||||
buf[0] = *(u16 *)(a0 + 0x3A);
|
||||
buf[1] = *(u16 *)(a0 + 0x3E);
|
||||
buf[2] = *(u16 *)(a0 + 0x42);
|
||||
buf[0] = ((Unkstruct_800B5CB8 *)a0)->unk3A;
|
||||
buf[1] = ((Unkstruct_800B5CB8 *)a0)->unk3E;
|
||||
buf[2] = ((Unkstruct_800B5CB8 *)a0)->unk42;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x44);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x48);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0x4C);
|
||||
sp10[0] = sp10[0] + ((Unkstruct_800B5CB8 *)a0)->unk44;
|
||||
sp10[1] = sp10[1] + ((Unkstruct_800B5CB8 *)a0)->unk48;
|
||||
sp10[2] = sp10[2] + ((Unkstruct_800B5CB8 *)a0)->unk4C;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x4);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x8);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0xC);
|
||||
sp10[0] = sp10[0] + CAST_WIDTH(s32, a0, 0x4);
|
||||
sp10[1] = sp10[1] + CAST_WIDTH(s32, a0, 0x8);
|
||||
sp10[2] = sp10[2] + CAST_WIDTH(s32, a0, 0xC);
|
||||
|
||||
buf[4] = *(u16 *)((s32)sp10 + 0x2);
|
||||
buf[5] = *(u16 *)((s32)sp10 + 0x6);
|
||||
@@ -4536,11 +4536,11 @@ s32 func_8017EE7C(s32 a0, s32 a1) {
|
||||
|
||||
func_8012CEB0((s32)&buf[0], (s32)&buf[4], 0);
|
||||
|
||||
if (*(s16 *)(a0 + 0xA) > *(s16 *)&buf[5]) {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFF80000 - (a1 << 19);
|
||||
if (CAST_SIGN(s16, a0, 0xA) > *(s16 *)&buf[5]) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFF80000 - (a1 << 19);
|
||||
return 1;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFFE0000 - (a1 << 17);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFFE0000 - (a1 << 17);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4909,11 +4909,11 @@ s32 func_80181C4C(s32 a0) {
|
||||
func_8002D4C8(0xA26, 0);
|
||||
e = func_80132EF4(a0, 0x22);
|
||||
if (e != 0) {
|
||||
*(u16 *)(e + 0x34) = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) | 2;
|
||||
*(s32 *)(e + 0x14) = -0x80000 - ((rand() % 3) << 16);
|
||||
*(u16 *)(e + 6) = *(u16 *)(a0 + 0x7C);
|
||||
*(u16 *)(e + 0xA) = *(u16 *)(a0 + 0x7E);
|
||||
*(u16 *)(e + 0xE) = *(u16 *)(a0 + 0x80);
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) | 2;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = -0x80000 - ((rand() % 3) << 16);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = *(u16 *)(a0 + 0x7C);
|
||||
((Unkstruct_800B5CB8 *)e)->unkA = *(u16 *)(a0 + 0x7E);
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = *(u16 *)(a0 + 0x80);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -3090,41 +3090,41 @@ void func_8018242C(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -3132,38 +3132,38 @@ void func_8018242C(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -3171,66 +3171,66 @@ void func_8018242C(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3489,60 +3489,60 @@ void func_80182F28(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3727,21 +3727,21 @@ void func_8018219C(s32 arg0)
|
||||
do {
|
||||
obj = func_80132EF4(owner, 0x22);
|
||||
if (obj != 0) {
|
||||
a = *(u16 *)(obj + 6) - 0x28;
|
||||
*(u16 *)(obj + 6) = a;
|
||||
b = *(u16 *)(obj + 0xA) - 0x20;
|
||||
*(u16 *)(obj + 0xA) = b;
|
||||
a = ((Unkstruct_800B5CB8 *)obj)->unk6 - 0x28;
|
||||
CAST_ALIAS(u16, obj, 6) = a;
|
||||
b = ((Unkstruct_800B5CB8 *)obj)->unkA - 0x20;
|
||||
CAST_ALIAS(u16, obj, 0xA) = b;
|
||||
d = (i + (D_800B99D8 & 4) * 3) - 0x2A;
|
||||
*(u16 *)(obj + 0xE) = *(u16 *)(obj + 0xE) + d;
|
||||
((Unkstruct_800B5CB8 *)obj)->unkE = ((Unkstruct_800B5CB8 *)obj)->unkE + d;
|
||||
d = (s16)d;
|
||||
if (d >= 0) {
|
||||
d = d << 7;
|
||||
} else {
|
||||
d = -(d << 7);
|
||||
}
|
||||
*(u16 *)(obj + 0x34) = d + 0x1000;
|
||||
*(s32 *)(obj + 0x14) = 0xFFFE0000;
|
||||
*(s32 *)(obj + 0x10) = 0xFFFD0000;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk34 = d + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk14 = 0xFFFE0000;
|
||||
CAST_WIDTH(s32, obj, 0x10) = 0xFFFD0000;
|
||||
}
|
||||
i += 0x18;
|
||||
} while (i < 0x49);
|
||||
|
||||
@@ -2937,7 +2937,7 @@ void func_80183A60(void *a0)
|
||||
|
||||
|
||||
s32 func_80183B3C(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
|
||||
@@ -3231,41 +3231,41 @@ void func_80186B78(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -3273,38 +3273,38 @@ void func_80186B78(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -3312,66 +3312,66 @@ void func_80186B78(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3636,60 +3636,60 @@ void func_80187674(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3985,15 +3985,15 @@ void func_801880D4(s32 a0)
|
||||
s32 xy;
|
||||
|
||||
func_8012B77C((s32)&xy, a0 + 4, (s32)&D_80126B5C);
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = xy >> 16;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) = xy;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = xy >> 16;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = xy;
|
||||
|
||||
{
|
||||
s32 nv = *(u16 *)(a0 + 0xA) - 8;
|
||||
*(u16 *)(a0 + 0xA) = nv;
|
||||
if (*(s16 *)(a0 + 0x8A) - (s16)nv >= 0x81) {
|
||||
*(u16 *)(a0 + 2) = 0xA;
|
||||
*(u16 *)(a0 + 0xFC) = 0xC;
|
||||
s32 nv = ((Unkstruct_800B5CB8 *)a0)->unkA - 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = nv;
|
||||
if (CAST_SIGN(s16, a0, 0x8A) - (s16)nv >= 0x81) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0xC;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4025,11 +4025,11 @@ void *a0;
|
||||
{
|
||||
u16 w;
|
||||
|
||||
w = *(u16 *)(a0 + 0xA) + 8;
|
||||
*(u16 *)(a0 + 0xA) = w;
|
||||
if (*(s16 *)(a0 + 0x8A) - (s16)w <= 0) {
|
||||
*(s16 *)(a0 + 2) = 8;
|
||||
*(s16 *)(a0 + 0xFC) = 0x1E;
|
||||
w = ((Unkstruct_800B5CB8 *)a0)->unkA + 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = w;
|
||||
if (CAST_SIGN(s16, a0, 0x8A) - (s16)w <= 0) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0x1E;
|
||||
}
|
||||
func_80187968((s32)a0);
|
||||
}
|
||||
|
||||
@@ -1293,7 +1293,7 @@ extern void func_8014900C(int *a0);
|
||||
extern void (*D_80181A5C[])(void);
|
||||
|
||||
void func_80159B70(void *a0) {
|
||||
D_80181A5C[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A5C[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1212,7 +1212,7 @@ extern s32 func_80172590(u8 *a0);
|
||||
extern void (*D_80181A64[])(void);
|
||||
|
||||
void func_8015A264(void *a0) {
|
||||
D_80181A64[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A64[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1410,7 +1410,7 @@ void func_8015BE38(struct Obj *a0) {
|
||||
extern void (*D_80181A94[])(void);
|
||||
|
||||
void func_8015BFF4(void *a0) {
|
||||
D_80181A94[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A94[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1234,7 +1234,7 @@ extern s32 func_80172590(u8 *a0);
|
||||
extern void (*D_801812B0[])(void);
|
||||
|
||||
void func_8015A264(void *a0) {
|
||||
D_801812B0[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_801812B0[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3375,7 +3375,7 @@ s32 func_801863B4(s32 a0) {
|
||||
p = D_801B8A44;
|
||||
v = *p;
|
||||
if (*p != -1) {
|
||||
x = *(u16 *)a0;
|
||||
x = ((Unkstruct_800B5CB8 *)a0)->unk0;
|
||||
do {
|
||||
if (x == v) {
|
||||
return 1;
|
||||
|
||||
@@ -1293,7 +1293,7 @@ extern void func_8014900C(int *a0);
|
||||
extern void (*D_80181A5C[])(void);
|
||||
|
||||
void func_80159B70(void *a0) {
|
||||
D_80181A5C[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A5C[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1212,7 +1212,7 @@ extern s32 func_80172590(u8 *a0);
|
||||
extern void (*D_80181A64[])(void);
|
||||
|
||||
void func_8015A264(void *a0) {
|
||||
D_80181A64[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A64[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1410,7 +1410,7 @@ void func_8015BE38(struct Obj *a0) {
|
||||
extern void (*D_80181A94[])(void);
|
||||
|
||||
void func_8015BFF4(void *a0) {
|
||||
D_80181A94[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A94[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2937,7 +2937,7 @@ s32 arg0;
|
||||
{
|
||||
s32 *ptr = (s32 *) D_801151D4;
|
||||
|
||||
*(s32 *) (arg0 + 0x204) += 0x30000;
|
||||
((Unkstruct_80126B58 *)arg0)->unk204 += 0x30000;
|
||||
ptr[4] -= *(s16 *) (arg0 + 0x206);
|
||||
ptr[5] = ptr[4];
|
||||
if (ptr[4] < 0x12C) {
|
||||
|
||||
@@ -3429,7 +3429,7 @@ void func_8017D6D0(void *a0) {
|
||||
|
||||
|
||||
s32 func_8017D70C(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
|
||||
@@ -4841,17 +4841,17 @@ void func_8017F964(s32 param_1)
|
||||
s0 = func_80132EF4(param_1, 0x49);
|
||||
if (s0 != 0) {
|
||||
r = rand() & 0xF;
|
||||
x = *(u16 *)(s0 + 6) - 8;
|
||||
*(u16 *)(s0 + 6) = x + (*(u16 *)(param_1 + 0x104) + r);
|
||||
x = ((Unkstruct_800B5CB8 *)s0)->unk6 - 8;
|
||||
((Unkstruct_800B5CB8 *)s0)->unk6 = x + (*(u16 *)(param_1 + 0x104) + r);
|
||||
r2 = rand() & 0xF;
|
||||
x2 = *(u16 *)(s0 + 0xA) - 8;
|
||||
*(u16 *)(s0 + 0xA) = x2 + (*(u16 *)(param_1 + 0x106) + r2);
|
||||
x2 = ((Unkstruct_800B5CB8 *)s0)->unkA - 8;
|
||||
((Unkstruct_800B5CB8 *)s0)->unkA = x2 + (*(u16 *)(param_1 + 0x106) + r2);
|
||||
v1 = *(s16 *)(*(s32 *)(param_1 + 0x20) + 0x1C);
|
||||
if (v1 < 0) {
|
||||
v1 += 0x3F;
|
||||
}
|
||||
*(s32 *)(s0 + 0x2C) = 0x40000;
|
||||
*(u16 *)(s0 + 0xE) -= v1 >> 6;
|
||||
CAST_WIDTH(s32, s0, 0x2C) = 0x40000;
|
||||
((Unkstruct_800B5CB8 *)s0)->unkE -= v1 >> 6;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6403,9 +6403,9 @@ void func_80181C98(s32 a0)
|
||||
{
|
||||
|
||||
extern char D_801ADEAC[];
|
||||
*(short *)(a0 + 0x2) = 0x9;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 0x9;
|
||||
((void (*)(s32, void *))func_8012A828)(a0, &D_801ADEAC);
|
||||
*(s32 *)(a0 + 0x1C) = 0x1E;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C = 0x1E;
|
||||
func_80182944(a0);
|
||||
}
|
||||
|
||||
@@ -6525,9 +6525,9 @@ set_state:
|
||||
extern void func_801826C8(s32 a0);
|
||||
|
||||
void func_80181F50(s32 a0) {
|
||||
*(s32 *)(a0 + 0xDC) &= ~0x10;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC &= ~0x10;
|
||||
func_801826C8(a0);
|
||||
*(s32 *)(a0 + 0x1C) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C = 0xA;
|
||||
}
|
||||
|
||||
|
||||
@@ -6608,30 +6608,30 @@ void func_80182168(s32 a0) {
|
||||
s32 v1;
|
||||
s32 v0;
|
||||
|
||||
*(s32 *)(a0 + 0x1C) -= 1;
|
||||
if (*(s16 *)(a0 + 0xFE) != 0) {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1A) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1C) += 0x40;
|
||||
v1 = *(s32 *)(a0 + 0x20);
|
||||
if (*(s16 *)(v1 + 0x18) >= 0x1800) {
|
||||
*(u16 *)(v1 + 0x1C) = 0x1800;
|
||||
*(u16 *)(v1 + 0x1A) = 0x1800;
|
||||
*(u16 *)(v1 + 0x18) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C -= 1;
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkFE != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 += 0x40;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk1A += 0x40;
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x1C) += 0x40;
|
||||
v1 = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
if (CAST_SIGN(s16, v1, 0x18) >= 0x1800) {
|
||||
CAST_WIDTH(u16, v1, 0x1C) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk1A = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk18 = 0x1800;
|
||||
}
|
||||
}
|
||||
|
||||
if (*(s32 *)(a0 + 0x1C) == 0xE) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk1C == 0xE) {
|
||||
func_801826C8(a0);
|
||||
v0 = 0xA;
|
||||
} else {
|
||||
if (*(s32 *)(a0 + 0xE4) == 0) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkE4 == 0) {
|
||||
return;
|
||||
}
|
||||
func_8018280C(a0);
|
||||
v0 = *(s32 *)(a0 + 0xE4) - 1;
|
||||
v0 = ((Unkstruct_800B5CB8 *)a0)->unkE4 - 1;
|
||||
}
|
||||
*(s32 *)(a0 + 0xE4) = v0;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE4 = v0;
|
||||
}
|
||||
|
||||
|
||||
@@ -7011,9 +7011,9 @@ s32 aF8018280C(s32 a0) {
|
||||
extern s32 rand(void);
|
||||
void func_80182908(s32 arg0) {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s16*)(arg0 + 0x2) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0xA;
|
||||
} else {
|
||||
*(s16*)(arg0 + 0x2) = 0x3;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7022,12 +7022,12 @@ extern s32 func_8014CB1C(void);
|
||||
|
||||
void func_80182944(s32 a0) {
|
||||
if (func_8014CB1C() != 0) {
|
||||
*(s32 *)(a0 + 0xDC) |= 0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC |= 0x20;
|
||||
} else {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s32 *)(a0 + 0xDC) |= 0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC |= 0x20;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xDC) &= ~0x20;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkDC &= ~0x20;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7140,19 +7140,19 @@ s32 func_80182BAC(s32 a0, s32 a1) {
|
||||
sp20[0] = 0;
|
||||
sp20[2] = 0xFFF80000;
|
||||
|
||||
func_800484EC(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp20, (s32)sp10);
|
||||
func_800484EC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34, (s32)sp20, (s32)sp10);
|
||||
|
||||
buf[0] = *(u16 *)(a0 + 0x3A);
|
||||
buf[1] = *(u16 *)(a0 + 0x3E);
|
||||
buf[2] = *(u16 *)(a0 + 0x42);
|
||||
buf[0] = ((Unkstruct_800B5CB8 *)a0)->unk3A;
|
||||
buf[1] = ((Unkstruct_800B5CB8 *)a0)->unk3E;
|
||||
buf[2] = ((Unkstruct_800B5CB8 *)a0)->unk42;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x44);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x48);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0x4C);
|
||||
sp10[0] = sp10[0] + ((Unkstruct_800B5CB8 *)a0)->unk44;
|
||||
sp10[1] = sp10[1] + ((Unkstruct_800B5CB8 *)a0)->unk48;
|
||||
sp10[2] = sp10[2] + ((Unkstruct_800B5CB8 *)a0)->unk4C;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x4);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x8);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0xC);
|
||||
sp10[0] = sp10[0] + CAST_WIDTH(s32, a0, 0x4);
|
||||
sp10[1] = sp10[1] + CAST_WIDTH(s32, a0, 0x8);
|
||||
sp10[2] = sp10[2] + CAST_WIDTH(s32, a0, 0xC);
|
||||
|
||||
buf[4] = *(u16 *)((s32)sp10 + 0x2);
|
||||
buf[5] = *(u16 *)((s32)sp10 + 0x6);
|
||||
@@ -7160,11 +7160,11 @@ s32 func_80182BAC(s32 a0, s32 a1) {
|
||||
|
||||
func_8012CEB0((s32)&buf[0], (s32)&buf[4], 0);
|
||||
|
||||
if (*(s16 *)(a0 + 0xA) > *(s16 *)&buf[5]) {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFF80000 - (a1 << 19);
|
||||
if (CAST_SIGN(s16, a0, 0xA) > *(s16 *)&buf[5]) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFF80000 - (a1 << 19);
|
||||
return 1;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFFE0000 - (a1 << 17);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFFE0000 - (a1 << 17);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3046,41 +3046,41 @@ void func_8017F9BC(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 1 || *(s16 *)(a0 + 0x70) == 8) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 1 || ((Unkstruct_800B5CB8 *)a0)->unk70 == 8) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x70) < 8) {
|
||||
*(s16 *)(a0 + 0x108) = (*(u16 *)(a0 + 0x108) + 0x40) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) & 0xFFF;
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x70) < 8) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk108 = (((Unkstruct_800B5CB8 *)a0)->unk108 + 0x40) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 & 0xFFF;
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) & 0xFFF;
|
||||
|
||||
flag = *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x12) -
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12);
|
||||
flag = *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x12) -
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x12);
|
||||
if (flag > 0x800) {
|
||||
flag = flag - 0x1000;
|
||||
}
|
||||
@@ -3088,38 +3088,38 @@ void func_8017F9BC(s32 a0)
|
||||
flag = flag + 0x1000;
|
||||
}
|
||||
if (flag > 0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) - 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 - 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else if (flag < -0x200) {
|
||||
s32 t = *(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + 0x200;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) = t + flag;
|
||||
s32 t = ((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + 0x200;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = t + flag;
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) + (flag / 16);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 + (flag / 16);
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x12) +
|
||||
(func_8004787C(*(s16 *)(a0 + 0x108)) >> 6);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 +
|
||||
(func_8004787C(CAST_SIGN(s16, a0, 0x108)) >> 6);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
out[1] = out[1] - 0x40;
|
||||
|
||||
pos[0] = *(u16 *)(a0 + 6);
|
||||
pos[1] = *(u16 *)(a0 + 0xA) + 0x10;
|
||||
pos[2] = *(u16 *)(a0 + 0xE);
|
||||
pos[0] = ((Unkstruct_800B5CB8 *)a0)->unk6;
|
||||
pos[1] = ((Unkstruct_800B5CB8 *)a0)->unkA + 0x10;
|
||||
pos[2] = ((Unkstruct_800B5CB8 *)a0)->unkE;
|
||||
flag = func_8012CEB0((s32)out, (s32)pos, 1);
|
||||
if (flag & 0x1000) {
|
||||
return;
|
||||
@@ -3127,66 +3127,66 @@ void func_8017F9BC(s32 a0)
|
||||
if (flag != 0) {
|
||||
s32 d;
|
||||
s32 t = pos[1] - 0x10;
|
||||
d = *(s16 *)(a0 + 0xA) - t;
|
||||
d = CAST_SIGN(s16, a0, 0xA) - t;
|
||||
if (d < 5) {
|
||||
return;
|
||||
}
|
||||
if (d > 0x40) {
|
||||
d = 0x40;
|
||||
}
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + (d << 4);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + (d << 4);
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
} else {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x80;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) & 0xFFF;
|
||||
if ((u32)(*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) - 0x801) < 0x3FF) {
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x80;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 & 0xFFF;
|
||||
if ((u32)(((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 - 0x801) < 0x3FF) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = 0xC00;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 6;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 6;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x14) = func_80047948(ang2) >> 6;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) = func_80047948(ang2) >> 6;
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) =
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x10) + 0xC00;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 =
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 + 0xC00;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3449,60 +3449,60 @@ void func_801804B8(s32 a0)
|
||||
s32 flag; /* sp+0x28 */
|
||||
s16 *p;
|
||||
|
||||
if (*(s16 *)(*(s32 *)(a0 + 0x64) + 0x36) != *(s16 *)(a0 + 0xFE)) {
|
||||
if (*(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x36) != ((Unkstruct_800B5CB8 *)a0)->unkFE) {
|
||||
((void (*)(void))func_8012C218)();
|
||||
return;
|
||||
}
|
||||
|
||||
if (*(s16 *)(a0 + 0x70) == 0x11) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk70 == 0x11) {
|
||||
s32 ang;
|
||||
s32 t;
|
||||
ang = (*(u16 *)(a0 + 0xFC) + 0x40) & 0xFFF;
|
||||
p = *(s16 **)(a0 + 0xCC);
|
||||
*(s16 *)(a0 + 0xFC) = ang;
|
||||
ang = (CAST_SIGN(u16, a0, 0xFC) + 0x40) & 0xFFF;
|
||||
p = CAST_SIGN(s16 *, a0, 0xCC);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = ang;
|
||||
t = (func_8004787C(ang) >> 6) + 0xBF;
|
||||
p[2] = t;
|
||||
p[1] = t;
|
||||
p[0] = t;
|
||||
}
|
||||
|
||||
if (*(u32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) |= 0x80000000;
|
||||
if (*(u32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 4) & 0x80000000) {
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) |= 0x80000000;
|
||||
} else {
|
||||
*(u32 *)(*(s32 *)(a0 + 0x20) + 4) &= ~0x80000000;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 4) &= ~0x80000000;
|
||||
}
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x14) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x14);
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x14) =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x14);
|
||||
|
||||
{
|
||||
s32 ang;
|
||||
s32 ang2;
|
||||
|
||||
ang = (*(u16 *)(a0 + 0x102) + *(u16 *)(a0 + 0x106)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x102) = ang;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x10) = func_80047948(ang) >> 3;
|
||||
ang = (CAST_SIGN(u16, a0, 0x102) + CAST_SIGN(u16, a0, 0x106)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk102 = ang;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk10 = func_80047948(ang) >> 3;
|
||||
|
||||
ang2 = (*(u16 *)(a0 + 0x104) + *(u16 *)(a0 + 0x100)) & 0xFFF;
|
||||
*(s16 *)(a0 + 0x104) = ang2;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x12) = func_80047948(ang2) >> 3;
|
||||
ang2 = (CAST_SIGN(u16, a0, 0x104) + CAST_SIGN(u16, a0, 0x100)) & 0xFFF;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk104 = ang2;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk12 = func_80047948(ang2) >> 3;
|
||||
|
||||
func_80049CAC(*(s32 *)(a0 + 0x20) + 0x10, *(s32 *)(a0 + 0x20) + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(*(s32 *)(a0 + 0x20) + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x34));
|
||||
func_80049CAC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x10, ((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34);
|
||||
gte_SetRotMatrix((s32 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34));
|
||||
gte_SetTransMatrix((s32 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x34));
|
||||
|
||||
p = *(s16 **)(a0 + 0xD0);
|
||||
p = CAST_SIGN(s16 *, a0, 0xD0);
|
||||
sv[0] = 0;
|
||||
sv[1] = 0;
|
||||
sv[2] = (p[2] * *(s16 *)(*(s32 *)(a0 + 0x20) + 0x18)) >> 12;
|
||||
sv[2] = (p[2] * *(s16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18)) >> 12;
|
||||
RotTransSV(sv, out, &flag);
|
||||
|
||||
*(s16 *)(a0 + 6) = out[0];
|
||||
*(s16 *)(a0 + 0xA) = out[1];
|
||||
*(s16 *)(a0 + 0xE) = out[2];
|
||||
((Unkstruct_800B5CB8 *)a0)->unk6 = out[0];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = out[1];
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE = out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3841,14 +3841,14 @@ void func_80180F18(void *a0) {
|
||||
u16 t;
|
||||
|
||||
func_8012B77C((s32)&d, (s32)a0 + 4, (s32)&D_80126B5C);
|
||||
*(s16 *)(*(s32 *)((s32)a0 + 0x20) + 0x12) = d >> 16;
|
||||
*(s16 *)(*(s32 *)((s32)a0 + 0x20) + 0x10) = d;
|
||||
t = *(u16 *)((s32)a0 + 0xA);
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)((s32)a0 + 0x20))->unk12 = d >> 16;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)((s32)a0 + 0x20))->unk10 = d;
|
||||
t = ((Unkstruct_800B5CB8 *)a0)->unkA;
|
||||
t = t - 8;
|
||||
*(u16 *)((s32)a0 + 0xA) = t;
|
||||
if (*(s16 *)((s32)a0 + 0x8A) - (s16)t >= 0x81) {
|
||||
*(s16 *)((s32)a0 + 2) = 0xA;
|
||||
*(s16 *)((s32)a0 + 0xFC) = 0xC;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = t;
|
||||
if (CAST_SIGN(s16, (s32)a0, 0x8A) - (s16)t >= 0x81) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 0xA;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0xC;
|
||||
}
|
||||
func_801807AC((s32)a0);
|
||||
}
|
||||
@@ -3884,11 +3884,11 @@ void *a0;
|
||||
{
|
||||
u16 w;
|
||||
|
||||
w = *(u16 *)(a0 + 0xA) + 8;
|
||||
*(u16 *)(a0 + 0xA) = w;
|
||||
if (*(s16 *)(a0 + 0x8A) - (s16)w <= 0) {
|
||||
*(s16 *)(a0 + 2) = 8;
|
||||
*(s16 *)(a0 + 0xFC) = 0x1E;
|
||||
w = ((Unkstruct_800B5CB8 *)a0)->unkA + 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkA = w;
|
||||
if (CAST_SIGN(s16, a0, 0x8A) - (s16)w <= 0) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unk2 = 8;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkFC = 0x1E;
|
||||
}
|
||||
func_801807AC((s32)a0);
|
||||
}
|
||||
|
||||
@@ -3836,13 +3836,13 @@ extern void func_8017EF48(s32 arg0);
|
||||
extern void func_8017F08C(s32);
|
||||
|
||||
void func_8017E8A4(s32 arg0) {
|
||||
if (*(s32 *)(arg0 + 0x1C) == *(s32 *)(arg0 + 0x1C) / 5 * 5) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unk1C == ((Unkstruct_800B5CB8 *)arg0)->unk1C / 5 * 5) {
|
||||
func_8017EF48(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 = 0xA;
|
||||
}
|
||||
if (*(s32 *)(arg0 + 0xE4) != 0) {
|
||||
if (((Unkstruct_800B5CB8 *)arg0)->unkE4 != 0) {
|
||||
func_8017F08C(arg0);
|
||||
*(s32 *)(arg0 + 0xE4) -= 1;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unkE4 -= 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3891,30 +3891,30 @@ void func_8017E9E8(s32 a0) {
|
||||
s32 v1;
|
||||
s32 v0;
|
||||
|
||||
*(s32 *)(a0 + 0x1C) -= 1;
|
||||
if (*(s16 *)(a0 + 0xFE) != 0) {
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x18) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1A) += 0x40;
|
||||
*(u16 *)(*(s32 *)(a0 + 0x20) + 0x1C) += 0x40;
|
||||
v1 = *(s32 *)(a0 + 0x20);
|
||||
if (*(s16 *)(v1 + 0x18) >= 0x1800) {
|
||||
*(u16 *)(v1 + 0x1C) = 0x1800;
|
||||
*(u16 *)(v1 + 0x1A) = 0x1800;
|
||||
*(u16 *)(v1 + 0x18) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)a0)->unk1C -= 1;
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkFE != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 += 0x40;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk1A += 0x40;
|
||||
*(u16 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x1C) += 0x40;
|
||||
v1 = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
if (CAST_SIGN(s16, v1, 0x18) >= 0x1800) {
|
||||
CAST_WIDTH(u16, v1, 0x1C) = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk1A = 0x1800;
|
||||
((Unkstruct_800B5CB8 *)v1)->unk18 = 0x1800;
|
||||
}
|
||||
}
|
||||
|
||||
if (*(s32 *)(a0 + 0x1C) == 0xE) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unk1C == 0xE) {
|
||||
func_8017EF48(a0);
|
||||
v0 = 0xA;
|
||||
} else {
|
||||
if (*(s32 *)(a0 + 0xE4) == 0) {
|
||||
if (((Unkstruct_800B5CB8 *)a0)->unkE4 == 0) {
|
||||
return;
|
||||
}
|
||||
func_8017F08C(a0);
|
||||
v0 = *(s32 *)(a0 + 0xE4) - 1;
|
||||
v0 = ((Unkstruct_800B5CB8 *)a0)->unkE4 - 1;
|
||||
}
|
||||
*(s32 *)(a0 + 0xE4) = v0;
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE4 = v0;
|
||||
}
|
||||
|
||||
|
||||
@@ -4308,9 +4308,9 @@ s32 aF8018280C(s32 a0) {
|
||||
extern s32 rand(void);
|
||||
void func_8017F188(s32 arg0) {
|
||||
if ((rand() & 1) != 0) {
|
||||
*(s16*)(arg0 + 0x2) = 0xA;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0xA;
|
||||
} else {
|
||||
*(s16*)(arg0 + 0x2) = 0x3;
|
||||
((Unkstruct_800B5CB8 *)arg0)->unk2 = 0x3;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4417,19 +4417,19 @@ s32 func_8017F42C(s32 a0, s32 a1) {
|
||||
sp20[0] = 0;
|
||||
sp20[2] = 0xFFF80000;
|
||||
|
||||
func_800484EC(*(s32 *)(a0 + 0x20) + 0x34, (s32)sp20, (s32)sp10);
|
||||
func_800484EC(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x34, (s32)sp20, (s32)sp10);
|
||||
|
||||
buf[0] = *(u16 *)(a0 + 0x3A);
|
||||
buf[1] = *(u16 *)(a0 + 0x3E);
|
||||
buf[2] = *(u16 *)(a0 + 0x42);
|
||||
buf[0] = ((Unkstruct_800B5CB8 *)a0)->unk3A;
|
||||
buf[1] = ((Unkstruct_800B5CB8 *)a0)->unk3E;
|
||||
buf[2] = ((Unkstruct_800B5CB8 *)a0)->unk42;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x44);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x48);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0x4C);
|
||||
sp10[0] = sp10[0] + ((Unkstruct_800B5CB8 *)a0)->unk44;
|
||||
sp10[1] = sp10[1] + ((Unkstruct_800B5CB8 *)a0)->unk48;
|
||||
sp10[2] = sp10[2] + ((Unkstruct_800B5CB8 *)a0)->unk4C;
|
||||
|
||||
sp10[0] = sp10[0] + *(s32 *)(a0 + 0x4);
|
||||
sp10[1] = sp10[1] + *(s32 *)(a0 + 0x8);
|
||||
sp10[2] = sp10[2] + *(s32 *)(a0 + 0xC);
|
||||
sp10[0] = sp10[0] + CAST_WIDTH(s32, a0, 0x4);
|
||||
sp10[1] = sp10[1] + CAST_WIDTH(s32, a0, 0x8);
|
||||
sp10[2] = sp10[2] + CAST_WIDTH(s32, a0, 0xC);
|
||||
|
||||
buf[4] = *(u16 *)((s32)sp10 + 0x2);
|
||||
buf[5] = *(u16 *)((s32)sp10 + 0x6);
|
||||
@@ -4437,11 +4437,11 @@ s32 func_8017F42C(s32 a0, s32 a1) {
|
||||
|
||||
func_8012CEB0((s32)&buf[0], (s32)&buf[4], 0);
|
||||
|
||||
if (*(s16 *)(a0 + 0xA) > *(s16 *)&buf[5]) {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFF80000 - (a1 << 19);
|
||||
if (CAST_SIGN(s16, a0, 0xA) > *(s16 *)&buf[5]) {
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFF80000 - (a1 << 19);
|
||||
return 1;
|
||||
} else {
|
||||
*(s32 *)(a0 + 0xE8) = 0xFFFE0000 - (a1 << 17);
|
||||
((Unkstruct_800B5CB8 *)a0)->unkE8 = 0xFFFE0000 - (a1 << 17);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1234,7 +1234,7 @@ extern s32 func_80172590(u8 *a0);
|
||||
extern void (*D_801812B0[])(void);
|
||||
|
||||
void func_8015A264(void *a0) {
|
||||
D_801812B0[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_801812B0[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4580,18 +4580,18 @@ void func_801809B8(s32 arg0, s32 arg1, s32 arg2)
|
||||
if (res == 0) {
|
||||
return;
|
||||
}
|
||||
if (*(s32 *)(res + 0x20) != 0) {
|
||||
*(u16 *)(*(s32 *)(res + 0x20) + 0x2C) = 0xC010;
|
||||
if (((Unkstruct_800B5CB8 *)res)->unk20 != 0) {
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(res + 0x20))->unk2C = 0xC010;
|
||||
}
|
||||
*(s32 *)(res + 0x10) = (rand() & 0x7FFF) * 8 - 0x20000;
|
||||
*(s32 *)(res + 0x14) = (rand() & 0x7FFF) * 4 - 0x60000;
|
||||
*(s32 *)(res + 0x18) = (rand() & 0x7FFF) * 8 - 0x20000;
|
||||
*(s16 *)(res + 0x34) = 0x3001;
|
||||
*(s32 *)(*(s32 *)(res + 0x20) + 4) |= 0x50000000;
|
||||
CAST_WIDTH(s32, res, 0x10) = (rand() & 0x7FFF) * 8 - 0x20000;
|
||||
((Unkstruct_800B5CB8 *)res)->unk14 = (rand() & 0x7FFF) * 4 - 0x60000;
|
||||
CAST_WIDTH(s32, res, 0x18) = (rand() & 0x7FFF) * 8 - 0x20000;
|
||||
((Unkstruct_800B5CB8 *)res)->unk34 = 0x3001;
|
||||
*(s32 *)(((Unkstruct_800B5CB8 *)res)->unk20 + 4) |= 0x50000000;
|
||||
tbl = (s32)D_8018A9A4 + arg1 * 8;
|
||||
*(s16 *)(res + 0x06) = *(u16 *)(tbl + 0);
|
||||
*(s16 *)(res + 0x0A) = *(u16 *)(tbl + 2);
|
||||
*(s16 *)(res + 0x0E) = *(u16 *)(tbl + 4);
|
||||
((Unkstruct_800B5CB8 *)res)->unk6 = *(u16 *)(tbl + 0);
|
||||
((Unkstruct_800B5CB8 *)res)->unkA = *(u16 *)(tbl + 2);
|
||||
((Unkstruct_800B5CB8 *)res)->unkE = *(u16 *)(tbl + 4);
|
||||
if (arg2 == 0) {
|
||||
func_8002D4C8((arg1 == 3) ? 0xBE1 : 0xC2C, 0);
|
||||
}
|
||||
|
||||
@@ -1293,7 +1293,7 @@ extern void func_8014900C(int *a0);
|
||||
extern void (*D_80181A5C[])(void);
|
||||
|
||||
void func_80159B70(void *a0) {
|
||||
D_80181A5C[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A5C[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1212,7 +1212,7 @@ extern s32 func_80172590(u8 *a0);
|
||||
extern void (*D_80181A64[])(void);
|
||||
|
||||
void func_8015A264(void *a0) {
|
||||
D_80181A64[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A64[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1410,7 +1410,7 @@ void func_8015BE38(struct Obj *a0) {
|
||||
extern void (*D_80181A94[])(void);
|
||||
|
||||
void func_8015BFF4(void *a0) {
|
||||
D_80181A94[*(u16 *)((s32)a0 + 0x2)]();
|
||||
D_80181A94[((Unkstruct_80126B58 *)a0)->unk2]();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2939,7 +2939,7 @@ s32 arg0;
|
||||
{
|
||||
s32 *ptr = (s32 *) D_801151D4;
|
||||
|
||||
*(s32 *) (arg0 + 0x204) += 0x30000;
|
||||
((Unkstruct_80126B58 *)arg0)->unk204 += 0x30000;
|
||||
ptr[4] -= *(s16 *) (arg0 + 0x206);
|
||||
ptr[5] = ptr[4];
|
||||
if (ptr[4] < 0x12C) {
|
||||
|
||||
@@ -7769,14 +7769,14 @@ void func_8018325C(s32 a0, void *a1, void *a2)
|
||||
|
||||
rec = func_80132EF4(a0, 0x22);
|
||||
if (rec != 0) {
|
||||
*(u16 *)(rec + 0x34) = 0x3002;
|
||||
((Unkstruct_800B5CB8 *)rec)->unk34 = 0x3002;
|
||||
gte_SetRotMatrix(a1);
|
||||
gte_ldv0(a2);
|
||||
gte_rtv0();
|
||||
gte_stsv(out);
|
||||
*(u16 *)(rec + 0x6) = *(u16 *)(rec + 0x6) + out[0];
|
||||
*(u16 *)(rec + 0xA) = *(u16 *)(rec + 0xA) + out[1];
|
||||
*(u16 *)(rec + 0xE) = *(u16 *)(rec + 0xE) + out[2];
|
||||
((Unkstruct_800B5CB8 *)rec)->unk6 = ((Unkstruct_800B5CB8 *)rec)->unk6 + out[0];
|
||||
((Unkstruct_800B5CB8 *)rec)->unkA = ((Unkstruct_800B5CB8 *)rec)->unkA + out[1];
|
||||
((Unkstruct_800B5CB8 *)rec)->unkE = ((Unkstruct_800B5CB8 *)rec)->unkE + out[2];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8401,27 +8401,27 @@ void func_801842CC(s32 arg0)
|
||||
s32 d;
|
||||
s32 z;
|
||||
t = *(u16 *)(arg0 + 0x84) & 4;
|
||||
z = *(u16 *)(e + 0xE);
|
||||
z = ((Unkstruct_800B5CB8 *)e)->unkE;
|
||||
d = i + t * 3 - 0x2A;
|
||||
do { // !FAKE: do-while — its LOOP notes are sched1 barriers (sched.c:2053-2080): the +6 load stays after d, the +E store before the sign extension (P36 S104 e28)
|
||||
v = *(u16 *)(e + 0x6);
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unk6;
|
||||
z += 0x28;
|
||||
*(u16 *)(e + 0xE) = z;
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = z;
|
||||
} while (0);
|
||||
v -= d;
|
||||
*(u16 *)(e + 0x6) = v;
|
||||
v = *(u16 *)(e + 0xA);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = v;
|
||||
v = ((Unkstruct_800B5CB8 *)e)->unkA;
|
||||
v -= 0x20;
|
||||
*(u16 *)(e + 0xA) = v;
|
||||
((Unkstruct_800B5CB8 *)e)->unkA = v;
|
||||
v = (s16)d;
|
||||
if (v >= 0) {
|
||||
v = v << 7;
|
||||
} else {
|
||||
v = -(v << 7);
|
||||
}
|
||||
*(u16 *)(e + 0x34) = v + 0x1000;
|
||||
*(s32 *)(e + 0x14) = 0xFFFE0000;
|
||||
*(s32 *)(e + 0x18) = 0x30000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = v + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = 0xFFFE0000;
|
||||
CAST_WIDTH(s32, e, 0x18) = 0x30000;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3144,7 +3144,7 @@ void func_8017E734(void* a0)
|
||||
s32 d;
|
||||
|
||||
|
||||
n = *(u8 *)(a0 + 0x70);
|
||||
n = CAST_WIDTH(u8, a0, 0x70);
|
||||
if (n == 0) {
|
||||
goto copy;
|
||||
}
|
||||
@@ -3164,17 +3164,17 @@ void func_8017E734(void* a0)
|
||||
goto body;
|
||||
}
|
||||
copy:
|
||||
*(V4_8017E734 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(V4_8017E734 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
*(V4_8017E734 *)(((Unkstruct_800B5CB8 *)a0)->unk20 + 0x18) =
|
||||
*(V4_8017E734 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
return;
|
||||
body:
|
||||
p = d * D_80185F7A;
|
||||
p = (p + 0x1000) * *(s16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x18);
|
||||
q = *(s32 *)(a0 + 0x20);
|
||||
*(s16 *)(q + 0x1C) = (u32)p >> 12;
|
||||
*(s16 *)(q + 0x1A) = (u32)p >> 12;
|
||||
*(s16 *)(*(s32 *)(a0 + 0x20) + 0x18) =
|
||||
*(u16 *)(*(s32 *)(*(s32 *)(a0 + 0x64) + 0x20) + 0x1C);
|
||||
p = (p + 0x1000) * *(s16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x18);
|
||||
q = ((Unkstruct_800B5CB8 *)a0)->unk20;
|
||||
CAST_WIDTH(s16, q, 0x1C) = (u32)p >> 12;
|
||||
((Unkstruct_800B5CB8 *)q)->unk1A = (u32)p >> 12;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(a0 + 0x20))->unk18 =
|
||||
*(u16 *)(*(s32 *)(((Unkstruct_800B5CB8 *)a0)->unk64 + 0x20) + 0x1C);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -3660,7 +3660,7 @@ void func_8017E4B0(void *a0) {
|
||||
|
||||
|
||||
s32 func_8017E4EC(void *a0, s32 *p) {
|
||||
s32 cur = *(s32 *)((s32)a0 + 0xDC);
|
||||
s32 cur = ((Unkstruct_800B5CB8 *)a0)->unkDC;
|
||||
|
||||
if (p[0] != cur) {
|
||||
p += 2;
|
||||
|
||||
@@ -3961,14 +3961,14 @@ void func_80189000(s32 a0, s32 a1) {
|
||||
do {
|
||||
e = func_80132EF4(a0, 0x23);
|
||||
if (e != 0) {
|
||||
*(s16 *)(e + 0x34) = rand() % 0x4000 + 0x1000;
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2c) = 0xc008;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = rand() % 0x4000 + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(e + 0x20))->unk2C = 0xc008;
|
||||
|
||||
func_8012B0B4(p48, rand() % 0x1000, rand() % 0x58);
|
||||
|
||||
tmp = *(s32 *)buf48;
|
||||
*(s16 *)(e + 6) = *(s16 *)(e + 6) + (s16)tmp;
|
||||
*(s16 *)(e + 0xe) = *(s16 *)(e + 0xe) + (s16)(tmp >> 16);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = CAST_SIGN(s16, e, 6) + (s16)tmp;
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = CAST_SIGN(s16, e, 0xe) + (s16)(tmp >> 16);
|
||||
|
||||
tmp = rand();
|
||||
scratch = tmp % 0x80;
|
||||
@@ -3993,9 +3993,9 @@ void func_80189000(s32 a0, s32 a1) {
|
||||
|
||||
e = func_80132EF4(a0, 0x23);
|
||||
if (e != 0) {
|
||||
*(u16 *)(e + 0x34) = 0x7ff1;
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2c) = 0xc004;
|
||||
*(s32 *)(e + 0x14) = 0xfffb0000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = 0x7ff1;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(e + 0x20))->unk2C = 0xc004;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = 0xfffb0000;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
@@ -5913,13 +5913,13 @@ void func_8018BC40(s32 param_1)
|
||||
|
||||
result = func_80132EF4(param_1, 0x23);
|
||||
if (result != 0) {
|
||||
*(u16 *)(result + 0x6) = *(u16 *)(param_1 + 0xE0);
|
||||
*(u16 *)(result + 0xA) = *(u16 *)(param_1 + 0xE2);
|
||||
((Unkstruct_800B5CB8 *)result)->unk6 = *(u16 *)(param_1 + 0xE0);
|
||||
((Unkstruct_800B5CB8 *)result)->unkA = *(u16 *)(param_1 + 0xE2);
|
||||
val_e4 = *(u16 *)(param_1 + 0xE4);
|
||||
*(u16 *)(result + 0x34) = 0x3001;
|
||||
*(u16 *)(result + 0xE) = val_e4;
|
||||
*(u16 *)(*(s32 *)(result + 0x20) + 0x2C) = 0xC008;
|
||||
*(u32 *)(*(s32 *)(result + 0x20) + 0x4) |= 0x50000000;
|
||||
((Unkstruct_800B5CB8 *)result)->unk34 = 0x3001;
|
||||
((Unkstruct_800B5CB8 *)result)->unkE = val_e4;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(result + 0x20))->unk2C = 0xC008;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)result)->unk20 + 0x4) |= 0x50000000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3795,12 +3795,12 @@ void func_80183598(s32 self)
|
||||
obj = func_80132EF4(self, 0x23);
|
||||
if (obj != 0) {
|
||||
u16 c;
|
||||
*(u16 *)(obj + 0x6) = sv[0];
|
||||
*(u16 *)(obj + 0xA) = sv[1];
|
||||
((Unkstruct_800B5CB8 *)obj)->unk6 = sv[0];
|
||||
((Unkstruct_800B5CB8 *)obj)->unkA = sv[1];
|
||||
c = sv[2];
|
||||
*(u16 *)(obj + 0x34) = 0x4001;
|
||||
*(u16 *)(obj + 0xE) = c;
|
||||
*(u16 *)(*(s32 *)(obj + 0x20) + 0x2C) = 0xC008;
|
||||
((Unkstruct_800B5CB8 *)obj)->unk34 = 0x4001;
|
||||
((Unkstruct_800B5CB8 *)obj)->unkE = c;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(obj + 0x20))->unk2C = 0xC008;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3949,17 +3949,17 @@ s32 func_80183940(s32 a0, s32 a1) {
|
||||
s0 = func_80132EF4(a0, 0x22);
|
||||
if (s0 != 0) {
|
||||
rr = rand();
|
||||
x1 = *(u16 *)(s0 + 0x6);
|
||||
x1 = ((Unkstruct_800B5CB8 *)s0)->unk6;
|
||||
x1 = x1 - 0x10;
|
||||
*(u16 *)(s0 + 0x6) = x1 + (rr & 0x1F);
|
||||
((Unkstruct_800B5CB8 *)s0)->unk6 = x1 + (rr & 0x1F);
|
||||
rr = rand();
|
||||
*(s32 *)(s0 + 0x14) = -0x40000;
|
||||
x2 = *(u16 *)(s0 + 0xE);
|
||||
((Unkstruct_800B5CB8 *)s0)->unk14 = -0x40000;
|
||||
x2 = ((Unkstruct_800B5CB8 *)s0)->unkE;
|
||||
x2 = x2 - 0x10;
|
||||
*(u16 *)(s0 + 0xE) = x2 + (rr & 0x1F);
|
||||
*(s16 *)(s0 + 0x34) = a1;
|
||||
*(u16 *)(*(s32 *)(s0 + 0x20) + 0x2C) = 0xC010;
|
||||
*(u32 *)(*(s32 *)(s0 + 0x20) + 0x4) |= 0x40000000;
|
||||
((Unkstruct_800B5CB8 *)s0)->unkE = x2 + (rr & 0x1F);
|
||||
((Unkstruct_800B5CB8 *)s0)->unk34 = a1;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(s0 + 0x20))->unk2C = 0xC010;
|
||||
*(u32 *)(((Unkstruct_800B5CB8 *)s0)->unk20 + 0x4) |= 0x40000000;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -4559,14 +4559,14 @@ void func_8018956C(s32 a0, s32 a1) {
|
||||
do {
|
||||
e = func_80132EF4(a0, 0x23);
|
||||
if (e != 0) {
|
||||
*(s16 *)(e + 0x34) = rand() % 0x4000 + 0x1000;
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2c) = 0xc008;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = rand() % 0x4000 + 0x1000;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(e + 0x20))->unk2C = 0xc008;
|
||||
|
||||
func_8012B0B4(p48, rand() % 0x1000, rand() % 0x58);
|
||||
|
||||
tmp = *(s32 *)buf48;
|
||||
*(s16 *)(e + 6) = *(s16 *)(e + 6) + (s16)tmp;
|
||||
*(s16 *)(e + 0xe) = *(s16 *)(e + 0xe) + (s16)(tmp >> 16);
|
||||
((Unkstruct_800B5CB8 *)e)->unk6 = CAST_SIGN(s16, e, 6) + (s16)tmp;
|
||||
((Unkstruct_800B5CB8 *)e)->unkE = CAST_SIGN(s16, e, 0xe) + (s16)(tmp >> 16);
|
||||
|
||||
tmp = rand();
|
||||
scratch = tmp % 0x80;
|
||||
@@ -4591,9 +4591,9 @@ void func_8018956C(s32 a0, s32 a1) {
|
||||
|
||||
e = func_80132EF4(a0, 0x23);
|
||||
if (e != 0) {
|
||||
*(u16 *)(e + 0x34) = 0x7ff1;
|
||||
*(u16 *)(*(s32 *)(e + 0x20) + 0x2c) = 0xc004;
|
||||
*(s32 *)(e + 0x14) = 0xfffb0000;
|
||||
((Unkstruct_800B5CB8 *)e)->unk34 = 0x7ff1;
|
||||
((Unkstruct_800B5CB8 *)*(s32 *)(e + 0x20))->unk2C = 0xc004;
|
||||
((Unkstruct_800B5CB8 *)e)->unk14 = 0xfffb0000;
|
||||
}
|
||||
|
||||
i = 0;
|
||||
|
||||
@@ -3896,25 +3896,25 @@ void func_8017F3D4(s32 arg0, s32 arg1) {
|
||||
extern u16 D_8018E33C;
|
||||
extern void func_8017D8A4(s32 a0, void *a1, void *a2, s32 a3, s32 a4);
|
||||
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)),
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90),
|
||||
(u8 *)&D_8018E33C, (u8 *)&D_8018E33C + 0x120, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0xCC,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0xCC,
|
||||
(u8 *)&D_8018E33C + 0x60, (u8 *)&D_8018E33C + 0xCC, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x3C,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x3C,
|
||||
(u8 *)&D_8018E33C - 0xC0, (u8 *)&D_8018E33C - 0x90, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x48,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x48,
|
||||
(u8 *)&D_8018E33C - 0xB4, (u8 *)&D_8018E33C - 0x84, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x54,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x54,
|
||||
(u8 *)&D_8018E33C - 0xA8, (u8 *)&D_8018E33C - 0x78, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x60,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x60,
|
||||
(u8 *)&D_8018E33C - 0x9C, (u8 *)&D_8018E33C - 0x6C, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x90,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x90,
|
||||
(u8 *)&D_8018E33C - 0x60, (u8 *)&D_8018E33C - 0x30, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0x9C,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0x9C,
|
||||
(u8 *)&D_8018E33C - 0x54, (u8 *)&D_8018E33C - 0x24, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0xA8,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0xA8,
|
||||
(u8 *)&D_8018E33C - 0x48, (u8 *)&D_8018E33C - 0x18, arg1, 1);
|
||||
func_8017D8A4(*(s32 *)(*(s32 *)(arg0 + 0x94) * 8 + *(s32 *)(arg0 + 0x90)) + 0xB4,
|
||||
func_8017D8A4(*(s32 *)(((Unkstruct_800B5CB8 *)arg0)->unk94 * 8 + ((Unkstruct_800B5CB8 *)arg0)->unk90) + 0xB4,
|
||||
(u8 *)&D_8018E33C - 0x3C, (u8 *)&D_8018E33C - 0xC, arg1, 1);
|
||||
}
|
||||
|
||||
@@ -4560,17 +4560,17 @@ void func_80182000(s32 a0, s32 a1)
|
||||
{
|
||||
func_8017D8A4(*(s32 *)&D_801BFCCC, D_8018E3A8, &D_8018E3A8[0xB4], a1, 1);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x18, &D_8018E3A8[0x18], &D_8018E3A8[0xC0], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100));
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x24, &D_8018E3A8[0x24], &D_8018E3A8[0xCC], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100));
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x30, &D_8018E3A8[0x30], &D_8018E3A8[0xD8], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100));
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x60, &D_8018E3A8[0x3C], &D_8018E3A8[0xE4], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100) + 0x200);
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100 + 0x200);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x6C, &D_8018E3A8[0x48], &D_8018E3A8[0xF0], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100) + 0x200);
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100 + 0x200);
|
||||
func_8017DA30(*(s32 *)&D_801BFCCC + 0x78, &D_8018E3A8[0x54], &D_8018E3A8[0xFC], a1, 1,
|
||||
*(short *)((char *)a0 + 0x100) + 0x200);
|
||||
((Unkstruct_800B5CB8 *)a0)->unk100 + 0x200);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user