From 9fc71545a0aec7c1de87809ee75f87294bb0dfd6 Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Wed, 25 Dec 2019 20:01:00 +1000 Subject: [PATCH] Rename positions to props --- src/files/setup/setupcave.c | 2 +- src/files/setup/setuppete.c | 4 +- src/files/setup/setuprit.c | 2 +- src/game/chr/chr.c | 356 +++++++++---------- src/game/chr/chrai.c | 10 +- src/game/chr/chraicommands.c | 508 +++++++++++++-------------- src/game/game_0601b0.c | 12 +- src/game/game_066310.c | 52 +-- src/game/game_097a50.c | 2 +- src/game/game_0b28d0.c | 20 +- src/game/game_0c37d0.c | 2 +- src/game/game_0c79f0.c | 4 +- src/game/game_0cf150.c | 2 +- src/game/game_11ecf0.c | 2 +- src/game/game_129900.c | 4 +- src/game/game_1668e0.c | 4 +- src/game/game_187770.c | 40 +-- src/game/game_197600.c | 16 +- src/game/game_1999b0.c | 6 +- src/include/commands.h | 14 +- src/include/constants.h | 12 +- src/include/game/chr/chr.h | 14 +- src/include/game/chr/chraicommands.h | 2 +- src/include/game/game_0601b0.h | 12 +- src/include/game/game_066310.h | 24 +- src/include/game/game_0c79f0.h | 2 +- src/include/game/game_111600.h | 2 +- src/include/game/game_11ecf0.h | 2 +- src/include/game/game_129900.h | 6 +- src/include/gvars/gvars.h | 2 +- src/include/types.h | 20 +- src/setup/ailists.c | 4 +- 32 files changed, 582 insertions(+), 582 deletions(-) diff --git a/src/files/setup/setupcave.c b/src/files/setup/setupcave.c index 8003cfb3a..85dd2c680 100644 --- a/src/files/setup/setupcave.c +++ b/src/files/setup/setupcave.c @@ -3636,7 +3636,7 @@ u8 func1003_intro[] = { set_cutscene_weapon(CHR_BOND, WEAPON_NONE, WEAPON_NONE) wait_until(30, 0x6d) - speak(CHR_BOND, 0x0e37, 0x7447, CHANNEL_7, COLOR_09_BLUE) // "Agent Dark in position. I can see the main entranc..." + speak(CHR_BOND, 0x0e37, 0x7447, CHANNEL_7, COLOR_09_BLUE) // "Agent Dark in prop. I can see the main entranc..." wait_until(312, 0x89) play_sound(0x0594, CHANNEL_10) diff --git a/src/files/setup/setuppete.c b/src/files/setup/setuppete.c index d496bb90d..28cec5a5f 100644 --- a/src/files/setup/setuppete.c +++ b/src/files/setup/setuppete.c @@ -2767,7 +2767,7 @@ u8 func040b_outro[] = { endlist }; -u8 func1012_update_robot_position_flags[] = { +u8 func1012_update_robot_prop_flags[] = { // pad 0x00d4 = corner // pad 0x00d9 = next to limo @@ -3297,7 +3297,7 @@ struct ailist ailists[] = { { func100f_check_mine, 0x100f }, { func1010_elevator_switch, 0x1010 }, { func1011_trackerbug_coop, 0x1011 }, - { func1012_update_robot_position_flags, 0x1012 }, + { func1012_update_robot_prop_flags, 0x1012 }, { func1014_crash, 0x1014 }, { func040a_intro_sfx, 0x1415 }, { func1416_setup_rain, 0x1416 }, diff --git a/src/files/setup/setuprit.c b/src/files/setup/setuprit.c index 0b3bb8165..861682a4d 100644 --- a/src/files/setup/setuprit.c +++ b/src/files/setup/setuprit.c @@ -1550,7 +1550,7 @@ u8 func0404_president_running[] = { say_quip(CHR_BOND, 0x21, 0xff, 0x02, 0xff, BANK_1, 0x00, 0x00) goto_first(0x58) - // Stopped because president is close to player's sampled position + // Stopped because president is close to player's sampled prop label(0x5b) goto_first(0x55) diff --git a/src/game/chr/chr.c b/src/game/chr/chr.c index 5b34be99b..fa414942e 100644 --- a/src/game/chr/chr.c +++ b/src/game/chr/chr.c @@ -2978,7 +2978,7 @@ glabel func0f01f264 /* f01fe58: c7a400f8 */ lwc1 $f4,0xf8($sp) /* f01fe5c: 55810012 */ bnel $t4,$at,.L0f01fea8 /* f01fe60: c6280004 */ lwc1 $f8,0x4($s1) -/* f01fe64: 0fc4a25f */ jal posGetPlayerNum +/* f01fe64: 0fc4a25f */ jal propGetPlayerNum /* f01fe68: 01c02025 */ or $a0,$t6,$zero /* f01fe6c: 3c08800a */ lui $t0,%hi(g_Vars) /* f01fe70: 25089fc0 */ addiu $t0,$t0,%lo(g_Vars) @@ -4201,7 +4201,7 @@ glabel func0f020f90 /* f020fec: 25290001 */ addiu $t1,$t1,0x1 /* f020ff0: 8465012a */ lh $a1,0x12a($v1) /* f020ff4: afa9002c */ sw $t1,0x2c($sp) -/* f020ff8: 0fc12705 */ jal positionGetIndexByChrId +/* f020ff8: 0fc12705 */ jal propGetIndexByChrId /* f020ffc: afa70024 */ sw $a3,0x24($sp) /* f021000: 3c068006 */ lui $a2,%hi(g_Chrs) /* f021004: 24c62988 */ addiu $a2,$a2,%lo(g_Chrs) @@ -4846,7 +4846,7 @@ glabel func0f02143c /* f0218ec: afa90144 */ sw $t1,0x144($sp) /* f0218f0: afaa0148 */ sw $t2,0x148($sp) /* f0218f4: e7ac00a0 */ swc1 $f12,0xa0($sp) -/* f0218f8: 0fc4a25f */ jal posGetPlayerNum +/* f0218f8: 0fc4a25f */ jal propGetPlayerNum /* f0218fc: e7ae00a4 */ swc1 $f14,0xa4($sp) /* f021900: 00027880 */ sll $t7,$v0,0x2 /* f021904: 3c18800a */ lui $t8,0x800a @@ -5387,14 +5387,14 @@ glabel func0f021fa8 void func0f022084(struct chrdata *chr, s16 *room) { - func0f021fa8(chr, &chr->pos->coord, room); + func0f021fa8(chr, &chr->prop->coord, room); } void func0f0220ac(struct chrdata *chr) { - func0f065c44(chr->pos); - func0f022084(chr, &chr->pos->room); - func0f065cb0(chr->pos); + func0f065c44(chr->prop); + func0f022084(chr, &chr->prop->room); + func0f065cb0(chr->prop); } GLOBAL_ASM( @@ -5961,7 +5961,7 @@ glabel func0f022624 /* f0228e0: 55e1004c */ bnel $t7,$at,.L0f022a14 /* f0228e4: 8e090014 */ lw $t1,0x14($s0) /* f0228e8: 8f18a24c */ lw $t8,-0x5db4($t8) -/* f0228ec: 0fc4a25f */ jal posGetPlayerNum +/* f0228ec: 0fc4a25f */ jal propGetPlayerNum /* f0228f0: afb80024 */ sw $t8,0x24($sp) /* f0228f4: 0fc4a24b */ jal setCurrentPlayerNum /* f0228f8: 00402025 */ or $a0,$v0,$zero @@ -6255,7 +6255,7 @@ glabel func0f022cc8 /* f022cf8: 15c10006 */ bne $t6,$at,.L0f022d14 /* f022cfc: 00000000 */ sll $zero,$zero,0x0 /* f022d00: afa5001c */ sw $a1,0x1c($sp) -/* f022d04: 0fc4a25f */ jal posGetPlayerNum +/* f022d04: 0fc4a25f */ jal propGetPlayerNum /* f022d08: afa60018 */ sw $a2,0x18($sp) /* f022d0c: 8fa5001c */ lw $a1,0x1c($sp) /* f022d10: 8fa60018 */ lw $a2,0x18($sp) @@ -6339,7 +6339,7 @@ glabel func0f022d60 /* f022e18: 90990000 */ lbu $t9,0x0($a0) /* f022e1c: 1721001f */ bne $t9,$at,.L0f022e9c /* f022e20: 00000000 */ sll $zero,$zero,0x0 -/* f022e24: 0fc4a25f */ jal posGetPlayerNum +/* f022e24: 0fc4a25f */ jal propGetPlayerNum /* f022e28: 00000000 */ sll $zero,$zero,0x0 /* f022e2c: 3c03800a */ lui $v1,%hi(g_Vars) /* f022e30: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) @@ -6829,7 +6829,7 @@ glabel func0f023098 /* f023500: 24010006 */ addiu $at,$zero,0x6 /* f023504: 55a10068 */ bnel $t5,$at,.L0f0236a8 /* f023508: 82030007 */ lb $v1,0x7($s0) -/* f02350c: 0fc4a25f */ jal posGetPlayerNum +/* f02350c: 0fc4a25f */ jal propGetPlayerNum /* f023510: 01802025 */ or $a0,$t4,$zero /* f023514: 0002c080 */ sll $t8,$v0,0x2 /* f023518: 3c03800a */ lui $v1,0x800a @@ -7192,7 +7192,7 @@ glabel func0f023098 /* f023a3c: 8d8ca2d4 */ lw $t4,-0x5d2c($t4) /* f023a40: 55800012 */ bnezl $t4,.L0f023a8c /* f023a44: 8fb90208 */ lw $t9,0x208($sp) -/* f023a48: 0fc4a25f */ jal posGetPlayerNum +/* f023a48: 0fc4a25f */ jal propGetPlayerNum /* f023a4c: 01602025 */ or $a0,$t3,$zero /* f023a50: 0002c080 */ sll $t8,$v0,0x2 /* f023a54: 3c03800a */ lui $v1,0x800a @@ -7477,7 +7477,7 @@ glabel func0f023098 /* f023e54: 91f90000 */ lbu $t9,0x0($t7) /* f023e58: 17210043 */ bne $t9,$at,.L0f023f68 /* f023e5c: 00000000 */ sll $zero,$zero,0x0 -/* f023e60: 0fc4a25f */ jal posGetPlayerNum +/* f023e60: 0fc4a25f */ jal propGetPlayerNum /* f023e64: 01e02025 */ or $a0,$t7,$zero /* f023e68: 00024080 */ sll $t0,$v0,0x2 /* f023e6c: 3c03800a */ lui $v1,0x800a @@ -11910,7 +11910,7 @@ glabel func0f027994 /* f027db4: 8fbf0054 */ lw $ra,0x54($sp) /* f027db8: 51400011 */ beqzl $t2,.L0f027e00 /* f027dbc: 8fbf0054 */ lw $ra,0x54($sp) -/* f027dc0: 0fc0a221 */ jal chrGetTargetPosition +/* f027dc0: 0fc0a221 */ jal chrGetTargetProp /* f027dc4: 8fa400cc */ lw $a0,0xcc($sp) /* f027dc8: 3c09800a */ lui $t1,0x800a /* f027dcc: 8d29a244 */ lw $t1,-0x5dbc($t1) @@ -12504,7 +12504,7 @@ glabel func0f028590 /* f028640: 24010003 */ addiu $at,$zero,0x3 /* f028644: 57010034 */ bnel $t8,$at,.L0f028718 /* f028648: 8fcf0000 */ lw $t7,0x0($s8) -/* f02864c: 0fc0a221 */ jal chrGetTargetPosition +/* f02864c: 0fc0a221 */ jal chrGetTargetProp /* f028650: 02a22021 */ addu $a0,$s5,$v0 /* f028654: 3c19800a */ lui $t9,0x800a /* f028658: 8f39a244 */ lw $t9,-0x5dbc($t9) @@ -12660,14 +12660,14 @@ struct attachment *chrGetEquippedWeaponAttachmentWithCheck(struct chrdata *chr, return attachment; } -struct position *chrGetTargetPosition(struct chrdata *chr) +struct prop *chrGetTargetProp(struct chrdata *chr) { - struct position *ret; + struct prop *ret; if (chr->target == -1) { - ret = g_Vars.players[chr->p1p2]->targetpos; + ret = g_Vars.players[chr->p1p2]->prop; } else { - ret = g_Vars.positions + chr->target; + ret = g_Vars.props + chr->target; } return ret; @@ -12849,7 +12849,7 @@ glabel func0f028a50 /* f028b30: 24c69fc0 */ addiu $a2,$a2,%lo(g_Vars) /* f028b34: afa40030 */ sw $a0,0x30($sp) /* f028b38: afa50034 */ sw $a1,0x34($sp) -/* f028b3c: 0fc4a25f */ jal posGetPlayerNum +/* f028b3c: 0fc4a25f */ jal propGetPlayerNum /* f028b40: afa8002c */ sw $t0,0x2c($sp) /* f028b44: 3c06800a */ lui $a2,%hi(g_Vars) /* f028b48: 24c69fc0 */ addiu $a2,$a2,%lo(g_Vars) @@ -20175,7 +20175,7 @@ glabel func0f02f530 /* f02f530: 27bdffe0 */ addiu $sp,$sp,-32 /* f02f534: afbf001c */ sw $ra,0x1c($sp) /* f02f538: afb00018 */ sw $s0,0x18($sp) -/* f02f53c: 0fc0a221 */ jal chrGetTargetPosition +/* f02f53c: 0fc0a221 */ jal chrGetTargetProp /* f02f540: 00808025 */ or $s0,$a0,$zero /* f02f544: 02002025 */ or $a0,$s0,$zero /* f02f548: 0fc122a1 */ jal func0f048a84 @@ -20877,7 +20877,7 @@ glabel func0f02fe18 ); GLOBAL_ASM( -glabel chrRunToPos +glabel chrRunToProp /* f030078: 27bdffe0 */ addiu $sp,$sp,-32 /* f03007c: afbf001c */ sw $ra,0x1c($sp) /* f030080: afb00018 */ sw $s0,0x18($sp) @@ -24862,7 +24862,7 @@ glabel func0f0338e0 /* f033930: 5721000f */ bnel $t9,$at,.L0f033970 /* f033934: 8fab0118 */ lw $t3,0x118($sp) /* f033938: afa3010c */ sw $v1,0x10c($sp) -/* f03393c: 0fc4a25f */ jal posGetPlayerNum +/* f03393c: 0fc4a25f */ jal propGetPlayerNum /* f033940: afa00104 */ sw $zero,0x104($sp) /* f033944: 00024080 */ sll $t0,$v0,0x2 /* f033948: 3c09800a */ lui $t1,0x800a @@ -25333,7 +25333,7 @@ glabel func0f033fa8 /* f034008: 00a02025 */ or $a0,$a1,$zero /* f03400c: 57010019 */ bnel $t8,$at,.L0f034074 /* f034010: 8fbf0014 */ lw $ra,0x14($sp) -/* f034014: 0fc4a25f */ jal posGetPlayerNum +/* f034014: 0fc4a25f */ jal propGetPlayerNum /* f034018: e7ac0024 */ swc1 $f12,0x24($sp) /* f03401c: c7ac0024 */ lwc1 $f12,0x24($sp) /* f034020: 04400013 */ bltz $v0,.L0f034070 @@ -25660,7 +25660,7 @@ glabel func0f034480 /* f034494: 24010006 */ addiu $at,$zero,0x6 /* f034498: 15c1000d */ bne $t6,$at,.L0f0344d0 /* f03449c: 00000000 */ sll $zero,$zero,0x0 -/* f0344a0: 0fc4a25f */ jal posGetPlayerNum +/* f0344a0: 0fc4a25f */ jal propGetPlayerNum /* f0344a4: afa5001c */ sw $a1,0x1c($sp) /* f0344a8: 04400009 */ bltz $v0,.L0f0344d0 /* f0344ac: 8fa5001c */ lw $a1,0x1c($sp) @@ -25679,7 +25679,7 @@ glabel func0f034480 /* f0344dc: 24010006 */ addiu $at,$zero,0x6 /* f0344e0: 5721000d */ bnel $t9,$at,.L0f034518 /* f0344e4: 8fbf0014 */ lw $ra,0x14($sp) -/* f0344e8: 0fc4a25f */ jal posGetPlayerNum +/* f0344e8: 0fc4a25f */ jal propGetPlayerNum /* f0344ec: 00a02025 */ or $a0,$a1,$zero /* f0344f0: 04400008 */ bltz $v0,.L0f034514 /* f0344f4: 000241c0 */ sll $t0,$v0,0x7 @@ -25924,7 +25924,7 @@ glabel func0f034524 /* f034854: 24010003 */ addiu $at,$zero,0x3 /* f034858: 5541000c */ bnel $t2,$at,.L0f03488c /* f03485c: 8fa4014c */ lw $a0,0x14c($sp) -/* f034860: 0fc0a221 */ jal chrGetTargetPosition +/* f034860: 0fc0a221 */ jal chrGetTargetProp /* f034864: 8e240004 */ lw $a0,0x4($s1) /* f034868: 8e0b001c */ lw $t3,0x1c($s0) /* f03486c: 544b0007 */ bnel $v0,$t3,.L0f03488c @@ -26020,7 +26020,7 @@ glabel func0f034524 .L0f0349b4: /* f0349b4: 546100d2 */ bnel $v1,$at,.L0f034d00 /* f0349b8: 24010006 */ addiu $at,$zero,0x6 -/* f0349bc: 0fc4a25f */ jal posGetPlayerNum +/* f0349bc: 0fc4a25f */ jal propGetPlayerNum /* f0349c0: 00a02025 */ or $a0,$a1,$zero /* f0349c4: 00027080 */ sll $t6,$v0,0x2 /* f0349c8: 3c18800a */ lui $t8,0x800a @@ -26028,7 +26028,7 @@ glabel func0f034524 /* f0349d0: 8f18a024 */ lw $t8,-0x5fdc($t8) /* f0349d4: 8fa40128 */ lw $a0,0x128($sp) /* f0349d8: c712199c */ lwc1 $f18,0x199c($t8) -/* f0349dc: 0fc4a25f */ jal posGetPlayerNum +/* f0349dc: 0fc4a25f */ jal propGetPlayerNum /* f0349e0: e7b2010c */ swc1 $f18,0x10c($sp) /* f0349e4: 00027880 */ sll $t7,$v0,0x2 /* f0349e8: 3c19800a */ lui $t9,0x800a @@ -26102,7 +26102,7 @@ glabel func0f034524 .L0f034ae4: /* f034ae4: 54610086 */ bnel $v1,$at,.L0f034d00 /* f034ae8: 24010006 */ addiu $at,$zero,0x6 -/* f034aec: 0fc4a25f */ jal posGetPlayerNum +/* f034aec: 0fc4a25f */ jal propGetPlayerNum /* f034af0: 00a02025 */ or $a0,$a1,$zero /* f034af4: 0002c080 */ sll $t8,$v0,0x2 /* f034af8: 3c0f800a */ lui $t7,0x800a @@ -26110,7 +26110,7 @@ glabel func0f034524 /* f034b00: 8defa024 */ lw $t7,-0x5fdc($t7) /* f034b04: 8fa40128 */ lw $a0,0x128($sp) /* f034b08: c5e4199c */ lwc1 $f4,0x199c($t7) -/* f034b0c: 0fc4a25f */ jal posGetPlayerNum +/* f034b0c: 0fc4a25f */ jal propGetPlayerNum /* f034b10: e7a4010c */ swc1 $f4,0x10c($sp) /* f034b14: 0002c880 */ sll $t9,$v0,0x2 /* f034b18: 3c08800a */ lui $t0,0x800a @@ -26184,7 +26184,7 @@ glabel func0f034524 .L0f034c18: /* f034c18: 14a20012 */ bne $a1,$v0,.L0f034c64 /* f034c1c: 00000000 */ sll $zero,$zero,0x0 -/* f034c20: 0fc4a25f */ jal posGetPlayerNum +/* f034c20: 0fc4a25f */ jal propGetPlayerNum /* f034c24: 00a02025 */ or $a0,$a1,$zero /* f034c28: 0002c880 */ sll $t9,$v0,0x2 /* f034c2c: 3c08800a */ lui $t0,0x800a @@ -26192,7 +26192,7 @@ glabel func0f034524 /* f034c34: 8d08a024 */ lw $t0,-0x5fdc($t0) /* f034c38: 8fa40128 */ lw $a0,0x128($sp) /* f034c3c: c506199c */ lwc1 $f6,0x199c($t0) -/* f034c40: 0fc4a25f */ jal posGetPlayerNum +/* f034c40: 0fc4a25f */ jal propGetPlayerNum /* f034c44: e7a6010c */ swc1 $f6,0x10c($sp) /* f034c48: 00024880 */ sll $t1,$v0,0x2 /* f034c4c: 3c0a800a */ lui $t2,0x800a @@ -26228,7 +26228,7 @@ glabel func0f034524 /* f034cbc: 24010006 */ addiu $at,$zero,0x6 /* f034cc0: 8f18a24c */ lw $t8,-0x5db4($t8) /* f034cc4: 00a02025 */ or $a0,$a1,$zero -/* f034cc8: 0fc4a25f */ jal posGetPlayerNum +/* f034cc8: 0fc4a25f */ jal propGetPlayerNum /* f034ccc: afb800e8 */ sw $t8,0xe8($sp) /* f034cd0: 0fc4a24b */ jal setCurrentPlayerNum /* f034cd4: 00402025 */ or $a0,$v0,$zero @@ -26248,7 +26248,7 @@ glabel func0f034524 /* f034d04: 3c08800a */ lui $t0,0x800a /* f034d08: 8d08a24c */ lw $t0,-0x5db4($t0) /* f034d0c: 00a02025 */ or $a0,$a1,$zero -/* f034d10: 0fc4a25f */ jal posGetPlayerNum +/* f034d10: 0fc4a25f */ jal propGetPlayerNum /* f034d14: afa800e4 */ sw $t0,0xe4($sp) /* f034d18: 0fc4a24b */ jal setCurrentPlayerNum /* f034d1c: 00402025 */ or $a0,$v0,$zero @@ -26302,7 +26302,7 @@ glabel func0f034524 /* f034dc8: 24010006 */ addiu $at,$zero,0x6 /* f034dcc: 15410005 */ bne $t2,$at,.L0f034de4 /* f034dd0: 00000000 */ sll $zero,$zero,0x0 -/* f034dd4: 0fc4a25f */ jal posGetPlayerNum +/* f034dd4: 0fc4a25f */ jal propGetPlayerNum /* f034dd8: 02202025 */ or $a0,$s1,$zero /* f034ddc: afa200f0 */ sw $v0,0xf0($sp) /* f034de0: 8fa50128 */ lw $a1,0x128($sp) @@ -26614,7 +26614,7 @@ glabel func0f034524 /* f03525c: 8dcea24c */ lw $t6,-0x5db4($t6) /* f035260: afa000bc */ sw $zero,0xbc($sp) /* f035264: 02202025 */ or $a0,$s1,$zero -/* f035268: 0fc4a25f */ jal posGetPlayerNum +/* f035268: 0fc4a25f */ jal propGetPlayerNum /* f03526c: afae00b8 */ sw $t6,0xb8($sp) /* f035270: 0fc4a24b */ jal setCurrentPlayerNum /* f035274: 00402025 */ or $a0,$v0,$zero @@ -26632,7 +26632,7 @@ glabel func0f034524 /* f0352a0: 930f0000 */ lbu $t7,0x0($t8) /* f0352a4: 55e1000d */ bnel $t7,$at,.L0f0352dc /* f0352a8: 8fab00bc */ lw $t3,0xbc($sp) -/* f0352ac: 0fc4a25f */ jal posGetPlayerNum +/* f0352ac: 0fc4a25f */ jal propGetPlayerNum /* f0352b0: 03002025 */ or $a0,$t8,$zero /* f0352b4: 0002c880 */ sll $t9,$v0,0x2 /* f0352b8: 3c08800a */ lui $t0,0x800a @@ -26967,7 +26967,7 @@ glabel func0f034524 /* f035758: 82020007 */ lb $v0,0x7($s0) /* f03575c: 8f18a24c */ lw $t8,-0x5db4($t8) /* f035760: 01a02025 */ or $a0,$t5,$zero -/* f035764: 0fc4a25f */ jal posGetPlayerNum +/* f035764: 0fc4a25f */ jal propGetPlayerNum /* f035768: afb80094 */ sw $t8,0x94($sp) /* f03576c: 0fc4a24b */ jal setCurrentPlayerNum /* f035770: 00402025 */ or $a0,$v0,$zero @@ -27573,7 +27573,7 @@ glabel func0f034524 /* f035ffc: 8e0a0018 */ lw $t2,0x18($s0) /* f036000: 8d08a24c */ lw $t0,-0x5db4($t0) /* f036004: 02202025 */ or $a0,$s1,$zero -/* f036008: 0fc4a25f */ jal posGetPlayerNum +/* f036008: 0fc4a25f */ jal propGetPlayerNum /* f03600c: afa80074 */ sw $t0,0x74($sp) /* f036010: 0fc4a24b */ jal setCurrentPlayerNum /* f036014: 00402025 */ or $a0,$v0,$zero @@ -28215,7 +28215,7 @@ glabel func0f0369cc /* f0369d4: afa5002c */ sw $a1,0x2c($sp) /* f0369d8: 8c83001c */ lw $v1,0x1c($a0) /* f0369dc: afa60030 */ sw $a2,0x30($sp) -/* f0369e0: 0fc0a221 */ jal chrGetTargetPosition +/* f0369e0: 0fc0a221 */ jal chrGetTargetProp /* f0369e4: afa30024 */ sw $v1,0x24($sp) /* f0369e8: 8fa60030 */ lw $a2,0x30($sp) /* f0369ec: 44808000 */ mtc1 $zero,$f16 @@ -30941,7 +30941,7 @@ glabel func0f038f40 /* f038ffc: 304b0200 */ andi $t3,$v0,0x200 /* f039000: 11600046 */ beqz $t3,.L0f03911c /* f039004: 304e0004 */ andi $t6,$v0,0x4 -/* f039008: 0fc0a221 */ jal chrGetTargetPosition +/* f039008: 0fc0a221 */ jal chrGetTargetProp /* f03900c: 8fa40078 */ lw $a0,0x78($sp) /* f039010: 904c0000 */ lbu $t4,0x0($v0) /* f039014: 24010006 */ addiu $at,$zero,0x6 @@ -31187,8 +31187,8 @@ glabel func0f03922c u32 func0f039368(struct chrdata *chr) { u32 result; - struct position *pos = chrGetTargetPosition(chr); - result = func0f03922c(chr, pos->chr, 0); + struct prop *prop = chrGetTargetProp(chr); + result = func0f03922c(chr, prop->chr, 0); if (result) { chrRecordLastVisibleTargetTime(chr); @@ -31481,7 +31481,7 @@ glabel func0f03978c /* f039790: afbf0014 */ sw $ra,0x14($sp) /* f039794: 8c83001c */ lw $v1,0x1c($a0) /* f039798: afa40050 */ sw $a0,0x50($sp) -/* f03979c: 0fc0a221 */ jal chrGetTargetPosition +/* f03979c: 0fc0a221 */ jal chrGetTargetProp /* f0397a0: afa3004c */ sw $v1,0x4c($sp) /* f0397a4: 8fa40050 */ lw $a0,0x50($sp) /* f0397a8: 0fc0f917 */ jal func0f03e45c @@ -31695,8 +31695,8 @@ bool chrIsDead(struct chrdata *chr) return true; } - if (chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(chr->pos); + if (chr->prop && chr->prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(chr->prop); if (g_Vars.players[playernum]->isdead) { return true; @@ -31729,7 +31729,7 @@ glabel chrTrySidestep /* f039b5c: 00001025 */ or $v0,$zero,$zero /* f039b60: 8e0e001c */ lw $t6,0x1c($s0) /* f039b64: 02002025 */ or $a0,$s0,$zero -/* f039b68: 0fc0a221 */ jal chrGetTargetPosition +/* f039b68: 0fc0a221 */ jal chrGetTargetProp /* f039b6c: afae0048 */ sw $t6,0x48($sp) /* f039b70: 02002025 */ or $a0,$s0,$zero /* f039b74: 0fc0f917 */ jal func0f03e45c @@ -31836,7 +31836,7 @@ glabel chrTryJumpOut /* f039cdc: 00001025 */ or $v0,$zero,$zero /* f039ce0: 8e0e001c */ lw $t6,0x1c($s0) /* f039ce4: 02002025 */ or $a0,$s0,$zero -/* f039ce8: 0fc0a221 */ jal chrGetTargetPosition +/* f039ce8: 0fc0a221 */ jal chrGetTargetProp /* f039cec: afae0044 */ sw $t6,0x44($sp) /* f039cf0: 02002025 */ or $a0,$s0,$zero /* f039cf4: 0fc0f917 */ jal func0f03e45c @@ -31998,7 +31998,7 @@ glabel func0f039e28 /* f039f30: 10400006 */ beqz $v0,.L0f039f4c /* f039f34: c7b00030 */ lwc1 $f16,0x30($sp) /* f039f38: 02202025 */ or $a0,$s1,$zero -/* f039f3c: 0fc0c01e */ jal chrRunToPos +/* f039f3c: 0fc0c01e */ jal chrRunToProp /* f039f40: 27a50024 */ addiu $a1,$sp,0x24 /* f039f44: 1000001c */ beqz $zero,.L0f039fb8 /* f039f48: 24020001 */ addiu $v0,$zero,0x1 @@ -32025,7 +32025,7 @@ glabel func0f039e28 /* f039f98: e7a4002c */ swc1 $f4,0x2c($sp) /* f039f9c: 10400005 */ beqz $v0,.L0f039fb4 /* f039fa0: 02202025 */ or $a0,$s1,$zero -/* f039fa4: 0fc0c01e */ jal chrRunToPos +/* f039fa4: 0fc0c01e */ jal chrRunToProp /* f039fa8: 27a50024 */ addiu $a1,$sp,0x24 /* f039fac: 10000002 */ beqz $zero,.L0f039fb8 /* f039fb0: 24020001 */ addiu $v0,$zero,0x1 @@ -32096,7 +32096,7 @@ glabel chrTryAttackWalk /* f03a088: 29010079 */ slti $at,$t0,0x79 /* f03a08c: 54200020 */ bnezl $at,.L0f03a110 /* f03a090: 00001025 */ or $v0,$zero,$zero -/* f03a094: 0fc0a221 */ jal chrGetTargetPosition +/* f03a094: 0fc0a221 */ jal chrGetTargetProp /* f03a098: afa30020 */ sw $v1,0x20($sp) /* f03a09c: 8fa30020 */ lw $v1,0x20($sp) /* f03a0a0: 8fa90024 */ lw $t1,0x24($sp) @@ -32193,7 +32193,7 @@ glabel chrTryAttackRun /* f03a1e0: 290100b5 */ slti $at,$t0,0xb5 /* f03a1e4: 54200020 */ bnezl $at,.L0f03a268 /* f03a1e8: 00001025 */ or $v0,$zero,$zero -/* f03a1ec: 0fc0a221 */ jal chrGetTargetPosition +/* f03a1ec: 0fc0a221 */ jal chrGetTargetProp /* f03a1f0: afa30020 */ sw $v1,0x20($sp) /* f03a1f4: 8fa30020 */ lw $v1,0x20($sp) /* f03a1f8: 8fa90024 */ lw $t1,0x24($sp) @@ -32274,7 +32274,7 @@ glabel chrTryAttackRoll /* f03a304: 8fa30044 */ lw $v1,0x44($sp) .L0f03a308: /* f03a308: 02002025 */ or $a0,$s0,$zero -/* f03a30c: 0fc0a221 */ jal chrGetTargetPosition +/* f03a30c: 0fc0a221 */ jal chrGetTargetProp /* f03a310: afa30044 */ sw $v1,0x44($sp) /* f03a314: 8fa30044 */ lw $v1,0x44($sp) /* f03a318: c4440008 */ lwc1 $f4,0x8($v0) @@ -32648,9 +32648,9 @@ bool chrGoToTarget(struct chrdata *chr, u32 speed) if (var80062cbc <= 8 || (chr->hidden & CHRHFLAG_00400000) == 0 || (chr->flags & CHRFLAG0_CAN_RUN_FOR_ALARM)) { - struct position *pos = chrGetTargetPosition(chr); + struct prop *prop = chrGetTargetProp(chr); - if (func0f03843c(chr, &pos->coord, &pos->room, speed)) { + if (func0f03843c(chr, &prop->coord, &prop->room, speed)) { return true; } } @@ -32667,7 +32667,7 @@ bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed) (chr->flags & CHRFLAG0_CAN_RUN_FOR_ALARM)) { struct chrdata *dstchr = chrFindById(chr, dst_chrnum); - if (dstchr && dstchr->pos && func0f03843c(chr, &dstchr->pos->coord, &dstchr->pos->room, speed)) { + if (dstchr && dstchr->prop && func0f03843c(chr, &dstchr->prop->coord, &dstchr->prop->room, speed)) { return true; } } @@ -32676,10 +32676,10 @@ bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed) return false; } -bool func0f03ab74(struct chrdata *chr, struct position *pos, s32 arg2) +bool func0f03ab74(struct chrdata *chr, struct prop *prop, s32 arg2) { - if (func0f039a18(chr) && pos) { - if (func0f03843c(chr, &pos->coord, &pos->room, arg2)) { + if (func0f039a18(chr) && prop) { + if (func0f03843c(chr, &prop->coord, &prop->room, arg2)) { return true; } } @@ -32897,7 +32897,7 @@ glabel func0f03afac /* f03afac: 27bdff78 */ addiu $sp,$sp,-136 /* f03afb0: afbf002c */ sw $ra,0x2c($sp) /* f03afb4: afb00028 */ sw $s0,0x28($sp) -/* f03afb8: 0fc0a221 */ jal chrGetTargetPosition +/* f03afb8: 0fc0a221 */ jal chrGetTargetProp /* f03afbc: afa40088 */ sw $a0,0x88($sp) /* f03afc0: 8fa40088 */ lw $a0,0x88($sp) /* f03afc4: 8c90001c */ lw $s0,0x1c($a0) @@ -33058,7 +33058,7 @@ glabel func0f03b1e0 /* f03b200: afb10020 */ sw $s1,0x20($sp) /* f03b204: afb0001c */ sw $s0,0x1c($sp) /* f03b208: f7b40010 */ sdc1 $f20,0x10($sp) -/* f03b20c: 0fc0a221 */ jal chrGetTargetPosition +/* f03b20c: 0fc0a221 */ jal chrGetTargetProp /* f03b210: afa402b8 */ sw $a0,0x2b8($sp) /* f03b214: 8fa402b8 */ lw $a0,0x2b8($sp) /* f03b218: 0040b025 */ or $s6,$v0,$zero @@ -33147,11 +33147,11 @@ glabel func0f03b1e0 /* f03b348: 55a00097 */ bnezl $t5,.L0f03b5a8 /* f03b34c: 26520001 */ addiu $s2,$s2,0x1 /* f03b350: 02c02025 */ or $a0,$s6,$zero -/* f03b354: 0fc12495 */ jal positionGetDistanceToPosition +/* f03b354: 0fc12495 */ jal propGetDistanceToProp /* f03b358: 02002825 */ or $a1,$s0,$zero /* f03b35c: 46000506 */ mov.s $f20,$f0 /* f03b360: 02602025 */ or $a0,$s3,$zero -/* f03b364: 0fc12495 */ jal positionGetDistanceToPosition +/* f03b364: 0fc12495 */ jal propGetDistanceToProp /* f03b368: 02002825 */ or $a1,$s0,$zero /* f03b36c: 3c014396 */ lui $at,0x4396 /* f03b370: 44812000 */ mtc1 $at,$f4 @@ -33385,7 +33385,7 @@ glabel chrConsiderGrenadeThrow /* f03b704: 02002025 */ or $a0,$s0,$zero /* f03b708: 50400098 */ beqzl $v0,.L0f03b96c /* f03b70c: 8fbf001c */ lw $ra,0x1c($sp) -/* f03b710: 0fc0a221 */ jal chrGetTargetPosition +/* f03b710: 0fc0a221 */ jal chrGetTargetProp /* f03b714: 02002025 */ or $a0,$s0,$zero /* f03b718: 10400007 */ beqz $v0,.L0f03b738 /* f03b71c: 00000000 */ sll $zero,$zero,0x0 @@ -33627,7 +33627,7 @@ glabel func0f03ba44 /* f03ba54: afb10020 */ sw $s1,0x20($sp) /* f03ba58: afa5004c */ sw $a1,0x4c($sp) /* f03ba5c: afa60050 */ sw $a2,0x50($sp) -/* f03ba60: 0fc0a221 */ jal chrGetTargetPosition +/* f03ba60: 0fc0a221 */ jal chrGetTargetProp /* f03ba64: afa70054 */ sw $a3,0x54($sp) /* f03ba68: 3c0e8007 */ lui $t6,0x8007 /* f03ba6c: 8dce8298 */ lw $t6,-0x7d68($t6) @@ -33904,7 +33904,7 @@ glabel chrTryPunchOrKick .L0f03be54: /* f03be54: 10400073 */ beqz $v0,.L0f03c024 /* f03be58: 02002025 */ or $a0,$s0,$zero -/* f03be5c: 0fc0a221 */ jal chrGetTargetPosition +/* f03be5c: 0fc0a221 */ jal chrGetTargetProp /* f03be60: afa30030 */ sw $v1,0x30($sp) /* f03be64: 90440000 */ lbu $a0,0x0($v0) /* f03be68: 24010005 */ addiu $at,$zero,0x5 @@ -36576,7 +36576,7 @@ glabel func0f03e45c /* f03e498: 24010006 */ addiu $at,$zero,0x6 /* f03e49c: 15c10020 */ bne $t6,$at,.L0f03e520 /* f03e4a0: 00000000 */ sll $zero,$zero,0x0 -/* f03e4a4: 0fc4a25f */ jal posGetPlayerNum +/* f03e4a4: 0fc4a25f */ jal propGetPlayerNum /* f03e4a8: 00000000 */ sll $zero,$zero,0x0 /* f03e4ac: 00027880 */ sll $t7,$v0,0x2 /* f03e4b0: 3c03800a */ lui $v1,0x800a @@ -36705,7 +36705,7 @@ glabel func0f03e5f0 /* f03e6b0: 57010010 */ bnel $t8,$at,.L0f03e6f4 /* f03e6b4: 46106032 */ c.eq.s $f12,$f16 /* f03e6b8: afa50020 */ sw $a1,0x20($sp) -/* f03e6bc: 0fc4a25f */ jal posGetPlayerNum +/* f03e6bc: 0fc4a25f */ jal propGetPlayerNum /* f03e6c0: e7a2001c */ swc1 $f2,0x1c($sp) /* f03e6c4: 0002c880 */ sll $t9,$v0,0x2 /* f03e6c8: 3c08800a */ lui $t0,0x800a @@ -36802,7 +36802,7 @@ glabel func0f03e788 /* f03e7fc: 8e1902d4 */ lw $t9,0x2d4($s0) /* f03e800: 53200009 */ beqzl $t9,.L0f03e828 /* f03e804: 82020007 */ lb $v0,0x7($s0) -/* f03e808: 0fc0a221 */ jal chrGetTargetPosition +/* f03e808: 0fc0a221 */ jal chrGetTargetProp /* f03e80c: e7ac0028 */ swc1 $f12,0x28($sp) /* f03e810: 02002025 */ or $a0,$s0,$zero /* f03e814: 0fc122a1 */ jal func0f048a84 @@ -36850,7 +36850,7 @@ glabel func0f03e788 /* f03e8ac: 10000007 */ beqz $zero,.L0f03e8cc /* f03e8b0: c7ac0028 */ lwc1 $f12,0x28($sp) .L0f03e8b4: -/* f03e8b4: 0fc0a221 */ jal chrGetTargetPosition +/* f03e8b4: 0fc0a221 */ jal chrGetTargetProp /* f03e8b8: e7ac0028 */ swc1 $f12,0x28($sp) /* f03e8bc: 02002025 */ or $a0,$s0,$zero /* f03e8c0: 0fc122a1 */ jal func0f048a84 @@ -36990,7 +36990,7 @@ glabel func0f03e9f4 /* f03ea88: afa80184 */ sw $t0,0x184($sp) /* f03ea8c: afa40190 */ sw $a0,0x190($sp) /* f03ea90: afa30180 */ sw $v1,0x180($sp) -/* f03ea94: 0fc0a221 */ jal chrGetTargetPosition +/* f03ea94: 0fc0a221 */ jal chrGetTargetProp /* f03ea98: afb9016c */ sw $t9,0x16c($sp) /* f03ea9c: 8fa3016c */ lw $v1,0x16c($sp) /* f03eaa0: afa20168 */ sw $v0,0x168($sp) @@ -37060,7 +37060,7 @@ glabel func0f03e9f4 /* f03eb90: 55410167 */ bnel $t2,$at,.L0f03f130 /* f03eb94: 8cc40020 */ lw $a0,0x20($a2) /* f03eb98: e7a00024 */ swc1 $f0,0x24($sp) -/* f03eb9c: 0fc4a25f */ jal posGetPlayerNum +/* f03eb9c: 0fc4a25f */ jal propGetPlayerNum /* f03eba0: e7b00188 */ swc1 $f16,0x188($sp) /* f03eba4: 8fa40168 */ lw $a0,0x168($sp) /* f03eba8: 00025880 */ sll $t3,$v0,0x2 @@ -37933,10 +37933,10 @@ void chrSetFiring(struct chrdata *chr, s32 hand, bool firing) { struct attachment *attachment = chrGetEquippedWeaponAttachment(chr, hand); - chr->pos->unk3f_02 = firing ? 1 : 0; + chr->prop->unk3f_02 = firing ? 1 : 0; if (attachment) { - func0f08bb5c(attachment, firing, chr->pos->room); + func0f08bb5c(attachment, firing, chr->prop->room); } } @@ -38045,7 +38045,7 @@ glabel func0f03fab0 /* f03facc: e7a40030 */ swc1 $f4,0x30($sp) /* f03fad0: 8c83001c */ lw $v1,0x1c($a0) /* f03fad4: afa40060 */ sw $a0,0x60($sp) -/* f03fad8: 0fc0a221 */ jal chrGetTargetPosition +/* f03fad8: 0fc0a221 */ jal chrGetTargetProp /* f03fadc: afa3005c */ sw $v1,0x5c($sp) /* f03fae0: 8fa3005c */ lw $v1,0x5c($sp) /* f03fae4: c4460008 */ lwc1 $f6,0x8($v0) @@ -38766,7 +38766,7 @@ glabel func0f0404d4 /* f04051c: afa00268 */ sw $zero,0x268($sp) /* f040520: 8c590004 */ lw $t9,0x4($v0) /* f040524: 8fa40278 */ lw $a0,0x278($sp) -/* f040528: 0fc0a221 */ jal chrGetTargetPosition +/* f040528: 0fc0a221 */ jal chrGetTargetProp /* f04052c: afb90264 */ sw $t9,0x264($sp) /* f040530: 8fab0264 */ lw $t3,0x264($sp) /* f040534: afa2025c */ sw $v0,0x25c($sp) @@ -39609,7 +39609,7 @@ glabel func0f0404d4 /* f041164: c5e60050 */ lwc1 $f6,0x50($t7) /* f041168: 46043402 */ mul.s $f16,$f6,$f4 /* f04116c: e7100098 */ swc1 $f16,0x98($t8) -/* f041170: 0fc0a221 */ jal chrGetTargetPosition +/* f041170: 0fc0a221 */ jal chrGetTargetProp /* f041174: 8fa40278 */ lw $a0,0x278($sp) /* f041178: 8fac01b8 */ lw $t4,0x1b8($sp) /* f04117c: 3c01bf80 */ lui $at,0xbf80 @@ -40252,7 +40252,7 @@ glabel func0f041a74 /* f041aa8: 8c82001c */ lw $v0,0x1c($a0) /* f041aac: 9048003f */ lbu $t0,0x3f($v0) /* f041ab0: 35090020 */ ori $t1,$t0,0x20 -/* f041ab4: 0fc0a221 */ jal chrGetTargetPosition +/* f041ab4: 0fc0a221 */ jal chrGetTargetProp /* f041ab8: a049003f */ sb $t1,0x3f($v0) /* f041abc: 8e0a005c */ lw $t2,0x5c($s0) /* f041ac0: 8e04001c */ lw $a0,0x1c($s0) @@ -40285,7 +40285,7 @@ glabel func0f041a74 /* f041b24: 02002025 */ or $a0,$s0,$zero /* f041b28: 904a003f */ lbu $t2,0x3f($v0) /* f041b2c: 354b0020 */ ori $t3,$t2,0x20 -/* f041b30: 0fc0a221 */ jal chrGetTargetPosition +/* f041b30: 0fc0a221 */ jal chrGetTargetProp /* f041b34: a04b003f */ sb $t3,0x3f($v0) /* f041b38: 8e0c0060 */ lw $t4,0x60($s0) /* f041b3c: 8e04001c */ lw $a0,0x1c($s0) @@ -41323,8 +41323,8 @@ glabel func0f042808 void func0f0429d8(struct chrdata *chr, f32 arg1, f32 arg2) { - struct position *pos = chrGetTargetPosition(chr); - f32 distance = func0f096750(pos->coord.x - chr->pos->coord.x, pos->coord.z - chr->pos->coord.z); + struct prop *prop = chrGetTargetProp(chr); + f32 distance = func0f096750(prop->coord.x - chr->prop->coord.x, prop->coord.z - chr->prop->coord.z); f32 value = func0001afe8(arg2, distance, arg1); func0f03e538(chr, value); } @@ -41350,7 +41350,7 @@ glabel func0f042a40 /* f042a80: f7b80028 */ sdc1 $f24,0x28($sp) /* f042a84: f7b60020 */ sdc1 $f22,0x20($sp) /* f042a88: f7b40018 */ sdc1 $f20,0x18($sp) -/* f042a8c: 0fc0a221 */ jal chrGetTargetPosition +/* f042a8c: 0fc0a221 */ jal chrGetTargetProp /* f042a90: 4600e686 */ mov.s $f26,$f28 /* f042a94: 0040f025 */ or $s8,$v0,$zero /* f042a98: 0fc0f917 */ jal func0f03e45c @@ -43021,7 +43021,7 @@ glabel func0f044208 /* f04421c: 8c8e001c */ lw $t6,0x1c($a0) /* f044220: 8c910020 */ lw $s1,0x20($a0) /* f044224: 00808025 */ or $s0,$a0,$zero -/* f044228: 0fc0a221 */ jal chrGetTargetPosition +/* f044228: 0fc0a221 */ jal chrGetTargetProp /* f04422c: afae0048 */ sw $t6,0x48($sp) /* f044230: 8e0f0014 */ lw $t7,0x14($s0) /* f044234: 00409025 */ or $s2,$v0,$zero @@ -46669,7 +46669,7 @@ glabel func0f047700 /* f047718: afa70074 */ sw $a3,0x74($sp) /* f04771c: 8c8e001c */ lw $t6,0x1c($a0) /* f047720: 00808025 */ or $s0,$a0,$zero -/* f047724: 0fc0a221 */ jal chrGetTargetPosition +/* f047724: 0fc0a221 */ jal chrGetTargetProp /* f047728: afae0058 */ sw $t6,0x58($sp) /* f04772c: 00408825 */ or $s1,$v0,$zero /* f047730: 02002025 */ or $a0,$s0,$zero @@ -47581,7 +47581,7 @@ glabel func0f048398 /* f048444: 02002025 */ or $a0,$s0,$zero /* f048448: 54400044 */ bnezl $v0,.L0f04855c /* f04844c: 8faa00e0 */ lw $t2,0xe0($sp) -/* f048450: 0fc0a221 */ jal chrGetTargetPosition +/* f048450: 0fc0a221 */ jal chrGetTargetProp /* f048454: 02002025 */ or $a0,$s0,$zero /* f048458: 1040003f */ beqz $v0,.L0f048558 /* f04845c: 00408825 */ or $s1,$v0,$zero @@ -48021,7 +48021,7 @@ glabel func0f048a84 /* f048a9c: 90cf0000 */ lbu $t7,0x0($a2) /* f048aa0: 15e10010 */ bne $t7,$at,.L0f048ae4 /* f048aa4: 00000000 */ sll $zero,$zero,0x0 -/* f048aa8: 0fc4a25f */ jal posGetPlayerNum +/* f048aa8: 0fc4a25f */ jal propGetPlayerNum /* f048aac: 00c02025 */ or $a0,$a2,$zero /* f048ab0: 0002c080 */ sll $t8,$v0,0x2 /* f048ab4: 3c19800a */ lui $t9,0x800a @@ -48069,8 +48069,8 @@ glabel func0f048a84 f32 chrGetAngleToTarget(struct chrdata *chr) { - struct position *pos = chrGetTargetPosition(chr); - return func0f048a84(chr, &pos->coord); + struct prop *prop = chrGetTargetProp(chr); + return func0f048a84(chr, &prop->coord); } GLOBAL_ASM( @@ -48137,7 +48137,7 @@ glabel func0f048b78 /* f048c50: 10000017 */ beqz $zero,.L0f048cb0 /* f048c54: a4aa0000 */ sh $t2,0x0($a1) .L0f048c58: -/* f048c58: 0fc0a221 */ jal chrGetTargetPosition +/* f048c58: 0fc0a221 */ jal chrGetTargetProp /* f048c5c: afa7008c */ sw $a3,0x8c($sp) /* f048c60: 8fa7008c */ lw $a3,0x8c($sp) /* f048c64: c4440008 */ lwc1 $f4,0x8($v0) @@ -48175,7 +48175,7 @@ glabel func0f048cc0 /* f048cc8: afbf0014 */ sw $ra,0x14($sp) /* f048ccc: 8c83001c */ lw $v1,0x1c($a0) /* f048cd0: e7b20034 */ swc1 $f18,0x34($sp) -/* f048cd4: 0fc0a221 */ jal chrGetTargetPosition +/* f048cd4: 0fc0a221 */ jal chrGetTargetProp /* f048cd8: afa30030 */ sw $v1,0x30($sp) /* f048cdc: 8fa30030 */ lw $v1,0x30($sp) /* f048ce0: c7a20034 */ lwc1 $f2,0x34($sp) @@ -48200,7 +48200,7 @@ glabel func0f048cc0 /* f048d2c: 00a02025 */ or $a0,$a1,$zero /* f048d30: 54410012 */ bnel $v0,$at,.L0f048d7c /* f048d34: 24010003 */ addiu $at,$zero,0x3 -/* f048d38: 0fc4a25f */ jal posGetPlayerNum +/* f048d38: 0fc4a25f */ jal propGetPlayerNum /* f048d3c: e7ac0020 */ swc1 $f12,0x20($sp) /* f048d40: 00027080 */ sll $t6,$v0,0x2 /* f048d44: 3c0f800a */ lui $t7,0x800a @@ -48249,7 +48249,7 @@ glabel func0f048dcc /* f048dcc: 27bdffd8 */ addiu $sp,$sp,-40 /* f048dd0: afbf0014 */ sw $ra,0x14($sp) /* f048dd4: 8c83001c */ lw $v1,0x1c($a0) -/* f048dd8: 0fc0a221 */ jal chrGetTargetPosition +/* f048dd8: 0fc0a221 */ jal chrGetTargetProp /* f048ddc: afa30024 */ sw $v1,0x24($sp) /* f048de0: 8fa30024 */ lw $v1,0x24($sp) /* f048de4: 44801000 */ mtc1 $zero,$f2 @@ -48400,7 +48400,7 @@ glabel func0f048fcc /* f048fd4: afa50034 */ sw $a1,0x34($sp) /* f048fd8: 8c83001c */ lw $v1,0x1c($a0) /* f048fdc: afa40030 */ sw $a0,0x30($sp) -/* f048fe0: 0fc0a221 */ jal chrGetTargetPosition +/* f048fe0: 0fc0a221 */ jal chrGetTargetProp /* f048fe4: afa30028 */ sw $v1,0x28($sp) /* f048fe8: 8fa30028 */ lw $v1,0x28($sp) /* f048fec: c4460008 */ lwc1 $f6,0x8($v0) @@ -48543,23 +48543,23 @@ glabel func0f04911c f32 chrGetDistanceToTarget(struct chrdata *chr) { - struct position *targetpos = chrGetTargetPosition(chr); - return positionGetDistanceToPosition(chr->pos, targetpos); + struct prop *prop = chrGetTargetProp(chr); + return propGetDistanceToProp(chr->prop, prop); } // Redundant function - it's the same as above f32 chrGetDistanceToTarget2(struct chrdata *chr) { - struct position *targetpos = chrGetTargetPosition(chr); - return positionGetDistanceToPosition(chr->pos, targetpos); + struct prop *prop = chrGetTargetProp(chr); + return propGetDistanceToProp(chr->prop, prop); } f32 chrGetDistanceToCurrentPlayer(struct chrdata *chr) { - return positionGetDistanceToPosition(chr->pos, g_Vars.currentplayer->targetpos); + return propGetDistanceToProp(chr->prop, g_Vars.currentplayer->prop); } -f32 positionGetDistanceToPosition(struct position *a, struct position *b) +f32 propGetDistanceToProp(struct prop *a, struct prop *b) { f32 xdiff = a->coord.x - b->coord.x; f32 ydiff = a->coord.y - b->coord.y; @@ -48568,7 +48568,7 @@ f32 positionGetDistanceToPosition(struct position *a, struct position *b) return sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff); } -f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b) +f32 propGetLateralDistanceToProp(struct prop *a, struct prop *b) { f32 xdiff = a->coord.x - b->coord.x; f32 zdiff = a->coord.z - b->coord.z; @@ -48578,7 +48578,7 @@ f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b) f32 chrGetDistanceToPad(struct chrdata *chr, s32 pad_id) { - struct position *pos = chr->pos; + struct prop *prop = chr->prop; f32 xdiff, ydiff, zdiff; f32 distance = 0; struct pad pad; @@ -48586,9 +48586,9 @@ f32 chrGetDistanceToPad(struct chrdata *chr, s32 pad_id) if (pad_id >= 0) { padUnpack(pad_id, 2, &pad); - xdiff = pad.coord.x - pos->coord.x; - ydiff = pad.coord.y - pos->coord.y; - zdiff = pad.coord.z - pos->coord.z; + xdiff = pad.coord.x - prop->coord.x; + ydiff = pad.coord.y - prop->coord.y; + zdiff = pad.coord.z - prop->coord.z; distance = sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff); } @@ -48653,16 +48653,16 @@ glabel chrGetSameFloorDistanceToPad // have been decompiled. //f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id) //{ -// struct position *pos = chr->pos; +// struct prop *prop = chr->prop; // f32 xdiff, ydiff, zdiff, ydiff_absolute; // struct pad pad; // f32 ret; // // pad_id = chrResolvePadId(chr, pad_id); // padUnpack(pad_id, 2, &pad); -// xdiff = pad.coord.x - pos->coord.x; -// ydiff = pad.coord.y - pos->coord.y; -// zdiff = pad.coord.z - pos->coord.z; +// xdiff = pad.coord.x - prop->coord.x; +// ydiff = pad.coord.y - prop->coord.y; +// zdiff = pad.coord.z - prop->coord.z; // // if (ydiff > 0) { // ydiff_absolute = ydiff; @@ -48681,24 +48681,24 @@ glabel chrGetSameFloorDistanceToPad f32 chrGetDistanceToCoord(struct chrdata *chr, struct coord *coord) { - f32 xdiff = coord->x - chr->pos->coord.x; - f32 ydiff = coord->y - chr->pos->coord.y; - f32 zdiff = coord->z - chr->pos->coord.z; + f32 xdiff = coord->x - chr->prop->coord.x; + f32 ydiff = coord->y - chr->prop->coord.y; + f32 zdiff = coord->z - chr->prop->coord.z; return sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff); } f32 chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord) { - f32 xdiff = coord->x - chr->pos->coord.x; - f32 zdiff = coord->z - chr->pos->coord.z; + f32 xdiff = coord->x - chr->prop->coord.x; + f32 zdiff = coord->z - chr->prop->coord.z; return sqrtf(xdiff * xdiff + zdiff * zdiff); } f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id) { - struct position *pos = chr->pos; + struct prop *prop = chr->prop; f32 xdiff, zdiff; struct pad pad; f32 distance = 0; @@ -48706,8 +48706,8 @@ f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id) if (pad_id >= 0) { padUnpack(pad_id, 2, &pad); - xdiff = pad.coord.x - pos->coord.x; - zdiff = pad.coord.z - pos->coord.z; + xdiff = pad.coord.x - prop->coord.x; + zdiff = pad.coord.z - prop->coord.z; distance = sqrtf(xdiff * xdiff + zdiff * zdiff); } @@ -48716,9 +48716,9 @@ f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id) f32 chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord) { - f32 xdiff = coord->x - chr->pos->coord.x; - f32 ydiff = coord->y - chr->pos->coord.y; - f32 zdiff = coord->z - chr->pos->coord.z; + f32 xdiff = coord->x - chr->prop->coord.x; + f32 ydiff = coord->y - chr->prop->coord.y; + f32 zdiff = coord->z - chr->prop->coord.z; return xdiff * xdiff + ydiff * ydiff + zdiff * zdiff; } @@ -48999,7 +48999,7 @@ glabel chrResolveId /* f0499ac: 8fbf0014 */ lw $ra,0x14($sp) /* f0499b0: 1000005f */ beqz $zero,.L0f049b30 /* f0499b4: 84450000 */ lh $a1,0x0($v0) -/* f0499b8: 0fc0a221 */ jal chrGetTargetPosition +/* f0499b8: 0fc0a221 */ jal chrGetTargetProp /* f0499bc: afa5001c */ sw $a1,0x1c($sp) /* f0499c0: 90430000 */ lbu $v1,0x0($v0) /* f0499c4: 24010003 */ addiu $at,$zero,0x3 @@ -49127,40 +49127,40 @@ glabel chrResolveId // id = ref->chrdup; // break; // case CHR_BOND: -// if (g_Vars.bond && g_Vars.bond->targetpos && g_Vars.bond->targetpos->chr) { -// id = g_Vars.bond->targetpos->chr->chrnum; +// if (g_Vars.bond && g_Vars.bond->prop && g_Vars.bond->prop->chr) { +// id = g_Vars.bond->prop->chr->chrnum; // } // break; // case CHR_COOP: -// if (g_Vars.coop && g_Vars.coop->targetpos && g_Vars.coop->targetpos->chr) { -// id = g_Vars.coop->targetpos->chr->chrnum; +// if (g_Vars.coop && g_Vars.coop->prop && g_Vars.coop->prop->chr) { +// id = g_Vars.coop->prop->chr->chrnum; // } // break; // case CHR_ANTI: -// if (g_Vars.anti && g_Vars.anti->targetpos && g_Vars.anti->targetpos->chr) { -// id = g_Vars.anti->targetpos->chr->chrnum; +// if (g_Vars.anti && g_Vars.anti->prop && g_Vars.anti->prop->chr) { +// id = g_Vars.anti->prop->chr->chrnum; // } // break; // case CHR_P1P2: // { // u32 index = g_Vars.coopplayernum >= 0 ? ref->p1p2 : g_Vars.bondplayernum; // struct player *player = g_Vars.players[index]; -// if (player && player->targetpos && player->targetpos->chr) { -// id = player->targetpos->chr->chrnum; +// if (player && player->prop && player->prop->chr) { +// id = player->prop->chr->chrnum; // } // } // break; // case CHR_P1P2_OPPOSITE: // if (g_Vars.coopplayernum >= 0) { // struct player *player = g_Vars.players[1 - ref->p1p2]; -// if (player && player->targetpos && player->targetpos->chr) { -// id = player->targetpos->chr->chrnum; +// if (player && player->prop && player->prop->chr) { +// id = player->prop->chr->chrnum; // } // } // break; // case CHR_TARGET: // { -// struct position *target = chrGetTargetPosition(ref); +// struct prop *target = chrGetTargetProp(ref); // if ((target->unk00 == 3 || target->unk00 == 6) && target->chr) { // id = target->chr->chrnum; // } @@ -49170,33 +49170,33 @@ glabel chrResolveId // } else { // ref is NULL // switch (id) { // case CHR_BOND: -// if (g_Vars.bond && g_Vars.bond->targetpos && g_Vars.bond->targetpos->chr) { -// id = g_Vars.bond->targetpos->chr->chrnum; +// if (g_Vars.bond && g_Vars.bond->prop && g_Vars.bond->prop->chr) { +// id = g_Vars.bond->prop->chr->chrnum; // } // break; // case CHR_COOP: -// if (g_Vars.coop && g_Vars.coop->targetpos && g_Vars.coop->targetpos->chr) { -// id = g_Vars.coop->targetpos->chr->chrnum; +// if (g_Vars.coop && g_Vars.coop->prop && g_Vars.coop->prop->chr) { +// id = g_Vars.coop->prop->chr->chrnum; // } // break; // case CHR_ANTI: -// if (g_Vars.anti && g_Vars.anti->targetpos && g_Vars.anti->targetpos->chr) { -// id = g_Vars.anti->targetpos->chr->chrnum; +// if (g_Vars.anti && g_Vars.anti->prop && g_Vars.anti->prop->chr) { +// id = g_Vars.anti->prop->chr->chrnum; // } // break; // case CHR_P1P2: // { // struct player *player = g_Vars.players[g_Vars.bondplayernum]; -// if (player && player->targetpos && player->targetpos->chr) { -// id = player->targetpos->chr->chrnum; +// if (player && player->prop && player->prop->chr) { +// id = player->prop->chr->chrnum; // } // } // break; // case CHR_P1P2_OPPOSITE: // if (g_Vars.coopplayernum >= 0) { // struct player *player = g_Vars.players[g_Vars.coopplayernum]; -// if (player && player->targetpos && player->targetpos->chr) { -// id = player->targetpos->chr->chrnum; +// if (player && player->prop && player->prop->chr) { +// id = player->prop->chr->chrnum; // } // } // break; @@ -49271,7 +49271,7 @@ glabel chrFindById ); GLOBAL_ASM( -glabel positionGetIndexByChrId +glabel propGetIndexByChrId /* f049c14: 27bdffe8 */ addiu $sp,$sp,-24 /* f049c18: 240200f8 */ addiu $v0,$zero,0xf8 /* f049c1c: 10a20003 */ beq $a1,$v0,.L0f049c2c @@ -49319,14 +49319,14 @@ glabel positionGetIndexByChrId f32 chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num) { - struct position *pos1 = chr1->pos; + struct prop *prop1 = chr1->prop; struct chrdata *chr2 = chrFindById(chr1, chr2num); f32 distance = 0; - if (chr2 && chr2->pos) { - f32 xdiff = chr2->pos->coord.x - pos1->coord.x; - f32 ydiff = chr2->pos->coord.y - pos1->coord.y; - f32 zdiff = chr2->pos->coord.z - pos1->coord.z; + if (chr2 && chr2->prop) { + f32 xdiff = chr2->prop->coord.x - prop1->coord.x; + f32 ydiff = chr2->prop->coord.y - prop1->coord.y; + f32 zdiff = chr2->prop->coord.z - prop1->coord.z; distance = sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff); } @@ -49335,7 +49335,7 @@ f32 chrGetDistanceToChr(struct chrdata *chr1, s32 chr2num) f32 chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id) { - struct position *targetpos = chrGetTargetPosition(chr); + struct prop *prop = chrGetTargetProp(chr); f32 xdiff, ydiff, zdiff; struct pad pad; f32 distance = 0; @@ -49343,9 +49343,9 @@ f32 chrGetDistanceFromTargetToPad(struct chrdata *chr, s32 pad_id) if (pad_id >= 0) { padUnpack(pad_id, 2, &pad); - xdiff = pad.coord.x - targetpos->coord.x; - ydiff = pad.coord.y - targetpos->coord.y; - zdiff = pad.coord.z - targetpos->coord.z; + xdiff = pad.coord.x - prop->coord.x; + ydiff = pad.coord.y - prop->coord.y; + zdiff = pad.coord.z - prop->coord.z; distance = sqrtf(xdiff * xdiff + ydiff * ydiff + zdiff * zdiff); } @@ -49451,7 +49451,7 @@ GLOBAL_ASM( glabel func0f049fcc /* f049fcc: 27bdffa8 */ addiu $sp,$sp,-88 /* f049fd0: afbf001c */ sw $ra,0x1c($sp) -/* f049fd4: 0fc0a221 */ jal chrGetTargetPosition +/* f049fd4: 0fc0a221 */ jal chrGetTargetProp /* f049fd8: afa40058 */ sw $a0,0x58($sp) /* f049fdc: 1040003c */ beqz $v0,.L0f04a0d0 /* f049fe0: 00401825 */ or $v1,$v0,$zero @@ -49881,7 +49881,7 @@ glabel func0f04a4ec .L0f04a520: /* f04a520: 8e30001c */ lw $s0,0x1c($s1) /* f04a524: afa60024 */ sw $a2,0x24($sp) -/* f04a528: 0fc0a221 */ jal chrGetTargetPosition +/* f04a528: 0fc0a221 */ jal chrGetTargetProp /* f04a52c: 02202025 */ or $a0,$s1,$zero /* f04a530: 26040008 */ addiu $a0,$s0,0x8 /* f04a534: 26050028 */ addiu $a1,$s0,0x28 @@ -49992,14 +49992,14 @@ glabel func0f04a674 .L0f04a6b4: /* f04a6b4: afa40028 */ sw $a0,0x28($sp) /* f04a6b8: a3a5002f */ sb $a1,0x2f($sp) -/* f04a6bc: 0fc0a221 */ jal chrGetTargetPosition +/* f04a6bc: 0fc0a221 */ jal chrGetTargetProp /* f04a6c0: e7a20024 */ swc1 $f2,0x24($sp) /* f04a6c4: 90430000 */ lbu $v1,0x0($v0) /* f04a6c8: 24010006 */ addiu $at,$zero,0x6 /* f04a6cc: c7a20024 */ lwc1 $f2,0x24($sp) /* f04a6d0: 14610010 */ bne $v1,$at,.L0f04a714 /* f04a6d4: 00408025 */ or $s0,$v0,$zero -/* f04a6d8: 0fc4a25f */ jal posGetPlayerNum +/* f04a6d8: 0fc4a25f */ jal propGetPlayerNum /* f04a6dc: 00402025 */ or $a0,$v0,$zero /* f04a6e0: 00027880 */ sll $t7,$v0,0x2 /* f04a6e4: 3c18800a */ lui $t8,0x800a @@ -50051,7 +50051,7 @@ bool func0f04a76c(struct chrdata *chr, f32 distance) bool func0f04a79c(u8 chrnum, struct chrdata *chr, f32 distance) { - return func0f04a848(chrnum, chr, distance, &chr->pos->coord, &chr->pos->room); + return func0f04a848(chrnum, chr, distance, &chr->prop->coord, &chr->prop->room); } GLOBAL_ASM( @@ -50243,7 +50243,7 @@ glabel func0f04a848 bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype) { - if (chr1 && chr1->pos) { + if (chr1 && chr1->prop) { if (checktype == 0) { return true; } @@ -50254,8 +50254,8 @@ bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype) return true; } } else { - if (g_Vars.bond && g_Vars.bond->targetpos) { - struct chrdata *playerchr = g_Vars.bond->targetpos->chr; + if (g_Vars.bond && g_Vars.bond->prop) { + struct chrdata *playerchr = g_Vars.bond->prop->chr; if ((chr2 == playerchr && chr1->headnum == HEAD_JONATHAN) || (chr1 == playerchr && chr2->headnum == HEAD_JONATHAN)) { return true; @@ -50272,8 +50272,8 @@ bool chrCompareTeams(struct chrdata *chr1, struct chrdata *chr2, u8 checktype) return true; } } else { - if (g_Vars.bond && g_Vars.bond->targetpos) { - struct chrdata *playerchr = g_Vars.bond->targetpos->chr; + if (g_Vars.bond && g_Vars.bond->prop) { + struct chrdata *playerchr = g_Vars.bond->prop->chr; if ((chr2 == playerchr && chr1->headnum == HEAD_JONATHAN) || (chr1 == playerchr && chr2->headnum == HEAD_JONATHAN)) { return false; @@ -50331,7 +50331,7 @@ glabel chrIsInLoadedRoom /* f04ad20: afb20020 */ sw $s2,0x20($sp) /* f04ad24: afb1001c */ sw $s1,0x1c($sp) /* f04ad28: afb00018 */ sw $s0,0x18($sp) -/* f04ad2c: 0fc0a221 */ jal chrGetTargetPosition +/* f04ad2c: 0fc0a221 */ jal chrGetTargetProp /* f04ad30: afa400d8 */ sw $a0,0xd8($sp) /* f04ad34: 904f0000 */ lbu $t7,0x0($v0) /* f04ad38: 8fae00d8 */ lw $t6,0xd8($sp) @@ -50941,7 +50941,7 @@ bool chrSpawnAtChr(struct chrdata *basechr, s32 body, s32 head, u32 chrnum, u8 * fvalue = func0f03e45c(chr); } - return chrSpawnAtCoord(body, head, &chr->pos->coord, &chr->pos->room, fvalue, ailist, flags); + return chrSpawnAtCoord(body, head, &chr->prop->coord, &chr->prop->room, fvalue, ailist, flags); } GLOBAL_ASM( @@ -50952,7 +50952,7 @@ glabel func0f04b658 /* f04b664: afa0002c */ sw $zero,0x2c($sp) /* f04b668: 8c8e001c */ lw $t6,0x1c($a0) /* f04b66c: 00808025 */ or $s0,$a0,$zero -/* f04b670: 0fc0a221 */ jal chrGetTargetPosition +/* f04b670: 0fc0a221 */ jal chrGetTargetProp /* f04b674: afae0028 */ sw $t6,0x28($sp) /* f04b678: afa20024 */ sw $v0,0x24($sp) /* f04b67c: 860f012c */ lh $t7,0x12c($s0) @@ -51111,7 +51111,7 @@ glabel func0f04b748 /* f04b8c0: 90880000 */ lbu $t0,0x0($a0) /* f04b8c4: 55010019 */ bnel $t0,$at,.L0f04b92c /* f04b8c8: 240b0001 */ addiu $t3,$zero,0x1 -/* f04b8cc: 0fc4a25f */ jal posGetPlayerNum +/* f04b8cc: 0fc4a25f */ jal propGetPlayerNum /* f04b8d0: 00000000 */ sll $zero,$zero,0x0 /* f04b8d4: 00024880 */ sll $t1,$v0,0x2 /* f04b8d8: 3c03800a */ lui $v1,0x800a @@ -51170,7 +51170,7 @@ glabel func0f04b950 /* f04b990: 10000024 */ beqz $zero,.L0f04ba24 /* f04b994: 00001025 */ or $v0,$zero,$zero .L0f04b998: -/* f04b998: 0fc0a221 */ jal chrGetTargetPosition +/* f04b998: 0fc0a221 */ jal chrGetTargetProp /* f04b99c: 8fa40040 */ lw $a0,0x40($sp) /* f04b9a0: 14400003 */ bnez $v0,.L0f04b9b0 /* f04b9a4: 00401825 */ or $v1,$v0,$zero @@ -51236,7 +51236,7 @@ glabel func0f04ba34 /* f04ba70: a7a500be */ sh $a1,0xbe($sp) /* f04ba74: afa20078 */ sw $v0,0x78($sp) /* f04ba78: 0000f025 */ or $s8,$zero,$zero -/* f04ba7c: 0fc0a221 */ jal chrGetTargetPosition +/* f04ba7c: 0fc0a221 */ jal chrGetTargetProp /* f04ba80: 02802025 */ or $a0,$s4,$zero /* f04ba84: 8e8f001c */ lw $t7,0x1c($s4) /* f04ba88: 3c01432a */ lui $at,0x432a @@ -51924,7 +51924,7 @@ glabel func0f04c444 /* f04c44c: 8c8e001c */ lw $t6,0x1c($a0) /* f04c450: 51c00048 */ beqzl $t6,.L0f04c574 /* f04c454: 8fbf0014 */ lw $ra,0x14($sp) -/* f04c458: 0fc0a221 */ jal chrGetTargetPosition +/* f04c458: 0fc0a221 */ jal chrGetTargetProp /* f04c45c: afa40018 */ sw $a0,0x18($sp) /* f04c460: 10400043 */ beqz $v0,.L0f04c570 /* f04c464: 8fa40018 */ lw $a0,0x18($sp) @@ -52097,7 +52097,7 @@ glabel func0f04c6b4 /* f04c6b4: 27bdffe0 */ addiu $sp,$sp,-32 /* f04c6b8: afbf001c */ sw $ra,0x1c($sp) /* f04c6bc: afa40020 */ sw $a0,0x20($sp) -/* f04c6c0: 0fc0a221 */ jal chrGetTargetPosition +/* f04c6c0: 0fc0a221 */ jal chrGetTargetProp /* f04c6c4: afa50024 */ sw $a1,0x24($sp) /* f04c6c8: 8fae0020 */ lw $t6,0x20($sp) /* f04c6cc: 8faf0024 */ lw $t7,0x24($sp) @@ -52128,7 +52128,7 @@ glabel func0f04c71c /* f04c71c: 27bdffe0 */ addiu $sp,$sp,-32 /* f04c720: afbf001c */ sw $ra,0x1c($sp) /* f04c724: afa40020 */ sw $a0,0x20($sp) -/* f04c728: 0fc0a221 */ jal chrGetTargetPosition +/* f04c728: 0fc0a221 */ jal chrGetTargetProp /* f04c72c: afa50024 */ sw $a1,0x24($sp) /* f04c730: 8fae0020 */ lw $t6,0x20($sp) /* f04c734: 8faf0024 */ lw $t7,0x24($sp) @@ -52160,7 +52160,7 @@ glabel func0f04c784 /* f04c788: 27bdffd8 */ addiu $sp,$sp,-40 /* f04c78c: afbf0014 */ sw $ra,0x14($sp) /* f04c790: afa40028 */ sw $a0,0x28($sp) -/* f04c794: 0fc0a221 */ jal chrGetTargetPosition +/* f04c794: 0fc0a221 */ jal chrGetTargetProp /* f04c798: e7b00024 */ swc1 $f16,0x24($sp) /* f04c79c: 90430000 */ lbu $v1,0x0($v0) /* f04c7a0: 24010003 */ addiu $at,$zero,0x3 @@ -52177,7 +52177,7 @@ glabel func0f04c784 /* f04c7c8: 24010006 */ addiu $at,$zero,0x6 /* f04c7cc: 14610009 */ bne $v1,$at,.L0f04c7f4 /* f04c7d0: 00a02025 */ or $a0,$a1,$zero -/* f04c7d4: 0fc4a25f */ jal posGetPlayerNum +/* f04c7d4: 0fc4a25f */ jal propGetPlayerNum /* f04c7d8: afa5001c */ sw $a1,0x1c($sp) /* f04c7dc: 00027080 */ sll $t6,$v0,0x2 /* f04c7e0: 3c0f800a */ lui $t7,0x800a @@ -52244,7 +52244,7 @@ glabel func0f04c874 /* f04c8bc: f7b80038 */ sdc1 $f24,0x38($sp) /* f04c8c0: f7b60030 */ sdc1 $f22,0x30($sp) /* f04c8c4: f7b40028 */ sdc1 $f20,0x28($sp) -/* f04c8c8: 0fc0a221 */ jal chrGetTargetPosition +/* f04c8c8: 0fc0a221 */ jal chrGetTargetProp /* f04c8cc: afa700f4 */ sw $a3,0xf4($sp) /* f04c8d0: 4480d000 */ mtc1 $zero,$f26 /* f04c8d4: 00408825 */ or $s1,$v0,$zero @@ -52739,7 +52739,7 @@ glabel func0f04d000 /* f04d04c: 8de8001c */ lw $t0,0x1c($t7) /* f04d050: 8de10018 */ lw $at,0x18($t7) /* f04d054: adc8001c */ sw $t0,0x1c($t6) -/* f04d058: 0fc0a221 */ jal chrGetTargetPosition +/* f04d058: 0fc0a221 */ jal chrGetTargetProp /* f04d05c: adc10018 */ sw $at,0x18($t6) /* f04d060: 02002025 */ or $a0,$s0,$zero /* f04d064: 0fc122a1 */ jal func0f048a84 @@ -53024,8 +53024,8 @@ bool func0f04d44c(struct chrdata *chr) void chrEmitSparks(struct chrdata *chr) { - if (chr && chr->pos) { - func0f0939f8(0, chr->pos, 100, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); - func0f12f9f0(chr->pos->room, chr->pos, &chr->pos->coord, 0, 0, 1); + if (chr && chr->prop) { + func0f0939f8(0, chr->prop, 100, -1, -1, 0, 0, 0, 0, -1, 0, -1, -1, -1, -1); + func0f12f9f0(chr->prop->room, chr->prop, &chr->prop->coord, 0, 0, 1); } } diff --git a/src/game/chr/chrai.c b/src/game/chr/chrai.c index 18a2eb578..e6d82155c 100644 --- a/src/game/chr/chrai.c +++ b/src/game/chr/chrai.c @@ -98,7 +98,7 @@ void chraiExecute(void *entity, s32 entity_type) u32 animationmaybe = func0001d13c(g_Vars.chrdata->unk020); if (g_Vars.chrdata->aishotlist >= 0 && g_Vars.chrdata->cshield <= 0 - && (0 <= g_Vars.chrdata->damage || g_Vars.chrdata->gungroundpos != NULL) + && (0 <= g_Vars.chrdata->damage || g_Vars.chrdata->gunprop != NULL) && animationmaybe != 0x269 && animationmaybe != 0x26b && animationmaybe != 0x26a) { // Set shot list g_Vars.chrdata->chrflags &= ~0x00200000; @@ -180,13 +180,13 @@ u32 chraiGetCommandLength(u8 *ailist, u32 aioffset) s32 type = (cmd[0] << 8) + cmd[1]; if (type == CMD_PRINT) { - u32 pos = aioffset + 2; + u32 prop = aioffset + 2; - while (ailist[pos] != 0) { - ++pos; + while (ailist[prop] != 0) { + ++prop; } - return (pos - aioffset) + 1; + return (prop - aioffset) + 1; } if (type >= 0 && type < 0x1e1) { diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index b9e2aa8c2..2e50e5d8c 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -541,7 +541,7 @@ glabel aiChrDoAnimation /* f04e358: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) /* f04e35c: 5541000d */ bnel $t2,$at,.L0f04e394 /* f04e360: 8d2d0438 */ lw $t5,0x438($t1) -/* f04e364: 0fc4a25f */ jal posGetPlayerNum +/* f04e364: 0fc4a25f */ jal propGetPlayerNum /* f04e368: 00000000 */ sll $zero,$zero,0x0 /* f04e36c: 3c09800a */ lui $t1,%hi(g_Vars) /* f04e370: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -603,7 +603,7 @@ glabel aiChrDoAnimation // fstartframe += var8009de20 * result * 0.25; // } // -// chr->pos->unk3a = 0; +// chr->prop->unk3a = 0; // } // // func0f03af44(chr, anim_id, fstartframe, fendframe, cmd[8], cmd[9], result); @@ -611,8 +611,8 @@ glabel aiChrDoAnimation // if (startframe == 0xfffe) { // func0f0220ec(chr, 1, 1); // -// if (chr->pos->type == POSITIONTYPE_PLAYER) { -// u32 playernum = posGetPlayerNum(chr->pos); +// if (chr->prop->type == PROPTYPE_PLAYER) { +// u32 playernum = propGetPlayerNum(chr->prop); // struct player *player = g_Vars.players[playernum]; // player->unk078 = chr->ground; // player->unk074 = chr->ground; @@ -690,7 +690,7 @@ bool aiIfChrDying(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if ((!chr || !chr->pos || chr->pos->type != POSITIONTYPE_PLAYER) && (!chr || !chr->unk020 || chrIsDead(chr))) { + if ((!chr || !chr->prop || chr->prop->type != PROPTYPE_PLAYER) && (!chr || !chr->unk020 || chrIsDead(chr))) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -708,11 +708,11 @@ bool aiIfChrDeathAnimationFinished(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); bool pass; - if (!chr || !chr->pos) { + if (!chr || !chr->prop) { pass = true; } else { - if (chr->pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(chr->pos); + if (chr->prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(chr->prop); pass = g_Vars.players[playernum]->isdead; } else { pass = (chr->actiontype == ACT_DEAD); @@ -736,7 +736,7 @@ bool aiIfChrUnloaded(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if ((!chr || !chr->pos || chr->pos->type != POSITIONTYPE_PLAYER) && + if ((!chr || !chr->prop || chr->prop->type != PROPTYPE_PLAYER) && (!chr || !chr->unk020 || chr->actiontype == ACT_DRUGGEDKO || chr->actiontype == ACT_DRUGGEDDROP || chr->actiontype == ACT_DRUGGEDCOMINGUP)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { @@ -1143,7 +1143,7 @@ glabel ai001a // struct chrdata *chr1 = chrFindById(g_Vars.chrdata, cmd[2]); // struct chrdata *chr2 = chrFindById(g_Vars.chrdata, cmd[3]); // -// if (chr1 && chr2 && chr1->pos && chr2->pos) { +// if (chr1 && chr2 && chr1->prop && chr2->prop) { // struct attachment *attachment = chrGetEquippedWeaponAttachmentWithCheck(chr1, 0); // struct coord coord; // coord.x = var80068fec.x; @@ -1157,9 +1157,9 @@ glabel ai001a // if (attachment) { // s32 weapon_id; // s32 thing; -// coord.x = chr2->pos->coord.x - chr1->pos->coord.x; -// coord.y = chr2->pos->coord.y - chr1->pos->coord.y; -// coord.x = chr2->pos->coord.z - chr1->pos->coord.z; +// coord.x = chr2->prop->coord.x - chr1->prop->coord.x; +// coord.y = chr2->prop->coord.y - chr1->prop->coord.y; +// coord.x = chr2->prop->coord.z - chr1->prop->coord.z; // scaleTo1(&coord.x, &coord.y, &coord.z); // weapon_id = attachment->weapon->weapon_id; // thing = func0f0b1d28(weapon_id); @@ -1238,7 +1238,7 @@ bool aiRemoveChr(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos) { + if (chr && chr->prop) { chr->hidden |= 0x20; } @@ -1676,7 +1676,7 @@ bool aiIfSeesPlayer(void) */ bool ai017a(void) { - if ((g_Vars.chrdata && g_Vars.chrdata->pos && func0f0391ec(g_Vars.chrdata, &g_Vars.chrdata->pos->coord, &g_Vars.chrdata->pos->room, 1)) + if ((g_Vars.chrdata && g_Vars.chrdata->prop && func0f0391ec(g_Vars.chrdata, &g_Vars.chrdata->prop->coord, &g_Vars.chrdata->prop->room, 1)) || (g_Vars.hovdata && func0f07ae18(g_Vars.hovdata, 0x40) && func0f07af34(g_Vars.hovdata))) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); @@ -1776,7 +1776,7 @@ bool ai0045(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && func0f0393b4(g_Vars.chrdata, &chr->pos->coord, &chr->pos->room)) { + if (chr && chr->prop && func0f0393b4(g_Vars.chrdata, &chr->prop->coord, &chr->prop->room)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -1805,7 +1805,7 @@ bool aiIfNeverBeenOnScreen(void) */ bool ai0047(void) { - if (g_Vars.chrdata->pos->flags & 0xc2) { + if (g_Vars.chrdata->prop->flags & 0xc2) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { @@ -2877,7 +2877,7 @@ glabel aiIfTargetInRoom /* f051480: afbf001c */ sw $ra,0x1c($sp) /* f051484: 8e040424 */ lw $a0,0x424($s0) /* f051488: 01cfc021 */ addu $t8,$t6,$t7 -/* f05148c: 0fc0a221 */ jal chrGetTargetPosition +/* f05148c: 0fc0a221 */ jal chrGetTargetProp /* f051490: afb80024 */ sw $t8,0x24($sp) /* f051494: 8fa70024 */ lw $a3,0x24($sp) /* f051498: 8e040424 */ lw $a0,0x424($s0) @@ -2919,11 +2919,11 @@ glabel aiIfTargetInRoom //bool aiIfTargetInRoom(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; -// struct position *pos = chrGetTargetPosition(g_Vars.chrdata); +// struct prop *prop = chrGetTargetProp(g_Vars.chrdata); // s32 room_id = cmd[3] | (cmd[2] << 8); // room_id = chrGetPadRoom(g_Vars.chrdata, room_id & 0xffff); // -// if (room_id >= 0 && pos && room_id == pos->room) { +// if (room_id >= 0 && prop && room_id == prop->room) { // g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); // } else { // g_Vars.aioffset += 5; @@ -2942,11 +2942,11 @@ bool aiIfChrHasObject(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); s32 playernum = 0; - if (obj && obj->pos && chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (obj && obj->prop && chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { s32 prevplayernum = g_Vars.currentplayernum; - playernum = posGetPlayerNum(chr->pos); + playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); - playernum = currentPlayerHasProp(obj->pos); + playernum = currentPlayerHasProp(obj->prop); setCurrentPlayerNum(prevplayernum); } @@ -3046,8 +3046,8 @@ glabel aiIfWeaponThrownOnObject // struct defaultobj *obj = objFindByTagId(cmd[3]); // bool pass = false; // -// if (obj && obj->pos) { -// struct attachment *attachment = obj->pos->attachments; +// if (obj && obj->prop) { +// struct attachment *attachment = obj->prop->attachments; // // while (attachment) { // if (attachment->type == ATTACHMENTTYPE_WEAPON && attachment->weapon->weapon_id == cmd[2]) { @@ -3076,9 +3076,9 @@ bool aiIfChrHasWeaponEquipped(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); bool passes = false; - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); if (getCurrentPlayerWeaponId(0) == cmd[3]) { @@ -3107,15 +3107,15 @@ bool aiIfGunUnclaimed(void) if (cmd[3] == 0) { struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { g_Vars.aioffset += 5; } } else { - struct weaponobj *weapon = g_Vars.chrdata->gungroundpos->weapon; + struct weaponobj *weapon = g_Vars.chrdata->gunprop->weapon; - if (weapon && weapon->pos) { + if (weapon && weapon->prop) { weapon->flags |= 0x00400000; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { @@ -3134,7 +3134,7 @@ bool aiIfObjectHealthy(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && objIsHealthy(obj)) { + if (obj && obj->prop && objIsHealthy(obj)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -3252,7 +3252,7 @@ glabel aiIfChrActivatedObject // struct defaultobj *obj = objFindByTagId(cmd[3]); // bool pass = false; // -// if (obj && obj->pos) { +// if (obj && obj->prop) { // if (cmd[2] == CHR_ANY) { // if (obj->hidden & (OBJHIDDENFLAG_ACTIVATED_BY_BOND | OBJHIDDENFLAG_ACTIVATED_BY_COOP)) { // pass = true; @@ -3262,11 +3262,11 @@ glabel aiIfChrActivatedObject // struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); // pass = false; // -// if (chr && chr->pos) { -// if (chr->pos == g_Vars.bond->targetpos && (obj->hidden & OBJHIDDENFLAG_ACTIVATED_BY_BOND)) { +// if (chr && chr->prop) { +// if (chr->prop == g_Vars.bond->prop && (obj->hidden & OBJHIDDENFLAG_ACTIVATED_BY_BOND)) { // pass = true; // obj->hidden &= ~OBJHIDDENFLAG_ACTIVATED_BY_BOND; -// } else if (g_Vars.coopplayernum >= 0 && chr->pos == g_Vars.coop->targetpos && (obj->hidden & OBJHIDDENFLAG_ACTIVATED_BY_COOP)) { +// } else if (g_Vars.coopplayernum >= 0 && chr->prop == g_Vars.coop->prop && (obj->hidden & OBJHIDDENFLAG_ACTIVATED_BY_COOP)) { // pass = true; // obj->hidden &= ~OBJHIDDENFLAG_ACTIVATED_BY_COOP; // } @@ -3291,11 +3291,11 @@ bool ai0065(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { - if (obj->pos->type == POSITIONTYPE_DOOR) { - func0f08fee8(obj->pos, 0); - } else if (obj->pos->type == POSITIONTYPE_1 || obj->pos->type == POSITIONTYPE_WEAPON) { - func0f086f40(obj->pos); + if (obj && obj->prop) { + if (obj->prop->type == PROPTYPE_DOOR) { + func0f08fee8(obj->prop, 0); + } else if (obj->prop->type == PROPTYPE_1 || obj->prop->type == PROPTYPE_WEAPON) { + func0f086f40(obj->prop); } } @@ -3312,16 +3312,16 @@ bool aiDestroyObject(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && func0f0687b8(obj) == 0) { - struct defaultobj *entity = obj->pos->obj; + if (obj && obj->prop && func0f0687b8(obj) == 0) { + struct defaultobj *entity = obj->prop->obj; if (entity->obj == 0xeb) { obj->flags = (obj->flags & 0xfffeffff) | 0x20000; - func0f129900(entity->pos, &entity->pos->coord, &entity->pos->room, 3, 0); - func0f12e714(entity->pos, 0x16); + func0f129900(entity->prop, &entity->prop->coord, &entity->prop->room, 3, 0); + func0f12e714(entity->prop, 0x16); } else { f32 damage = ((obj->maxdamage - obj->damage) + 1) / 250.0f; - func0f0852ac(obj, damage, &obj->pos->coord, 0x22, -1); + func0f0852ac(obj, damage, &obj->prop->coord, 0x22, -1); } } @@ -3386,7 +3386,7 @@ bool aiChrDropItems(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos) { + if (chr && chr->prop) { chrDropItems(chr); } @@ -3403,16 +3403,16 @@ bool aiChrDropWeapon(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); u32 weapon_id; setCurrentPlayerNum(playernum); weapon_id = getCurrentPlayerWeaponId(0); func0f111ea4(weapon_id); func0f0a1c2c(); setCurrentPlayerNum(prevplayernum); - } else if (chr && chr->pos) { + } else if (chr && chr->prop) { if (chr->weapons_held[0]) { func0f082964(chr->weapons_held[0], 1); chr->hidden = chr->hidden | 0x00000001; @@ -3438,36 +3438,36 @@ bool aiGiveObjectToChr(void) struct defaultobj *obj = objFindByTagId(cmd[2]); struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[3]); - if (obj && obj->pos && chr && chr->pos) { - if (chr->pos->type == POSITIONTYPE_PLAYER) { + if (obj && obj->prop && chr && chr->prop) { + if (chr->prop->type == PROPTYPE_PLAYER) { u32 something; u32 prevplayernum = g_Vars.currentplayernum; - struct defaultobj *obj2 = obj->pos->obj; - u32 playernum = posGetPlayerNum(chr->pos); + struct defaultobj *obj2 = obj->prop->obj; + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); - if (obj->pos->unk18) { - func0f082f88(obj->pos); - func0f06ac90(obj->pos); - func0f0604bc(obj->pos); + if (obj->prop->unk18) { + func0f082f88(obj->prop); + func0f06ac90(obj->prop); + func0f0604bc(obj->prop); } - something = func0f088840(obj->pos, 0); - func0f062b64(obj->pos, something); - playernum = posGetPlayerNum(chr->pos); + something = func0f088840(obj->prop, 0); + func0f062b64(obj->prop, something); + playernum = propGetPlayerNum(chr->prop); obj2->hidden = (playernum << 28) | (obj2->hidden & 0x0fffffff); setCurrentPlayerNum(prevplayernum); } else { - if (obj->pos->unk18) { - func0f082f88(obj->pos); + if (obj->prop->unk18) { + func0f082f88(obj->prop); } else { - func0f065c44(obj->pos); - func0f0605c4(obj->pos); - func0f060300(obj->pos); + func0f065c44(obj->prop); + func0f0605c4(obj->prop); + func0f060300(obj->prop); } if (obj->type != OBJTYPE_WEAPON || func0f08ae54(obj, chr) == 0) { - func0f060698(obj->pos, chr->pos); + func0f060698(obj->prop, chr->prop); } } } @@ -3566,8 +3566,8 @@ bool aiOpenDoor(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *door = objFindByTagId(cmd[2]); - if (door && door->pos && door->pos->type == POSITIONTYPE_DOOR) { - if (!func0f066310(door->pos, 0)) { + if (door && door->prop && door->prop->type == PROPTYPE_DOOR) { + if (!func0f066310(door->prop, 0)) { doorActivate(door, DOORSTATE_OPEN); } } @@ -3585,7 +3585,7 @@ bool aiCloseDoor(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *door = objFindByTagId(cmd[2]); - if (door && door->pos && door->pos->type == POSITIONTYPE_DOOR) { + if (door && door->prop && door->prop->type == PROPTYPE_DOOR) { doorActivate(door, DOORSTATE_CLOSED); } @@ -3603,7 +3603,7 @@ bool aiIfDoorState(void) struct defaultobj *obj = objFindByTagId(cmd[2]); bool pass = false; - if (obj && obj->pos && obj->type == OBJTYPE_DOOR) { + if (obj && obj->prop && obj->type == OBJTYPE_DOOR) { struct doorobj *door = (struct doorobj *) obj; if (door->state == 0) { @@ -3636,7 +3636,7 @@ bool aiIfObjectIsDoor(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->type == OBJTYPE_DOOR && (obj->hidden & 0x200)) { + if (obj && obj->prop && obj->type == OBJTYPE_DOOR && (obj->hidden & 0x200)) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); } else { g_Vars.aioffset += 4; @@ -3653,7 +3653,7 @@ bool aiLockDoor(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->pos->type == POSITIONTYPE_DOOR) { + if (obj && obj->prop && obj->prop->type == PROPTYPE_DOOR) { struct doorobj *door = (struct doorobj *) obj; u8 bits = cmd[3]; door->lockbits = door->lockbits | bits; @@ -3672,7 +3672,7 @@ bool aiUnlockDoor(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->pos->type == POSITIONTYPE_DOOR) { + if (obj && obj->prop && obj->prop->type == PROPTYPE_DOOR) { struct doorobj *door = (struct doorobj *) obj; u8 bits = cmd[3]; door->lockbits = door->lockbits & ~bits; @@ -3692,7 +3692,7 @@ bool aiIfDoorLocked(void) struct defaultobj *obj = objFindByTagId(cmd[2]); bool pass = false; - if (obj && obj->pos && obj->pos->type == POSITIONTYPE_DOOR) { + if (obj && obj->prop && obj->prop->type == PROPTYPE_DOOR) { struct doorobj *door = (struct doorobj *) obj; u32 bits = cmd[3]; u32 lockbits = door->lockbits; @@ -3885,7 +3885,7 @@ glabel aiIfChrHealthLessThan /* f052b0c: 57210016 */ bnel $t9,$at,.L0f052b68 /* f052b10: c44a0104 */ lwc1 $f10,0x104($v0) /* f052b14: 8ca4001c */ lw $a0,0x1c($a1) -/* f052b18: 0fc4a25f */ jal posGetPlayerNum +/* f052b18: 0fc4a25f */ jal propGetPlayerNum /* f052b1c: afa70024 */ sw $a3,0x24($sp) /* f052b20: 00024080 */ sll $t0,$v0,0x2 /* f052b24: 02084821 */ addu $t1,$s0,$t0 @@ -3978,7 +3978,7 @@ glabel aiIfChrHealthGreaterThan /* f052c50: 57210016 */ bnel $t9,$at,.L0f052cac /* f052c54: c44a0104 */ lwc1 $f10,0x104($v0) /* f052c58: 8ca4001c */ lw $a0,0x1c($a1) -/* f052c5c: 0fc4a25f */ jal posGetPlayerNum +/* f052c5c: 0fc4a25f */ jal propGetPlayerNum /* f052c60: afa70024 */ sw $a3,0x24($sp) /* f052c64: 00024080 */ sll $t0,$v0,0x2 /* f052c68: 02084821 */ addu $t1,$s0,$t0 @@ -4394,7 +4394,7 @@ bool aiChrAddAlertness(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[3]); - if (chr && chr->pos) { + if (chr && chr->prop) { incrementByte(&chr->alertness, cmd[2]); } @@ -5090,7 +5090,7 @@ bool aiSetObjFlag(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags |= flags; } @@ -5108,7 +5108,7 @@ bool aiUnsetObjFlag(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags &= ~flags; } @@ -5126,7 +5126,7 @@ bool aiIfObjHasFlag(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && (obj->flags & flags) == flags) { + if (obj && obj->prop && (obj->flags & flags) == flags) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[7]); } else { g_Vars.aioffset += 8; @@ -5144,7 +5144,7 @@ bool aiSetObjFlag2(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags2 |= flags; } @@ -5162,7 +5162,7 @@ bool aiUnsetObjFlag2(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags2 &= ~flags; } @@ -5180,7 +5180,7 @@ bool aiIfObjHasFlag2(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && (obj->flags2 & flags) == flags) { + if (obj && obj->prop && (obj->flags2 & flags) == flags) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[7]); } else { g_Vars.aioffset += 8; @@ -5198,7 +5198,7 @@ bool aiSetObjFlag3(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags3 |= flags; } @@ -5216,7 +5216,7 @@ bool aiUnsetObjFlag3(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->flags3 &= ~flags; } @@ -5234,7 +5234,7 @@ bool aiIfObjHasFlag3(void) u32 flags = (cmd[4] << 16) | (cmd[5] << 8) | cmd[6] | (cmd[3] << 24); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && (obj->flags3 & flags) == flags) { + if (obj && obj->prop && (obj->flags3 & flags) == flags) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[7]); } else { g_Vars.aioffset += 8; @@ -6046,7 +6046,7 @@ bool ai00c9(void) u32 thing = cmd[3] | (cmd[2] << 8); bool ok = false; - if (g_Vars.chrdata && g_Vars.chrdata->pos && g_Vars.chrdata->unk020) { + if (g_Vars.chrdata && g_Vars.chrdata->prop && g_Vars.chrdata->unk020) { ok = func0f089dd8(g_Vars.chrdata, thing, flags); } @@ -6274,8 +6274,8 @@ bool aiMessage(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = g_Vars.currentplayernum; - if (chr && chr->pos && (chr->pos->type & 0xff) == POSITIONTYPE_PLAYER) { - playernum = posGetPlayerNum(chr->pos); + if (chr && chr->prop && (chr->prop->type & 0xff) == PROPTYPE_PLAYER) { + playernum = propGetPlayerNum(chr->prop); } setCurrentPlayerNum(playernum); @@ -6294,7 +6294,7 @@ bool aiShowText(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - // cmd[2] = position + // cmd[2] = prop // cmd[3] = color if (cmd[2] == 0) { @@ -6326,8 +6326,8 @@ bool aiShowText2(void) u32 prevplayernum = g_Vars.currentplayernum; u32 playernum = g_Vars.currentplayernum; - if (chr && chr->pos && (chr->pos->type & 0xff) == POSITIONTYPE_PLAYER) { - playernum = posGetPlayerNum(chr->pos); + if (chr && chr->prop && (chr->prop->type & 0xff) == PROPTYPE_PLAYER) { + playernum = propGetPlayerNum(chr->prop); } setCurrentPlayerNum(playernum); @@ -6391,7 +6391,7 @@ glabel aiSpeak /* f0560e8: 24010006 */ addiu $at,$zero,0x6 /* f0560ec: 15e10004 */ bne $t7,$at,.L0f056100 /* f0560f0: 00000000 */ sll $zero,$zero,0x0 -/* f0560f4: 0fc4a25f */ jal posGetPlayerNum +/* f0560f4: 0fc4a25f */ jal propGetPlayerNum /* f0560f8: 00000000 */ sll $zero,$zero,0x0 /* f0560fc: 00403025 */ or $a2,$v0,$zero .L0f056100: @@ -6422,7 +6422,7 @@ glabel aiSpeak /* f05615c: afab0014 */ sw $t3,0x14($sp) /* f056160: afa00010 */ sw $zero,0x10($sp) /* f056164: 87a5003e */ lh $a1,0x3e($sp) -/* f056168: 0fc25010 */ jal audioPlayFromWorldPosition +/* f056168: 0fc25010 */ jal audioPlayFromProp /* f05616c: 00003025 */ or $a2,$zero,$zero /* f056170: 1000000a */ beqz $zero,.L0f05619c /* f056174: 00403825 */ or $a3,$v0,$zero @@ -6433,7 +6433,7 @@ glabel aiSpeak /* f056184: 240e0200 */ addiu $t6,$zero,0x200 /* f056188: 8d87001c */ lw $a3,0x1c($t4) /* f05618c: afae0014 */ sw $t6,0x14($sp) -/* f056190: 0fc25010 */ jal audioPlayFromWorldPosition +/* f056190: 0fc25010 */ jal audioPlayFromProp /* f056194: afad0010 */ sw $t5,0x10($sp) /* f056198: 00403825 */ or $a3,$v0,$zero .L0f05619c: @@ -6475,20 +6475,20 @@ glabel aiSpeak // u32 audioref; // char *text = text_id >= 0 ? textGet(text_id) : NULL; // -// if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { -// playernum = posGetPlayerNum(chr->pos); +// if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { +// playernum = propGetPlayerNum(chr->prop); // } // // setCurrentPlayerNum(playernum); // // if (text && cmd[2] != CHR_P1P2) { -// func0f0926bc(g_Vars.chrdata->pos, 9, 0xffff); +// func0f0926bc(g_Vars.chrdata->prop, 9, 0xffff); // } // // if (cmd[2] == CHR_P1P2) { -// audioref = audioPlayFromWorldPosition(cmd[7], audio_id, 0, g_Vars.chrdata->pos, 0, 512); +// audioref = audioPlayFromProp(cmd[7], audio_id, 0, g_Vars.chrdata->prop, 0, 512); // } else { -// audioref = audioPlayFromWorldPosition(cmd[7], audio_id, 0, g_Vars.chrdata->pos, 9, 512); +// audioref = audioPlayFromProp(cmd[7], audio_id, 0, g_Vars.chrdata->prop, 9, 512); // } // // if (text && !audioIsFiltered(audio_id)) { @@ -6510,7 +6510,7 @@ bool aiPlaySound(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; s16 audio_id = cmd[3] | (cmd[2] << 8); - audioPlayFromWorldPosition(cmd[4], audio_id, 0, NULL, 0, 0); + audioPlayFromProp(cmd[4], audio_id, 0, NULL, 0, 0); g_Vars.aioffset += 5; @@ -6525,7 +6525,7 @@ bool aiAssignSound(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; s16 audio_id = cmd[3] | (cmd[2] << 8); - audioPlayFromWorldPosition(cmd[4], audio_id, -1, NULL, 11, 0); + audioPlayFromProp(cmd[4], audio_id, -1, NULL, 11, 0); g_Vars.aioffset += 5; @@ -6572,7 +6572,7 @@ bool ai00d1(void) s16 audio_id = cmd[4] | (cmd[3] << 8); u16 thing = cmd[6] | (cmd[5] << 8); - audioPlayFromWorldPosition2(cmd[2], audio_id, -1, NULL, thing, 2500, 3000, 0); + audioPlayFromProp2(cmd[2], audio_id, -1, NULL, thing, 2500, 3000, 0); g_Vars.aioffset += 7; @@ -6589,7 +6589,7 @@ bool ai00d2(void) u16 thing2 = cmd[6] | (cmd[5] << 8); s32 audio_id = func0f0927d4(thing1, 400, 2500, 3000, 32767); - audioPlayFromWorldPosition2(cmd[2], audio_id, -1, NULL, thing2, 2500, 3000, 0); + audioPlayFromProp2(cmd[2], audio_id, -1, NULL, thing2, 2500, 3000, 0); g_Vars.aioffset += 7; @@ -6605,8 +6605,8 @@ bool ai00cf(void) struct defaultobj *obj = objFindByTagId(cmd[3]); u16 thing = cmd[5] | (cmd[4] << 8); - if (obj && obj->pos) { - audioPlayFromWorldPosition2(cmd[2], -1, -1, obj->pos, thing, 2500, 3000, 0); + if (obj && obj->prop) { + audioPlayFromProp2(cmd[2], -1, -1, obj->prop, thing, 2500, 3000, 0); } g_Vars.aioffset += 6; @@ -6625,7 +6625,7 @@ bool ai016b(void) u16 thing2 = cmd[7] | (cmd[6] << 8); u16 thing3 = cmd[9] | (cmd[8] << 8); - if (obj && obj->pos) { + if (obj && obj->prop) { s32 thing1again; if (thing1 == 0) { @@ -6634,7 +6634,7 @@ bool ai016b(void) thing1again = thing1; } - audioPlayFromWorldPosition2(cmd[2], -1, -1, obj->pos, thing1again, thing2, thing3, 2); + audioPlayFromProp2(cmd[2], -1, -1, obj->prop, thing1again, thing2, thing3, 2); } g_Vars.aioffset += 10; @@ -6655,14 +6655,14 @@ bool ai0179(void) if (cmd[10] == 0) { struct defaultobj *obj = objFindByTagId(cmd[3]); - if (obj && obj->pos) { - audioPlayFromWorldPosition2(cmd[2], -1, -1, obj->pos, thing1, thing2, thing3, 0); + if (obj && obj->prop) { + audioPlayFromProp2(cmd[2], -1, -1, obj->prop, thing1, thing2, thing3, 0); } } else { struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[3]); - if (chr && chr->pos) { - audioPlayFromWorldPosition2(cmd[2], -1, -1, chr->pos, thing1, thing2, thing3, 0); + if (chr && chr->prop) { + audioPlayFromProp2(cmd[2], -1, -1, chr->prop, thing1, thing2, thing3, 0); } } @@ -6906,7 +6906,7 @@ bool aiSetObjImage(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { if (obj->type == OBJTYPE_SINGLEMONITOR) { struct singlemonitorobj *sm = (struct singlemonitorobj *) obj; imageSlotSetImage(&sm->image, cmd[4], obj); @@ -7230,9 +7230,9 @@ bool aiShowChr(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->unk020) { - func0f0604bc(chr->pos); - func0f0602f0(chr->pos); + if (chr && chr->prop && chr->unk020) { + func0f0604bc(chr->prop); + func0f0602f0(chr->prop); func0f0220ac(chr); } @@ -7249,10 +7249,10 @@ bool aiHideChr(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->unk020) { - func0f065c44(chr->pos); - func0f0605c4(chr->pos); - func0f060300(chr->pos); + if (chr && chr->prop && chr->unk020) { + func0f065c44(chr->prop); + func0f0605c4(chr->prop); + func0f060300(chr->prop); } g_Vars.aioffset += 3; @@ -7268,9 +7268,9 @@ bool aiShowObj(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->unk18) { - func0f0604bc(obj->pos); - func0f0602f0(obj->pos); + if (obj && obj->prop && obj->unk18) { + func0f0604bc(obj->prop); + func0f0602f0(obj->prop); if (g_Vars.currentplayer->unk0480 == 0 && obj->type == OBJTYPE_WEAPON) { struct weaponobj *weapon = (struct weaponobj *) obj; @@ -7294,13 +7294,13 @@ bool aiHideObj(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->unk18) { - if (obj->pos->unk18) { - func0f082f88(obj->pos); + if (obj && obj->prop && obj->unk18) { + if (obj->prop->unk18) { + func0f082f88(obj->prop); } else { - func0f065c44(obj->pos); - func0f0605c4(obj->pos); - func0f060300(obj->pos); + func0f065c44(obj->prop); + func0f0605c4(obj->prop); + func0f060300(obj->prop); } } @@ -7359,7 +7359,7 @@ glabel aiRevokeControl /* f05754c: 8e0e0438 */ lw $t6,0x438($s0) /* f057550: 8e19028c */ lw $t9,0x28c($s0) /* f057554: afb90024 */ sw $t9,0x24($sp) -/* f057558: 0fc4a25f */ jal posGetPlayerNum +/* f057558: 0fc4a25f */ jal propGetPlayerNum /* f05755c: 8c44001c */ lw $a0,0x1c($v0) /* f057560: 0fc4a24b */ jal setCurrentPlayerNum /* f057564: 00402025 */ or $a0,$v0,$zero @@ -7409,9 +7409,9 @@ glabel aiRevokeControl // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); // -// if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { +// if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { // u32 prevplayernum = g_Vars.currentplayernum; -// setCurrentPlayerNum(posGetPlayerNum(chr->pos)); +// setCurrentPlayerNum(propGetPlayerNum(chr->prop)); // func0f0abc74(4, false); // func0f0a95ec(2, false); // @@ -7440,9 +7440,9 @@ bool aiGrantControl(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - setCurrentPlayerNum(posGetPlayerNum(chr->pos)); + setCurrentPlayerNum(propGetPlayerNum(chr->prop)); func0f0abc74(4, true); func0f0a95ec(2, true); func0f0dfa1c(2); @@ -7564,9 +7564,9 @@ bool ai00e3(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); if (var8007074c != 2) { @@ -7717,8 +7717,8 @@ bool ai00e5(void) bool pass = false; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(chr->pos); + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(chr->prop); if (g_Vars.players[playernum]->unk02ec < 0) { pass = true; @@ -7742,7 +7742,7 @@ bool aiSetDoorClosed(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { struct doorobj *door = (struct doorobj *) obj; door->speed = door->unk5c; door->unk80 = 0; @@ -7750,7 +7750,7 @@ bool aiSetDoorClosed(void) door->state = 0; func0f08c54c(door); func0f08d4e8(door); - func0f0926bc(door->base.pos, 1, 0xffff); + func0f0926bc(door->base.prop, 1, 0xffff); } g_Vars.aioffset += 3; @@ -7849,9 +7849,9 @@ bool aiIfChrAmmoQuantityLessThan(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); bool passes = false; - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); if (currentPlayerGetAmmoCount((s8)cmd[3]) < (s8)cmd[4]) { @@ -7878,9 +7878,9 @@ bool aiChrDrawWeapon(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); currentPlayerEquipWeapon(0, (s8)cmd[3]); currentPlayerEquipWeapon(1, 0); @@ -7900,9 +7900,9 @@ bool aiChrDrawWeaponInCutscene(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); currentPlayerEquipWeaponInCutscene((s8)cmd[3]); setCurrentPlayerNum(prevplayernum); @@ -7941,7 +7941,7 @@ glabel ai00ee /* f057fd0: 8e0d0438 */ lw $t5,0x438($s0) /* f057fd4: 8e19028c */ lw $t9,0x28c($s0) /* f057fd8: afb90024 */ sw $t9,0x24($sp) -/* f057fdc: 0fc4a25f */ jal posGetPlayerNum +/* f057fdc: 0fc4a25f */ jal propGetPlayerNum /* f057fe0: 8c44001c */ lw $a0,0x1c($v0) /* f057fe4: 0fc4a24b */ jal setCurrentPlayerNum /* f057fe8: 00402025 */ or $a0,$v0,$zero @@ -7980,9 +7980,9 @@ glabel ai00ee // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; // struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); // -// if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { +// if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { // u32 prevplayernum = g_Vars.currentplayernum; -// u32 playernum = posGetPlayerNum(chr->pos); +// u32 playernum = propGetPlayerNum(chr->prop); // setCurrentPlayerNum(playernum); // // g_Vars.currentplayer->unk1b6c = (s8)cmd[3]; @@ -8007,7 +8007,7 @@ bool aiIfObjInRoom(void) u16 room_id = cmd[4] | (cmd[3] << 8); s32 room_something = chrGetPadRoom(g_Vars.chrdata, room_id); - if (room_something >= 0 && obj && obj->pos && room_something == obj->pos->room) { + if (room_something >= 0 && obj && obj->prop && room_something == obj->prop->room) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[5]); } else { g_Vars.aioffset += 6; @@ -8035,9 +8035,9 @@ bool aiChrSetInvincible(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); g_PlayerInvincible = true; setCurrentPlayerNum(prevplayernum); @@ -8176,9 +8176,9 @@ bool aiIfPlayerIsInvincible(void) bool pass = false; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); pass = g_PlayerInvincible; setCurrentPlayerNum(prevplayernum); @@ -8302,9 +8302,9 @@ bool aiChrExplosions(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); currentPlayerSurroundWithExplosions(0); setCurrentPlayerNum(prevplayernum); @@ -8485,7 +8485,7 @@ glabel aiRemoveObjectAtPropPreset //bool aiRemoveObjectAtPropPreset(void) //{ // if (g_Vars.chrdata->proppreset1 >= 0) { -// struct defaultobj *obj = g_Vars.positions[g_Vars.chrdata->proppreset1].obj; +// struct defaultobj *obj = g_Vars.props[g_Vars.chrdata->proppreset1].obj; // obj->hidden &= ~OBJHIDDENFLAG_00200000; // } // @@ -8568,7 +8568,7 @@ bool aiSetTarget(void) s16 prop_id; if (!cmd[3] && !cmd[4]) { - prop_id = positionGetIndexByChrId(g_Vars.chrdata, cmd[2]); + prop_id = propGetIndexByChrId(g_Vars.chrdata, cmd[2]); } else if (!cmd[4]) { struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); prop_id = chr->target; @@ -8600,7 +8600,7 @@ bool aiIfPresetsTargetIsNotMyTarget(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; if (g_Vars.chrdata->chrpreset1 != -1) { - mypresetchrstarget = positionGetIndexByChrId(g_Vars.chrdata, g_Vars.chrdata->chrpreset1); + mypresetchrstarget = propGetIndexByChrId(g_Vars.chrdata, g_Vars.chrdata->chrpreset1); } if (g_Vars.chrdata->target != -1 && mypresetchrstarget != g_Vars.chrdata->target) { @@ -8621,17 +8621,17 @@ bool aiIfChrTarget(void) struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); bool pass = false; - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { // empty } else if (cmd[2] != CHR_BOND) { if (cmd[4] == 0) { struct chrdata *chr2 = chrFindById(g_Vars.chrdata, cmd[3]); - if (chr2 && chr2->pos && chrGetTargetPosition(chr) == chr2->pos) { + if (chr2 && chr2->prop && chrGetTargetProp(chr) == chr2->prop) { pass = true; } } else { - if (chr->target != -1 && chr && chr->pos) { + if (chr->target != -1 && chr && chr->prop) { pass = true; } } @@ -8706,7 +8706,7 @@ bool aiIfCompareChrPresetsTeam(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, CHR_PRESET); - if (!chr || (!chr->unk020 && chr->pos->type != POSITIONTYPE_PLAYER)) { + if (!chr || (!chr->unk020 && chr->prop->type != PROPTYPE_PLAYER)) { chrSetChrPreset(g_Vars.chrdata, CHR_BOND); chr = chrFindById(g_Vars.chrdata, CHR_PRESET); } @@ -8740,8 +8740,8 @@ glabel ai011e /* f0591f0: 24639fc0 */ addiu $v1,$v1,-24640 # v1 = g_Vars /* f0591f4: 10400012 */ beqz $v0,.L0f059240 # if (chr == 0) goto 40 /* f0591f8: 8fa7001c */ lw $a3,0x1c($sp) -/* f0591fc: 8c58001c */ lw $t8,0x1c($v0) # t8 = chr->pos -/* f059200: 53000010 */ beqzl $t8,.L0f059244 # if (chr->pos == 0) goto 44 +/* f0591fc: 8c58001c */ lw $t8,0x1c($v0) # t8 = chr->prop +/* f059200: 53000010 */ beqzl $t8,.L0f059244 # if (chr->prop == 0) goto 44 /* f059204: 8c790438 */ lw $t9,0x438($v1) # t9 = g_Vars.aioffset /* f059208: 10400003 */ beqz $v0,.L0f059218 # if (v0 == 0) goto 18 /* f05920c: 00002025 */ or $a0,$zero,$zero # a0 = 0 @@ -8984,7 +8984,7 @@ bool ai0121(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; u16 someshort = cmd[3] | (cmd[2] << 8); - if (g_Vars.chrdata && g_Vars.chrdata->pos && func0f04ba34(g_Vars.chrdata, someshort, 0) != -1) { + if (g_Vars.chrdata && g_Vars.chrdata->prop && func0f04ba34(g_Vars.chrdata, someshort, 0) != -1) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { g_Vars.aioffset += 5; @@ -9002,7 +9002,7 @@ bool ai0122(void) u16 thing = cmd[3] | (cmd[2] << 8); u32 flags = (cmd[5] << 16) | (cmd[6] << 8) | cmd[7] | (cmd[4] << 24); - if (g_Vars.chrdata && g_Vars.chrdata->pos && func0f04ba34(g_Vars.chrdata, thing, flags) != -1) { + if (g_Vars.chrdata && g_Vars.chrdata->prop && func0f04ba34(g_Vars.chrdata, thing, flags) != -1) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[8]); } else { g_Vars.aioffset += 9; @@ -9020,7 +9020,7 @@ bool ai0123(void) u16 thing = cmd[3] | (cmd[2] << 8); u32 flags = (cmd[5] << 16) | (cmd[6] << 8) | cmd[7] | (cmd[4] << 24); - if (g_Vars.chrdata && g_Vars.chrdata->pos && func0f04ba34(g_Vars.chrdata, thing, -flags) != -1) { + if (g_Vars.chrdata && g_Vars.chrdata->prop && func0f04ba34(g_Vars.chrdata, thing, -flags) != -1) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[8]); } else { g_Vars.aioffset += 9; @@ -9251,7 +9251,7 @@ glabel ai0127 /* f059b1c: 2401ffff */ addiu $at,$zero,-1 /* f059b20: 1281000c */ beq $s4,$at,.L0f059b54 /* f059b24: 02802825 */ or $a1,$s4,$zero -/* f059b28: 0fc12705 */ jal positionGetIndexByChrId +/* f059b28: 0fc12705 */ jal propGetIndexByChrId /* f059b2c: 8e440424 */ lw $a0,0x424($s2) /* f059b30: 8e490424 */ lw $t1,0x424($s2) /* f059b34: a522017e */ sh $v0,0x17e($t1) @@ -9435,7 +9435,7 @@ glabel ai0128 /* f059dc8: 86350000 */ lh $s5,0x0($s1) /* f059dcc: 8612017e */ lh $s2,0x17e($s0) .L0f059dd0: -/* f059dd0: 0fc12705 */ jal positionGetIndexByChrId +/* f059dd0: 0fc12705 */ jal propGetIndexByChrId /* f059dd4: 86250000 */ lh $a1,0x0($s1) /* f059dd8: 8e680424 */ lw $t0,0x424($s3) /* f059ddc: a502017e */ sh $v0,0x17e($t0) @@ -9474,7 +9474,7 @@ glabel ai0128 /* f059e4c: 2401ffff */ addiu $at,$zero,-1 /* f059e50: 12a1000c */ beq $s5,$at,.L0f059e84 /* f059e54: 02a02825 */ or $a1,$s5,$zero -/* f059e58: 0fc12705 */ jal positionGetIndexByChrId +/* f059e58: 0fc12705 */ jal propGetIndexByChrId /* f059e5c: 8e640424 */ lw $a0,0x424($s3) /* f059e60: 8e6f0424 */ lw $t7,0x424($s3) /* f059e64: a5e2017e */ sh $v0,0x17e($t7) @@ -9840,7 +9840,7 @@ glabel ai0130 /* f05a438: 24010006 */ addiu $at,$zero,0x6 /* f05a43c: 55610015 */ bnel $t3,$at,.L0f05a494 /* f05a440: 90e20126 */ lbu $v0,0x126($a3) -/* f05a444: 0fc4a25f */ jal posGetPlayerNum +/* f05a444: 0fc4a25f */ jal propGetPlayerNum /* f05a448: 00000000 */ sll $zero,$zero,0x0 /* f05a44c: 8e030298 */ lw $v1,0x298($s0) /* f05a450: 00026080 */ sll $t4,$v0,0x2 @@ -10363,10 +10363,10 @@ glabel ai0130 /* f05abd8: 00000000 */ sll $zero,$zero,0x0 ); -void func0f05abdc(struct position *pos) +void func0f05abdc(struct prop *prop) { - if (pos && pos->chr && pos->chr->unk020 && pos->chr->propsoundcount > 0) { - pos->chr->propsoundcount--; + if (prop && prop->chr && prop->chr->unk020 && prop->chr->propsoundcount > 0) { + prop->chr->propsoundcount--; } } @@ -10898,7 +10898,7 @@ glabel ai0136 /* f05b368: 1441000d */ bne $v0,$at,.L0f05b3a0 /* f05b36c: 2405090a */ addiu $a1,$zero,0x90a /* f05b370: 8e040424 */ lw $a0,0x424($s0) -/* f05b374: 0fc0a221 */ jal chrGetTargetPosition +/* f05b374: 0fc0a221 */ jal chrGetTargetProp /* f05b378: afa30024 */ sw $v1,0x24($sp) /* f05b37c: 8fa30024 */ lw $v1,0x24($sp) /* f05b380: 3c06461c */ lui $a2,0x461c @@ -11034,7 +11034,7 @@ glabel aiIfChrInSquadronDoingAction /* f05b550: 00001025 */ or $v0,$zero,$zero ); -// Mismatches due to position of rodata. This function uses literal 3500, while +// Mismatches due to prop of rodata. This function uses literal 3500, while // others below in this file use const f32 arrays, but const f32 arrays are // placed in .rodata before all literals. //bool aiIfChrInSquadronDoingAction(void) @@ -12002,9 +12002,9 @@ bool aiIfY(void) struct heliobj *heli = objGetHeli(&g_Vars.hovdata->base); if (heli) { - struct position *target = heliGetTargetPosition(heli); + struct prop *target = heliGetTargetProp(heli); - if (target && (target->type == POSITIONTYPE_CHR || target->type == POSITIONTYPE_PLAYER)) { + if (target && (target->type == PROPTYPE_CHR || target->type == PROPTYPE_PLAYER)) { chr = target->chr; } } @@ -12012,9 +12012,9 @@ bool aiIfY(void) chr = chrFindById(g_Vars.chrdata, cmd[2]); } - if (chr && chr->pos && ( - (chr->pos->coord.y < cutoff_y && cmd[5] == 0) || - (chr->pos->coord.y > cutoff_y && cmd[5] == 1))) { + if (chr && chr->prop && ( + (chr->prop->coord.y < cutoff_y && cmd[5] == 0) || + (chr->prop->coord.y > cutoff_y && cmd[5] == 1))) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[6]); } else { g_Vars.aioffset += 7; @@ -12153,7 +12153,7 @@ bool aiIfChrHasGun(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->unk020 && chr->gungroundpos == NULL) { + if (chr && chr->unk020 && chr->gunprop == NULL) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[4]); } else { g_Vars.aioffset += 5; @@ -12168,11 +12168,11 @@ bool aiIfChrHasGun(void) bool ai0170(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - struct weaponobj *weapon = g_Vars.chrdata->gungroundpos->weapon; + struct weaponobj *weapon = g_Vars.chrdata->gunprop->weapon; if (cmd[2] == 0 || ((weapon->hidden & OBJHIDDENFLAG_00000080) == 0 && cmd[2] == 1)) { if (cmd[2] == 0) { - func0f03ab74(g_Vars.chrdata, g_Vars.chrdata->gungroundpos, 1); + func0f03ab74(g_Vars.chrdata, g_Vars.chrdata->gunprop, 1); } g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); @@ -12194,10 +12194,10 @@ bool aiIfDistanceToGunLessThan(void) f32 ydiff = 0; f32 zdiff = 0; - if (g_Vars.chrdata->gungroundpos) { - xdiff = g_Vars.chrdata->pos->coord.x - g_Vars.chrdata->gungroundpos->coord.x; - ydiff = g_Vars.chrdata->pos->coord.y - g_Vars.chrdata->gungroundpos->coord.y; - zdiff = g_Vars.chrdata->pos->coord.z - g_Vars.chrdata->gungroundpos->coord.z; + if (g_Vars.chrdata->gunprop) { + xdiff = g_Vars.chrdata->prop->coord.x - g_Vars.chrdata->gunprop->coord.x; + ydiff = g_Vars.chrdata->prop->coord.y - g_Vars.chrdata->gunprop->coord.y; + zdiff = g_Vars.chrdata->prop->coord.z - g_Vars.chrdata->gunprop->coord.z; } if (ydiff < 200 && ydiff > -200 && @@ -12269,14 +12269,14 @@ glabel ai0172 //bool ai0172(void) //{ // u8 *cmd = g_Vars.ailist + g_Vars.aioffset; -// struct position *pos = g_Vars.chrdata->gungroundpos; -// g_Vars.chrdata->gungroundpos = NULL; +// struct prop *prop = g_Vars.chrdata->gunprop; +// g_Vars.chrdata->gunprop = NULL; // -// if (pos && pos->unk04 && pos->unk18 == 0 && pos->type == POSITIONTYPE_WEAPON) { -// func0f065c44(pos); -// func0f0605c4(pos); -// func0f060300(pos); -// func0f08ae54(pos->unk04, g_Vars.chrdata); +// if (prop && prop->unk04 && prop->unk18 == 0 && prop->type == PROPTYPE_WEAPON) { +// func0f065c44(prop); +// func0f0605c4(prop); +// func0f060300(prop); +// func0f08ae54(prop->unk04, g_Vars.chrdata); // } // // g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[3]); @@ -12328,9 +12328,9 @@ bool aiPlayerAutoWalk(void) s16 pad_id = cmd[4] | (cmd[3] << 8); struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); currentPlayerAutoWalk(pad_id, cmd[5], cmd[6], cmd[7], cmd[8]); setCurrentPlayerNum(prevplayernum); @@ -12350,9 +12350,9 @@ bool aiIfPlayerAutoWalkFinished(void) bool pass = false; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); if (g_Vars.unk0002ac == 7) { @@ -12381,12 +12381,12 @@ bool aiIfPlayerLookingAtObject(void) bool pass = false; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); - if (g_Vars.currentplayer->lookingatprop == obj->pos) { + if (g_Vars.currentplayer->lookingatprop == obj->prop) { pass = true; } @@ -12424,9 +12424,9 @@ bool aiPunchOrKick(void) bool ai0183(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - struct position *target = chrGetTargetPosition(g_Vars.chrdata); + struct prop *target = chrGetTargetProp(g_Vars.chrdata); - if (target->type == POSITIONTYPE_5 || target->type == POSITIONTYPE_PLAYER) { + if (target->type == PROPTYPE_5 || target->type == PROPTYPE_PLAYER) { g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { g_Vars.aioffset += 3; @@ -12493,7 +12493,7 @@ glabel ai0187 /* f05d14c: ae090438 */ sw $t1,0x438($s0) /* f05d150: 8c6c0000 */ lw $t4,0x0($v1) /* f05d154: 8d820004 */ lw $v0,0x4($t4) -/* f05d158: 0fc12705 */ jal positionGetIndexByChrId +/* f05d158: 0fc12705 */ jal propGetIndexByChrId /* f05d15c: 84450000 */ lh $a1,0x0($v0) /* f05d160: 8e0d0424 */ lw $t5,0x424($s0) /* f05d164: a5a2017e */ sh $v0,0x17e($t5) @@ -12533,7 +12533,7 @@ bool aiIfLiftStationary(void) struct defaultobj *obj = objFindByTagId(cmd[2]); bool pass = false; - if (obj && obj->pos && obj->type == OBJTYPE_LIFT) { + if (obj && obj->prop && obj->type == OBJTYPE_LIFT) { struct liftobj *lift = (struct liftobj *)obj; if ((obj->flags & OBJECTFLAG0_DEACTIVATED) || !lift->unk74) { @@ -12558,7 +12558,7 @@ bool ai0189(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->type == OBJTYPE_LIFT) { + if (obj && obj->prop && obj->type == OBJTYPE_LIFT) { func0f0710ec(obj, cmd[3]); } @@ -12677,8 +12677,8 @@ bool aiActivateLift(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[3]); - if (obj && obj->pos) { - liftActivate(obj->pos, cmd[2]); + if (obj && obj->prop) { + liftActivate(obj->prop, cmd[2]); } g_Vars.aioffset += 4; @@ -12836,14 +12836,14 @@ glabel aiIfObjectDistanceToPadLessThan // struct pad pad; // bool pass = false; // -// if (obj && obj->pos) { +// if (obj && obj->prop) { // pad_id = chrResolvePadId(g_Vars.chrdata, pad_id); // // if (pad_id >= 0) { // padUnpack(pad_id, 2, &pad); -// xdiff = obj->pos->coord.x - pad.coord.x; -// ydiff = obj->pos->coord.y - pad.coord.y; -// zdiff = obj->pos->coord.z - pad.coord.z; +// xdiff = obj->prop->coord.x - pad.coord.x; +// ydiff = obj->prop->coord.y - pad.coord.y; +// zdiff = obj->prop->coord.z - pad.coord.z; // // if (ydiff < 200 && ydiff > -200 && // xdiff < distance && xdiff > -distance && @@ -12929,7 +12929,7 @@ bool aiIfObjHealthLessThan(void) bool condition_passes = false; - if (obj && obj->pos && obj->damage < damage) { + if (obj && obj->prop && obj->damage < damage) { condition_passes = true; } @@ -12951,7 +12951,7 @@ bool aiSetObjHealth(void) s32 damage = cmd[4] | (cmd[3] << 8); struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { obj->damage = damage; } @@ -12984,8 +12984,8 @@ bool aiSetRoomToSearch(void) { struct chrdata *target = chrFindById(g_Vars.chrdata, CHR_TARGET); - if (target && target->pos) { - g_Vars.chrdata->roomtosearch = target->pos->room; + if (target && target->prop) { + g_Vars.chrdata->roomtosearch = target->prop->room; } g_Vars.aioffset += 2; @@ -13003,22 +13003,22 @@ bool aiSayCiStaffQuip(void) if (cmd[2] == 0) { quip = ciquiptable_bank0[g_Vars.chrdata->morale][random() % 3]; - audioPlayFromWorldPosition(cmd[3], quip, 0, g_Vars.chrdata->pos, 9, 0); + audioPlayFromProp(cmd[3], quip, 0, g_Vars.chrdata->prop, 9, 0); } if (cmd[2] == 1) { quip = ciquiptable_bank1[g_Vars.chrdata->morale][random() % 3]; - audioPlayFromWorldPosition(cmd[3], quip, 0, g_Vars.chrdata->pos, 9, 0); + audioPlayFromProp(cmd[3], quip, 0, g_Vars.chrdata->prop, 9, 0); } if (cmd[2] == 2) { quip = ciquiptable_bank2[g_Vars.chrdata->morale][random() % 3]; - audioPlayFromWorldPosition(cmd[3], quip, 0, g_Vars.chrdata->pos, 9, 0); + audioPlayFromProp(cmd[3], quip, 0, g_Vars.chrdata->prop, 9, 0); } if (cmd[2] == 3) { quip = ciquiptable_bank3[g_Vars.chrdata->morale]; - audioPlayFromWorldPosition(cmd[3], quip, 0, g_Vars.chrdata->pos, 9, 0); + audioPlayFromProp(cmd[3], quip, 0, g_Vars.chrdata->prop, 9, 0); } g_Vars.aioffset += 4; @@ -13196,8 +13196,8 @@ bool ai01a5(void) bool aiIfTargetYDifferenceLessThan(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; - struct position *pos = chrGetTargetPosition(g_Vars.chrdata); - f32 diff = pos->coord.y - g_Vars.chrdata->pos->coord.y; + struct prop *prop = chrGetTargetProp(g_Vars.chrdata); + f32 diff = prop->coord.y - g_Vars.chrdata->prop->coord.y; if (diff < 0) { diff = 0 - diff; @@ -13221,10 +13221,10 @@ bool ai01aa(void) f32 a = var7f1a9d9c[0]; func0f0056f4( - g_Vars.currentplayer->targetpos->room, - &g_Vars.currentplayer->targetpos->coord, - g_Vars.chrdata->pos->room, - &g_Vars.chrdata->pos->coord, + g_Vars.currentplayer->prop->room, + &g_Vars.currentplayer->prop->coord, + g_Vars.chrdata->prop->room, + &g_Vars.chrdata->prop->coord, 0, &a, 0); if (a < var7f1a9da0[0]) { @@ -13370,13 +13370,13 @@ bool aiChrGrabObject(void) struct defaultobj *obj = objFindByTagId(cmd[3]); struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER && obj && obj->pos) { + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER && obj && obj->prop) { u32 prevplayernum = g_Vars.currentplayernum; - u32 playernum = posGetPlayerNum(chr->pos); + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); if (g_Vars.currentplayer->unk01b0 == 0 && func0f0cc680() == 2 && g_Vars.currentplayer->unk00b4 == 0) { - currentPlayerGrabProp(obj->pos); + currentPlayerGrabProp(obj->prop); } setCurrentPlayerNum(prevplayernum); @@ -13627,11 +13627,11 @@ bool aiChrSetP1P2(void) struct chrdata *chr1 = chrFindById(g_Vars.chrdata, cmd[2]); struct chrdata *chr2 = chrFindById(g_Vars.chrdata, cmd[3]); - if (chr1 && chr2 && chr2->pos && chr2->pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(chr2->pos); + if (chr1 && chr2 && chr2->prop && chr2->prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(chr2->prop); if (!g_Vars.players[playernum]->isdead) { - if (chr2->pos == g_Vars.coop->targetpos) { + if (chr2->prop == g_Vars.coop->prop) { chr1->p1p2 = g_Vars.coopplayernum; } else { chr1->p1p2 = g_Vars.bondplayernum; @@ -13653,7 +13653,7 @@ bool aiChrSetCloaked(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos) { + if (chr && chr->prop) { if (!chrIsDead(chr)) { if (cmd[3]) { chrCloak(chr, cmd[4]); @@ -13676,7 +13676,7 @@ bool aiSetAutogunType(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos && obj->type == OBJTYPE_AUTOGUN) { + if (obj && obj->prop && obj->type == OBJTYPE_AUTOGUN) { struct autogunobj *autogun = (struct autogunobj *)obj; autogun->autogun_type = cmd[3]; autogun->unka4 = 0; @@ -13893,11 +13893,11 @@ bool aiIfChrWeaponEquipped(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - struct position *pos = chr ? chr->pos : NULL; + struct prop *prop = chr ? chr->prop : NULL; u8 is_using_weapon = false; - if (pos && pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(pos); + if (prop && prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(prop); u32 prevplayernum = g_Vars.currentplayernum; setCurrentPlayerNum(playernum); @@ -13932,8 +13932,8 @@ bool aiChrBeginOrEndTeleport(void) s32 b; s32 c; - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { - playernum = posGetPlayerNum(chr->pos); + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { + playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); } @@ -13978,8 +13978,8 @@ bool aiIfChrTeleportFullWhite(void) s32 b; s32 c; - if (chr && chr->pos && chr->pos->type == POSITIONTYPE_PLAYER) { - u32 playernum = posGetPlayerNum(chr->pos); + if (chr && chr->prop && chr->prop->type == PROPTYPE_PLAYER) { + u32 playernum = propGetPlayerNum(chr->prop); setCurrentPlayerNum(playernum); } @@ -14143,7 +14143,7 @@ bool ai01cd(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - if (chr && chr->pos && chr->unk020) { + if (chr && chr->prop && chr->unk020) { func0f0245c8(chr, cmd[3]); } @@ -14277,7 +14277,7 @@ bool aiSetObjPartVisible(void) u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct defaultobj *obj = objFindByTagId(cmd[2]); - if (obj && obj->pos) { + if (obj && obj->prop) { objSetPartVisible(obj, cmd[3], cmd[4]); } @@ -14611,7 +14611,7 @@ glabel aiShowCutsceneChrs // for (i = getNumChrs() - 1; i >= 0; i--) { // chr = &g_Chrs[i]; // -// if (chr->chrnum >= 0 && chr->pos && (chr->hidden2 & 1)) { +// if (chr->chrnum >= 0 && chr->prop && (chr->hidden2 & 1)) { // chr->hidden2 = chr->hidden2 & ~1; // chr->chrflags = chr->chrflags & ~0x00000400; // } @@ -14621,7 +14621,7 @@ glabel aiShowCutsceneChrs // for (i = getNumChrs() - 1; i >= 0; i--) { // chr = &g_Chrs[i]; // -// if (chr->chrnum >= 0 && chr->pos && (chr->chrflags & 0x00800400) == 0) { +// if (chr->chrnum >= 0 && chr->prop && (chr->chrflags & 0x00800400) == 0) { // chr->hidden2 = chr->hidden2 | 1; // chr->chrflags = chr->chrflags | 0x00000400; // } @@ -14784,7 +14784,7 @@ glabel ai01d9 /* f05fe54: 87a50032 */ lh $a1,0x32($sp) /* f05fe58: 8fa6002c */ lw $a2,0x2c($sp) /* f05fe5c: afa80010 */ sw $t0,0x10($sp) -/* f05fe60: 0fc25010 */ jal audioPlayFromWorldPosition +/* f05fe60: 0fc25010 */ jal audioPlayFromProp /* f05fe64: afa90014 */ sw $t1,0x14($sp) /* f05fe68: 3c03800a */ lui $v1,%hi(g_Vars) /* f05fe6c: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) @@ -14797,7 +14797,7 @@ glabel ai01d9 /* f05fe88: 00001025 */ or $v0,$zero,$zero ); -// Matches if channel argument to audioPlayFromWorldPosition is changed to s32, +// Matches if channel argument to audioPlayFromProp is changed to s32, // but this causes other code to mismatch. //bool ai01d9(void) //{ @@ -14809,7 +14809,7 @@ glabel ai01d9 // s16 unk2 = cmd[8]; // struct defaultobj *obj = objFindByTagId(cmd[3]); // -// audioPlayFromWorldPosition(channel, audio_id, volumemaybe, obj->pos, unk2, unk1); +// audioPlayFromProp(channel, audio_id, volumemaybe, obj->prop, unk2, unk1); // // g_Vars.aioffset += 11; // @@ -14970,8 +14970,8 @@ glabel ai01de */ bool ai01e0(void) { - if (g_Vars.chrdata && g_Vars.chrdata->pos) { - u32 index = ((s32)g_Vars.chrdata->pos - (s32)g_Vars.positions) / 0x48; + if (g_Vars.chrdata && g_Vars.chrdata->prop) { + u32 index = ((s32)g_Vars.chrdata->prop - (s32)g_Vars.props) / 0x48; func0f020f90(index); } @@ -14985,8 +14985,8 @@ bool ai01e0(void) */ bool ai01b4(void) { - if (g_Vars.chrdata && g_Vars.chrdata->pos && - func0f01f264(g_Vars.chrdata, &g_Vars.chrdata->pos->coord, &g_Vars.chrdata->pos->room, 0, 0)) { + if (g_Vars.chrdata && g_Vars.chrdata->prop && + func0f01f264(g_Vars.chrdata, &g_Vars.chrdata->prop->coord, &g_Vars.chrdata->prop->room, 0, 0)) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]); } else { diff --git a/src/game/game_0601b0.c b/src/game/game_0601b0.c index a5128ba57..0d22c39c4 100644 --- a/src/game/game_0601b0.c +++ b/src/game/game_0601b0.c @@ -1507,7 +1507,7 @@ glabel func0f060db8 /* f0613c4: 02002025 */ or $a0,$s0,$zero /* f0613c8: 51e00013 */ beqzl $t7,.L0f061418 /* f0613cc: 92020000 */ lbu $v0,0x0($s0) -/* f0613d0: 0fc4a25f */ jal posGetPlayerNum +/* f0613d0: 0fc4a25f */ jal propGetPlayerNum /* f0613d4: afa306d8 */ sw $v1,0x6d8($sp) /* f0613d8: 3c0a800a */ lui $t2,0x800a /* f0613dc: 8d4aa24c */ lw $t2,-0x5db4($t2) @@ -2638,7 +2638,7 @@ glabel func0f062270 /* f062394: 00000000 */ sll $zero,$zero,0x0 /* f062398: 10800007 */ beqz $a0,.L0f0623b8 /* f06239c: 00000000 */ sll $zero,$zero,0x0 -/* f0623a0: 0fc4a25f */ jal posGetPlayerNum +/* f0623a0: 0fc4a25f */ jal propGetPlayerNum /* f0623a4: 02602025 */ or $a0,$s3,$zero /* f0623a8: 3c0a800a */ lui $t2,0x800a /* f0623ac: 8d4aa24c */ lw $t2,-0x5db4($t2) @@ -5433,7 +5433,7 @@ glabel func0f064a24 .L0f064b1c: /* f064b1c: 56830057 */ bnel $s4,$v1,.L0f064c7c /* f064b20: 2673fc98 */ addiu $s3,$s3,-872 -/* f064b24: 0fc4a25f */ jal posGetPlayerNum +/* f064b24: 0fc4a25f */ jal propGetPlayerNum /* f064b28: 02202025 */ or $a0,$s1,$zero /* f064b2c: 8e48028c */ lw $t0,0x28c($s2) /* f064b30: 50480052 */ beql $v0,$t0,.L0f064c7c @@ -5469,7 +5469,7 @@ glabel func0f064a24 /* f064ba4: 922f0000 */ lbu $t7,0x0($s1) /* f064ba8: 568f000a */ bnel $s4,$t7,.L0f064bd4 /* f064bac: 8e420284 */ lw $v0,0x284($s2) -/* f064bb0: 0fc4a25f */ jal posGetPlayerNum +/* f064bb0: 0fc4a25f */ jal propGetPlayerNum /* f064bb4: 02202025 */ or $a0,$s1,$zero /* f064bb8: 0002c080 */ sll $t8,$v0,0x2 /* f064bbc: 0258c821 */ addu $t9,$s2,$t8 @@ -5925,7 +5925,7 @@ glabel func0f064ce8 /* f06522c: 8eb90284 */ lw $t9,0x284($s5) /* f065230: 5461003d */ bnel $v1,$at,.L0f065328 /* f065234: 8eaa0348 */ lw $t2,0x348($s5) -/* f065238: 0fc4a25f */ jal posGetPlayerNum +/* f065238: 0fc4a25f */ jal propGetPlayerNum /* f06523c: 02202025 */ or $a0,$s1,$zero /* f065240: 8ead028c */ lw $t5,0x28c($s5) /* f065244: 504d0038 */ beql $v0,$t5,.L0f065328 @@ -6193,7 +6193,7 @@ glabel func0f06554c /* f0655ec: 10000068 */ beqz $zero,.L0f065790 /* f0655f0: 00003025 */ or $a2,$zero,$zero .L0f0655f4: -/* f0655f4: 0fc4a25f */ jal posGetPlayerNum +/* f0655f4: 0fc4a25f */ jal propGetPlayerNum /* f0655f8: afa6001c */ sw $a2,0x1c($sp) /* f0655fc: 3c04800a */ lui $a0,%hi(g_Vars) /* f065600: 24849fc0 */ addiu $a0,$a0,%lo(g_Vars) diff --git a/src/game/game_066310.c b/src/game/game_066310.c index 358c326a6..33de7996f 100644 --- a/src/game/game_066310.c +++ b/src/game/game_066310.c @@ -8803,7 +8803,7 @@ glabel func0f06c8ac /* f06cb20: 24010006 */ addiu $at,$zero,0x6 /* f06cb24: 5441003a */ bnel $v0,$at,.L0f06cc10 /* f06cb28: 92080000 */ lbu $t0,0x0($s0) -/* f06cb2c: 0fc4a25f */ jal posGetPlayerNum +/* f06cb2c: 0fc4a25f */ jal propGetPlayerNum /* f06cb30: 02002025 */ or $a0,$s0,$zero /* f06cb34: 00025080 */ sll $t2,$v0,0x2 /* f06cb38: 026a5821 */ addu $t3,$s3,$t2 @@ -8816,7 +8816,7 @@ glabel func0f06c8ac /* f06cb50: 24010006 */ addiu $at,$zero,0x6 /* f06cb54: 1441000e */ bne $v0,$at,.L0f06cb90 /* f06cb58: 8e110004 */ lw $s1,0x4($s0) -/* f06cb5c: 0fc4a25f */ jal posGetPlayerNum +/* f06cb5c: 0fc4a25f */ jal propGetPlayerNum /* f06cb60: 02002025 */ or $a0,$s0,$zero /* f06cb64: 00027080 */ sll $t6,$v0,0x2 /* f06cb68: 026e7821 */ addu $t7,$s3,$t6 @@ -8867,7 +8867,7 @@ glabel func0f06c8ac /* f06cc10: 24010006 */ addiu $at,$zero,0x6 /* f06cc14: 55010015 */ bnel $t0,$at,.L0f06cc6c /* f06cc18: 86a20002 */ lh $v0,0x2($s5) -/* f06cc1c: 0fc4a25f */ jal posGetPlayerNum +/* f06cc1c: 0fc4a25f */ jal propGetPlayerNum /* f06cc20: 02002025 */ or $a0,$s0,$zero /* f06cc24: 00024880 */ sll $t1,$v0,0x2 /* f06cc28: 02695021 */ addu $t2,$s3,$t1 @@ -12323,7 +12323,7 @@ glabel func0f06f54c /* f06fd30: 8c4400bc */ lw $a0,0xbc($v0) /* f06fd34: 5080000a */ beqzl $a0,.L0f06fd60 /* f06fd38: 8da202a0 */ lw $v0,0x2a0($t5) -/* f06fd3c: 0fc4a25f */ jal posGetPlayerNum +/* f06fd3c: 0fc4a25f */ jal propGetPlayerNum /* f06fd40: 00000000 */ sll $zero,$zero,0x0 /* f06fd44: 3c058007 */ lui $a1,%hi(var80069910) /* f06fd48: 3c0d800a */ lui $t5,%hi(g_Vars) @@ -12338,7 +12338,7 @@ glabel func0f06f54c /* f06fd68: 8c4400bc */ lw $a0,0xbc($v0) /* f06fd6c: 5080000a */ beqzl $a0,.L0f06fd98 /* f06fd70: 8cb90000 */ lw $t9,0x0($a1) -/* f06fd74: 0fc4a25f */ jal posGetPlayerNum +/* f06fd74: 0fc4a25f */ jal propGetPlayerNum /* f06fd78: afa30170 */ sw $v1,0x170($sp) /* f06fd7c: 8fa30170 */ lw $v1,0x170($sp) /* f06fd80: 24180001 */ addiu $t8,$zero,0x1 @@ -16264,7 +16264,7 @@ glabel func0f073478 /* f073548: 00025040 */ sll $t2,$v0,0x1 .L0f07354c: /* f07354c: e7ac0094 */ swc1 $f12,0x94($sp) -/* f073550: 0fc0a221 */ jal chrGetTargetPosition +/* f073550: 0fc0a221 */ jal chrGetTargetProp /* f073554: e7ae008c */ swc1 $f14,0x8c($sp) /* f073558: 24480028 */ addiu $t0,$v0,0x28 /* f07355c: afa80010 */ sw $t0,0x10($sp) @@ -16547,7 +16547,7 @@ glabel func0f073478 /* f073970: 10000034 */ beqz $zero,.L0f073a44 /* f073974: a5000062 */ sh $zero,0x62($t0) .L0f073978: -/* f073978: 0fc0a221 */ jal chrGetTargetPosition +/* f073978: 0fc0a221 */ jal chrGetTargetProp /* f07397c: 02802025 */ or $a0,$s4,$zero /* f073980: 8e09001c */ lw $t1,0x1c($s0) /* f073984: 14490029 */ bne $v0,$t1,.L0f073a2c @@ -18992,7 +18992,7 @@ glabel func0f073c6c /* f075d2c: 2627005c */ addiu $a3,$s1,0x5c /* f075d30: 8f18a24c */ lw $t8,-0x5db4($t8) /* f075d34: afa70070 */ sw $a3,0x70($sp) -/* f075d38: 0fc4a25f */ jal posGetPlayerNum +/* f075d38: 0fc4a25f */ jal propGetPlayerNum /* f075d3c: afb80164 */ sw $t8,0x164($sp) /* f075d40: 0fc4a24b */ jal setCurrentPlayerNum /* f075d44: 00402025 */ or $a0,$v0,$zero @@ -19040,7 +19040,7 @@ glabel func0f073c6c /* f075de0: 1441000e */ bne $v0,$at,.L0f075e1c /* f075de4: 00000000 */ sll $zero,$zero,0x0 /* f075de8: afa6015c */ sw $a2,0x15c($sp) -/* f075dec: 0fc4a25f */ jal posGetPlayerNum +/* f075dec: 0fc4a25f */ jal propGetPlayerNum /* f075df0: afa70070 */ sw $a3,0x70($sp) /* f075df4: 00025880 */ sll $t3,$v0,0x2 /* f075df8: 3c0f800a */ lui $t7,0x800a @@ -20936,7 +20936,7 @@ glabel func0f07766c .L0f077940: /* f077940: 1441009e */ bne $v0,$at,.L0f077bbc /* f077944: 02202025 */ or $a0,$s1,$zero -/* f077948: 0fc4a25f */ jal posGetPlayerNum +/* f077948: 0fc4a25f */ jal propGetPlayerNum /* f07794c: 8fd40004 */ lw $s4,0x4($s8) /* f077950: 928e0003 */ lbu $t6,0x3($s4) /* f077954: 24010030 */ addiu $at,$zero,0x30 @@ -22894,7 +22894,7 @@ glabel func0f078c78 /* f079554: afa30044 */ sw $v1,0x44($sp) /* f079558: afa800ac */ sw $t0,0xac($sp) /* f07955c: e7a00048 */ swc1 $f0,0x48($sp) -/* f079560: 0fc4a25f */ jal posGetPlayerNum +/* f079560: 0fc4a25f */ jal propGetPlayerNum /* f079564: e7b200a4 */ swc1 $f18,0xa4($sp) /* f079568: 3c09800a */ lui $t1,%hi(g_Vars) /* f07956c: 25299fc0 */ addiu $t1,$t1,%lo(g_Vars) @@ -24574,13 +24574,13 @@ glabel func0f07accc /* f07adb4: 27bd00f8 */ addiu $sp,$sp,0xf8 ); -struct position *heliGetTargetPosition(struct heliobj *heli) +struct prop *heliGetTargetProp(struct heliobj *heli) { if (heli->target == -1) { - return g_Vars.currentplayer->targetpos; + return g_Vars.currentplayer->prop; } - return g_Vars.positions + heli->target; + return g_Vars.props + heli->target; } GLOBAL_ASM( @@ -24609,7 +24609,7 @@ glabel func0f07ae18 /* f07ae34: c444007c */ lwc1 $f4,0x7c($v0) /* f07ae38: a3a00023 */ sb $zero,0x23($sp) /* f07ae3c: afa20024 */ sw $v0,0x24($sp) -/* f07ae40: 0fc1eb6e */ jal heliGetTargetPosition +/* f07ae40: 0fc1eb6e */ jal heliGetTargetProp /* f07ae44: e7a4001c */ swc1 $f4,0x1c($sp) /* f07ae48: 8fa40024 */ lw $a0,0x24($sp) /* f07ae4c: c4480008 */ lwc1 $f8,0x8($v0) @@ -24686,7 +24686,7 @@ glabel func0f07af34 /* f07af44: 1040001d */ beqz $v0,.L0f07afbc /* f07af48: 00402025 */ or $a0,$v0,$zero /* f07af4c: afa00020 */ sw $zero,0x20($sp) -/* f07af50: 0fc1eb6e */ jal heliGetTargetPosition +/* f07af50: 0fc1eb6e */ jal heliGetTargetProp /* f07af54: afa20024 */ sw $v0,0x24($sp) /* f07af58: 904e0000 */ lbu $t6,0x0($v0) /* f07af5c: 24010006 */ addiu $at,$zero,0x6 @@ -24944,7 +24944,7 @@ glabel heliFireRocket /* f07b2a8: 00803025 */ or $a2,$a0,$zero /* f07b2ac: 51c0004c */ beqzl $t6,.L0f07b3e0 /* f07b2b0: 8fbf0024 */ lw $ra,0x24($sp) -/* f07b2b4: 0fc1eb6e */ jal heliGetTargetPosition +/* f07b2b4: 0fc1eb6e */ jal heliGetTargetProp /* f07b2b8: afa600d0 */ sw $a2,0xd0($sp) /* f07b2bc: 8faf00d4 */ lw $t7,0xd4($sp) /* f07b2c0: 8fa600d0 */ lw $a2,0xd0($sp) @@ -25054,7 +25054,7 @@ glabel func0f07b3f0 /* f07b444: c44400cc */ lwc1 $f4,0xcc($v0) /* f07b448: e7b00110 */ swc1 $f16,0x110($sp) /* f07b44c: e7b0010c */ swc1 $f16,0x10c($sp) -/* f07b450: 0fc1eb6e */ jal heliGetTargetPosition +/* f07b450: 0fc1eb6e */ jal heliGetTargetProp /* f07b454: e7a400e0 */ swc1 $f4,0xe0($sp) /* f07b458: afa200dc */ sw $v0,0xdc($sp) /* f07b45c: afa000d4 */ sw $zero,0xd4($sp) @@ -26615,7 +26615,7 @@ glabel func0f07cacc /* f07caf4: afa40170 */ sw $a0,0x170($sp) /* f07caf8: 8c930004 */ lw $s3,0x4($a0) /* f07cafc: afb30168 */ sw $s3,0x168($sp) -/* f07cb00: 0fc1eb6e */ jal heliGetTargetPosition +/* f07cb00: 0fc1eb6e */ jal heliGetTargetProp /* f07cb04: 02602025 */ or $a0,$s3,$zero /* f07cb08: 8fa50170 */ lw $a1,0x170($sp) /* f07cb0c: afa2015c */ sw $v0,0x15c($sp) @@ -28766,7 +28766,7 @@ glabel func0f07e758 /* f07e988: 8c640088 */ lw $a0,0x88($v1) /* f07e98c: 5080000e */ beqzl $a0,.L0f07e9c8 /* f07e990: 8fa90254 */ lw $t1,0x254($sp) -/* f07e994: 0fc4a25f */ jal posGetPlayerNum +/* f07e994: 0fc4a25f */ jal propGetPlayerNum /* f07e998: afa3021c */ sw $v1,0x21c($sp) /* f07e99c: 3c07800a */ lui $a3,%hi(g_Vars) /* f07e9a0: 24e79fc0 */ addiu $a3,$a3,%lo(g_Vars) @@ -29791,7 +29791,7 @@ glabel func0f07f6d0 /* f07f854: 8e490004 */ lw $t1,0x4($s2) /* f07f858: 51200020 */ beqzl $t1,.L0f07f8dc /* f07f85c: 8e520020 */ lw $s2,0x20($s2) -/* f07f860: 0fc4a25f */ jal posGetPlayerNum +/* f07f860: 0fc4a25f */ jal propGetPlayerNum /* f07f864: 02402025 */ or $a0,$s2,$zero /* f07f868: 8eaa028c */ lw $t2,0x28c($s5) /* f07f86c: 504a001b */ beql $v0,$t2,.L0f07f8dc @@ -43004,7 +43004,7 @@ glabel func0f08b27c /* f08b2b0: afa20094 */ sw $v0,0x94($sp) .L0f08b2b4: /* f08b2b4: 8faf00b0 */ lw $t7,0xb0($sp) -/* f08b2b8: 0fc4a25f */ jal posGetPlayerNum +/* f08b2b8: 0fc4a25f */ jal propGetPlayerNum /* f08b2bc: 8de4001c */ lw $a0,0x1c($t7) /* f08b2c0: afa20094 */ sw $v0,0x94($sp) .L0f08b2c4: @@ -43155,7 +43155,7 @@ glabel func0f08b27c /* f08b4ec: 55e10023 */ bnel $t7,$at,.L0f08b57c /* f08b4f0: a20a00a9 */ sb $t2,0xa9($s0) /* f08b4f4: 8d08a24c */ lw $t0,-0x5db4($t0) -/* f08b4f8: 0fc4a25f */ jal posGetPlayerNum +/* f08b4f8: 0fc4a25f */ jal propGetPlayerNum /* f08b4fc: afa80030 */ sw $t0,0x30($sp) /* f08b500: 0fc4a24b */ jal setCurrentPlayerNum /* f08b504: 00402025 */ or $a0,$v0,$zero @@ -47581,7 +47581,7 @@ glabel func0f08f11c /* f08f2c0: 5040000e */ beqzl $v0,.L0f08f2fc /* f08f2c4: 822a0007 */ lb $t2,0x7($s1) .L0f08f2c8: -/* f08f2c8: 0fc0a221 */ jal chrGetTargetPosition +/* f08f2c8: 0fc0a221 */ jal chrGetTargetProp /* f08f2cc: 02202025 */ or $a0,$s1,$zero /* f08f2d0: 02202025 */ or $a0,$s1,$zero /* f08f2d4: 24450008 */ addiu $a1,$v0,0x8 @@ -53129,7 +53129,7 @@ glabel func0f0939f8 ); GLOBAL_ASM( -glabel audioPlayFromWorldPosition +glabel audioPlayFromProp /* f094040: 27bdffa0 */ addiu $sp,$sp,-96 /* f094044: 87ae0072 */ lh $t6,0x72($sp) /* f094048: afb00048 */ sw $s0,0x48($sp) @@ -53447,7 +53447,7 @@ glabel audioIfChannelIdle ); GLOBAL_ASM( -glabel audioPlayFromWorldPosition2 +glabel audioPlayFromProp2 /* f094494: 27bdffa8 */ addiu $sp,$sp,-88 /* f094498: 8fb90068 */ lw $t9,0x68($sp) /* f09449c: 3c0a8007 */ lui $t2,%hi(var8006ae10) diff --git a/src/game/game_097a50.c b/src/game/game_097a50.c index f5391ee53..e57ba34a2 100644 --- a/src/game/game_097a50.c +++ b/src/game/game_097a50.c @@ -9222,7 +9222,7 @@ glabel func0f09ee18 /* f09f044: 10000004 */ beqz $zero,.L0f09f058 /* f09f048: 8e0f0040 */ lw $t7,0x40($s0) .L0f09f04c: -/* f09f04c: 0fc4a25f */ jal posGetPlayerNum +/* f09f04c: 0fc4a25f */ jal propGetPlayerNum /* f09f050: 8dc4001c */ lw $a0,0x1c($t6) /* f09f054: 8e0f0040 */ lw $t7,0x40($s0) .L0f09f058: diff --git a/src/game/game_0b28d0.c b/src/game/game_0b28d0.c index 2e6a5405f..289532e20 100644 --- a/src/game/game_0b28d0.c +++ b/src/game/game_0b28d0.c @@ -10220,7 +10220,7 @@ glabel func0f0bb42c void func0f0bb57c(f32 arg0, f32 arg1) { - struct chrdata *chr = g_Vars.currentplayer->targetpos->chr; + struct chrdata *chr = g_Vars.currentplayer->prop->chr; if (chr) { g_Vars.currentplayer->unk0188 = 0; @@ -17539,7 +17539,7 @@ glabel func0f0c1e54 /* f0c1e54: 27bdffe0 */ addiu $sp,$sp,-32 /* f0c1e58: afbf0014 */ sw $ra,0x14($sp) /* f0c1e5c: afa40020 */ sw $a0,0x20($sp) -/* f0c1e60: 0fc4a25f */ jal posGetPlayerNum +/* f0c1e60: 0fc4a25f */ jal propGetPlayerNum /* f0c1e64: afa50024 */ sw $a1,0x24($sp) /* f0c1e68: 00027080 */ sll $t6,$v0,0x2 /* f0c1e6c: 3c0f800a */ lui $t7,0x800a @@ -17592,7 +17592,7 @@ glabel func0f0c1f08 /* f0c1f08: 27bdffe8 */ addiu $sp,$sp,-24 /* f0c1f0c: afbf0014 */ sw $ra,0x14($sp) /* f0c1f10: afa60020 */ sw $a2,0x20($sp) -/* f0c1f14: 0fc4a25f */ jal posGetPlayerNum +/* f0c1f14: 0fc4a25f */ jal propGetPlayerNum /* f0c1f18: afa5001c */ sw $a1,0x1c($sp) /* f0c1f1c: 3c06800a */ lui $a2,%hi(g_Vars) /* f0c1f20: 24c69fc0 */ addiu $a2,$a2,%lo(g_Vars) @@ -17715,7 +17715,7 @@ glabel func0f0c20b8 /* f0c20bc: afbf0014 */ sw $ra,0x14($sp) /* f0c20c0: afa5001c */ sw $a1,0x1c($sp) /* f0c20c4: afa70024 */ sw $a3,0x24($sp) -/* f0c20c8: 0fc4a25f */ jal posGetPlayerNum +/* f0c20c8: 0fc4a25f */ jal propGetPlayerNum /* f0c20cc: afa60020 */ sw $a2,0x20($sp) /* f0c20d0: 3c04800a */ lui $a0,%hi(g_Vars) /* f0c20d4: 24849fc0 */ addiu $a0,$a0,%lo(g_Vars) @@ -17855,7 +17855,7 @@ GLOBAL_ASM( glabel func0f0c228c /* f0c228c: 27bdffe0 */ addiu $sp,$sp,-32 /* f0c2290: afbf0014 */ sw $ra,0x14($sp) -/* f0c2294: 0fc4a25f */ jal posGetPlayerNum +/* f0c2294: 0fc4a25f */ jal propGetPlayerNum /* f0c2298: afa40020 */ sw $a0,0x20($sp) /* f0c229c: 00027080 */ sll $t6,$v0,0x2 /* f0c22a0: 3c04800a */ lui $a0,%hi(var800a0814) @@ -17863,7 +17863,7 @@ glabel func0f0c228c /* f0c22a8: 8c84a024 */ lw $a0,-0x5fdc($a0) /* f0c22ac: 0fc2b6ef */ jal func0f0adbbc /* f0c22b0: 24840814 */ addiu $a0,$a0,%lo(var800a0814) -/* f0c22b4: 0fc4a25f */ jal posGetPlayerNum +/* f0c22b4: 0fc4a25f */ jal propGetPlayerNum /* f0c22b8: 8fa40020 */ lw $a0,0x20($sp) /* f0c22bc: 00027880 */ sll $t7,$v0,0x2 /* f0c22c0: 3c04800a */ lui $a0,%hi(var800a0fb8) @@ -17919,7 +17919,7 @@ glabel func0f0c2364 /* f0c236c: afb20030 */ sw $s2,0x30($sp) /* f0c2370: afb1002c */ sw $s1,0x2c($sp) /* f0c2374: afb00028 */ sw $s0,0x28($sp) -/* f0c2378: 0fc4a25f */ jal posGetPlayerNum +/* f0c2378: 0fc4a25f */ jal propGetPlayerNum /* f0c237c: afa40100 */ sw $a0,0x100($sp) /* f0c2380: 3c12800a */ lui $s2,%hi(g_Vars) /* f0c2384: 26529fc0 */ addiu $s2,$s2,%lo(g_Vars) @@ -18499,7 +18499,7 @@ glabel func0f0c2a58 /* f0c2bc4: afa3005c */ sw $v1,0x5c($sp) /* f0c2bc8: afa50058 */ sw $a1,0x58($sp) /* f0c2bcc: afa60054 */ sw $a2,0x54($sp) -/* f0c2bd0: 0fc4a25f */ jal posGetPlayerNum +/* f0c2bd0: 0fc4a25f */ jal propGetPlayerNum /* f0c2bd4: e7a20030 */ swc1 $f2,0x30($sp) /* f0c2bd8: 00027080 */ sll $t6,$v0,0x2 /* f0c2bdc: 3c0f800a */ lui $t7,0x800a @@ -18750,7 +18750,7 @@ glabel func0f0c2a58 /* f0c2f4c: 00000000 */ sll $zero,$zero,0x0 /* f0c2f50: afa50038 */ sw $a1,0x38($sp) /* f0c2f54: e7ac0024 */ swc1 $f12,0x24($sp) -/* f0c2f58: 0fc4a25f */ jal posGetPlayerNum +/* f0c2f58: 0fc4a25f */ jal propGetPlayerNum /* f0c2f5c: e7b00020 */ swc1 $f16,0x20($sp) /* f0c2f60: 00024880 */ sll $t1,$v0,0x2 /* f0c2f64: 3c0a800a */ lui $t2,0x800a @@ -18990,7 +18990,7 @@ glabel func0f0c32a0 /* f0c32a4: afbf0014 */ sw $ra,0x14($sp) /* f0c32a8: afa40018 */ sw $a0,0x18($sp) /* f0c32ac: afa5001c */ sw $a1,0x1c($sp) -/* f0c32b0: 0fc4a25f */ jal posGetPlayerNum +/* f0c32b0: 0fc4a25f */ jal propGetPlayerNum /* f0c32b4: afa60020 */ sw $a2,0x20($sp) /* f0c32b8: 00027080 */ sll $t6,$v0,0x2 /* f0c32bc: 3c0f800a */ lui $t7,0x800a diff --git a/src/game/game_0c37d0.c b/src/game/game_0c37d0.c index 1a85f2d7f..ee71616d2 100644 --- a/src/game/game_0c37d0.c +++ b/src/game/game_0c37d0.c @@ -2393,7 +2393,7 @@ glabel func0f0c4fd8 /* f0c598c: 8e0d028c */ lw $t5,0x28c($s0) /* f0c5990: 00e02025 */ or $a0,$a3,$zero /* f0c5994: afa30104 */ sw $v1,0x104($sp) -/* f0c5998: 0fc4a25f */ jal posGetPlayerNum +/* f0c5998: 0fc4a25f */ jal propGetPlayerNum /* f0c599c: afad007c */ sw $t5,0x7c($sp) /* f0c59a0: 0fc4a24b */ jal setCurrentPlayerNum /* f0c59a4: 00402025 */ or $a0,$v0,$zero diff --git a/src/game/game_0c79f0.c b/src/game/game_0c79f0.c index 18692716f..f7f33f613 100644 --- a/src/game/game_0c79f0.c +++ b/src/game/game_0c79f0.c @@ -4559,7 +4559,7 @@ glabel func0f0cb79c /* f0cb7a8: afa40050 */ sw $a0,0x50($sp) /* f0cb7ac: afa60058 */ sw $a2,0x58($sp) /* f0cb7b0: 00a08025 */ or $s0,$a1,$zero -/* f0cb7b4: 0fc4a25f */ jal posGetPlayerNum +/* f0cb7b4: 0fc4a25f */ jal propGetPlayerNum /* f0cb7b8: 8c8400bc */ lw $a0,0xbc($a0) /* f0cb7bc: 00027880 */ sll $t7,$v0,0x2 /* f0cb7c0: 3c18800a */ lui $t8,0x800a @@ -4568,7 +4568,7 @@ glabel func0f0cb79c /* f0cb7cc: 8fb90050 */ lw $t9,0x50($sp) /* f0cb7d0: c70c19c4 */ lwc1 $f12,0x19c4($t8) /* f0cb7d4: 8f2400bc */ lw $a0,0xbc($t9) -/* f0cb7d8: 0fc4a25f */ jal posGetPlayerNum +/* f0cb7d8: 0fc4a25f */ jal propGetPlayerNum /* f0cb7dc: e7ac0034 */ swc1 $f12,0x34($sp) /* f0cb7e0: 3c014248 */ lui $at,0x4248 /* f0cb7e4: 44810000 */ mtc1 $at,$f0 diff --git a/src/game/game_0cf150.c b/src/game/game_0cf150.c index 9d2e63c8a..9f87c870b 100644 --- a/src/game/game_0cf150.c +++ b/src/game/game_0cf150.c @@ -426,7 +426,7 @@ glabel func0f0cf38c /* f0cf6a0: 5581000b */ bnel $t4,$at,.L0f0cf6d0 /* f0cf6a4: 02002025 */ or $a0,$s0,$zero /* f0cf6a8: 8dada24c */ lw $t5,-0x5db4($t5) -/* f0cf6ac: 0fc4a25f */ jal posGetPlayerNum +/* f0cf6ac: 0fc4a25f */ jal propGetPlayerNum /* f0cf6b0: afad004c */ sw $t5,0x4c($sp) /* f0cf6b4: 8fae004c */ lw $t6,0x4c($sp) /* f0cf6b8: 240f0001 */ addiu $t7,$zero,0x1 diff --git a/src/game/game_11ecf0.c b/src/game/game_11ecf0.c index a2486c26d..83cc308ed 100644 --- a/src/game/game_11ecf0.c +++ b/src/game/game_11ecf0.c @@ -10681,7 +10681,7 @@ void setCurrentPlayerNum(u32 playernum) } GLOBAL_ASM( -glabel posGetPlayerNum +glabel propGetPlayerNum /* f12897c: 3c0a800a */ lui $t2,%hi(g_Vars) /* f128980: 254a9fc0 */ addiu $t2,$t2,%lo(g_Vars) /* f128984: 8d42006c */ lw $v0,0x6c($t2) diff --git a/src/game/game_129900.c b/src/game/game_129900.c index ef0f9708d..3f9646a4f 100644 --- a/src/game/game_129900.c +++ b/src/game/game_129900.c @@ -1159,7 +1159,7 @@ glabel func0f129cfc /* f129d9c: 8f190020 */ lw $t9,0x20($t8) /* f129da0: 5320002b */ beqzl $t9,.L0f129e50 /* f129da4: 8eb90000 */ lw $t9,0x0($s5) -/* f129da8: 0fc0a221 */ jal chrGetTargetPosition +/* f129da8: 0fc0a221 */ jal chrGetTargetProp /* f129dac: 02022021 */ addu $a0,$s0,$v0 /* f129db0: 8ec80284 */ lw $t0,0x284($s6) /* f129db4: 8d0900bc */ lw $t1,0xbc($t0) @@ -23804,7 +23804,7 @@ glabel func0f13e4a8 /* f13e4d4: 24010006 */ addiu $at,$zero,0x6 /* f13e4d8: 15e10008 */ bne $t7,$at,.L0f13e4fc /* f13e4dc: 00000000 */ sll $zero,$zero,0x0 -/* f13e4e0: 0fc4a25f */ jal posGetPlayerNum +/* f13e4e0: 0fc4a25f */ jal propGetPlayerNum /* f13e4e4: 00000000 */ sll $zero,$zero,0x0 /* f13e4e8: 0fc4a24b */ jal setCurrentPlayerNum /* f13e4ec: 00402025 */ or $a0,$v0,$zero diff --git a/src/game/game_1668e0.c b/src/game/game_1668e0.c index 48c7b0911..39c6a0f98 100644 --- a/src/game/game_1668e0.c +++ b/src/game/game_1668e0.c @@ -2572,7 +2572,7 @@ glabel func0f1688fc /* f168940: 8c3977e0 */ lw $t9,%lo(var7f1b77e0)($at) /* f168944: 03200008 */ jr $t9 /* f168948: 00000000 */ sll $zero,$zero,0x0 -/* f16894c: 0fc4a25f */ jal posGetPlayerNum +/* f16894c: 0fc4a25f */ jal propGetPlayerNum /* f168950: 00c02025 */ or $a0,$a2,$zero /* f168954: 3c0a800a */ lui $t2,0x800a /* f168958: 8d4aa24c */ lw $t2,-0x5db4($t2) @@ -3046,7 +3046,7 @@ glabel func0f168f24 /* f168ff8: 24010006 */ addiu $at,$zero,0x6 /* f168ffc: 1441000b */ bne $v0,$at,.L0f16902c /* f169000: 00000000 */ sll $zero,$zero,0x0 -/* f169004: 0fc4a25f */ jal posGetPlayerNum +/* f169004: 0fc4a25f */ jal propGetPlayerNum /* f169008: 02402025 */ or $a0,$s2,$zero /* f16900c: 8e69028c */ lw $t1,0x28c($s3) /* f169010: 10490006 */ beq $v0,$t1,.L0f16902c diff --git a/src/game/game_187770.c b/src/game/game_187770.c index bdd47d32b..c1ccd414b 100644 --- a/src/game/game_187770.c +++ b/src/game/game_187770.c @@ -11685,7 +11685,7 @@ glabel func0f1915b4 /* f1915cc: 10000008 */ beqz $zero,.L0f1915f0 /* f1915d0: 8c620020 */ lw $v0,0x20($v1) .L0f1915d4: -/* f1915d4: 0fc4a25f */ jal posGetPlayerNum +/* f1915d4: 0fc4a25f */ jal propGetPlayerNum /* f1915d8: 8ca4001c */ lw $a0,0x1c($a1) /* f1915dc: 00027080 */ sll $t6,$v0,0x2 /* f1915e0: 3c0f800a */ lui $t7,0x800a @@ -11703,7 +11703,7 @@ GLOBAL_ASM( glabel func0f191600 /* f191600: 27bdffe8 */ addiu $sp,$sp,-24 /* f191604: afbf0014 */ sw $ra,0x14($sp) -/* f191608: 0fc0a221 */ jal chrGetTargetPosition +/* f191608: 0fc0a221 */ jal chrGetTargetProp /* f19160c: 00000000 */ sll $zero,$zero,0x0 /* f191610: 10400004 */ beqz $v0,.L0f191624 /* f191614: 00001825 */ or $v1,$zero,$zero @@ -11729,7 +11729,7 @@ glabel func0f191638 /* f191650: 51c1009b */ beql $t6,$at,.L0f1918c0 /* f191654: 8fbf0014 */ lw $ra,0x14($sp) /* f191658: afa40030 */ sw $a0,0x30($sp) -/* f19165c: 0fc0a221 */ jal chrGetTargetPosition +/* f19165c: 0fc0a221 */ jal chrGetTargetProp /* f191660: afa0002c */ sw $zero,0x2c($sp) /* f191664: afa20028 */ sw $v0,0x28($sp) /* f191668: 0fc633fe */ jal func0f18cff8 @@ -12010,7 +12010,7 @@ glabel func0f1918d0 /* f191a48: 00002825 */ or $a1,$zero,$zero /* f191a4c: 5040000c */ beqzl $v0,.L0f191a80 /* f191a50: 922402a0 */ lbu $a0,0x2a0($s1) -/* f191a54: 0fc0a221 */ jal chrGetTargetPosition +/* f191a54: 0fc0a221 */ jal chrGetTargetProp /* f191a58: 02202025 */ or $a0,$s1,$zero /* f191a5c: 02202025 */ or $a0,$s1,$zero /* f191a60: 0fc122a1 */ jal func0f048a84 @@ -13130,7 +13130,7 @@ glabel func0f19294c /* f1929c8: 5161000e */ beql $t3,$at,.L0f192a04 /* f1929cc: 8c8e02d4 */ lw $t6,0x2d4($a0) /* f1929d0: afa40018 */ sw $a0,0x18($sp) -/* f1929d4: 0fc0a221 */ jal chrGetTargetPosition +/* f1929d4: 0fc0a221 */ jal chrGetTargetProp /* f1929d8: afa5001c */ sw $a1,0x1c($sp) /* f1929dc: 8fa5001c */ lw $a1,0x1c($sp) /* f1929e0: 8fa40018 */ lw $a0,0x18($sp) @@ -13311,7 +13311,7 @@ glabel func0f192a74 /* f192c40: afa3003c */ sw $v1,0x3c($sp) /* f192c44: afa6001c */ sw $a2,0x1c($sp) /* f192c48: e7ae002c */ swc1 $f14,0x2c($sp) -/* f192c4c: 0fc0a221 */ jal chrGetTargetPosition +/* f192c4c: 0fc0a221 */ jal chrGetTargetProp /* f192c50: e7b00030 */ swc1 $f16,0x30($sp) /* f192c54: 8c4b0004 */ lw $t3,0x4($v0) /* f192c58: 3c05800a */ lui $a1,%hi(g_Vars) @@ -13687,7 +13687,7 @@ glabel func0f192e90 /* f19317c: 2411ffff */ addiu $s1,$zero,-1 /* f193180: 52380028 */ beql $s1,$t8,.L0f193224 /* f193184: 86a2017e */ lh $v0,0x17e($s5) -/* f193188: 0fc0a221 */ jal chrGetTargetPosition +/* f193188: 0fc0a221 */ jal chrGetTargetProp /* f19318c: 02a02025 */ or $a0,$s5,$zero /* f193190: 00408025 */ or $s0,$v0,$zero /* f193194: 0fc0e6a5 */ jal chrIsDead @@ -16277,7 +16277,7 @@ glabel func0f194b40 /* f19558c: 02802025 */ or $a0,$s4,$zero /* f195590: 13200007 */ beqz $t9,.L0f1955b0 /* f195594: 00000000 */ sll $zero,$zero,0x0 -/* f195598: 0fc0a221 */ jal chrGetTargetPosition +/* f195598: 0fc0a221 */ jal chrGetTargetProp /* f19559c: 2415002f */ addiu $s5,$zero,0x2f /* f1955a0: 0fc633fe */ jal func0f18cff8 /* f1955a4: 8c440004 */ lw $a0,0x4($v0) @@ -16616,14 +16616,14 @@ glabel func0f194b40 /* f195a60: 8e4d0128 */ lw $t5,0x128($s2) /* f195a64: 11a00010 */ beqz $t5,.L0f195aa8 /* f195a68: 00000000 */ sll $zero,$zero,0x0 -/* f195a6c: 0fc0a221 */ jal chrGetTargetPosition +/* f195a6c: 0fc0a221 */ jal chrGetTargetProp /* f195a70: 02802025 */ or $a0,$s4,$zero /* f195a74: 02802025 */ or $a0,$s4,$zero /* f195a78: 0fc64b70 */ jal func0f192dc0 /* f195a7c: 8c450004 */ lw $a1,0x4($v0) /* f195a80: 10400009 */ beqz $v0,.L0f195aa8 /* f195a84: 02802025 */ or $a0,$s4,$zero -/* f195a88: 0fc0a221 */ jal chrGetTargetPosition +/* f195a88: 0fc0a221 */ jal chrGetTargetProp /* f195a8c: 2415002f */ addiu $s5,$zero,0x2f /* f195a90: 0fc633fe */ jal func0f18cff8 /* f195a94: 8c440004 */ lw $a0,0x4($v0) @@ -17179,7 +17179,7 @@ glabel func0f194b40 /* f1962c0: 1000000b */ beqz $zero,.L0f1962f0 /* f1962c4: 46049001 */ sub.s $f0,$f18,$f4 .L0f1962c8: -/* f1962c8: 0fc4a25f */ jal posGetPlayerNum +/* f1962c8: 0fc4a25f */ jal propGetPlayerNum /* f1962cc: 8ca4001c */ lw $a0,0x1c($a1) /* f1962d0: 00026880 */ sll $t5,$v0,0x2 /* f1962d4: 02cd5821 */ addu $t3,$s6,$t5 @@ -17218,7 +17218,7 @@ glabel func0f194b40 /* f196340: 8698017e */ lh $t8,0x17e($s4) /* f196344: 13d8000a */ beq $s8,$t8,.L0f196370 /* f196348: 00000000 */ sll $zero,$zero,0x0 -/* f19634c: 0fc0a221 */ jal chrGetTargetPosition +/* f19634c: 0fc0a221 */ jal chrGetTargetProp /* f196350: 02802025 */ or $a0,$s4,$zero /* f196354: 02802025 */ or $a0,$s4,$zero /* f196358: 0fc64b70 */ jal func0f192dc0 @@ -17446,13 +17446,13 @@ glabel func0f194b40 /* f19667c: 868f017e */ lh $t7,0x17e($s4) /* f196680: 53cf000e */ beql $s8,$t7,.L0f1966bc /* f196684: 24190029 */ addiu $t9,$zero,0x29 -/* f196688: 0fc0a221 */ jal chrGetTargetPosition +/* f196688: 0fc0a221 */ jal chrGetTargetProp /* f19668c: 02802025 */ or $a0,$s4,$zero /* f196690: 0fc0e6a5 */ jal chrIsDead /* f196694: 8c440004 */ lw $a0,0x4($v0) /* f196698: 54400008 */ bnezl $v0,.L0f1966bc /* f19669c: 24190029 */ addiu $t9,$zero,0x29 -/* f1966a0: 0fc0a221 */ jal chrGetTargetPosition +/* f1966a0: 0fc0a221 */ jal chrGetTargetProp /* f1966a4: 02802025 */ or $a0,$s4,$zero /* f1966a8: 02802025 */ or $a0,$s4,$zero /* f1966ac: 0fc64b70 */ jal func0f192dc0 @@ -17511,7 +17511,7 @@ glabel func0f194b40 /* f196768: 8e490128 */ lw $t1,0x128($s2) /* f19676c: 11200031 */ beqz $t1,.L0f196834 /* f196770: 00000000 */ sll $zero,$zero,0x0 -/* f196774: 0fc0a221 */ jal chrGetTargetPosition +/* f196774: 0fc0a221 */ jal chrGetTargetProp /* f196778: 02802025 */ or $a0,$s4,$zero /* f19677c: 02802025 */ or $a0,$s4,$zero /* f196780: 0fc64b70 */ jal func0f192dc0 @@ -17553,7 +17553,7 @@ glabel func0f194b40 /* f196808: 02802025 */ or $a0,$s4,$zero /* f19680c: 45000009 */ bc1f .L0f196834 /* f196810: 00000000 */ sll $zero,$zero,0x0 -/* f196814: 0fc0a221 */ jal chrGetTargetPosition +/* f196814: 0fc0a221 */ jal chrGetTargetProp /* f196818: a28e02a0 */ sb $t6,0x2a0($s4) /* f19681c: 0fc633fe */ jal func0f18cff8 /* f196820: 8c440004 */ lw $a0,0x4($v0) @@ -17647,7 +17647,7 @@ glabel func0f194b40 /* f196960: 8e580128 */ lw $t8,0x128($s2) /* f196964: 53000012 */ beqzl $t8,.L0f1969b0 /* f196968: 8e4900dc */ lw $t1,0xdc($s2) -/* f19696c: 0fc0a221 */ jal chrGetTargetPosition +/* f19696c: 0fc0a221 */ jal chrGetTargetProp /* f196970: 02802025 */ or $a0,$s4,$zero /* f196974: 02802025 */ or $a0,$s4,$zero /* f196978: 0fc64b70 */ jal func0f192dc0 @@ -17655,7 +17655,7 @@ glabel func0f194b40 /* f196980: 1040000a */ beqz $v0,.L0f1969ac /* f196984: 240f002f */ addiu $t7,$zero,0x2f /* f196988: a28f02a0 */ sb $t7,0x2a0($s4) -/* f19698c: 0fc0a221 */ jal chrGetTargetPosition +/* f19698c: 0fc0a221 */ jal chrGetTargetProp /* f196990: 02802025 */ or $a0,$s4,$zero /* f196994: 0fc633fe */ jal func0f18cff8 /* f196998: 8c440004 */ lw $a0,0x4($v0) @@ -17822,7 +17822,7 @@ glabel func0f194b40 /* f196bd4: 868d017e */ lh $t5,0x17e($s4) /* f196bd8: 13cd0021 */ beq $s8,$t5,.L0f196c60 /* f196bdc: 00000000 */ sll $zero,$zero,0x0 -/* f196be0: 0fc0a221 */ jal chrGetTargetPosition +/* f196be0: 0fc0a221 */ jal chrGetTargetProp /* f196be4: 02802025 */ or $a0,$s4,$zero /* f196be8: 8e83001c */ lw $v1,0x1c($s4) /* f196bec: 00408025 */ or $s0,$v0,$zero @@ -18313,7 +18313,7 @@ glabel func0f194b40 /* f1972f8: 10400021 */ beqz $v0,.L0f197380 /* f1972fc: 00000000 */ sll $zero,$zero,0x0 .L0f197300: -/* f197300: 0fc0a221 */ jal chrGetTargetPosition +/* f197300: 0fc0a221 */ jal chrGetTargetProp /* f197304: 02802025 */ or $a0,$s4,$zero /* f197308: 0fc0e6a5 */ jal chrIsDead /* f19730c: 8c440004 */ lw $a0,0x4($v0) diff --git a/src/game/game_197600.c b/src/game/game_197600.c index 8478e6924..29e868e73 100644 --- a/src/game/game_197600.c +++ b/src/game/game_197600.c @@ -133,7 +133,7 @@ glabel func0f197600 /* f1976dc: afa60060 */ sw $a2,0x60($sp) /* f1976e0: afa7004c */ sw $a3,0x4c($sp) /* f1976e4: afa80054 */ sw $t0,0x54($sp) -/* f1976e8: 0fc0a221 */ jal chrGetTargetPosition +/* f1976e8: 0fc0a221 */ jal chrGetTargetProp /* f1976ec: afa90048 */ sw $t1,0x48($sp) /* f1976f0: 8fa7004c */ lw $a3,0x4c($sp) /* f1976f4: c4460008 */ lwc1 $f6,0x8($v0) @@ -192,7 +192,7 @@ glabel func0f197600 /* f1977c0: 11810008 */ beq $t4,$at,.L0f1977e4 /* f1977c4: 00000000 */ sll $zero,$zero,0x0 /* f1977c8: afa60060 */ sw $a2,0x60($sp) -/* f1977cc: 0fc0a221 */ jal chrGetTargetPosition +/* f1977cc: 0fc0a221 */ jal chrGetTargetProp /* f1977d0: afa80054 */ sw $t0,0x54($sp) /* f1977d4: 8fa80054 */ lw $t0,0x54($sp) /* f1977d8: 8fa60060 */ lw $a2,0x60($sp) @@ -1421,7 +1421,7 @@ glabel func0f198338 /* f198858: 11810014 */ beq $t4,$at,.L0f1988ac /* f19885c: 00000000 */ sll $zero,$zero,0x0 /* f198860: afa8004c */ sw $t0,0x4c($sp) -/* f198864: 0fc0a221 */ jal chrGetTargetPosition +/* f198864: 0fc0a221 */ jal chrGetTargetProp /* f198868: afaa0048 */ sw $t2,0x48($sp) /* f19886c: 0fc633fe */ jal func0f18cff8 /* f198870: 8c440004 */ lw $a0,0x4($v0) @@ -1462,7 +1462,7 @@ glabel func0f198338 /* f1988f0: 53210016 */ beql $t9,$at,.L0f19894c /* f1988f4: 2508fff1 */ addiu $t0,$t0,-15 /* f1988f8: afa8004c */ sw $t0,0x4c($sp) -/* f1988fc: 0fc0a221 */ jal chrGetTargetPosition +/* f1988fc: 0fc0a221 */ jal chrGetTargetProp /* f198900: afaa0048 */ sw $t2,0x48($sp) /* f198904: 0fc633fe */ jal func0f18cff8 /* f198908: 8c440004 */ lw $a0,0x4($v0) @@ -1519,7 +1519,7 @@ glabel func0f198338 /* f1989c4: 2401ffff */ addiu $at,$zero,-1 /* f1989c8: 51e1000c */ beql $t7,$at,.L0f1989fc /* f1989cc: 24080031 */ addiu $t0,$zero,0x31 -/* f1989d0: 0fc0a221 */ jal chrGetTargetPosition +/* f1989d0: 0fc0a221 */ jal chrGetTargetProp /* f1989d4: 03202025 */ or $a0,$t9,$zero /* f1989d8: 8c4b0004 */ lw $t3,0x4($v0) /* f1989dc: 00004025 */ or $t0,$zero,$zero @@ -1544,7 +1544,7 @@ glabel func0f198338 /* f198a20: 13010008 */ beq $t8,$at,.L0f198a44 /* f198a24: 01c02025 */ or $a0,$t6,$zero /* f198a28: afa8004c */ sw $t0,0x4c($sp) -/* f198a2c: 0fc0a221 */ jal chrGetTargetPosition +/* f198a2c: 0fc0a221 */ jal chrGetTargetProp /* f198a30: afaa0048 */ sw $t2,0x48($sp) /* f198a34: 8c4f0004 */ lw $t7,0x4($v0) /* f198a38: 8fa8004c */ lw $t0,0x4c($sp) @@ -2210,7 +2210,7 @@ glabel func0f198eec /* f199378: 2401ffff */ addiu $at,$zero,-1 /* f19937c: 51a10022 */ beql $t5,$at,.L0f199408 /* f199380: 8fa40090 */ lw $a0,0x90($sp) -/* f199384: 0fc0a221 */ jal chrGetTargetPosition +/* f199384: 0fc0a221 */ jal chrGetTargetProp /* f199388: 01802025 */ or $a0,$t4,$zero /* f19938c: 0fc633fe */ jal func0f18cff8 /* f199390: 8c440004 */ lw $a0,0x4($v0) @@ -2225,7 +2225,7 @@ glabel func0f198eec /* f1993b4: 00000000 */ sll $zero,$zero,0x0 /* f1993b8: 45020013 */ bc1fl .L0f199408 /* f1993bc: 8fa40090 */ lw $a0,0x90($sp) -/* f1993c0: 0fc0a221 */ jal chrGetTargetPosition +/* f1993c0: 0fc0a221 */ jal chrGetTargetProp /* f1993c4: 01c02025 */ or $a0,$t6,$zero /* f1993c8: 0fc633fe */ jal func0f18cff8 /* f1993cc: 8c440004 */ lw $a0,0x4($v0) diff --git a/src/game/game_1999b0.c b/src/game/game_1999b0.c index 5050d6fb8..5b3b63299 100644 --- a/src/game/game_1999b0.c +++ b/src/game/game_1999b0.c @@ -603,7 +603,7 @@ glabel func0f199f84 /* f19a084: 924c0000 */ lbu $t4,0x0($s2) /* f19a088: 5581001b */ bnel $t4,$at,.L0f19a0f8 /* f19a08c: 82180007 */ lb $t8,0x7($s0) -/* f19a090: 0fc4a25f */ jal posGetPlayerNum +/* f19a090: 0fc4a25f */ jal propGetPlayerNum /* f19a094: 02402025 */ or $a0,$s2,$zero /* f19a098: 00026880 */ sll $t5,$v0,0x2 /* f19a09c: 3c03800a */ lui $v1,0x800a @@ -837,7 +837,7 @@ glabel func0f19a37c /* f19a3c0: 8d4a84a0 */ lw $t2,-0x7b60($t2) /* f19a3c4: e7a00050 */ swc1 $f0,0x50($sp) /* f19a3c8: 02002025 */ or $a0,$s0,$zero -/* f19a3cc: 0fc0a221 */ jal chrGetTargetPosition +/* f19a3cc: 0fc0a221 */ jal chrGetTargetProp /* f19a3d0: afaa0048 */ sw $t2,0x48($sp) /* f19a3d4: 8e0b02d4 */ lw $t3,0x2d4($s0) /* f19a3d8: 02002025 */ or $a0,$s0,$zero @@ -1230,7 +1230,7 @@ glabel func0f19a850 /* f19a964: 316c0080 */ andi $t4,$t3,0x80 /* f19a968: 51800040 */ beqzl $t4,.L0f19aa6c /* f19a96c: 8fbf004c */ lw $ra,0x4c($sp) -/* f19a970: 0fc0a221 */ jal chrGetTargetPosition +/* f19a970: 0fc0a221 */ jal chrGetTargetProp /* f19a974: 02202025 */ or $a0,$s1,$zero /* f19a978: 3c01bf80 */ lui $at,0xbf80 /* f19a97c: 44810000 */ mtc1 $at,$f0 diff --git a/src/include/commands.h b/src/include/commands.h index e06675fc7..a74c12706 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -349,7 +349,7 @@ mkshort(0x0046), \ label, -#define if_bitcheck_in_position_struct(label) \ +#define if_bitcheck_in_prop_struct(label) \ mkshort(0x0047), \ label, @@ -1604,7 +1604,7 @@ // value is either 25, 70 or 335. // u1 is either 1 or 2. -// It seems related to the chr's position properties +// It seems related to the chr's prop properties // Used by G5 cloaked guards, Deep Sea cloaked purple guards and globals.s // I think this is related to flanking, where the value arg is the angle // relative to the player's direction. 335 is the same as 25 degress to the @@ -1814,9 +1814,9 @@ label, // If bool is false, run some function on the chr and their gun ground -// position, then follow the label. +// prop, then follow the label. // If bool is true, don't call the function, and only follow the label if field -// 0x4 in the gun ground position struct is less than 64. +// 0x4 in the gun ground prop struct is less than 64. #define if_gun_landed(bool, label) \ mkshort(0x0170), \ bool, \ @@ -2055,9 +2055,9 @@ mkshort(0x01a3), \ value, -#define display_text(position, color, text) \ +#define display_text(prop, color, text) \ mkshort(0x01a4), \ - position, \ + prop, \ color, \ mkshort(text), @@ -2407,7 +2407,7 @@ mkshort(0x01de), \ label, -// Something to do with the chr's position struct +// Something to do with the chr's prop struct #define cmd01e0 \ mkshort(0x01e0), diff --git a/src/include/constants.h b/src/include/constants.h index 1e7722fb3..139d60939 100644 --- a/src/include/constants.h +++ b/src/include/constants.h @@ -630,12 +630,12 @@ #define PATHTYPE_CIRCULAR 1 #define PATHTYPE_FLYING 2 -#define POSITIONTYPE_1 1 -#define POSITIONTYPE_DOOR 2 -#define POSITIONTYPE_CHR 3 -#define POSITIONTYPE_WEAPON 4 -#define POSITIONTYPE_5 5 -#define POSITIONTYPE_PLAYER 6 +#define PROPTYPE_1 1 +#define PROPTYPE_DOOR 2 +#define PROPTYPE_CHR 3 +#define PROPTYPE_WEAPON 4 +#define PROPTYPE_5 5 +#define PROPTYPE_PLAYER 6 #define RACE_HUMAN 0 #define RACE_SKEDAR 1 diff --git a/src/include/game/chr/chr.h b/src/include/game/chr/chr.h index 5b13aff26..097581704 100644 --- a/src/include/game/chr/chr.h +++ b/src/include/game/chr/chr.h @@ -16,7 +16,7 @@ f32 chrGetLateralDistanceToCoord(struct chrdata *chr, struct coord *coord); f32 chrGetLateralDistanceToPad(struct chrdata *chr, s32 pad_id); f32 chrGetSameFloorDistanceToPad(struct chrdata *chr, s32 pad_id); f32 chrGetSquaredDistanceToCoord(struct chrdata *chr, struct coord *coord); -struct position *chrGetTargetPosition(struct chrdata *chr); +struct prop *chrGetTargetProp(struct chrdata *chr); f32 chrGetTimer(struct chrdata *chr); bool chrHasFlag(struct chrdata *chr, u32 flag, u8 bank); bool chrHasFlagById(struct chrdata *ref, u32 chrnum, u32 flag, u32 bank); @@ -52,7 +52,7 @@ u32 func0f020668(void); u32 func0f020b14(void); u32 func0f020cc8(void); u32 func0f020d44(void); -void func0f020f90(s32 positionnum); +void func0f020f90(s32 propnum); u32 func0f021258(void); u32 func0f02133c(void); u32 func0f0213a0(void); @@ -157,7 +157,7 @@ void chrSidestep(struct chrdata *chr, s32 arg1); void func0f02fc2c(struct chrdata *chr); void chrJumpOut(struct chrdata *chr, s32 arg1); void func0f02fe18(struct chrdata *chr); -void chrRunToPos(struct chrdata *chr, struct coord *coord); +void chrRunToProp(struct chrdata *chr, struct coord *coord); void func0f030120(struct chrdata *chr, s32 thingtype, s32 thingid); void func0f030308(struct chrdata *chr, s32 thingtype, s32 thingid); void func0f0303a0(struct chrdata *chr, s32 thingtype, s32 thingid); @@ -253,7 +253,7 @@ u32 chrTrySurrender(struct chrdata *chr); bool chrFadeOut(struct chrdata *chr); bool chrGoToTarget(struct chrdata *chr, u32 speed); bool chrGoToChr(struct chrdata *chr, u32 dst_chrnum, u32 speed); -bool func0f03ab74(struct chrdata *chr, struct position *pos, s32 arg2); +bool func0f03ab74(struct chrdata *chr, struct prop *prop, s32 arg2); u32 func0f03abd0(void); u32 func0f03aca0(struct chrdata *chr, u32 arg1, u32 arg2); bool chrTryStop(struct chrdata *chr); @@ -415,9 +415,9 @@ u32 func0f04e418(void); u32 getNumChrs(void); void incrementByte(u8 *dst, u8 amount); s32 chrResolvePadId(struct chrdata *chr, s32 pad_id); -f32 positionGetDistanceToPosition(struct position *a, struct position *b); -u32 positionGetIndexByChrId(struct chrdata *chr, s32 chrnum); -f32 positionGetLateralDistanceToPosition(struct position *a, struct position *b); +f32 propGetDistanceToProp(struct prop *a, struct prop *b); +u32 propGetIndexByChrId(struct chrdata *chr, s32 chrnum); +f32 propGetLateralDistanceToProp(struct prop *a, struct prop *b); void func0f01e760(void); #endif diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index 4a809ef76..95c421e1a 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -445,6 +445,6 @@ /*0x01df*/ bool aiIfChrSameFloorDistanceToPadLessThan(void); /*0x01e0*/ bool ai01e0(void); -void func0f05abdc(struct position *pos); +void func0f05abdc(struct prop *prop); #endif diff --git a/src/include/game/game_0601b0.h b/src/include/game/game_0601b0.h index 98f942a94..82ccbd8a0 100644 --- a/src/include/game/game_0601b0.h +++ b/src/include/game/game_0601b0.h @@ -4,13 +4,13 @@ #include "types.h" u32 func0f0601b0(void); -u32 func0f0602f0(struct position *pos); -u32 func0f060300(struct position *pos); +u32 func0f0602f0(struct prop *prop); +u32 func0f060300(struct prop *prop); u32 func0f060358(void); u32 func0f060438(void); -void func0f0604bc(struct position *pos); +void func0f0604bc(struct prop *prop); u32 func0f060538(void); -u32 func0f0605c4(struct position *pos); +u32 func0f0605c4(struct prop *prop); u32 func0f060698(void); u32 func0f0606c0(void); u32 func0f06071c(void); @@ -46,8 +46,8 @@ u32 func0f0658e8(void); u32 func0f06593c(void); u32 func0f0659e4(void); u32 func0f065ae0(void); -void func0f065c44(struct position *pos); -void func0f065cb0(struct position *pos); +void func0f065c44(struct prop *prop); +void func0f065cb0(struct prop *prop); u32 func0f065d1c(void); u32 func0f065dd8(void); u32 func0f065dfc(void); diff --git a/src/include/game/game_066310.h b/src/include/game/game_066310.h index 9bf9cc48b..9b40870b4 100644 --- a/src/include/game/game_066310.h +++ b/src/include/game/game_066310.h @@ -6,7 +6,7 @@ void alarmActivate(void); void alarmDeactivate(void); bool alarmIsActive(void); -bool audioPlayFromWorldPosition(s8 channel_id, s16 audio_id, s32 volumemaybe, struct position *pos, s32 arg4, s32 arg5); +bool audioPlayFromProp(s8 channel_id, s16 audio_id, s32 volumemaybe, struct prop *prop, s32 arg4, s32 arg5); f32 countdownTimerGetValue(void); bool countdownTimerIsHidden(void); bool countdownTimerIsRunning(void); @@ -14,7 +14,7 @@ void countdownTimerSetRunning(bool running); void countdownTimerSetValue(f32 frames); void countdownTimerSetVisible(u32 flag, bool show); void countdownTimerTick(void); -u32 func0f066310(struct position *pos, u32 arg1); +u32 func0f066310(struct prop *prop, u32 arg1); u32 func0f0665ac(void); u32 func0f066640(void); u32 func0f0666cc(void); @@ -92,7 +92,7 @@ u32 func0f06a620(void); u32 func0f06a730(void); u32 func0f06ab60(void); u32 func0f06ac40(void); -void func0f06ac90(struct position *pos); +void func0f06ac90(struct prop *prop); void setupParseObject(u32 *ptr, bool arg1, bool arg2); void setupParseObjectWithArg2False(u32 *ptr, bool arg1); u32 func0f06b36c(void); @@ -126,7 +126,7 @@ u32 func0f07092c(void); u32 func0f070a1c(void); u32 func0f070bd0(void); u32 func0f070ca0(void); -void liftActivate(struct position *pos, u32 arg1); +void liftActivate(struct prop *prop, u32 arg1); u32 func0f070e58(void); u32 func0f070eac(void); u32 func0f070f08(void); @@ -206,7 +206,7 @@ void func0f082964(struct attachment *attachment, s32 arg1); u32 func0f082a1c(void); u32 func0f082d74(void); u32 func0f082e84(void); -u32 func0f082f88(struct position *pos); +u32 func0f082f88(struct prop *prop); u32 func0f08307c(void); u32 func0f083db0(void); u32 func0f0840ac(void); @@ -229,7 +229,7 @@ u32 func0f086918(void); u32 objIsHealthy(struct defaultobj *obj); u32 func0f0869cc(void); u32 func0f086d60(void); -void func0f086f40(struct position *pos); +void func0f086f40(struct prop *prop); u32 func0f087420(void); u32 func0f087458(void); u32 func0f08756c(void); @@ -246,7 +246,7 @@ u32 func0f08819c(void); u32 func0f088254(void); u32 func0f08841c(void); u32 func0f0887c8(void); -u32 func0f088840(struct position *pos, s32 arg1); +u32 func0f088840(struct prop *prop, s32 arg1); u32 func0f089014(void); u32 func0f0899dc(void); u32 func0f089a94(void); @@ -322,7 +322,7 @@ u32 func0f08f538(void); u32 func0f08f604(void); u32 func0f08f968(void); u32 func0f08fcb8(void); -void func0f08fee8(struct position *pos, s32 arg1); +void func0f08fee8(struct prop *prop, s32 arg1); u32 func0f08fffc(void); u32 func0f0900c0(void); u32 func0f09018c(void); @@ -351,7 +351,7 @@ u32 func0f0923d4(void); u32 func0f092420(void); u32 func0f092484(void); u32 func0f092610(void); -u32 func0f0926bc(struct position *pos, u32 arg1, u32 arg2); +u32 func0f0926bc(struct prop *prop, u32 arg1, u32 arg2); s32 func0f0927d4(f32 arg0, f32 arg1, f32 arg2, f32 arg3, s16 arg4); s32 func0f092914(s32 arg0); u32 func0f09294c(void); @@ -363,10 +363,10 @@ u32 func0f093508(void); u32 func0f093630(void); u32 func0f093790(void); u32 func0f0938ec(void); -void func0f0939f8(s32 arg0, struct position *pos, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14); +void func0f0939f8(s32 arg0, struct prop *prop, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7, s32 arg8, f32 arg9, s32 arg10, s32 arg11, f32 arg12, f32 arg13, f32 arg14); void audioMuteChannel(s32 channel); u32 audioIfChannelIdle(s32 channel); -bool audioPlayFromWorldPosition2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct position *pos, u32 arg4, s32 arg5, s32 arg6, s32 arg7); +bool audioPlayFromProp2(s8 channel_id, s32 audio_id, s32 volumemaybe, struct prop *prop, u32 arg4, s32 arg5, s32 arg6, s32 arg7); u32 func0f0946b0(void); u32 func0f094940(void); u32 func0f094b1c(void); @@ -395,7 +395,7 @@ u32 func0f0964b4(void); u32 func0f0965e4(void); u32 func0f096698(void); u32 func0f096700(void); -struct position *heliGetTargetPosition(struct heliobj *heli); +struct prop *heliGetTargetProp(struct heliobj *heli); struct defaultobj *objFindByTagId(s32 tag_id); struct tag *tagFindById(s32 tag_id); diff --git a/src/include/game/game_0c79f0.h b/src/include/game/game_0c79f0.h index e49d6ab6e..919b720b4 100644 --- a/src/include/game/game_0c79f0.h +++ b/src/include/game/game_0c79f0.h @@ -16,7 +16,7 @@ u32 func0f0c7bd0(void); u32 func0f0c7c34(void); u32 func0f0c7c98(void); u32 func0f0c7cc4(void); -void currentPlayerGrabProp(struct position *pos); +void currentPlayerGrabProp(struct prop *prop); void func0f0c7d30(u32 arg0); void releaseObj(u32 arg0); u32 func0f0c7f2c(void); diff --git a/src/include/game/game_111600.h b/src/include/game/game_111600.h index b884b34e9..c3c5dbd7e 100644 --- a/src/include/game/game_111600.h +++ b/src/include/game/game_111600.h @@ -30,7 +30,7 @@ u32 func0f11253c(void); u32 func0f112790(void); u32 func0f112844(void); u32 func0f112884(void); -u32 currentPlayerHasProp(struct position *pos); +u32 currentPlayerHasProp(struct prop *prop); u32 func0f112950(void); u32 func0f112a58(void); u32 func0f112bc0(void); diff --git a/src/include/game/game_11ecf0.h b/src/include/game/game_11ecf0.h index 26bfb4e30..59b8638b8 100644 --- a/src/include/game/game_11ecf0.h +++ b/src/include/game/game_11ecf0.h @@ -64,7 +64,7 @@ u32 func0f128cf0(void); u32 func0f128d20(void); u32 func0f128dbc(void); u32 func0f128ec8(void); -u32 posGetPlayerNum(struct position *pos); +u32 propGetPlayerNum(struct prop *prop); void setCurrentPlayerNum(u32 playernum); #endif diff --git a/src/include/game/game_129900.h b/src/include/game/game_129900.h index 8bb32d0ea..2afa9cfee 100644 --- a/src/include/game/game_129900.h +++ b/src/include/game/game_129900.h @@ -3,7 +3,7 @@ #include #include "types.h" -void func0f129900(struct position *pos, struct coord *coord, s16 room, s32 arg3, s32 arg4); +void func0f129900(struct prop *prop, struct coord *coord, s16 room, s32 arg3, s32 arg4); u32 func0f129940(void); u32 func0f129b08(void); u32 func0f129ba4(void); @@ -21,7 +21,7 @@ u32 func0f12d3f0(void); u32 func0f12e1c0(void); u32 func0f12e454(void); u32 func0f12e5b0(void); -void func0f12e714(struct position *pos, s32 arg1); +void func0f12e714(struct prop *prop, s32 arg1); u32 func0f12e74c(void); u32 func0f12e77c(void); u32 func0f12e820(void); @@ -31,7 +31,7 @@ u32 func0f12f230(void); u32 func0f12f5f8(void); u32 func0f12f6c0(void); u32 func0f12f95c(void); -void func0f12f9f0(s32 room, struct position *pos, struct coord *coord, s32 arg3, s32 arg4, s32 arg5); +void func0f12f9f0(s32 room, struct prop *prop, struct coord *coord, s32 arg3, s32 arg4, s32 arg5); u32 func0f130044(void); u32 func0f131060(void); u32 func0f1312d8(void); diff --git a/src/include/gvars/gvars.h b/src/include/gvars/gvars.h index 220703f15..d28c76472 100644 --- a/src/include/gvars/gvars.h +++ b/src/include/gvars/gvars.h @@ -90,7 +90,7 @@ struct g_vars { /*00032c*/ u32 unk00032c; /*000330*/ u32 unk000330; /*000334*/ u32 unk000334; - /*000338*/ struct position *positions; + /*000338*/ struct prop *props; /*00033c*/ u32 unk00033c; /*000340*/ u32 unk000340; /*000344*/ u32 unk000344; diff --git a/src/include/types.h b/src/include/types.h index 9f52d23f9..66b98bbb2 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -27,14 +27,14 @@ struct attachment { /** * Most, if not all, entity types (chrs, objs, weapons etc) have a pointer to a - * position struct. The struct contains properties that most entities have in + * prop struct. The struct contains properties that most entities have in * common such as coords and a room number. You can think of it as generic * entity. * * The type field indicates what type it is (chr, obj etc) and the entity * pointer points back to the proper entity struct. */ -struct position { +struct prop { u8 type; u8 flags; u16 unk02; @@ -276,7 +276,7 @@ struct chrdata { /*0x013*/ s8 path; /*0x014*/ u32 hidden; /*0x018*/ u32 chrflags; - /*0x01c*/ struct position *pos; + /*0x01c*/ struct prop *prop; /*0x020*/ struct chr020 *unk020; /*0x024*/ u32 chrwidth; /*0x028*/ u32 chrheight; @@ -373,7 +373,7 @@ struct chrdata { /*0x170*/ struct attachment *weapons_held[2]; /*0x178*/ u32 unk178; /*0x17c*/ s8 fireslot[2]; - /*0x17e*/ s16 target; // index into g_Vars.positions + /*0x17e*/ s16 target; // index into g_Vars.props /*0x180*/ f32 cshield; /*0x184*/ u8 cmnum; /*0x185*/ u8 cmnum2; @@ -425,7 +425,7 @@ struct chrdata { /*0x2fd*/ u8 ivebeenhit; /*0x2fe*/ u8 race; /*0x2ff*/ u8 blurnumtimesdied; - /*0x300*/ struct position *gungroundpos; + /*0x300*/ struct prop *gunprop; /*0x304*/ u32 pushspeed[2]; /*0x30c*/ u32 gunroty[2]; /*0x314*/ u32 gunrotx[2]; @@ -483,7 +483,7 @@ struct defaultobj { /*0x08*/ u32 flags; /*0x0c*/ u32 flags2; /*0x10*/ u32 flags3; - /*0x14*/ struct position *pos; + /*0x14*/ struct prop *prop; /*0x18*/ void *unk18; // probably same struct as chrdata->unk020 /*0x1c*/ f32 realrot[9]; /*0x40*/ u32 hidden; // most significant nibble is the playernum who holds the obj @@ -552,7 +552,7 @@ struct weaponobj { // objtype 0x08 /*0x08*/ u32 flags; /*0x0c*/ u32 flags2; /*0x10*/ u32 flags3; - /*0x14*/ struct position *pos; + /*0x14*/ struct prop *prop; /*0x18*/ u32 unk18; /*0x1c*/ f32 realrot[9]; /*0x40*/ u32 hidden; @@ -577,7 +577,7 @@ struct singlemonitorobj { // objtype 0x0a /*0x08*/ u32 flags; /*0x0c*/ u32 flags2; /*0x10*/ u32 flags3; - /*0x14*/ struct position *pos; + /*0x14*/ struct prop *prop; /*0x18*/ u32 unk18; /*0x1c*/ f32 realrot[9]; /*0x40*/ u32 hidden; @@ -710,7 +710,7 @@ struct player { /*0x00b0*/ u32 unk00b0; /*0x00b4*/ f32 unk00b4; /*0x00b8*/ u32 unk00b8; - /*0x00bc*/ struct position *targetpos; + /*0x00bc*/ struct prop *prop; /*0x00c0*/ u32 unk00c0; /*0x00c4*/ u32 unk00c4; /*0x00c8*/ u32 unk00c8; @@ -2080,7 +2080,7 @@ struct player { /*0x1618*/ u32 unk1618; /*0x161c*/ u32 unk161c; /*0x1620*/ u32 unk1620; - /*0x1624*/ struct position *lookingatprop; + /*0x1624*/ struct prop *lookingatprop; /*0x1628*/ u32 unk1628; /*0x162c*/ u32 unk162c; /*0x1630*/ u32 unk1630; diff --git a/src/setup/ailists.c b/src/setup/ailists.c index 10c0ec572..b213b149b 100644 --- a/src/setup/ailists.c +++ b/src/setup/ailists.c @@ -207,7 +207,7 @@ u8 func0006_unalerted[] = { label(0x13) dprint 'A','L',' ','O','N','A','R','D','\n',0, if_stage_is_not(STAGE_PELAGIC, /*goto*/ 0x16) - if_bitcheck_in_position_struct(/*goto*/ LABEL_HEARD_ALARM) + if_bitcheck_in_prop_struct(/*goto*/ LABEL_HEARD_ALARM) // Check if can see camspy label(0x16) @@ -2517,7 +2517,7 @@ u8 func0007_alerted[] = { chr_toggle_p1p2(CHR_SELF) set_target_chr(CHR_P1P2) if_chr_in_view(/*goto*/ 0x72) - if_bitcheck_in_position_struct(/*goto*/ 0x13) + if_bitcheck_in_prop_struct(/*goto*/ 0x13) endloop(0x71) // Out of view for 5 seconds - remove