From e7d3399ade46c4e0c8a7976a8cfa7a230c8ce3da Mon Sep 17 00:00:00 2001 From: Ryan Dwyer Date: Mon, 11 May 2020 20:20:04 +1000 Subject: [PATCH] Decompile aiDamagePlayer --- ld/gamefiles.inc | 4 +- src/files/setup/setupear.c | 2 +- src/files/setup/setuptra.c | 2 +- src/game/chr/chraction.c | 14 +- src/game/chr/chrai.c | 609 ++++++++++++++++++ src/game/chr/chraicommands.c | 392 +++++++++--- src/game/data/data_00e460.c | 911 --------------------------- src/include/commands.h | 5 +- src/include/game/chr/chraction.h | 2 +- src/include/game/chr/chraicommands.h | 2 +- 10 files changed, 933 insertions(+), 1010 deletions(-) diff --git a/ld/gamefiles.inc b/ld/gamefiles.inc index d7a9ad015..1f5df788e 100644 --- a/ld/gamefiles.inc +++ b/ld/gamefiles.inc @@ -66,11 +66,11 @@ build/ROMID/game/chr/chr.o (section); \ build/ROMID/game/game_02cde0.o (section); \ build/ROMID/game/chr/chraction.o (section); \ + build/ROMID/game/chr/chrai.o (section); \ + build/ROMID/game/chr/chraicommands.o (section); \ build/ROMID/game/data/data_00e460.o (section); \ build/ROMID/game/data/inventory.o (section); \ build/ROMID/game/data/data_0160b0.o (section); \ - build/ROMID/game/chr/chrai.o (section); \ - build/ROMID/game/chr/chraicommands.o (section); \ build/ROMID/game/game_0601b0.o (section); \ build/ROMID/game/propobj.o (section); \ build/ROMID/game/game_091e10.o (section); \ diff --git a/src/files/setup/setupear.c b/src/files/setup/setupear.c index e7d689ffe..d6962754e 100644 --- a/src/files/setup/setupear.c +++ b/src/files/setup/setupear.c @@ -2784,7 +2784,7 @@ u8 func0415_radioactivity[] = { add_motion_blur(CHR_TARGET, 10, TRUE) if_timer_lt(300, /*goto*/ 0x2f) restart_timer - damage_chr2(CHR_TARGET, 1024) + damage_player(CHR_TARGET, 4, 0) label(0x2f) if_chr_in_room(CHR_TARGET, 0x00, 0x0014, /*goto*/ 0x06) if_chr_in_room(CHR_TARGET, 0x00, 0x0015, /*goto*/ 0x06) diff --git a/src/files/setup/setuptra.c b/src/files/setup/setuptra.c index 51d24af50..8efd9cd92 100644 --- a/src/files/setup/setuptra.c +++ b/src/files/setup/setuptra.c @@ -660,7 +660,7 @@ u8 func0401_gas_damage[] = { label(0x32) if_timer_lt(460, /*goto*/ 0x32) restart_timer - damage_chr2(CHR_TARGET, 514) + damage_player(CHR_TARGET, 2, 2) label(0x32) if_chr_in_room(CHR_TARGET, 0x00, 0x009a, /*goto*/ 0x06) if_chr_in_room(CHR_TARGET, 0x00, 0x0099, /*goto*/ 0x06) diff --git a/src/game/chr/chraction.c b/src/game/chr/chraction.c index 568b4cf41..49cb64780 100644 --- a/src/game/chr/chraction.c +++ b/src/game/chr/chraction.c @@ -32072,10 +32072,12 @@ glabel rebuildSquadrons /* f04cdfc: 00000000 */ sll $zero,$zero,0x0 ); +u32 var80068460 = 0x10204080; + s16 *teamGetChrIds(s32 team_id) { s32 i; - u8 lookup[8] = g_ChrTeamIds; + u8 lookup[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; for (i = 0; i != MAX_TEAMS; i++) { if (lookup[i] == team_id) { @@ -32152,6 +32154,16 @@ void func0f04cf90(struct chrdata *chr, s32 arg1) } } +u32 var8006846c = 0x00000064; +u32 var80068470 = 0x00000065; +u32 var80068474 = 0x00000066; +u32 var80068478 = 0x00000067; +u32 var8006847c = 0x00000030; +u32 var80068480 = 0x0000003a; +u32 var80068484 = 0x00000023; +u32 var80068488 = 0x00000023; +u32 var8006848c = 0x00000000; + GLOBAL_ASM( glabel func0f04d000 .late_rodata diff --git a/src/game/chr/chrai.c b/src/game/chr/chrai.c index e51bfd6bd..a687fdc40 100644 --- a/src/game/chr/chrai.c +++ b/src/game/chr/chrai.c @@ -2,6 +2,7 @@ #include "constants.h" #include "game/chr/chraction.h" #include "game/chr/chrai.h" +#include "game/chr/chraicommands.h" #include "game/data/ailists.h" #include "game/data/data_000000.h" #include "game/data/data_0083d0.h" @@ -16,6 +17,614 @@ #include "lib/lib_1a500.h" #include "types.h" +bool (*g_CommandPointers[])(void) = { + /*0x0000*/ aiGoToNext, + /*0x0001*/ aiGoToFirst, + /*0x0002*/ aiLabel, + /*0x0003*/ aiYield, + /*0x0004*/ aiEndList, + /*0x0005*/ aiSetList, + /*0x0006*/ aiSetReturnList, + /*0x0007*/ aiSetShotList, + /*0x0008*/ aiReturn, + /*0x0009*/ aiStop, + /*0x000a*/ aiKneel, + /*0x000b*/ aiChrDoAnimation, + /*0x000c*/ aiIfIdle, + /*0x000d*/ aiBeSurprised000d, + /*0x000e*/ aiBeSurprised000e, + /*0x000f*/ aiStepSideways, + /*0x0010*/ aiHopSideways, + /*0x0011*/ aiRunSideways, + /*0x0012*/ aiWalkAndFire, + /*0x0013*/ aiRunAndFire, + /*0x0014*/ aiRollAndFire, + /*0x0015*/ aiAimAndFire1, + /*0x0016*/ aiKneelAndFire, + /*0x0017*/ aiAimAndFire2, + /*0x0018*/ aiFaceEntity, + /*0x0019*/ ai0019, + /*0x001a*/ ai001a, + /*0x001b*/ aiConsiderGrenadeThrow, + /*0x001c*/ ai001c, + /*0x001d*/ aiJogToPad, + /*0x001e*/ aiGoToPadPreset, + /*0x001f*/ aiWalkToPad, + /*0x0020*/ aiRunToPad, + /*0x0021*/ aiSetPath, + /*0x0022*/ aiStartPath, + /*0x0023*/ aiIfPathStarted, + /*0x0024*/ aiSurrender, + /*0x0025*/ aiFadeOut, + /*0x0026*/ aiRemoveChr, + /*0x0027*/ ai0027, + /*0x0028*/ aiActivateAlarm, + /*0x0029*/ aiDeactivateAlarm, + /*0x002a*/ ai002a, + /*0x002b*/ aiTryJogToTargetProp, + /*0x002c*/ aiTryWalkToTargetProp, + /*0x002d*/ aiTryRunToTargetProp, + /*0x002e*/ ai002e, + /*0x002f*/ aiTryJogToChr, + /*0x0030*/ aiTryWalkToChr, + /*0x0031*/ aiTryRunToChr, + /*0x0032*/ aiIfStopped, + /*0x0033*/ aiIfChrDying, + /*0x0034*/ aiIfChrDeathAnimationFinished, + /*0x0035*/ aiIfTargetPropInSight, + /*0x0036*/ aiRandom, + /*0x0037*/ aiIfRandomLessThan, + /*0x0038*/ aiIfRandomGreaterThan, + /*0x0039*/ aiIfChrAlarmActivate, + /*0x003a*/ aiIfAlarmActive, + /*0x003b*/ aiIfAlarmInactive, + /*0x003c*/ ai003c, + /*0x003d*/ aiIfSawInjury, + /*0x003e*/ aiIfSawDeath, + /*0x003f*/ aiIfSeesPlayer, + /*0x0040*/ ai0040, + /*0x0041*/ ai0041, + /*0x0042*/ aiIfInLoadedRoom, + /*0x0043*/ aiIfSawTargetRecently, + /*0x0044*/ aiIfHeardTargetRecently, + /*0x0045*/ ai0045, + /*0x0046*/ aiIfNeverBeenOnScreen, + /*0x0047*/ ai0047, + /*0x0048*/ aiIfChrInActiveRoom, + /*0x0049*/ aiIfRoomActive, + /*0x004a*/ ai004a, + /*0x004b*/ aiIfNearMiss, + /*0x004c*/ aiIfSeesSuspiciousItem, + /*0x004d*/ ai004d, + /*0x004e*/ ai004e, + /*0x004f*/ ai004f, + /*0x0050*/ ai0050, + /*0x0051*/ ai0051, + /*0x0052*/ aiIfDistanceToTargetLessThan, + /*0x0053*/ aiIfDistanceToTargetGreaterThan, + /*0x0054*/ aiIfChrDistanceToPadLessThan, + /*0x0055*/ aiIfChrDistanceToPadGreaterThan, + /*0x0056*/ aiIfDistanceToChrLessThan, + /*0x0057*/ aiIfDistanceToChrGreaterThan, + /*0x0058*/ ai0058, + /*0x0059*/ aiIfDistanceFromTargetToPadLessThan, + /*0x005a*/ aiIfDistanceFromTargetToPadGreaterThan, + /*0x005b*/ aiIfChrInRoom, + /*0x005c*/ aiIfTargetInRoom, + /*0x005d*/ aiIfChrHasObject, + /*0x005e*/ aiIfWeaponThrown, + /*0x005f*/ aiIfWeaponThrownOnObject, + /*0x0060*/ aiIfChrHasWeaponEquipped, + /*0x0061*/ aiIfGunUnclaimed, + /*0x0062*/ aiIfObjectHealthy, + /*0x0063*/ aiIfChrActivatedObject, + /*0x0064*/ NULL, + /*0x0065*/ ai0065, + /*0x0066*/ aiDestroyObject, + /*0x0067*/ ai0067, + /*0x0068*/ aiChrDropItems, + /*0x0069*/ aiChrDropWeapon, + /*0x006a*/ aiGiveObjectToChr, + /*0x006b*/ aiObjectMoveToPad, + /*0x006c*/ aiOpenDoor, + /*0x006d*/ aiCloseDoor, + /*0x006e*/ aiIfDoorState, + /*0x006f*/ aiIfObjectIsDoor, + /*0x0070*/ aiLockDoor, + /*0x0071*/ aiUnlockDoor, + /*0x0072*/ aiIfDoorLocked, + /*0x0073*/ aiIfObjectiveComplete, + /*0x0074*/ aiIfObjectiveFailed, + /*0x0075*/ ai0075, + /*0x0076*/ ai0076, + /*0x0077*/ aiIfDifficultyLessThan, + /*0x0078*/ aiIfDifficultyGreaterThan, + /*0x0079*/ aiIfUptimeLessThan, + /*0x007a*/ aiIfUptimeGreaterThan, + /*0x007b*/ aiIfStageIdLessThan, + /*0x007c*/ aiIfStageIdGreaterThan, + /*0x007d*/ aiIfNumArghsLessThan, + /*0x007e*/ aiIfNumArghsGreaterThan, + /*0x007f*/ aiIfNumCloseArghsLessThan, + /*0x0080*/ aiIfNumCloseArghsGreaterThan, + /*0x0081*/ aiIfChrHealthGreaterThan, + /*0x0082*/ aiIfChrHealthLessThan, + /*0x0083*/ aiIfInjured, + /*0x0084*/ aiSetMorale, + /*0x0085*/ aiAddMorale, + /*0x0086*/ aiChrAddMorale, + /*0x0087*/ aiSubtractMorale, + /*0x0088*/ aiIfMoraleLessThan, + /*0x0089*/ aiIfMoraleLessThanRandom, + /*0x008a*/ aiSetAlertness, + /*0x008b*/ aiAddAlertness, + /*0x008c*/ aiChrAddAlertness, + /*0x008d*/ aiSubtractAlertness, + /*0x008e*/ aiIfAlertness, + /*0x008f*/ aiIfChrAlertnessLessThan, + /*0x0090*/ aiIfAlertnessLessThanRandom, + /*0x0091*/ aiNoOp0091, + /*0x0092*/ aiSetHearDistance, + /*0x0093*/ aiSetViewDistance, + /*0x0094*/ aiSetGrenadeProbability, + /*0x0095*/ aiSetChrNum, + /*0x0096*/ aiSetMaxDamage, + /*0x0097*/ aiAddHealth, + /*0x0098*/ aiSetReactionSpeed, + /*0x0099*/ aiSetRecoverySpeed, + /*0x009a*/ aiSetAccuracy, + /*0x009b*/ aiSetFlag, + /*0x009c*/ aiUnsetFlag, + /*0x009d*/ aiIfHasFlag, + /*0x009e*/ aiChrSetFlag, + /*0x009f*/ aiChrUnsetFlag, + /*0x00a0*/ aiIfChrHasFlag, + /*0x00a1*/ aiSetStageFlag, + /*0x00a2*/ aiUnsetStageFlag, + /*0x00a3*/ aiIfStageFlagEq, + /*0x00a4*/ aiSetChrflag, + /*0x00a5*/ aiUnsetChrflag, + /*0x00a6*/ aiIfHasChrflag, + /*0x00a7*/ aiChrSetChrflag, + /*0x00a8*/ aiChrUnsetChrflag, + /*0x00a9*/ aiIfChrHasChrflag, + /*0x00aa*/ aiSetObjFlag, + /*0x00ab*/ aiUnsetObjFlag, + /*0x00ac*/ aiIfObjHasFlag, + /*0x00ad*/ aiSetObjFlag2, + /*0x00ae*/ aiUnsetObjFlag2, + /*0x00af*/ aiIfObjHasFlag2, + /*0x00b0*/ aiSetChrPreset, + /*0x00b1*/ aiSetChrTarget, + /*0x00b2*/ aiSetPadPreset, + /*0x00b3*/ aiChrSetPadPreset, + /*0x00b4*/ aiChrCopyPadPreset, + /*0x00b5*/ aiPrint, + /*0x00b6*/ aiRestartTimer, + /*0x00b7*/ aiResetTimer, + /*0x00b8*/ aiPauseTimer, + /*0x00b9*/ aiResumeTimer, + /*0x00ba*/ aiIfTimerStopped, + /*0x00bb*/ aiIfTimerGreaterThanRandom, + /*0x00bc*/ aiIfTimerLessThan, + /*0x00bd*/ aiIfTimerGreaterThan, + /*0x00be*/ aiShowCountdownTimer, + /*0x00bf*/ aiHideCountdownTimer, + /*0x00c0*/ aiSetCountdownTimerValue, + /*0x00c1*/ aiStopCountdownTimer, + /*0x00c2*/ aiStartCountdownTimer, + /*0x00c3*/ aiIfCountdownTimerStopped, + /*0x00c4*/ aiIfCountdownTimerLessThan, + /*0x00c5*/ aiIfCountdownTimerGreaterThan, + /*0x00c6*/ aiSpawnChrAtPad, + /*0x00c7*/ aiSpawnChrAtChr, + /*0x00c8*/ aiTryEquipWeapon, + /*0x00c9*/ aiTryEquipHat, + /*0x00ca*/ aiDuplicateChr, + /*0x00cb*/ aiShowHudmsg, + /*0x00cc*/ aiShowHudmsgTopMiddle, + /*0x00cd*/ aiSpeak, + /*0x00ce*/ aiPlaySound, + /*0x00cf*/ ai00cf, + /*0x00d0*/ ai00d0, + /*0x00d1*/ ai00d1, + /*0x00d2*/ ai00d2, + /*0x00d3*/ aiAudioMuteChannel, + /*0x00d4*/ ai00d4, + /*0x00d5*/ aiHovercarBeginPath, + /*0x00d6*/ aiSetVehicleSpeed, + /*0x00d7*/ aiSetRotarySpeed, + /*0x00d8*/ aiNoOp00d8, + /*0x00d9*/ aiNoOp00d9, + /*0x00da*/ aiSetObjImage, + /*0x00db*/ aiNoOp00db, + /*0x00dc*/ aiEndLevel, + /*0x00dd*/ ai00dd, + /*0x00de*/ aiWarpJoToPad, + /*0x00df*/ ai00df, + /*0x00e0*/ aiRevokeControl, + /*0x00e1*/ aiGrantControl, + /*0x00e2*/ aiChrMoveToPad, + /*0x00e3*/ ai00e3, + /*0x00e4*/ ai00e4, + /*0x00e5*/ aiIfColourFadeComplete, + /*0x00e6*/ NULL, + /*0x00e7*/ NULL, + /*0x00e8*/ aiSetDoorOpen, + /*0x00e9*/ ai00e9, + /*0x00ea*/ aiIfNumPlayersLessThan, + /*0x00eb*/ aiIfChrAmmoQuantityLessThan, + /*0x00ec*/ aiChrDrawWeapon, + /*0x00ed*/ aiChrDrawWeaponInCutscene, + /*0x00ee*/ ai00ee, + /*0x00ef*/ aiIfObjInRoom, + /*0x00f0*/ ai00f0, + /*0x00f1*/ aiIfAttacking, + /*0x00f2*/ ai00f2, + /*0x00f3*/ aiChrSetInvincible, + /*0x00f4*/ ai00f4, + /*0x00f5*/ ai00f5, + /*0x00f6*/ ai00f6, + /*0x00f7*/ aiIfAllObjectivesComplete, + /*0x00f8*/ aiIfPlayerIsInvincible, + /*0x00f9*/ aiAudioPlayXMusic, + /*0x00fa*/ aiAudioStopChannel, + /*0x00fb*/ aiChrExplosions, + /*0x00fc*/ aiIfKillCountGreaterThan, + /*0x00fd*/ ai00fd, + /*0x00fe*/ aiKillBond, + /*0x00ff*/ aiBeSurprised00ff, + /*0x0100*/ aiNoOp0100, + /*0x0101*/ aiNoOp0101, + /*0x0102*/ aiSetLights, + /*0x0103*/ ai0103, + /*0x0104*/ aiRemoveObjectAtPropPreset, + /*0x0105*/ aiIfPropPresetHeightLessThan, + /*0x0106*/ aiSetTarget, + /*0x0107*/ aiIfPresetsTargetIsNotMyTarget, + /*0x0108*/ aiIfChrTarget, + /*0x0109*/ ai0109, + /*0x010a*/ ai010a, + /*0x010b*/ aiChrSetTeam, + /*0x010c*/ aiIfCompareChrPresetsTeam, + /*0x010d*/ aiNoOp010d, + /*0x010e*/ aiSetShield, + /*0x010f*/ aiIfChrShieldLessThan, + /*0x0110*/ aiIfChrShieldGreaterThan, + /*0x0111*/ aiSetCameraAnimation, + /*0x0112*/ aiObjectDoAnimation, + /*0x0113*/ aiIfInCutscene, + /*0x0114*/ aiShowChr, + /*0x0115*/ aiHideChr, + /*0x0116*/ aiShowObj, + /*0x0117*/ aiHideObj, + /*0x0118*/ aiSetObjFlag3, + /*0x0119*/ aiUnsetObjFlag3, + /*0x011a*/ aiIfObjHasFlag3, + /*0x011b*/ aiChrSetHiddenFlag, + /*0x011c*/ aiChrUnsetHiddenFlag, + /*0x011d*/ aiIfChrHasHiddenFlag, + /*0x011e*/ aiIfHuman, + /*0x011f*/ aiIfSkedar, + /*0x0120*/ ai0120, + /*0x0121*/ ai0121, + /*0x0122*/ ai0122, + /*0x0123*/ ai0123, + /*0x0124*/ aiGoToCover, + /*0x0125*/ ai0125, + /*0x0126*/ aiIfPlayerUsingCmpOrAr34, + /*0x0127*/ aiDetectEnemyOnSameFloor, + /*0x0128*/ aiDetectEnemy, + /*0x0129*/ aiIfSafetyLessThan, + /*0x012a*/ aiIfTargetMovingSlowly, + /*0x012b*/ aiIfTargetMovingCloser, + /*0x012c*/ aiIfTargetMovingAway, + /*0x012d*/ NULL, + /*0x012e*/ NULL, + /*0x012f*/ ai012f, + /*0x0130*/ aiSayQuip, + /*0x0131*/ aiIncreaseSquadronAlertness, + /*0x0132*/ aiSetAction, + /*0x0133*/ aiSetTeamOrders, + /*0x0134*/ aiIfOrders, + /*0x0135*/ aiIfHasOrders, + /*0x0136*/ aiRetreat, + /*0x0137*/ aiIfChrInSquadronDoingAction, + /*0x0138*/ aiIfChannelIdle, + /*0x0139*/ ai0139, + /*0x013a*/ aiSetChrPresetToUnalertedTeammate, + /*0x013b*/ aiSetSquadron, + /*0x013c*/ ai013c, + /*0x013d*/ aiIfDangerousObjectNearby, + /*0x013e*/ ai013e, + /*0x013f*/ aiIfHeliWeaponsArmed, + /*0x0140*/ aiIfHoverbotNextStep, + /*0x0141*/ aiShuffleInvestigationTerminals, + /*0x0142*/ aiSetPadPresetToInvestigationTerminal, + /*0x0143*/ aiHeliArmWeapons, + /*0x0144*/ aiHeliUnarmWeapons, + /*0x0145*/ aiRebuildTeams, + /*0x0146*/ aiRebuildSquadrons, + /*0x0147*/ aiIfSquadronIsDead, + /*0x0148*/ aiChrSetListening, + /*0x0149*/ aiIfChrListening, + /*0x014a*/ aiIfTrue, + /*0x014b*/ aiIfNotListening, + /*0x014c*/ NULL, + /*0x014d*/ NULL, + /*0x014e*/ NULL, + /*0x014f*/ NULL, + /*0x0150*/ NULL, + /*0x0151*/ NULL, + /*0x0152*/ aiIfNumChrsInSquadronGreaterThan, + /*0x0153*/ NULL, + /*0x0154*/ NULL, + /*0x0155*/ NULL, + /*0x0156*/ NULL, + /*0x0157*/ aiSetTintedGlassEnabled, + /*0x0158*/ NULL, + /*0x0159*/ NULL, + /*0x015a*/ NULL, + /*0x015b*/ aiAudioPlayMusic, + /*0x015c*/ aiAudioRestartMusic, + /*0x015d*/ NULL, + /*0x015e*/ NULL, + /*0x015f*/ NULL, + /*0x0160*/ NULL, + /*0x0161*/ NULL, + /*0x0162*/ NULL, + /*0x0163*/ NULL, + /*0x0164*/ NULL, + /*0x0165*/ aiIfChrInjured, + /*0x0166*/ aiIfAction, + /*0x0167*/ aiHovercopterFireRocket, + /*0x0168*/ ai0168, + /*0x0169*/ aiIfNaturalAnim, + /*0x016a*/ aiIfY, + /*0x016b*/ ai016b, + /*0x016c*/ aiNoOp016c, + /*0x016d*/ aiChrAdjustMotionBlur, + /*0x016e*/ aiDamagePlayer, + /*0x016f*/ aiIfChrHasGun, + /*0x0170*/ aiDoGunCommand, + /*0x0171*/ aiIfDistanceToGunLessThan, + /*0x0172*/ ai0172, + /*0x0173*/ aiChrCopyProperties, + /*0x0174*/ aiIfCutsceneButtonPressed, + /*0x0175*/ ai0175, + /*0x0176*/ ai0176, + /*0x0177*/ aiPlayerAutoWalk, + /*0x0178*/ aiIfPlayerAutoWalkFinished, + /*0x0179*/ ai0179, + /*0x017a*/ ai017a, + /*0x017b*/ aiIfChrUnloaded, + /*0x017c*/ aiAssignSound, + /*0x017d*/ aiAudioSetMusicTrack, + /*0x017e*/ aiAudioRestartDefaultMusic, + /*0x017f*/ aiAudioSetSfxTrack, + /*0x0180*/ aiAudioRestartSfx, + /*0x0181*/ aiIfPlayerLookingAtObject, + /*0x0182*/ aiPunchOrKick, + /*0x0183*/ aiIfTargetIsPlayer, + /*0x0184*/ ai0184, + /*0x0185*/ aiMpInitSimulants, + /*0x0186*/ aiIfSoundTimer, + /*0x0187*/ aiSetTargetToEyespyIfInSight, + /*0x0188*/ aiIfLiftStationary, + /*0x0189*/ aiLiftGoToStop, + /*0x018a*/ aiIfLiftAtStop, + /*0x018b*/ aiConfigureRain, + /*0x018c*/ aiChrToggleProp, + /*0x018d*/ aiActivateLift, + /*0x018e*/ aiMiniSkedarTryPounce, + /*0x018f*/ aiIfObjectDistanceToPadLessThan, + /*0x0190*/ aiSetSavefileFlag, + /*0x0191*/ aiUnsetSavefileFlag, + /*0x0192*/ aiIfSavefileFlagIsSet, + /*0x0193*/ aiIfSavefileFlagIsUnset, + /*0x0194*/ NULL, + /*0x0195*/ NULL, + /*0x0196*/ NULL, + /*0x0197*/ NULL, + /*0x0198*/ NULL, + /*0x0199*/ NULL, + /*0x019a*/ NULL, + /*0x019b*/ NULL, + /*0x019c*/ NULL, + /*0x019d*/ NULL, + /*0x019e*/ aiIfObjHealthLessThan, + /*0x019f*/ aiSetObjHealth, + /*0x01a0*/ aiSetChrSpecialDeathAnimation, + /*0x01a1*/ aiSetRoomToSearch, + /*0x01a2*/ aiSayCiStaffQuip, + /*0x01a3*/ aiDoPresetAnimation, + /*0x01a4*/ aiShowHudmsgMiddle, + /*0x01a5*/ ai01a5, + /*0x01a6*/ aiIfTargetYDifferenceLessThan, + /*0x01a7*/ aiIfChrPropsoundcountZero, + /*0x01a8*/ NULL, + /*0x01a9*/ NULL, + /*0x01aa*/ ai01aa, + /*0x01ab*/ aiIfNumKnockedOutChrs, + /*0x01ac*/ NULL, + /*0x01ad*/ aiReleaseObject, + /*0x01ae*/ aiClearInventory, + /*0x01af*/ aiChrGrabObject, + /*0x01b0*/ NULL, + /*0x01b1*/ aiShuffleRuinsPillars, + /*0x01b2*/ ai01b2, + /*0x01b3*/ aiToggleP1P2, + /*0x01b4*/ ai01b4, + /*0x01b5*/ aiChrSetP1P2, + /*0x01b6*/ aiConfigureSnow, + /*0x01b7*/ aiChrSetCloaked, + /*0x01b8*/ aiSetAutogunType, + /*0x01b9*/ aiShufflePelagicSwitches, + /*0x01ba*/ ai01ba, + /*0x01bb*/ aiNoOp01bb, + /*0x01bc*/ ai01bc, + /*0x01bd*/ aiIfTrainingPcHolographed, + /*0x01be*/ aiIfChrWeaponEquipped, + /*0x01bf*/ aiChrBeginOrEndTeleport, + /*0x01c0*/ aiIfChrTeleportFullWhite, + /*0x01c1*/ aiSetPunchDodgeList, + /*0x01c2*/ aiSetShootingAtMeList, + /*0x01c3*/ aiSetDarkRoomList, + /*0x01c4*/ aiSetPlayerDeadList, + /*0x01c5*/ ai01c5, + /*0x01c6*/ aiSetDodgeRating, + /*0x01c7*/ aiSetUnarmedDodgeRating, + /*0x01c8*/ ai01c8, + /*0x01c9*/ ai01c9, + /*0x01ca*/ aiChrSetCutsceneWeapon, + /*0x01cb*/ aiFadeScreen, + /*0x01cc*/ aiIfFadeComplete, + /*0x01cd*/ aiSetChrHudpieceVisible, + /*0x01ce*/ aiSetPassiveMode, + /*0x01cf*/ aiChrSetFiringInCutscene, + /*0x01d0*/ aiSetPortalFlag, + /*0x01d1*/ aiSetObjPartVisible, + /*0x01d2*/ aiChrEmitSparks, + /*0x01d3*/ aiSetDrCarollImages, + /*0x01d4*/ ai01d4, + /*0x01d5*/ aiShowCutsceneChrs, + /*0x01d6*/ aiMiscellaneous, + /*0x01d7*/ aiIfDistanceToTarget2LessThan, + /*0x01d8*/ aiIfDistanceToTarget2GreaterThan, + /*0x01d9*/ aiPlaySoundFromProp, + /*0x01da*/ aiPlayMusicContinuously, + /*0x01db*/ aiChrKill, + /*0x01dc*/ aiRemoveWeaponFromInventory, + /*0x01dd*/ ai01dd, + /*0x01de*/ aiIfCoopMode, + /*0x01df*/ aiIfChrSameFloorDistanceToPadLessThan, + /*0x01e0*/ aiRemoveReferencesToChr, +}; + +u16 g_CommandLengths[] = { + /*0x0000*/ 0x0003, /*0x0001*/ 0x0003, /*0x0002*/ 0x0003, /*0x0003*/ 0x0002, + /*0x0004*/ 0x0002, /*0x0005*/ 0x0005, /*0x0006*/ 0x0005, /*0x0007*/ 0x0004, + /*0x0008*/ 0x0002, /*0x0009*/ 0x0002, /*0x000a*/ 0x0002, /*0x000b*/ 0x000c, + /*0x000c*/ 0x0003, /*0x000d*/ 0x0002, /*0x000e*/ 0x0002, /*0x000f*/ 0x0003, + /*0x0010*/ 0x0003, /*0x0011*/ 0x0003, /*0x0012*/ 0x0003, /*0x0013*/ 0x0003, + /*0x0014*/ 0x0003, /*0x0015*/ 0x0007, /*0x0016*/ 0x0007, /*0x0017*/ 0x0007, + /*0x0018*/ 0x0007, /*0x0019*/ 0x0008, /*0x001a*/ 0x0005, /*0x001b*/ 0x0007, + /*0x001c*/ 0x0006, /*0x001d*/ 0x0004, /*0x001e*/ 0x0003, /*0x001f*/ 0x0004, + /*0x0020*/ 0x0004, /*0x0021*/ 0x0003, /*0x0022*/ 0x0002, /*0x0023*/ 0x0003, + /*0x0024*/ 0x0002, /*0x0025*/ 0x0002, /*0x0026*/ 0x0003, /*0x0027*/ 0x0005, + /*0x0028*/ 0x0002, /*0x0029*/ 0x0002, /*0x002a*/ 0x0003, /*0x002b*/ 0x0003, + /*0x002c*/ 0x0003, /*0x002d*/ 0x0003, /*0x002e*/ 0x0003, /*0x002f*/ 0x0004, + /*0x0030*/ 0x0004, /*0x0031*/ 0x0004, /*0x0032*/ 0x0003, /*0x0033*/ 0x0004, + /*0x0034*/ 0x0004, /*0x0035*/ 0x0003, /*0x0036*/ 0x0002, /*0x0037*/ 0x0004, + /*0x0038*/ 0x0004, /*0x0039*/ 0x0003, /*0x003a*/ 0x0003, /*0x003b*/ 0x0003, + /*0x003c*/ 0x0003, /*0x003d*/ 0x0004, /*0x003e*/ 0x0004, /*0x003f*/ 0x0003, + /*0x0040*/ 0x0007, /*0x0041*/ 0x0007, /*0x0042*/ 0x0003, /*0x0043*/ 0x0003, + /*0x0044*/ 0x0003, /*0x0045*/ 0x0004, /*0x0046*/ 0x0003, /*0x0047*/ 0x0003, + /*0x0048*/ 0x0004, /*0x0049*/ 0x0005, /*0x004a*/ 0x0003, /*0x004b*/ 0x0003, + /*0x004c*/ 0x0003, /*0x004d*/ 0x0004, /*0x004e*/ 0x0006, /*0x004f*/ 0x0004, + /*0x0050*/ 0x0004, /*0x0051*/ 0x0004, /*0x0052*/ 0x0005, /*0x0053*/ 0x0005, + /*0x0054*/ 0x0008, /*0x0055*/ 0x0008, /*0x0056*/ 0x0006, /*0x0057*/ 0x0006, + /*0x0058*/ 0x0005, /*0x0059*/ 0x0007, /*0x005a*/ 0x0007, /*0x005b*/ 0x0007, + /*0x005c*/ 0x0005, /*0x005d*/ 0x0005, /*0x005e*/ 0x0004, /*0x005f*/ 0x0005, + /*0x0060*/ 0x0005, /*0x0061*/ 0x0005, /*0x0062*/ 0x0004, /*0x0063*/ 0x0005, + /*0x0064*/ 0x0001, /*0x0065*/ 0x0003, /*0x0066*/ 0x0003, /*0x0067*/ 0x0003, + /*0x0068*/ 0x0003, /*0x0069*/ 0x0003, /*0x006a*/ 0x0004, /*0x006b*/ 0x0005, + /*0x006c*/ 0x0003, /*0x006d*/ 0x0003, /*0x006e*/ 0x0005, /*0x006f*/ 0x0004, + /*0x0070*/ 0x0004, /*0x0071*/ 0x0004, /*0x0072*/ 0x0005, /*0x0073*/ 0x0004, + /*0x0074*/ 0x0004, /*0x0075*/ 0x0004, /*0x0076*/ 0x0004, /*0x0077*/ 0x0004, + /*0x0078*/ 0x0004, /*0x0079*/ 0x0005, /*0x007a*/ 0x0005, /*0x007b*/ 0x0004, + /*0x007c*/ 0x0004, /*0x007d*/ 0x0004, /*0x007e*/ 0x0004, /*0x007f*/ 0x0004, + /*0x0080*/ 0x0004, /*0x0081*/ 0x0005, /*0x0082*/ 0x0005, /*0x0083*/ 0x0004, + /*0x0084*/ 0x0003, /*0x0085*/ 0x0003, /*0x0086*/ 0x0004, /*0x0087*/ 0x0003, + /*0x0088*/ 0x0004, /*0x0089*/ 0x0003, /*0x008a*/ 0x0003, /*0x008b*/ 0x0003, + /*0x008c*/ 0x0004, /*0x008d*/ 0x0003, /*0x008e*/ 0x0005, /*0x008f*/ 0x0005, + /*0x0090*/ 0x0003, /*0x0091*/ 0x0002, /*0x0092*/ 0x0004, /*0x0093*/ 0x0003, + /*0x0094*/ 0x0003, /*0x0095*/ 0x0003, /*0x0096*/ 0x0005, /*0x0097*/ 0x0004, + /*0x0098*/ 0x0003, /*0x0099*/ 0x0003, /*0x009a*/ 0x0003, /*0x009b*/ 0x0007, + /*0x009c*/ 0x0007, /*0x009d*/ 0x0009, /*0x009e*/ 0x0008, /*0x009f*/ 0x0008, + /*0x00a0*/ 0x0009, /*0x00a1*/ 0x0006, /*0x00a2*/ 0x0006, /*0x00a3*/ 0x0008, + /*0x00a4*/ 0x0006, /*0x00a5*/ 0x0006, /*0x00a6*/ 0x0007, /*0x00a7*/ 0x0007, + /*0x00a8*/ 0x0007, /*0x00a9*/ 0x0008, /*0x00aa*/ 0x0007, /*0x00ab*/ 0x0007, + /*0x00ac*/ 0x0008, /*0x00ad*/ 0x0007, /*0x00ae*/ 0x0007, /*0x00af*/ 0x0008, + /*0x00b0*/ 0x0003, /*0x00b1*/ 0x0004, /*0x00b2*/ 0x0004, /*0x00b3*/ 0x0005, + /*0x00b4*/ 0x0004, /*0x00b5*/ 0x0000, /*0x00b6*/ 0x0002, /*0x00b7*/ 0x0002, + /*0x00b8*/ 0x0002, /*0x00b9*/ 0x0002, /*0x00ba*/ 0x0003, /*0x00bb*/ 0x0003, + /*0x00bc*/ 0x0006, /*0x00bd*/ 0x0006, /*0x00be*/ 0x0002, /*0x00bf*/ 0x0002, + /*0x00c0*/ 0x0004, /*0x00c1*/ 0x0002, /*0x00c2*/ 0x0002, /*0x00c3*/ 0x0003, + /*0x00c4*/ 0x0005, /*0x00c5*/ 0x0005, /*0x00c6*/ 0x000d, /*0x00c7*/ 0x000c, + /*0x00c8*/ 0x000a, /*0x00c9*/ 0x0009, /*0x00ca*/ 0x000a, /*0x00cb*/ 0x0005, + /*0x00cc*/ 0x0006, /*0x00cd*/ 0x0009, /*0x00ce*/ 0x0005, /*0x00cf*/ 0x0006, + /*0x00d0*/ 0x0007, /*0x00d1*/ 0x0007, /*0x00d2*/ 0x0007, /*0x00d3*/ 0x0003, + /*0x00d4*/ 0x0006, /*0x00d5*/ 0x0003, /*0x00d6*/ 0x0006, /*0x00d7*/ 0x0006, + /*0x00d8*/ 0x0003, /*0x00d9*/ 0x0003, /*0x00da*/ 0x0005, /*0x00db*/ 0x0003, + /*0x00dc*/ 0x0002, /*0x00dd*/ 0x0002, /*0x00de*/ 0x0004, /*0x00df*/ 0x0007, + /*0x00e0*/ 0x0004, /*0x00e1*/ 0x0003, /*0x00e2*/ 0x0007, /*0x00e3*/ 0x0003, + /*0x00e4*/ 0x0003, /*0x00e5*/ 0x0004, /*0x00e6*/ 0x0001, /*0x00e7*/ 0x0001, + /*0x00e8*/ 0x0003, /*0x00e9*/ 0x0004, /*0x00ea*/ 0x0004, /*0x00eb*/ 0x0006, + /*0x00ec*/ 0x0004, /*0x00ed*/ 0x0004, /*0x00ee*/ 0x0005, /*0x00ef*/ 0x0006, + /*0x00f0*/ 0x0003, /*0x00f1*/ 0x0003, /*0x00f2*/ 0x0002, /*0x00f3*/ 0x0003, + /*0x00f4*/ 0x000e, /*0x00f5*/ 0x0002, /*0x00f6*/ 0x0003, /*0x00f7*/ 0x0003, + /*0x00f8*/ 0x0004, /*0x00f9*/ 0x0005, /*0x00fa*/ 0x0003, /*0x00fb*/ 0x0003, + /*0x00fc*/ 0x0004, /*0x00fd*/ 0x0004, /*0x00fe*/ 0x0002, /*0x00ff*/ 0x0002, + /*0x0100*/ 0x0003, /*0x0101*/ 0x0003, /*0x0102*/ 0x000b, /*0x0103*/ 0x0003, + /*0x0104*/ 0x0002, /*0x0105*/ 0x0005, /*0x0106*/ 0x0005, /*0x0107*/ 0x0003, + /*0x0108*/ 0x0006, /*0x0109*/ 0x0006, /*0x010a*/ 0x0008, /*0x010b*/ 0x0004, + /*0x010c*/ 0x0004, /*0x010d*/ 0x0002, /*0x010e*/ 0x0004, /*0x010f*/ 0x0006, + /*0x0110*/ 0x0006, /*0x0111*/ 0x0004, /*0x0112*/ 0x0008, /*0x0113*/ 0x0003, + /*0x0114*/ 0x0003, /*0x0115*/ 0x0003, /*0x0116*/ 0x0003, /*0x0117*/ 0x0003, + /*0x0118*/ 0x0007, /*0x0119*/ 0x0007, /*0x011a*/ 0x0008, /*0x011b*/ 0x0007, + /*0x011c*/ 0x0007, /*0x011d*/ 0x0008, /*0x011e*/ 0x0004, /*0x011f*/ 0x0004, + /*0x0120*/ 0x0004, /*0x0121*/ 0x0005, /*0x0122*/ 0x0009, /*0x0123*/ 0x0009, + /*0x0124*/ 0x0003, /*0x0125*/ 0x0003, /*0x0126*/ 0x0003, /*0x0127*/ 0x0003, + /*0x0128*/ 0x0004, /*0x0129*/ 0x0004, /*0x012a*/ 0x0004, /*0x012b*/ 0x0003, + /*0x012c*/ 0x0003, /*0x012d*/ 0x0001, /*0x012e*/ 0x0001, /*0x012f*/ 0x0002, + /*0x0130*/ 0x000a, /*0x0131*/ 0x0003, /*0x0132*/ 0x0004, /*0x0133*/ 0x0004, + /*0x0134*/ 0x0005, /*0x0135*/ 0x0003, /*0x0136*/ 0x0004, /*0x0137*/ 0x0004, + /*0x0138*/ 0x0004, /*0x0139*/ 0x0008, /*0x013a*/ 0x0005, /*0x013b*/ 0x0003, + /*0x013c*/ 0x0003, /*0x013d*/ 0x0004, /*0x013e*/ 0x0002, /*0x013f*/ 0x0003, + /*0x0140*/ 0x0005, /*0x0141*/ 0x0009, /*0x0142*/ 0x0004, /*0x0143*/ 0x0002, + /*0x0144*/ 0x0002, /*0x0145*/ 0x0002, /*0x0146*/ 0x0002, /*0x0147*/ 0x0004, + /*0x0148*/ 0x0004, /*0x0149*/ 0x0006, /*0x014a*/ 0x0006, /*0x014b*/ 0x0003, + /*0x014c*/ 0x0001, /*0x014d*/ 0x0001, /*0x014e*/ 0x0001, /*0x014f*/ 0x0001, + /*0x0150*/ 0x0001, /*0x0151*/ 0x0001, /*0x0152*/ 0x0005, /*0x0153*/ 0x0001, + /*0x0154*/ 0x0001, /*0x0155*/ 0x0001, /*0x0156*/ 0x0001, /*0x0157*/ 0x0003, + /*0x0158*/ 0x0001, /*0x0159*/ 0x0001, /*0x015a*/ 0x0001, /*0x015b*/ 0x0003, + /*0x015c*/ 0x0002, /*0x015d*/ 0x0001, /*0x015e*/ 0x0001, /*0x015f*/ 0x0001, + /*0x0160*/ 0x0001, /*0x0161*/ 0x0001, /*0x0162*/ 0x0001, /*0x0163*/ 0x0001, + /*0x0164*/ 0x0001, /*0x0165*/ 0x0004, /*0x0166*/ 0x0004, /*0x0167*/ 0x0003, + /*0x0168*/ 0x0004, /*0x0169*/ 0x0004, /*0x016a*/ 0x0007, /*0x016b*/ 0x000a, + /*0x016c*/ 0x0002, /*0x016d*/ 0x0005, /*0x016e*/ 0x0005, /*0x016f*/ 0x0005, + /*0x0170*/ 0x0004, /*0x0171*/ 0x0005, /*0x0172*/ 0x0004, /*0x0173*/ 0x0004, + /*0x0174*/ 0x0003, /*0x0175*/ 0x0003, /*0x0176*/ 0x0003, /*0x0177*/ 0x0009, + /*0x0178*/ 0x0004, /*0x0179*/ 0x000b, /*0x017a*/ 0x0003, /*0x017b*/ 0x0004, + /*0x017c*/ 0x0005, /*0x017d*/ 0x0003, /*0x017e*/ 0x0002, /*0x017f*/ 0x0003, + /*0x0180*/ 0x0002, /*0x0181*/ 0x0005, /*0x0182*/ 0x0004, /*0x0183*/ 0x0003, + /*0x0184*/ 0x0004, /*0x0185*/ 0x0002, /*0x0186*/ 0x0006, /*0x0187*/ 0x0003, + /*0x0188*/ 0x0004, /*0x0189*/ 0x0004, /*0x018a*/ 0x0005, /*0x018b*/ 0x0003, + /*0x018c*/ 0x0004, /*0x018d*/ 0x0004, /*0x018e*/ 0x0007, /*0x018f*/ 0x0008, + /*0x0190*/ 0x0003, /*0x0191*/ 0x0003, /*0x0192*/ 0x0004, /*0x0193*/ 0x0004, + /*0x0194*/ 0x0001, /*0x0195*/ 0x0001, /*0x0196*/ 0x0001, /*0x0197*/ 0x0001, + /*0x0198*/ 0x0001, /*0x0199*/ 0x0001, /*0x019a*/ 0x0001, /*0x019b*/ 0x0001, + /*0x019c*/ 0x0001, /*0x019d*/ 0x0001, /*0x019e*/ 0x0006, /*0x019f*/ 0x0005, + /*0x01a0*/ 0x0004, /*0x01a1*/ 0x0002, /*0x01a2*/ 0x0004, /*0x01a3*/ 0x0003, + /*0x01a4*/ 0x0006, /*0x01a5*/ 0x0003, /*0x01a6*/ 0x0004, /*0x01a7*/ 0x0004, + /*0x01a8*/ 0x0001, /*0x01a9*/ 0x0001, /*0x01aa*/ 0x0003, /*0x01ab*/ 0x0005, + /*0x01ac*/ 0x0001, /*0x01ad*/ 0x0003, /*0x01ae*/ 0x0003, /*0x01af*/ 0x0004, + /*0x01b0*/ 0x0001, /*0x01b1*/ 0x0012, /*0x01b2*/ 0x0003, /*0x01b3*/ 0x0003, + /*0x01b4*/ 0x0003, /*0x01b5*/ 0x0004, /*0x01b6*/ 0x0003, /*0x01b7*/ 0x0005, + /*0x01b8*/ 0x0004, /*0x01b9*/ 0x0002, /*0x01ba*/ 0x0007, /*0x01bb*/ 0x0004, + /*0x01bc*/ 0x0004, /*0x01bd*/ 0x0003, /*0x01be*/ 0x0005, /*0x01bf*/ 0x0005, + /*0x01c0*/ 0x0004, /*0x01c1*/ 0x0004, /*0x01c2*/ 0x0004, /*0x01c3*/ 0x0004, + /*0x01c4*/ 0x0004, /*0x01c5*/ 0x0002, /*0x01c6*/ 0x0004, /*0x01c7*/ 0x0003, + /*0x01c8*/ 0x0003, /*0x01c9*/ 0x0003, /*0x01ca*/ 0x0005, /*0x01cb*/ 0x0008, + /*0x01cc*/ 0x0003, /*0x01cd*/ 0x0004, /*0x01ce*/ 0x0003, /*0x01cf*/ 0x0004, + /*0x01d0*/ 0x0005, /*0x01d1*/ 0x0005, /*0x01d2*/ 0x0003, /*0x01d3*/ 0x0005, + /*0x01d4*/ 0x0006, /*0x01d5*/ 0x0003, /*0x01d6*/ 0x0006, /*0x01d7*/ 0x0005, + /*0x01d8*/ 0x0005, /*0x01d9*/ 0x000b, /*0x01da*/ 0x0003, /*0x01db*/ 0x0003, + /*0x01dc*/ 0x0003, /*0x01dd*/ 0x0004, /*0x01de*/ 0x0003, /*0x01df*/ 0x0008, + /*0x01e0*/ 0x0002, +}; + s32 chraiGetListIdByList(u8 *ailist, bool *is_global) { s32 i; diff --git a/src/game/chr/chraicommands.c b/src/game/chr/chraicommands.c index ec84a845e..57911a883 100644 --- a/src/game/chr/chraicommands.c +++ b/src/game/chr/chraicommands.c @@ -810,7 +810,7 @@ bool ai0019(void) { u8 *cmd = g_Vars.ailist + g_Vars.aioffset; struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); - struct coord pos = var80068fe0; + struct coord pos = {0, 0, 0}; if (chr && chr->prop) { f32 value = func0f0b1d28(&cmd[4]); @@ -834,7 +834,7 @@ bool ai001a(void) if (chr1 && chr2 && chr1->prop && chr2->prop) { struct prop *prop = chrGetEquippedWeaponPropWithCheck(chr1, 0); f32 thing; - struct coord pos = var80068fec; + struct coord pos = {0, 0, 0}; struct weaponobj *weapon; if (!prop) { @@ -7477,6 +7477,256 @@ bool ai012f(void) return false; } +s16 g_GuardQuipBank[][4] = { + // Voicebox 0 + { 0, 0x027b, 0x027b, 0x027c }, + { 1, 0x027d, 0x027e, 0x027f }, + { 2, 0x028a, 0x028b, 0x028c }, + { 3, 0x035b, 0x035c, 0x035d }, + { 4, 0x0290, 0x80fb, 0x0292 }, + { 5, 0x0293, 0x0294, 0x029d }, + { 6, 0x0297, 0x0298, 0x0299 }, + { 7, 0x029a, 0x029b, 0x029c }, + { 8, 0x02a7, 0x02a8, 0x02a9 }, + { 9, 0x026b, 0x026c, 0x026d }, + { 10, 0x0037, 0x0037, 0x0037 }, + { 11, 0x0264, 0x0265, 0x0266 }, + { 12, 0x80f7, 0x80f7, 0x80f8 }, + { 13, 0x025e, 0x025f, 0x0260 }, + { 14, 0x0261, 0x0262, 0x0263 }, + { 15, 0x02a3, 0x02a4, 0x02a5 }, + { 16, 0x0272, 0x0273, 0x0274 }, + { 34, 0x0037, 0x0037, 0x0037 }, + { 18, 0x025b, 0x025c, 0x025c }, + { 19, 0x026e, 0x026f, 0x0270 }, + { 20, 0x0037, 0x0037, 0x0037 }, + { 21, 0x0280, 0x0281, 0x0282 }, + { 22, 0x80f9, 0x80f9, 0x0287 }, + { 23, 0x80fa, 0x80fa, 0x0289 }, + { 24, 0x028d, 0x028e, 0x028f }, + { 25, 0x80fc, 0x80fd, 0x02a2 }, + { 26, 0x0037, 0x0037, 0x0037 }, + { 27, 0x0275, 0x0277, 0x0278 }, + { 28, 0x8167, 0x04c9, 0x04ca }, + { 29, 0x815d, 0x815e, 0x815f }, + { 30, 0x1aa0, 0x1aa1, 0x1aa2 }, + { 31, 0x0037, 0x1aa3, 0x1aa4 }, + { 32, 0x1aa5, 0x1aa5, 0x1aa6 }, + { 33, 0x04c6, 0x04c6, 0x04c6 }, + { 34, 0x04c7, 0x04c7, 0x04c7 }, + { 35, 0x04cb, 0x04cb, 0x04cc }, + { 36, 0x027b, 0x027b, 0x027d }, + { 37, 0x027b, 0x027d, 0x027d }, + { 38, 0x02a3, 0x02a4, 0x02a5 }, + { 39, 0x04c6, 0x04c6, 0x04c6 }, + { 40, 0x1aa6, 0x1aa6, 0x1aa6 }, + // Voicebox 1 + { 0, 0x0322, 0x0323, 0x0324 }, + { 1, 0x0325, 0x0326, 0x0327 }, + { 2, 0x812e, 0x0335, 0x0336 }, + { 3, 0x035b, 0x035c, 0x035d }, + { 4, 0x033a, 0x033b, 0x033c }, + { 5, 0x033d, 0x033f, 0x0342 }, + { 6, 0x0343, 0x0344, 0x0345 }, + { 7, 0x0346, 0x0347, 0x0348 }, + { 8, 0x0349, 0x034a, 0x034b }, + { 9, 0x030e, 0x030f, 0x0310 }, + { 10, 0x0037, 0x0037, 0x0037 }, + { 11, 0x0306, 0x0307, 0x0308 }, + { 12, 0x0309, 0x8128, 0x030b }, + { 13, 0x8126, 0x0301, 0x0302 }, + { 14, 0x8127, 0x0304, 0x0305 }, + { 15, 0x0037, 0x0037, 0x0037 }, + { 16, 0x031c, 0x031d, 0x031e }, + { 34, 0x0037, 0x0037, 0x0037 }, + { 18, 0x8124, 0x8125, 0x02ff }, + { 19, 0x8129, 0x812a, 0x0316 }, + { 20, 0x031c, 0x031d, 0x031e }, + { 21, 0x0356, 0x0329, 0x0329 }, + { 22, 0x812b, 0x032f, 0x812c }, + { 23, 0x0331, 0x0332, 0x812d }, + { 24, 0x0337, 0x0338, 0x0339 }, + { 25, 0x812f, 0x034d, 0x034e }, + { 26, 0x0355, 0x0356, 0x0357 }, + { 27, 0x031f, 0x0320, 0x0321 }, + { 28, 0x04cf, 0x04d0, 0x04d1 }, + { 29, 0x8163, 0x8163, 0x8164 }, + { 30, 0x1ace, 0x1ace, 0x1acf }, + { 31, 0x1ad0, 0x1ad0, 0x1ad1 }, + { 32, 0x1ad2, 0x1ad2, 0x1ad3 }, + { 33, 0x8168, 0x8168, 0x8168 }, + { 34, 0x04ce, 0x04ce, 0x04ce }, + { 35, 0x04d2, 0x04d3, 0x04d3 }, + { 36, 0x0322, 0x0323, 0x0324 }, + { 37, 0x0324, 0x0327, 0x0327 }, + { 38, 0x0356, 0x0357, 0x035a }, + { 39, 0x812b, 0x032f, 0x812c }, + { 40, 0x1ad2, 0x1ad2, 0x1ad2 }, + // Voicebox 2 + { 0, 0x03e7, 0x03e8, 0x03e9 }, + { 1, 0x03ea, 0x03eb, 0x03ec }, + { 2, 0x03f9, 0x03fa, 0x03fb }, + { 3, 0x0420, 0x0421, 0x813d }, + { 4, 0x03ff, 0x8139, 0x0401 }, + { 5, 0x0403, 0x0405, 0x0407 }, + { 6, 0x0408, 0x0409, 0x040a }, + { 7, 0x040b, 0x040c, 0x040d }, + { 8, 0x040e, 0x040f, 0x0410 }, + { 9, 0x03d6, 0x03d6, 0x03d7 }, + { 10, 0x0037, 0x0037, 0x0037 }, + { 11, 0x03d0, 0x03d1, 0x8134 }, + { 12, 0x03d3, 0x8135, 0x03d5 }, + { 13, 0x8132, 0x03c8, 0x03c8 }, + { 14, 0x03cd, 0x03ce, 0x8133 }, + { 15, 0x0037, 0x0037, 0x0037 }, + { 16, 0x03e1, 0x03e2, 0x03e3 }, + { 34, 0x0037, 0x0037, 0x0037 }, + { 18, 0x03c4, 0x03c5, 0x03c6 }, + { 19, 0x03d9, 0x03da, 0x03db }, + { 20, 0x031c, 0x031d, 0x031e }, + { 21, 0x03ed, 0x03ee, 0x03ef }, + { 22, 0x8136, 0x03f4, 0x8137 }, + { 23, 0x8138, 0x03f7, 0x03f8 }, + { 24, 0x03fc, 0x03fd, 0x03fe }, + { 25, 0x813a, 0x813c, 0x0415 }, + { 26, 0x041b, 0x041c, 0x041d }, + { 27, 0x03e4, 0x03e5, 0x03e6 }, + { 28, 0x04d5, 0x04d6, 0x04d7 }, + { 29, 0x8165, 0x8165, 0x8166 }, + { 30, 0x1ad6, 0x1ad6, 0x1ad7 }, + { 31, 0x1ad8, 0x1ad8, 0x1ad9 }, + { 32, 0x1ada, 0x1ada, 0x1adb }, + { 33, 0x8168, 0x8168, 0x8168 }, + { 34, 0x04d4, 0x04d4, 0x04d4 }, + { 35, 0x04d8, 0x04d8, 0x04d9 }, + { 36, 0x03e7, 0x03e8, 0x03e9 }, + { 37, 0x03e8, 0x03eb, 0x03eb }, + { 38, 0x041b, 0x0417, 0x041d }, + { 39, 0x8134, 0x03f4, 0x8134 }, + { 40, 0x1adb, 0x1adb, 0x1adb }, + // Voicebox 3 + { 0, 0x0396, 0x0396, 0x0396 }, + { 1, 0x0037, 0x0398, 0x0399 }, + { 2, 0x03a4, 0x0037, 0x03a6 }, + { 3, 0x03c1, 0x03c2, 0x03c2 }, + { 4, 0x03aa, 0x03ab, 0x03ac }, + { 5, 0x03ad, 0x03ae, 0x0037 }, + { 6, 0x03b0, 0x03b0, 0x03b1 }, + { 7, 0x0037, 0x03b3, 0x03b4 }, + { 8, 0x03b5, 0x03b5, 0x03b6 }, + { 9, 0x0037, 0x0389, 0x038a }, + { 10, 0x0000, 0x0000, 0x0000 }, + { 11, 0x0381, 0x0382, 0x0037 }, + { 12, 0x0385, 0x0037, 0x0387 }, + { 13, 0x0037, 0x037e, 0x037f }, + { 14, 0x037e, 0x037f, 0x0380 }, + { 15, 0x0000, 0x0000, 0x0000 }, + { 16, 0x0384, 0x0385, 0x0037 }, + { 34, 0x03aa, 0x03ab, 0x03ac }, + { 18, 0x0037, 0x037b, 0x037c }, + { 19, 0x038d, 0x038d, 0x038d }, + { 20, 0x0384, 0x0385, 0x0387 }, + { 21, 0x039a, 0x039b, 0x0037 }, + { 22, 0x039f, 0x0037, 0x03a1 }, + { 23, 0x03a1, 0x03a2, 0x8130 }, + { 24, 0x03a7, 0x0037, 0x03a9 }, + { 25, 0x03b7, 0x03b8, 0x8131 }, + { 26, 0x03be, 0x0037, 0x03c0 }, + { 27, 0x0381, 0x0382, 0x0037 }, + { 28, 0x0000, 0x0000, 0x0000 }, + { 29, 0x0037, 0x0396, 0x0037 }, + { 30, 0x0037, 0x0396, 0x0037 }, + { 31, 0x0037, 0x0396, 0x0037 }, + { 32, 0x0037, 0x0396, 0x0037 }, + { 33, 0x037b, 0x037c, 0x037b }, + { 34, 0x03aa, 0x03b1, 0x03ab }, + { 35, 0x0000, 0x0000, 0x0000 }, + { 36, 0x0396, 0x0396, 0x0399 }, + { 37, 0x0399, 0x0399, 0x0396 }, + { 38, 0x03bc, 0x03be, 0x03c0 }, + { 39, 0x039f, 0x039f, 0x039f }, + { 40, 0x0000, 0x0000, 0x0000 }, +}; + +s16 g_SpecialQuipBank[][4] = { + { 0, 0x0af2, 0x0af3, 0x0af8 }, + { 1, 0x1aee, 0x1aef, 0x1aee }, + { 2, 0x023d, 0x023e, 0x0247 }, + { 3, 0x0248, 0x0249, 0x024b }, + { 4, 0x0246, 0x023f, 0x0240 }, + { 5, 0x024c, 0x0252, 0x0251 }, + { 6, 0x024f, 0x0258, 0x024d }, + { 7, 0x0243, 0x0244, 0x0245 }, + { 8, 0x1294, 0x1295, 0x1296 }, + { 9, 0x1297, 0x1298, 0x1297 }, + { 10, 0x1290, 0x127e, 0x8103 }, + { 11, 0x7324, 0x7325, 0x7326 }, + { 12, 0x128e, 0x1280, 0x1287 }, + { 13, 0x128d, 0x1283, 0x1286 }, + { 14, 0x1291, 0x1284, 0x128a }, + { 15, 0x1292, 0x1281, 0x1288 }, + { 16, 0x128b, 0x1282, 0x1289 }, + { 17, 0x000d, 0x000d, 0x000d }, + { 18, 0x815d, 0x815e, 0x815f }, + { 19, 0x1aa0, 0x1aa1, 0x1aa2 }, + { 20, 0x0037, 0x1aa3, 0x1aa4 }, + { 21, 0x1aa5, 0x1aa5, 0x1aa6 }, + { 22, 0x0446, 0x0461, 0x0465 }, + { 23, 0x0447, 0x045d, 0x0466 }, + { 24, 0x814a, 0x045e, 0x0463 }, + { 25, 0x0444, 0x045f, 0x0468 }, + { 26, 0x0448, 0x0449, 0x0449 }, + { 27, 0x044b, 0x0459, 0x045a }, + { 28, 0x05be, 0x0515, 0x05bf }, + { 29, 0x044b, 0x0459, 0x045a }, + { 30, 0x044b, 0x0459, 0x045a }, + { 31, 0x1aeb, 0x1aeb, 0x1aeb }, + { 32, 0x1b35, 0x1b36, 0x1b37 }, + { 33, 0x1ac0, 0x1ac1, 0x1ac3 }, + { 34, 0x0446, 0x0461, 0x0000 }, + { 35, 0x0447, 0x045d, 0x0000 }, + { 36, 0x814a, 0x045e, 0x1aee }, + { 37, 0x0444, 0x045f, 0x0000 }, + { 38, 0x051b, 0x051c, 0x051d }, + { 39, 0x051e, 0x051f, 0x0520 }, + { 40, 0x0521, 0x0522, 0x0525 }, + { 41, 0x0523, 0x0523, 0x0524 }, + { 42, 0x1adb, 0x1aa6, 0x1ad2 }, + { 43, 0x0af2, 0x0af8, 0x0af8 }, + { 44, 0x0525, 0x0525, 0x0525 }, + { 45, 0x1aec, 0x1aec, 0x1aec }, +}; + +s16 g_QuipTexts[][4] = { + { 1, L_AME(83), L_AME(84), L_AME(85) }, // "How dare you disturb me!", "You will regret this intrusion, girl!", "If I were you, I'd leave...NOW!" + { 2, L_AME(86), L_AME(87), L_AME(86) }, // "Please don't kill me!", "Don't shoot!" + { 3, L_EAR(64), L_EAR(65), L_EAR(66) }, // "What are you doing in my lab?", "I haven't seen you before...", "Who the hell are you?" + { 4, L_EAR(67), L_EAR(68), L_EAR(69) }, // "Shut down the experiment.", "Pull the plug on that, NOW.", "Switch this thing off." + { 5, L_EAR(70), L_EAR(71), L_EAR(72) }, // "I'll shut it down.", "Please don't hurt me.", "Allow me to assist you." + { 6, L_EAR(73), L_EAR(74), L_EAR(75) }, // "My experiments!", "There the experiment is down.", "Leave this area NOW!" + { 7, L_EAR(76), L_EAR(77), L_EAR(78) }, // "Security!", "I'm calling security.", "Accidents will happen." + { 8, L_EAR(79), L_EAR(80), L_EAR(81) }, // "How did that happen?", "Looks like it's off already.", "Have you been tampering with this?" + { 9, L_EAR(82), L_EAR(83), L_EAR(84) }, // "Someone's broken my equipment.", "What's happened to the terminal?", "You vandal - you've broken it." + { 10, L_WAX(10), L_WAX(12), L_WAX(12) }, // "How dare you disturb me!", "If I were you, I'd leave... NOW!" +}; + +s16 g_SkedarQuipBank[][4] = { + { 1, 0x0529, 0x052a, 0x052b }, + { 2, 0x052d, 0x052e, 0x052f }, + { 3, 0x0530, 0x0530, 0x0531 }, + { 1, 0x0532, 0x0533, 0x0534 }, + { 2, 0x0536, 0x0537, 0x0538 }, + { 3, 0x0539, 0x0539, 0x053a }, + { 0, 0x0000, 0x0000, 0x0000 }, +}; + +s16 g_MaianQuipBank[][4] = { + { 1, 0x05e2, 0x05e3, 0x05e4 }, + { 2, 0x05e5, 0x05e6, 0x05e7 }, + { 3, 0x05df, 0x05e0, 0x05e1 }, + { 0, 0x0000, 0x0000, 0x0000 }, +}; + /** * @cmd 0130 */ @@ -8945,6 +9195,35 @@ bool aiShuffleInvestigationTerminals(void) return false; } +/** + * Used by the blow command, which makes Investigation scientists run to the + * computer terminals. The number of the left is the pad that the terminal sits + * on, and the number on the right is the pad that the scientist will run to + * when running to the terminal. + */ +u16 g_InvestigationPadMap[] = { + 0x0246, 0x007b, + 0x0247, 0x007d, + 0x0248, 0x007e, + 0x0249, 0x007c, + 0x024a, 0x0093, + 0x024b, 0x0091, + 0x024c, 0x0092, + 0x024d, 0x0093, + 0x024e, 0x00ae, + 0x024f, 0x00ac, + 0x0250, 0x00ab, + 0x0251, 0x00ad, + 0x0252, 0x00a1, + 0x0253, 0x009f, + 0x0254, 0x00a0, + 0x0255, 0x009e, + 0x0256, 0x00bb, + 0x0257, 0x00b8, + 0x0258, 0x00b9, + 0x0259, 0x00ba, +}; + /** * @cmd 0142 */ @@ -9302,94 +9581,27 @@ bool aiChrAdjustMotionBlur(void) /** * @cmd 016e */ -GLOBAL_ASM( -glabel ai016e -/* f05c6b8: 27bdffc0 */ addiu $sp,$sp,-64 -/* f05c6bc: 3c188007 */ lui $t8,%hi(var80069780) -/* f05c6c0: afbf001c */ sw $ra,0x1c($sp) -/* f05c6c4: 27189780 */ addiu $t8,$t8,%lo(var80069780) -/* f05c6c8: 8f010000 */ lw $at,0x0($t8) -/* f05c6cc: 27a60030 */ addiu $a2,$sp,0x30 -/* f05c6d0: 3c02800a */ lui $v0,%hi(g_Vars) -/* f05c6d4: acc10000 */ sw $at,0x0($a2) -/* f05c6d8: 8f090004 */ lw $t1,0x4($t8) -/* f05c6dc: 24429fc0 */ addiu $v0,$v0,%lo(g_Vars) -/* f05c6e0: 8c4e0434 */ lw $t6,0x434($v0) -/* f05c6e4: acc90004 */ sw $t1,0x4($a2) -/* f05c6e8: 8c4f0438 */ lw $t7,0x438($v0) -/* f05c6ec: 8f010008 */ lw $at,0x8($t8) -/* f05c6f0: 8c440424 */ lw $a0,0x424($v0) -/* f05c6f4: 01cf1821 */ addu $v1,$t6,$t7 -/* f05c6f8: acc10008 */ sw $at,0x8($a2) -/* f05c6fc: 90650002 */ lbu $a1,0x2($v1) -/* f05c700: 0fc126d1 */ jal chrFindById -/* f05c704: afa3003c */ sw $v1,0x3c($sp) -/* f05c708: 8fa3003c */ lw $v1,0x3c($sp) -/* f05c70c: 27a60030 */ addiu $a2,$sp,0x30 -/* f05c710: 10400032 */ beqz $v0,.L0f05c7dc -/* f05c714: 00402025 */ or $a0,$v0,$zero -/* f05c718: 8c4a001c */ lw $t2,0x1c($v0) -/* f05c71c: 1140002f */ beqz $t2,.L0f05c7dc -/* f05c720: 00000000 */ sll $zero,$zero,0x0 -/* f05c724: 90620004 */ lbu $v0,0x4($v1) -/* f05c728: 24010002 */ addiu $at,$zero,0x2 -/* f05c72c: 3c0b8007 */ lui $t3,%hi(var8006978c) -/* f05c730: 14410010 */ bne $v0,$at,.L0f05c774 -/* f05c734: 256b978c */ addiu $t3,$t3,%lo(var8006978c) -/* f05c738: 8d610000 */ lw $at,0x0($t3) -/* f05c73c: 27a70028 */ addiu $a3,$sp,0x28 -/* f05c740: ace10000 */ sw $at,0x0($a3) -/* f05c744: 906e0003 */ lbu $t6,0x3($v1) -/* f05c748: 3c013d00 */ lui $at,0x3d00 -/* f05c74c: 44814000 */ mtc1 $at,$f8 -/* f05c750: 448e2000 */ mtc1 $t6,$f4 -/* f05c754: afa00010 */ sw $zero,0x10($sp) -/* f05c758: 468021a0 */ cvt.s.w $f6,$f4 -/* f05c75c: 46083282 */ mul.s $f10,$f6,$f8 -/* f05c760: 44055000 */ mfc1 $a1,$f10 -/* f05c764: 0fc0d049 */ jal func0f034124 -/* f05c768: 00000000 */ sll $zero,$zero,0x0 -/* f05c76c: 1000001b */ beqz $zero,.L0f05c7dc -/* f05c770: 00000000 */ sll $zero,$zero,0x0 -.L0f05c774: -/* f05c774: 5440000f */ bnezl $v0,.L0f05c7b4 -/* f05c778: 90680003 */ lbu $t0,0x3($v1) -/* f05c77c: 906f0003 */ lbu $t7,0x3($v1) -/* f05c780: 3c013d00 */ lui $at,0x3d00 -/* f05c784: 44812000 */ mtc1 $at,$f4 -/* f05c788: 448f8000 */ mtc1 $t7,$f16 -/* f05c78c: afa00010 */ sw $zero,0x10($sp) -/* f05c790: 00003825 */ or $a3,$zero,$zero -/* f05c794: 468084a0 */ cvt.s.w $f18,$f16 -/* f05c798: 46049182 */ mul.s $f6,$f18,$f4 -/* f05c79c: 44053000 */ mfc1 $a1,$f6 -/* f05c7a0: 0fc0d049 */ jal func0f034124 -/* f05c7a4: 00000000 */ sll $zero,$zero,0x0 -/* f05c7a8: 1000000c */ beqz $zero,.L0f05c7dc -/* f05c7ac: 00000000 */ sll $zero,$zero,0x0 -/* f05c7b0: 90680003 */ lbu $t0,0x3($v1) -.L0f05c7b4: -/* f05c7b4: 3c01bd00 */ lui $at,0xbd00 -/* f05c7b8: 44818000 */ mtc1 $at,$f16 -/* f05c7bc: 44884000 */ mtc1 $t0,$f8 -/* f05c7c0: afa00010 */ sw $zero,0x10($sp) -/* f05c7c4: 00003825 */ or $a3,$zero,$zero -/* f05c7c8: 468042a0 */ cvt.s.w $f10,$f8 -/* f05c7cc: 46105482 */ mul.s $f18,$f10,$f16 -/* f05c7d0: 44059000 */ mfc1 $a1,$f18 -/* f05c7d4: 0fc0d049 */ jal func0f034124 -/* f05c7d8: 00000000 */ sll $zero,$zero,0x0 -.L0f05c7dc: -/* f05c7dc: 3c03800a */ lui $v1,%hi(g_Vars) -/* f05c7e0: 24639fc0 */ addiu $v1,$v1,%lo(g_Vars) -/* f05c7e4: 8c790438 */ lw $t9,0x438($v1) -/* f05c7e8: 8fbf001c */ lw $ra,0x1c($sp) -/* f05c7ec: 27bd0040 */ addiu $sp,$sp,0x40 -/* f05c7f0: 27380005 */ addiu $t8,$t9,0x5 -/* f05c7f4: ac780438 */ sw $t8,0x438($v1) -/* f05c7f8: 03e00008 */ jr $ra -/* f05c7fc: 00001025 */ or $v0,$zero,$zero -); +bool aiDamagePlayer(void) +{ + u8 *cmd = g_Vars.ailist + g_Vars.aioffset; + struct coord coord = {0, 0, 0}; + struct chrdata *chr = chrFindById(g_Vars.chrdata, cmd[2]); + + if (chr && chr->prop) { + if (cmd[4] == 2) { + u8 sp40[] = {0x1a, 0, 0, 3}; + func0f034124(chr, (s32)cmd[3] * 0.03125f, &coord, sp40, 0); + } else if (cmd[4] == 0) { + func0f034124(chr, (s32)cmd[3] * 0.03125f, &coord, NULL, 0); + } else { + func0f034124(chr, (s32)cmd[3] * -0.03125f, &coord, NULL, 0); + } + } + + g_Vars.aioffset += 5; + + return false; +} /** * @cmd 016f diff --git a/src/game/data/data_00e460.c b/src/game/data/data_00e460.c index 5c2fe86ba..faf997b18 100644 --- a/src/game/data/data_00e460.c +++ b/src/game/data/data_00e460.c @@ -9,917 +9,6 @@ #include "stagesetup.h" #include "types.h" -u32 var80068460 = 0x10204080; -u8 g_ChrTeamIds[8] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; -u32 var8006846c = 0x00000064; -u32 var80068470 = 0x00000065; -u32 var80068474 = 0x00000066; -u32 var80068478 = 0x00000067; -u32 var8006847c = 0x00000030; -u32 var80068480 = 0x0000003a; -u32 var80068484 = 0x00000023; -u32 var80068488 = 0x00000023; -u32 var8006848c = 0x00000000; - -// e4b0 -bool (*g_CommandPointers[])(void) = { - /*0x0000*/ aiGoToNext, - /*0x0001*/ aiGoToFirst, - /*0x0002*/ aiLabel, - /*0x0003*/ aiYield, - /*0x0004*/ aiEndList, - /*0x0005*/ aiSetList, - /*0x0006*/ aiSetReturnList, - /*0x0007*/ aiSetShotList, - /*0x0008*/ aiReturn, - /*0x0009*/ aiStop, - /*0x000a*/ aiKneel, - /*0x000b*/ aiChrDoAnimation, - /*0x000c*/ aiIfIdle, - /*0x000d*/ aiBeSurprised000d, - /*0x000e*/ aiBeSurprised000e, - /*0x000f*/ aiStepSideways, - /*0x0010*/ aiHopSideways, - /*0x0011*/ aiRunSideways, - /*0x0012*/ aiWalkAndFire, - /*0x0013*/ aiRunAndFire, - /*0x0014*/ aiRollAndFire, - /*0x0015*/ aiAimAndFire1, - /*0x0016*/ aiKneelAndFire, - /*0x0017*/ aiAimAndFire2, - /*0x0018*/ aiFaceEntity, - /*0x0019*/ ai0019, - /*0x001a*/ ai001a, - /*0x001b*/ aiConsiderGrenadeThrow, - /*0x001c*/ ai001c, - /*0x001d*/ aiJogToPad, - /*0x001e*/ aiGoToPadPreset, - /*0x001f*/ aiWalkToPad, - /*0x0020*/ aiRunToPad, - /*0x0021*/ aiSetPath, - /*0x0022*/ aiStartPath, - /*0x0023*/ aiIfPathStarted, - /*0x0024*/ aiSurrender, - /*0x0025*/ aiFadeOut, - /*0x0026*/ aiRemoveChr, - /*0x0027*/ ai0027, - /*0x0028*/ aiActivateAlarm, - /*0x0029*/ aiDeactivateAlarm, - /*0x002a*/ ai002a, - /*0x002b*/ aiTryJogToTargetProp, - /*0x002c*/ aiTryWalkToTargetProp, - /*0x002d*/ aiTryRunToTargetProp, - /*0x002e*/ ai002e, - /*0x002f*/ aiTryJogToChr, - /*0x0030*/ aiTryWalkToChr, - /*0x0031*/ aiTryRunToChr, - /*0x0032*/ aiIfStopped, - /*0x0033*/ aiIfChrDying, - /*0x0034*/ aiIfChrDeathAnimationFinished, - /*0x0035*/ aiIfTargetPropInSight, - /*0x0036*/ aiRandom, - /*0x0037*/ aiIfRandomLessThan, - /*0x0038*/ aiIfRandomGreaterThan, - /*0x0039*/ aiIfChrAlarmActivate, - /*0x003a*/ aiIfAlarmActive, - /*0x003b*/ aiIfAlarmInactive, - /*0x003c*/ ai003c, - /*0x003d*/ aiIfSawInjury, - /*0x003e*/ aiIfSawDeath, - /*0x003f*/ aiIfSeesPlayer, - /*0x0040*/ ai0040, - /*0x0041*/ ai0041, - /*0x0042*/ aiIfInLoadedRoom, - /*0x0043*/ aiIfSawTargetRecently, - /*0x0044*/ aiIfHeardTargetRecently, - /*0x0045*/ ai0045, - /*0x0046*/ aiIfNeverBeenOnScreen, - /*0x0047*/ ai0047, - /*0x0048*/ aiIfChrInActiveRoom, - /*0x0049*/ aiIfRoomActive, - /*0x004a*/ ai004a, - /*0x004b*/ aiIfNearMiss, - /*0x004c*/ aiIfSeesSuspiciousItem, - /*0x004d*/ ai004d, - /*0x004e*/ ai004e, - /*0x004f*/ ai004f, - /*0x0050*/ ai0050, - /*0x0051*/ ai0051, - /*0x0052*/ aiIfDistanceToTargetLessThan, - /*0x0053*/ aiIfDistanceToTargetGreaterThan, - /*0x0054*/ aiIfChrDistanceToPadLessThan, - /*0x0055*/ aiIfChrDistanceToPadGreaterThan, - /*0x0056*/ aiIfDistanceToChrLessThan, - /*0x0057*/ aiIfDistanceToChrGreaterThan, - /*0x0058*/ ai0058, - /*0x0059*/ aiIfDistanceFromTargetToPadLessThan, - /*0x005a*/ aiIfDistanceFromTargetToPadGreaterThan, - /*0x005b*/ aiIfChrInRoom, - /*0x005c*/ aiIfTargetInRoom, - /*0x005d*/ aiIfChrHasObject, - /*0x005e*/ aiIfWeaponThrown, - /*0x005f*/ aiIfWeaponThrownOnObject, - /*0x0060*/ aiIfChrHasWeaponEquipped, - /*0x0061*/ aiIfGunUnclaimed, - /*0x0062*/ aiIfObjectHealthy, - /*0x0063*/ aiIfChrActivatedObject, - /*0x0064*/ NULL, - /*0x0065*/ ai0065, - /*0x0066*/ aiDestroyObject, - /*0x0067*/ ai0067, - /*0x0068*/ aiChrDropItems, - /*0x0069*/ aiChrDropWeapon, - /*0x006a*/ aiGiveObjectToChr, - /*0x006b*/ aiObjectMoveToPad, - /*0x006c*/ aiOpenDoor, - /*0x006d*/ aiCloseDoor, - /*0x006e*/ aiIfDoorState, - /*0x006f*/ aiIfObjectIsDoor, - /*0x0070*/ aiLockDoor, - /*0x0071*/ aiUnlockDoor, - /*0x0072*/ aiIfDoorLocked, - /*0x0073*/ aiIfObjectiveComplete, - /*0x0074*/ aiIfObjectiveFailed, - /*0x0075*/ ai0075, - /*0x0076*/ ai0076, - /*0x0077*/ aiIfDifficultyLessThan, - /*0x0078*/ aiIfDifficultyGreaterThan, - /*0x0079*/ aiIfUptimeLessThan, - /*0x007a*/ aiIfUptimeGreaterThan, - /*0x007b*/ aiIfStageIdLessThan, - /*0x007c*/ aiIfStageIdGreaterThan, - /*0x007d*/ aiIfNumArghsLessThan, - /*0x007e*/ aiIfNumArghsGreaterThan, - /*0x007f*/ aiIfNumCloseArghsLessThan, - /*0x0080*/ aiIfNumCloseArghsGreaterThan, - /*0x0081*/ aiIfChrHealthGreaterThan, - /*0x0082*/ aiIfChrHealthLessThan, - /*0x0083*/ aiIfInjured, - /*0x0084*/ aiSetMorale, - /*0x0085*/ aiAddMorale, - /*0x0086*/ aiChrAddMorale, - /*0x0087*/ aiSubtractMorale, - /*0x0088*/ aiIfMoraleLessThan, - /*0x0089*/ aiIfMoraleLessThanRandom, - /*0x008a*/ aiSetAlertness, - /*0x008b*/ aiAddAlertness, - /*0x008c*/ aiChrAddAlertness, - /*0x008d*/ aiSubtractAlertness, - /*0x008e*/ aiIfAlertness, - /*0x008f*/ aiIfChrAlertnessLessThan, - /*0x0090*/ aiIfAlertnessLessThanRandom, - /*0x0091*/ aiNoOp0091, - /*0x0092*/ aiSetHearDistance, - /*0x0093*/ aiSetViewDistance, - /*0x0094*/ aiSetGrenadeProbability, - /*0x0095*/ aiSetChrNum, - /*0x0096*/ aiSetMaxDamage, - /*0x0097*/ aiAddHealth, - /*0x0098*/ aiSetReactionSpeed, - /*0x0099*/ aiSetRecoverySpeed, - /*0x009a*/ aiSetAccuracy, - /*0x009b*/ aiSetFlag, - /*0x009c*/ aiUnsetFlag, - /*0x009d*/ aiIfHasFlag, - /*0x009e*/ aiChrSetFlag, - /*0x009f*/ aiChrUnsetFlag, - /*0x00a0*/ aiIfChrHasFlag, - /*0x00a1*/ aiSetStageFlag, - /*0x00a2*/ aiUnsetStageFlag, - /*0x00a3*/ aiIfStageFlagEq, - /*0x00a4*/ aiSetChrflag, - /*0x00a5*/ aiUnsetChrflag, - /*0x00a6*/ aiIfHasChrflag, - /*0x00a7*/ aiChrSetChrflag, - /*0x00a8*/ aiChrUnsetChrflag, - /*0x00a9*/ aiIfChrHasChrflag, - /*0x00aa*/ aiSetObjFlag, - /*0x00ab*/ aiUnsetObjFlag, - /*0x00ac*/ aiIfObjHasFlag, - /*0x00ad*/ aiSetObjFlag2, - /*0x00ae*/ aiUnsetObjFlag2, - /*0x00af*/ aiIfObjHasFlag2, - /*0x00b0*/ aiSetChrPreset, - /*0x00b1*/ aiSetChrTarget, - /*0x00b2*/ aiSetPadPreset, - /*0x00b3*/ aiChrSetPadPreset, - /*0x00b4*/ aiChrCopyPadPreset, - /*0x00b5*/ aiPrint, - /*0x00b6*/ aiRestartTimer, - /*0x00b7*/ aiResetTimer, - /*0x00b8*/ aiPauseTimer, - /*0x00b9*/ aiResumeTimer, - /*0x00ba*/ aiIfTimerStopped, - /*0x00bb*/ aiIfTimerGreaterThanRandom, - /*0x00bc*/ aiIfTimerLessThan, - /*0x00bd*/ aiIfTimerGreaterThan, - /*0x00be*/ aiShowCountdownTimer, - /*0x00bf*/ aiHideCountdownTimer, - /*0x00c0*/ aiSetCountdownTimerValue, - /*0x00c1*/ aiStopCountdownTimer, - /*0x00c2*/ aiStartCountdownTimer, - /*0x00c3*/ aiIfCountdownTimerStopped, - /*0x00c4*/ aiIfCountdownTimerLessThan, - /*0x00c5*/ aiIfCountdownTimerGreaterThan, - /*0x00c6*/ aiSpawnChrAtPad, - /*0x00c7*/ aiSpawnChrAtChr, - /*0x00c8*/ aiTryEquipWeapon, - /*0x00c9*/ aiTryEquipHat, - /*0x00ca*/ aiDuplicateChr, - /*0x00cb*/ aiShowHudmsg, - /*0x00cc*/ aiShowHudmsgTopMiddle, - /*0x00cd*/ aiSpeak, - /*0x00ce*/ aiPlaySound, - /*0x00cf*/ ai00cf, - /*0x00d0*/ ai00d0, - /*0x00d1*/ ai00d1, - /*0x00d2*/ ai00d2, - /*0x00d3*/ aiAudioMuteChannel, - /*0x00d4*/ ai00d4, - /*0x00d5*/ aiHovercarBeginPath, - /*0x00d6*/ aiSetVehicleSpeed, - /*0x00d7*/ aiSetRotarySpeed, - /*0x00d8*/ aiNoOp00d8, - /*0x00d9*/ aiNoOp00d9, - /*0x00da*/ aiSetObjImage, - /*0x00db*/ aiNoOp00db, - /*0x00dc*/ aiEndLevel, - /*0x00dd*/ ai00dd, - /*0x00de*/ aiWarpJoToPad, - /*0x00df*/ ai00df, - /*0x00e0*/ aiRevokeControl, - /*0x00e1*/ aiGrantControl, - /*0x00e2*/ aiChrMoveToPad, - /*0x00e3*/ ai00e3, - /*0x00e4*/ ai00e4, - /*0x00e5*/ aiIfColourFadeComplete, - /*0x00e6*/ NULL, - /*0x00e7*/ NULL, - /*0x00e8*/ aiSetDoorOpen, - /*0x00e9*/ ai00e9, - /*0x00ea*/ aiIfNumPlayersLessThan, - /*0x00eb*/ aiIfChrAmmoQuantityLessThan, - /*0x00ec*/ aiChrDrawWeapon, - /*0x00ed*/ aiChrDrawWeaponInCutscene, - /*0x00ee*/ ai00ee, - /*0x00ef*/ aiIfObjInRoom, - /*0x00f0*/ ai00f0, - /*0x00f1*/ aiIfAttacking, - /*0x00f2*/ ai00f2, - /*0x00f3*/ aiChrSetInvincible, - /*0x00f4*/ ai00f4, - /*0x00f5*/ ai00f5, - /*0x00f6*/ ai00f6, - /*0x00f7*/ aiIfAllObjectivesComplete, - /*0x00f8*/ aiIfPlayerIsInvincible, - /*0x00f9*/ aiAudioPlayXMusic, - /*0x00fa*/ aiAudioStopChannel, - /*0x00fb*/ aiChrExplosions, - /*0x00fc*/ aiIfKillCountGreaterThan, - /*0x00fd*/ ai00fd, - /*0x00fe*/ aiKillBond, - /*0x00ff*/ aiBeSurprised00ff, - /*0x0100*/ aiNoOp0100, - /*0x0101*/ aiNoOp0101, - /*0x0102*/ aiSetLights, - /*0x0103*/ ai0103, - /*0x0104*/ aiRemoveObjectAtPropPreset, - /*0x0105*/ aiIfPropPresetHeightLessThan, - /*0x0106*/ aiSetTarget, - /*0x0107*/ aiIfPresetsTargetIsNotMyTarget, - /*0x0108*/ aiIfChrTarget, - /*0x0109*/ ai0109, - /*0x010a*/ ai010a, - /*0x010b*/ aiChrSetTeam, - /*0x010c*/ aiIfCompareChrPresetsTeam, - /*0x010d*/ aiNoOp010d, - /*0x010e*/ aiSetShield, - /*0x010f*/ aiIfChrShieldLessThan, - /*0x0110*/ aiIfChrShieldGreaterThan, - /*0x0111*/ aiSetCameraAnimation, - /*0x0112*/ aiObjectDoAnimation, - /*0x0113*/ aiIfInCutscene, - /*0x0114*/ aiShowChr, - /*0x0115*/ aiHideChr, - /*0x0116*/ aiShowObj, - /*0x0117*/ aiHideObj, - /*0x0118*/ aiSetObjFlag3, - /*0x0119*/ aiUnsetObjFlag3, - /*0x011a*/ aiIfObjHasFlag3, - /*0x011b*/ aiChrSetHiddenFlag, - /*0x011c*/ aiChrUnsetHiddenFlag, - /*0x011d*/ aiIfChrHasHiddenFlag, - /*0x011e*/ aiIfHuman, - /*0x011f*/ aiIfSkedar, - /*0x0120*/ ai0120, - /*0x0121*/ ai0121, - /*0x0122*/ ai0122, - /*0x0123*/ ai0123, - /*0x0124*/ aiGoToCover, - /*0x0125*/ ai0125, - /*0x0126*/ aiIfPlayerUsingCmpOrAr34, - /*0x0127*/ aiDetectEnemyOnSameFloor, - /*0x0128*/ aiDetectEnemy, - /*0x0129*/ aiIfSafetyLessThan, - /*0x012a*/ aiIfTargetMovingSlowly, - /*0x012b*/ aiIfTargetMovingCloser, - /*0x012c*/ aiIfTargetMovingAway, - /*0x012d*/ NULL, - /*0x012e*/ NULL, - /*0x012f*/ ai012f, - /*0x0130*/ aiSayQuip, - /*0x0131*/ aiIncreaseSquadronAlertness, - /*0x0132*/ aiSetAction, - /*0x0133*/ aiSetTeamOrders, - /*0x0134*/ aiIfOrders, - /*0x0135*/ aiIfHasOrders, - /*0x0136*/ aiRetreat, - /*0x0137*/ aiIfChrInSquadronDoingAction, - /*0x0138*/ aiIfChannelIdle, - /*0x0139*/ ai0139, - /*0x013a*/ aiSetChrPresetToUnalertedTeammate, - /*0x013b*/ aiSetSquadron, - /*0x013c*/ ai013c, - /*0x013d*/ aiIfDangerousObjectNearby, - /*0x013e*/ ai013e, - /*0x013f*/ aiIfHeliWeaponsArmed, - /*0x0140*/ aiIfHoverbotNextStep, - /*0x0141*/ aiShuffleInvestigationTerminals, - /*0x0142*/ aiSetPadPresetToInvestigationTerminal, - /*0x0143*/ aiHeliArmWeapons, - /*0x0144*/ aiHeliUnarmWeapons, - /*0x0145*/ aiRebuildTeams, - /*0x0146*/ aiRebuildSquadrons, - /*0x0147*/ aiIfSquadronIsDead, - /*0x0148*/ aiChrSetListening, - /*0x0149*/ aiIfChrListening, - /*0x014a*/ aiIfTrue, - /*0x014b*/ aiIfNotListening, - /*0x014c*/ NULL, - /*0x014d*/ NULL, - /*0x014e*/ NULL, - /*0x014f*/ NULL, - /*0x0150*/ NULL, - /*0x0151*/ NULL, - /*0x0152*/ aiIfNumChrsInSquadronGreaterThan, - /*0x0153*/ NULL, - /*0x0154*/ NULL, - /*0x0155*/ NULL, - /*0x0156*/ NULL, - /*0x0157*/ aiSetTintedGlassEnabled, - /*0x0158*/ NULL, - /*0x0159*/ NULL, - /*0x015a*/ NULL, - /*0x015b*/ aiAudioPlayMusic, - /*0x015c*/ aiAudioRestartMusic, - /*0x015d*/ NULL, - /*0x015e*/ NULL, - /*0x015f*/ NULL, - /*0x0160*/ NULL, - /*0x0161*/ NULL, - /*0x0162*/ NULL, - /*0x0163*/ NULL, - /*0x0164*/ NULL, - /*0x0165*/ aiIfChrInjured, - /*0x0166*/ aiIfAction, - /*0x0167*/ aiHovercopterFireRocket, - /*0x0168*/ ai0168, - /*0x0169*/ aiIfNaturalAnim, - /*0x016a*/ aiIfY, - /*0x016b*/ ai016b, - /*0x016c*/ aiNoOp016c, - /*0x016d*/ aiChrAdjustMotionBlur, - /*0x016e*/ ai016e, - /*0x016f*/ aiIfChrHasGun, - /*0x0170*/ aiDoGunCommand, - /*0x0171*/ aiIfDistanceToGunLessThan, - /*0x0172*/ ai0172, - /*0x0173*/ aiChrCopyProperties, - /*0x0174*/ aiIfCutsceneButtonPressed, - /*0x0175*/ ai0175, - /*0x0176*/ ai0176, - /*0x0177*/ aiPlayerAutoWalk, - /*0x0178*/ aiIfPlayerAutoWalkFinished, - /*0x0179*/ ai0179, - /*0x017a*/ ai017a, - /*0x017b*/ aiIfChrUnloaded, - /*0x017c*/ aiAssignSound, - /*0x017d*/ aiAudioSetMusicTrack, - /*0x017e*/ aiAudioRestartDefaultMusic, - /*0x017f*/ aiAudioSetSfxTrack, - /*0x0180*/ aiAudioRestartSfx, - /*0x0181*/ aiIfPlayerLookingAtObject, - /*0x0182*/ aiPunchOrKick, - /*0x0183*/ aiIfTargetIsPlayer, - /*0x0184*/ ai0184, - /*0x0185*/ aiMpInitSimulants, - /*0x0186*/ aiIfSoundTimer, - /*0x0187*/ aiSetTargetToEyespyIfInSight, - /*0x0188*/ aiIfLiftStationary, - /*0x0189*/ aiLiftGoToStop, - /*0x018a*/ aiIfLiftAtStop, - /*0x018b*/ aiConfigureRain, - /*0x018c*/ aiChrToggleProp, - /*0x018d*/ aiActivateLift, - /*0x018e*/ aiMiniSkedarTryPounce, - /*0x018f*/ aiIfObjectDistanceToPadLessThan, - /*0x0190*/ aiSetSavefileFlag, - /*0x0191*/ aiUnsetSavefileFlag, - /*0x0192*/ aiIfSavefileFlagIsSet, - /*0x0193*/ aiIfSavefileFlagIsUnset, - /*0x0194*/ NULL, - /*0x0195*/ NULL, - /*0x0196*/ NULL, - /*0x0197*/ NULL, - /*0x0198*/ NULL, - /*0x0199*/ NULL, - /*0x019a*/ NULL, - /*0x019b*/ NULL, - /*0x019c*/ NULL, - /*0x019d*/ NULL, - /*0x019e*/ aiIfObjHealthLessThan, - /*0x019f*/ aiSetObjHealth, - /*0x01a0*/ aiSetChrSpecialDeathAnimation, - /*0x01a1*/ aiSetRoomToSearch, - /*0x01a2*/ aiSayCiStaffQuip, - /*0x01a3*/ aiDoPresetAnimation, - /*0x01a4*/ aiShowHudmsgMiddle, - /*0x01a5*/ ai01a5, - /*0x01a6*/ aiIfTargetYDifferenceLessThan, - /*0x01a7*/ aiIfChrPropsoundcountZero, - /*0x01a8*/ NULL, - /*0x01a9*/ NULL, - /*0x01aa*/ ai01aa, - /*0x01ab*/ aiIfNumKnockedOutChrs, - /*0x01ac*/ NULL, - /*0x01ad*/ aiReleaseObject, - /*0x01ae*/ aiClearInventory, - /*0x01af*/ aiChrGrabObject, - /*0x01b0*/ NULL, - /*0x01b1*/ aiShuffleRuinsPillars, - /*0x01b2*/ ai01b2, - /*0x01b3*/ aiToggleP1P2, - /*0x01b4*/ ai01b4, - /*0x01b5*/ aiChrSetP1P2, - /*0x01b6*/ aiConfigureSnow, - /*0x01b7*/ aiChrSetCloaked, - /*0x01b8*/ aiSetAutogunType, - /*0x01b9*/ aiShufflePelagicSwitches, - /*0x01ba*/ ai01ba, - /*0x01bb*/ aiNoOp01bb, - /*0x01bc*/ ai01bc, - /*0x01bd*/ aiIfTrainingPcHolographed, - /*0x01be*/ aiIfChrWeaponEquipped, - /*0x01bf*/ aiChrBeginOrEndTeleport, - /*0x01c0*/ aiIfChrTeleportFullWhite, - /*0x01c1*/ aiSetPunchDodgeList, - /*0x01c2*/ aiSetShootingAtMeList, - /*0x01c3*/ aiSetDarkRoomList, - /*0x01c4*/ aiSetPlayerDeadList, - /*0x01c5*/ ai01c5, - /*0x01c6*/ aiSetDodgeRating, - /*0x01c7*/ aiSetUnarmedDodgeRating, - /*0x01c8*/ ai01c8, - /*0x01c9*/ ai01c9, - /*0x01ca*/ aiChrSetCutsceneWeapon, - /*0x01cb*/ aiFadeScreen, - /*0x01cc*/ aiIfFadeComplete, - /*0x01cd*/ aiSetChrHudpieceVisible, - /*0x01ce*/ aiSetPassiveMode, - /*0x01cf*/ aiChrSetFiringInCutscene, - /*0x01d0*/ aiSetPortalFlag, - /*0x01d1*/ aiSetObjPartVisible, - /*0x01d2*/ aiChrEmitSparks, - /*0x01d3*/ aiSetDrCarollImages, - /*0x01d4*/ ai01d4, - /*0x01d5*/ aiShowCutsceneChrs, - /*0x01d6*/ aiMiscellaneous, - /*0x01d7*/ aiIfDistanceToTarget2LessThan, - /*0x01d8*/ aiIfDistanceToTarget2GreaterThan, - /*0x01d9*/ aiPlaySoundFromProp, - /*0x01da*/ aiPlayMusicContinuously, - /*0x01db*/ aiChrKill, - /*0x01dc*/ aiRemoveWeaponFromInventory, - /*0x01dd*/ ai01dd, - /*0x01de*/ aiIfCoopMode, - /*0x01df*/ aiIfChrSameFloorDistanceToPadLessThan, - /*0x01e0*/ aiRemoveReferencesToChr, -}; - -// ec34 -u16 g_CommandLengths[] = { - /*0x0000*/ 0x0003, /*0x0001*/ 0x0003, /*0x0002*/ 0x0003, /*0x0003*/ 0x0002, - /*0x0004*/ 0x0002, /*0x0005*/ 0x0005, /*0x0006*/ 0x0005, /*0x0007*/ 0x0004, - /*0x0008*/ 0x0002, /*0x0009*/ 0x0002, /*0x000a*/ 0x0002, /*0x000b*/ 0x000c, - /*0x000c*/ 0x0003, /*0x000d*/ 0x0002, /*0x000e*/ 0x0002, /*0x000f*/ 0x0003, - /*0x0010*/ 0x0003, /*0x0011*/ 0x0003, /*0x0012*/ 0x0003, /*0x0013*/ 0x0003, - /*0x0014*/ 0x0003, /*0x0015*/ 0x0007, /*0x0016*/ 0x0007, /*0x0017*/ 0x0007, - /*0x0018*/ 0x0007, /*0x0019*/ 0x0008, /*0x001a*/ 0x0005, /*0x001b*/ 0x0007, - /*0x001c*/ 0x0006, /*0x001d*/ 0x0004, /*0x001e*/ 0x0003, /*0x001f*/ 0x0004, - /*0x0020*/ 0x0004, /*0x0021*/ 0x0003, /*0x0022*/ 0x0002, /*0x0023*/ 0x0003, - /*0x0024*/ 0x0002, /*0x0025*/ 0x0002, /*0x0026*/ 0x0003, /*0x0027*/ 0x0005, - /*0x0028*/ 0x0002, /*0x0029*/ 0x0002, /*0x002a*/ 0x0003, /*0x002b*/ 0x0003, - /*0x002c*/ 0x0003, /*0x002d*/ 0x0003, /*0x002e*/ 0x0003, /*0x002f*/ 0x0004, - /*0x0030*/ 0x0004, /*0x0031*/ 0x0004, /*0x0032*/ 0x0003, /*0x0033*/ 0x0004, - /*0x0034*/ 0x0004, /*0x0035*/ 0x0003, /*0x0036*/ 0x0002, /*0x0037*/ 0x0004, - /*0x0038*/ 0x0004, /*0x0039*/ 0x0003, /*0x003a*/ 0x0003, /*0x003b*/ 0x0003, - /*0x003c*/ 0x0003, /*0x003d*/ 0x0004, /*0x003e*/ 0x0004, /*0x003f*/ 0x0003, - /*0x0040*/ 0x0007, /*0x0041*/ 0x0007, /*0x0042*/ 0x0003, /*0x0043*/ 0x0003, - /*0x0044*/ 0x0003, /*0x0045*/ 0x0004, /*0x0046*/ 0x0003, /*0x0047*/ 0x0003, - /*0x0048*/ 0x0004, /*0x0049*/ 0x0005, /*0x004a*/ 0x0003, /*0x004b*/ 0x0003, - /*0x004c*/ 0x0003, /*0x004d*/ 0x0004, /*0x004e*/ 0x0006, /*0x004f*/ 0x0004, - /*0x0050*/ 0x0004, /*0x0051*/ 0x0004, /*0x0052*/ 0x0005, /*0x0053*/ 0x0005, - /*0x0054*/ 0x0008, /*0x0055*/ 0x0008, /*0x0056*/ 0x0006, /*0x0057*/ 0x0006, - /*0x0058*/ 0x0005, /*0x0059*/ 0x0007, /*0x005a*/ 0x0007, /*0x005b*/ 0x0007, - /*0x005c*/ 0x0005, /*0x005d*/ 0x0005, /*0x005e*/ 0x0004, /*0x005f*/ 0x0005, - /*0x0060*/ 0x0005, /*0x0061*/ 0x0005, /*0x0062*/ 0x0004, /*0x0063*/ 0x0005, - /*0x0064*/ 0x0001, /*0x0065*/ 0x0003, /*0x0066*/ 0x0003, /*0x0067*/ 0x0003, - /*0x0068*/ 0x0003, /*0x0069*/ 0x0003, /*0x006a*/ 0x0004, /*0x006b*/ 0x0005, - /*0x006c*/ 0x0003, /*0x006d*/ 0x0003, /*0x006e*/ 0x0005, /*0x006f*/ 0x0004, - /*0x0070*/ 0x0004, /*0x0071*/ 0x0004, /*0x0072*/ 0x0005, /*0x0073*/ 0x0004, - /*0x0074*/ 0x0004, /*0x0075*/ 0x0004, /*0x0076*/ 0x0004, /*0x0077*/ 0x0004, - /*0x0078*/ 0x0004, /*0x0079*/ 0x0005, /*0x007a*/ 0x0005, /*0x007b*/ 0x0004, - /*0x007c*/ 0x0004, /*0x007d*/ 0x0004, /*0x007e*/ 0x0004, /*0x007f*/ 0x0004, - /*0x0080*/ 0x0004, /*0x0081*/ 0x0005, /*0x0082*/ 0x0005, /*0x0083*/ 0x0004, - /*0x0084*/ 0x0003, /*0x0085*/ 0x0003, /*0x0086*/ 0x0004, /*0x0087*/ 0x0003, - /*0x0088*/ 0x0004, /*0x0089*/ 0x0003, /*0x008a*/ 0x0003, /*0x008b*/ 0x0003, - /*0x008c*/ 0x0004, /*0x008d*/ 0x0003, /*0x008e*/ 0x0005, /*0x008f*/ 0x0005, - /*0x0090*/ 0x0003, /*0x0091*/ 0x0002, /*0x0092*/ 0x0004, /*0x0093*/ 0x0003, - /*0x0094*/ 0x0003, /*0x0095*/ 0x0003, /*0x0096*/ 0x0005, /*0x0097*/ 0x0004, - /*0x0098*/ 0x0003, /*0x0099*/ 0x0003, /*0x009a*/ 0x0003, /*0x009b*/ 0x0007, - /*0x009c*/ 0x0007, /*0x009d*/ 0x0009, /*0x009e*/ 0x0008, /*0x009f*/ 0x0008, - /*0x00a0*/ 0x0009, /*0x00a1*/ 0x0006, /*0x00a2*/ 0x0006, /*0x00a3*/ 0x0008, - /*0x00a4*/ 0x0006, /*0x00a5*/ 0x0006, /*0x00a6*/ 0x0007, /*0x00a7*/ 0x0007, - /*0x00a8*/ 0x0007, /*0x00a9*/ 0x0008, /*0x00aa*/ 0x0007, /*0x00ab*/ 0x0007, - /*0x00ac*/ 0x0008, /*0x00ad*/ 0x0007, /*0x00ae*/ 0x0007, /*0x00af*/ 0x0008, - /*0x00b0*/ 0x0003, /*0x00b1*/ 0x0004, /*0x00b2*/ 0x0004, /*0x00b3*/ 0x0005, - /*0x00b4*/ 0x0004, /*0x00b5*/ 0x0000, /*0x00b6*/ 0x0002, /*0x00b7*/ 0x0002, - /*0x00b8*/ 0x0002, /*0x00b9*/ 0x0002, /*0x00ba*/ 0x0003, /*0x00bb*/ 0x0003, - /*0x00bc*/ 0x0006, /*0x00bd*/ 0x0006, /*0x00be*/ 0x0002, /*0x00bf*/ 0x0002, - /*0x00c0*/ 0x0004, /*0x00c1*/ 0x0002, /*0x00c2*/ 0x0002, /*0x00c3*/ 0x0003, - /*0x00c4*/ 0x0005, /*0x00c5*/ 0x0005, /*0x00c6*/ 0x000d, /*0x00c7*/ 0x000c, - /*0x00c8*/ 0x000a, /*0x00c9*/ 0x0009, /*0x00ca*/ 0x000a, /*0x00cb*/ 0x0005, - /*0x00cc*/ 0x0006, /*0x00cd*/ 0x0009, /*0x00ce*/ 0x0005, /*0x00cf*/ 0x0006, - /*0x00d0*/ 0x0007, /*0x00d1*/ 0x0007, /*0x00d2*/ 0x0007, /*0x00d3*/ 0x0003, - /*0x00d4*/ 0x0006, /*0x00d5*/ 0x0003, /*0x00d6*/ 0x0006, /*0x00d7*/ 0x0006, - /*0x00d8*/ 0x0003, /*0x00d9*/ 0x0003, /*0x00da*/ 0x0005, /*0x00db*/ 0x0003, - /*0x00dc*/ 0x0002, /*0x00dd*/ 0x0002, /*0x00de*/ 0x0004, /*0x00df*/ 0x0007, - /*0x00e0*/ 0x0004, /*0x00e1*/ 0x0003, /*0x00e2*/ 0x0007, /*0x00e3*/ 0x0003, - /*0x00e4*/ 0x0003, /*0x00e5*/ 0x0004, /*0x00e6*/ 0x0001, /*0x00e7*/ 0x0001, - /*0x00e8*/ 0x0003, /*0x00e9*/ 0x0004, /*0x00ea*/ 0x0004, /*0x00eb*/ 0x0006, - /*0x00ec*/ 0x0004, /*0x00ed*/ 0x0004, /*0x00ee*/ 0x0005, /*0x00ef*/ 0x0006, - /*0x00f0*/ 0x0003, /*0x00f1*/ 0x0003, /*0x00f2*/ 0x0002, /*0x00f3*/ 0x0003, - /*0x00f4*/ 0x000e, /*0x00f5*/ 0x0002, /*0x00f6*/ 0x0003, /*0x00f7*/ 0x0003, - /*0x00f8*/ 0x0004, /*0x00f9*/ 0x0005, /*0x00fa*/ 0x0003, /*0x00fb*/ 0x0003, - /*0x00fc*/ 0x0004, /*0x00fd*/ 0x0004, /*0x00fe*/ 0x0002, /*0x00ff*/ 0x0002, - /*0x0100*/ 0x0003, /*0x0101*/ 0x0003, /*0x0102*/ 0x000b, /*0x0103*/ 0x0003, - /*0x0104*/ 0x0002, /*0x0105*/ 0x0005, /*0x0106*/ 0x0005, /*0x0107*/ 0x0003, - /*0x0108*/ 0x0006, /*0x0109*/ 0x0006, /*0x010a*/ 0x0008, /*0x010b*/ 0x0004, - /*0x010c*/ 0x0004, /*0x010d*/ 0x0002, /*0x010e*/ 0x0004, /*0x010f*/ 0x0006, - /*0x0110*/ 0x0006, /*0x0111*/ 0x0004, /*0x0112*/ 0x0008, /*0x0113*/ 0x0003, - /*0x0114*/ 0x0003, /*0x0115*/ 0x0003, /*0x0116*/ 0x0003, /*0x0117*/ 0x0003, - /*0x0118*/ 0x0007, /*0x0119*/ 0x0007, /*0x011a*/ 0x0008, /*0x011b*/ 0x0007, - /*0x011c*/ 0x0007, /*0x011d*/ 0x0008, /*0x011e*/ 0x0004, /*0x011f*/ 0x0004, - /*0x0120*/ 0x0004, /*0x0121*/ 0x0005, /*0x0122*/ 0x0009, /*0x0123*/ 0x0009, - /*0x0124*/ 0x0003, /*0x0125*/ 0x0003, /*0x0126*/ 0x0003, /*0x0127*/ 0x0003, - /*0x0128*/ 0x0004, /*0x0129*/ 0x0004, /*0x012a*/ 0x0004, /*0x012b*/ 0x0003, - /*0x012c*/ 0x0003, /*0x012d*/ 0x0001, /*0x012e*/ 0x0001, /*0x012f*/ 0x0002, - /*0x0130*/ 0x000a, /*0x0131*/ 0x0003, /*0x0132*/ 0x0004, /*0x0133*/ 0x0004, - /*0x0134*/ 0x0005, /*0x0135*/ 0x0003, /*0x0136*/ 0x0004, /*0x0137*/ 0x0004, - /*0x0138*/ 0x0004, /*0x0139*/ 0x0008, /*0x013a*/ 0x0005, /*0x013b*/ 0x0003, - /*0x013c*/ 0x0003, /*0x013d*/ 0x0004, /*0x013e*/ 0x0002, /*0x013f*/ 0x0003, - /*0x0140*/ 0x0005, /*0x0141*/ 0x0009, /*0x0142*/ 0x0004, /*0x0143*/ 0x0002, - /*0x0144*/ 0x0002, /*0x0145*/ 0x0002, /*0x0146*/ 0x0002, /*0x0147*/ 0x0004, - /*0x0148*/ 0x0004, /*0x0149*/ 0x0006, /*0x014a*/ 0x0006, /*0x014b*/ 0x0003, - /*0x014c*/ 0x0001, /*0x014d*/ 0x0001, /*0x014e*/ 0x0001, /*0x014f*/ 0x0001, - /*0x0150*/ 0x0001, /*0x0151*/ 0x0001, /*0x0152*/ 0x0005, /*0x0153*/ 0x0001, - /*0x0154*/ 0x0001, /*0x0155*/ 0x0001, /*0x0156*/ 0x0001, /*0x0157*/ 0x0003, - /*0x0158*/ 0x0001, /*0x0159*/ 0x0001, /*0x015a*/ 0x0001, /*0x015b*/ 0x0003, - /*0x015c*/ 0x0002, /*0x015d*/ 0x0001, /*0x015e*/ 0x0001, /*0x015f*/ 0x0001, - /*0x0160*/ 0x0001, /*0x0161*/ 0x0001, /*0x0162*/ 0x0001, /*0x0163*/ 0x0001, - /*0x0164*/ 0x0001, /*0x0165*/ 0x0004, /*0x0166*/ 0x0004, /*0x0167*/ 0x0003, - /*0x0168*/ 0x0004, /*0x0169*/ 0x0004, /*0x016a*/ 0x0007, /*0x016b*/ 0x000a, - /*0x016c*/ 0x0002, /*0x016d*/ 0x0005, /*0x016e*/ 0x0005, /*0x016f*/ 0x0005, - /*0x0170*/ 0x0004, /*0x0171*/ 0x0005, /*0x0172*/ 0x0004, /*0x0173*/ 0x0004, - /*0x0174*/ 0x0003, /*0x0175*/ 0x0003, /*0x0176*/ 0x0003, /*0x0177*/ 0x0009, - /*0x0178*/ 0x0004, /*0x0179*/ 0x000b, /*0x017a*/ 0x0003, /*0x017b*/ 0x0004, - /*0x017c*/ 0x0005, /*0x017d*/ 0x0003, /*0x017e*/ 0x0002, /*0x017f*/ 0x0003, - /*0x0180*/ 0x0002, /*0x0181*/ 0x0005, /*0x0182*/ 0x0004, /*0x0183*/ 0x0003, - /*0x0184*/ 0x0004, /*0x0185*/ 0x0002, /*0x0186*/ 0x0006, /*0x0187*/ 0x0003, - /*0x0188*/ 0x0004, /*0x0189*/ 0x0004, /*0x018a*/ 0x0005, /*0x018b*/ 0x0003, - /*0x018c*/ 0x0004, /*0x018d*/ 0x0004, /*0x018e*/ 0x0007, /*0x018f*/ 0x0008, - /*0x0190*/ 0x0003, /*0x0191*/ 0x0003, /*0x0192*/ 0x0004, /*0x0193*/ 0x0004, - /*0x0194*/ 0x0001, /*0x0195*/ 0x0001, /*0x0196*/ 0x0001, /*0x0197*/ 0x0001, - /*0x0198*/ 0x0001, /*0x0199*/ 0x0001, /*0x019a*/ 0x0001, /*0x019b*/ 0x0001, - /*0x019c*/ 0x0001, /*0x019d*/ 0x0001, /*0x019e*/ 0x0006, /*0x019f*/ 0x0005, - /*0x01a0*/ 0x0004, /*0x01a1*/ 0x0002, /*0x01a2*/ 0x0004, /*0x01a3*/ 0x0003, - /*0x01a4*/ 0x0006, /*0x01a5*/ 0x0003, /*0x01a6*/ 0x0004, /*0x01a7*/ 0x0004, - /*0x01a8*/ 0x0001, /*0x01a9*/ 0x0001, /*0x01aa*/ 0x0003, /*0x01ab*/ 0x0005, - /*0x01ac*/ 0x0001, /*0x01ad*/ 0x0003, /*0x01ae*/ 0x0003, /*0x01af*/ 0x0004, - /*0x01b0*/ 0x0001, /*0x01b1*/ 0x0012, /*0x01b2*/ 0x0003, /*0x01b3*/ 0x0003, - /*0x01b4*/ 0x0003, /*0x01b5*/ 0x0004, /*0x01b6*/ 0x0003, /*0x01b7*/ 0x0005, - /*0x01b8*/ 0x0004, /*0x01b9*/ 0x0002, /*0x01ba*/ 0x0007, /*0x01bb*/ 0x0004, - /*0x01bc*/ 0x0004, /*0x01bd*/ 0x0003, /*0x01be*/ 0x0005, /*0x01bf*/ 0x0005, - /*0x01c0*/ 0x0004, /*0x01c1*/ 0x0004, /*0x01c2*/ 0x0004, /*0x01c3*/ 0x0004, - /*0x01c4*/ 0x0004, /*0x01c5*/ 0x0002, /*0x01c6*/ 0x0004, /*0x01c7*/ 0x0003, - /*0x01c8*/ 0x0003, /*0x01c9*/ 0x0003, /*0x01ca*/ 0x0005, /*0x01cb*/ 0x0008, - /*0x01cc*/ 0x0003, /*0x01cd*/ 0x0004, /*0x01ce*/ 0x0003, /*0x01cf*/ 0x0004, - /*0x01d0*/ 0x0005, /*0x01d1*/ 0x0005, /*0x01d2*/ 0x0003, /*0x01d3*/ 0x0005, - /*0x01d4*/ 0x0006, /*0x01d5*/ 0x0003, /*0x01d6*/ 0x0006, /*0x01d7*/ 0x0005, - /*0x01d8*/ 0x0005, /*0x01d9*/ 0x000b, /*0x01da*/ 0x0003, /*0x01db*/ 0x0003, - /*0x01dc*/ 0x0003, /*0x01dd*/ 0x0004, /*0x01de*/ 0x0003, /*0x01df*/ 0x0008, - /*0x01e0*/ 0x0002, -}; - -u32 var80068fd8 = 0x00000000; -u32 var80068fdc = 0x00000000; -struct coord var80068fe0 = {0, 0, 0}; -struct coord var80068fec = {0, 0, 0}; - -s16 g_GuardQuipBank[][4] = { - // Voicebox 0 - { 0, 0x027b, 0x027b, 0x027c }, - { 1, 0x027d, 0x027e, 0x027f }, - { 2, 0x028a, 0x028b, 0x028c }, - { 3, 0x035b, 0x035c, 0x035d }, - { 4, 0x0290, 0x80fb, 0x0292 }, - { 5, 0x0293, 0x0294, 0x029d }, - { 6, 0x0297, 0x0298, 0x0299 }, - { 7, 0x029a, 0x029b, 0x029c }, - { 8, 0x02a7, 0x02a8, 0x02a9 }, - { 9, 0x026b, 0x026c, 0x026d }, - { 10, 0x0037, 0x0037, 0x0037 }, - { 11, 0x0264, 0x0265, 0x0266 }, - { 12, 0x80f7, 0x80f7, 0x80f8 }, - { 13, 0x025e, 0x025f, 0x0260 }, - { 14, 0x0261, 0x0262, 0x0263 }, - { 15, 0x02a3, 0x02a4, 0x02a5 }, - { 16, 0x0272, 0x0273, 0x0274 }, - { 34, 0x0037, 0x0037, 0x0037 }, - { 18, 0x025b, 0x025c, 0x025c }, - { 19, 0x026e, 0x026f, 0x0270 }, - { 20, 0x0037, 0x0037, 0x0037 }, - { 21, 0x0280, 0x0281, 0x0282 }, - { 22, 0x80f9, 0x80f9, 0x0287 }, - { 23, 0x80fa, 0x80fa, 0x0289 }, - { 24, 0x028d, 0x028e, 0x028f }, - { 25, 0x80fc, 0x80fd, 0x02a2 }, - { 26, 0x0037, 0x0037, 0x0037 }, - { 27, 0x0275, 0x0277, 0x0278 }, - { 28, 0x8167, 0x04c9, 0x04ca }, - { 29, 0x815d, 0x815e, 0x815f }, - { 30, 0x1aa0, 0x1aa1, 0x1aa2 }, - { 31, 0x0037, 0x1aa3, 0x1aa4 }, - { 32, 0x1aa5, 0x1aa5, 0x1aa6 }, - { 33, 0x04c6, 0x04c6, 0x04c6 }, - { 34, 0x04c7, 0x04c7, 0x04c7 }, - { 35, 0x04cb, 0x04cb, 0x04cc }, - { 36, 0x027b, 0x027b, 0x027d }, - { 37, 0x027b, 0x027d, 0x027d }, - { 38, 0x02a3, 0x02a4, 0x02a5 }, - { 39, 0x04c6, 0x04c6, 0x04c6 }, - { 40, 0x1aa6, 0x1aa6, 0x1aa6 }, - // Voicebox 1 - { 0, 0x0322, 0x0323, 0x0324 }, - { 1, 0x0325, 0x0326, 0x0327 }, - { 2, 0x812e, 0x0335, 0x0336 }, - { 3, 0x035b, 0x035c, 0x035d }, - { 4, 0x033a, 0x033b, 0x033c }, - { 5, 0x033d, 0x033f, 0x0342 }, - { 6, 0x0343, 0x0344, 0x0345 }, - { 7, 0x0346, 0x0347, 0x0348 }, - { 8, 0x0349, 0x034a, 0x034b }, - { 9, 0x030e, 0x030f, 0x0310 }, - { 10, 0x0037, 0x0037, 0x0037 }, - { 11, 0x0306, 0x0307, 0x0308 }, - { 12, 0x0309, 0x8128, 0x030b }, - { 13, 0x8126, 0x0301, 0x0302 }, - { 14, 0x8127, 0x0304, 0x0305 }, - { 15, 0x0037, 0x0037, 0x0037 }, - { 16, 0x031c, 0x031d, 0x031e }, - { 34, 0x0037, 0x0037, 0x0037 }, - { 18, 0x8124, 0x8125, 0x02ff }, - { 19, 0x8129, 0x812a, 0x0316 }, - { 20, 0x031c, 0x031d, 0x031e }, - { 21, 0x0356, 0x0329, 0x0329 }, - { 22, 0x812b, 0x032f, 0x812c }, - { 23, 0x0331, 0x0332, 0x812d }, - { 24, 0x0337, 0x0338, 0x0339 }, - { 25, 0x812f, 0x034d, 0x034e }, - { 26, 0x0355, 0x0356, 0x0357 }, - { 27, 0x031f, 0x0320, 0x0321 }, - { 28, 0x04cf, 0x04d0, 0x04d1 }, - { 29, 0x8163, 0x8163, 0x8164 }, - { 30, 0x1ace, 0x1ace, 0x1acf }, - { 31, 0x1ad0, 0x1ad0, 0x1ad1 }, - { 32, 0x1ad2, 0x1ad2, 0x1ad3 }, - { 33, 0x8168, 0x8168, 0x8168 }, - { 34, 0x04ce, 0x04ce, 0x04ce }, - { 35, 0x04d2, 0x04d3, 0x04d3 }, - { 36, 0x0322, 0x0323, 0x0324 }, - { 37, 0x0324, 0x0327, 0x0327 }, - { 38, 0x0356, 0x0357, 0x035a }, - { 39, 0x812b, 0x032f, 0x812c }, - { 40, 0x1ad2, 0x1ad2, 0x1ad2 }, - // Voicebox 2 - { 0, 0x03e7, 0x03e8, 0x03e9 }, - { 1, 0x03ea, 0x03eb, 0x03ec }, - { 2, 0x03f9, 0x03fa, 0x03fb }, - { 3, 0x0420, 0x0421, 0x813d }, - { 4, 0x03ff, 0x8139, 0x0401 }, - { 5, 0x0403, 0x0405, 0x0407 }, - { 6, 0x0408, 0x0409, 0x040a }, - { 7, 0x040b, 0x040c, 0x040d }, - { 8, 0x040e, 0x040f, 0x0410 }, - { 9, 0x03d6, 0x03d6, 0x03d7 }, - { 10, 0x0037, 0x0037, 0x0037 }, - { 11, 0x03d0, 0x03d1, 0x8134 }, - { 12, 0x03d3, 0x8135, 0x03d5 }, - { 13, 0x8132, 0x03c8, 0x03c8 }, - { 14, 0x03cd, 0x03ce, 0x8133 }, - { 15, 0x0037, 0x0037, 0x0037 }, - { 16, 0x03e1, 0x03e2, 0x03e3 }, - { 34, 0x0037, 0x0037, 0x0037 }, - { 18, 0x03c4, 0x03c5, 0x03c6 }, - { 19, 0x03d9, 0x03da, 0x03db }, - { 20, 0x031c, 0x031d, 0x031e }, - { 21, 0x03ed, 0x03ee, 0x03ef }, - { 22, 0x8136, 0x03f4, 0x8137 }, - { 23, 0x8138, 0x03f7, 0x03f8 }, - { 24, 0x03fc, 0x03fd, 0x03fe }, - { 25, 0x813a, 0x813c, 0x0415 }, - { 26, 0x041b, 0x041c, 0x041d }, - { 27, 0x03e4, 0x03e5, 0x03e6 }, - { 28, 0x04d5, 0x04d6, 0x04d7 }, - { 29, 0x8165, 0x8165, 0x8166 }, - { 30, 0x1ad6, 0x1ad6, 0x1ad7 }, - { 31, 0x1ad8, 0x1ad8, 0x1ad9 }, - { 32, 0x1ada, 0x1ada, 0x1adb }, - { 33, 0x8168, 0x8168, 0x8168 }, - { 34, 0x04d4, 0x04d4, 0x04d4 }, - { 35, 0x04d8, 0x04d8, 0x04d9 }, - { 36, 0x03e7, 0x03e8, 0x03e9 }, - { 37, 0x03e8, 0x03eb, 0x03eb }, - { 38, 0x041b, 0x0417, 0x041d }, - { 39, 0x8134, 0x03f4, 0x8134 }, - { 40, 0x1adb, 0x1adb, 0x1adb }, - // Voicebox 3 - { 0, 0x0396, 0x0396, 0x0396 }, - { 1, 0x0037, 0x0398, 0x0399 }, - { 2, 0x03a4, 0x0037, 0x03a6 }, - { 3, 0x03c1, 0x03c2, 0x03c2 }, - { 4, 0x03aa, 0x03ab, 0x03ac }, - { 5, 0x03ad, 0x03ae, 0x0037 }, - { 6, 0x03b0, 0x03b0, 0x03b1 }, - { 7, 0x0037, 0x03b3, 0x03b4 }, - { 8, 0x03b5, 0x03b5, 0x03b6 }, - { 9, 0x0037, 0x0389, 0x038a }, - { 10, 0x0000, 0x0000, 0x0000 }, - { 11, 0x0381, 0x0382, 0x0037 }, - { 12, 0x0385, 0x0037, 0x0387 }, - { 13, 0x0037, 0x037e, 0x037f }, - { 14, 0x037e, 0x037f, 0x0380 }, - { 15, 0x0000, 0x0000, 0x0000 }, - { 16, 0x0384, 0x0385, 0x0037 }, - { 34, 0x03aa, 0x03ab, 0x03ac }, - { 18, 0x0037, 0x037b, 0x037c }, - { 19, 0x038d, 0x038d, 0x038d }, - { 20, 0x0384, 0x0385, 0x0387 }, - { 21, 0x039a, 0x039b, 0x0037 }, - { 22, 0x039f, 0x0037, 0x03a1 }, - { 23, 0x03a1, 0x03a2, 0x8130 }, - { 24, 0x03a7, 0x0037, 0x03a9 }, - { 25, 0x03b7, 0x03b8, 0x8131 }, - { 26, 0x03be, 0x0037, 0x03c0 }, - { 27, 0x0381, 0x0382, 0x0037 }, - { 28, 0x0000, 0x0000, 0x0000 }, - { 29, 0x0037, 0x0396, 0x0037 }, - { 30, 0x0037, 0x0396, 0x0037 }, - { 31, 0x0037, 0x0396, 0x0037 }, - { 32, 0x0037, 0x0396, 0x0037 }, - { 33, 0x037b, 0x037c, 0x037b }, - { 34, 0x03aa, 0x03b1, 0x03ab }, - { 35, 0x0000, 0x0000, 0x0000 }, - { 36, 0x0396, 0x0396, 0x0399 }, - { 37, 0x0399, 0x0399, 0x0396 }, - { 38, 0x03bc, 0x03be, 0x03c0 }, - { 39, 0x039f, 0x039f, 0x039f }, - { 40, 0x0000, 0x0000, 0x0000 }, -}; - -s16 g_SpecialQuipBank[][4] = { - { 0, 0x0af2, 0x0af3, 0x0af8 }, - { 1, 0x1aee, 0x1aef, 0x1aee }, - { 2, 0x023d, 0x023e, 0x0247 }, - { 3, 0x0248, 0x0249, 0x024b }, - { 4, 0x0246, 0x023f, 0x0240 }, - { 5, 0x024c, 0x0252, 0x0251 }, - { 6, 0x024f, 0x0258, 0x024d }, - { 7, 0x0243, 0x0244, 0x0245 }, - { 8, 0x1294, 0x1295, 0x1296 }, - { 9, 0x1297, 0x1298, 0x1297 }, - { 10, 0x1290, 0x127e, 0x8103 }, - { 11, 0x7324, 0x7325, 0x7326 }, - { 12, 0x128e, 0x1280, 0x1287 }, - { 13, 0x128d, 0x1283, 0x1286 }, - { 14, 0x1291, 0x1284, 0x128a }, - { 15, 0x1292, 0x1281, 0x1288 }, - { 16, 0x128b, 0x1282, 0x1289 }, - { 17, 0x000d, 0x000d, 0x000d }, - { 18, 0x815d, 0x815e, 0x815f }, - { 19, 0x1aa0, 0x1aa1, 0x1aa2 }, - { 20, 0x0037, 0x1aa3, 0x1aa4 }, - { 21, 0x1aa5, 0x1aa5, 0x1aa6 }, - { 22, 0x0446, 0x0461, 0x0465 }, - { 23, 0x0447, 0x045d, 0x0466 }, - { 24, 0x814a, 0x045e, 0x0463 }, - { 25, 0x0444, 0x045f, 0x0468 }, - { 26, 0x0448, 0x0449, 0x0449 }, - { 27, 0x044b, 0x0459, 0x045a }, - { 28, 0x05be, 0x0515, 0x05bf }, - { 29, 0x044b, 0x0459, 0x045a }, - { 30, 0x044b, 0x0459, 0x045a }, - { 31, 0x1aeb, 0x1aeb, 0x1aeb }, - { 32, 0x1b35, 0x1b36, 0x1b37 }, - { 33, 0x1ac0, 0x1ac1, 0x1ac3 }, - { 34, 0x0446, 0x0461, 0x0000 }, - { 35, 0x0447, 0x045d, 0x0000 }, - { 36, 0x814a, 0x045e, 0x1aee }, - { 37, 0x0444, 0x045f, 0x0000 }, - { 38, 0x051b, 0x051c, 0x051d }, - { 39, 0x051e, 0x051f, 0x0520 }, - { 40, 0x0521, 0x0522, 0x0525 }, - { 41, 0x0523, 0x0523, 0x0524 }, - { 42, 0x1adb, 0x1aa6, 0x1ad2 }, - { 43, 0x0af2, 0x0af8, 0x0af8 }, - { 44, 0x0525, 0x0525, 0x0525 }, - { 45, 0x1aec, 0x1aec, 0x1aec }, -}; - -s16 g_QuipTexts[][4] = { - { 1, L_AME(83), L_AME(84), L_AME(85) }, // "How dare you disturb me!", "You will regret this intrusion, girl!", "If I were you, I'd leave...NOW!" - { 2, L_AME(86), L_AME(87), L_AME(86) }, // "Please don't kill me!", "Don't shoot!" - { 3, L_EAR(64), L_EAR(65), L_EAR(66) }, // "What are you doing in my lab?", "I haven't seen you before...", "Who the hell are you?" - { 4, L_EAR(67), L_EAR(68), L_EAR(69) }, // "Shut down the experiment.", "Pull the plug on that, NOW.", "Switch this thing off." - { 5, L_EAR(70), L_EAR(71), L_EAR(72) }, // "I'll shut it down.", "Please don't hurt me.", "Allow me to assist you." - { 6, L_EAR(73), L_EAR(74), L_EAR(75) }, // "My experiments!", "There the experiment is down.", "Leave this area NOW!" - { 7, L_EAR(76), L_EAR(77), L_EAR(78) }, // "Security!", "I'm calling security.", "Accidents will happen." - { 8, L_EAR(79), L_EAR(80), L_EAR(81) }, // "How did that happen?", "Looks like it's off already.", "Have you been tampering with this?" - { 9, L_EAR(82), L_EAR(83), L_EAR(84) }, // "Someone's broken my equipment.", "What's happened to the terminal?", "You vandal - you've broken it." - { 10, L_WAX(10), L_WAX(12), L_WAX(12) }, // "How dare you disturb me!", "If I were you, I'd leave... NOW!" -}; - -s16 g_SkedarQuipBank[][4] = { - { 1, 0x0529, 0x052a, 0x052b }, - { 2, 0x052d, 0x052e, 0x052f }, - { 3, 0x0530, 0x0530, 0x0531 }, - { 1, 0x0532, 0x0533, 0x0534 }, - { 2, 0x0536, 0x0537, 0x0538 }, - { 3, 0x0539, 0x0539, 0x053a }, - { 0, 0x0000, 0x0000, 0x0000 }, -}; - -s16 g_MaianQuipBank[][4] = { - { 1, 0x05e2, 0x05e3, 0x05e4 }, - { 2, 0x05e5, 0x05e6, 0x05e7 }, - { 3, 0x05df, 0x05e0, 0x05e1 }, - { 0, 0x0000, 0x0000, 0x0000 }, -}; - -/** - * Used by AI command 0142, which makes Investigation scientists run to the - * computer terminals. The number of the left is the pad that the terminal sits - * on, and the number on the right is the pad that the scientist will run to - * when running to the terminal. - */ -u16 g_InvestigationPadMap[40] = { - 0x0246, 0x007b, - 0x0247, 0x007d, - 0x0248, 0x007e, - 0x0249, 0x007c, - 0x024a, 0x0093, - 0x024b, 0x0091, - 0x024c, 0x0092, - 0x024d, 0x0093, - 0x024e, 0x00ae, - 0x024f, 0x00ac, - 0x0250, 0x00ab, - 0x0251, 0x00ad, - 0x0252, 0x00a1, - 0x0253, 0x009f, - 0x0254, 0x00a0, - 0x0255, 0x009e, - 0x0256, 0x00bb, - 0x0257, 0x00b8, - 0x0258, 0x00b9, - 0x0259, 0x00ba, -}; - -u32 var80069780 = 0x00000000; -u32 var80069784 = 0x00000000; -u32 var80069788 = 0x00000000; -u32 var8006978c = 0x1a000003; - // f7b0 s16 ciquiptable_bank1[][3] = { { 0x17a1, 0x17a2, 0x17a3 }, diff --git a/src/include/commands.h b/src/include/commands.h index 3233836aa..fea9cfd84 100644 --- a/src/include/commands.h +++ b/src/include/commands.h @@ -3068,10 +3068,11 @@ value, \ bool, -#define damage_chr2(chr, value) \ +#define damage_player(chr, u1, operation) \ mkshort(0x016e), \ chr, \ - mkshort(value), + u1, \ + operation, // Likely related to being disarmed. // Not sure what this does if the chr had no gun to begin with. diff --git a/src/include/game/chr/chraction.h b/src/include/game/chr/chraction.h index 61aaa6d6e..ec58a44d3 100644 --- a/src/include/game/chr/chraction.h +++ b/src/include/game/chr/chraction.h @@ -48,7 +48,7 @@ u32 func0f033728(void); u32 func0f0338e0(void); void chrSetShield(struct chrdata *chr, f32 shield); u32 func0f034080(void); -u32 func0f034124(void); +void func0f034124(struct chrdata *chr, f32 arg1, struct coord *coord, u8 *arg3, u32 arg4); u32 func0f03417c(void); u32 func0f0341dc(void); void func0f034330(struct chrdata *chr, f32 arg1, struct coord *pos, u8 *arg3, struct prop *prop, s32 arg5); diff --git a/src/include/game/chr/chraicommands.h b/src/include/game/chr/chraicommands.h index d47829133..c4286f691 100644 --- a/src/include/game/chr/chraicommands.h +++ b/src/include/game/chr/chraicommands.h @@ -343,7 +343,7 @@ /*0x016b*/ bool ai016b(void); /*0x016c*/ bool aiNoOp016c(void); /*0x016d*/ bool aiChrAdjustMotionBlur(void); -/*0x016e*/ bool ai016e(void); +/*0x016e*/ bool aiDamagePlayer(void); /*0x016f*/ bool aiIfChrHasGun(void); /*0x0170*/ bool aiDoGunCommand(void); /*0x0171*/ bool aiIfDistanceToGunLessThan(void);