From 0b19266e78fe2c39eb0ceda080259920d64f9a9e Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Thu, 25 Feb 2021 12:10:49 +1000 Subject: [PATCH] Decompile func0f19369c --- src/game/game_190260.c | 83 ++------------- src/game/game_197600.c | 188 ++++++++++++++++----------------- src/include/game/game_190260.h | 2 +- src/include/types.h | 5 +- 4 files changed, 109 insertions(+), 169 deletions(-) diff --git a/src/game/game_190260.c b/src/game/game_190260.c index 7b24524b9..276635319 100644 --- a/src/game/game_190260.c +++ b/src/game/game_190260.c @@ -3504,78 +3504,17 @@ s32 func0f193530(struct chrdata *chr, f32 range) return result; } -GLOBAL_ASM( -glabel func0f19369c -/* f19369c: 27bdffd8 */ addiu $sp,$sp,-40 -/* f1936a0: afbf0014 */ sw $ra,0x14($sp) -/* f1936a4: afa5002c */ sw $a1,0x2c($sp) -/* f1936a8: 8c8602d4 */ lw $a2,0x2d4($a0) -/* f1936ac: 3c028008 */ lui $v0,%hi(g_AibotWeaponPreferences) -/* f1936b0: 24427eb0 */ addiu $v0,$v0,%lo(g_AibotWeaponPreferences) -/* f1936b4: 8ccf0020 */ lw $t7,0x20($a2) -/* f1936b8: 00054040 */ sll $t0,$a1,0x1 -/* f1936bc: 00c86021 */ addu $t4,$a2,$t0 -/* f1936c0: 000fc100 */ sll $t8,$t7,0x4 -/* f1936c4: 0058c821 */ addu $t9,$v0,$t8 -/* f1936c8: 9729000e */ lhu $t1,0xe($t9) -/* f1936cc: 00803825 */ or $a3,$a0,$zero -/* f1936d0: 00095342 */ srl $t2,$t1,0xd -/* f1936d4: 000a5900 */ sll $t3,$t2,0x4 -/* f1936d8: 016a5823 */ subu $t3,$t3,$t2 -/* f1936dc: 000b5880 */ sll $t3,$t3,0x2 -/* f1936e0: a58b002c */ sh $t3,0x2c($t4) -/* f1936e4: 8c8602d4 */ lw $a2,0x2d4($a0) -/* f1936e8: 8ccd0020 */ lw $t5,0x20($a2) -/* f1936ec: 000d7900 */ sll $t7,$t5,0x4 -/* f1936f0: 004fc021 */ addu $t8,$v0,$t7 -/* f1936f4: 9719000e */ lhu $t9,0xe($t8) -/* f1936f8: afad0018 */ sw $t5,0x18($sp) -/* f1936fc: 01a02025 */ or $a0,$t5,$zero -/* f193700: 001954c0 */ sll $t2,$t9,0x13 -/* f193704: 05430024 */ bgezl $t2,.L0f193798 -/* f193708: 8fbf0014 */ lw $ra,0x14($sp) -/* f19370c: 8cc5004c */ lw $a1,0x4c($a2) -/* f193710: afa8001c */ sw $t0,0x1c($sp) -/* f193714: afa70028 */ sw $a3,0x28($sp) -/* f193718: 00055880 */ sll $t3,$a1,0x2 -/* f19371c: 0fc6667e */ jal weaponGetClipCapacityByFunction -/* f193720: 000b2fc2 */ srl $a1,$t3,0x1f -/* f193724: 8fa70028 */ lw $a3,0x28($sp) -/* f193728: 8faf002c */ lw $t7,0x2c($sp) -/* f19372c: 8fa8001c */ lw $t0,0x1c($sp) -/* f193730: 8ce602d4 */ lw $a2,0x2d4($a3) -/* f193734: 000fc080 */ sll $t8,$t7,0x2 -/* f193738: 00d8c821 */ addu $t9,$a2,$t8 -/* f19373c: 8f290024 */ lw $t1,0x24($t9) -/* f193740: 00c81821 */ addu $v1,$a2,$t0 -/* f193744: 846d002c */ lh $t5,0x2c($v1) -/* f193748: 00495023 */ subu $t2,$v0,$t1 -/* f19374c: 01aa0019 */ multu $t5,$t2 -/* f193750: 00007012 */ mflo $t6 -/* f193754: a46e002c */ sh $t6,0x2c($v1) -/* f193758: 8ceb02d4 */ lw $t3,0x2d4($a3) -/* f19375c: 01681821 */ addu $v1,$t3,$t0 -/* f193760: 846c002c */ lh $t4,0x2c($v1) -/* f193764: 0182001a */ div $zero,$t4,$v0 -/* f193768: 00007812 */ mflo $t7 -/* f19376c: a46f002c */ sh $t7,0x2c($v1) -/* f193770: 14400002 */ bnez $v0,.L0f19377c -/* f193774: 00000000 */ nop -/* f193778: 0007000d */ break 0x7 -.L0f19377c: -/* f19377c: 2401ffff */ addiu $at,$zero,-1 -/* f193780: 14410004 */ bne $v0,$at,.L0f193794 -/* f193784: 3c018000 */ lui $at,0x8000 -/* f193788: 15810002 */ bne $t4,$at,.L0f193794 -/* f19378c: 00000000 */ nop -/* f193790: 0006000d */ break 0x6 -.L0f193794: -/* f193794: 8fbf0014 */ lw $ra,0x14($sp) -.L0f193798: -/* f193798: 27bd0028 */ addiu $sp,$sp,0x28 -/* f19379c: 03e00008 */ jr $ra -/* f1937a0: 00000000 */ nop -); +void func0f19369c(struct chrdata *chr, s32 arg1) +{ + chr->aibot->unk02c[arg1] = g_AibotWeaponPreferences[chr->aibot->weaponnum].unk0e_00 * 60; + + if (g_AibotWeaponPreferences[chr->aibot->weaponnum].unk0e_03) { + s32 capacity = weaponGetClipCapacityByFunction(chr->aibot->weaponnum, chr->aibot->gunfunc); + + chr->aibot->unk02c[arg1] *= capacity - chr->aibot->loadedammo[arg1]; + chr->aibot->unk02c[arg1] /= capacity; + } +} GLOBAL_ASM( glabel func0f1937a4 diff --git a/src/game/game_197600.c b/src/game/game_197600.c index a95593883..3fb35c87b 100644 --- a/src/game/game_197600.c +++ b/src/game/game_197600.c @@ -29,100 +29,100 @@ f32 var80087e50[][3] = { }; struct aibotweaponpreference g_AibotWeaponPreferences[] = { - /*0x00*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0 }, // WEAPON_NONE - /*0x01*/ { 13, 13, 13, 13, 1, 1, 0, 0, 0, 0, 0, 0, 0 }, // WEAPON_UNARMED - /*0x02*/ { 56, 60, 84, 88, 1, 1, 1, 0, 30, 0, 10, 0, 0x2000 }, // WEAPON_FALCON2 - /*0x03*/ { 52, 60, 80, 88, 1, 1, 1, 0, 30, 0, 10, 0, 0x2000 }, // WEAPON_FALCON2_SILENCER - /*0x04*/ { 60, 60, 88, 88, 1, 1, 1, 0, 30, 0, 10, 0, 0x2000 }, // WEAPON_FALCON2_SCOPE - /*0x05*/ { 76, 88, 104, 120, 1, 1, 1, 2, 30, 30, 10, 10, 0x2000 }, // WEAPON_MAGSEC4 - /*0x06*/ { 64, 88, 92, 120, 1, 1, 1, 2, 30, 30, 10, 10, 0x2000 }, // WEAPON_MAULER - /*0x07*/ { 72, 76, 100, 120, 1, 1, 1, 2, 30, 30, 10, 10, 0x4000 }, // WEAPON_PHOENIX - /*0x08*/ { 68, 76, 96, 120, 1, 1, 1, 0, 30, 0, 8, 0, 0x6000 }, // WEAPON_DY357MAGNUM - /*0x09*/ { 180, 188, 184, 188, 1, 1, 1, 0, 20, 0, 6, 0, 0x6000 }, // WEAPON_DY357LX - /*0x0a*/ { 116, 128, 136, 152, 1, 1, 2, 2, 100, 100, 30, 30, 0x4000 }, // WEAPON_CMP150 - /*0x0b*/ { 120, 128, 132, 140, 1, 1, 2, 2, 150, 150, 50, 50, 0x4000 }, // WEAPON_CYCLONE - /*0x0c*/ { 152, 176, 0, 0, 1, 1, 2, 2, 100, 70, 25, 15, 0x4000 }, // WEAPON_CALLISTONTG - /*0x0d*/ { 172, 188, 0, 0, 1, 0, 2, 2, 300, 0, 40, 0, 0x4000 }, // WEAPON_RCP120 - /*0x0e*/ { 128, 140, 0, 0, 1, 1, 2, 2, 100, 0, 30, 0, 0x6000 }, // WEAPON_LAPTOPGUN - /*0x0f*/ { 124, 148, 0, 0, 1, 1, 2, 2, 90, 0, 30, 0, 0x2000 }, // WEAPON_DRAGON - /*0x10*/ { 156, 180, 0, 0, 1, 0, 2, 2, 150, 0, 40, 0, 0x4000 }, // WEAPON_K7AVENGER - /*0x11*/ { 148, 176, 0, 0, 1, 0, 2, 2, 120, 0, 40, 0, 0x4000 }, // WEAPON_AR34 - /*0x12*/ { 164, 188, 0, 0, 1, 1, 2, 3, 120, 20, 30, 6, 0x2000 }, // WEAPON_SUPERDRAGON - /*0x13*/ { 140, 156, 0, 0, 1, 1, 1, 1, 18, 18, 8, 8, 0xd000 }, // WEAPON_SHOTGUN - /*0x14*/ { 144, 176, 0, 0, 1, 1, 2, 0, 400, 0, 80, 0, 0x6000 }, // WEAPON_REAPER - /*0x15*/ { 28, 40, 0, 0, 1, 0, 2, 2, 30, 30, 10, 10, 0x4000 }, // WEAPON_SNIPERRIFLE - /*0x16*/ { 188, 188, 0, 0, 1, 0, 3, 5, 16, 0, 4, 0, 0x4000 }, // WEAPON_FARSIGHTXR20 - /*0x17*/ { 176, 188, 0, 0, 1, 1, 3, 3, 20, 20, 4, 4, 0x4000 }, // WEAPON_DEVASTATOR - /*0x18*/ { 160, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 0x4000 }, // WEAPON_ROCKETLAUNCHER - /*0x19*/ { 168, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 0x6000 }, // WEAPON_SLAYER - /*0x1a*/ { 20, 40, 24, 40, 1, 1, 0, 2, 0, 5, 0, 1, 0x2000 }, // WEAPON_COMBATKNIFE - /*0x1b*/ { 108, 176, 0, 0, 1, 1, 2, 2, 15, 15, 5, 5, 0x9000 }, // WEAPON_CROSSBOW - /*0x1c*/ { 48, 188, 0, 0, 1, 1, 2, 0, 20, 24, 6, 8, 0x2000 }, // WEAPON_TRANQUILIZER - /*0x1d*/ { 112, 112, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0x2000 }, // WEAPON_LASER - /*0x1e*/ { 36, 172, 0, 0, 1, 1, 7, 7, 6, 6, 2, 2, 0x2000 }, // WEAPON_GRENADE - /*0x1f*/ { 32, 188, 0, 0, 1, 1, 7, 7, 3, 3, 1, 1, 0x2000 }, // WEAPON_NBOMB - /*0x20*/ { 12, 12, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 0x2000 }, // WEAPON_TIMEDMINE - /*0x21*/ { 40, 176, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 0x2000 }, // WEAPON_PROXIMITYMINE - /*0x22*/ { 44, 156, 0, 0, 1, 0, 2, 2, 5, 5, 2, 2, 0x2000 }, // WEAPON_REMOTEMINE - /*0x23*/ { 8, 8, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_COMBATBOOST - /*0x24*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_PP9I - /*0x25*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_CC13 - /*0x26*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KL01313 - /*0x27*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KF7SPECIAL - /*0x28*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_ZZT - /*0x29*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DMC - /*0x2a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_AR53 - /*0x2b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_RCP45 - /*0x2c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_PSYCHOSISGUN - /*0x2d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_NIGHTVISION - /*0x2e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_EYESPY - /*0x2f*/ { 4, 4, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_XRAYSCANNER - /*0x30*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_IRSCANNER - /*0x31*/ { 218, 218, 0, 0, 0, 0, 2, 2, 1200, 0, 0, 0, 0x2000 }, // WEAPON_CLOAKINGDEVICE - /*0x32*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_HORIZONSCANNER - /*0x33*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_TESTER - /*0x34*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_ROCKETLAUNCHER_34 - /*0x35*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_ECMMINE - /*0x36*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DATAUPLINK - /*0x37*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_RTRACKER - /*0x38*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_PRESIDENTSCANNER - /*0x39*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DOORDECODER - /*0x3a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_AUTOSURGEON - /*0x3b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_EXPLOSIVES - /*0x3c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_SKEDARBOMB - /*0x3d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_COMMSRIDER - /*0x3e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_TRACERBUG - /*0x3f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_TARGETAMPLIFIER - /*0x40*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DISGUISE40 - /*0x41*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DISGUISE41 - /*0x42*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_FLIGHTPLANS - /*0x43*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_RESEARCHTAPE - /*0x44*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_BACKUPDISK - /*0x45*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD45 - /*0x46*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD46 - /*0x47*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD47 - /*0x48*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD48 - /*0x49*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD49 - /*0x4a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD4A - /*0x4b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD4B - /*0x4c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_KEYCARD4C - /*0x4d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_SUITCASE - /*0x4e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_BRIEFCASE - /*0x4f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_SHIELD - /*0x50*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_NECKLACE - /*0x51*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_HAMMER - /*0x52*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_52 - /*0x53*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_ROCKET - /*0x54*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_HOMINGROCKET - /*0x55*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_GRENADEROUND - /*0x56*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_BOLT - /*0x57*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_BRIEFCASE2 - /*0x58*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_ROCKET2 - /*0x59*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_59 - /*0x5a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_5A - /*0x5b*/ { 220, 220, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_MPSHIELD - /*0x5c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_DISABLED - /*0x5d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0x2000 }, // WEAPON_SUICIDEPILL + /*0x00*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0 }, // WEAPON_NONE + /*0x01*/ { 13, 13, 13, 13, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }, // WEAPON_UNARMED + /*0x02*/ { 56, 60, 84, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2 + /*0x03*/ { 52, 60, 80, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SILENCER + /*0x04*/ { 60, 60, 88, 88, 1, 1, 1, 0, 30, 0, 10, 0, 1, 0 }, // WEAPON_FALCON2_SCOPE + /*0x05*/ { 76, 88, 104, 120, 1, 1, 1, 2, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAGSEC4 + /*0x06*/ { 64, 88, 92, 120, 1, 1, 1, 2, 30, 30, 10, 10, 1, 0 }, // WEAPON_MAULER + /*0x07*/ { 72, 76, 100, 120, 1, 1, 1, 2, 30, 30, 10, 10, 2, 0 }, // WEAPON_PHOENIX + /*0x08*/ { 68, 76, 96, 120, 1, 1, 1, 0, 30, 0, 8, 0, 3, 0 }, // WEAPON_DY357MAGNUM + /*0x09*/ { 180, 188, 184, 188, 1, 1, 1, 0, 20, 0, 6, 0, 3, 0 }, // WEAPON_DY357LX + /*0x0a*/ { 116, 128, 136, 152, 1, 1, 2, 2, 100, 100, 30, 30, 2, 0 }, // WEAPON_CMP150 + /*0x0b*/ { 120, 128, 132, 140, 1, 1, 2, 2, 150, 150, 50, 50, 2, 0 }, // WEAPON_CYCLONE + /*0x0c*/ { 152, 176, 0, 0, 1, 1, 2, 2, 100, 70, 25, 15, 2, 0 }, // WEAPON_CALLISTONTG + /*0x0d*/ { 172, 188, 0, 0, 1, 0, 2, 2, 300, 0, 40, 0, 2, 0 }, // WEAPON_RCP120 + /*0x0e*/ { 128, 140, 0, 0, 1, 1, 2, 2, 100, 0, 30, 0, 3, 0 }, // WEAPON_LAPTOPGUN + /*0x0f*/ { 124, 148, 0, 0, 1, 1, 2, 2, 90, 0, 30, 0, 1, 0 }, // WEAPON_DRAGON + /*0x10*/ { 156, 180, 0, 0, 1, 0, 2, 2, 150, 0, 40, 0, 2, 0 }, // WEAPON_K7AVENGER + /*0x11*/ { 148, 176, 0, 0, 1, 0, 2, 2, 120, 0, 40, 0, 2, 0 }, // WEAPON_AR34 + /*0x12*/ { 164, 188, 0, 0, 1, 1, 2, 3, 120, 20, 30, 6, 1, 0 }, // WEAPON_SUPERDRAGON + /*0x13*/ { 140, 156, 0, 0, 1, 1, 1, 1, 18, 18, 8, 8, 6, 1 }, // WEAPON_SHOTGUN + /*0x14*/ { 144, 176, 0, 0, 1, 1, 2, 0, 400, 0, 80, 0, 3, 0 }, // WEAPON_REAPER + /*0x15*/ { 28, 40, 0, 0, 1, 0, 2, 2, 30, 30, 10, 10, 2, 0 }, // WEAPON_SNIPERRIFLE + /*0x16*/ { 188, 188, 0, 0, 1, 0, 3, 5, 16, 0, 4, 0, 2, 0 }, // WEAPON_FARSIGHTXR20 + /*0x17*/ { 176, 188, 0, 0, 1, 1, 3, 3, 20, 20, 4, 4, 2, 0 }, // WEAPON_DEVASTATOR + /*0x18*/ { 160, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 2, 0 }, // WEAPON_ROCKETLAUNCHER + /*0x19*/ { 168, 188, 0, 0, 1, 1, 3, 3, 2, 2, 1, 1, 3, 0 }, // WEAPON_SLAYER + /*0x1a*/ { 20, 40, 24, 40, 1, 1, 0, 2, 0, 5, 0, 1, 1, 0 }, // WEAPON_COMBATKNIFE + /*0x1b*/ { 108, 176, 0, 0, 1, 1, 2, 2, 15, 15, 5, 5, 4, 1 }, // WEAPON_CROSSBOW + /*0x1c*/ { 48, 188, 0, 0, 1, 1, 2, 0, 20, 24, 6, 8, 1, 0 }, // WEAPON_TRANQUILIZER + /*0x1d*/ { 112, 112, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 1, 0 }, // WEAPON_LASER + /*0x1e*/ { 36, 172, 0, 0, 1, 1, 7, 7, 6, 6, 2, 2, 1, 0 }, // WEAPON_GRENADE + /*0x1f*/ { 32, 188, 0, 0, 1, 1, 7, 7, 3, 3, 1, 1, 1, 0 }, // WEAPON_NBOMB + /*0x20*/ { 12, 12, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 1, 0 }, // WEAPON_TIMEDMINE + /*0x21*/ { 40, 176, 0, 0, 0, 0, 7, 2, 5, 5, 1, 1, 1, 0 }, // WEAPON_PROXIMITYMINE + /*0x22*/ { 44, 156, 0, 0, 1, 0, 2, 2, 5, 5, 2, 2, 1, 0 }, // WEAPON_REMOTEMINE + /*0x23*/ { 8, 8, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMBATBOOST + /*0x24*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PP9I + /*0x25*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_CC13 + /*0x26*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KL01313 + /*0x27*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KF7SPECIAL + /*0x28*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ZZT + /*0x29*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DMC + /*0x2a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_AR53 + /*0x2b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RCP45 + /*0x2c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PSYCHOSISGUN + /*0x2d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_NIGHTVISION + /*0x2e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_EYESPY + /*0x2f*/ { 4, 4, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_XRAYSCANNER + /*0x30*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_IRSCANNER + /*0x31*/ { 218, 218, 0, 0, 0, 0, 2, 2, 1200, 0, 0, 0, 1, 0 }, // WEAPON_CLOAKINGDEVICE + /*0x32*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HORIZONSCANNER + /*0x33*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TESTER + /*0x34*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKETLAUNCHER_34 + /*0x35*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ECMMINE + /*0x36*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DATAUPLINK + /*0x37*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RTRACKER + /*0x38*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_PRESIDENTSCANNER + /*0x39*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DOORDECODER + /*0x3a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_AUTOSURGEON + /*0x3b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_EXPLOSIVES + /*0x3c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SKEDARBOMB + /*0x3d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_COMMSRIDER + /*0x3e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TRACERBUG + /*0x3f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_TARGETAMPLIFIER + /*0x40*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE40 + /*0x41*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISGUISE41 + /*0x42*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_FLIGHTPLANS + /*0x43*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_RESEARCHTAPE + /*0x44*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BACKUPDISK + /*0x45*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD45 + /*0x46*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD46 + /*0x47*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD47 + /*0x48*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD48 + /*0x49*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD49 + /*0x4a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4A + /*0x4b*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4B + /*0x4c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_KEYCARD4C + /*0x4d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUITCASE + /*0x4e*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE + /*0x4f*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SHIELD + /*0x50*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_NECKLACE + /*0x51*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HAMMER + /*0x52*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_52 + /*0x53*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKET + /*0x54*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_HOMINGROCKET + /*0x55*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_GRENADEROUND + /*0x56*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BOLT + /*0x57*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_BRIEFCASE2 + /*0x58*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_ROCKET2 + /*0x59*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_59 + /*0x5a*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_5A + /*0x5b*/ { 220, 220, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_MPSHIELD + /*0x5c*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_DISABLED + /*0x5d*/ { 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 1, 0 }, // WEAPON_SUICIDEPILL }; void func0f197600(struct chrdata *chr) diff --git a/src/include/game/game_190260.h b/src/include/game/game_190260.h index aa08e4f97..f51ea1b96 100644 --- a/src/include/game/game_190260.h +++ b/src/include/game/game_190260.h @@ -26,7 +26,7 @@ u32 func0f192a74(void); u32 func0f192d64(void); bool func0f192dc0(struct chrdata *botchr, struct chrdata *chr); u32 func0f192e90(void); -u32 func0f19369c(void); +void func0f19369c(struct chrdata *chr, s32 arg1); s32 func0f1937a4(struct chrdata *chr, s32 arg1); u32 func0f194990(void); void func0f194b40(struct chrdata *chr); diff --git a/src/include/types.h b/src/include/types.h index a9b1b4704..90547508a 100644 --- a/src/include/types.h +++ b/src/include/types.h @@ -376,7 +376,7 @@ struct aibot { /*0x01c*/ s32 *ammoheld; /*0x020*/ s32 weaponnum; /*0x024*/ s32 loadedammo[2]; // amount of ammo in current clip - /*0x02c*/ u16 unk02c[2]; + /*0x02c*/ s16 unk02c[2]; /*0x030*/ u32 unk030; // timer of some sort /*0x034*/ u32 unk034; /*0x038*/ u32 unk038; @@ -6970,7 +6970,8 @@ struct aibotweaponpreference { u16 unk08; u16 unk0a; u16 unk0c; - u16 unk0e; + u16 unk0e_00 : 3; + u16 unk0e_03 : 1; }; #endif