From c59bc3c477a4b6cb0f6cb77be8472e047a3502bd Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Sun, 12 Jan 2020 08:30:47 +1000 Subject: [PATCH] Decompile func0f192438 --- src/game/game_187770.c | 24 ++++++------------------ src/include/game/game_187770.h | 2 +- src/include/types.h | 4 ++-- 3 files changed, 9 insertions(+), 21 deletions(-) diff --git a/src/game/game_187770.c b/src/game/game_187770.c index dc5f2bea9..cb6cdb83f 100644 --- a/src/game/game_187770.c +++ b/src/game/game_187770.c @@ -12636,24 +12636,12 @@ char *mpGetBotCommandName(s32 command) return textGet(g_MpBotCommands[command]); } -GLOBAL_ASM( -glabel func0f192438 -/* f192438: 8c8f02d4 */ lw $t7,0x2d4($a0) -/* f19243c: 240e0001 */ addiu $t6,$zero,0x1 -/* f192440: 3c18800a */ lui $t8,0x800a -/* f192444: a1ee0079 */ sb $t6,0x79($t7) -/* f192448: 8f18a2f8 */ lw $t8,-0x5d08($t8) -/* f19244c: 24010048 */ addiu $at,$zero,0x48 -/* f192450: 8c8902d4 */ lw $t1,0x2d4($a0) -/* f192454: 00b8c823 */ subu $t9,$a1,$t8 -/* f192458: 0321001a */ div $zero,$t9,$at -/* f19245c: 00004012 */ mflo $t0 -/* f192460: ad2800c0 */ sw $t0,0xc0($t1) -/* f192464: 8c8b02d4 */ lw $t3,0x2d4($a0) -/* f192468: 240a0001 */ addiu $t2,$zero,0x1 -/* f19246c: 03e00008 */ jr $ra -/* f192470: ad6a00d8 */ sw $t2,0xd8($t3) -); +void func0f192438(struct chrdata *chr, struct prop *prop) +{ + chr->unk2d4->unk79 = 1; + chr->unk2d4->unkc0_propindex = prop - g_Vars.props; + chr->unk2d4->unkd8 = 1; +} GLOBAL_ASM( glabel func0f192474 diff --git a/src/include/game/game_187770.h b/src/include/game/game_187770.h index 626bdb38c..4a81f8f1e 100644 --- a/src/include/game/game_187770.h +++ b/src/include/game/game_187770.h @@ -139,7 +139,7 @@ u32 func0f1918d0(void); u32 func0f191fa4(void); u32 func0f1921f8(void); char *mpGetBotCommandName(s32 command); -u32 func0f192438(void); +void func0f192438(struct chrdata *chr, struct prop *prop); u32 func0f192474(void); u32 func0f1924ac(void); u32 func0f1924e8(void); diff --git a/src/include/types.h b/src/include/types.h index 9cf9ea3e8..2328d38db 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -208,13 +208,13 @@ struct chr2d4 { /*0xb4*/ u32 unkb4; /*0xb8*/ u32 unkb8; /*0xbc*/ u32 unkbc; - /*0xc0*/ u32 unkc0; + /*0xc0*/ s32 unkc0_propindex; /*0xc4*/ u32 unkc4; /*0xc8*/ u32 unkc8; /*0xcc*/ u32 unkcc; /*0xd0*/ u32 unkd0; /*0xd4*/ u32 unkd4; - /*0xd8*/ u32 unkd8; + /*0xd8*/ s32 unkd8; /*0x0dc*/ u32 unk0dc; /*0x0e0*/ u32 unk0e0; /*0x0e4*/ u32 unk0e4;