mirror of
https://github.com/perfect-dark-pc-port/perfect_dark.git
synced 2026-10-24 00:02:43 +02:00
Rename a heap of firing range symbols and document FR commands
This commit is contained in:
1 parent
196b55559b
commit
2c69ae9151
19 files changed
+1741
-1583
No files matched your search
+940
-940
File diff suppressed because it is too large.
Load diff
@@ -10759,7 +10759,7 @@ glabel ai01bc
|
||||
bool aiIfTrainingPcHolographed(void)
|
||||
{
|
||||
u8 *cmd = g_Vars.ailist + g_Vars.aioffset;
|
||||
struct trainingdata *data = getDeviceTrainingData();
|
||||
struct trainingdata *data = dtGetData();
|
||||
|
||||
if (data->holographedpc) {
|
||||
g_Vars.aioffset = chraiGoToLabel(g_Vars.ailist, g_Vars.aioffset, cmd[2]);
|
||||
|
||||
@@ -1289,7 +1289,7 @@ glabel var7f1a863c
|
||||
/* f01cf90: 1461001e */ bne $v1,$at,.L0f01d00c
|
||||
/* f01cf94: 00000000 */ nop
|
||||
.L0f01cf98:
|
||||
/* f01cf98: 0fc68606 */ jal getDeviceTrainingData
|
||||
/* f01cf98: 0fc68606 */ jal dtGetData
|
||||
/* f01cf9c: 00000000 */ nop
|
||||
/* f01cfa0: 8e6304b4 */ lw $v1,0x4b4($s3)
|
||||
/* f01cfa4: 24010026 */ addiu $at,$zero,0x26
|
||||
|
||||
@@ -2835,7 +2835,7 @@ glabel var7f1a9ef4
|
||||
/* f06289c: 318dffef */ andi $t5,$t4,0xffef
|
||||
/* f0628a0: 0fc2c6bc */ jal func0f0b1af0
|
||||
/* f0628a4: a06d0d0f */ sb $t5,0xd0f($v1)
|
||||
/* f0628a8: 0fc683f2 */ jal func0f1a0fc8
|
||||
/* f0628a8: 0fc683f2 */ jal frIncrementNumShots
|
||||
/* f0628ac: 00000000 */ nop
|
||||
/* f0628b0: 8fae0040 */ lw $t6,0x40($sp)
|
||||
/* f0628b4: 25cfffff */ addiu $t7,$t6,-1
|
||||
|
||||
@@ -1119,7 +1119,7 @@ glabel objectiveCheckHolograph
|
||||
/* f0962fc: 8e4a04b4 */ lw $t2,0x4b4($s2)
|
||||
/* f096300: 566a0007 */ bnel $s3,$t2,.L0f096320
|
||||
/* f096304: 8e31000c */ lw $s1,0xc($s1)
|
||||
/* f096308: 0fc68606 */ jal getDeviceTrainingData
|
||||
/* f096308: 0fc68606 */ jal dtGetData
|
||||
/* f09630c: 00000000 */ nop
|
||||
/* f096310: 904c0000 */ lbu $t4,0x0($v0)
|
||||
/* f096314: 358d0008 */ ori $t5,$t4,0x8
|
||||
|
||||
@@ -69,7 +69,7 @@ const u32 var7f1ab82c[] = {0x3e8e38e4};
|
||||
// criteria->status = OBJECTIVE_COMPLETE;
|
||||
//
|
||||
// if (g_Vars.stagenum == STAGE_CITRAINING) {
|
||||
// struct trainingdata *data = getDeviceTrainingData();
|
||||
// struct trainingdata *data = dtGetData();
|
||||
// data->holographedpc = true;
|
||||
// }
|
||||
// }
|
||||
|
||||
@@ -9842,7 +9842,7 @@ glabel var7f1ac72c
|
||||
/* f09f74c: 24010026 */ addiu $at,$zero,0x26
|
||||
/* f09f750: 5561000a */ bnel $t3,$at,.L0f09f77c
|
||||
/* f09f754: 8c8d0040 */ lw $t5,0x40($a0)
|
||||
/* f09f758: 0fc68606 */ jal getDeviceTrainingData
|
||||
/* f09f758: 0fc68606 */ jal dtGetData
|
||||
/* f09f75c: afa4018c */ sw $a0,0x18c($sp)
|
||||
/* f09f760: 8c4c0000 */ lw $t4,0x0($v0)
|
||||
/* f09f764: 8fa4018c */ lw $a0,0x18c($sp)
|
||||
|
||||
@@ -5209,7 +5209,7 @@ glabel var7f1ad630
|
||||
.L0f0bae04:
|
||||
/* f0bae04: 5080003e */ beqzl $a0,.L0f0baf00
|
||||
/* f0bae08: 8fbf0014 */ lw $ra,0x14($sp)
|
||||
/* f0bae0c: 0fc68606 */ jal getDeviceTrainingData
|
||||
/* f0bae0c: 0fc68606 */ jal dtGetData
|
||||
/* f0bae10: 00000000 */ nop
|
||||
/* f0bae14: 24040001 */ addiu $a0,$zero,0x1
|
||||
/* f0bae18: 0fc5b350 */ jal soloSetPaused
|
||||
|
||||
@@ -4572,7 +4572,7 @@ bool soloChoosePauseDialog(void)
|
||||
bool handled = false;
|
||||
|
||||
if (ciIsTourDone()) {
|
||||
struct trainingdata *dtdata = getDeviceTrainingData();
|
||||
struct trainingdata *dtdata = dtGetData();
|
||||
s32 room = g_Vars.currentplayer->prop->rooms[0];
|
||||
|
||||
if (room >= CIROOM_HOLOSTART && room <= CIROOM_HOLOEND) {
|
||||
|
||||
@@ -381,7 +381,7 @@ void func0f167e7c(s32 stagenum)
|
||||
func0f0147f8();
|
||||
func0f013540();
|
||||
func0f0139f0();
|
||||
func0f19d4ec();
|
||||
frUnloadData();
|
||||
|
||||
if (g_Vars.stagenum == STAGE_TITLE) {
|
||||
// empty
|
||||
@@ -5291,7 +5291,7 @@ glabel func0f16b96c
|
||||
/* f16ca60: 24010026 */ addiu $at,$zero,0x26
|
||||
/* f16ca64: 5441001f */ bnel $v0,$at,.L0f16cae4
|
||||
/* f16ca68: 8fbf0044 */ lw $ra,0x44($sp)
|
||||
/* f16ca6c: 0fc68606 */ jal getDeviceTrainingData
|
||||
/* f16ca6c: 0fc68606 */ jal dtGetData
|
||||
/* f16ca70: 00000000 */ nop
|
||||
/* f16ca74: 8e990284 */ lw $t9,0x284($s4)
|
||||
/* f16ca78: 8f2d00bc */ lw $t5,0xbc($t9)
|
||||
@@ -5682,7 +5682,7 @@ glabel func0f16b96c
|
||||
// func0f063dcc();
|
||||
//
|
||||
// if (getCurrentStageId() == STAGE_CITRAINING) {
|
||||
// struct trainingdata *trainingdata = getDeviceTrainingData();
|
||||
// struct trainingdata *trainingdata = dtGetData();
|
||||
// s16 room = g_Vars.currentplayer->prop->rooms[0];
|
||||
//
|
||||
// if ((room < 0x16 || room > 0x19)
|
||||
|
||||
+21
-21
@@ -47,7 +47,7 @@ s32 frDetailsOkMenuHandler(u32 operation, struct menuitem *item, s32 *value)
|
||||
if (frIsInTraining() == false) {
|
||||
s32 weapon = frGetWeaponBySlot(frGetSlot());
|
||||
|
||||
if (g_FrWeaponNum != 1) {
|
||||
if (g_FrWeaponNum != WEAPON_UNARMED) {
|
||||
currentPlayerRemoveWeapon(g_FrWeaponNum);
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ glabel var7f1b9940
|
||||
/* f1a3510: 00402025 */ or $a0,$v0,$zero
|
||||
/* f1a3514: 0fc6726c */ jal ciGetFiringRangeScore
|
||||
/* f1a3518: 00402025 */ or $a0,$v0,$zero
|
||||
/* f1a351c: 0fc679ea */ jal func0f19e7a8
|
||||
/* f1a351c: 0fc679ea */ jal frLoadData
|
||||
/* f1a3520: afa200a0 */ sw $v0,0xa0($sp)
|
||||
/* f1a3524: 8fa600b0 */ lw $a2,0xb0($sp)
|
||||
/* f1a3528: 0fc67497 */ jal frSetSlot
|
||||
@@ -766,7 +766,7 @@ glabel menuhandlerFrDifficulty
|
||||
char *frMenuTextFailReason(struct menuitem *item)
|
||||
{
|
||||
u16 reasons[5] = g_FiringRangeFailReasons;
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
return langGet(reasons[frdata->failreason]);
|
||||
}
|
||||
@@ -775,14 +775,14 @@ char *frMenuTextDifficultyName(struct menuitem *item)
|
||||
{
|
||||
u16 names[3] = g_FiringRangeDifficultyNames;
|
||||
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
return langGet(names[frdata->difficulty]);
|
||||
}
|
||||
|
||||
char *frMenuTextTimeTakenValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
f32 secs = frdata->timetaken / 60.0f;
|
||||
|
||||
if (secs > frdata->timelimit) {
|
||||
@@ -808,7 +808,7 @@ char *frMenuTextTimeTakenValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextScoreValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
sprintf(g_StringPointer, "%d\n", frdata->score);
|
||||
return g_StringPointer;
|
||||
@@ -816,7 +816,7 @@ char *frMenuTextScoreValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextGoalScoreValueUnconditional(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
sprintf(g_StringPointer, "%d\n", frdata->goalscore);
|
||||
return g_StringPointer;
|
||||
}
|
||||
@@ -828,7 +828,7 @@ char *frMenuTextWeaponName(struct menuitem *item)
|
||||
|
||||
char *frMenuTextTargetsDestroyedValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
sprintf(g_StringPointer, "%d\n", frdata->targetsdestroyed);
|
||||
return g_StringPointer;
|
||||
@@ -836,7 +836,7 @@ char *frMenuTextTargetsDestroyedValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextAccuracyValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
f32 totalhits = (frdata->numhitsring3 + frdata->numhitsbullseye + frdata->numhitsring1 + frdata->numhitsring2) * 100.0f;
|
||||
f32 accuracy = 0;
|
||||
|
||||
@@ -854,7 +854,7 @@ char *frMenuTextAccuracyValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextGoalScoreLabel(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->goalscore > 0) {
|
||||
sprintf(g_StringPointer, "%s", langGet(L_MPMENU(475))); // "Goal Score:"
|
||||
@@ -866,7 +866,7 @@ char *frMenuTextGoalScoreLabel(struct menuitem *item)
|
||||
|
||||
char *frMenuTextGoalScoreValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->goalscore > 0) {
|
||||
sprintf(g_StringPointer2, "%d\n", frdata->goalscore);
|
||||
@@ -878,7 +878,7 @@ char *frMenuTextGoalScoreValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextMinAccuracyOrTargetsLabel(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->goalaccuracy > 0) {
|
||||
sprintf(g_StringPointer, "%s", langGet(L_MPMENU(473))); // "Min Accuracy:"
|
||||
@@ -893,7 +893,7 @@ char *frMenuTextMinAccuracyOrTargetsLabel(struct menuitem *item)
|
||||
|
||||
char *frMenuTextMinAccuracyOrTargetsValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->goalaccuracy > 0) {
|
||||
sprintf(g_StringPointer2, "%d%%\n", frdata->goalaccuracy);
|
||||
@@ -908,7 +908,7 @@ char *frMenuTextMinAccuracyOrTargetsValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextTimeLimitLabel(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->timelimit != 255) {
|
||||
sprintf(g_StringPointer, "%s", langGet(L_MPMENU(472))); // "Time Limit:"
|
||||
@@ -921,7 +921,7 @@ char *frMenuTextTimeLimitLabel(struct menuitem *item)
|
||||
|
||||
char *frMenuTextTimeLimitValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->timelimit != 255) {
|
||||
s32 secs = frdata->timelimit;
|
||||
@@ -946,7 +946,7 @@ char *frMenuTextTimeLimitValue(struct menuitem *item)
|
||||
|
||||
char *frMenuTextAmmoLimitLabel(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
|
||||
if (frdata->ammolimit != 255) {
|
||||
sprintf(g_StringPointer, "%s", langGet(L_MPMENU(471))); // "Ammo Limit:"
|
||||
@@ -959,7 +959,7 @@ char *frMenuTextAmmoLimitLabel(struct menuitem *item)
|
||||
|
||||
char *frMenuTextAmmoLimitValue(struct menuitem *item)
|
||||
{
|
||||
struct frdata *frdata = getFiringRangeData();
|
||||
struct frdata *frdata = frGetData();
|
||||
char suffix[16];
|
||||
s32 weaponnum;
|
||||
|
||||
@@ -994,7 +994,7 @@ glabel menuhandler001a44c0
|
||||
/* f1a44e4: afae015c */ sw $t6,0x15c($sp)
|
||||
/* f1a44e8: 8cd00008 */ lw $s0,0x8($a2)
|
||||
/* f1a44ec: 25f80258 */ addiu $t8,$t7,0x258
|
||||
/* f1a44f0: 0fc675f3 */ jal getFiringRangeData
|
||||
/* f1a44f0: 0fc675f3 */ jal frGetData
|
||||
/* f1a44f4: afb80144 */ sw $t8,0x144($sp)
|
||||
/* f1a44f8: afa20140 */ sw $v0,0x140($sp)
|
||||
/* f1a44fc: 90430465 */ lbu $v1,0x465($v0)
|
||||
@@ -3312,7 +3312,7 @@ glabel var7f1b9998
|
||||
|
||||
char *dtMenuTextOkOrResume(struct menuitem *item)
|
||||
{
|
||||
struct trainingdata *data = getDeviceTrainingData();
|
||||
struct trainingdata *data = dtGetData();
|
||||
|
||||
if (data->intraining) {
|
||||
return langGet(L_MPMENU(428)); // "Resume"
|
||||
@@ -3323,7 +3323,7 @@ char *dtMenuTextOkOrResume(struct menuitem *item)
|
||||
|
||||
char *dtMenuTextCancelOrAbort(struct menuitem *item)
|
||||
{
|
||||
struct trainingdata *data = getDeviceTrainingData();
|
||||
struct trainingdata *data = dtGetData();
|
||||
|
||||
if (data->intraining) {
|
||||
return langGet(L_MPMENU(430)); // "Abort"
|
||||
@@ -3336,7 +3336,7 @@ const char var7f1b98ac[] = "%s\n";
|
||||
|
||||
char *dtMenuTextTimeTakenValue(struct menuitem *item)
|
||||
{
|
||||
struct trainingdata *data = getDeviceTrainingData();
|
||||
struct trainingdata *data = dtGetData();
|
||||
f32 secs = data->timetaken / 60.0f;
|
||||
|
||||
if (secs >= 60.0f) {
|
||||
|
||||
+3
-3
@@ -22425,7 +22425,7 @@ glabel var7f1aa580
|
||||
/* f07968c: afa30044 */ sw $v1,0x44($sp)
|
||||
/* f079690: afa800ac */ sw $t0,0xac($sp)
|
||||
/* f079694: e7a00048 */ swc1 $f0,0x48($sp)
|
||||
/* f079698: 0fc67cbb */ jal func0f19f2ec
|
||||
/* f079698: 0fc67cbb */ jal frIsTargetFacingPos
|
||||
/* f07969c: e7b200a4 */ swc1 $f18,0xa4($sp)
|
||||
/* f0796a0: 8fa30044 */ lw $v1,0x44($sp)
|
||||
/* f0796a4: 8fa800ac */ lw $t0,0xac($sp)
|
||||
@@ -37015,7 +37015,7 @@ bool propobjInteract(struct prop *prop)
|
||||
|
||||
if (ciIsTourDone()) {
|
||||
if (tag_id == 0x10) {
|
||||
struct trainingdata *data = getDeviceTrainingData();
|
||||
struct trainingdata *data = dtGetData();
|
||||
handled = true;
|
||||
|
||||
if (data->intraining) {
|
||||
@@ -46654,7 +46654,7 @@ bool func0f09018c(struct prop *doorprop)
|
||||
u8 intraining = false;
|
||||
|
||||
if (g_Vars.stagenum == STAGE_CITRAINING) {
|
||||
struct trainingdata *devdata = getDeviceTrainingData();
|
||||
struct trainingdata *devdata = dtGetData();
|
||||
struct trainingdata *holodata = getHoloTrainingData();
|
||||
|
||||
intraining = (devdata && devdata->intraining)
|
||||
|
||||
+573
-573
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -20670,8 +20670,8 @@ u32 var800acc7c = 0;
|
||||
struct chrdata *g_MpSimulantChrs[MAX_SIMULANTS] = {NULL};
|
||||
u8 var800acca0[40] = {0};
|
||||
u8 g_MpChallengesCompleted[88] = {0}; // This is one *byte* per challenge, and length is at least 64
|
||||
struct frdata g_FiringRangeData = {0};
|
||||
struct trainingdata g_DeviceTrainingData = {0};
|
||||
struct frdata g_FrData = {0};
|
||||
struct trainingdata g_DtData = {0};
|
||||
struct trainingdata g_HoloTrainingData = {0};
|
||||
u32 var800ad1c0 = 0;
|
||||
|
||||
@@ -593,15 +593,15 @@
|
||||
#define FRCMD_SETGOALTARGETS 0x07
|
||||
#define FRCMD_SETHELPSCRIPT 0x08
|
||||
#define FRCMD_SETGRENADELIMIT 0x09
|
||||
#define FRCMD_0A 0x0a
|
||||
#define FRCMD_SETPADINDEXOFFSET 0x0a
|
||||
#define FRCMD_SETSCOREMULTIPLIER 0x0b
|
||||
#define FRCMD_GOTOPAD 0x0c
|
||||
#define FRCMD_RESTART 0x0d
|
||||
#define FRCMD_0E 0x0e
|
||||
#define FRCMD_WAITSECONDS 0x0e
|
||||
#define FRCMD_ROTATE 0x0f
|
||||
#define FRCMD_HUDMSG 0x10
|
||||
#define FRCMD_WAITUNTILSHOOT 0x11
|
||||
#define FRCMD_WAITSECONDS 0x12
|
||||
#define FRCMD_HELPWAITSECONDS 0x12
|
||||
#define FRCMD_END 0x13
|
||||
#define FRCMD_IFBRONZE 0xfb
|
||||
#define FRCMD_IFSILVER 0xfc
|
||||
@@ -622,6 +622,11 @@
|
||||
#define FRMENUTYPE_FAILED 2
|
||||
#define FRMENUTYPE_COMPLETED 3
|
||||
|
||||
#define FRROTATE_90R 0
|
||||
#define FRROTATE_180R 1
|
||||
#define FRROTATE_90L 2
|
||||
#define FRROTATE_180L 3
|
||||
|
||||
#define FRTARGETFLAG_BRONZE 0x01
|
||||
#define FRTARGETFLAG_SILVER 0x02
|
||||
#define FRTARGETFLAG_GOLD 0x04
|
||||
|
||||
@@ -1,72 +1,227 @@
|
||||
#define add_target(frpadnum, script, target01, flags) \
|
||||
0x00, frpadnum, script, target01, flags
|
||||
/**
|
||||
* Weapon scripts only: Adds a target to the current session.
|
||||
*
|
||||
* frpadnum - is the location where the target will appear.
|
||||
* script - is the target script index that the target will use.
|
||||
* For example, 0x0c means it will use the script at "u8 target0c".
|
||||
* maxdamage - is how much health the target has.
|
||||
* flags - is a bitwise field. See below
|
||||
*
|
||||
* Flags:
|
||||
* FRTARGETFLAG_BRONZE - Target will appear on bronze difficulty
|
||||
* FRTARGETFLAG_SILVER - Target will appear on silver difficulty
|
||||
* FRTARGETFLAG_GOLD - Target will appear on gold difficulty
|
||||
* FRTARGETFLAG_ROTATEONCLOAK - Rotate when the player uses cloak (RC-P120)
|
||||
* FRTARGETFLAG_SPAWNFACINGAWAY - Spawn with its back to the player
|
||||
* FRTARGETFLAG_ONEHITEXPLODE - For K7 Avenger's threat detector
|
||||
* FRTARGETFLAG_FARSIGHTAUTOTARGETABLE - Must be set for Farsight's second function to find it
|
||||
* FRTARGETFLAG_TMPINVINCIBLE - Grant 5 seconds invincibility when the target spawns, for spawning into explosions
|
||||
*/
|
||||
#define add_target(frpadnum, script, maxdamage, flags) \
|
||||
0x00, frpadnum, script, maxdamage, flags
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the maximum number of targets that can be
|
||||
* active/visible at the same time. As each target is destroyed a new one will
|
||||
* become active until there are no more targets.
|
||||
*/
|
||||
#define set_max_active_targets(bronze, silver, gold) \
|
||||
0x01, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the goal score.
|
||||
*
|
||||
* Expects values in the range 0 to 250.
|
||||
*
|
||||
* Scores over 250 can be set by making use of the set_score_multiplier command.
|
||||
*/
|
||||
#define set_goal_score(bronze, silver, gold) \
|
||||
0x02, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the time limit in seconds, or 255 for no limit.
|
||||
*/
|
||||
#define set_time_limit(bronze, silver, gold) \
|
||||
0x03, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the ammo limit, or 255 for no limit.
|
||||
*/
|
||||
#define set_ammo_limit(bronze, silver, gold) \
|
||||
0x04, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Increases the speed at which targets can travel.
|
||||
*
|
||||
* The "normal" speed is 1, so setting the extra speed to 1 makes it run twice
|
||||
* as fast. This value accepts single digit decimals such as 0.1. Acceptable
|
||||
* values are in the range 0.0 to 25.0.
|
||||
*/
|
||||
#define set_extra_speed(bronze, silver, gold) \
|
||||
0x05, bronze * 10, silver * 10, gold * 10
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the goal accuracy.
|
||||
*
|
||||
* Acceptable values are 0 to 100, where 0 disables the accuracy requirement.
|
||||
*/
|
||||
#define set_goal_accuracy(bronze, silver, gold) \
|
||||
0x06, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the goal number of targets to be destroyed.
|
||||
*
|
||||
* Acceptable values are 0 to 250, or 255 to disable the goal targets
|
||||
* requirement.
|
||||
*/
|
||||
#define set_goal_targets(bronze, silver, gold) \
|
||||
0x07, bronze, silver, gold
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the help script which will be used.
|
||||
*
|
||||
* Help scripts are used to display instructional help messages to the player.
|
||||
*
|
||||
* Acceptable values are 0 to 2, but this could be increased if more help
|
||||
* scripts are added.
|
||||
*/
|
||||
#define set_help_script(script) \
|
||||
0x08, script
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets the SuperDragon grenade limit, or 255 for no limit.
|
||||
*/
|
||||
#define set_grenade_limit(bronze, silver, gold) \
|
||||
0x09, bronze, silver, gold
|
||||
|
||||
#define cmd_0a(value) \
|
||||
0x0a, value
|
||||
/**
|
||||
* Weapon scripts only: Set an offset which will be used when looking up
|
||||
* frpadnums for all targets in this session. This allows the same target script
|
||||
* to be shared across different sessions while having them visit different pads
|
||||
* based on the session.
|
||||
*
|
||||
* Care should be taken when using this, as an array overflow may occur if the
|
||||
* offset is too high.
|
||||
*/
|
||||
#define set_pad_index_offset(offset) \
|
||||
0x0a, offset
|
||||
|
||||
/**
|
||||
* Weapon scripts only: Sets a multiplier which is used to calculate the goal
|
||||
* score.
|
||||
*
|
||||
* Because the script data is made up of single bytes, it would normally be
|
||||
* impossible to set goal scores above 255. This command is a workaround to
|
||||
* allow higher goal scores.
|
||||
*/
|
||||
#define set_score_multiplier(bronze, silver, gold) \
|
||||
0x0b, bronze, silver, gold
|
||||
|
||||
#define go_to_pad(frpadnum, unk2, seconds) \
|
||||
0x0c, frpadnum, unk2, seconds
|
||||
/**
|
||||
* Target scripts only: Makes the target go to the specified pad.
|
||||
*
|
||||
* frpadnum:
|
||||
* If 0-30, is used as an index into the g_FrPads array, after applying an
|
||||
* offset if was specified using set_pad_index_offset.
|
||||
* If 31, returns a random pad in frpadnum range 4-12
|
||||
* If 32, returns a random pad in frpadnum range 13-21
|
||||
* If 33, returns a random pad in frpadnum range 22-30
|
||||
* If 34, returns a random pad in frpadnum range 4-30
|
||||
*
|
||||
* In practice the random values are not used, nor anything above 12.
|
||||
*
|
||||
* speed:
|
||||
* If set to 255, the target is immediately placed at the destination pad.
|
||||
*
|
||||
* seconds:
|
||||
* Disables script execution for the given amount of seconds. If the target
|
||||
* stops before this time then it'll effectively wait before continuing the
|
||||
* script.
|
||||
*/
|
||||
#define go_to_pad(frpadnum, speed, seconds) \
|
||||
0x0c, frpadnum, speed, seconds
|
||||
|
||||
/**
|
||||
* Target scripts only: Loops back to the start of the script and continues
|
||||
* execution.
|
||||
*/
|
||||
#define restart() \
|
||||
0x0d
|
||||
|
||||
#define cmd_0e(seconds) \
|
||||
/**
|
||||
* Target scripts only: Waits for the specified amount of seconds before
|
||||
* continuing the script.
|
||||
*/
|
||||
#define wait_seconds(seconds) \
|
||||
0x0e, seconds
|
||||
|
||||
#define rotate(angle, speed) \
|
||||
0x0f, angle, speed
|
||||
/**
|
||||
* Target scripts only: Rotates the target in the given direction, relative to
|
||||
* its current direction.
|
||||
*
|
||||
* Expected values for direction are one of:
|
||||
* FRROTATE_90R
|
||||
* FRROTATE_180R
|
||||
* FRROTATE_90L
|
||||
* FRROTATE_180L
|
||||
*
|
||||
* The duration value is unitless. The higher it is the slower the rotation.
|
||||
*/
|
||||
#define rotate(direction, duration) \
|
||||
0x0f, direction, duration
|
||||
|
||||
/**
|
||||
* Help scripts only: Displays a HUD message to the player.
|
||||
*
|
||||
* The frtextindex is an index into the texts array at the top of the firing
|
||||
* range script file.
|
||||
*/
|
||||
#define hudmsg(frtextindex) \
|
||||
0x10, frtextindex
|
||||
|
||||
/**
|
||||
* Help scripts only: Waits until the player fires their gun before continuing
|
||||
* script execution.
|
||||
*/
|
||||
#define wait_until_shoot() \
|
||||
0x11
|
||||
|
||||
#define wait_seconds(seconds) \
|
||||
/**
|
||||
* Help scripts only: Waits the specified number of seconds before continuing
|
||||
* script execution.
|
||||
*
|
||||
* This command is unused.
|
||||
*/
|
||||
#define help_wait_seconds(seconds) \
|
||||
0x12, seconds
|
||||
|
||||
/**
|
||||
* All scripts: Marks the end of the script.
|
||||
*/
|
||||
#define end() \
|
||||
0x13
|
||||
|
||||
/**
|
||||
* Help scripts only: Applies the subsequent commands if the difficulty is bronze.
|
||||
*/
|
||||
#define if_bronze() \
|
||||
0xfb
|
||||
|
||||
/**
|
||||
* Help scripts only: Applies the subsequent commands if the difficulty is silver.
|
||||
*/
|
||||
#define if_silver() \
|
||||
0xfc
|
||||
|
||||
/**
|
||||
* Help scripts only: Applies the subsequent commands if the difficulty is gold.
|
||||
*/
|
||||
#define if_gold() \
|
||||
0xfd
|
||||
|
||||
/**
|
||||
* All scripts: Marks the start of the script.
|
||||
*/
|
||||
#define start() \
|
||||
0xfe
|
||||
|
||||
+10
-10
@@ -12,9 +12,9 @@ u8 ciGetFiringRangeScore(s32 weaponindex);
|
||||
void frSaveScoreIfBest(s32 weaponindex, s32 difficulty);
|
||||
u8 frIsWeaponFound(s32 weapon);
|
||||
void frSetWeaponFound(s32 weaponnum);
|
||||
s32 stageIsComplete(s32 stageindex);
|
||||
s32 ciIsStageComplete(s32 stageindex);
|
||||
bool func0f19cbcc(s32 weapon);
|
||||
bool frWeaponIsAvailable(s32 weapon);
|
||||
bool frIsWeaponAvailable(s32 weapon);
|
||||
u32 frGetWeaponIndexByWeapon(u32 weaponnum);
|
||||
u32 frGetWeaponScriptIndex(u32 weaponnum);
|
||||
s32 frIsClassicWeaponUnlocked(u32 weapon);
|
||||
@@ -24,16 +24,16 @@ u32 frGetWeaponBySlot(s32 slot);
|
||||
s32 frGetNumWeaponsAvailable(void);
|
||||
void frInitLighting(void);
|
||||
void frRestoreLighting(void);
|
||||
void func0f19d4ec(void);
|
||||
void frUnloadData(void);
|
||||
void *frLoadRomData(u32 len);
|
||||
void frSetDifficulty(s32 difficulty);
|
||||
u32 frGetDifficulty(void);
|
||||
void frInitDefaults(void);
|
||||
struct frdata *getFiringRangeData(void);
|
||||
struct frdata *frGetData(void);
|
||||
u32 frResolveFrPad(u32 arg0);
|
||||
bool frIsDifficulty(u32 difficulties);
|
||||
void frExecuteWeaponScript(s32 scriptindex);
|
||||
void func0f19de24(void);
|
||||
void frSetTargetProps(void);
|
||||
bool frTargetIsAtScriptStart(s32 targetnum);
|
||||
char *frGetInstructionalText(u32 index);
|
||||
void frExecuteHelpScript(void);
|
||||
@@ -42,7 +42,7 @@ void frHideAllTargets(void);
|
||||
void frInitTargets(void);
|
||||
void frCloseAndLockDoor(void);
|
||||
void frUnlockDoor(void);
|
||||
void func0f19e7a8(void);
|
||||
void frLoadData(void);
|
||||
u32 frInitAmmo(s32 weapon);
|
||||
void frBeginSession(s32 weapon);
|
||||
char *frGetWeaponDescription(void);
|
||||
@@ -51,8 +51,8 @@ bool frWasTooInaccurate(void);
|
||||
void frSetFailReason(s32 failreason);
|
||||
void frSetCompleted(void);
|
||||
bool frIsTargetOneHitExplodable(struct prop *prop);
|
||||
f32 func0f19f294(struct coord *a, f32 angle, struct coord *b);
|
||||
bool func0f19f2ec(struct prop *prop, struct coord *pos);
|
||||
f32 frGetTargetAngleToPos(struct coord *a, f32 angle, struct coord *b);
|
||||
bool frIsTargetFacingPos(struct prop *prop, struct coord *pos);
|
||||
struct prop *frChooseAutogunTarget(struct coord *arg0);
|
||||
bool frIsAmmoWasted(void);
|
||||
void frTick(void);
|
||||
@@ -60,7 +60,7 @@ void func0f1a0924(struct prop *prop);
|
||||
bool frChooseFarsightTarget(void);
|
||||
s32 frIsInTraining(void);
|
||||
void frCalculateHit(struct defaultobj *obj, struct coord *hitpos, f32 maulercharge);
|
||||
void func0f1a0fc8(void);
|
||||
void frIncrementNumShots(void);
|
||||
bool ciIsChrBioUnlocked(u32 bodynum);
|
||||
struct chrbio *ciGetChrBioByBodynum(u32 bodynum);
|
||||
char *ciGetChrBioDescription(void);
|
||||
@@ -78,7 +78,7 @@ s32 ciGetNumUnlockedLocationBios(void);
|
||||
s32 ciGetNumUnlockedHangarBios(void);
|
||||
s32 ciGetHangarBioIndexBySlot(s32 slot);
|
||||
char *ciGetHangarBioDescription(void);
|
||||
struct trainingdata *getDeviceTrainingData(void);
|
||||
struct trainingdata *dtGetData(void);
|
||||
void dtRestorePlayer(void);
|
||||
void dtPushEndscreen(void);
|
||||
void dtTick(void);
|
||||
|
||||
@@ -827,8 +827,8 @@ extern u32 var800acc74;
|
||||
extern struct chrdata *g_MpSimulantChrs[MAX_SIMULANTS];
|
||||
extern u8 var800acca0[40];
|
||||
extern u8 g_MpChallengesCompleted[];
|
||||
extern struct frdata g_FiringRangeData;
|
||||
extern struct trainingdata g_DeviceTrainingData;
|
||||
extern struct frdata g_FrData;
|
||||
extern struct trainingdata g_DtData;
|
||||
extern struct trainingdata g_HoloTrainingData;
|
||||
extern u32 var800ad1c0;
|
||||
|
||||
|
||||
+6
-8
@@ -5291,8 +5291,8 @@ struct hudmessage {
|
||||
};
|
||||
|
||||
struct frtarget {
|
||||
/*0x00*/ u8 unk00_01 : 1;
|
||||
/*0x00*/ u8 active : 1;
|
||||
/*0x00*/ u8 inuse : 1; // 1 if being used at all in this session
|
||||
/*0x00*/ u8 active : 1; // 1 if target has appeared
|
||||
/*0x00*/ u8 destroyed : 1;
|
||||
/*0x00*/ u8 scriptenabled : 1;
|
||||
/*0x00*/ u8 rotating : 1;
|
||||
@@ -5307,12 +5307,12 @@ struct frtarget {
|
||||
/*0x1c*/ f32 travelspeed;
|
||||
/*0x20*/ u8 damage;
|
||||
/*0x21*/ u8 scriptoffset;
|
||||
/*0x24*/ f32 rotatespeed; // negative for reverse direction
|
||||
/*0x24*/ f32 rotatespeed; // Negative for reverse direction
|
||||
/*0x28*/ f32 angle;
|
||||
/*0x2c*/ f32 rotatetoangle;
|
||||
/*0x30*/ u8 flags;
|
||||
/*0x31*/ u8 unk31;
|
||||
/*0x32*/ u8 unk32;
|
||||
/*0x31*/ u8 silent; // 0 if playing the hum sound while travelling
|
||||
/*0x32*/ u8 donestopsound; // 1 if the clank sound has played when stopping travelling
|
||||
/*0x33*/ u8 travelling;
|
||||
/*0x34*/ s8 frpadnum;
|
||||
/*0x38*/ s32 invincibletimer;
|
||||
@@ -5320,7 +5320,6 @@ struct frtarget {
|
||||
|
||||
struct frdata {
|
||||
/*0x000*/ u8 maxactivetargets;
|
||||
/*0x001*/ u8 unk001;
|
||||
/*0x002*/ u16 goalscore;
|
||||
/*0x004*/ u8 goaltargets;
|
||||
/*0x005*/ u8 timelimit;
|
||||
@@ -5347,12 +5346,11 @@ struct frdata {
|
||||
/*0x465*/ u8 donelighting : 1;
|
||||
/*0x465*/ u8 donealarm : 1;
|
||||
/*0x465*/ u8 ammohasgrace : 1;
|
||||
/*0x465*/ u8 unk465_06 : 2;
|
||||
/*0x466*/ u8 helpscriptindex;
|
||||
/*0x467*/ u8 helpscriptoffset;
|
||||
/*0x468*/ u8 helpscriptenabled;
|
||||
/*0x46c*/ s32 helpscriptsleep;
|
||||
/*0x470*/ u8 unk470;
|
||||
/*0x470*/ u8 padindexoffset;
|
||||
/*0x471*/ u8 feedbackzone;
|
||||
/*0x472*/ s8 feedbackttl;
|
||||
/*0x474*/ s16 proxyendtimer;
|
||||
|
||||
Reference in new issue
Block a user