mirror of
https://gitlab.com/kholdfuzion/goldeneye_src
synced 2026-09-01 09:13:03 -04:00
Everybody loves a good yearly or so update
This commit is contained in:
@@ -10,18 +10,18 @@ void alloc_shattered_window_pieces(void)
|
||||
{
|
||||
s32 i;
|
||||
s32 level = lvlGetCurrentStageToLoad();
|
||||
|
||||
|
||||
SHATTERED_WINDOW_PIECES_BUFFER_LEN = (200 / getPlayerCount());
|
||||
if ((level == LEVELID_STREETS) || (level == LEVELID_DEPOT))
|
||||
{
|
||||
SHATTERED_WINDOW_PIECES_BUFFER_LEN = (SHATTERED_WINDOW_PIECES_BUFFER_LEN >> 1);
|
||||
}
|
||||
ptr_shattered_window_pieces = mempAllocBytesInBank(((SHATTERED_WINDOW_PIECES_BUFFER_LEN * 0x68) + 0xF) & ~0xF, 4U);
|
||||
ptr_shattered_window_pieces = mempAllocBytesInBank(((SHATTERED_WINDOW_PIECES_BUFFER_LEN * 0x68) + 0xF) & ~0xF, MEMPOOL_STAGE);
|
||||
for(i=0; i<SHATTERED_WINDOW_PIECES_BUFFER_LEN; i++)
|
||||
{
|
||||
ptr_shattered_window_pieces[i].piece = 0;
|
||||
}
|
||||
|
||||
D_80040940 = 0;
|
||||
|
||||
g_NextShardNum = 0;
|
||||
}
|
||||
|
||||
|
||||
+1036
-761
File diff suppressed because it is too large
Load Diff
+18
-8
@@ -16,10 +16,18 @@ struct levelentry
|
||||
};
|
||||
|
||||
typedef struct s_room_info {
|
||||
u8 bitflags0;
|
||||
u8 bitflags1;
|
||||
// is room being rendered? boolean
|
||||
u8 room_rendered;
|
||||
|
||||
// is the room a neighbor to a room being rendered? boolean
|
||||
u8 room_neighbor_to_rendered;
|
||||
|
||||
u8 model_bin_loaded;
|
||||
u8 bitflags2;
|
||||
|
||||
// number of portals in between the player's room and this room.
|
||||
// is 0 if the room is not visible or if the player is standing in this room.
|
||||
u8 portals_to_room_count;
|
||||
|
||||
Vtx * ptr_point_index;
|
||||
void * ptr_expanded_mapping_info;
|
||||
void * ptr_secondary_expanded_mapping_info;
|
||||
@@ -102,11 +110,13 @@ typedef struct unk_portalstruct
|
||||
} unk_portalstruct;
|
||||
|
||||
extern struct unk_portalstruct table_for_portals[200];
|
||||
extern s32 MaxNumRooms;
|
||||
extern s32 g_MaxNumRooms;
|
||||
extern f32 room_data_float2;
|
||||
|
||||
extern bg_room_data * ptr_bgdata_room_fileposition_list;
|
||||
extern s_room_info array_room_info[];
|
||||
extern s_room_info g_BgRoomInfo[];
|
||||
extern Gfx *ptrDynamic_CC_RM_LUT[];
|
||||
extern Gfx DL_LUT_PRIMARY_ADDFOG[];
|
||||
|
||||
|
||||
void bgInit(void);
|
||||
@@ -129,19 +139,19 @@ void bgClearDataPortalsControlBytes1Low2Bits(s32 index);
|
||||
void bgSetDataPortalsControlBytes1Bit2(s32 index);
|
||||
s32 sub_GAME_7F0B9A7C(s32 arg0);
|
||||
s32 sub_GAME_7F0B9A2C(s32 arg0);
|
||||
void sub_GAME_7F0B4884(void);
|
||||
void bgRoomVisibilityRelated(void);
|
||||
Gfx* bgLevelRender(Gfx *arg0);
|
||||
Gfx *bgScissorCurrentPlayerView(Gfx *arg0, s32 left, s32 top, s32 width, s32 height);
|
||||
Gfx* bgScissorCurrentPlayerViewDefault(Gfx* arg0);
|
||||
Gfx* bgScissorCurrentPlayerViewF(Gfx* arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
|
||||
f32 get_room_data_float1(void);
|
||||
u8 getROOMID_Bitflags(int roomID);
|
||||
u8 getROOMID_isRendered(int roomID);
|
||||
s32 bgGet2dBboxByRoomId(s32 room_id, struct bbox2d *result);
|
||||
f32 bgGetLevelVisibilityScale(void);
|
||||
void sub_GAME_7F0B5CC0(struct bbox2d *a, struct bbox2d *b);
|
||||
f32 get_room_data_float2(void);
|
||||
s32 sub_GAME_7F0B9CC8(s32 arg0, s32 arg1, struct coord3d *arg2, struct coord3d *arg3);
|
||||
void sub_GAME_7F0B96CC(s32 arg0, struct PortalMetric *arg1);
|
||||
void bgLoadFromDynamicCCRMLUT(s32 arg0, s32 arg1, s32 arg2);
|
||||
void bgLoadFromDynamicCCRMLUT(Gfx *arg0, Gfx *arg1, enum CCRMLUT arg2);
|
||||
|
||||
#endif
|
||||
|
||||
+38
-221
@@ -18,236 +18,53 @@
|
||||
|
||||
// new file, per EU
|
||||
|
||||
#ifdef NONMATCHING
|
||||
u32 sub_GAME_7F0BA5C0(u32 arg0, u32 arg1) {
|
||||
s32 temp_a0;
|
||||
u32 temp_v0;
|
||||
void *phi_v0;
|
||||
s32 phi_a0;
|
||||
void *phi_v1;
|
||||
|
||||
// Node 0
|
||||
if (arg0 < arg1)
|
||||
{
|
||||
// Node 1
|
||||
phi_v0 = arg0;
|
||||
loop_2:
|
||||
// Node 2
|
||||
if (DL_LUT_PRIMARY_ADDFOG != 0)
|
||||
{
|
||||
// Node 3
|
||||
phi_a0 = DL_LUT_PRIMARY_ADDFOG;
|
||||
phi_v1 = &DL_LUT_PRIMARY_ADDFOG;
|
||||
loop_4:
|
||||
// Node 4
|
||||
if (*phi_v0 == phi_a0)
|
||||
{
|
||||
// Node 5
|
||||
if (phi_v0->unk4 == phi_v1->unk4)
|
||||
{
|
||||
// Node 6
|
||||
*phi_v0 = (s32) phi_v1->unk8;
|
||||
phi_v0->unk4 = (s32) phi_v1->unkC;
|
||||
}
|
||||
}
|
||||
// Node 7
|
||||
temp_a0 = phi_v1->unk10;
|
||||
phi_a0 = temp_a0;
|
||||
phi_v1 = (phi_v1 + 0x10);
|
||||
if (temp_a0 != 0)
|
||||
{
|
||||
goto loop_4;
|
||||
}
|
||||
}
|
||||
// Node 8
|
||||
temp_v0 = (phi_v0 + 8);
|
||||
phi_v0 = temp_v0;
|
||||
if (temp_v0 < arg1)
|
||||
{
|
||||
goto loop_2;
|
||||
}
|
||||
}
|
||||
// Node 9
|
||||
return arg0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F0BA5C0
|
||||
/* 0EF0F0 7F0BA5C0 0085082B */ sltu $at, $a0, $a1
|
||||
/* 0EF0F4 7F0BA5C4 1020001C */ beqz $at, .L7F0BA638
|
||||
/* 0EF0F8 7F0BA5C8 00801025 */ move $v0, $a0
|
||||
/* 0EF0FC 7F0BA5CC 3C068004 */ lui $a2, %hi(DL_LUT_PRIMARY_ADDFOG)
|
||||
/* 0EF100 7F0BA5D0 24C64940 */ addiu $a2, %lo(DL_LUT_PRIMARY_ADDFOG) # addiu $a2, $a2, 0x4940
|
||||
/* 0EF104 7F0BA5D4 8CCE0000 */ lw $t6, ($a2)
|
||||
.L7F0BA5D8:
|
||||
/* 0EF108 7F0BA5D8 3C0F8004 */ lui $t7, %hi(DL_LUT_PRIMARY_ADDFOG)
|
||||
/* 0EF10C 7F0BA5DC 25EF4940 */ addiu $t7, %lo(DL_LUT_PRIMARY_ADDFOG) # addiu $t7, $t7, 0x4940
|
||||
/* 0EF110 7F0BA5E0 11C00011 */ beqz $t6, .L7F0BA628
|
||||
/* 0EF114 7F0BA5E4 00C01825 */ move $v1, $a2
|
||||
/* 0EF118 7F0BA5E8 8DE40000 */ lw $a0, ($t7)
|
||||
/* 0EF11C 7F0BA5EC 8C580000 */ lw $t8, ($v0)
|
||||
.L7F0BA5F0:
|
||||
/* 0EF120 7F0BA5F0 5704000A */ bnel $t8, $a0, .L7F0BA61C
|
||||
/* 0EF124 7F0BA5F4 8C640010 */ lw $a0, 0x10($v1)
|
||||
/* 0EF128 7F0BA5F8 8C590004 */ lw $t9, 4($v0)
|
||||
/* 0EF12C 7F0BA5FC 8C680004 */ lw $t0, 4($v1)
|
||||
/* 0EF130 7F0BA600 57280006 */ bnel $t9, $t0, .L7F0BA61C
|
||||
/* 0EF134 7F0BA604 8C640010 */ lw $a0, 0x10($v1)
|
||||
/* 0EF138 7F0BA608 8C610008 */ lw $at, 8($v1)
|
||||
/* 0EF13C 7F0BA60C AC410000 */ sw $at, ($v0)
|
||||
/* 0EF140 7F0BA610 8C6A000C */ lw $t2, 0xc($v1)
|
||||
/* 0EF144 7F0BA614 AC4A0004 */ sw $t2, 4($v0)
|
||||
/* 0EF148 7F0BA618 8C640010 */ lw $a0, 0x10($v1)
|
||||
.L7F0BA61C:
|
||||
/* 0EF14C 7F0BA61C 24630010 */ addiu $v1, $v1, 0x10
|
||||
/* 0EF150 7F0BA620 5480FFF3 */ bnezl $a0, .L7F0BA5F0
|
||||
/* 0EF154 7F0BA624 8C580000 */ lw $t8, ($v0)
|
||||
.L7F0BA628:
|
||||
/* 0EF158 7F0BA628 24420008 */ addiu $v0, $v0, 8
|
||||
/* 0EF15C 7F0BA62C 0045082B */ sltu $at, $v0, $a1
|
||||
/* 0EF160 7F0BA630 5420FFE9 */ bnezl $at, .L7F0BA5D8
|
||||
/* 0EF164 7F0BA634 8CCE0000 */ lw $t6, ($a2)
|
||||
.L7F0BA638:
|
||||
/* 0EF168 7F0BA638 03E00008 */ jr $ra
|
||||
/* 0EF16C 7F0BA63C 00000000 */ nop
|
||||
)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void LoadFromDynamicCCRMLUT(Gfx *glistp, int DLSize, int LUTToUse)
|
||||
/**
|
||||
* Unreferenced.
|
||||
*/
|
||||
void sub_GAME_7F0BA5C0(Gfx *arg0, Gfx *arg1)
|
||||
{
|
||||
char cVar1;
|
||||
int *piVar2;
|
||||
int iVar3;
|
||||
int iVar4;
|
||||
Gfx *var_v0;
|
||||
Gfx *var_v1;
|
||||
|
||||
if ((param_2 != NULL) && (param_1 < param_2))
|
||||
goto code_r0x7f0ba66c;
|
||||
if (param_2 == NULL)
|
||||
var_v0 = arg0;
|
||||
|
||||
while (var_v0 < arg1)
|
||||
{
|
||||
cVar1 = *(char *)param_1;
|
||||
while (cVar1 != -0x48)
|
||||
for (var_v1 = DL_LUT_PRIMARY_ADDFOG; var_v1->words.w0 != 0; var_v1 += 2)
|
||||
{
|
||||
code_r0x7f0ba66c:
|
||||
do
|
||||
if ((var_v1->words.w0 == var_v0->words.w0) && (var_v1->words.w1 == var_v0->words.w1))
|
||||
{
|
||||
piVar2 = (int *)(&gDynamic_CC_RM_LUTp)[param_3];
|
||||
iVar3 = *piVar2;
|
||||
if (iVar3 != 0)
|
||||
{
|
||||
iVar4 = *param_1;
|
||||
while (true)
|
||||
{
|
||||
if (iVar4 == iVar3)
|
||||
{
|
||||
if (param_1[1] == piVar2[1])
|
||||
{
|
||||
dword_80044DB0 += 1;
|
||||
*param_1 = piVar2[2];
|
||||
param_1[1] = piVar2[3];
|
||||
iVar3 = piVar2[4];
|
||||
}
|
||||
else
|
||||
{
|
||||
iVar3 = piVar2[4];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
iVar3 = piVar2[4];
|
||||
}
|
||||
piVar2 = piVar2 + 4;
|
||||
if (iVar3 == 0)
|
||||
break;
|
||||
iVar4 = *param_1;
|
||||
}
|
||||
}
|
||||
param_1 = param_1 + 2;
|
||||
} while ((param_2 != NULL) && (param_1 < param_2));
|
||||
if (param_2 != NULL)
|
||||
{
|
||||
return;
|
||||
*var_v0 = *(var_v1+1);
|
||||
}
|
||||
cVar1 = *(char *)param_1;
|
||||
}
|
||||
|
||||
var_v0++;
|
||||
}
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
||||
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel bgLoadFromDynamicCCRMLUT /*DynamicCCRMLUT(Int DLSize (a0), Gfx GBICommand(a1), Gfx ReplacementGBICommand (a2))*/
|
||||
/* 0EF170 7F0BA640 10A00004 */ beqz $a1, .L7F0BA654 /*if a1 = 0 goto L7F0BA654*/
|
||||
/* 0EF174 7F0BA644 00801025 */ move $v0, $a0 /*v0 = a0*/
|
||||
/* 0EF178 7F0BA648 0045082B */ sltu $at, $v0, $a1 /*if a1 < v0 then goto L7F0BA668*/
|
||||
/* 0EF17C 7F0BA64C 14200006 */ bnez $at, .L7F0BA668
|
||||
/* 0EF180 7F0BA650 00000000 */ nop
|
||||
.L7F0BA654:
|
||||
/* 0EF184 7F0BA654 14A0002E */ bnez $a1, .L7F0BA710 /*if a1 != 0 goto return*/
|
||||
/* 0EF188 7F0BA658 00000000 */ nop
|
||||
/* 0EF18C 7F0BA65C 808E0000 */ lb $t6, ($a0) /*t6 = byte(a0)*/
|
||||
/* 0EF190 7F0BA660 2408FFB8 */ li $t0, -72 /*t0 = 0xB8*/
|
||||
/* 0EF194 7F0BA664 110E002A */ beq $t0, $t6, .L7F0BA710 /*if t6 = 0xB8 return (B8 = EndDl())*/
|
||||
.L7F0BA668:
|
||||
/* 0EF198 7F0BA668 3C098004 */ lui $t1, %hi(ptrDynamic_CC_RM_LUT)
|
||||
/* 0EF19C 7F0BA66C 25294D88 */ addiu $t1, %lo(ptrDynamic_CC_RM_LUT) # addiu $t1, $t1, 0x4d88
|
||||
/* 0EF1A0 7F0BA670 00067880 */ sll $t7, $a2, 2 /*t7 = a2 << 2*/
|
||||
/* 0EF1A4 7F0BA674 012FC021 */ addu $t8, $t1, $t7 /*t8 = t7 + t1*/
|
||||
/* 0EF1A8 7F0BA678 8F030000 */ lw $v1, ($t8)
|
||||
/* 0EF1AC 7F0BA67C 3C078004 */ lui $a3, %hi(D_80044DB0)
|
||||
/* 0EF1B0 7F0BA680 8CE74DB0 */ lw $a3, %lo(D_80044DB0)($a3) # 0x4DB0($a3),
|
||||
/* 0EF1B4 7F0BA684 8C640000 */ lw $a0, ($v1)
|
||||
/* 0EF1B8 7F0BA688 2408FFB8 */ li $t0, -72
|
||||
/* 0EF1BC 7F0BA68C 10800011 */ beqz $a0, .L7F0BA6D4
|
||||
/* 0EF1C0 7F0BA690 00000000 */ nop
|
||||
/* 0EF1C4 7F0BA694 8C590000 */ lw $t9, ($v0)
|
||||
.L7F0BA698:
|
||||
/* 0EF1C8 7F0BA698 5724000B */ bnel $t9, $a0, .L7F0BA6C8
|
||||
/* 0EF1CC 7F0BA69C 8C640010 */ lw $a0, 0x10($v1)
|
||||
/* 0EF1D0 7F0BA6A0 8C4A0004 */ lw $t2, 4($v0)
|
||||
/* 0EF1D4 7F0BA6A4 8C6B0004 */ lw $t3, 4($v1)
|
||||
/* 0EF1D8 7F0BA6A8 554B0007 */ bnel $t2, $t3, .L7F0BA6C8
|
||||
/* 0EF1DC 7F0BA6AC 8C640010 */ lw $a0, 0x10($v1)
|
||||
/* 0EF1E0 7F0BA6B0 8C610008 */ lw $at, 8($v1)
|
||||
/* 0EF1E4 7F0BA6B4 24E70001 */ addiu $a3, $a3, 1
|
||||
/* 0EF1E8 7F0BA6B8 AC410000 */ sw $at, ($v0)
|
||||
/* 0EF1EC 7F0BA6BC 8C6D000C */ lw $t5, 0xc($v1)
|
||||
/* 0EF1F0 7F0BA6C0 AC4D0004 */ sw $t5, 4($v0)
|
||||
/* 0EF1F4 7F0BA6C4 8C640010 */ lw $a0, 0x10($v1)
|
||||
.L7F0BA6C8:
|
||||
/* 0EF1F8 7F0BA6C8 24630010 */ addiu $v1, $v1, 0x10
|
||||
/* 0EF1FC 7F0BA6CC 5480FFF2 */ bnezl $a0, .L7F0BA698
|
||||
/* 0EF200 7F0BA6D0 8C590000 */ lw $t9, ($v0)
|
||||
.L7F0BA6D4:
|
||||
/* 0EF204 7F0BA6D4 10A00006 */ beqz $a1, .L7F0BA6F0
|
||||
/* 0EF208 7F0BA6D8 24420008 */ addiu $v0, $v0, 8
|
||||
/* 0EF20C 7F0BA6DC 3C018004 */ lui $at, %hi(D_80044DB0)
|
||||
/* 0EF210 7F0BA6E0 AC274DB0 */ sw $a3, %lo(D_80044DB0)($at)
|
||||
/* 0EF214 7F0BA6E4 0045082B */ sltu $at, $v0, $a1
|
||||
/* 0EF218 7F0BA6E8 1420FFDF */ bnez $at, .L7F0BA668
|
||||
/* 0EF21C 7F0BA6EC 00000000 */ nop
|
||||
.L7F0BA6F0:
|
||||
/* 0EF220 7F0BA6F0 3C018004 */ lui $at, %hi(D_80044DB0)
|
||||
/* 0EF224 7F0BA6F4 14A00006 */ bnez $a1, .L7F0BA710
|
||||
/* 0EF228 7F0BA6F8 AC274DB0 */ sw $a3, %lo(D_80044DB0)($at)
|
||||
/* 0EF22C 7F0BA6FC 3C018004 */ lui $at, %hi(D_80044DB0)
|
||||
/* 0EF230 7F0BA700 AC274DB0 */ sw $a3, %lo(D_80044DB0)($at)
|
||||
/* 0EF234 7F0BA704 804E0000 */ lb $t6, ($v0)
|
||||
/* 0EF238 7F0BA708 150EFFD7 */ bne $t0, $t6, .L7F0BA668
|
||||
/* 0EF23C 7F0BA70C 00000000 */ nop
|
||||
.L7F0BA710:
|
||||
/* 0EF240 7F0BA710 03E00008 */ jr $ra
|
||||
/* 0EF244 7F0BA714 00000000 */ nop
|
||||
)
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
void bgLoadFromDynamicCCRMLUT(Gfx *arg0, Gfx *arg1, enum CCRMLUT arg2)
|
||||
{
|
||||
Gfx *var_v0;
|
||||
Gfx *var_v1;
|
||||
|
||||
static s32 D_80044DB0 = 0;
|
||||
|
||||
var_v0 = arg0;
|
||||
|
||||
while (((arg1 != NULL) && (var_v0 < arg1)) || ((arg1 == NULL) && (((s8*)var_v0)[0] != (s8)G_ENDDL)))
|
||||
{
|
||||
for (var_v1 = ptrDynamic_CC_RM_LUT[(s32)arg2]; var_v1->words.w0 != 0; var_v1 += 2)
|
||||
{
|
||||
if ((var_v1->words.w0 == var_v0->words.w0) && (var_v1->words.w1 == var_v0->words.w1))
|
||||
{
|
||||
D_80044DB0 += 1;
|
||||
|
||||
*var_v0 = *(var_v1+1);
|
||||
}
|
||||
}
|
||||
|
||||
var_v0++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -203,8 +203,8 @@ Gfx *insert_imageDL(Gfx *gdl) {
|
||||
}
|
||||
|
||||
Gfx *sub_GAME_7F01C1A4(Gfx *gdl) {
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(matrix_buffer_gunbarrel_0), (G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION));
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(&matrix_buffer_rarelogo_2[D_8002A7D0]), (G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW));
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(matrixBufferGunbarrel0), (G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_PROJECTION));
|
||||
gSPMatrix(gdl++, osVirtualToPhysical(&matrixBufferRareLogo2[D_8002A7D0]), (G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW));
|
||||
gDPPipeSync(gdl++);
|
||||
gDPSetCycleType(gdl++, G_CYC_1CYCLE);
|
||||
gDPSetRenderMode(gdl++, G_RM_AA_OPA_SURF, G_RM_AA_OPA_SURF2);
|
||||
|
||||
+105
-79
@@ -22,31 +22,6 @@ struct init_bond_anim_unk g_BondMoveAnimationSetup[2] = {
|
||||
{PTR_ANIM_sprinting, 7.5f, 17.0f, 0.0f, 1.5f, 100.0f}
|
||||
};
|
||||
|
||||
/**
|
||||
* Address 0x80036B00.
|
||||
*/
|
||||
coord3d D_80036B00 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B0C.
|
||||
*/
|
||||
coord3d D_80036B0C = { 0.0f, 0.0f, 1.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B18.
|
||||
*/
|
||||
coord3d D_80036B18 = { 0.0f, 1.0f, 0.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B24.
|
||||
*/
|
||||
struct unk_joint_list D_80036B24 = {NULL, 1, 3, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}, 0};
|
||||
|
||||
/**
|
||||
* Address 0x80036B64.
|
||||
*/
|
||||
coord3d D_80036B64 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +40,7 @@ void bheadSetdamp(f32 headdamp);
|
||||
|
||||
void bheadFlipAnimation()
|
||||
{
|
||||
g_CurrentPlayer->field_5BC = !g_CurrentPlayer->field_5BC;
|
||||
g_CurrentPlayer->animFlipFlag = !g_CurrentPlayer->animFlipFlag;
|
||||
}
|
||||
|
||||
void bheadUpdateIdleRoll()
|
||||
@@ -131,7 +106,7 @@ void bheadUpdateRot(coord3d *lookvel, coord3d *upvel)
|
||||
g_CurrentPlayer->headlooksum.f[0] = lookvel->f[0] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlooksum.f[1] = lookvel->f[1] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlooksum.f[2] = lookvel->f[2] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum.f[0] = upvel->f[0] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headupsum.f[1] = upvel->f[1] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headupsum.f[2] = upvel->f[2] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
@@ -144,7 +119,7 @@ void bheadUpdateRot(coord3d *lookvel, coord3d *upvel)
|
||||
g_CurrentPlayer->headlooksum.f[0] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum.f[0] + lookvel->f[0];
|
||||
g_CurrentPlayer->headlooksum.f[1] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum.f[1] + lookvel->f[1];
|
||||
g_CurrentPlayer->headlooksum.f[2] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum.f[2] + lookvel->f[2];
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum.f[0] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum.f[0] + upvel->f[0];
|
||||
g_CurrentPlayer->headupsum.f[1] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum.f[1] + upvel->f[1];
|
||||
g_CurrentPlayer->headupsum.f[2] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum.f[2] + upvel->f[2];
|
||||
@@ -153,7 +128,7 @@ void bheadUpdateRot(coord3d *lookvel, coord3d *upvel)
|
||||
g_CurrentPlayer->headlook.f[0] = g_CurrentPlayer->headlooksum.f[0] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlook.f[1] = g_CurrentPlayer->headlooksum.f[1] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlook.f[2] = g_CurrentPlayer->headlooksum.f[2] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
|
||||
|
||||
g_CurrentPlayer->headup.f[0] = g_CurrentPlayer->headupsum.f[0] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headup.f[1] = g_CurrentPlayer->headupsum.f[1] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headup.f[2] = g_CurrentPlayer->headupsum.f[2] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
@@ -164,33 +139,79 @@ void bheadSetdamp(f32 headdamp)
|
||||
if (headdamp != g_CurrentPlayer->headdamp)
|
||||
{
|
||||
f32 divisor = 1.0f - headdamp;
|
||||
|
||||
|
||||
g_CurrentPlayer->headlooksum.f[0] = (g_CurrentPlayer->headlooksum.f[0] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headlooksum.f[1] = (g_CurrentPlayer->headlooksum.f[1] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headlooksum.f[2] = (g_CurrentPlayer->headlooksum.f[2] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum.f[0] = (g_CurrentPlayer->headupsum.f[0] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headupsum.f[1] = (g_CurrentPlayer->headupsum.f[1] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headupsum.f[2] = (g_CurrentPlayer->headupsum.f[2] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
|
||||
|
||||
g_CurrentPlayer->headdamp = headdamp;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Address 0x80036B00.
|
||||
*/
|
||||
coord3d initialHeadPosition = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B0C.
|
||||
*/
|
||||
coord3d headLookDirection = { 0.0f, 0.0f, 1.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B18.
|
||||
*/
|
||||
coord3d headUpDirection = { 0.0f, 1.0f, 0.0f };
|
||||
|
||||
/**
|
||||
* Address 0x80036B24.
|
||||
*/
|
||||
ModelRenderData headModelRenderData = {NULL,
|
||||
TRUE,
|
||||
0x00000003,
|
||||
NULL,
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
{0, 0, 0, 0},
|
||||
{0, 0, 0, 0},
|
||||
CULLMODE_BOTH};
|
||||
/**
|
||||
* Address 0x80036B64.
|
||||
*/
|
||||
coord3d D_80036B64 = { 0.0f, 0.0f, 0.0f };
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Updates the head movement based on the player's speed and animation state.
|
||||
*/
|
||||
void bheadUpdate(f32 percent_speed, f32 speedsideways)
|
||||
{
|
||||
coord3d headpos;
|
||||
coord3d lookvel;
|
||||
coord3d upvel;
|
||||
f32 abs_anim_speed;
|
||||
struct unk_joint_list sp80;
|
||||
ModelRenderData renderData;
|
||||
Mtxf sp40;
|
||||
coord3d sp34;
|
||||
u32 sp30;
|
||||
coord3d offset;
|
||||
u32 isMergable;
|
||||
|
||||
headpos = D_80036B00;
|
||||
lookvel = D_80036B0C;
|
||||
upvel = D_80036B18;
|
||||
headpos = initialHeadPosition;
|
||||
lookvel = headLookDirection;
|
||||
upvel = headUpDirection;
|
||||
|
||||
abs_anim_speed = modelGetAbsAnimSpeed(&g_CurrentPlayer->model);
|
||||
|
||||
@@ -222,35 +243,35 @@ void bheadUpdate(f32 percent_speed, f32 speedsideways)
|
||||
g_CurrentPlayer->sideamplitude = g_CurrentPlayer->headamplitude;
|
||||
}
|
||||
|
||||
sp80 = D_80036B24;
|
||||
sp34 = D_80036B64;
|
||||
renderData = headModelRenderData;
|
||||
offset = D_80036B64;
|
||||
|
||||
sp30 = modelIsAnimMergingEnabled();
|
||||
isMergable = modelIsAnimMergingEnabled();
|
||||
|
||||
g_CurrentPlayer->resetheadtick = 0;
|
||||
g_CurrentPlayer->resetheadtick = FALSE;
|
||||
|
||||
modelSetAnimMergingEnabled(0);
|
||||
modelTickAnimQuarterSpeed(&g_CurrentPlayer->model, g_ClockTimer, 1);
|
||||
modelSetAnimMergingEnabled((s32) sp30);
|
||||
modelSetAnimMergingEnabled((s32) isMergable);
|
||||
|
||||
subcalcpos(&g_CurrentPlayer->model);
|
||||
matrix_4x4_set_identity(&sp40);
|
||||
|
||||
sp80.unk_matrix = &sp40;
|
||||
sp80.mtxlist = &g_CurrentPlayer->bondheadmatrices[0];
|
||||
renderData.unk_matrix = &sp40;
|
||||
renderData.mtxlist = &g_CurrentPlayer->bondheadmatrices[0];
|
||||
|
||||
subcalcmatrices(&sp80, &g_CurrentPlayer->model);
|
||||
subcalcmatrices(&renderData, &g_CurrentPlayer->model);
|
||||
|
||||
g_CurrentPlayer->headbodyoffset.f[0] = g_CurrentPlayer->standbodyoffset.x;
|
||||
g_CurrentPlayer->headbodyoffset.f[1] = g_CurrentPlayer->standbodyoffset.y;
|
||||
g_CurrentPlayer->headbodyoffset.f[2] = g_CurrentPlayer->standbodyoffset.z;
|
||||
|
||||
getsuboffset(&g_CurrentPlayer->model, (struct float3 *) &sp34);
|
||||
getsuboffset(&g_CurrentPlayer->model, (struct float3 *) &offset);
|
||||
|
||||
sp34.f[0] -= g_CurrentPlayer->bondheadmatrices[0].m[3][0];
|
||||
sp34.f[2] -= g_CurrentPlayer->bondheadmatrices[0].m[3][2];
|
||||
|
||||
setsuboffset(&g_CurrentPlayer->model, (coord3d *) &sp34);
|
||||
offset.f[0] -= g_CurrentPlayer->bondheadmatrices[0].m[3][0];
|
||||
offset.f[2] -= g_CurrentPlayer->bondheadmatrices[0].m[3][2];
|
||||
|
||||
setsuboffset(&g_CurrentPlayer->model, (coord3d *) &offset);
|
||||
|
||||
if (abs_anim_speed > 0.0f)
|
||||
{
|
||||
@@ -366,20 +387,20 @@ void bheadUpdate(f32 percent_speed, f32 speedsideways)
|
||||
|
||||
|
||||
/**
|
||||
* Adjust Bond model based on speed (speedforwards).
|
||||
* Toggle the currently selected headanim index.
|
||||
* Address 0x7F08E8BC.
|
||||
*/
|
||||
* Adjusts Bond's head animation based on movement speed.
|
||||
*
|
||||
* @param speed The movement speed to adjust the animation to.
|
||||
*/
|
||||
void bheadAdjustAnimation(f32 speed)
|
||||
{
|
||||
s32 i;
|
||||
f32 startframe;
|
||||
|
||||
speed *= g_BondMoveAnimationSetup[1].unk0C;
|
||||
|
||||
speed *= g_BondMoveAnimationSetup[1].speedMultiplier;
|
||||
|
||||
for (i=0; i<2; i++)
|
||||
{
|
||||
if (speed <= g_BondMoveAnimationSetup[i].unk14 * g_BondMoveAnimationSetup[i].unk0C)
|
||||
if (speed <= g_BondMoveAnimationSetup[i].unk14 * g_BondMoveAnimationSetup[i].speedMultiplier)
|
||||
{
|
||||
if (i != g_CurrentPlayer->headanim)
|
||||
{
|
||||
@@ -397,7 +418,7 @@ void bheadAdjustAnimation(f32 speed)
|
||||
&g_CurrentPlayer->model,
|
||||
// match hack: addu address backwards
|
||||
(struct ModelAnimation *) ((s32)g_BondMoveAnimationSetup[i].anim_id + (s32)&ptr_animation_table->data),
|
||||
(s32) g_CurrentPlayer->field_5BC,
|
||||
(s32) g_CurrentPlayer->animFlipFlag,
|
||||
startframe,
|
||||
0.5f,
|
||||
12.0f);
|
||||
@@ -408,7 +429,7 @@ void bheadAdjustAnimation(f32 speed)
|
||||
g_CurrentPlayer->headanim = i;
|
||||
}
|
||||
|
||||
speed /= g_BondMoveAnimationSetup[i].unk0C;
|
||||
speed /= g_BondMoveAnimationSetup[i].speedMultiplier;
|
||||
|
||||
modelSetAnimSpeed(&g_CurrentPlayer->model, speed * 0.5f, 0.0f);
|
||||
return;
|
||||
@@ -417,12 +438,14 @@ void bheadAdjustAnimation(f32 speed)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Address 0x7F08EA48.
|
||||
*/
|
||||
* Starts a new death animation for Bond's head.
|
||||
*
|
||||
* @param animNum The animation to play.
|
||||
* @param flip Whether to flip the animation.
|
||||
* @param startFrame The starting frame of the animation.
|
||||
* @param speed The speed of the animation.
|
||||
*/
|
||||
void bheadStartDeathAnimation(struct ModelAnimation *animnum, s32 flip, f32 fstarttime, f32 speed)
|
||||
{
|
||||
modelSetAnimation(&g_CurrentPlayer->model, animnum, flip, fstarttime, speed * 0.5f, 12.0f);
|
||||
@@ -430,37 +453,40 @@ void bheadStartDeathAnimation(struct ModelAnimation *animnum, s32 flip, f32 fsta
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Address 0x7F08EAB8.
|
||||
*/
|
||||
* Sets the speed of the current head animation.
|
||||
*
|
||||
* @param speed The speed to set for the head animation.
|
||||
*/
|
||||
void bheadSetSpeed(f32 speed)
|
||||
{
|
||||
modelSetAnimSpeed(&g_CurrentPlayer->model, speed * 0.5f, 0.0f);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Calculates the breathing value for Bond's head animation.
|
||||
*
|
||||
* @return The calculated breathing value.
|
||||
*/
|
||||
f32 bheadGetBreathingValue(void)
|
||||
{
|
||||
if (g_CurrentPlayer->headanim >= 0) {
|
||||
// bondviewGetBondBreathing() * (1/80) + (1/240)
|
||||
f32 a = bondviewGetBondBreathing() * 0.012500001f + 0.004166667f;
|
||||
f32 b = modelGetAbsAnimSpeed(&g_CurrentPlayer->model);
|
||||
f32 baseBreathing = bondviewGetBondBreathing() * 0.012500001f + 0.004166667f;
|
||||
f32 animSpeed = modelGetAbsAnimSpeed(&g_CurrentPlayer->model);
|
||||
|
||||
if (b > 0) {
|
||||
f32 c = b / (g_BondMoveAnimationSetup[g_CurrentPlayer->headanim].endframe - g_BondMoveAnimationSetup[g_CurrentPlayer->headanim].loopframe);
|
||||
if (animSpeed > 0) {
|
||||
f32 calculatedBreathing = animSpeed / (g_BondMoveAnimationSetup[g_CurrentPlayer->headanim].endframe - g_BondMoveAnimationSetup[g_CurrentPlayer->headanim].loopframe);
|
||||
|
||||
if (c < a) {
|
||||
c = a;
|
||||
if (calculatedBreathing < baseBreathing) {
|
||||
calculatedBreathing = baseBreathing;
|
||||
}
|
||||
|
||||
return c;
|
||||
return calculatedBreathing;
|
||||
}
|
||||
|
||||
return a;
|
||||
return baseBreathing;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@ struct init_bond_anim_unk {
|
||||
u32 anim_id;
|
||||
f32 loopframe;
|
||||
f32 endframe;
|
||||
f32 unk0C;
|
||||
f32 speedMultiplier;
|
||||
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
@@ -18,8 +18,8 @@ extern struct init_bond_anim_unk g_BondMoveAnimationSetup[];
|
||||
|
||||
s32 waypointFindRoute(waypoint *, waypoint *, waypoint ** arr, s32 arr_len);
|
||||
waypoint * sub_GAME_7F08FB90(waypoint *, waypoint *);
|
||||
void bheadFlipAnimation();
|
||||
void bheadUpdateIdleRoll();
|
||||
void bheadFlipAnimation(void);
|
||||
void bheadUpdateIdleRoll(void);
|
||||
void bheadUpdate(f32 percent_speed, f32 speedsideways);
|
||||
void bheadAdjustAnimation(f32 arg0);
|
||||
void bheadStartDeathAnimation(struct ModelAnimation *arg0, s32 arg1, f32 arg2, f32 arg3);
|
||||
|
||||
+20
-16
@@ -169,6 +169,10 @@ InvItem *bondinvGetNextAvailItem(void)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("equipgetfreeitem: No free equip items!!!!\n");
|
||||
#endif
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1075,9 +1079,9 @@ u16 *bondinvGetNameByIndex(s32 index)
|
||||
|
||||
if (override)
|
||||
{
|
||||
if (override->unk6)
|
||||
if (override->shorttext)
|
||||
{
|
||||
return langGet(override->unk6);
|
||||
return langGet(override->shorttext);
|
||||
}
|
||||
|
||||
weaponnum = override->weapon;
|
||||
@@ -1088,9 +1092,9 @@ u16 *bondinvGetNameByIndex(s32 index)
|
||||
weaponnum = item->type_inv_item.type_weap.weapon;
|
||||
override = bondinvGetTextbyWeaponID(weaponnum);
|
||||
|
||||
if (override && override->unk6)
|
||||
if (override && override->shorttext)
|
||||
{
|
||||
return langGet(override->unk6);
|
||||
return langGet(override->shorttext);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1135,9 +1139,9 @@ u16 *bondinvGetLongNameByIndex(s32 index)
|
||||
|
||||
if (override)
|
||||
{
|
||||
if (override->unk7)
|
||||
if (override->longtext)
|
||||
{
|
||||
return langGet(override->unk7);
|
||||
return langGet(override->longtext);
|
||||
}
|
||||
|
||||
weaponnum = override->weapon;
|
||||
@@ -1148,9 +1152,9 @@ u16 *bondinvGetLongNameByIndex(s32 index)
|
||||
weaponnum = item->type_inv_item.type_weap.weapon;
|
||||
override = bondinvGetTextbyWeaponID(weaponnum);
|
||||
|
||||
if (override && override->unk7)
|
||||
if (override && override->longtext)
|
||||
{
|
||||
return langGet(override->unk7);
|
||||
return langGet(override->longtext);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1215,9 +1219,9 @@ u16 *bondinvGetFirstTitlebyIndex(s32 index)
|
||||
|
||||
if (override)
|
||||
{
|
||||
if (override->unk4)
|
||||
if (override->titletext1)
|
||||
{
|
||||
return langGet(override->unk4);
|
||||
return langGet(override->titletext1);
|
||||
}
|
||||
|
||||
weaponnum = override->weapon;
|
||||
@@ -1228,9 +1232,9 @@ u16 *bondinvGetFirstTitlebyIndex(s32 index)
|
||||
weaponnum = item->type_inv_item.type_weap.weapon;
|
||||
override = bondinvGetTextbyWeaponID(weaponnum);
|
||||
|
||||
if (override && override->unk4)
|
||||
if (override && override->titletext1)
|
||||
{
|
||||
return langGet(override->unk4);
|
||||
return langGet(override->titletext1);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1275,9 +1279,9 @@ u16 *bondinvGetSecondTitlebyIndex(s32 index)
|
||||
|
||||
if (override)
|
||||
{
|
||||
if (override->unk5)
|
||||
if (override->titletext2)
|
||||
{
|
||||
return langGet(override->unk5);
|
||||
return langGet(override->titletext2);
|
||||
}
|
||||
|
||||
weaponnum = override->weapon;
|
||||
@@ -1288,9 +1292,9 @@ u16 *bondinvGetSecondTitlebyIndex(s32 index)
|
||||
weaponnum = item->type_inv_item.type_weap.weapon;
|
||||
override = bondinvGetTextbyWeaponID(weaponnum);
|
||||
|
||||
if (override && override->unk5)
|
||||
if (override && override->titletext2)
|
||||
{
|
||||
return langGet(override->unk5);
|
||||
return langGet(override->titletext2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1412
-2856
File diff suppressed because it is too large
Load Diff
+75
-440
@@ -27,7 +27,7 @@ typedef struct invitem_dual
|
||||
/** unknown struct, used in `strut player`.
|
||||
* We know this is a struct from the compiler auto-generated
|
||||
* code to copy structs in bondview.c bondviewKillCurrentPlayer.
|
||||
*
|
||||
*
|
||||
* sizeof == 84 (0x54)
|
||||
*/
|
||||
struct collision434 {
|
||||
@@ -45,8 +45,8 @@ struct collision434 {
|
||||
/**
|
||||
* This affects Bond's movement, but not the viewport.
|
||||
* This does not affect boost direction.
|
||||
*
|
||||
* f[0]: forward component (sin theta) in radians
|
||||
*
|
||||
* f[0]: forward component (sin theta) in radians
|
||||
* f[1]: zero
|
||||
* f[2]: sideways component (cos theta) in radians.
|
||||
* Offset 0x10.
|
||||
@@ -142,18 +142,18 @@ struct hand
|
||||
s32 field_938;
|
||||
s32 field_93C;
|
||||
s32 field_940;
|
||||
s32 field_944;
|
||||
f32 field_944;
|
||||
s32 field_948;
|
||||
s32 field_94C;
|
||||
f32 field_94C;
|
||||
s32 field_950;
|
||||
s32 field_954;
|
||||
s32 field_958;
|
||||
s32 field_95C;
|
||||
s32 field_960;
|
||||
s32 field_964;
|
||||
s32 field_968;
|
||||
f32 field_968;
|
||||
s32 field_96C;
|
||||
s32 field_970;
|
||||
f32 field_970;
|
||||
s32 field_974;
|
||||
coord3d blendpos[4];
|
||||
coord3d blendlook[4];
|
||||
@@ -203,7 +203,7 @@ struct hand
|
||||
|
||||
// offset 0xad8
|
||||
Mtxf throw_item_pos_related;
|
||||
|
||||
|
||||
s32 field_B18;
|
||||
s32 field_B1C;
|
||||
s32 field_B20;
|
||||
@@ -286,10 +286,10 @@ typedef struct textoverride {
|
||||
/*0x00*/ u32 unk1;
|
||||
/*0x04*/ s32 objoffset;
|
||||
/*0x08*/ s32 weapon;
|
||||
/*0x0c*/ u32 unk4;
|
||||
/*0x10*/ u32 unk5;
|
||||
/*0x14*/ u32 unk6;
|
||||
/*0x18*/ u32 unk7;
|
||||
/*0x0c*/ u32 titletext1; //1st title
|
||||
/*0x10*/ u32 titletext2;//2nd title
|
||||
/*0x14*/ u32 shorttext;
|
||||
/*0x18*/ u32 longtext; //longname
|
||||
/*0x1c*/ u32 pickuptext;
|
||||
/*0x20*/ struct textoverride *next;
|
||||
/*0x24*/ struct ObjectRecord *obj;
|
||||
@@ -381,7 +381,7 @@ struct player
|
||||
* Offset 0x007c.
|
||||
*/
|
||||
/* 0x007c */ f32 field_7C;
|
||||
|
||||
|
||||
/* 0x0080 */ f32 field_80;
|
||||
|
||||
/**
|
||||
@@ -406,13 +406,13 @@ struct player
|
||||
* Collision / clipping related.
|
||||
* When Bond falls off a ladder or similar, will "overshoot" vertical default.
|
||||
* Current offset is stored in this field.
|
||||
*
|
||||
*
|
||||
* Offset 0x0090.
|
||||
*/
|
||||
/* 0x0090 */ f32 vertical_bounce_adjust;
|
||||
/* 0x0094 */ s32 field_94;
|
||||
/* 0x0098 */ f32 field_98;
|
||||
|
||||
|
||||
/**
|
||||
* Flag: 0, 1, 2
|
||||
*/
|
||||
@@ -437,7 +437,7 @@ struct player
|
||||
struct rect4f collision_bounds;
|
||||
|
||||
/* 0x00d0 */ s32 field_D0;
|
||||
/* 0x00d4 */ s32 *ptr_char_objectinstance;
|
||||
/* 0x00d4 */ struct Model *ptr_char_objectinstance; //canonically bondsub
|
||||
/* 0x00d8 */ s32 bonddead;
|
||||
/* 0x00dc */ f32 bondhealth;
|
||||
/* 0x00e0 */ f32 bondarmour;
|
||||
@@ -458,7 +458,7 @@ struct player
|
||||
* 0x00f4
|
||||
**/
|
||||
f32 damageshowtime;
|
||||
|
||||
|
||||
/**
|
||||
* When a non-negative integer:
|
||||
* - Show health and body armor overlay if Bond isn't dead.
|
||||
@@ -501,25 +501,25 @@ struct player
|
||||
/* 0x0144 */ s32 autoxaimtime60;
|
||||
/* 0x0148 */ f32 vv_theta;
|
||||
/* 0x014c */ f32 speedtheta;
|
||||
|
||||
|
||||
/**
|
||||
* Computed value from vv_theta, used to calculate boost direction.
|
||||
* 0x0150
|
||||
**/
|
||||
f32 vv_costheta;
|
||||
|
||||
|
||||
/**
|
||||
* Computed value from vv_theta, used to calculate boost direction.
|
||||
* 0x0154
|
||||
**/
|
||||
f32 vv_sintheta;
|
||||
|
||||
|
||||
/**
|
||||
* Vertical look angle.
|
||||
* 0x0158
|
||||
**/
|
||||
f32 vv_verta;
|
||||
|
||||
|
||||
/**
|
||||
* Vertical look angle. Computed value from vv_verta, should always be between 0 and 360 degrees.
|
||||
* 0x015c
|
||||
@@ -527,13 +527,13 @@ struct player
|
||||
f32 vv_verta360;
|
||||
|
||||
/* 0x0160 */ f32 speedverta;
|
||||
|
||||
|
||||
/**
|
||||
* Computed value from vv_verta360, but otherwise unused?
|
||||
* 0x0164
|
||||
**/
|
||||
f32 vv_cosverta;
|
||||
|
||||
|
||||
/**
|
||||
* Computed value from vv_verta360, but otherwise unused?
|
||||
* 0x0168
|
||||
@@ -555,7 +555,7 @@ struct player
|
||||
* How long Bond has been running
|
||||
*/
|
||||
/* 0x017c */ s32 speedmaxtime60;
|
||||
|
||||
|
||||
coord3d bondshotspeed; //0x180
|
||||
|
||||
// offset 0x18c
|
||||
@@ -572,7 +572,7 @@ struct player
|
||||
|
||||
// offset 0x19c
|
||||
f32 bondbreathing;
|
||||
|
||||
|
||||
s32 field_1A0;
|
||||
s32 field_1A4;
|
||||
s32 field_1A8;
|
||||
@@ -589,8 +589,8 @@ struct player
|
||||
*/
|
||||
s32 watch_pause_time;
|
||||
|
||||
s32 field_1C4;
|
||||
s32 watch_animation_state;
|
||||
/* 0x01c4 */ s32 timer_1C4;
|
||||
/* 0x01c8 */ s32 watch_animation_state;
|
||||
|
||||
/**
|
||||
* 1 = level is active
|
||||
@@ -638,7 +638,7 @@ struct player
|
||||
* Offset 0x022c.
|
||||
*/
|
||||
f32 pause_watch_related_scaled;
|
||||
|
||||
|
||||
s32 something_with_watch_object_instance;
|
||||
|
||||
s32 field_234;
|
||||
@@ -779,10 +779,10 @@ struct player
|
||||
* Offset 0x408.
|
||||
*/
|
||||
coord3d bondprevpos; //0x408
|
||||
|
||||
|
||||
f32 thetadie; //0x414
|
||||
f32 vertadie; //0x418
|
||||
s32 bondtype;
|
||||
s32 bondtype;
|
||||
s32 startnewbonddie; //0x420
|
||||
|
||||
/**
|
||||
@@ -796,7 +796,7 @@ struct player
|
||||
* Offset 0x428.
|
||||
*/
|
||||
s32 deathanimfinished;
|
||||
s32 field_42c;
|
||||
s32 field_42c;
|
||||
s32 controldef; //0x430
|
||||
|
||||
struct collision434 previous_collision_info;
|
||||
@@ -848,11 +848,11 @@ struct player
|
||||
s32 field_5B0;
|
||||
s32 field_5B4;
|
||||
s32 field_5B8;
|
||||
s8 field_5BC;
|
||||
s8 animFlipFlag;
|
||||
s8 field_5BD;
|
||||
s8 field_5BE;
|
||||
s8 field_5BF;
|
||||
|
||||
|
||||
f32 field_5C0;
|
||||
|
||||
s32 field_5C4;
|
||||
@@ -946,16 +946,16 @@ struct player
|
||||
* Offset 0x7f6.
|
||||
*/
|
||||
s16 viewtop;
|
||||
|
||||
|
||||
s32 hand_invisible[2]; /* 0x7f8*/
|
||||
ITEM_IDS hand_item[2]; /* 0x800 */
|
||||
ModelFileHeader *ptr_hand_weapon_buffer[2]; /* 0x808 */
|
||||
|
||||
|
||||
/**
|
||||
* Offset 0x810.
|
||||
*/
|
||||
ModelFileHeader copy_of_body_obj_header[2];
|
||||
|
||||
|
||||
struct texpool item_related[2]; /* 0x850 */
|
||||
|
||||
/**
|
||||
@@ -972,7 +972,7 @@ struct player
|
||||
* Offset 0xfcc.
|
||||
*/
|
||||
s32 field_FCC;
|
||||
|
||||
|
||||
// Seems to be copy of field_FCC
|
||||
s32 field_FD0;
|
||||
|
||||
@@ -1010,7 +1010,7 @@ struct player
|
||||
f32 field_1080;
|
||||
f32 sniper_zoom;
|
||||
f32 camera_zoom;
|
||||
s32 field_108C;
|
||||
s32 curRoomIndex;
|
||||
|
||||
/**
|
||||
* Offset 0x1090.
|
||||
@@ -1118,7 +1118,7 @@ struct player
|
||||
* Used during level.
|
||||
* 0x2: no crosshair
|
||||
* 0x0: cross hair shown on screen.
|
||||
*
|
||||
*
|
||||
* Offset 0x1128.
|
||||
*/
|
||||
s32 gunsightmode;
|
||||
@@ -1163,378 +1163,12 @@ struct player
|
||||
/**
|
||||
* Offset 0x12b4.
|
||||
*/
|
||||
u8 something_with_cheat_text;
|
||||
u8 can_display_cheat_text;
|
||||
u8 bondinvincible;
|
||||
u8 field_12B7;
|
||||
s32 healthdamagetype;
|
||||
s32 field_12BC;
|
||||
s32 field_12C0;
|
||||
s32 field_12C4;
|
||||
s32 field_12C8;
|
||||
s32 field_12CC;
|
||||
s32 field_12D0;
|
||||
s32 field_12D4;
|
||||
s32 field_12D8;
|
||||
s32 field_12DC;
|
||||
s32 field_12E0;
|
||||
s32 field_12E4;
|
||||
s32 field_12E8;
|
||||
s32 field_12EC;
|
||||
s32 field_12F0;
|
||||
s32 field_12F4;
|
||||
s32 field_12F8;
|
||||
s32 field_12FC;
|
||||
s32 field_1300;
|
||||
s32 field_1304;
|
||||
s32 field_1308;
|
||||
s32 field_130C;
|
||||
s32 field_1310;
|
||||
s32 field_1314;
|
||||
s32 field_1318;
|
||||
s32 field_131C;
|
||||
s32 field_1320;
|
||||
s32 field_1324;
|
||||
s32 field_1328;
|
||||
s32 field_132C;
|
||||
s32 field_1330;
|
||||
s32 field_1334;
|
||||
s32 field_1338;
|
||||
s32 field_133C;
|
||||
s32 field_1340;
|
||||
s32 field_1344;
|
||||
s32 field_1348;
|
||||
s32 field_134C;
|
||||
s32 field_1350;
|
||||
s32 field_1354;
|
||||
s32 field_1358;
|
||||
s32 field_135C;
|
||||
s32 field_1360;
|
||||
s32 field_1364;
|
||||
s32 field_1368;
|
||||
s32 field_136C;
|
||||
s32 field_1370;
|
||||
s32 field_1374;
|
||||
s32 field_1378;
|
||||
s32 field_137C;
|
||||
s32 field_1380;
|
||||
s32 field_1384;
|
||||
s32 field_1388;
|
||||
s32 field_138C;
|
||||
s32 field_1390;
|
||||
s32 field_1394;
|
||||
s32 field_1398;
|
||||
s32 field_139C;
|
||||
s32 field_13A0;
|
||||
s32 field_13A4;
|
||||
s32 field_13A8;
|
||||
s32 field_13AC;
|
||||
s32 field_13B0;
|
||||
s32 field_13B4;
|
||||
s32 field_13B8;
|
||||
s32 field_13BC;
|
||||
s32 field_13C0;
|
||||
s32 field_13C4;
|
||||
s32 field_13C8;
|
||||
s32 field_13CC;
|
||||
s32 field_13D0;
|
||||
s32 field_13D4;
|
||||
s32 field_13D8;
|
||||
s32 field_13DC;
|
||||
s32 field_13E0;
|
||||
s32 field_13E4;
|
||||
s32 field_13E8;
|
||||
s32 field_13EC;
|
||||
s32 field_13F0;
|
||||
s32 field_13F4;
|
||||
s32 field_13F8;
|
||||
s32 field_13FC;
|
||||
s32 field_1400;
|
||||
s32 field_1404;
|
||||
s32 field_1408;
|
||||
s32 field_140C;
|
||||
s32 field_1410;
|
||||
s32 field_1414;
|
||||
s32 field_1418;
|
||||
s32 field_141C;
|
||||
s32 field_1420;
|
||||
s32 field_1424;
|
||||
s32 field_1428;
|
||||
s32 field_142C;
|
||||
s32 field_1430;
|
||||
s32 field_1434;
|
||||
s32 field_1438;
|
||||
s32 field_143C;
|
||||
s32 field_1440;
|
||||
s32 field_1444;
|
||||
s32 field_1448;
|
||||
s32 field_144C;
|
||||
s32 field_1450;
|
||||
s32 field_1454;
|
||||
s32 field_1458;
|
||||
s32 field_145C;
|
||||
s32 field_1460;
|
||||
s32 field_1464;
|
||||
s32 field_1468;
|
||||
s32 field_146C;
|
||||
s32 field_1470;
|
||||
s32 field_1474;
|
||||
s32 field_1478;
|
||||
s32 field_147C;
|
||||
s32 field_1480;
|
||||
s32 field_1484;
|
||||
s32 field_1488;
|
||||
s32 field_148C;
|
||||
s32 field_1490;
|
||||
s32 field_1494;
|
||||
s32 field_1498;
|
||||
s32 field_149C;
|
||||
s32 field_14A0;
|
||||
s32 field_14A4;
|
||||
s32 field_14A8;
|
||||
s32 field_14AC;
|
||||
s32 field_14B0;
|
||||
s32 field_14B4;
|
||||
s32 field_14B8;
|
||||
s32 field_14BC;
|
||||
s32 field_14C0;
|
||||
s32 field_14C4;
|
||||
s32 field_14C8;
|
||||
s32 field_14CC;
|
||||
s32 field_14D0;
|
||||
s32 field_14D4;
|
||||
s32 field_14D8;
|
||||
s32 field_14DC;
|
||||
s32 field_14E0;
|
||||
s32 field_14E4;
|
||||
s32 field_14E8;
|
||||
s32 field_14EC;
|
||||
s32 field_14F0;
|
||||
s32 field_14F4;
|
||||
s32 field_14F8;
|
||||
s32 field_14FC;
|
||||
s32 field_1500;
|
||||
s32 field_1504;
|
||||
s32 field_1508;
|
||||
s32 field_150C;
|
||||
s32 field_1510;
|
||||
s32 field_1514;
|
||||
s32 field_1518;
|
||||
s32 field_151C;
|
||||
s32 field_1520;
|
||||
s32 field_1524;
|
||||
s32 field_1528;
|
||||
s32 field_152C;
|
||||
s32 field_1530;
|
||||
s32 field_1534;
|
||||
s32 field_1538;
|
||||
s32 field_153C;
|
||||
s32 field_1540;
|
||||
s32 field_1544;
|
||||
s32 field_1548;
|
||||
s32 field_154C;
|
||||
s32 field_1550;
|
||||
s32 field_1554;
|
||||
s32 field_1558;
|
||||
s32 field_155C;
|
||||
s32 field_1560;
|
||||
s32 field_1564;
|
||||
s32 field_1568;
|
||||
s32 field_156C;
|
||||
s32 field_1570;
|
||||
s32 field_1574;
|
||||
s32 field_1578;
|
||||
s32 field_157C;
|
||||
s32 field_1580;
|
||||
s32 field_1584;
|
||||
s32 field_1588;
|
||||
s32 field_158C;
|
||||
s32 field_1590;
|
||||
s32 field_1594;
|
||||
s32 related_to_health_display;
|
||||
s32 field_159C;
|
||||
s32 field_15A0;
|
||||
s32 field_15A4;
|
||||
s32 field_15A8;
|
||||
s32 field_15AC;
|
||||
s32 field_15B0;
|
||||
s32 field_15B4;
|
||||
s32 field_15B8;
|
||||
s32 field_15BC;
|
||||
s32 field_15C0;
|
||||
s32 field_15C4;
|
||||
s32 field_15C8;
|
||||
s32 field_15CC;
|
||||
s32 field_15D0;
|
||||
s32 field_15D4;
|
||||
s32 field_15D8;
|
||||
s32 field_15DC;
|
||||
s32 field_15E0;
|
||||
s32 field_15E4;
|
||||
s32 field_15E8;
|
||||
s32 field_15EC;
|
||||
s32 field_15F0;
|
||||
s32 field_15F4;
|
||||
s32 field_15F8;
|
||||
s32 field_15FC;
|
||||
s32 field_1600;
|
||||
s32 field_1604;
|
||||
s32 field_1608;
|
||||
s32 field_160C;
|
||||
s32 field_1610;
|
||||
s32 field_1614;
|
||||
s32 field_1618;
|
||||
s32 field_161C;
|
||||
s32 field_1620;
|
||||
s32 field_1624;
|
||||
s32 field_1628;
|
||||
s32 field_162C;
|
||||
s32 field_1630;
|
||||
s32 field_1634;
|
||||
s32 field_1638;
|
||||
s32 field_163C;
|
||||
s32 field_1640;
|
||||
s32 field_1644;
|
||||
s32 field_1648;
|
||||
s32 field_164C;
|
||||
s32 field_1650;
|
||||
s32 field_1654;
|
||||
s32 field_1658;
|
||||
s32 field_165C;
|
||||
s32 field_1660;
|
||||
s32 field_1664;
|
||||
s32 field_1668;
|
||||
s32 field_166C;
|
||||
s32 field_1670;
|
||||
s32 field_1674;
|
||||
s32 field_1678;
|
||||
s32 field_167C;
|
||||
s32 field_1680;
|
||||
s32 field_1684;
|
||||
s32 field_1688;
|
||||
s32 field_168C;
|
||||
s32 field_1690;
|
||||
s32 field_1694;
|
||||
s32 field_1698;
|
||||
s32 field_169C;
|
||||
s32 field_16A0;
|
||||
s32 field_16A4;
|
||||
s32 field_16A8;
|
||||
s32 field_16AC;
|
||||
s32 field_16B0;
|
||||
s32 field_16B4;
|
||||
s32 field_16B8;
|
||||
s32 field_16BC;
|
||||
s32 field_16C0;
|
||||
s32 field_16C4;
|
||||
s32 field_16C8;
|
||||
s32 field_16CC;
|
||||
s32 field_16D0;
|
||||
s32 field_16D4;
|
||||
s32 field_16D8;
|
||||
s32 field_16DC;
|
||||
s32 field_16E0;
|
||||
s32 field_16E4;
|
||||
s32 field_16E8;
|
||||
s32 field_16EC;
|
||||
s32 field_16F0;
|
||||
s32 field_16F4;
|
||||
s32 field_16F8;
|
||||
s32 field_16FC;
|
||||
s32 field_1700;
|
||||
s32 field_1704;
|
||||
s32 field_1708;
|
||||
s32 field_170C;
|
||||
s32 field_1710;
|
||||
s32 field_1714;
|
||||
s32 field_1718;
|
||||
s32 field_171C;
|
||||
s32 field_1720;
|
||||
s32 field_1724;
|
||||
s32 field_1728;
|
||||
s32 field_172C;
|
||||
s32 field_1730;
|
||||
s32 field_1734;
|
||||
s32 field_1738;
|
||||
s32 field_173C;
|
||||
s32 field_1740;
|
||||
s32 field_1744;
|
||||
s32 field_1748;
|
||||
s32 field_174C;
|
||||
s32 field_1750;
|
||||
s32 field_1754;
|
||||
s32 field_1758;
|
||||
s32 field_175C;
|
||||
s32 field_1760;
|
||||
s32 field_1764;
|
||||
s32 field_1768;
|
||||
s32 field_176C;
|
||||
s32 field_1770;
|
||||
s32 field_1774;
|
||||
s32 field_1778;
|
||||
s32 field_177C;
|
||||
s32 field_1780;
|
||||
s32 field_1784;
|
||||
s32 field_1788;
|
||||
s32 field_178C;
|
||||
s32 field_1790;
|
||||
s32 field_1794;
|
||||
s32 field_1798;
|
||||
s32 field_179C;
|
||||
s32 field_17A0;
|
||||
s32 field_17A4;
|
||||
s32 field_17A8;
|
||||
s32 field_17AC;
|
||||
s32 field_17B0;
|
||||
s32 field_17B4;
|
||||
s32 field_17B8;
|
||||
s32 field_17BC;
|
||||
s32 field_17C0;
|
||||
s32 field_17C4;
|
||||
s32 field_17C8;
|
||||
s32 field_17CC;
|
||||
s32 field_17D0;
|
||||
s32 field_17D4;
|
||||
s32 field_17D8;
|
||||
s32 field_17DC;
|
||||
s32 field_17E0;
|
||||
s32 field_17E4;
|
||||
s32 field_17E8;
|
||||
s32 field_17EC;
|
||||
s32 field_17F0;
|
||||
s32 field_17F4;
|
||||
s32 field_17F8;
|
||||
s32 field_17FC;
|
||||
s32 field_1800;
|
||||
s32 field_1804;
|
||||
s32 field_1808;
|
||||
s32 field_180C;
|
||||
s32 field_1810;
|
||||
s32 field_1814;
|
||||
s32 field_1818;
|
||||
s32 field_181C;
|
||||
s32 field_1820;
|
||||
s32 field_1824;
|
||||
s32 field_1828;
|
||||
s32 field_182C;
|
||||
s32 field_1830;
|
||||
s32 field_1834;
|
||||
s32 field_1838;
|
||||
s32 field_183C;
|
||||
s32 field_1840;
|
||||
s32 field_1844;
|
||||
s32 field_1848;
|
||||
s32 field_184C;
|
||||
s32 field_1850;
|
||||
s32 field_1854;
|
||||
s32 field_1858;
|
||||
s32 field_185C;
|
||||
s32 field_1860;
|
||||
s32 field_1864;
|
||||
s32 field_1868;
|
||||
s32 field_186C;
|
||||
s32 field_1870;
|
||||
s32 field_1874;
|
||||
/* 0x12B4 */ u8 something_with_cheat_text;
|
||||
/* 0x12B5 */ u8 can_display_cheat_text;
|
||||
/* 0x12B6 */ u8 bondinvincible;
|
||||
/* 0x12B7 */ u8 field_12B7;
|
||||
/* 0x12B8 */ struct damage_display_parent armor_display_values[23];
|
||||
/* 0x1598 */ struct damage_display_parent health_display_values[23];
|
||||
|
||||
/**
|
||||
* Offset 0x1878
|
||||
@@ -1546,12 +1180,12 @@ struct player
|
||||
* Offset 0x19b8.
|
||||
*/
|
||||
struct WatchRectangle buffer_for_watch_static_vertices[1];
|
||||
|
||||
|
||||
/**
|
||||
* Offset 0x19f8
|
||||
*/
|
||||
s32 watch_body_armor_bar_gdl; // used in watch
|
||||
|
||||
|
||||
s32 field_19FC;
|
||||
s32 field_1A00;
|
||||
s32 field_1A04;
|
||||
@@ -2481,7 +2115,7 @@ struct player
|
||||
* Offset 0x2858
|
||||
*/
|
||||
Gfx buffer_for_watch_greenbackdrop_DL[WATCH_NUMBER_SCREENS];
|
||||
|
||||
|
||||
s32 field_2880;
|
||||
s32 field_2884;
|
||||
s32 field_2888;
|
||||
@@ -2552,7 +2186,7 @@ struct player
|
||||
s32 field_298C;
|
||||
s32 field_2990;
|
||||
s32 field_2994;
|
||||
|
||||
|
||||
/**
|
||||
* Watch static, not "static DL".
|
||||
* Offset 0x2998
|
||||
@@ -2598,7 +2232,7 @@ struct player
|
||||
|
||||
/**
|
||||
* Current tile pointer -> room.
|
||||
*
|
||||
*
|
||||
* Offset 0x2a04.
|
||||
*/
|
||||
s16 field_2A04;
|
||||
@@ -2610,10 +2244,10 @@ struct player
|
||||
s32 field_2A30;
|
||||
s32 field_2A34;
|
||||
s32 cur_item_weapon_getname;
|
||||
f32 actual_health;
|
||||
f32 actual_armor;
|
||||
/* 0x2a3c */ f32 actual_health;
|
||||
/* 0x2a40 */ f32 actual_armor;
|
||||
ITEM_IDS field_2A44[2];
|
||||
f32 field_2A4C;
|
||||
f32 speedgo;
|
||||
s32 lock_hand_model[2];
|
||||
s32 cur_player_control_type_0;
|
||||
s32 cur_player_control_type_1;
|
||||
@@ -2710,17 +2344,17 @@ extern s32 g_bondviewForceDisarm;
|
||||
//D:80036428
|
||||
extern s32 resolution;
|
||||
//D:8003642C
|
||||
extern s32 camera_8003642C;
|
||||
extern s32 cameraBufferToggle;
|
||||
//D:80036430
|
||||
extern s32 camera_80036430;
|
||||
extern s32 cameraFrameCounter1;
|
||||
//D:80036434
|
||||
extern s32 camera_80036434;
|
||||
extern s32 cameraFrameCounter2;
|
||||
//D:80036438
|
||||
extern s32 camera_80036438;
|
||||
//D:8003643C
|
||||
extern s32 D_8003643C;
|
||||
extern s32 credits_state;
|
||||
//D:80036440
|
||||
extern CreditsEntry *D_80036440;
|
||||
extern CreditsEntry *credits_pointer;
|
||||
//D:80036444
|
||||
extern s32 g_SurroundBondWithExplosionsFlag;
|
||||
//D:80036448
|
||||
@@ -2745,7 +2379,7 @@ extern f32 g_TankTurnSpeed;
|
||||
//D:80036464
|
||||
extern f32 g_TankOrientationAngle;
|
||||
//D:80036468
|
||||
extern f32 D_80036468;
|
||||
extern f32 tank_turret_unused_angle;
|
||||
//D:8003646C
|
||||
extern f32 g_TankTurretVerticalAngle;
|
||||
//D:80036470
|
||||
@@ -2753,9 +2387,9 @@ extern f32 g_TankTurretVerticalAngleRelated;
|
||||
//D:80036474
|
||||
extern f32 g_TankTurretOrientationAngleRad;
|
||||
//D:80036478
|
||||
extern f32 D_80036478;
|
||||
extern f32 g_TankTurretOrientationAngleDeg;
|
||||
//D:8003647C
|
||||
extern f32 D_8003647C;
|
||||
extern f32 tank_turret_turn_speed;
|
||||
//D:80036480
|
||||
extern s32 g_BondCanEnterTank;
|
||||
//D:80036484
|
||||
@@ -2771,17 +2405,17 @@ extern enum CAMERAMODE g_CameraMode;
|
||||
//D:80036498
|
||||
extern enum CAMERAMODE g_CameraAfterCinema;
|
||||
//D:8003649C
|
||||
extern s32 D_8003649C;
|
||||
extern s32 camera_fade_active;
|
||||
//D:800364A0
|
||||
extern s32 stop_time_flag;
|
||||
//D:800364A4
|
||||
extern f32 D_800364A4;
|
||||
extern f32 camera_transition_timer;
|
||||
//D:800364A8
|
||||
extern s32 D_800364A8;
|
||||
extern s32 intro_camera_index;
|
||||
//D:800364AC
|
||||
extern struct SetupIntroSwirl *g_IntroSwirl;
|
||||
//D:800364B0
|
||||
extern s32 D_800364B0;
|
||||
extern s32 is_timer_active;
|
||||
//D:800364B4
|
||||
extern s32 g_PlayerInvincible;
|
||||
//D:800364B8
|
||||
@@ -2806,7 +2440,7 @@ extern s32 g_bondviewBondDeathAnimations[];
|
||||
//D:8003650C
|
||||
extern s32 g_bondviewBondDeathAnimationsCount;
|
||||
//D:80036510
|
||||
extern enum CAMERAMODE D_80036510;
|
||||
extern enum CAMERAMODE camera_mode;
|
||||
//D:80036514
|
||||
extern s32 g_IntroAnimationIndex;
|
||||
/*
|
||||
@@ -2921,7 +2555,7 @@ extern s32 D_80036834;
|
||||
//D:80036838
|
||||
extern s32 D_80036838;
|
||||
//D:8003683C
|
||||
extern struct unk_joint_list D_8003683C;
|
||||
extern ModelRenderData D_8003683C;
|
||||
|
||||
//D:8003687C
|
||||
extern s32 D_8003687C;
|
||||
@@ -2999,8 +2633,8 @@ extern s32 watch_time_0;
|
||||
#endif
|
||||
|
||||
extern f32 watch_transition_time;
|
||||
extern s32 starting_right_weapon;
|
||||
extern s32 starting_left_weapon;
|
||||
// ITEM_IDS
|
||||
extern ITEM_IDS starting_weapon[2];
|
||||
extern PadRecord *g_Startpad[];
|
||||
extern s32 startpadcount;
|
||||
extern StandTilePoint *dword_CODE_bss_80079DA0;
|
||||
@@ -3010,7 +2644,7 @@ extern StandTilePoint *dword_CODE_bss_80079DA4;
|
||||
extern s32 dword_CODE_bss_80079DA8[];
|
||||
|
||||
|
||||
u32 get_camera_mode(void);
|
||||
u32 bondviewGetCameraMode(void);
|
||||
|
||||
void bondviewTriggerWatchZoom(f32 zoominfovy);
|
||||
|
||||
@@ -3059,7 +2693,7 @@ s32 bond_pressed_reload_activate(void);
|
||||
Gfx* write_stan_tiles_in_yellow(Gfx *arg0);
|
||||
Gfx * maybe_mp_interface(Gfx *arg0);
|
||||
Gfx * bondviewRemoved7F08BCB8(Gfx *arg0);
|
||||
s32 sub_GAME_7F078A58(coord3d *vec_scale, f32 norm_scale);
|
||||
s32 camIsPosInScreen(coord3d *vec_scale, f32 norm_scale);
|
||||
s32 getMissiontimer(void);
|
||||
void solo_char_load(void);
|
||||
void bondviewUpdateYAutoAimTime(struct PropRecord *autoaim_target, f32 auto_aim_y);
|
||||
@@ -3099,7 +2733,7 @@ void bondviewSetVisibleToGuardsFlag(s32 param_1);
|
||||
Mtxf *currentPlayerGetMatrix10EC(void);
|
||||
f32 get_curplay_horizontal_rotation_in_degrees(void);
|
||||
Mtxf *camGetWorldToScreenMtxf(void);
|
||||
void sub_GAME_7F077EEC(struct coord2d *in, coord3d *out, f32 value);
|
||||
void transformAndNormalizeByLength2Dto3D(struct coord2d *in, coord3d *out, f32 value);
|
||||
s32 camIsPosInScreenBox(coord3d *, f32, struct bbox2d *);
|
||||
|
||||
void bondviewTransformManyPosToViewMatrix(RenderPosView *arg0, s32 arg1);
|
||||
@@ -3112,7 +2746,7 @@ f32 bondviewGetBondBreathing(void);
|
||||
void bondviewClearUpperTextDisplayFlag(int param_1);
|
||||
|
||||
void bondviewSetUpperTextDisplayFlag(PLAYERFLAG flag);
|
||||
void set_camera_mode(s32 arg0);
|
||||
void bondviewSetCameraMode(s32 arg0);
|
||||
bool isBondInTank(void);
|
||||
void hudmsgTopShow(char* string);
|
||||
void SurroundWithExplosions(int delay);
|
||||
@@ -3127,6 +2761,7 @@ void bondviewResetUpperTextDisplay(void);
|
||||
Mtxf *currentPlayerGetProjectionMatrixF(void);
|
||||
int redirect_get_BONDdata_autoaim_x(void);
|
||||
int redirect_get_BONDdata_autoaim_y(void);
|
||||
void sub_GAME_7F077FF4(coord3d *in, coord3d *out);
|
||||
void transform3Dto2DCoords(coord3d *in, coord2d *out);
|
||||
void maybe_solo_intro_camera_handler(void);
|
||||
|
||||
#endif
|
||||
|
||||
+32
-29
@@ -20,7 +20,7 @@
|
||||
/**
|
||||
* Address 0x8002A780.
|
||||
*/
|
||||
struct coord3d D_8002A780 = { 0 };
|
||||
struct coord3d default_start_position = { 0 };
|
||||
|
||||
u32 weaponLoadProjectileModels(ITEM_IDS modelid)
|
||||
{
|
||||
@@ -107,28 +107,28 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
// done with declarations
|
||||
|
||||
start_pos = D_8002A780;
|
||||
start_pos = default_start_position;
|
||||
|
||||
intro_record = (struct SetupIntroEmpty *)g_CurrentSetup.intro;
|
||||
g_isBondKIA = 0;
|
||||
g_bondviewForceDisarm = 0;
|
||||
resolution = 0;
|
||||
camera_8003642C = 0;
|
||||
camera_80036430 = 0;
|
||||
cameraBufferToggle = 0;
|
||||
cameraFrameCounter1 = 0;
|
||||
set_starting_weapon = 0;
|
||||
camera_80036434 = 0;
|
||||
cameraFrameCounter2 = 0;
|
||||
start_look_angle = FLOAT_INIT;
|
||||
|
||||
if (bossGetStageNum() == LEVELID_CUBA)
|
||||
{
|
||||
resolution = (s32)mempAllocBytesInBank(0x46EA0, 4);
|
||||
resolution = (s32)mempAllocBytesInBank(0x46EA0, MEMPOOL_STAGE);
|
||||
resolution = (resolution + 0x3f) & ~0x3F;
|
||||
camera_80036430 = 1;
|
||||
cameraFrameCounter1 = 1;
|
||||
}
|
||||
|
||||
camera_80036438 = 0;
|
||||
D_8003643C = 0;
|
||||
D_80036440 = NULL;
|
||||
credits_state = 0;
|
||||
credits_pointer = NULL;
|
||||
g_ForceBondMoveOffset.f[0] = FLOAT_INIT;
|
||||
g_ForceBondMoveOffset.f[1] = FLOAT_INIT;
|
||||
g_ForceBondMoveOffset.f[2] = FLOAT_INIT;
|
||||
@@ -142,24 +142,24 @@ void bondviewLoadSetupIntroSection(void)
|
||||
g_TankSfxState[1] = NULL;
|
||||
g_TankTurnSpeed = FLOAT_INIT;
|
||||
g_TankOrientationAngle = FLOAT_INIT;
|
||||
D_80036468 = FLOAT_INIT;
|
||||
tank_turret_unused_angle = FLOAT_INIT;
|
||||
g_TankTurretVerticalAngle = FLOAT_INIT;
|
||||
g_TankTurretVerticalAngleRelated = FLOAT_INIT;
|
||||
g_TankTurretOrientationAngleRad = FLOAT_INIT;
|
||||
D_80036478 = FLOAT_INIT;
|
||||
D_8003647C = FLOAT_INIT;
|
||||
g_TankTurretOrientationAngleDeg = FLOAT_INIT;
|
||||
tank_turret_turn_speed = FLOAT_INIT;
|
||||
g_BondCanEnterTank = 0;
|
||||
g_TankTurretAngle = FLOAT_INIT;
|
||||
g_TankTurretTurn = FLOAT_INIT;
|
||||
g_ExplodeTankOnDeathFlag = 0;
|
||||
D_800364B0 = 1;
|
||||
is_timer_active = 1;
|
||||
g_PlayerInvincible = 0;
|
||||
g_CameraMode = 0;
|
||||
g_CameraAfterCinema = 0;
|
||||
D_8003649C = 0;
|
||||
camera_fade_active = 0;
|
||||
stop_time_flag = 0;
|
||||
D_800364A4 = FLOAT_INIT;
|
||||
D_800364A8 = 1;
|
||||
camera_transition_timer = FLOAT_INIT;
|
||||
intro_camera_index = CAMERAMODE_INTRO;
|
||||
g_IntroSwirl = NULL;
|
||||
ptr_random06cam_entry = NULL;
|
||||
g_CurrentSetupIntroCamera = NULL;
|
||||
@@ -168,8 +168,8 @@ void bondviewLoadSetupIntroSection(void)
|
||||
watch_time_0 = 0;
|
||||
g_IntroAnimationIndex = 0;
|
||||
watch_transition_time = 0.9090909f;
|
||||
starting_left_weapon = ITEM_UNARMED;
|
||||
starting_right_weapon = ITEM_UNARMED;
|
||||
starting_weapon[GUNLEFT] = ITEM_UNARMED;
|
||||
starting_weapon[GUNRIGHT] = ITEM_UNARMED;
|
||||
|
||||
if (intro_record != NULL)
|
||||
{
|
||||
@@ -210,7 +210,7 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
if (set_starting_weapon == 0)
|
||||
{
|
||||
starting_right_weapon = intro_item->item_right;
|
||||
starting_weapon[GUNRIGHT] = intro_item->item_right;
|
||||
|
||||
if(intro_item->item_left);
|
||||
|
||||
@@ -218,7 +218,7 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
if (intro_item->item_left >= 0)
|
||||
{
|
||||
starting_left_weapon = intro_item->item_left;
|
||||
starting_weapon[GUNLEFT] = intro_item->item_left;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,7 +327,7 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
// hack: bad address math
|
||||
credits = (CreditsEntry*)((s32)g_ptrStageSetupFile + (s32)intro_credits->unk04);
|
||||
D_80036440 = credits;
|
||||
credits_pointer = credits;
|
||||
|
||||
// what is the point of this?
|
||||
while (credits->TextId1 != 0 || credits->TextId2 != 0)
|
||||
@@ -341,6 +341,9 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
default:
|
||||
{
|
||||
#ifdef DEBUG
|
||||
ossyncprintf("unknown bondstart type %d!\n",intro_record->type);
|
||||
#endif
|
||||
intro_record = (struct SetupIntroEmpty*)((s32)intro_record + sizeof(struct SetupIntroEmpty));
|
||||
}
|
||||
break;
|
||||
@@ -364,7 +367,7 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
if (set_starting_weapon == 0)
|
||||
{
|
||||
starting_right_weapon = ITEM_FIST;
|
||||
starting_weapon[GUNRIGHT] = ITEM_FIST;
|
||||
}
|
||||
|
||||
g_CurrentPlayer->field_78 = FLOAT_INIT;
|
||||
@@ -427,7 +430,7 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
bondviewResetIntroCameraMessageDialogs();
|
||||
bondviewResetUpperTextDisplay();
|
||||
g_CurrentPlayer->prop = propAllocate();
|
||||
g_CurrentPlayer->prop = chrpropAllocate();
|
||||
g_CurrentPlayer->prop->obj = NULL;
|
||||
g_CurrentPlayer->prop->type = PROP_TYPE_VIEWER;
|
||||
|
||||
@@ -450,11 +453,11 @@ void bondviewLoadSetupIntroSection(void)
|
||||
|
||||
if (getPlayerCount() == 1)
|
||||
{
|
||||
set_camera_mode(CAMERAMODE_INTRO);
|
||||
bondviewSetCameraMode(CAMERAMODE_INTRO);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_camera_mode(CAMERAMODE_MP);
|
||||
bondviewSetCameraMode(CAMERAMODE_MP);
|
||||
}
|
||||
|
||||
g_bondviewBondDeathAnimationsCount = 0;
|
||||
@@ -463,8 +466,8 @@ void bondviewLoadSetupIntroSection(void)
|
||||
g_bondviewBondDeathAnimationsCount++;
|
||||
}
|
||||
|
||||
g_CurrentPlayer->startnewbonddie = 1;
|
||||
g_CurrentPlayer->redbloodfinished = 0;
|
||||
g_CurrentPlayer->deathanimfinished = 0;
|
||||
D_80036510 = CAMERAMODE_NONE;
|
||||
g_CurrentPlayer->startnewbonddie = TRUE;
|
||||
g_CurrentPlayer->redbloodfinished = FALSE;
|
||||
g_CurrentPlayer->deathanimfinished = FALSE;
|
||||
camera_mode = CAMERAMODE_NONE;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
#define _BONDVIEW_R_H_
|
||||
|
||||
#include <ultra64.h>
|
||||
#include <bondconstants.h>
|
||||
|
||||
void bondviewLoadSetupIntroSection(void);
|
||||
u32 weaponLoadProjectileModels(ITEM_IDS modelid);
|
||||
|
||||
#endif
|
||||
|
||||
+69
-27
@@ -1,9 +1,21 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
|
||||
void sub_GAME_7F06ABB0(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 width, s32 height, s32 arg5, s32 arg6, s32 arg7)
|
||||
/**
|
||||
* Draws a textured rectangle on the screen.
|
||||
*
|
||||
* @param gdlptr Pointer to the display list.
|
||||
* @param position Position coordinates (center) of the rectangle.
|
||||
* @param size Size (half-width and half-height) of the rectangle.
|
||||
* @param width Texture width.
|
||||
* @param height Texture height.
|
||||
* @param flipXY Flip X and Y flag.
|
||||
* @param flipX Flip X-axis flag.
|
||||
* @param flipY Flip Y-axis flag.
|
||||
*/
|
||||
void draw_textured_rectangle(Gfx **gdlptr, f32 *position, f32 *size, s32 width, s32 height, s32 flipXY, s32 flipX, s32 flipY)
|
||||
{
|
||||
if (arg2[0] > 0.0f && arg2[1] > 0.0f)
|
||||
// Only proceed if the size values are positive
|
||||
if (size[0] > 0.0f && size[1] > 0.0f)
|
||||
{
|
||||
Gfx *gdl = *gdlptr;
|
||||
s32 xl;
|
||||
@@ -15,18 +27,22 @@ void sub_GAME_7F06ABB0(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 width, s32 height
|
||||
s32 dsdx;
|
||||
s32 dtdy;
|
||||
|
||||
// Disable texture perspective correction
|
||||
gDPSetTexturePersp(gdl++, G_TP_NONE);
|
||||
|
||||
xl = (arg1[0] - arg2[0]) * 4.0f;
|
||||
yl = (arg1[1] - arg2[1]) * 4.0f;
|
||||
xh = (arg1[0] + arg2[0]) * 4.0f;
|
||||
yh = (arg1[1] + arg2[1]) * 4.0f;
|
||||
// Compute rectangle coordinates
|
||||
xl = (position[0] - size[0]) * 4.0f;
|
||||
yl = (position[1] - size[1]) * 4.0f;
|
||||
xh = (position[0] + size[0]) * 4.0f;
|
||||
yh = (position[1] + size[1]) * 4.0f;
|
||||
|
||||
// Proceed if the rectangle is within screen bounds
|
||||
if (xh >= 0 && yh >= 0)
|
||||
{
|
||||
// Handle X coordinate adjustment
|
||||
if (xl < 0)
|
||||
{
|
||||
if (arg5)
|
||||
if (flipXY)
|
||||
{
|
||||
t += ((-xl * height) << 5) / (xh - xl);
|
||||
}
|
||||
@@ -38,9 +54,10 @@ void sub_GAME_7F06ABB0(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 width, s32 height
|
||||
xl = 0;
|
||||
}
|
||||
|
||||
// Handle Y coordinate adjustment
|
||||
if (yl < 0)
|
||||
{
|
||||
if (arg5)
|
||||
if (flipXY)
|
||||
{
|
||||
s += ((-yl * width) << 5) / (yh - yl);
|
||||
}
|
||||
@@ -52,30 +69,34 @@ void sub_GAME_7F06ABB0(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 width, s32 height
|
||||
yl = 0;
|
||||
}
|
||||
|
||||
if (arg5)
|
||||
// Calculate texture scaling based on flipXY flag
|
||||
if (flipXY)
|
||||
{
|
||||
dsdx = width / (2.0f * arg2[1]) * 1024.0f;
|
||||
dtdy = height / (2.0f * arg2[0]) * 1024.0f;
|
||||
dsdx = width / (2.0f * size[1]) * 1024.0f;
|
||||
dtdy = height / (2.0f * size[0]) * 1024.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
dsdx = width / (2.0f * arg2[0]) * 1024.0f;
|
||||
dtdy = height / (2.0f * arg2[1]) * 1024.0f;
|
||||
dsdx = width / (2.0f * size[0]) * 1024.0f;
|
||||
dtdy = height / (2.0f * size[1]) * 1024.0f;
|
||||
}
|
||||
|
||||
if (arg6)
|
||||
|
||||
// Flip texture horizontally if needed
|
||||
if (flipX)
|
||||
{
|
||||
dsdx = 0x10000 - dsdx;
|
||||
s = ((width - 1) << 5) - s;
|
||||
}
|
||||
|
||||
if (arg7)
|
||||
// Flip texture vertically if needed
|
||||
if (flipY)
|
||||
{
|
||||
dtdy = 0x10000 - dtdy;
|
||||
t = ((height - 1) << 5) - t;
|
||||
}
|
||||
|
||||
if (arg5)
|
||||
// Draw the textured rectangle with optional flipping
|
||||
if (flipXY)
|
||||
{
|
||||
gSPTextureRectangleFlip(gdl++, xl, yl, xh, yh, G_TX_RENDERTILE, s, t, dsdx, dtdy);
|
||||
}
|
||||
@@ -85,36 +106,57 @@ void sub_GAME_7F06ABB0(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 width, s32 height
|
||||
}
|
||||
}
|
||||
|
||||
// Re-enable texture perspective correction
|
||||
gDPSetTexturePersp(gdl++, G_TP_PERSP);
|
||||
|
||||
*gdlptr = gdl;
|
||||
}
|
||||
}
|
||||
|
||||
#define G_CC_MODULATEIA_ENV COMBINED, 0, ENVIRONMENT, 0, COMBINED, 0, ENVIRONMENT, 0
|
||||
|
||||
void display_image_at_on_screen_coord(Gfx **gdlptr, f32 *arg1, f32 *arg2, s32 twidth, u32 theight, u32 arg5, u32 arg6, u32 arg7, u32 r, u32 g, u32 b, u32 alpha, u32 arg12, u32 arg13)
|
||||
/**
|
||||
* Displays an image at a specific on-screen position with color tinting and optional texture flips.
|
||||
*
|
||||
* @param gdl Pointer to the display list.
|
||||
* @param position Position of the image.
|
||||
* @param size Size (half-width and half-height) of the image.
|
||||
* @param twidth Texture width.
|
||||
* @param theight Texture height.
|
||||
* @param flipXY Flip X and Y flag.
|
||||
* @param flipX Flip X-axis flag.
|
||||
* @param flipY Flip Y-axis flag.
|
||||
* @param r Red tint value.
|
||||
* @param g Green tint value.
|
||||
* @param b Blue tint value.
|
||||
* @param alpha Alpha (transparency) value.
|
||||
* @param mipmapped_texture Mipmapped rendering mode flag.
|
||||
* @param highlight_mode Highlight rendering mode flag.
|
||||
*/
|
||||
void display_image_at_position(Gfx **gdlptr, f32 *position, f32 *size, s32 twidth, u32 theight, u32 flipXY, u32 flipX, u32 flipY, u32 r, u32 g, u32 b, u32 alpha, u32 mipmapped_texture, u32 highlight_mode)
|
||||
{
|
||||
if (arg2[0] > 0.0f && arg2[1] > 0.0f)
|
||||
|
||||
if (size[0] > 0.0f && size[1] > 0.0f)
|
||||
{
|
||||
Gfx *gdl = *gdlptr;
|
||||
|
||||
gDPSetEnvColor(gdl++, r, g, b, alpha);
|
||||
|
||||
if (arg12)
|
||||
if (mipmapped_texture)
|
||||
{
|
||||
gDPSetCombineLERP(gdl++, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, TEXEL1, TEXEL0, LOD_FRACTION, TEXEL0, COMBINED, 0, ENVIRONMENT, 0, COMBINED, 0, ENVIRONMENT, 0);
|
||||
gDPSetCombineMode(gdl++, G_CC_TRILERP, G_CC_MODULATEIA_ENV);
|
||||
}
|
||||
else if (arg13)
|
||||
{
|
||||
gDPSetCombineLERP(gdl++, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0, 0, 0, 0, COMBINED, 0, 0, 0, COMBINED);
|
||||
else if (highlight_mode)
|
||||
{
|
||||
gDPSetCombineMode(gdl++, G_CC_FADEA, G_CC_PASS2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gDPSetCombineLERP(gdl++, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0, TEXEL0, 0, ENVIRONMENT, 0);
|
||||
gDPSetCombineMode(gdl++, G_CC_FADEA, G_CC_FADEA);
|
||||
}
|
||||
|
||||
*gdlptr = gdl;
|
||||
|
||||
sub_GAME_7F06ABB0(gdlptr, arg1, arg2, twidth, theight, arg5, arg6, arg7);
|
||||
draw_textured_rectangle(gdlptr, position, size, twidth, theight, flipXY, flipX, flipY);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "bondview.h"
|
||||
|
||||
void display_image_at_on_screen_coord(Gfx **DL, f32 *xypos, f32 *halfedxy, s32 width, s32 height, s32 rotateleft90, s32 fliph, s32 flipv, s32 red, s32 green, s32 blue, s32 alpha, s32 format, s32 param_14);
|
||||
void display_image_at_position(Gfx **DL, f32 *xypos, f32 *halfedxy, s32 width, s32 height, s32 rotateleft90, s32 fliph, s32 flipv, s32 red, s32 green, s32 blue, s32 alpha, s32 format, s32 param_14);
|
||||
|
||||
#endif
|
||||
|
||||
+117
-117
@@ -22,10 +22,6 @@
|
||||
//#include "chraicommands.h" /* needed for ai list commands, remove when moving global ai lists to chraicommands/chrai */
|
||||
// bss
|
||||
|
||||
// This shows up a lot but not quite sure what it represents.
|
||||
#define CHEAT_20 20
|
||||
|
||||
|
||||
|
||||
u8 g_CheatPlayerTextRelated[CHEAT_INVALID + 1];
|
||||
|
||||
@@ -33,7 +29,7 @@ u8 g_CheatPlayerTextRelated[CHEAT_INVALID + 1];
|
||||
|
||||
//D:8003F430
|
||||
u16 mBtnCheatExtraMPChars[] = {
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | L_JPAD,
|
||||
L_TRIG | R_JPAD,
|
||||
@@ -56,7 +52,7 @@ u16 mBtnCheatInvincibility[] = {
|
||||
L_TRIG | R_JPAD,
|
||||
R_TRIG | D_JPAD,
|
||||
L_TRIG | L_JPAD,
|
||||
L_TRIG | R_TRIG | R_CBUTTONS
|
||||
L_TRIG | R_TRIG | R_CBUTTONS
|
||||
};
|
||||
|
||||
//D:8003F458
|
||||
@@ -70,7 +66,7 @@ u16 mBtnCheatAllGuns[] = {
|
||||
R_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | R_CBUTTONS ,
|
||||
R_TRIG | U_JPAD,
|
||||
L_TRIG | L_CBUTTONS
|
||||
L_TRIG | L_CBUTTONS
|
||||
|
||||
};
|
||||
//D:8003F46C
|
||||
@@ -112,7 +108,7 @@ u16 mBtnCheatDeactivateInvincibilityMulti[] = {
|
||||
L_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | R_CBUTTONS ,
|
||||
L_TRIG | D_JPAD,
|
||||
L_TRIG | U_CBUTTONS
|
||||
L_TRIG | U_CBUTTONS
|
||||
};
|
||||
//D:8003F4A8
|
||||
u16 mBtnCheatLineMode[] = {
|
||||
@@ -125,7 +121,7 @@ u16 mBtnCheatLineMode[] = {
|
||||
L_TRIG | D_JPAD,
|
||||
L_TRIG | R_JPAD,
|
||||
R_TRIG | L_CBUTTONS ,
|
||||
R_TRIG | U_CBUTTONS
|
||||
R_TRIG | U_CBUTTONS
|
||||
|
||||
};
|
||||
//D:8003F4BC
|
||||
@@ -142,7 +138,7 @@ u16 mBtnCheatInvisibility[] = {
|
||||
R_TRIG | R_JPAD
|
||||
};
|
||||
//D:8003F4D0
|
||||
u16 mBtnCheatInvisibilityMulti[] = {
|
||||
u16 mBtnCheatBondPhase[] = {
|
||||
L_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
R_TRIG | U_JPAD,
|
||||
@@ -152,7 +148,7 @@ u16 mBtnCheatInvisibilityMulti[] = {
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | R_CBUTTONS ,
|
||||
L_TRIG | U_JPAD,
|
||||
L_TRIG | R_TRIG | D_CBUTTONS
|
||||
L_TRIG | R_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F4E4
|
||||
u16 mBtnCheatDam[] = {
|
||||
@@ -165,7 +161,7 @@ u16 mBtnCheatDam[] = {
|
||||
R_TRIG | R_CBUTTONS ,
|
||||
L_TRIG | R_JPAD,
|
||||
L_TRIG | R_TRIG | R_JPAD,
|
||||
R_TRIG | D_CBUTTONS
|
||||
R_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F4F8
|
||||
u16 mBtnCheatFacility[] = {
|
||||
@@ -191,7 +187,7 @@ u16 mBtnCheatRunway[] = {
|
||||
R_TRIG | R_CBUTTONS ,
|
||||
R_TRIG | R_JPAD,
|
||||
L_TRIG | D_JPAD,
|
||||
R_TRIG | L_CBUTTONS
|
||||
R_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F520
|
||||
u16 mBtnCheatSurface[] = {
|
||||
@@ -230,7 +226,7 @@ u16 mBtnCheatSilo[] = {
|
||||
L_TRIG | U_CBUTTONS ,
|
||||
R_TRIG | R_JPAD,
|
||||
R_TRIG | R_JPAD,
|
||||
R_TRIG | R_CBUTTONS
|
||||
R_TRIG | R_CBUTTONS
|
||||
};
|
||||
//D:8003F55C
|
||||
u16 mBtnCheatFrigate[] = {
|
||||
@@ -256,7 +252,7 @@ u16 mBtnCheatSurface2[] = {
|
||||
L_TRIG | R_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | D_JPAD,
|
||||
L_TRIG | R_CBUTTONS
|
||||
L_TRIG | R_CBUTTONS
|
||||
};
|
||||
//D:8003F584
|
||||
u16 mBtnCheatBunker2[] = {
|
||||
@@ -269,7 +265,7 @@ u16 mBtnCheatBunker2[] = {
|
||||
R_TRIG | R_JPAD,
|
||||
L_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | L_JPAD,
|
||||
L_TRIG | D_CBUTTONS
|
||||
L_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F598
|
||||
u16 mBtnCheatStatue[] = {
|
||||
@@ -295,7 +291,7 @@ u16 mBtnCheatArchives[] = {
|
||||
L_TRIG | R_TRIG | R_JPAD,
|
||||
L_TRIG | R_TRIG | D_CBUTTONS ,
|
||||
L_TRIG | U_JPAD,
|
||||
R_TRIG | D_CBUTTONS
|
||||
R_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F5C0
|
||||
u16 mBtnCheatStreets[] = {
|
||||
@@ -334,7 +330,7 @@ u16 mBtnCheatTrain[] = {
|
||||
L_TRIG | L_JPAD,
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | U_JPAD,
|
||||
L_TRIG | U_CBUTTONS
|
||||
L_TRIG | U_CBUTTONS
|
||||
};
|
||||
//D:8003F5FC
|
||||
u16 mBtnCheatJungle[] = {
|
||||
@@ -360,7 +356,7 @@ u16 mBtnCheatControl[] = {
|
||||
R_TRIG | L_JPAD,
|
||||
R_TRIG | U_CBUTTONS ,
|
||||
R_TRIG | L_JPAD,
|
||||
L_TRIG | R_TRIG | U_CBUTTONS
|
||||
L_TRIG | R_TRIG | U_CBUTTONS
|
||||
};
|
||||
//D:8003F624
|
||||
u16 mBtnCheatCaverns[] = {
|
||||
@@ -373,7 +369,7 @@ u16 mBtnCheatCaverns[] = {
|
||||
R_TRIG | U_JPAD,
|
||||
L_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | U_JPAD,
|
||||
R_TRIG | L_CBUTTONS
|
||||
R_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F638
|
||||
u16 mBtnCheatCradle[] = {
|
||||
@@ -399,7 +395,7 @@ u16 mBtnCheatAztek[] = {
|
||||
L_TRIG | L_JPAD,
|
||||
L_TRIG | R_TRIG | U_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | R_JPAD,
|
||||
L_TRIG | L_CBUTTONS
|
||||
L_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F660
|
||||
u16 mBtnCheatEgypt[] = {
|
||||
@@ -429,7 +425,7 @@ u16 mBtnCheatPaintballMod[] = {
|
||||
L_TRIG | D_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | D_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | U_JPAD,
|
||||
L_TRIG | D_CBUTTONS
|
||||
L_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F690
|
||||
u16 mBtnCheatInvincible2[] = {
|
||||
@@ -442,7 +438,7 @@ u16 mBtnCheatInvincible2[] = {
|
||||
L_TRIG | L_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | L_JPAD,
|
||||
L_TRIG | R_TRIG | R_JPAD,
|
||||
L_TRIG | L_CBUTTONS
|
||||
L_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F6A4
|
||||
u16 mBtnCheatDKMode[] = {
|
||||
@@ -455,7 +451,7 @@ u16 mBtnCheatDKMode[] = {
|
||||
U_JPAD,
|
||||
L_TRIG | R_TRIG | D_CBUTTONS ,
|
||||
L_TRIG | R_TRIG | D_JPAD,
|
||||
L_TRIG | R_TRIG | L_CBUTTONS
|
||||
L_TRIG | R_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F6B8
|
||||
u16 mBtnCheat2xGL[] = {
|
||||
@@ -468,7 +464,7 @@ u16 mBtnCheat2xGL[] = {
|
||||
L_JPAD,
|
||||
D_JPAD,
|
||||
U_JPAD,
|
||||
R_TRIG | D_CBUTTONS
|
||||
R_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F6CC
|
||||
u16 mBtnCheat2xRL[] = {
|
||||
@@ -481,7 +477,7 @@ u16 mBtnCheat2xRL[] = {
|
||||
L_TRIG | L_CBUTTONS ,
|
||||
R_TRIG | U_JPAD,
|
||||
R_TRIG | D_JPAD,
|
||||
R_TRIG | L_CBUTTONS
|
||||
R_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F6E0
|
||||
u16 mBtnCheatTurboMode[] = {
|
||||
@@ -533,7 +529,7 @@ u16 mBtnCheat2xTKnives[] = {
|
||||
L_TRIG | R_TRIG | L_CBUTTONS ,
|
||||
R_TRIG | D_JPAD,
|
||||
R_TRIG | L_JPAD,
|
||||
R_TRIG | L_CBUTTONS
|
||||
R_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F730
|
||||
u16 mBtnCheatFastAnimation[] = {
|
||||
@@ -611,7 +607,7 @@ u16 mBtnCheat2xHKnives[] = {
|
||||
L_TRIG | D_JPAD,
|
||||
R_TRIG | L_JPAD,
|
||||
L_TRIG | R_JPAD,
|
||||
L_TRIG | L_CBUTTONS
|
||||
L_TRIG | L_CBUTTONS
|
||||
};
|
||||
//D:8003F7A8
|
||||
u16 mBtnCheatInfinitAmmo[] = {
|
||||
@@ -650,7 +646,7 @@ u16 mBtnCheatGoldPPK[] = {
|
||||
L_TRIG | R_TRIG | R_JPAD,
|
||||
L_TRIG | L_JPAD,
|
||||
D_JPAD,
|
||||
L_TRIG | D_CBUTTONS
|
||||
L_TRIG | D_CBUTTONS
|
||||
};
|
||||
//D:8003F7E4
|
||||
u16 mBtnCheat2xLaser[] = {
|
||||
@@ -684,40 +680,40 @@ u16 mBtnCheatUnlockAllGuns[] = {
|
||||
* Address 0x8003F80C.
|
||||
*/
|
||||
CheatInfo g_CheatInfo[] = {
|
||||
{ CHEAT_EXTRA_MP_CHARS, 0xA, 0, 0, mBtnCheatExtraMPChars, 0, 0, /* 0x31 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_MENUS},
|
||||
{ CHEAT_INVINCIBILITY, 0xA, 0, 0, mBtnCheatInvincibility, TEXT(LMISC, MISC_STR_00), 0, /* 0x06 */ CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ALLGUNS, 0xA, 0, 0, mBtnCheatAllGuns, TEXT(LMISC, MISC_STR_01), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_MAXAMMO, 0xA, 0, 0, mBtnCheatMaxAmmo, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DEBUG_RETURN_SAVED_RA, 0xA, 0, 0, mBtnCheatInvalid, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{CHEAT_DEACTIVATE_INVINCIBILITY, 0xA, 0, 0, mBtnCheatDeactivateInvincibilityMulti, 0, 0, /* 0x34 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_LINEMODE, 0xA, 0, 0, mBtnCheatLineMode, TEXT(LMISC, MISC_STR_37), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_HEALTH, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_ARMOR, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INVISIBILITY, 0xA, 0, 0, mBtnCheatInvisibility, TEXT(LMISC, MISC_STR_04), 0, /* 0x62 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INFINITE_AMMO, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_06), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DK_MODE, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_07), 0, /* 0x26 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_EXTRA_WEAPONS, 0, 0, 0, 0, 0, 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_TINY_BOND, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_08), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_PAINTBALL, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_38), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_10X_HEALTH, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_MAGNUM, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_0A), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_LASER, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_0B), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLDEN_GUN, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_0C), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SILVER_PP7, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_0D), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLD_PP7, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_0E), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INVISIBILITY_MP, 0xA, 0, 0, mBtnCheatInvisibilityMulti, 0, 0, /* 0x12 */ CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_NO_RADAR_MP, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_43), 0, /* 0x64 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_TURBO_MODE, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_40), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DEBUG_POS, 0, 0, 0, 0, 0, 0, /* 0x20 */ CHEAT_MASK_GLOBAL},
|
||||
{ CHEAT_FAST_ANIMATION, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_41), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SLOW_ANIMATION, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_42), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ENEMY_ROCKETS, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_39), 0, /* 0x01 */ CHEAT_MASK_MENUS},
|
||||
{ CHEAT_2X_ROCKET_LAUNCHER, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3A), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_GRENADE_LAUNCHER, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3B), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_RCP90, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3C), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_THROWING_KNIFE, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3D), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_HUNTING_KNIFE, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3E), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_LASER, 0, 0, 0, 0, TEXT(LMISC, MISC_STR_3F), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_EXTRA_MP_CHARS, 0xA, 0, 0, mBtnCheatExtraMPChars, 0, 0, /* 0x31 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_MENUS},
|
||||
{ CHEAT_INVINCIBILITY, 0xA, 0, 0, mBtnCheatInvincibility, getStringID(LMISC, MISC_STR_00_INVINCIBLE ), 0, /* 0x06 */ CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ALLGUNS, 0xA, 0, 0, mBtnCheatAllGuns, getStringID(LMISC, MISC_STR_01_ALLGUNS ), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_MAXAMMO, 0xA, 0, 0, mBtnCheatMaxAmmo, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DEBUG_UNK5, 0xA, 0, 0, mBtnCheatInvalid, /*getStringID(LMISC, MISC_STR_UNK5 )*/0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{CHEAT_DEACTIVATE_INVINCIBILITY, 0xA, 0, 0, mBtnCheatDeactivateInvincibilityMulti, 0, 0, /* 0x34 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_LINEMODE, 0xA, 0, 0, mBtnCheatLineMode, getStringID(LMISC, MISC_STR_37_LINEMODE ), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_HEALTH, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_ARMOR, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INVISIBILITY, 0xA, 0, 0, mBtnCheatInvisibility, getStringID(LMISC, MISC_STR_04_BONDINVISIBLE ), 0, /* 0x62 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INFINITE_AMMO, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_06_INFINITAMMO ), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DK_MODE, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_07_DKMODE ), 0, /* 0x26 */ CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_EXTRA_WEAPONS, 0, 0, 0, 0, 0, 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_TINY_BOND, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_08_TINYBOND ), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_PAINTBALL, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_38_PAINTBALLMODE ), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_10X_HEALTH, 0, 0, 0, 0, 0, 0, /* 0x16 */ CHEAT_MASK_16 | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_MAGNUM, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_0A_MAGNUM ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_LASER, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_0B_LASER ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLDEN_GUN, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_0C_GOLDENGUN ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SILVER_PP7, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_0D_SILVERPPK ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLD_PP7, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_0E_GOLDPPK ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_BONDPHASE, 0xA, 0, 0, mBtnCheatBondPhase, 0, 0, /* 0x12 */ CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_NO_RADAR_MP, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_43_NORADAR ), 0, /* 0x64 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_TURBO_MODE, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_40_TURBOMODE ), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DEBUG_POS, 0, 0, 0, 0, 0, 0, /* 0x20 */ CHEAT_MASK_GLOBAL},
|
||||
{ CHEAT_FAST_ANIMATION, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_41_FASTANIMATION ), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SLOW_ANIMATION, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_42_SLOWANIMATION ), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ENEMY_ROCKETS, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_39_ENEMYROCKETS ), 0, /* 0x01 */ CHEAT_MASK_MENUS},
|
||||
{ CHEAT_2X_ROCKET_LAUNCHER, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3A_2XROCKETLAUNCHER ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_GRENADE_LAUNCHER, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3B_2XGRENADELAUNCHER), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_RCP90, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3C_2XFNP90 ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_THROWING_KNIFE, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3D_2XTHROWINGKNIFE ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_HUNTING_KNIFE, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3E_2XHUNTINGKNIFE ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_LASER, 0, 0, 0, 0, getStringID(LMISC, MISC_STR_3F_2XLASER ), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
|
||||
{ CHEAT_UNLOCK_PAINTBALL, 0xA, 0, 0, mBtnCheatPaintballMod, 0, 0, /* 0x11 */ CHEAT_MASK_16 | CHEAT_MASK_MENUS}, //at cheat menu
|
||||
{ CHEAT_UNLOCK_INVINCIBLE, 0xA, 0, 0, mBtnCheatInvincible2, 0, 0, /* 0x11 */ CHEAT_MASK_16 | CHEAT_MASK_MENUS}, //at cheat menu
|
||||
@@ -814,7 +810,7 @@ void cheatButtonActivateRelated(void)
|
||||
s32 id_index;
|
||||
s32 find_index;
|
||||
bool isDone = FALSE;
|
||||
|
||||
|
||||
if (lvlGetCurrentStageToLoad() == LEVELID_TITLE)
|
||||
{
|
||||
bitmask = CHEAT_MASK_MENUS;
|
||||
@@ -878,10 +874,10 @@ void cheat_buttons_mp_related(void)
|
||||
jgb_trig = (jgb & (L_TRIG | R_TRIG));
|
||||
jgb &= ~(jgb_trig);
|
||||
jgbptf &= ~(jgb_trig);
|
||||
|
||||
|
||||
|
||||
|
||||
if (jgbptf != 0)
|
||||
{
|
||||
{
|
||||
if ((cheatButtonCountBitsSet(jgbptf) == 1) && ((cheatButtonCountBitsSet(jgb) == 1)))
|
||||
{
|
||||
g_CurrentPlayer->cheat_display_text_related[g_CurrentPlayer->something_with_cheat_text] = jgbptf | jgb_trig;
|
||||
@@ -891,13 +887,13 @@ void cheat_buttons_mp_related(void)
|
||||
{
|
||||
g_CurrentPlayer->can_display_cheat_text += 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
g_CurrentPlayer->can_display_cheat_text = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
cheatButtonActivateRelated();
|
||||
}
|
||||
|
||||
@@ -923,7 +919,7 @@ bool cheatIsEnemyRockets(CHEAT_ID id)
|
||||
|
||||
/**
|
||||
* true if param is MP cheat
|
||||
*
|
||||
*
|
||||
* Address 0x7F091A78.
|
||||
*/
|
||||
bool cheatCheckIfMPCheat(CHEAT_ID cheat_id)
|
||||
@@ -993,7 +989,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
s32 mask;
|
||||
s32 current_player_number;
|
||||
s32 player_count;
|
||||
|
||||
|
||||
mask = g_CheatInfo[cheat_id - 1].maskfield;
|
||||
current_player_number = get_cur_playernum();
|
||||
player_count = getPlayerCount();
|
||||
@@ -1019,7 +1015,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_INVINCIBILITY:
|
||||
if (!get_bondata_invincible_flag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x0F)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_0F_INVINCIBILITYON_LF)));
|
||||
set_bondata_invincible_flag(TRUE);
|
||||
return;
|
||||
}
|
||||
@@ -1028,14 +1024,14 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_ALLGUNS:
|
||||
if (!bondinvGetAllGunsFlag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x10)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_10_ALLGUNSON_LF)));
|
||||
bondinvSetAllGunsFlag(TRUE);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
case CHEAT_MAXAMMO:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x11)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_11_MAXIMUMAMMO_LF)));
|
||||
set_max_ammo_for_cur_player();
|
||||
return;
|
||||
|
||||
@@ -1079,7 +1075,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_2X_HEALTH:
|
||||
if ((g_CurrentPlayer->actual_health == 1.0f) || (g_CurrentPlayer->bondhealth < 1.0f))
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x12)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_12_SUPER2XHEALTH_LF)));
|
||||
g_CurrentPlayer->bondhealth = 1.0f;
|
||||
g_CurrentPlayer->actual_health = 2.0f;
|
||||
}
|
||||
@@ -1088,7 +1084,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_2X_ARMOR:
|
||||
if ((g_CurrentPlayer->actual_armor == 1.0f) || (g_CurrentPlayer->bondarmour < 1.0f))
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x13)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_13_SUPER2XARMOUR_LF)));
|
||||
#if defined(BUGFIX_R1)
|
||||
if(TRUE)
|
||||
{
|
||||
@@ -1103,21 +1099,21 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_INVISIBILITY:
|
||||
if (bondviewGetVisibleToGuardsFlag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x14)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_14_INVISIBILITYON_LF)));
|
||||
bondviewSetVisibleToGuardsFlag(FALSE);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
case CHEAT_INFINITE_AMMO:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x16)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_16_INFINITEAMMOON_LF)));
|
||||
/**
|
||||
* Note: the lvlRender in lvl.c checks if infinite ammo is on then calls set_max_ammo_for_cur_player
|
||||
*/
|
||||
return;
|
||||
|
||||
case CHEAT_DK_MODE:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x17)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_17_DKMODEON_LF)));
|
||||
cheatButtonSetDkMode(TRUE);
|
||||
return;
|
||||
|
||||
@@ -1138,7 +1134,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
|
||||
if (vvv > 0)
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x18)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_18_EXTRAWEAPONS_LF)));
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1147,7 +1143,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_TINY_BOND:
|
||||
if ((player_count == 1) && (g_playerPerm->player_perspective_height == 1.0f))
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x19)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_19_TINYBONDON_LF)));
|
||||
g_playerPerm->player_perspective_height = 0.5f;
|
||||
|
||||
if (g_CurrentPlayer->ptr_char_objectinstance != NULL)
|
||||
@@ -1159,13 +1155,13 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
return;
|
||||
|
||||
case CHEAT_PAINTBALL:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x1A)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1A_PAINTBALMODEON_LF)));
|
||||
return;
|
||||
|
||||
case CHEAT_10X_HEALTH:
|
||||
if ((g_CurrentPlayer->actual_health == 1.0f) || (g_CurrentPlayer->bondhealth < 1.0f))
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x1B)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1B_SUPER10XHEALTH_LF)));
|
||||
#if defined(BUGFIX_R1)
|
||||
if(TRUE)
|
||||
{
|
||||
@@ -1222,19 +1218,23 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
}
|
||||
return;
|
||||
|
||||
case CHEAT_INVISIBILITY_MP: /* unknown */
|
||||
case CHEAT_BONDPHASE:
|
||||
currentPlayerStartChrFade(300.0f, 0.05f);
|
||||
return;
|
||||
|
||||
case CHEAT_TURBO_MODE:
|
||||
if (!get_debug_fast_bond_flag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x1D)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1D_FASTMODEON_LF)));
|
||||
set_debug_fast_bond_flag(TRUE);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
/* easter egg leftover, original usage of string mentioned in an interview
|
||||
case CHEAT_NO_RADAR_MP:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1C_HAPPYNOWKARL_LF)));
|
||||
return;
|
||||
//*/
|
||||
case CHEAT_DEBUG_POS:
|
||||
if (!get_debug_testingmanpos_flag())
|
||||
{
|
||||
@@ -1246,7 +1246,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_FAST_ANIMATION:
|
||||
if (getAnimationRate() < 4.0f)
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x34)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_34_FASTMOTION_LF)));
|
||||
setAnimationRate(4.0f);
|
||||
return;
|
||||
}
|
||||
@@ -1255,7 +1255,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
case CHEAT_SLOW_ANIMATION:
|
||||
if (getAnimationRate() > 0.25f)
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x32)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_32_SLOWMOTION_LF)));
|
||||
setAnimationRate(0.25);
|
||||
return;
|
||||
}
|
||||
@@ -1364,13 +1364,13 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
s32 val = cheat_id - CHEAT_UNLOCK_PAINTBALL;
|
||||
if ((selected_folder_num >= 0) && (selected_folder_num < 4))
|
||||
{
|
||||
sub_GAME_7F01E760(selected_folder_num, val);
|
||||
fileSaveFolderUnlockCheat(selected_folder_num, val);
|
||||
sndPlaySfx(g_musicSfxBufferPtr, CAMERA_BEEP1_SFX, 0);
|
||||
return;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
case CHEAT_UNLOCK_DAM: /* fall through */
|
||||
case CHEAT_UNLOCK_FACILITY:
|
||||
case CHEAT_UNLOCK_RUNWAY:
|
||||
@@ -1398,7 +1398,7 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
if (selected_folder_num >= 0 && selected_folder_num < 4)
|
||||
{
|
||||
unlock_count = 0;
|
||||
stagenum = 0;
|
||||
stagenum = 0;
|
||||
for (; stagenum < max; stagenum++)
|
||||
{
|
||||
if (fileIsStageUnlockedAtDifficulty(selected_folder_num, stagenum, DIFFICULTY_AGENT) == 3)
|
||||
@@ -1414,10 +1414,10 @@ void cheatButtonHandleCheatsTurnedOn(CHEAT_ID cheat_id)
|
||||
}
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
return;
|
||||
|
||||
default:
|
||||
return;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1453,16 +1453,16 @@ void cheatButtonHandleCheatsTurnedOff(CHEAT_ID cheat_id)
|
||||
case CHEAT_INVINCIBILITY:
|
||||
if (get_bondata_invincible_flag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x1e)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1E_INVINCIBILITYOFF_LF)));
|
||||
set_bondata_invincible_flag(FALSE);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
case CHEAT_ALLGUNS:
|
||||
if (bondinvGetAllGunsFlag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x1F)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_1F_ALLGUNSOFF_LF)));
|
||||
bondinvSetAllGunsFlag(FALSE);
|
||||
return;
|
||||
}
|
||||
@@ -1475,25 +1475,25 @@ void cheatButtonHandleCheatsTurnedOff(CHEAT_ID cheat_id)
|
||||
case CHEAT_INVISIBILITY:
|
||||
if (!bondviewGetVisibleToGuardsFlag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x20)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_20_INVISIBILITYOFF_LF)));
|
||||
bondviewSetVisibleToGuardsFlag(TRUE);
|
||||
return;
|
||||
}
|
||||
return;
|
||||
|
||||
case CHEAT_INFINITE_AMMO:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x22)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_22_INFINITEAMMOOFF_LF)));
|
||||
return;
|
||||
|
||||
|
||||
case CHEAT_DK_MODE:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x23)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_23_DKMODEOFF_LF)));
|
||||
cheatButtonSetDkMode(FALSE);
|
||||
return;
|
||||
|
||||
case CHEAT_TINY_BOND:
|
||||
if ((player_count == 1) && (g_playerPerm->player_perspective_height != 1.0f))
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x24)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_24_TINYBONDOFF_LF)));
|
||||
g_playerPerm->player_perspective_height = 1.0f;
|
||||
if (g_CurrentPlayer->ptr_char_objectinstance)
|
||||
{
|
||||
@@ -1504,17 +1504,17 @@ void cheatButtonHandleCheatsTurnedOff(CHEAT_ID cheat_id)
|
||||
return;
|
||||
|
||||
case CHEAT_PAINTBALL:
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x25)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_25_PAINTBALLMODEOFF_LF)));
|
||||
return;
|
||||
|
||||
case CHEAT_INVISIBILITY_MP: /* multiplayer? but the function call is for "fade"? */
|
||||
case CHEAT_BONDPHASE:
|
||||
currentPlayerStartChrFade(300.0f, 1.0f);
|
||||
return;
|
||||
|
||||
case CHEAT_TURBO_MODE:
|
||||
if (get_debug_fast_bond_flag())
|
||||
{
|
||||
HUDMESSAGEBOTTOM((char *)langGet(TEXT(LMISC, 0x27)));
|
||||
HUDMESSAGEBOTTOM((char *)langGet(getStringID(LMISC, MISC_STR_27_FASTMODEOFF_LF)));
|
||||
set_debug_fast_bond_flag(FALSE);
|
||||
return;
|
||||
}
|
||||
@@ -1527,10 +1527,10 @@ void cheatButtonHandleCheatsTurnedOff(CHEAT_ID cheat_id)
|
||||
}
|
||||
return;
|
||||
|
||||
|
||||
|
||||
case CHEAT_EXTRA_MP_CHARS:
|
||||
case CHEAT_MAXAMMO:
|
||||
case CHEAT_DEBUG_RETURN_SAVED_RA:
|
||||
case CHEAT_DEBUG_UNK5:
|
||||
case CHEAT_DEACTIVATE_INVINCIBILITY:
|
||||
case CHEAT_2X_HEALTH:
|
||||
case CHEAT_2X_ARMOR:
|
||||
@@ -1591,11 +1591,11 @@ void cheatButtonHandleCheatsTurnedOff(CHEAT_ID cheat_id)
|
||||
case CHEAT_UNLOCK_CRADLE:
|
||||
case CHEAT_UNLOCK_AZTEK:
|
||||
case CHEAT_UNLOCK_EGYPT:
|
||||
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1639,16 +1639,16 @@ void cheatDisableAllCheats(void)
|
||||
*/
|
||||
char *cheatGetMenuTextPointer(CHEAT_ID cheat_id)
|
||||
{
|
||||
u16 temp_v0;
|
||||
u16 strID;
|
||||
|
||||
temp_v0 = g_CheatInfo[cheat_id - 1].text_bank_id;
|
||||
strID = g_CheatInfo[cheat_id - 1].text_bank_id;
|
||||
|
||||
if (temp_v0 != 0)
|
||||
if (strID != 0)
|
||||
{
|
||||
return langGet((s32) temp_v0);
|
||||
return langGet((s32) strID);
|
||||
}
|
||||
|
||||
return langGet(TEXT(LMISC, MISC_STR_28));
|
||||
return langGet(getStringID(LMISC, MISC_STR_28_NONAME));
|
||||
}
|
||||
|
||||
|
||||
@@ -1669,13 +1669,13 @@ bool cheatIsActive(CHEAT_ID cheat)
|
||||
*/
|
||||
void cheatButtonSetDkMode(CHEAT_ID cheat_id)
|
||||
{
|
||||
s32 g_NumChrSlots;
|
||||
s32 numslots;
|
||||
s32 i;
|
||||
f32 scale;
|
||||
Model *model;
|
||||
ChrRecord* guard = g_ChrSlots;
|
||||
|
||||
g_NumChrSlots = get_numguards();
|
||||
numslots = get_numguards();
|
||||
|
||||
if (cheat_id)
|
||||
{
|
||||
@@ -1686,7 +1686,7 @@ void cheatButtonSetDkMode(CHEAT_ID cheat_id)
|
||||
scale = 1.25f;
|
||||
}
|
||||
|
||||
for (i=0; i<g_NumChrSlots; i++, guard++)
|
||||
for (i=0; i<numslots; i++, guard++)
|
||||
{
|
||||
|
||||
#if defined(VERSION_US)
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
#define _CHEAT_BUTTONS_H_
|
||||
#include <ultra64.h>
|
||||
|
||||
// This shows up a lot but not quite sure what it represents.
|
||||
#define CHEAT_20 20
|
||||
|
||||
enum CHEAT_MASK {
|
||||
CHEAT_MASK_0 = 0,
|
||||
|
||||
|
||||
+548
-785
File diff suppressed because it is too large
Load Diff
+8
-8
@@ -18,7 +18,7 @@ struct animation_something
|
||||
s32 field_10;
|
||||
s32 field_14;
|
||||
f32 field_18;
|
||||
|
||||
|
||||
struct struck_animation_table *field_1C;
|
||||
|
||||
// maybe count of field_1C
|
||||
@@ -128,7 +128,7 @@ struct unk_joint_list {
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
s32 unk30;
|
||||
s32 PropType;
|
||||
s32 unk34;
|
||||
rgba_u8 unk38;
|
||||
s32 unk3C;
|
||||
@@ -232,11 +232,11 @@ extern s32 show_patrols_flag;
|
||||
extern s32 player1_guardID;
|
||||
extern ChrRecord *g_ChrSlots;
|
||||
extern s32 g_NumChrSlots;
|
||||
extern struct unk_joint_list D_8002CC6C;
|
||||
extern ModelRenderData D_8002CC6C;
|
||||
extern s32 D_8002CCAC;
|
||||
extern s32 D_8002CCB0;
|
||||
extern s32 D_8002CCB4;
|
||||
extern rgba_u8 D_8002CCB8;
|
||||
extern rgba_u8 gBloodColour;
|
||||
|
||||
extern f32 D_80030984;
|
||||
extern f32 D_80030988;
|
||||
@@ -288,7 +288,7 @@ void chrPositionRelated7F020D94(ChrRecord *);
|
||||
void chrSetMoving(ChrRecord *guard,s32 param_2);
|
||||
f32 getAnimationRate(void);
|
||||
void setAnimationRate(f32);
|
||||
PropRecord *init_GUARDdata_with_set_values(PropRecord *, Model *, coord3d *, f32 arg2, StandTile * arg3, s32 arg4);
|
||||
PropRecord *init_GUARDdata_with_set_values(PropRecord *, Model *, coord3d *, f32 arg2, StandTile * arg3, struct AIListRecord *arg4);
|
||||
PropRecord *chrAllocate(struct Model * arg0, coord3d * arg1, f32 arg2, StandTile * arg3, s32 arg4);
|
||||
void chrSetHiddenToRandom(ChrRecord *arg0);
|
||||
void chrRemoved7F022E1C(f32 arg0);
|
||||
@@ -307,12 +307,12 @@ s32 get_numguards(void);
|
||||
Gfx *chrRenderProp(PropRecord *arg0, Gfx *arg1, s32 arg2);
|
||||
void chrAddHealth(ChrRecord *chr, f32 health);
|
||||
void chrSetMaxDamage(ChrRecord *chr, f32 maxdamage);
|
||||
s32 sub_GAME_7F03DA50(struct PropRecord *arg0, s32 arg1);
|
||||
s32 sub_GAME_7F023194(PropRecord *arg0, struct coord3d *arg1, struct coord2d *arg2, struct coord2d *arg3);
|
||||
s32 propIsOfCdType(PropRecord* prop, s32 cdtypes);
|
||||
s32 sub_GAME_7F023194(PropRecord *arg0, struct coord3d *arg1, struct coord2d *arg2, struct coord2d *arg3);
|
||||
|
||||
//tentative signature
|
||||
s32 sub_GAME_7F01FC10(Model *, coord3d *, coord3d *, f32 *);
|
||||
void sub_GAME_7F0221DC(Model *arg0, s32 arg1, ModelNode *arg2, struct coord3d *arg3);
|
||||
void sub_GAME_7F0221DC(Model *arg0, s32 arg1, ModelNode *arg2, struct coord3d *arg3);
|
||||
|
||||
#ifdef BUGFIX_R1
|
||||
s32 not_in_us_7F0209EC(s32 bodynum, s32 headnum);
|
||||
|
||||
+3
-2
@@ -76,11 +76,12 @@ struct Model *makeonebody(s32 body, s32 head, struct ModelFileHeader *bodyHeader
|
||||
{
|
||||
model = get_aircraft_obj_instance_controller(bodyHeader);
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
assert(chrsub->inst.savesize>=bodyobj->savesize); //bodyHeader = chrsub, model = bodyobj
|
||||
#endif
|
||||
#ifdef XBLADEBUG
|
||||
#error fix XBLADEBUG
|
||||
//
|
||||
// if (*&pMStack0000003c->field_0x2 < pMStack00000024->numRecords) {
|
||||
// assertPrint_8291E690
|
||||
// (".\\ported\\chrlv.cpp",0xc4,
|
||||
// "Assertion failed: chrsub->inst.savesize>=bodyobj->savesize");
|
||||
|
||||
+119
-84
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
//hack? used to match as called with 2 args, but decompiled code takes 1
|
||||
extern s32 objectiveGetStatus_WEAK(s32 objectiveNum, s32);
|
||||
extern s32 objectiveGetStatus_WEAK(s32 objectiveNum, s32);
|
||||
|
||||
|
||||
//bss
|
||||
@@ -52,7 +52,7 @@ sfxRecord sfx_related[SFX_RELATED_LEN];
|
||||
|
||||
|
||||
/**
|
||||
* Play Audio in slot X from Prop or Pad
|
||||
* Play Audio in slot X from Prop or Pad
|
||||
* @param slot: Where audio is loaded
|
||||
*/
|
||||
void audioPlayFromProp2(s32 slot)
|
||||
@@ -63,10 +63,10 @@ void audioPlayFromProp2(s32 slot)
|
||||
|
||||
if ((sfx->state ) && (sndGetPlayingState(sfx->state) ))
|
||||
{
|
||||
|
||||
|
||||
if (sfx->pos )
|
||||
{
|
||||
sfx->Volume = sub_GAME_7F0539E4(sfx->pos);
|
||||
sfx->Volume = sub_GAME_7F0539E4(sfx->pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -104,7 +104,7 @@ void audioPlayFromProp2(s32 slot)
|
||||
|
||||
|
||||
/**
|
||||
Play All Sounds in all slots
|
||||
Play All Sounds in all slots
|
||||
*/
|
||||
void loop_set_sound_effect_all_slots(void)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ void loop_set_sound_effect_all_slots(void)
|
||||
* @param slot: where to load sound
|
||||
* @param soundIndex: SFX_ID
|
||||
*/
|
||||
void audioPlayFromProp(s32 slot, s16 soundIndex)
|
||||
void audioPlayFromProp(s32 slot, s16 soundIndex)
|
||||
{
|
||||
sfxRecord *sfx = NULL; //always added to stack anyway, cleaner to use
|
||||
//"Existing ai sound number %d!\n"
|
||||
@@ -137,13 +137,19 @@ void audioPlayFromProp(s32 slot, s16 soundIndex)
|
||||
sfx->pos = NULL;
|
||||
sfx->Obj = NULL;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
else
|
||||
{
|
||||
osSyncPrintf("Existing ai sound number %d!\n", slot);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
sndPlaySfx(g_musicSfxBufferPtr, soundIndex, sfx);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Stop All Sounds in all slots
|
||||
Stop All Sounds in all slots
|
||||
*/
|
||||
void sub_GAME_7F0349BC(s32 slot)
|
||||
{
|
||||
@@ -157,12 +163,12 @@ void sub_GAME_7F0349BC(s32 slot)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get AI Command Size in bytes
|
||||
* @param AIList: u8 Pointer to The AI list containing the command
|
||||
* @param offset: The offset (in bytes) to the command you want the size of
|
||||
* @return The number of bytes of AI command
|
||||
* @canonical name
|
||||
* @canonical name
|
||||
*/
|
||||
s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
{
|
||||
@@ -192,7 +198,7 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
case AI_Yield:
|
||||
return AI_Yield_LENGTH;
|
||||
case AI_EndList:
|
||||
return AI_EndList_LENGTH;
|
||||
return AI_EndList_LENGTH;
|
||||
case AI_SetChrAiList:
|
||||
return AI_SetChrAiList_LENGTH;
|
||||
case AI_SetReturnAiList:
|
||||
@@ -227,9 +233,9 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
return AI_TRYFireOrAimAtTarget_LENGTH;
|
||||
case AI_TRYFireOrAimAtTargetKneel:
|
||||
return AI_TRYFireOrAimAtTargetKneel_LENGTH;
|
||||
case AI_IFImFiring:
|
||||
case AI_IFImFiring: /* enum = 232 despite following enum = 21 in the list */
|
||||
return AI_IFImFiring_LENGTH;
|
||||
case AI_IFImFiringAndLockedForward:
|
||||
case AI_IFImFiringAndLockedForward: /* enum = 231 despite being followed by enum = 22 in the list */
|
||||
return AI_IFImFiringAndLockedForward_LENGTH;
|
||||
case AI_TRYFireOrAimAtTargetUpdate:
|
||||
return AI_TRYFireOrAimAtTargetUpdate_LENGTH;
|
||||
@@ -361,8 +367,8 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
return AI_IFBondInRoomWithPad_LENGTH;
|
||||
case AI_IFBondCollectedObject:
|
||||
return AI_IFBondCollectedObject_LENGTH;
|
||||
case AI_IFItemIsStationaryWithinLevel:
|
||||
return AI_IFItemIsStationaryWithinLevel_LENGTH;
|
||||
case AI_IFKeyDropped:
|
||||
return AI_IFKeyDropped_LENGTH;
|
||||
case AI_IFItemIsAttachedToObject:
|
||||
return AI_IFItemIsAttachedToObject_LENGTH;
|
||||
case AI_IFBondHasItemEquipped:
|
||||
@@ -604,7 +610,7 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
case AI_TvChangeScreenBank:
|
||||
return AI_TvChangeScreenBank_LENGTH;
|
||||
case AI_IFBondInTank:
|
||||
return AI_IFBondInTank_LENGTH;
|
||||
return AI_IFBondInTank_LENGTH;
|
||||
case AI_EndLevel:
|
||||
return AI_EndLevel_LENGTH;
|
||||
case AI_CameraReturnToBond:
|
||||
@@ -688,9 +694,9 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
case AI_ObjectRocketLaunch:
|
||||
return AI_ObjectRocketLaunch_LENGTH;
|
||||
case AI_PRINT:
|
||||
{
|
||||
{
|
||||
s32 pos = offset + 1;
|
||||
while (AIList[pos] != 0)
|
||||
while (AIList[pos] != 0)
|
||||
{
|
||||
++pos;
|
||||
}
|
||||
@@ -706,11 +712,11 @@ s32 chraiitemsize(u8 *AIList, s32 offset)
|
||||
|
||||
|
||||
/**
|
||||
* Get ID of AIList
|
||||
* Get ID of AIList
|
||||
* @param AIList: Ailist to get ID of
|
||||
* @return ID of AIList
|
||||
* @return ID of AIList
|
||||
*/
|
||||
s32 chraiGetAIListID(AIRecord *AIList, bool *isGlobalAIList)
|
||||
s32 chraiGetAIListID(AIRecord *AIList, bool *isGlobalAIList)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@@ -742,13 +748,13 @@ s32 chraiGetAIListID(AIRecord *AIList, bool *isGlobalAIList)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* GoTo Label
|
||||
* @param AIlist: AIList containing label
|
||||
* @param LabelNum: Integer/enum ID to go to
|
||||
* @return Offset of label from beggining of AIList.
|
||||
*/
|
||||
s32 chraiGoToLabel(AIRecord *AIList, s32 Offset, u8 LabelNum)
|
||||
s32 chraiGoToLabel(AIRecord *AIList, s32 Offset, u8 LabelNum)
|
||||
{
|
||||
s32 listID;
|
||||
char *debAIListTypeString;
|
||||
@@ -766,7 +772,7 @@ s32 chraiGoToLabel(AIRecord *AIList, s32 Offset, u8 LabelNum)
|
||||
}
|
||||
else if (AIList[Offset].cmd == AI_EndList)
|
||||
{
|
||||
// restart ai list PC if next label not found - causes infinit loop outside of debug
|
||||
// restart ai list PC if next label not found - causes infinite loop outside of debug
|
||||
listID = chraiGetAIListID(AIList, &isGlobalAIList);
|
||||
# ifdef DEBUG
|
||||
if (isGlobalAIList)
|
||||
@@ -789,7 +795,7 @@ s32 chraiGoToLabel(AIRecord *AIList, s32 Offset, u8 LabelNum)
|
||||
|
||||
|
||||
|
||||
AIRecord *ailistFindById(s32 ID)
|
||||
AIRecord *ailistFindById(s32 ID)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@@ -833,7 +839,7 @@ PathRecord *pathFindById(s32 ID)
|
||||
{
|
||||
return &g_CurrentSetup.patrolpaths[i];
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -887,7 +893,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
* ai(void) enery tune on (%d, %d, %d)
|
||||
* ai(void) enery tune off (%d)
|
||||
*
|
||||
* Stack requires that each case declair its own AIRecord variable
|
||||
* Stack requires that each case declare its own AIRecord variable
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -936,12 +942,12 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
for (;;)
|
||||
{
|
||||
/*
|
||||
* GE uses long Switch/case while PD uses Bool functions and tests
|
||||
* for TRUE/FALSE if(funcpointer[ai]) break;
|
||||
* GE uses long Switch/case while PD uses Bool functions and tests
|
||||
* for TRUE/FALSE if(funcpointer[ai]) break;
|
||||
*/
|
||||
switch ((AiListp + Offset)->cmd)
|
||||
{
|
||||
//unfortunatly we cannot use the cmdbuilder in matching rom as the ordering is not sequential
|
||||
//unfortunately we cannot use the cmdbuilder in matching rom as the ordering is not sequential
|
||||
#ifdef USECMDBUILDER
|
||||
#define _AI_DEBUG_ID(CMD, AI_NUMBER_OF_PARAMS, PARAM, DESC)
|
||||
#define _AI_CMD_POLYMORPH(C, N, P1, P2, D)
|
||||
@@ -996,8 +1002,24 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
}
|
||||
case AI_EndList:
|
||||
{
|
||||
//Not an error to be here, same as yield except without pushing offset past it.
|
||||
return;
|
||||
//Not an error to be here, same as yield except without pushing offset past it. (just keeps looping)
|
||||
# ifdef ENABLE_LOG
|
||||
# ifdef IS_PD
|
||||
listID = chraiGetAIListID(AIList, &isGlobalAIList);
|
||||
if (isGlobalAIList)
|
||||
{
|
||||
debAIListTypeString = "global";
|
||||
}
|
||||
else
|
||||
{
|
||||
debAIListTypeString = "local";
|
||||
}
|
||||
osSyncPrintf("AI error: endlist reached %s list=%d!\n", debAIListTypeString, listID);
|
||||
# endif
|
||||
osSyncPrintf("AI error: endlist reached!\n");
|
||||
# endif
|
||||
|
||||
return;
|
||||
}
|
||||
case AI_SetChrAiList:
|
||||
{
|
||||
@@ -1008,7 +1030,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
|
||||
if (CHR_NUM == ((u8)CHR_SELF))
|
||||
{
|
||||
AiListp = ailistFindById(AI_LIST_ID);
|
||||
AiListp = ailistFindById(AI_LIST_ID);
|
||||
Offset = 0;
|
||||
}
|
||||
else
|
||||
@@ -1643,12 +1665,12 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_RunToPadPreset:
|
||||
{
|
||||
/* PD uses GoTo Pad (speed) which seems better
|
||||
switch (ai->val[0])
|
||||
{
|
||||
case SPEED_WALK:
|
||||
switch (ai->val[0])
|
||||
{
|
||||
case SPEED_WALK:
|
||||
chrGoToPad(ChrEntityp, ChrEntityp->padpreset1, SPEED_WALK);
|
||||
break;
|
||||
case SPEED_RUN:
|
||||
break;
|
||||
case SPEED_RUN:
|
||||
etc...
|
||||
*/
|
||||
chrGoToPad(ChrEntityp, ChrEntityp->padpreset1, SPEED_RUN);
|
||||
@@ -1679,7 +1701,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
Offset += AI_StartPatrol_LENGTH;
|
||||
break;
|
||||
}
|
||||
case AI_IFICanHearAlarm:
|
||||
case AI_IFICanHearAlarm:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if (chrCanHearAlarm(ChrEntityp))
|
||||
@@ -1852,8 +1874,8 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_IFMyRoomIsOnScreen:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
|
||||
if (getROOMID_Bitflags(getTileRoom(ChrEntityp->prop->stan))) //embedded func to match, must be s32 not u8
|
||||
|
||||
if (getROOMID_isRendered(getTileRoom(ChrEntityp->prop->stan))) //embedded func to match, must be s32 not u8
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[0]);
|
||||
}
|
||||
@@ -2120,7 +2142,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
#ifdef ENABLE_LOG
|
||||
osSyncPrintf("bond not in room\n");
|
||||
#endif
|
||||
Offset += AI_IFBondInRoomWithPad_LENGTH;
|
||||
@@ -2141,7 +2163,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AI_IFItemIsStationaryWithinLevel:
|
||||
case AI_IFKeyDropped:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if (weaponFindThrown(ai->val[0]))
|
||||
@@ -2150,7 +2172,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
}
|
||||
else
|
||||
{
|
||||
Offset += AI_IFItemIsStationaryWithinLevel_LENGTH;
|
||||
Offset += AI_IFKeyDropped_LENGTH;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -2293,6 +2315,10 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
if (!objGetDestroyedLevel(obj))
|
||||
{
|
||||
f32 damage = ((obj->damage - obj->maxdamage) + 1) / 250.0f;
|
||||
/*
|
||||
osSyncPrintf("ai_destroyobj 2 : (def->obj == PROP_ELVIS_SAUCER)\n");
|
||||
osSyncPrintf("Elvis BOOM\n");
|
||||
*/
|
||||
#ifdef ENABLE_LOG
|
||||
osSyncPrintf("ai_destroyobj 3 : adddamageobj\n");
|
||||
#endif
|
||||
@@ -2410,7 +2436,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
matrix_scalar_multiply(obj->model->scale, &matrix);
|
||||
}
|
||||
sub_GAME_7F04088C(obj, pad, &matrix, pad->stan, pad);
|
||||
sub_GAME_7F04088C(obj, &pad->pos, &matrix, pad->stan, &pad->pos);
|
||||
setupUpdateObjectRoomPosition(obj);
|
||||
}
|
||||
Offset += AI_MoveObject_LENGTH;
|
||||
@@ -2452,20 +2478,20 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
if (door->openPosition <= 0)
|
||||
{
|
||||
pass = (ai->val[1] & DOOR_STATE_CLOSED) != 0;
|
||||
pass = (ai->val[1] & AI_DOOR_STATE_CLOSED) != 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
pass = (ai->val[1] & DOOR_STATE_OPEN) != 0;
|
||||
pass = (ai->val[1] & AI_DOOR_STATE_OPEN) != 0;
|
||||
}
|
||||
}
|
||||
else if (door->openstate == DOORSTATE_OPENING || door->openstate == DOORSTATE_WAITING)
|
||||
{
|
||||
pass = (ai->val[1] & DOOR_STATE_OPENING) != 0;
|
||||
pass = (ai->val[1] & AI_DOOR_STATE_OPENING) != 0;
|
||||
}
|
||||
else if (door->openstate == DOORSTATE_CLOSING)
|
||||
{
|
||||
pass = (ai->val[1] & DOOR_STATE_CLOSING) != 0;
|
||||
pass = (ai->val[1] & AI_DOOR_STATE_CLOSING) != 0;
|
||||
}
|
||||
}
|
||||
if (pass)
|
||||
@@ -2550,10 +2576,10 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
u8 val;
|
||||
u8 label;
|
||||
} *ai = AiListp + Offset;
|
||||
/* additional PD code for dificulty filtering
|
||||
/* additional PD code for dificulty filtering
|
||||
== OBJECTIVE_COMPLETE && objectivelvlGetSelectedDifficultyBits(ai->val[0]) & (1 << lvlGetSelectedDifficulty())) *
|
||||
*/
|
||||
if (objectiveGetCount() > ai->val && OBJECTIVESTATUS_COMPLETE == objectiveGetStatus_WEAK(ai->val * 1, ai->val ))
|
||||
if (objectiveGetCount() > ai->val && OBJECTIVESTATUS_COMPLETE == objectiveGetStatus_WEAK(ai->val * 1, ai->val ))
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->label);
|
||||
}
|
||||
@@ -3322,8 +3348,17 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
#ifdef ENABLE_LOG
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
//PD = osSyncPrintf("AI_PRINT(void) [%d] %s\n", ai-val);
|
||||
osSyncPrintf("AI_PRINT: %s\n", ai->val);
|
||||
#ifdef IS_PD
|
||||
if (ChrEntityp)
|
||||
{
|
||||
osSyncPrintf("AI_PRINT(void) [%d] %s\n", ChrEntityp->chrnum, ai->val);
|
||||
}
|
||||
else if(VehichleEntityp)
|
||||
{
|
||||
osSyncPrintf("AI_PRINT(void) [hover vehicle] %s\n", ai->val);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
Offset += chraiitemsize(AiListp, Offset);
|
||||
break;
|
||||
@@ -3510,7 +3545,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
s32 flags = CharArrayTo32(ai->val,3);
|
||||
s32 model = CharArrayTo16(ai->val,0);
|
||||
s32 model = CharArrayTo16(ai->val,0);
|
||||
PropRecord *prop = NULL;
|
||||
|
||||
if (ChrEntityp && ChrEntityp->prop && ChrEntityp->model)
|
||||
@@ -3745,8 +3780,8 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
#ifdef VERSION_EU
|
||||
sfx_related[ai->slotID].sfxID = (sfxID * 50) / 60;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#endif
|
||||
sfx_related[ai->slotID].Volume = vol;
|
||||
sfx_related[ai->slotID].pos = NULL;
|
||||
@@ -3779,8 +3814,8 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
#ifdef VERSION_EU
|
||||
sfx_related[ai->slotID].sfxID = (sfxID * 50) / 60;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#endif
|
||||
sfx_related[ai->slotID].Volume = sub_GAME_7F0539B8(vol);
|
||||
sfx_related[ai->slotID].pos = NULL;
|
||||
@@ -3807,8 +3842,8 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
#ifdef VERSION_EU
|
||||
sfx_related[ai->slotID].sfxID = (sfxID * 50) / 60;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#else
|
||||
sfx_related[ai->slotID].sfxID = sfxID;
|
||||
#endif
|
||||
sfx_related[ai->slotID].pos = NULL;
|
||||
sfx_related[ai->slotID].Obj = obj;
|
||||
@@ -3921,7 +3956,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_IFCameraIsInIntro:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if ((get_camera_mode() == 1) || (get_camera_mode() == 2))
|
||||
if ((bondviewGetCameraMode() == 1) || (bondviewGetCameraMode() == 2))
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[0]);
|
||||
}
|
||||
@@ -3934,7 +3969,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_IFCameraIsInBondSwirl:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if (get_camera_mode() == 3)
|
||||
if (bondviewGetCameraMode() == 3)
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[0]);
|
||||
}
|
||||
@@ -3972,8 +4007,8 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
#ifdef ENABLE_LOG
|
||||
osSyncPrintf("ai_ifbondintank\n");
|
||||
#endif
|
||||
osSyncPrintf("ai_ifbondintank\n");
|
||||
#endif
|
||||
if (isBondInTank() == TRUE)
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[0]);
|
||||
@@ -3987,11 +4022,11 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_EndLevel: // canonical name
|
||||
{
|
||||
/*"aiEndLevel" */
|
||||
if (camera_8003642C)
|
||||
if (cameraBufferToggle)
|
||||
{
|
||||
if (camera_80036434 == FALSE)
|
||||
if (cameraFrameCounter2 == FALSE)
|
||||
{
|
||||
camera_80036434 = TRUE;
|
||||
cameraFrameCounter2 = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -4003,7 +4038,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
}
|
||||
case AI_CameraReturnToBond:
|
||||
{
|
||||
set_camera_mode(CAMERAMODE_FP_NOINPUT);
|
||||
bondviewSetCameraMode(CAMERAMODE_FP_NOINPUT);
|
||||
Offset += AI_CameraReturnToBond_LENGTH;
|
||||
break;
|
||||
}
|
||||
@@ -4019,7 +4054,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
dword_CODE_bss_800799F8 = (PadRecord *)&g_CurrentSetup.boundpads[getBoundPadNum(padnum)];
|
||||
}
|
||||
set_camera_mode(CAMERAMODE_POSEND);
|
||||
bondviewSetCameraMode(CAMERAMODE_POSEND);
|
||||
Offset += AI_CameraLookAtBondFromPad_LENGTH;
|
||||
break;
|
||||
}
|
||||
@@ -4042,7 +4077,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
gBondViewCutscene = cdef;
|
||||
dword_CODE_bss_80079A18 = CharArrayTo16(ai->val,1);
|
||||
dword_CODE_bss_80079A1C = CharArrayTo16(ai->val,3);
|
||||
set_camera_mode(CAMERAMODE_POSEND);
|
||||
bondviewSetCameraMode(CAMERAMODE_POSEND);
|
||||
}
|
||||
}
|
||||
Offset += AI_CameraSwitch_LENGTH;
|
||||
@@ -4079,7 +4114,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
countdownTimerSetVisible(16, FALSE);
|
||||
}
|
||||
D_800364B0 = FALSE;
|
||||
is_timer_active = FALSE;
|
||||
Offset += AI_BondDisableControl_LENGTH;
|
||||
break;
|
||||
}
|
||||
@@ -4093,7 +4128,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
hudmsgsSetOn(PLAYERFLAG_NOCONTROL);
|
||||
bondviewClearUpperTextDisplayFlag(2);
|
||||
countdownTimerSetVisible(16, TRUE);
|
||||
D_800364B0 = TRUE;
|
||||
is_timer_active = TRUE;
|
||||
Offset += AI_BondEnableControl_LENGTH;
|
||||
break;
|
||||
}
|
||||
@@ -4128,7 +4163,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
stan = pad->stan;
|
||||
sub_GAME_7F03D058(chr->prop, FALSE);
|
||||
|
||||
if (sub_GAME_7F033F48(&pos, &stan, FacingDirection, TRUE))
|
||||
if (chrAdjustPosForSpawn(&pos, &stan, FacingDirection, TRUE))
|
||||
{
|
||||
{
|
||||
chr->prop->pos.x = pos.x;
|
||||
@@ -4232,9 +4267,9 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
door->openPosition = door->maxFrac;
|
||||
door->openedTime = g_GlobalTimer;
|
||||
door->openstate = DOORSTATE_STATIONARY;
|
||||
sub_GAME_7F052B00(door);
|
||||
door7F052B00(door);
|
||||
doorActivatePortal(door); // doorActivatePortal
|
||||
sub_GAME_7F053B10(door);
|
||||
door7F053B10(door);
|
||||
}
|
||||
Offset += AI_DoorOpenInstant_LENGTH;
|
||||
break;
|
||||
@@ -4402,20 +4437,20 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
flt_CODE_bss_80079A0C = camHeight;
|
||||
flt_CODE_bss_80079A10 = targetHeight;
|
||||
dword_CODE_bss_80079A14 = padnum;
|
||||
set_camera_mode(CAMERAMODE_POSEND);
|
||||
bondviewSetCameraMode(CAMERAMODE_POSEND);
|
||||
Offset += AI_CameraOrbitPad_LENGTH;
|
||||
break;
|
||||
}
|
||||
case AI_CreditsRoll:
|
||||
{
|
||||
D_8003643C = TRUE;
|
||||
credits_state = TRUE;
|
||||
Offset += AI_CreditsRoll_LENGTH;
|
||||
break;
|
||||
}
|
||||
case AI_IFCreditsHasCompleted:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if (D_8003643C == 2)
|
||||
if (credits_state == 2)
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[0]);
|
||||
}
|
||||
@@ -4442,7 +4477,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_IFFolderActorIsEqual:
|
||||
{
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
if (getSelectedFolderBond() == (s8)ai->val[0])
|
||||
if (fileGetBondForCurrentFolder() == (s8)ai->val[0])
|
||||
{
|
||||
Offset = chraiGoToLabel(AiListp, Offset, ai->val[1]);
|
||||
}
|
||||
@@ -4566,14 +4601,14 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
#endif
|
||||
default:
|
||||
/*
|
||||
* No Command found, advance ailist by 1.
|
||||
* This is attempting to handle situations where the command
|
||||
* type is invalid by passing over them and continuing
|
||||
* execution.
|
||||
* chraiitemsize returns 1 which is pointless really
|
||||
* could have done it here without a jump
|
||||
* No Command found, advance ailist by 1.
|
||||
* This is attempting to handle situations where the command
|
||||
* type is invalid by passing over them and continuing
|
||||
* execution.
|
||||
* chraiitemsize returns 1 which is pointless really
|
||||
* could have done it here without a jump
|
||||
*
|
||||
* Outcome:crash
|
||||
* Outcome:crash
|
||||
*/
|
||||
{
|
||||
Offset += chraiitemsize(AiListp, Offset);
|
||||
|
||||
+9
-6
@@ -218,8 +218,8 @@ extern u32 monAnim00Bond[];
|
||||
extern u32 monAnim34[];
|
||||
extern u32 monAnim35Taser[];
|
||||
extern WeaponObjRecord* temp_mine_table[30];
|
||||
extern f32 gas_damage_flag;
|
||||
extern u32 gas_cutoff_flag;
|
||||
extern f32 gasTimeToFullOpacity;
|
||||
extern u32 gasDoesDamageFlag;
|
||||
extern f32 difficulty ;
|
||||
extern stagesetup g_CurrentSetup;
|
||||
extern s16 * ptr_list_object_lookup_indices;
|
||||
@@ -250,6 +250,7 @@ extern struct object_animation_controller g_UnknownAnimController;
|
||||
extern struct object_animation_controller g_TaserAnimController;
|
||||
|
||||
extern stagesetup *g_ptrStageSetupFile;
|
||||
extern char *setup_text_pointers[];
|
||||
|
||||
void alarmDeactivate(void);
|
||||
s32 chraiitemsize(u8 *AIList, s32 offset);
|
||||
@@ -262,11 +263,11 @@ void chraiCheckUseHeldItems(void);
|
||||
bool bond_interact_object(void);
|
||||
void sub_GAME_7F03D0D4(void);
|
||||
void chrpropRegisterRoom(PropRecord *, s16);
|
||||
PropRecord* propAllocate();
|
||||
PropRecord* chrpropAllocate(void);
|
||||
void chrpropReparent(PropRecord *newChild, PropRecord *host);
|
||||
void chrpropDeregisterRooms(PropRecord *);
|
||||
void sub_GAME_7F03E27C(PropRecord *, coord3d *, coord3d *, f32);
|
||||
void chrpropRegisterRooms(PropRecord *posData);
|
||||
|
||||
void chrpropActivate(PropRecord *);
|
||||
void chrpropEnable(PropRecord *);
|
||||
void chrpropActivateThisFrame(PropRecord *);
|
||||
@@ -280,6 +281,7 @@ void roomGetProps(s32 *roomids);
|
||||
ObjectRecord *scan_position_data_table_for_normal_object_at_preset(s32 arg0);
|
||||
Gfx *chrpropsRenderPass(Gfx *arg0, s32 roomid, s32 arg2);
|
||||
PropRecord *get_ptr_obj_pos_list_current_entry(void);
|
||||
void propsDefragRoomProps(void);
|
||||
void chraiGetPropRoomIds(PropRecord *self, s32 *roomids);
|
||||
void chrpropFree(PropRecord *prop);
|
||||
void chrpropDisable(PropRecord *prop);
|
||||
@@ -287,7 +289,7 @@ f32 chrpropBBOXGetXmin(ModelRoData_BoundingBoxRecord *modelBoundingBox
|
||||
f32 chrpropBBOXGetYmin(ModelRoData_BoundingBoxRecord *modelBoundingBox);
|
||||
f32 chrpropBBOXGetYmax(ModelRoData_BoundingBoxRecord *modelBoundingBox);
|
||||
f32 chrpropBBOXGetZmin(ModelRoData_BoundingBoxRecord *modelBoundingBox);
|
||||
ObjectRecord *sub_GAME_7F03FAB0(PadRecord *pad, s32 RoomID);
|
||||
ObjectRecord *sub_GAME_7F03FAB0(struct coord3d *pos, s32 RoomID);
|
||||
void chraiGetCollisionBounds(PropRecord *arg0, struct rect4f **arg1, s32 *arg2, f32 *arg3, f32 *arg4);
|
||||
void chrpropGetCollisionBounds(PropRecord *arg0, f32 *arg1, f32 *arg2, f32 *arg3);
|
||||
f32 sub_GAME_7F03CFE8(PropRecord *arg0);
|
||||
@@ -298,5 +300,6 @@ f32 chrpropSumMatrixNegY(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1)
|
||||
f32 chrpropSumMatrixPosZ(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixNegZ(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1);
|
||||
void sub_GAME_7F03F540(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1, struct rect4f* arg2, struct collision_data *arg3);
|
||||
void sub_GAME_7F03F948(struct coord3d *arg0, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
|
||||
void sub_GAME_7F03F948(struct coord3d *arg0, struct coord2d *arg1, struct coord2d *arg2, struct coord2d *arg3, struct coord2d *arg4);
|
||||
void sub_GAME_7F03E6A0(PropRecord *prop);
|
||||
#endif
|
||||
|
||||
+156
-143
@@ -2,7 +2,7 @@
|
||||
* chraidata.c
|
||||
*
|
||||
* Global AI Data to be used by any Setup.
|
||||
*
|
||||
*
|
||||
*========================================================================*/
|
||||
/**************************************************************************
|
||||
*
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
#pragma region Private Members
|
||||
|
||||
/*private enum, only accessable from within this file */
|
||||
/*private enum, only accessible from within this file */
|
||||
static enum lbl
|
||||
{
|
||||
lblZero,
|
||||
@@ -58,7 +58,7 @@ static enum lbl
|
||||
Try aiming at bond, otherwise do nothing
|
||||
@return No Return - AI List can only be changed by a 3rd party via SetChrAiList
|
||||
*/
|
||||
u8 m_AimAtBond[] = {
|
||||
u8 m_AimAtBond[] = {
|
||||
TRYAimAtBond(lblLoop)
|
||||
YIELD_FOREVER(lblLoop)
|
||||
EndList()
|
||||
@@ -66,21 +66,21 @@ u8 m_AimAtBond[] = {
|
||||
|
||||
/*D:8003707C */
|
||||
/**
|
||||
Dead or Removed AI.
|
||||
Dead or Removed AI.
|
||||
Use when AI has no more to do (or use YIELD_FOREVER)
|
||||
@return No Return - AI List can only be changed by a 3rd party via SetChrAiList
|
||||
*/
|
||||
u8 m_DeadAI[] = {
|
||||
/*AI_PRINT,'d','y','e','n','g','\0',*/
|
||||
/*PRINT("dyeng")*/
|
||||
YIELD_FOREVER(lblDead)
|
||||
EndList()
|
||||
};
|
||||
|
||||
/*D:80037084 */
|
||||
/**
|
||||
Stand Guard and Kill Time or patrol (Not typicaly used for patrolling).
|
||||
While killing time, play Idle animations
|
||||
On detecting Bond, Send a clone OR Run to Bond and Attack.
|
||||
Stand Guard and Kill Time or patrol (Not typicaly used for patrolling).
|
||||
While killing time, play Idle animations
|
||||
On detecting Bond, Send a clone OR Run to Bond and Attack.
|
||||
This AI List is used by nearly all guards either as default or as a result
|
||||
of detecting Bond or finishing their assigned behaivior.
|
||||
@return No Return - AI List can only be changed by a 3rd party via SetChrAiList
|
||||
@@ -91,48 +91,49 @@ u8 m_StandardGuard[] = {
|
||||
This is the only example available in Global AI where a script will
|
||||
return to itself - therefor the only example of CALL too.
|
||||
*/
|
||||
#define THIS GAILIST_STANDARD_GUARD
|
||||
#define THIS GAILIST_STANDARD_GUARD
|
||||
|
||||
DO(lblLoop)
|
||||
IFImDyingOrDead(lblDead) /* guard died, safely end list */
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving) /* guard has stopped moving, safe to continue */
|
||||
/*ELSE*/
|
||||
CONTINUE(lblLoop)
|
||||
|
||||
|
||||
|
||||
|
||||
Label(lblStoppedMoving)
|
||||
/*Jump table*/
|
||||
IFISeeBond(lblSeesBond)
|
||||
IFIWasShotRecently(lblBuddyShot)
|
||||
IFIHeardBondRecently(lblCloneContinue)
|
||||
IFBondMissedMe(lblNearMiss)
|
||||
IFISeeSomeoneShot(lblBuddyShot)
|
||||
IFISeeSomeoneDie(lblBuddyShot)
|
||||
IFIWasShotRecently(lblBuddyShot)
|
||||
IFIHeardBondRecently(lblCloneContinue)
|
||||
IFBondMissedMe(lblNearMiss)
|
||||
IFISeeSomeoneShot(lblBuddyShot)
|
||||
IFISeeSomeoneDie(lblBuddyShot)
|
||||
IFPlayingAnimation(lblNext) /*CONTNUE*/
|
||||
IFNewRandomGreaterThan(1, lblNext) /* 1/255 chance of playing new animation else continue */
|
||||
/*Default*/
|
||||
/*Default*/
|
||||
CALL( GAILIST_PLAY_IDLE_ANIMATION) /* play idle animation and return to list */
|
||||
|
||||
Label(lblNext)
|
||||
|
||||
Label(lblNext)
|
||||
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
|
||||
|
||||
Label(lblNearMiss) /* bond shot near guard */
|
||||
IFNewRandomGreaterThan(127, lblSeesBond) /* 50% chance of playing looking around animation */
|
||||
CALL( GAILIST_STARTLE_AND_RUN_TO_BOND)
|
||||
|
||||
|
||||
Label(lblSeesBond) /* guard sees bond */
|
||||
CALL( GAILIST_ATTACK_BOND)
|
||||
|
||||
|
||||
Label(lblBuddyShot) /* guard saw someone shot/die or guard was shot themselves */
|
||||
CALL( GAILIST_RUN_TO_BOND)
|
||||
|
||||
|
||||
Label(lblCloneContinue) /* guard heard bond, attempt to spawn clone (only if chr has clone flag) */
|
||||
SetReturnAiList(THIS) // This command is useless
|
||||
JumpTo(GAILIST_TRY_CLONE_SEND_OR_RUN_TO_BOND)
|
||||
|
||||
|
||||
Label(lblDead) /* guard has died, end routine */
|
||||
/*PRINT("DIE INSCAN\n")*/
|
||||
JumpTo( GAILIST_DEAD_AI)
|
||||
EndList()
|
||||
|
||||
@@ -142,8 +143,8 @@ u8 m_StandardGuard[] = {
|
||||
|
||||
/*D:800370DC */
|
||||
/**
|
||||
Play one random idle animation
|
||||
@return to caller if called with CALL
|
||||
Play one random idle animation
|
||||
@return to caller if called with CALL
|
||||
-or-
|
||||
return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
@@ -152,31 +153,31 @@ u8 m_IdleAnimations[] = {
|
||||
IFNewRandomGreaterThan(50, lblNext) /* generate annd compare random seed to see which animation to play */
|
||||
PlayAnimation(ANIM_yawning, 0, 193, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(100, lblNext)
|
||||
PlayAnimation(ANIM_swatting_flies, 0, 294, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(150, lblNext)
|
||||
PlayAnimation(ANIM_scratching_leg, 0, 183, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(200, lblNext)
|
||||
PlayAnimation(ANIM_scratching_butt, 0, 123, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(250, lblNext)
|
||||
PlayAnimation(ANIM_adjusting_crotch, 0, 56, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
PlayAnimation(ANIM_sneeze, 0, 137, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblDone)
|
||||
#else
|
||||
SWITCH(SetNewRandom(),
|
||||
@@ -192,7 +193,7 @@ u8 m_IdleAnimations[] = {
|
||||
IFRandomGreaterThan,100,
|
||||
PlayAnimation(ANIM_scratching_leg , 0, 183, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
BREAK,
|
||||
IFRandomGreaterThan,50,
|
||||
IFRandomGreaterThan,50,
|
||||
PlayAnimation(ANIM_swatting_flies , 0, 294, ANIM_IDLE_POSE_WHEN_COMPLETE | ANIM_PLAY_SFX, ANIM_DEFAULT_INTERPOLATION)
|
||||
BREAK,
|
||||
/*DEFAULT*/,,
|
||||
@@ -207,7 +208,7 @@ u8 m_IdleAnimations[] = {
|
||||
/*D:8003713C */
|
||||
/**
|
||||
Bash that Keyboard once with a random animation
|
||||
@return to caller if called with CALL
|
||||
@return to caller if called with CALL
|
||||
-or-
|
||||
return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
@@ -216,17 +217,17 @@ u8 m_BashKeyboard[] = {
|
||||
IFNewRandomGreaterThan(60, lblNext)
|
||||
PlayAnimation(ANIM_keyboard_right_hand1, 0, 69, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(120, lblNext)
|
||||
PlayAnimation(ANIM_keyboard_right_hand2, 0, 74, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(180, lblNext)
|
||||
PlayAnimation(ANIM_keyboard_left_hand, 0, 79, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
PlayAnimation(ANIM_keyboard_right_hand_tapping, 0, 89, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
GotoNext(lblDone) /* jump to end, we're done */
|
||||
@@ -242,7 +243,7 @@ u8 m_BashKeyboard[] = {
|
||||
IFRandomGreaterThan,60,
|
||||
PlayAnimation(ANIM_keyboard_right_hand2, 0, 74, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
BREAK,
|
||||
/*DEFAULT*/,,
|
||||
/*DEFAULT*/,,
|
||||
PlayAnimation(ANIM_keyboard_right_hand1, 0, 69, 0x00, ANIM_DEFAULT_INTERPOLATION)
|
||||
BREAK,
|
||||
)
|
||||
@@ -253,15 +254,15 @@ u8 m_BashKeyboard[] = {
|
||||
/*D:8003717C */
|
||||
/**
|
||||
Stand Guard Statically (No Clones, No animations) or patrol.
|
||||
On detecting Bond (sight/near-miss only), Act like a Standard Guard.
|
||||
On detecting Bond (sight/near-miss only), Act like a Standard Guard.
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_SimpleGuardDeaf[] = {
|
||||
u8 m_SimpleGuardDeaf[] = {
|
||||
DO(lblLoop) /* wait for guard to stop moving before branching to next logic */
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving)
|
||||
/*ELSE*/
|
||||
CONTINUE(lblLoop)
|
||||
|
||||
|
||||
Label(lblStoppedMoving)
|
||||
IFISeeBond(lblSeesBond)
|
||||
IFIWasShotRecently(lblBuddyShot)
|
||||
@@ -269,15 +270,15 @@ u8 m_SimpleGuardDeaf[] = {
|
||||
IFISeeSomeoneShot(lblBuddyShot)
|
||||
IFISeeSomeoneDie(lblBuddyShot)
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
|
||||
|
||||
Label(lblNearMiss) /* bond shot near guard */
|
||||
IFNewRandomGreaterThan(127, lblSeesBond) /* 50% chance of playing looking around animation */
|
||||
JUMPTO_THEN_GUARD( GAILIST_STARTLE_AND_RUN_TO_BOND)
|
||||
|
||||
|
||||
Label(lblSeesBond) /* guard sees bond */
|
||||
JUMPTO_THEN_GUARD( GAILIST_ATTACK_BOND)
|
||||
|
||||
|
||||
Label(lblBuddyShot) /* guard saw another guard shot/die or guard was shot */
|
||||
JUMPTO_THEN_GUARD( GAILIST_RUN_TO_BOND)
|
||||
EndList()
|
||||
@@ -291,7 +292,7 @@ u8 m_SimpleGuardDeaf[] = {
|
||||
return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
u8 m_AttackBond[] = {
|
||||
#if 0 //Doesnt work any simpler
|
||||
#if 0 //Doesnt work any simpler
|
||||
IFMyFlags2Has(FLAGS2_DONT_POINT_AT_BOND, lblNext) /* if guard already pointed at bond */
|
||||
/*ELSE*/
|
||||
IFNewRandomGreaterThan(32, lblNext) /* 12.5% chance of pointing to bond */
|
||||
@@ -299,7 +300,7 @@ u8 m_AttackBond[] = {
|
||||
SetMyFlags2(FLAGS2_DONT_POINT_AT_BOND) /* don't point again, thank you object permanence */
|
||||
Return() /* guard pointed at bond, return to list */
|
||||
|
||||
Label(lblNext)
|
||||
Label(lblNext)
|
||||
SetMyFlags2(FLAGS2_DONT_POINT_AT_BOND) /* I am awayer of Bond, set flag so we don't point at bond */
|
||||
SWITCH(/*SetNewRandom()*/EMPTY,
|
||||
IFRandomGreaterThan,127,
|
||||
@@ -315,14 +316,14 @@ u8 m_AttackBond[] = {
|
||||
TRYSideRunning,
|
||||
IFNewRandomGreaterThan,10,
|
||||
TRYSidestepping,
|
||||
IFNewRandomGreaterThan,10,
|
||||
IFNewRandomGreaterThan,10,
|
||||
TRYSideHopping,
|
||||
/*DEFAULT*/,,
|
||||
TRYFiringRoll,
|
||||
,,
|
||||
TRYThrowingGrenade /* attempt to throw grenade, depends on chr->grenadeprob value */
|
||||
)
|
||||
#else
|
||||
#else
|
||||
IFMyFlags2Has(FLAGS2_DONT_POINT_AT_BOND, lblNext) /* if guard already pointed at bond */
|
||||
IFNewRandomGreaterThan(32, lblNext) /* 12.5% chance of pointing to bond */
|
||||
PointAtBond()
|
||||
@@ -332,35 +333,35 @@ u8 m_AttackBond[] = {
|
||||
Label(lblNext) /*Not a switch*/
|
||||
SetMyFlags2(FLAGS2_DONT_POINT_AT_BOND) /* I am awayer of Bond, set flag so we don't point at bond */
|
||||
TRYThrowingGrenade(lblDone) /* attempt to throw grenade, depends on chr->grenadeprob value */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(10, lblNext)
|
||||
TRYFiringRoll(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(10, lblNext)
|
||||
TRYSideHopping(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(25, lblNext)
|
||||
TRYSidestepping(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(50, lblNext)
|
||||
TRYSideRunning(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(64, lblNext)
|
||||
TRYFiringWalk(lblDone) /* infinite ammo death sentence ;) */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(127, lblNext)
|
||||
TRYFiringRun(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFNewRandomGreaterThan(127, lblKneel)
|
||||
TRYFireAtBond(lblDone)
|
||||
|
||||
|
||||
Label(lblKneel)
|
||||
TRYFireAtBondKneeling(lblDone)
|
||||
|
||||
@@ -368,7 +369,7 @@ u8 m_AttackBond[] = {
|
||||
#endif
|
||||
|
||||
Return()
|
||||
EndList()
|
||||
EndList()
|
||||
};
|
||||
|
||||
/*D:8003720C */
|
||||
@@ -378,7 +379,7 @@ u8 m_AttackBond[] = {
|
||||
-or-
|
||||
return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
u8 m_RunToBond[] = {
|
||||
u8 m_RunToBond[] = {
|
||||
SetMyFlags2(FLAGS2_DONT_POINT_AT_BOND) /* guard is aware of bond, so don't point at him when first spotted */
|
||||
TRYRunToBond(lblLoop) /* goto loop if bond position is reachable */
|
||||
Return() /* if guard can't reach bond, return to ai list (read TRYRunToBond command info) */
|
||||
@@ -387,10 +388,10 @@ u8 m_RunToBond[] = {
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving)
|
||||
IFISeeBond(lblSeesBond) /* executes every frame instead of "at ready" state */
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
Label(lblSeesBond)
|
||||
JumpTo( GAILIST_ATTACK_BOND)
|
||||
|
||||
|
||||
Label(lblStoppedMoving)
|
||||
Return()
|
||||
EndList()
|
||||
@@ -398,19 +399,19 @@ u8 m_RunToBond[] = {
|
||||
|
||||
/*D:80037224 */
|
||||
/**
|
||||
If Calling Chr NOT been seen, Send Clone after Bond, otherwise Act like a
|
||||
If Calling Chr NOT been seen, Send Clone after Bond, otherwise Act like a
|
||||
Standard Guard
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_TryCloneSendOrRunToBond[] = {
|
||||
u8 m_TryCloneSendOrRunToBond[] = {
|
||||
SetMyFlags2(FLAGS2_DONT_POINT_AT_BOND) /* I am aware of bond, so won't point at him */
|
||||
IFIveNotBeenSeen(lblCloneContinue)
|
||||
JumpTo( GAILIST_RUN_TO_BOND)
|
||||
|
||||
IFIveNotBeenSeen(lblCloneContinue)
|
||||
JumpTo( GAILIST_RUN_TO_BOND)
|
||||
|
||||
Label(lblCloneContinue)
|
||||
IFMyCloneDoesNotExist(lblCloneContinue) /* Ive not been seen, test for clone existance */
|
||||
JumpTo( GAILIST_STANDARD_GUARD) /* we only want 1 clone */
|
||||
|
||||
|
||||
Label(lblCloneContinue) /* clone didnt exist, create one */
|
||||
TRYCloningMe(GAILIST_STANDARD_CLONE, lblNext) /* Assign AI to clone */
|
||||
JumpTo( GAILIST_RUN_TO_BOND) /* clone failed to spawn (not enough memory/guard doesn't have clone flag on),
|
||||
@@ -427,20 +428,20 @@ u8 m_TryCloneSendOrRunToBond[] = {
|
||||
Run to bond then act like a Standard Guard
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_StandardClone[] = {
|
||||
u8 m_StandardClone[] = {
|
||||
JUMPTO_THEN_GUARD( GAILIST_RUN_TO_BOND)
|
||||
EndList()
|
||||
};
|
||||
|
||||
/*D:80037250 */
|
||||
/**
|
||||
Stand Guard Statically (No Clones, No animations) or patrol (Typical Use of this type).
|
||||
Stand Guard Statically (No Clones, No animations) or patrol (Typical Use of this type).
|
||||
On detecting Bond, Act like a Standard Guard.
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_SimpleGuard[] = {
|
||||
/* Simple Detection Loop */
|
||||
DO(lblLoop)
|
||||
DO(lblLoop)
|
||||
IFISeeBond(lblSeesBond)
|
||||
IFIWasShotRecently(lblBuddyShot)
|
||||
IFIHeardBondRecently(lblBuddyShot)
|
||||
@@ -448,13 +449,13 @@ u8 m_SimpleGuard[] = {
|
||||
IFISeeSomeoneShot(lblBuddyShot)
|
||||
IFISeeSomeoneDie(lblBuddyShot)
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
Label(lblSeesBond) /* guard sees bond */
|
||||
JUMPTO_THEN_GUARD( GAILIST_ATTACK_BOND)
|
||||
|
||||
|
||||
Label(lblBuddyShot) /* guard saw another guard shot/die or guard was shot */
|
||||
JUMPTO_THEN_GUARD( GAILIST_RUN_TO_BOND)
|
||||
|
||||
|
||||
Label(lblCloneContinue) /* unused spawn clone reaction for hearing bond, likely made game too difficult/slow */
|
||||
JUMPTO_THEN_GUARD( GAILIST_TRY_CLONE_SEND_OR_RUN_TO_BOND)
|
||||
EndList()
|
||||
@@ -462,53 +463,66 @@ u8 m_SimpleGuard[] = {
|
||||
|
||||
/*D:80037280 */
|
||||
/**
|
||||
Stand Guard Statically (No Clones, No animations) or patrol.
|
||||
On detecting Bond, Run to padpreset1 and activate alarm.
|
||||
Stand Guard Statically (No Clones, No animations) or patrol.
|
||||
On detecting Bond, Run to padpreset1 and activate alarm.
|
||||
Act like a Standard Guard thereafter
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_SimpleGuardAlarmRaiser[] = {
|
||||
|
||||
DO(lblLoop)
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving)
|
||||
/*ELSE*/
|
||||
CONTINUE(lblLoop)
|
||||
|
||||
Label(lblStoppedMoving)
|
||||
IFISeeBond(lblRunToObjective)
|
||||
IFMyNumCloseArghsGreaterThan(0, lblNearMiss)
|
||||
IFIHeardBondRecently(lblNearMiss)
|
||||
IFISeeSomeoneShot(lblNearMiss)
|
||||
IFISeeSomeoneDie(lblNearMiss)
|
||||
LOOP(lblLoop)
|
||||
|
||||
u8 m_SimpleGuardAlarmRaiser[] = {
|
||||
|
||||
Label(lblNearMiss) /* a guard in sight was killed/shot, heard bond or bond shot guard */
|
||||
IFMyNumArghsGreaterThan(0, lblRunToObjective) /* doesn't make sense why the guard would be mildly curious about getting shot */
|
||||
LookSurprised()
|
||||
|
||||
DO(lblWaiting) /* wait for guard to stop moving before branching to next logic (triggered by look around animation) */
|
||||
DO(lblLoop)
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving)
|
||||
/*ELSE*/
|
||||
CONTINUE(lblLoop) /* Only process this script if not already running */
|
||||
/********************
|
||||
StoppedMoving
|
||||
*********************/
|
||||
Label(lblStoppedMoving) /* break loop if any condition is true */
|
||||
IFISeeBond(lblRunToObjective)
|
||||
IFMyNumCloseArghsGreaterThan(0, lblNearMiss)
|
||||
IFIHeardBondRecently(lblNearMiss)
|
||||
IFISeeSomeoneShot(lblNearMiss)
|
||||
IFISeeSomeoneDie(lblNearMiss)
|
||||
LOOP(lblLoop)
|
||||
|
||||
/*************
|
||||
NearMiss
|
||||
**************/
|
||||
Label(lblNearMiss) /* a guard in sight was killed/shot, heard bond or bond shot guard */
|
||||
IFMyNumArghsGreaterThan(0, lblRunToObjective) /* doesn't make sense why the guard would be mildly curious about getting shot */
|
||||
LookSurprised()
|
||||
|
||||
DO(lblWaiting) /* wait for guard to stop moving before branching to next logic (triggered by look around animation) */
|
||||
IFImOnPatrolOrStopped(lblRunToObjective)
|
||||
LOOP(lblWaiting)
|
||||
|
||||
|
||||
/********
|
||||
RUN!
|
||||
*********/
|
||||
Label(lblRunToObjective)
|
||||
RunToPad(PAD_PRESET1)
|
||||
|
||||
DO(lblNext) /* wait for guard to stop moving (reached destination/guard was shot) */
|
||||
RunToPad(PAD_PRESET1)
|
||||
|
||||
DO(lblNext) /* wait for guard to stop moving (reached destination/guard was shot) */
|
||||
IFImOnPatrolOrStopped(lblDone)
|
||||
LOOP(lblNext)
|
||||
|
||||
|
||||
/*********
|
||||
DONE
|
||||
**********/
|
||||
Label(lblDone)
|
||||
IFMyDistanceToPadGreaterThanMeter( 1, PAD_PRESET1, lblDone) /* if guard is more than 1 meter away from alarm, skip to attack ai list */
|
||||
TRYTriggeringAlarmAtPad(PAD_PRESET1, lblAlarmActivated)
|
||||
GotoNext(lblDone) /* didn't activate alarm (alarm destroyed?) */
|
||||
|
||||
DO(lblAlarmActivated) /* wait for guard to finish activating alarm */
|
||||
IFMyDistanceToPadGreaterThanMeter( 1, PAD_PRESET1, lblDone) /* if guard is more than 1 meter away from alarm, skip to attack ai list */
|
||||
TRYTriggeringAlarmAtPad(PAD_PRESET1, lblAlarmActivated)
|
||||
GotoNext(lblDone) /* didn't activate alarm (alarm destroyed?) */
|
||||
|
||||
DO(lblAlarmActivated) /* wait for guard to finish activating alarm */
|
||||
IFImOnPatrolOrStopped(lblDone)
|
||||
LOOP(lblAlarmActivated)
|
||||
|
||||
|
||||
/*********
|
||||
DONE
|
||||
**********/
|
||||
Label(lblDone)
|
||||
JUMPTO_THEN_GUARD( GAILIST_RUN_TO_BOND)
|
||||
JUMPTO_THEN_GUARD( GAILIST_RUN_TO_BOND) /* Come Here!... Meh, Im just doing my job */
|
||||
EndList()
|
||||
};
|
||||
|
||||
@@ -517,12 +531,12 @@ u8 m_SimpleGuardAlarmRaiser[] = {
|
||||
Startle character then Run To Bond
|
||||
@return to caller if called with CALL -or- return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
u8 m_StartleAndRunToBond[] = {
|
||||
u8 m_StartleAndRunToBond[] = {
|
||||
LookSurprised() /* trigger animation */
|
||||
DO(lblLoop)
|
||||
IFImOnPatrolOrStopped(lblDone) /* wait for chr to stop moving */
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
Label(lblDone) /* chr stopped moving */
|
||||
JumpTo( GAILIST_RUN_TO_BOND)
|
||||
EndList()
|
||||
@@ -533,35 +547,35 @@ u8 m_StartleAndRunToBond[] = {
|
||||
Persistently chase Bond and Attack (halt randomly)
|
||||
@return No Return - AI List can only be changed by a 3rd party via SetChrAiList
|
||||
*/
|
||||
u8 m_RunToBondPersistent[] = {
|
||||
|
||||
u8 m_RunToBondPersistent[] = {
|
||||
|
||||
/*DO*/
|
||||
Label(lblRun)
|
||||
TRYRunToBond(lblRunning) /* goto loop if bond position is reachable */
|
||||
AI_PRINT,'n','o',' ','g','o','!','\n','\0', /* guard can't reach bond */
|
||||
|
||||
PRINT("no go!\n") /* guard can't reach bond */
|
||||
|
||||
DO(lblRunning)
|
||||
IFICouldSeeBond(lblStoppedMoving)
|
||||
IFImOnPatrolOrStopped(lblDone)
|
||||
LOOP(lblRunning)
|
||||
|
||||
|
||||
DO(lblLoop) /*Check Hits and Stopped/Patrol State*/
|
||||
IFMyNumArghsLessThan(6, lblCheckDistance2)
|
||||
/*ELSE*/IFMychrflagsHas(CHRFLAG_INVINCIBLE, lblInvincibleCheck) /*BREAK*/
|
||||
|
||||
|
||||
Label(lblCheckDistance2)
|
||||
IFImOnPatrolOrStopped(lblStoppedMoving)
|
||||
/*// BUG - this causes guard to shuffle about uselessly if Bond & guard are within line of sight and over 20 meters */
|
||||
IFMyDistanceToBondGreaterThanMeter(20, lblNext) /* if guard is further than 20 meters away from bond, break */
|
||||
LOOP(lblLoop)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
CONTINUE(lblRun)
|
||||
|
||||
|
||||
Label(lblStoppedMoving)
|
||||
IFICouldSeeBond(lblNext) /*If Not invincible, do Attack loop*/
|
||||
GotoNext(lblDone) /*Goto end of Attack Switch*/
|
||||
|
||||
|
||||
Label(lblCheckDistance)
|
||||
Yield()
|
||||
IFMyDistanceToBondLessThanMeter(5, lblNext) /*BREAK*/
|
||||
@@ -570,25 +584,25 @@ u8 m_RunToBondPersistent[] = {
|
||||
|
||||
Label(lblNext)
|
||||
IFMychrflagsHas(CHRFLAG_INVINCIBLE, lblInvincibleCheck) /*Check Hits, Unset flags and Loop Attack Options*/
|
||||
|
||||
|
||||
/*DO*/
|
||||
Label(lblMaybeThrowGrenade)
|
||||
#if 0
|
||||
IFNewRandomGreaterThan(10, lblNext)
|
||||
TRYThrowingGrenade(lblDone) /* depends on chr->grenadeprob value */
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(50, lblNext)
|
||||
TRYSidestepping(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(60, lblNext)
|
||||
TRYFiringRoll(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(80, lblNext)
|
||||
TRYFiringRoll(lblDone)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
IFRandomGreaterThan(100, lblNext)
|
||||
TRYFiringWalk(lblDone)
|
||||
@@ -614,12 +628,12 @@ u8 m_RunToBondPersistent[] = {
|
||||
IFRandomGreaterThan, 100,
|
||||
TRYFiringRun,
|
||||
IFRandomGreaterThan,80,
|
||||
TRYFiringWalk,
|
||||
TRYFiringWalk,
|
||||
IFRandomGreaterThan,60,
|
||||
TRYFiringRoll,
|
||||
IFRandomGreaterThan,50,
|
||||
TRYFiringRoll,
|
||||
IFRandomGreaterThan,10,
|
||||
IFRandomGreaterThan,10,
|
||||
TRYSidestepping,
|
||||
/*DEFAULT*/,,
|
||||
TRYThrowingGrenade,
|
||||
@@ -634,7 +648,7 @@ u8 m_RunToBondPersistent[] = {
|
||||
GotoNext(lblResetAndRunAgain)
|
||||
|
||||
Label(lblNext)
|
||||
Yield()
|
||||
Yield()
|
||||
GotoFirst(lblLoop) /*Check Hits and Stopped/Patrol State*/
|
||||
|
||||
Label(lblResetAndRunAgain)
|
||||
@@ -648,7 +662,7 @@ u8 m_RunToBondPersistent[] = {
|
||||
|
||||
Label(lblNext)
|
||||
Stop()
|
||||
AI_PRINT,'w','a','i','t','\n','\0',
|
||||
PRINT("wait\n")
|
||||
UnsetMyFlags2(FLAGS2_04)
|
||||
IFNewRandomGreaterThan(160, lblNext)
|
||||
SetMyFlags2(FLAGS2_04)
|
||||
@@ -660,7 +674,7 @@ u8 m_RunToBondPersistent[] = {
|
||||
IFICouldSeeBond(lblNext)/*BREAK*/
|
||||
IFBondMissedMe(lblNext) /*BREAK*/
|
||||
Yield()
|
||||
IFMyTimerLessThanSeconds(10, lblWaiting)
|
||||
IFMyTimerLessThanSeconds(10, lblWaiting)
|
||||
IFMyFlags2Has(FLAGS2_04, lblAlarmActivated)
|
||||
GotoFirst(lblRun)
|
||||
|
||||
@@ -684,11 +698,11 @@ u8 m_RunToBondPersistent[] = {
|
||||
};
|
||||
|
||||
/*D : 800373D0 */
|
||||
/**
|
||||
/**
|
||||
Wait for one second then return
|
||||
@return to caller if called with CALL -or- return to List set by SetReturnAiList - If not set will crash
|
||||
*/
|
||||
u8 m_WaitOneSecond[] = {
|
||||
u8 m_WaitOneSecond[] = {
|
||||
MyTimerStart()
|
||||
DO(lblRunning)
|
||||
IFMyTimerGreaterThanSeconds(1, lblNext) /* wait one second */
|
||||
@@ -699,12 +713,12 @@ u8 m_WaitOneSecond[] = {
|
||||
EndList()
|
||||
};
|
||||
|
||||
/*D:800373E0*/
|
||||
/*D:800373E0*/
|
||||
/**
|
||||
Exit level and set BG AI to nothing
|
||||
@return No Return - AI is Dead
|
||||
*/
|
||||
u8 m_EndLevel[] = {
|
||||
u8 m_EndLevel[] = {
|
||||
EndLevel()
|
||||
JumpTo( GAILIST_DEAD_AI)
|
||||
EndList()
|
||||
@@ -716,7 +730,7 @@ u8 m_EndLevel[] = {
|
||||
Act like a Standard Guard thereafter
|
||||
@return to Standard Guard
|
||||
*/
|
||||
u8 m_DrawPistolAndAttackBond[] = {
|
||||
u8 m_DrawPistolAndAttackBond[] = {
|
||||
SetMySpeedRating(40) /* fast boi watch out! */
|
||||
SetMyAccuracyRating(50)
|
||||
|
||||
@@ -729,7 +743,7 @@ u8 m_DrawPistolAndAttackBond[] = {
|
||||
DO(lblRunning)
|
||||
IFMyTimerGreaterThanTicks(20, lblNext) /* wait 1/3 of a second */
|
||||
LOOP(lblRunning)
|
||||
|
||||
|
||||
Label(lblNext)
|
||||
PlayAnimation(ANIM_fire_standing_draw_one_handed_weapon_fast,
|
||||
0,
|
||||
@@ -765,7 +779,7 @@ u8 m_DrawPistolAndAttackBond[] = {
|
||||
Remove Calling chr and set AI to nothing
|
||||
@return No Return - AI is Dead
|
||||
*/
|
||||
u8 m_RemoveSelf[] = {
|
||||
u8 m_RemoveSelf[] = {
|
||||
RemoveMeInstantly() /* remove self */
|
||||
JumpTo( GAILIST_DEAD_AI)
|
||||
EndList()
|
||||
@@ -775,7 +789,7 @@ u8 m_RemoveSelf[] = {
|
||||
|
||||
/*D:8003744C */
|
||||
/* global ai lists (glists) */
|
||||
AIListRecord g_GlobalAILists[] = {
|
||||
AIListRecord g_GlobalAILists[] = {
|
||||
{m_AimAtBond , GAILIST_AIM_AT_BOND},
|
||||
{m_DeadAI , GAILIST_DEAD_AI},
|
||||
{m_StandardGuard , GAILIST_STANDARD_GUARD},
|
||||
@@ -793,13 +807,12 @@ AIListRecord g_GlobalAILists[] = {
|
||||
{m_WaitOneSecond , GAILIST_WAIT_ONE_SECOND},
|
||||
{m_EndLevel , GAILIST_END_LEVEL},
|
||||
{m_DrawPistolAndAttackBond , GAILIST_DRAW_TT33_AND_ATTCK_BOND},
|
||||
{m_RemoveSelf , GAILIST_REMOVE_CHR}
|
||||
{m_RemoveSelf , GAILIST_REMOVE_CHR},
|
||||
{NULL, 0}
|
||||
};
|
||||
|
||||
/*D:800374DC */
|
||||
u32 D_800374DC[] = {0,0};
|
||||
|
||||
/*D:800374E4 */
|
||||
|
||||
/*D:800374E4 Also happens to be the same indices as levelID */
|
||||
char *setup_text_pointers[] = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, "UsetupsevbunkerZ",
|
||||
NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,"UsetupsiloZ",
|
||||
@@ -813,4 +826,4 @@ char *setup_text_pointers[] = {
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+365
-343
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -132,7 +132,7 @@ void chrSetChrPreset2(ChrRecord *self, s32 id, s32 id2);
|
||||
void chrSetPadPreset( ChrRecord *self, s32 padid);
|
||||
void chrSetPadPresetByChrnum(ChrRecord *self, s32 chrid, s32 padid);
|
||||
s32 chrIsTargetNearlyInSight(ChrRecord *arg0);
|
||||
bool sub_GAME_7F033F48(coord3d *pos, StandTile **arg1, f32 facing, bool b);
|
||||
bool chrAdjustPosForSpawn(coord3d *pos, StandTile **arg1, f32 facing, bool b);
|
||||
PropRecord *chrSpawnAtPad(ChrRecord *self, s32 bodynum, s32 headnum, s32 padid, AIListRecord *ailist, s32 flags);
|
||||
PropRecord *chrSpawnAtChr(ChrRecord *self, s32 bodynum, s32 headnum, s32 chrnum, AIListRecord *ailist, s32 flags);
|
||||
bool chrIfInPadRoom(ChrRecord *self, s32 chrnum, s32 padnum);
|
||||
|
||||
+3066
-3103
File diff suppressed because it is too large
Load Diff
@@ -110,12 +110,12 @@ void trigger_remote_mine_detonation(void);
|
||||
|
||||
void objDetach(PropRecord *prop);
|
||||
void objFreeEmbedmentOrProjectile(PropRecord *);
|
||||
bool alarmIsActive();
|
||||
bool alarmIsActive(void);
|
||||
void init_trigger_toxic_gas_effect(coord3d *source);
|
||||
void chrSetWeaponFlag4(ChrRecord *chr, GUNHAND hand);
|
||||
void sub_GAME_7F053B10(DoorRecord *door);
|
||||
void door7F053B10(DoorRecord *door);
|
||||
void doorActivatePortal(DoorRecord *door);
|
||||
void sub_GAME_7F052B00(DoorRecord *door);
|
||||
void door7F052B00(DoorRecord *door);
|
||||
s32 sub_GAME_7F0539B8(f32 vol);
|
||||
void monitorSetImageByNum(MonitorRecord *mon, s32 monAnimID);
|
||||
void propweaponSetDual(WeaponObjRecord *leftweapon, WeaponObjRecord *rightweapon);
|
||||
@@ -124,21 +124,23 @@ bool countdownTimerIsRunning(void);
|
||||
void countdownTimerSetRunning(bool enable);
|
||||
void countdownTimerSetValue(f32 time);
|
||||
void countdownTimerSetVisible(int clocklockbits, bool unset);
|
||||
void sub_GAME_7F04088C(ObjectRecord *baseobj, PadRecord *pad, Mtxf *matrix, StandTile *stan, PadRecord *pad2);
|
||||
void sub_GAME_7F04088C(ObjectRecord *baseobj, struct coord3d *pad, Mtxf *matrix, StandTile *stan, struct coord3d *pos2);
|
||||
void sub_GAME_7F040BA0(ObjectRecord *obj, struct coord3d *pos, Mtxf *arg2, StandTile *stan2, struct coord3d *pos2);
|
||||
bool chrEquipWeapon(WeaponObjRecord *wep, ChrRecord *chr);
|
||||
INV_ITEM_TYPE collect_or_interact_object(PropRecord *prop, bool showstring);
|
||||
INV_ITEM_TYPE propobjInteract(PropRecord *prop);
|
||||
s32 objGetDestroyedLevel(ObjectRecord *obj);
|
||||
void doorActivateWrapper(PropRecord *prop);
|
||||
bool objIsHealthy(ObjectRecord *self);
|
||||
ObjectRecord *weaponFindThrown(s32 ID);
|
||||
bool check_if_toxic_gas_activated();
|
||||
KeyRecord *weaponFindThrown(s32 ID);
|
||||
bool check_if_toxic_gas_activated(void);
|
||||
HatRecord *hatCreate(bool musthaveprop, bool musthavemodel, ModelFileHeader *modeldef);
|
||||
PropRecord* objInitWithAutoModel(ObjectRecord* obj);
|
||||
PropRecord* objInitWithModelDef(ObjectRecord* object, ModelFileHeader* header);
|
||||
Embedment *embedmentAllocate(void);
|
||||
void objDetach(PropRecord *prop);
|
||||
void sub_GAME_7F043650(struct WeaponObjRecord *arg0);
|
||||
s32 sub_GAME_7F0446B8(struct rect4f *arg0, s32 arg1, struct rect4f *arg2, s32 arg3);
|
||||
s32 chrobjTestPolygonsTouchingOrOverlap2D(struct rect4f *arg0, s32 arg1, struct rect4f *arg2, s32 arg3);
|
||||
s32 chrobjTestPointPolygonCollision(struct coord3d *arg0, f32 arg1, struct rect4f *arg2, s32 arg3);
|
||||
void maybe_detonate_object_and_its_children(PropRecord *arg0, f32 arg1, struct coord3d *arg2, s32 arg3, s32 owner);
|
||||
struct ModelRoData_BoundingBoxRecord* chrobjGetBboxFromObjectRecord(ObjectRecord *arg0);
|
||||
@@ -147,5 +149,9 @@ s32 sub_GAME_7F03F598(coord3d* pos, f32 arg1, BoundPadRecord *boundpads);
|
||||
void sub_GAME_7F0A1DA0(f32*, f32*, f32*, f32*, f32, f32, f32, f32, f32, f32);
|
||||
void sub_GAME_7F03F90C(Model *model, f32 *arg1, f32 *arg2, f32 *arg3, f32 *arg4);
|
||||
s32 sub_GAME_7F0448A8(struct PropRecord *arg0);
|
||||
PropRecord* sub_GAME_7F051DD8(struct ObjectRecord* arg0, ModelFileHeader* arg1);
|
||||
void sub_GAME_7F052030(WeaponObjRecord* arg0, ChrRecord* arg1);
|
||||
void drop_inventory(void);
|
||||
void sub_GAME_7F056690(void);
|
||||
|
||||
#endif
|
||||
|
||||
+674
-1568
File diff suppressed because it is too large
Load Diff
+13
-13
@@ -7,34 +7,34 @@ void cleanupExplosions(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
numExplosionEntries = 0;
|
||||
g_NumExplosionEntries = 0;
|
||||
viShake(0.0);
|
||||
|
||||
if (ptr_explosion_buf != NULL)
|
||||
if (g_ExplosionBuffer != NULL)
|
||||
{
|
||||
for (i = 0; i<EXPLOSION_BUFFER_LEN; i++)
|
||||
{
|
||||
if (ptr_explosion_buf[i].prop != NULL)
|
||||
if (g_ExplosionBuffer[i].prop != NULL)
|
||||
{
|
||||
chrpropDelist(ptr_explosion_buf[i].prop);
|
||||
chrpropDisable(ptr_explosion_buf[i].prop);
|
||||
chrpropFree(ptr_explosion_buf[i].prop);
|
||||
ptr_explosion_buf[i].prop = NULL;
|
||||
chrpropDelist(g_ExplosionBuffer[i].prop);
|
||||
chrpropDisable(g_ExplosionBuffer[i].prop);
|
||||
chrpropFree(g_ExplosionBuffer[i].prop);
|
||||
g_ExplosionBuffer[i].prop = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (ptr_smoke_buf != NULL)
|
||||
if (g_SmokeBuffer != NULL)
|
||||
{
|
||||
for (i = 0; i<SMOKE_BUFFER_LEN; i++)
|
||||
{
|
||||
if (ptr_smoke_buf[i].prop != NULL)
|
||||
if (g_SmokeBuffer[i].prop != NULL)
|
||||
{
|
||||
chrpropDelist(ptr_smoke_buf[i].prop);
|
||||
chrpropDisable(ptr_smoke_buf[i].prop);
|
||||
chrpropFree(ptr_smoke_buf[i].prop);
|
||||
ptr_smoke_buf[i].prop = NULL;
|
||||
chrpropDelist(g_SmokeBuffer[i].prop);
|
||||
chrpropDisable(g_SmokeBuffer[i].prop);
|
||||
chrpropFree(g_SmokeBuffer[i].prop);
|
||||
g_SmokeBuffer[i].prop = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,99 +1,17 @@
|
||||
#include <ultra64.h>
|
||||
#include "chr.h"
|
||||
|
||||
|
||||
void cleanupGuardData(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void cleanupGuardData(void) {
|
||||
void *temp_v0;
|
||||
s32 temp_s2;
|
||||
s32 phi_s0;
|
||||
s32 phi_s2;
|
||||
s32 phi_v1;
|
||||
|
||||
// Node 0
|
||||
if (g_NumChrSlots > 0)
|
||||
{
|
||||
// Node 1
|
||||
phi_s0 = 0;
|
||||
phi_s2 = 0;
|
||||
phi_v1 = g_NumChrSlots;
|
||||
loop_2:
|
||||
// Node 2
|
||||
temp_v0 = (g_ChrSlots + phi_s0);
|
||||
if (temp_v0->unk1C != 0)
|
||||
{
|
||||
// Node 3
|
||||
disable_sounds_attached_to_player_then_something(temp_v0->unk18);
|
||||
chrpropDelist((g_ChrSlots + phi_s0)->unk18);
|
||||
chrpropDisable((g_ChrSlots + phi_s0)->unk18);
|
||||
chrpropFree((g_ChrSlots + phi_s0)->unk18);
|
||||
phi_v1 = g_NumChrSlots;
|
||||
}
|
||||
// Node 4
|
||||
temp_s2 = (phi_s2 + 1);
|
||||
phi_s0 = (phi_s0 + 0x1dc);
|
||||
phi_s2 = temp_s2;
|
||||
phi_v1 = phi_v1;
|
||||
if (temp_s2 < phi_v1)
|
||||
{
|
||||
goto loop_2;
|
||||
for (i = 0; i < g_NumChrSlots; i++) {
|
||||
if (g_ChrSlots[i].model != 0) {
|
||||
disable_sounds_attached_to_player_then_something(g_ChrSlots[i].prop);
|
||||
chrpropDelist(g_ChrSlots[i].prop);
|
||||
chrpropDisable(g_ChrSlots[i].prop);
|
||||
chrpropFree(g_ChrSlots[i].prop);
|
||||
}
|
||||
}
|
||||
// Node 5
|
||||
return;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel cleanupGuardData
|
||||
/* 03BEE0 7F0073B0 3C038003 */ lui $v1, %hi(g_NumChrSlots)
|
||||
/* 03BEE4 7F0073B4 8C63CC68 */ lw $v1, %lo(g_NumChrSlots)($v1)
|
||||
/* 03BEE8 7F0073B8 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 03BEEC 7F0073BC AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 03BEF0 7F0073C0 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 03BEF4 7F0073C4 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 03BEF8 7F0073C8 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 03BEFC 7F0073CC 1860001D */ blez $v1, .L7F007444
|
||||
/* 03BF00 7F0073D0 00009025 */ move $s2, $zero
|
||||
/* 03BF04 7F0073D4 3C118003 */ lui $s1, %hi(g_ChrSlots)
|
||||
/* 03BF08 7F0073D8 2631CC64 */ addiu $s1, %lo(g_ChrSlots) # addiu $s1, $s1, -0x339c
|
||||
/* 03BF0C 7F0073DC 00008025 */ move $s0, $zero
|
||||
.L7F0073E0:
|
||||
/* 03BF10 7F0073E0 8E2E0000 */ lw $t6, ($s1)
|
||||
/* 03BF14 7F0073E4 01D01021 */ addu $v0, $t6, $s0
|
||||
/* 03BF18 7F0073E8 8C4F001C */ lw $t7, 0x1c($v0)
|
||||
/* 03BF1C 7F0073EC 51E00012 */ beql $t7, $zero, .L7F007438
|
||||
/* 03BF20 7F0073F0 26520001 */ addiu $s2, $s2, 1
|
||||
/* 03BF24 7F0073F4 0FC08105 */ jal disable_sounds_attached_to_player_then_something
|
||||
/* 03BF28 7F0073F8 8C440018 */ lw $a0, 0x18($v0)
|
||||
/* 03BF2C 7F0073FC 8E380000 */ lw $t8, ($s1)
|
||||
/* 03BF30 7F007400 0310C821 */ addu $t9, $t8, $s0
|
||||
/* 03BF34 7F007404 0FC0E94E */ jal chrpropDelist
|
||||
/* 03BF38 7F007408 8F240018 */ lw $a0, 0x18($t9)
|
||||
/* 03BF3C 7F00740C 8E280000 */ lw $t0, ($s1)
|
||||
/* 03BF40 7F007410 01104821 */ addu $t1, $t0, $s0
|
||||
/* 03BF44 7F007414 0FC0E905 */ jal chrpropDisable
|
||||
/* 03BF48 7F007418 8D240018 */ lw $a0, 0x18($t1)
|
||||
/* 03BF4C 7F00741C 8E2A0000 */ lw $t2, ($s1)
|
||||
/* 03BF50 7F007420 01505821 */ addu $t3, $t2, $s0
|
||||
/* 03BF54 7F007424 0FC0E921 */ jal chrpropFree
|
||||
/* 03BF58 7F007428 8D640018 */ lw $a0, 0x18($t3)
|
||||
/* 03BF5C 7F00742C 3C038003 */ lui $v1, %hi(g_NumChrSlots)
|
||||
/* 03BF60 7F007430 8C63CC68 */ lw $v1, %lo(g_NumChrSlots)($v1)
|
||||
/* 03BF64 7F007434 26520001 */ addiu $s2, $s2, 1
|
||||
.L7F007438:
|
||||
/* 03BF68 7F007438 0243082A */ slt $at, $s2, $v1
|
||||
/* 03BF6C 7F00743C 1420FFE8 */ bnez $at, .L7F0073E0
|
||||
/* 03BF70 7F007440 261001DC */ addiu $s0, $s0, 0x1dc
|
||||
.L7F007444:
|
||||
/* 03BF74 7F007444 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 03BF78 7F007448 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 03BF7C 7F00744C 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 03BF80 7F007450 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 03BF84 7F007454 03E00008 */ jr $ra
|
||||
/* 03BF88 7F007458 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+12
-108
@@ -1,113 +1,17 @@
|
||||
#include <ultra64.h>
|
||||
#include "bondtypes.h"
|
||||
#include "objective_status.h"
|
||||
|
||||
|
||||
void cleanupObjectives(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void cleanupObjectives(s32 stage) {
|
||||
|
||||
for (i = 0; i < OBJECTIVES_MAX; i++)
|
||||
{
|
||||
if (objective_ptrs[i] != NULL && (objective_ptrs[i]->unkD & 1) && objectiveStatuses[i] != OBJECTIVESTATUS_FAILED)
|
||||
{
|
||||
objectiveStatuses[i] = OBJECTIVESTATUS_COMPLETE;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel cleanupObjectives
|
||||
/* 03C0C0 7F007590 3C028007 */ lui $v0, %hi(objective_ptrs)
|
||||
/* 03C0C4 7F007594 8C425D30 */ lw $v0, %lo(objective_ptrs)($v0)
|
||||
/* 03C0C8 7F007598 3C048007 */ lui $a0, %hi(objective_ptrs+8)
|
||||
/* 03C0CC 7F00759C 24845D38 */ addiu $a0, %lo(objective_ptrs+8) # addiu $a0, $a0, 0x5d38
|
||||
/* 03C0D0 7F0075A0 1040000C */ beqz $v0, .L7F0075D4
|
||||
/* 03C0D4 7F0075A4 24030008 */ li $v1, 8
|
||||
/* 03C0D8 7F0075A8 904E000E */ lbu $t6, 0xe($v0)
|
||||
/* 03C0DC 7F0075AC 3C188007 */ lui $t8, %hi(dword_CODE_bss_80075D58)
|
||||
/* 03C0E0 7F0075B0 31CF0001 */ andi $t7, $t6, 1
|
||||
/* 03C0E4 7F0075B4 11E00007 */ beqz $t7, .L7F0075D4
|
||||
/* 03C0E8 7F0075B8 00000000 */ nop
|
||||
/* 03C0EC 7F0075BC 8F185D58 */ lw $t8, %lo(dword_CODE_bss_80075D58)($t8)
|
||||
/* 03C0F0 7F0075C0 24050002 */ li $a1, 2
|
||||
/* 03C0F4 7F0075C4 24190001 */ li $t9, 1
|
||||
/* 03C0F8 7F0075C8 10B80002 */ beq $a1, $t8, .L7F0075D4
|
||||
/* 03C0FC 7F0075CC 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58)
|
||||
/* 03C100 7F0075D0 AC395D58 */ sw $t9, %lo(dword_CODE_bss_80075D58)($at)
|
||||
.L7F0075D4:
|
||||
/* 03C104 7F0075D4 3C028007 */ lui $v0, %hi(objective_ptrs+4)
|
||||
/* 03C108 7F0075D8 8C425D34 */ lw $v0, %lo(objective_ptrs+4)($v0)
|
||||
/* 03C10C 7F0075DC 3C088007 */ lui $t0, %hi(dword_CODE_bss_80075D58)
|
||||
/* 03C110 7F0075E0 25085D58 */ addiu $t0, %lo(dword_CODE_bss_80075D58) # addiu $t0, $t0, 0x5d58
|
||||
/* 03C114 7F0075E4 1040000C */ beqz $v0, .L7F007618
|
||||
/* 03C118 7F0075E8 24050002 */ li $a1, 2
|
||||
/* 03C11C 7F0075EC 9049000E */ lbu $t1, 0xe($v0)
|
||||
/* 03C120 7F0075F0 3C0B8007 */ lui $t3, %hi(dword_CODE_bss_80075D58+4)
|
||||
/* 03C124 7F0075F4 312A0001 */ andi $t2, $t1, 1
|
||||
/* 03C128 7F0075F8 11400007 */ beqz $t2, .L7F007618
|
||||
/* 03C12C 7F0075FC 00000000 */ nop
|
||||
/* 03C130 7F007600 8D6B5D5C */ lw $t3, %lo(dword_CODE_bss_80075D58+4)($t3)
|
||||
/* 03C134 7F007604 240C0001 */ li $t4, 1
|
||||
/* 03C138 7F007608 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58+4)
|
||||
/* 03C13C 7F00760C 10AB0002 */ beq $a1, $t3, .L7F007618
|
||||
/* 03C140 7F007610 00000000 */ nop
|
||||
/* 03C144 7F007614 AC2C5D5C */ sw $t4, %lo(dword_CODE_bss_80075D58+4)($at)
|
||||
.L7F007618:
|
||||
/* 03C148 7F007618 3C068007 */ lui $a2, %hi(dword_CODE_bss_80075D58)
|
||||
/* 03C14C 7F00761C 24C65D58 */ addiu $a2, %lo(dword_CODE_bss_80075D58) # addiu $a2, $a2, 0x5d58
|
||||
/* 03C150 7F007620 24070001 */ li $a3, 1
|
||||
.L7F007624:
|
||||
/* 03C154 7F007624 8C820000 */ lw $v0, ($a0)
|
||||
/* 03C158 7F007628 5040000B */ beql $v0, $zero, .L7F007658
|
||||
/* 03C15C 7F00762C 8C820004 */ lw $v0, 4($a0)
|
||||
/* 03C160 7F007630 904D000E */ lbu $t5, 0xe($v0)
|
||||
/* 03C164 7F007634 00C31021 */ addu $v0, $a2, $v1
|
||||
/* 03C168 7F007638 31AE0001 */ andi $t6, $t5, 1
|
||||
/* 03C16C 7F00763C 51C00006 */ beql $t6, $zero, .L7F007658
|
||||
/* 03C170 7F007640 8C820004 */ lw $v0, 4($a0)
|
||||
/* 03C174 7F007644 8C4F0000 */ lw $t7, ($v0)
|
||||
/* 03C178 7F007648 50AF0003 */ beql $a1, $t7, .L7F007658
|
||||
/* 03C17C 7F00764C 8C820004 */ lw $v0, 4($a0)
|
||||
/* 03C180 7F007650 AC470000 */ sw $a3, ($v0)
|
||||
/* 03C184 7F007654 8C820004 */ lw $v0, 4($a0)
|
||||
.L7F007658:
|
||||
/* 03C188 7F007658 5040000B */ beql $v0, $zero, .L7F007688
|
||||
/* 03C18C 7F00765C 8C820008 */ lw $v0, 8($a0)
|
||||
/* 03C190 7F007660 9058000E */ lbu $t8, 0xe($v0)
|
||||
/* 03C194 7F007664 00C31021 */ addu $v0, $a2, $v1
|
||||
/* 03C198 7F007668 33190001 */ andi $t9, $t8, 1
|
||||
/* 03C19C 7F00766C 53200006 */ beql $t9, $zero, .L7F007688
|
||||
/* 03C1A0 7F007670 8C820008 */ lw $v0, 8($a0)
|
||||
/* 03C1A4 7F007674 8C490004 */ lw $t1, 4($v0)
|
||||
/* 03C1A8 7F007678 50A90003 */ beql $a1, $t1, .L7F007688
|
||||
/* 03C1AC 7F00767C 8C820008 */ lw $v0, 8($a0)
|
||||
/* 03C1B0 7F007680 AC470004 */ sw $a3, 4($v0)
|
||||
/* 03C1B4 7F007684 8C820008 */ lw $v0, 8($a0)
|
||||
.L7F007688:
|
||||
/* 03C1B8 7F007688 5040000B */ beql $v0, $zero, .L7F0076B8
|
||||
/* 03C1BC 7F00768C 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03C1C0 7F007690 904A000E */ lbu $t2, 0xe($v0)
|
||||
/* 03C1C4 7F007694 00C31021 */ addu $v0, $a2, $v1
|
||||
/* 03C1C8 7F007698 314B0001 */ andi $t3, $t2, 1
|
||||
/* 03C1CC 7F00769C 51600006 */ beql $t3, $zero, .L7F0076B8
|
||||
/* 03C1D0 7F0076A0 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03C1D4 7F0076A4 8C4C0008 */ lw $t4, 8($v0)
|
||||
/* 03C1D8 7F0076A8 50AC0003 */ beql $a1, $t4, .L7F0076B8
|
||||
/* 03C1DC 7F0076AC 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 03C1E0 7F0076B0 AC470008 */ sw $a3, 8($v0)
|
||||
/* 03C1E4 7F0076B4 8C82000C */ lw $v0, 0xc($a0)
|
||||
.L7F0076B8:
|
||||
/* 03C1E8 7F0076B8 24840010 */ addiu $a0, $a0, 0x10
|
||||
/* 03C1EC 7F0076BC 1040000A */ beqz $v0, .L7F0076E8
|
||||
/* 03C1F0 7F0076C0 00000000 */ nop
|
||||
/* 03C1F4 7F0076C4 904D000E */ lbu $t5, 0xe($v0)
|
||||
/* 03C1F8 7F0076C8 00C31021 */ addu $v0, $a2, $v1
|
||||
/* 03C1FC 7F0076CC 31AE0001 */ andi $t6, $t5, 1
|
||||
/* 03C200 7F0076D0 11C00005 */ beqz $t6, .L7F0076E8
|
||||
/* 03C204 7F0076D4 00000000 */ nop
|
||||
/* 03C208 7F0076D8 8C4F000C */ lw $t7, 0xc($v0)
|
||||
/* 03C20C 7F0076DC 10AF0002 */ beq $a1, $t7, .L7F0076E8
|
||||
/* 03C210 7F0076E0 00000000 */ nop
|
||||
/* 03C214 7F0076E4 AC47000C */ sw $a3, 0xc($v0)
|
||||
.L7F0076E8:
|
||||
/* 03C218 7F0076E8 1488FFCE */ bne $a0, $t0, .L7F007624
|
||||
/* 03C21C 7F0076EC 24630010 */ addiu $v1, $v1, 0x10
|
||||
/* 03C220 7F0076F0 03E00008 */ jr $ra
|
||||
/* 03C224 7F0076F4 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
+57
-138
@@ -2,157 +2,76 @@
|
||||
|
||||
#include <bondtypes.h>
|
||||
#include "chrai.h"
|
||||
#include "chrobjhandler.h"
|
||||
#include "cleanup_objects.h"
|
||||
#include "loadobjectmodel.h"
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
/**
|
||||
* decomp status:
|
||||
* - compiles: yes
|
||||
* - stack resize: ok
|
||||
* - identical instructions: fail
|
||||
* - identical registers: fail
|
||||
*
|
||||
* notes: something wrong with the comparison to 0x38. Also the first compare to NULL is wrong.
|
||||
*/
|
||||
void cleanupObjects(s32 stage)
|
||||
{
|
||||
object_standard *obj = g_CurrentSetup.propDefs;
|
||||
|
||||
if (obj != NULL)
|
||||
u32 *obj = (u32)g_CurrentSetup.propDefs;
|
||||
|
||||
if (obj)
|
||||
{
|
||||
for (; obj->type != 0x30;)
|
||||
while ((u8)obj[0] != PROPDEF_END)
|
||||
{
|
||||
switch (obj->type)
|
||||
switch ((u8)obj[0])
|
||||
{
|
||||
case 1:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 17:
|
||||
case 20:
|
||||
case 21:
|
||||
case 36:
|
||||
case 39:
|
||||
case 40:
|
||||
case 41:
|
||||
case 42:
|
||||
case 43:
|
||||
case 45:
|
||||
case 47:
|
||||
case PROPDEF_DOOR:
|
||||
case PROPDEF_PROP:
|
||||
case PROPDEF_KEY:
|
||||
case PROPDEF_ALARM:
|
||||
case PROPDEF_CCTV:
|
||||
case PROPDEF_MAGAZINE:
|
||||
case PROPDEF_COLLECTABLE:
|
||||
case PROPDEF_MONITOR:
|
||||
case PROPDEF_MULTI_MONITOR:
|
||||
case PROPDEF_RACK:
|
||||
case PROPDEF_AUTOGUN:
|
||||
case PROPDEF_HAT:
|
||||
case PROPDEF_AMMO:
|
||||
case PROPDEF_ARMOUR:
|
||||
case PROPDEF_GAS_RELEASING:
|
||||
case PROPDEF_VEHICHLE:
|
||||
case PROPDEF_AIRCRAFT:
|
||||
case PROPDEF_UNK41:
|
||||
case PROPDEF_GLASS:
|
||||
case PROPDEF_SAFE:
|
||||
case PROPDEF_TANK:
|
||||
case PROPDEF_TINTED_GLASS:
|
||||
objFreePermanently((ObjectRecord *)obj, 1);
|
||||
break;
|
||||
case PROPDEF_DOOR_SCALE:
|
||||
case PROPDEF_GUARD:
|
||||
case PROPDEF_LINK:
|
||||
case PROPDEF_DEBRIS:
|
||||
case PROPDEF_UNK16:
|
||||
case PROPDEF_GUARD_ATTRIBUTE:
|
||||
case PROPDEF_SWITCH:
|
||||
case PROPDEF_TAG:
|
||||
case PROPDEF_OBJECTIVE_START:
|
||||
case PROPDEF_OBJECTIVE_END:
|
||||
case PROPDEF_OBJECTIVE_DESTROY_OBJECT:
|
||||
case PROPDEF_OBJECTIVE_COMPLETE_CONDITION:
|
||||
case PROPDEF_OBJECTIVE_FAIL_CONDITION:
|
||||
case PROPDEF_OBJECTIVE_COLLECT_OBJECT:
|
||||
case PROPDEF_OBJECTIVE_DEPOSIT_OBJECT:
|
||||
case PROPDEF_OBJECTIVE_PHOTOGRAPH:
|
||||
case PROPDEF_OBJECTIVE_NULL:
|
||||
case PROPDEF_OBJECTIVE_ENTER_ROOM:
|
||||
case PROPDEF_OBJECTIVE_DEPOSIT_OBJECT_IN_ROOM:
|
||||
case PROPDEF_OBJECTIVE_COPY_ITEM:
|
||||
case PROPDEF_WATCH_MENU_OBJECTIVE_TEXT:
|
||||
case PROPDEF_RENAME:
|
||||
case PROPDEF_LOCK_DOOR:
|
||||
case PROPDEF_SAFE_ITEM:
|
||||
case PROPDEF_CAMERAPOS:
|
||||
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
obj = &(((s32*)obj)[sizepropdef(obj)]);
|
||||
obj = obj + sizepropdef(obj) ;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.rdata
|
||||
glabel jpt_8004F210
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.word .L7F00755C
|
||||
.word .L7F007550
|
||||
.text
|
||||
glabel cleanupObjects
|
||||
/* 03C030 7F007500 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 03C034 7F007504 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 03C038 7F007508 3C108007 */ lui $s0, %hi(g_CurrentSetup+0x0c)
|
||||
/* 03C03C 7F00750C 8E105D0C */ lw $s0, %lo(g_CurrentSetup+0x0c)($s0)
|
||||
/* 03C040 7F007510 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 03C044 7F007514 AFA40020 */ sw $a0, 0x20($sp)
|
||||
/* 03C048 7F007518 52000019 */ beql $s0, $zero, .L7F007580
|
||||
/* 03C04C 7F00751C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 03C050 7F007520 92030003 */ lbu $v1, 3($s0)
|
||||
/* 03C054 7F007524 24010030 */ li $at, 48
|
||||
/* 03C058 7F007528 10610014 */ beq $v1, $at, .L7F00757C
|
||||
/* 03C05C 7F00752C 246EFFFF */ addiu $t6, $v1, -1
|
||||
.L7F007530:
|
||||
/* 03C060 7F007530 2DC1002F */ sltiu $at, $t6, 0x2f
|
||||
/* 03C064 7F007534 10200009 */ beqz $at, .L7F00755C
|
||||
/* 03C068 7F007538 000E7080 */ sll $t6, $t6, 2
|
||||
/* 03C06C 7F00753C 3C018005 */ lui $at, %hi(jpt_8004F210)
|
||||
/* 03C070 7F007540 002E0821 */ addu $at, $at, $t6
|
||||
/* 03C074 7F007544 8C2EF210 */ lw $t6, %lo(jpt_8004F210)($at)
|
||||
/* 03C078 7F007548 01C00008 */ jr $t6
|
||||
/* 03C07C 7F00754C 00000000 */ nop
|
||||
.L7F007550:
|
||||
/* 03C080 7F007550 02002025 */ move $a0, $s0
|
||||
/* 03C084 7F007554 0FC10409 */ jal objFreePermanently
|
||||
/* 03C088 7F007558 24050001 */ li $a1, 1
|
||||
.L7F00755C:
|
||||
/* 03C08C 7F00755C 0FC15A3D */ jal sizepropdef
|
||||
/* 03C090 7F007560 02002025 */ move $a0, $s0
|
||||
/* 03C094 7F007564 00027880 */ sll $t7, $v0, 2
|
||||
/* 03C098 7F007568 01F08021 */ addu $s0, $t7, $s0
|
||||
/* 03C09C 7F00756C 92030003 */ lbu $v1, 3($s0)
|
||||
/* 03C0A0 7F007570 24010030 */ li $at, 48
|
||||
/* 03C0A4 7F007574 5461FFEE */ bnel $v1, $at, .L7F007530
|
||||
/* 03C0A8 7F007578 246EFFFF */ addiu $t6, $v1, -1
|
||||
.L7F00757C:
|
||||
/* 03C0AC 7F00757C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L7F007580:
|
||||
/* 03C0B0 7F007580 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 03C0B4 7F007584 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 03C0B8 7F007588 03E00008 */ jr $ra
|
||||
/* 03C0BC 7F00758C 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -146,7 +146,12 @@ void debug_weapon_load_table(void)
|
||||
|
||||
for (i = 0; tmp.array[i] >= 0; i++)
|
||||
{
|
||||
/*if(*/
|
||||
modelLoad(tmp.array[i]);
|
||||
/*){break;}*/
|
||||
if (1);
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("loaded weapon obj=%d", tmp.array[i]);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ void nullsub_32(void) {
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f08fe08
|
||||
*/
|
||||
void debmenuSetScaleIndex(s32 param_1) {
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
g_DMenuScaleIndex = param_1;
|
||||
@@ -46,7 +49,9 @@ void debmenuSetScaleIndex(s32 param_1) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f08fe14
|
||||
*/
|
||||
void debmenuSetMenu(char **labels, s32 (*positions)[2], s32 *offsets)
|
||||
{
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
@@ -63,7 +68,9 @@ void debmenuSetMenu(char **labels, s32 (*positions)[2], s32 *offsets)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f08fe74
|
||||
*/
|
||||
Gfx *debugmenuRender(Gfx *gdl)
|
||||
{
|
||||
#if defined (LEFTOVERDEBUG)
|
||||
@@ -86,7 +93,9 @@ Gfx *debugmenuRender(Gfx *gdl)
|
||||
return gdl;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f09000c
|
||||
*/
|
||||
void sub_GAME_7F09000C(int a0,int a1,int a2)
|
||||
{
|
||||
#if defined (LEFTOVERDEBUG)
|
||||
@@ -110,7 +119,9 @@ void sub_GAME_7F09000C(int a0,int a1,int a2)
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f0901b0
|
||||
*/
|
||||
s32 get_highlighted_debug_option(void) {
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
return g_DMenuSelectedOption;
|
||||
@@ -119,14 +130,18 @@ s32 get_highlighted_debug_option(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f0901bc
|
||||
*/
|
||||
void set_highlighted_debug_option(s32 value) {
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
g_DMenuSelectedOption = value;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f0901c8
|
||||
*/
|
||||
void gotoAboveDebugOption(void)
|
||||
{
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
@@ -152,7 +167,9 @@ void gotoAboveDebugOption(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f090248
|
||||
*/
|
||||
void gotoBelowDebugOption(void)
|
||||
{
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
@@ -181,6 +198,9 @@ void gotoBelowDebugOption(void)
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f0902c0
|
||||
*/
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
void gotoRightDebugOption(void)
|
||||
{
|
||||
@@ -233,7 +253,9 @@ void gotoRightDebugOption(void)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f09039c
|
||||
*/
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
void gotoLeftDebugOption(void)
|
||||
{
|
||||
|
||||
+132
-114
@@ -194,13 +194,13 @@ char *mcm_strings[] = {
|
||||
};
|
||||
|
||||
//D:80036F64
|
||||
s32 debug_render_raster = 2;
|
||||
s32 debug_render_raster = DEB_BOND_VIEW;
|
||||
//D:80036F68
|
||||
s32 debug_freeze_processing = 2;
|
||||
s32 debug_freeze_processing = DEB_BOND_VIEW;
|
||||
//D:80036F6C
|
||||
s32 g_DebugMode = 2;
|
||||
s32 g_DebugMode = DEB_BOND_VIEW;
|
||||
//D:80036F70
|
||||
s32 g_DebugHighlightedOption = 2;
|
||||
s32 g_DebugHighlightedOption = DEB_BOND_VIEW;
|
||||
//D:80036F74
|
||||
s32 memusage_display_flag = FALSE;
|
||||
//D:80036F78
|
||||
@@ -304,6 +304,9 @@ coord3d player_pos_x = {0};
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f090490
|
||||
*/
|
||||
void debugmenuUpdate(void)
|
||||
{
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
@@ -312,15 +315,21 @@ void debugmenuUpdate(void)
|
||||
}
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/*
|
||||
* Address: 0x7f0904c4
|
||||
*/
|
||||
void debmenuHandleMoveView(void)
|
||||
{
|
||||
sub_GAME_7F0916F4();
|
||||
resetDebugCameraToPlayerPosition();
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
debug_render_raster = debug_freeze_processing = g_DebugHighlightedOption;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/*
|
||||
* Address: 0x7f090508
|
||||
*/
|
||||
void debmenuHandleStanView(void)
|
||||
{
|
||||
maybe_solo_intro_camera_handler();
|
||||
@@ -330,6 +339,9 @@ void debmenuHandleStanView(void)
|
||||
#endif
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/*
|
||||
* Address: 0x7f09054c
|
||||
*/
|
||||
void debmenuHandleBondView(void)
|
||||
{
|
||||
maybe_solo_intro_camera_handler();
|
||||
@@ -339,12 +351,18 @@ void debmenuHandleBondView(void)
|
||||
#endif
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/*
|
||||
* Address: 0x7f090590
|
||||
*/
|
||||
void removed_do_debug_profile_flag_false(void) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/*
|
||||
* Address: 0x7f090598
|
||||
*/
|
||||
void removed_do_debug_profile_flag_true(void) {
|
||||
return;
|
||||
}
|
||||
@@ -444,124 +462,124 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
{
|
||||
switch (get_highlighted_debug_option()) {
|
||||
|
||||
case 0: // move view
|
||||
case DEB_MOVE_VIEW: // move view
|
||||
debmenuHandleMoveView();
|
||||
break;
|
||||
|
||||
case 1: // stan view
|
||||
case DEB_STAN_VIEW: // stan view
|
||||
debmenuHandleStanView();
|
||||
break;
|
||||
|
||||
case 2: // bond view
|
||||
case DEB_BOND_VIEW: // bond view
|
||||
debmenuHandleBondView();
|
||||
break;
|
||||
|
||||
case 3: // level
|
||||
case DEB_LEVEL: // level
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 4: // region
|
||||
case DEB_REGION: // region
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 5: // scale
|
||||
case DEB_SCALE: // scale
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 8: // select anim
|
||||
case DEB_SELANIM: // select anim
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 9: // gun pos
|
||||
case DEB_GUNPOS: // gun pos
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 10: // flash colour
|
||||
case DEB_FLASHCOLOR: // flash colour
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 11: // hit colour
|
||||
case DEB_HITCOLOR: // hit colour
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
#ifdef XBLADEBUG
|
||||
case 50: //marg top
|
||||
case DEB_MARGTOP: //marg top
|
||||
/*
|
||||
printf("Margins: %5.2f.0F %5.2f.0F %5.2f.0F %5.2f.0F\n",
|
||||
Function_82395958(1.0,0.0,0),
|
||||
Function_82395958(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,1),
|
||||
Function_82395958(1.0,0.0,2),
|
||||
Function_82395958(1.0,0.0,3));
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,0),
|
||||
bgTimesAddViewRelatedMaybe(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,1),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,2),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,3));
|
||||
//*/
|
||||
case 51: //marg bot
|
||||
case DEB_MARGBOT: //marg bot
|
||||
/*
|
||||
printf("Margins: %5.2f.0F %5.2f.0F %5.2f.0F %5.2f.0F\n",
|
||||
Function_82395958(1.0,0.0,0),
|
||||
Function_82395958(1.0,0.0,1),
|
||||
Function_82395958(1.0,0.0,2),
|
||||
Function_82395958(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,3));
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,0),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,1),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,2),
|
||||
bgTimesAddViewRelatedMaybe(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,3));
|
||||
//*/
|
||||
case 52: //marg left
|
||||
case DEB_MARGLEFT: //marg left
|
||||
/*
|
||||
printf("Margins: %5.2f.0F %5.2f.0F %5.2f.0F %5.2f.0F\n",
|
||||
Function_82395958(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,0),
|
||||
Function_82395958(1.0,0.0,1),
|
||||
Function_82395958(1.0,0.0,2),
|
||||
Function_82395958(1.0,0.0,3));
|
||||
bgTimesAddViewRelatedMaybe(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,0),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,1),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,2),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,3));
|
||||
//*/
|
||||
case 53: //marg right
|
||||
case DEB_MARGRIGHT: //marg right
|
||||
/*
|
||||
printf("Margins: %5.2f.0F %5.2f.0F %5.2f.0F %5.2f.0F\n",
|
||||
Function_82395958(1.0,0.0,0),
|
||||
Function_82395958(1.0,0.0,1),
|
||||
Function_82395958(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,2),
|
||||
Function_82395958(1.0,0.0,3));
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,0),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,1),
|
||||
bgTimesAddViewRelatedMaybe(1.0,(((button_pressed & 1) >> 5 & 1 ^ 1) - ((button_pressed & 2) >> 5 & 1 ^ 1)) * 4.0,2),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,3));
|
||||
//*/
|
||||
case 54: //marg reset
|
||||
case DEB_MARGRESET: //marg reset
|
||||
/*
|
||||
printf("Margins: %5.2f.0F %5.2f.0F %5.2f.0F %5.2f.0F\n",
|
||||
Function_82395958(1.0,0.0,0),
|
||||
Function_82395958(1.0,0.0,1),
|
||||
Function_82395958(1.0,0.0,2),
|
||||
Function_82395958(1.0,0.0,3));
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,0),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,1),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,2),
|
||||
bgTimesAddViewRelatedMaybe(1.0,0.0,3));
|
||||
//*/
|
||||
break;
|
||||
#endif
|
||||
case 55: // screen size
|
||||
case DEB_SCREENSIZE: // screen size
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 56: // screen pos
|
||||
case DEB_SCREENPOS: // screen pos
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 12: // music
|
||||
case DEB_MUSIC: // music
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 26: // port close
|
||||
case 27: // port inf
|
||||
case 28: // port approx
|
||||
case DEB_PORTCLOSE: // port close
|
||||
case DEB_PORT_INF: // port inf
|
||||
case DEB_PORT_APPROX: // port approx
|
||||
debug_portal_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 13: // sfx
|
||||
case DEB_SFX: // sfx
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 14: // invincible
|
||||
case DEB_INVINCIBLE: // invincible
|
||||
set_bondata_invincible_flag(get_bondata_invincible_flag() == 0);
|
||||
break;
|
||||
|
||||
case 15: // visible
|
||||
case DEB_VISIBILE: // visible
|
||||
bondviewSetVisibleToGuardsFlag(bondviewGetVisibleToGuardsFlag() == 0);
|
||||
break;
|
||||
|
||||
case 16: // collisions
|
||||
set_obj_collision_flag(get_obj_collision_flag() == 0);
|
||||
case DEB_COLLISIONS: // collisions
|
||||
set_obj_collision_flag(get_obj_collision_flag() == FALSE);
|
||||
break;
|
||||
|
||||
case 17: // all guns
|
||||
case DEB_ALLGUNS: // all guns
|
||||
{
|
||||
for (i1 = 0; i1 < getPlayerCount(); i1++)
|
||||
{
|
||||
@@ -571,7 +589,7 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
break;
|
||||
}
|
||||
|
||||
case 18: // max ammo
|
||||
case DEB_MAXAMMO: // max ammo
|
||||
{
|
||||
sp54 = get_cur_playernum();
|
||||
for (i2 = 0; i2 < getPlayerCount(); i2++)
|
||||
@@ -583,7 +601,7 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
break;
|
||||
}
|
||||
|
||||
case 19: // display speed
|
||||
case DEB_DISPSPEED: // display speed
|
||||
memusage_display_flag ^= 1;
|
||||
if (memusage_display_flag == 0)
|
||||
{
|
||||
@@ -591,148 +609,148 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
}
|
||||
break;
|
||||
|
||||
case 20: // background
|
||||
case DEB_BG: // background
|
||||
debug_do_draw_bg ^= 1;
|
||||
break;
|
||||
|
||||
case 21: // props
|
||||
case DEB_PROPS: // props
|
||||
debug_do_draw_obj ^= 1;
|
||||
break;
|
||||
|
||||
case 22: // stan hit
|
||||
case DEB_STANHIT: // stan hit
|
||||
debug_stanhit_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 23: // stan region
|
||||
case DEB_STANREGION: // stan region
|
||||
debug_stanregion_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 24: // stan problems
|
||||
case DEB_STANPROBLEMS: // stan problems
|
||||
debug_stan_problems_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 25: // print man pos
|
||||
case DEB_PRTMANPOS: // print man pos
|
||||
debug_man_pos_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 75: // testing man pos
|
||||
case DEB_TESTINGMANPOS: // testing man pos
|
||||
g_DebugManPos ^= 1;
|
||||
break;
|
||||
|
||||
case 6: // play title
|
||||
case DEB_PLAYTITLE: // play title
|
||||
bossSetLoadedStage(LEVELID_TITLE);
|
||||
break;
|
||||
|
||||
case 7: // bond die
|
||||
case DEB_BONDDIE: // bond die
|
||||
bondviewKillCurrentPlayer();
|
||||
break;
|
||||
|
||||
case 29: // pr room loads
|
||||
case DEB_PRROOMLOADS: // pr room loads
|
||||
debug_prroomloads_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 30: // show mem use
|
||||
case DEB_SHOWMEMUSE: // show mem use
|
||||
bossEnableShowMemUseFlag();
|
||||
break;
|
||||
|
||||
case 31: // show mem bars
|
||||
case DEB_SHOWMEMBARS: // show mem bars
|
||||
bossMemBarsFlagToggle();
|
||||
break;
|
||||
|
||||
case 32: // grab rgb
|
||||
case DEB_GRABRGB: // grab rgb
|
||||
pscreehshotFlagRgb->flag = 1;
|
||||
osViBlack(1);
|
||||
viSetColorMode32Bit();
|
||||
break;
|
||||
|
||||
case 33: // grab jpeg
|
||||
case DEB_GRABJPG: // grab jpeg
|
||||
pscreehshotFlagJpg->flag = 1;
|
||||
osViBlack(1);
|
||||
viSetColorMode32Bit();
|
||||
break;
|
||||
|
||||
case 34: // grab task
|
||||
case DEB_TASKGRAB: // grab task
|
||||
debug_enable_taskgrab_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 35: //rnd walk
|
||||
case DEB_RNDWALK: //rnd walk
|
||||
break;
|
||||
|
||||
case 36: // record ramrom
|
||||
case DEB_RECRAMROM: // record ramrom
|
||||
setRamRomRecordSlot(0);
|
||||
break;
|
||||
|
||||
case 37: // record 1
|
||||
case DEB_RECORD1: // record 1
|
||||
setRamRomRecordSlot(1);
|
||||
break;
|
||||
|
||||
case 38: // record 2
|
||||
case DEB_RECORD2: // record 2
|
||||
setRamRomRecordSlot(2);
|
||||
break;
|
||||
|
||||
case 39: // record 3
|
||||
case DEB_RECORD3: // record 3
|
||||
setRamRomRecordSlot(3);
|
||||
break;
|
||||
|
||||
case 40: // replay ramrom
|
||||
case DEB_REPLAYRAMROM: // replay ramrom
|
||||
replay_recorded_ramrom_from_indy();
|
||||
break;
|
||||
|
||||
case 41: // save ramrom
|
||||
case DEB_SAVERAMROM: // save ramrom
|
||||
save_ramrom_to_devtool();
|
||||
break;
|
||||
|
||||
case 42: // load ramrom
|
||||
case DEB_LOADRAMROM: // load ramrom
|
||||
load_ramrom_from_devtool();
|
||||
break;
|
||||
|
||||
case 43: // auto y aim
|
||||
case DEB_AUTOAIMY: // auto y aim
|
||||
set_BONDdata_autoaim_y(get_BONDdata_autoaim_y() == 0);
|
||||
break;
|
||||
|
||||
case 44: // auto x aim
|
||||
case DEB_AUTOAIMX: // auto x aim
|
||||
set_BONDdata_autoaim_x(get_BONDdata_autoaim_x() == 0);
|
||||
break;
|
||||
|
||||
case 45: // 007
|
||||
case DEB_007: // 007
|
||||
debug_007_unlock_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 46: // agent
|
||||
case DEB_AGENT: // agent
|
||||
debug_enable_agent_levels_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 47: // all
|
||||
case DEB_ALL: // all
|
||||
debug_enable_all_levels_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 48: // fast
|
||||
case DEB_FAST: // fast
|
||||
debug_fast_bond_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 49: // objectives
|
||||
case DEB_OBJECTIVES: // objectives
|
||||
debug_all_obj_complete_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 57: // show patrols
|
||||
set_show_patrols_flag(get_show_patrols_flag() == 0);
|
||||
case DEB_SHOWPATROLS: // show patrols
|
||||
set_show_patrols_flag(get_show_patrols_flag() == FALSE);
|
||||
break;
|
||||
|
||||
case 58: // intro
|
||||
set_camera_mode(CAMERAMODE_SWIRL);
|
||||
case DEB_INTRO: // intro
|
||||
bondviewSetCameraMode(CAMERAMODE_SWIRL);
|
||||
break;
|
||||
|
||||
case 60: // intro pos
|
||||
if (debug_render_raster == 0)
|
||||
case DEB_INTRO_POS: // intro pos
|
||||
if (debug_render_raster == DEB_MOVE_VIEW)
|
||||
{
|
||||
handle_debug_intropos();
|
||||
initializeDebugCameraPosition();
|
||||
}
|
||||
break;
|
||||
|
||||
case 61: // world pos
|
||||
if (debug_render_raster == 0)
|
||||
case DEB_WORLD_POS: // world pos
|
||||
if (debug_render_raster == DEB_MOVE_VIEW)
|
||||
{
|
||||
debugSetWorldPos();
|
||||
updateDebugCameraWorldPosition();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -765,51 +783,51 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
}
|
||||
break;
|
||||
|
||||
case 62: // gun key pos
|
||||
case DEB_GUNKEYPOS: // gun key pos
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 64: // chr num
|
||||
case DEB_CHRNUM: // chr num
|
||||
debug_chrnum_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 63: // vis cvg
|
||||
case DEB_VISCVG: // vis cvg
|
||||
debug_VisCVG_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 69: // joy2 sky edit
|
||||
case DEB_JOY2SKYEDIT: // joy2 sky edit
|
||||
debug_joy2skyedit_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 70: // joy2 hits edit
|
||||
case DEB_JOY2HITSEDIT: // joy2 hits edit
|
||||
debug_joy2hitsedit_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 71: // joy2 detail edit
|
||||
case DEB_JOY2DETAILEDIT: // joy2 detail edit
|
||||
debug_joy2detailedit_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 72: // explosion info
|
||||
case DEB_EXPLOSIONINFO: // explosion info
|
||||
debug_explosioninfo_flag ^= 1;
|
||||
break;
|
||||
|
||||
case 73: // magic fog
|
||||
case DEB_MAGICFOG: // magic fog
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 76: // fog
|
||||
case DEB_FOG: // fog
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
|
||||
case 74: // gun watch pos
|
||||
case DEB_GUNWATCHPOS: // gun watch pos
|
||||
debug_gunwatchpos_flags ^= 1;
|
||||
break;
|
||||
|
||||
case 65: // room blocks
|
||||
case DEB_ROOMBLOCKS: // room blocks
|
||||
removed_debug_roomblocks_feature();
|
||||
break;
|
||||
|
||||
case 66: // profile
|
||||
case DEB_PROFILE: // profile
|
||||
{
|
||||
debug_profile_flag ^= 1;
|
||||
if (debug_profile_flag)
|
||||
@@ -823,15 +841,15 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
break;
|
||||
}
|
||||
|
||||
case 67: // obj load
|
||||
case DEB_OBJLOAD: // obj load
|
||||
debug_object_load_all_models();
|
||||
break;
|
||||
|
||||
case 68: // weapon load
|
||||
case DEB_WEAPONLOAD: // weapon load
|
||||
debug_weapon_load_table();
|
||||
break;
|
||||
|
||||
case 59: // intro edit
|
||||
case DEB_INTRO_EDIT: // intro edit
|
||||
g_DebugHighlightedOption = get_highlighted_debug_option();
|
||||
break;
|
||||
}
|
||||
@@ -841,11 +859,11 @@ s32 debug_menu_processor(s8 stick_h, s8 stick_v, u16 button_held, u16 button_pre
|
||||
{
|
||||
switch (get_highlighted_debug_option()) // switch 2; jump table: jpt_80055830
|
||||
{
|
||||
case 50: // marg top
|
||||
case 51: // marg bot
|
||||
case 52: // marg left
|
||||
case 53: // marg right
|
||||
case 54: // marg reset
|
||||
case DEB_MARGTOP: // marg top
|
||||
case DEB_MARGBOT: // marg bot
|
||||
case DEB_MARGLEFT: // marg left
|
||||
case DEB_MARGRIGHT: // marg right
|
||||
case DEB_MARGRESET: // marg reset
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -53,11 +53,11 @@ void dynInitMemory(void) {
|
||||
g_VtxSizesByPlayerCount[getPlayerCount() - 1] = strtol(tokenFind(1, "-mvtx"), NULL, 0) * 1024;
|
||||
}
|
||||
|
||||
g_GfxBuffers[0] = mempAllocBytesInBank(g_GfxSizesByPlayerCount[getPlayerCount() - 1] * 2, 4);
|
||||
g_GfxBuffers[0] = mempAllocBytesInBank(g_GfxSizesByPlayerCount[getPlayerCount() - 1] * 2, MEMPOOL_STAGE);
|
||||
g_GfxBuffers[1] = (g_GfxBuffers[0] + g_GfxSizesByPlayerCount[getPlayerCount() - 1]);
|
||||
g_GfxBuffers[2] = (g_GfxBuffers[1] + g_GfxSizesByPlayerCount[getPlayerCount() - 1]);
|
||||
|
||||
g_VtxBuffers[0] = mempAllocBytesInBank(g_VtxSizesByPlayerCount[getPlayerCount() - 1] * 2, 4);
|
||||
g_VtxBuffers[0] = mempAllocBytesInBank(g_VtxSizesByPlayerCount[getPlayerCount() - 1] * 2, MEMPOOL_STAGE);
|
||||
g_VtxBuffers[1] = (g_VtxBuffers[0] + g_VtxSizesByPlayerCount[getPlayerCount() - 1]);
|
||||
g_VtxBuffers[2] = (g_VtxBuffers[1] + g_VtxSizesByPlayerCount[getPlayerCount() - 1]);
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@ void init_ejected_cartridges(void) {
|
||||
fileLoad(ejected_cartridge[i].header, ejected_cartridge[i].text);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1725
-5143
File diff suppressed because it is too large
Load Diff
+77
-137
@@ -3,11 +3,16 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
// Not sure what this was originally, but it looks like there was a multiplier
|
||||
// applied that compiler factors out.
|
||||
#define EXPLOSION_DAMAGE_SCALER 1.0f
|
||||
|
||||
#define EXPLOSION_BUFFER_LEN 6
|
||||
#define EXPLOSION_PARTS_LEN 40
|
||||
#define SMOKE_BUFFER_LEN 20
|
||||
#define SMOKE_PARTS_LEN 10
|
||||
#define SCORCH_BUFFER_LEN 20
|
||||
#define IMPACT_TYPE_LEN 20
|
||||
#define BULLET_IMPACT_BUFFER_LEN 100
|
||||
#define MAX_FLYING_PARTICLES 200
|
||||
|
||||
@@ -34,10 +39,10 @@ typedef struct s_explosiontype {
|
||||
f32 explosion_size;
|
||||
f32 explosion_range;
|
||||
f32 dmg_range;
|
||||
u16 duration;
|
||||
u16 propagationrate;
|
||||
s16 duration;
|
||||
s16 propagationrate;
|
||||
f32 flareanimspeed;
|
||||
u16 numshrapnelbits;
|
||||
s16 numshrapnelbits;
|
||||
//u16 field_0x26;
|
||||
f32 shrapnel_size;
|
||||
f32 shrapnel_scatter_dist;
|
||||
@@ -60,189 +65,124 @@ typedef struct s_impacttype {
|
||||
struct ExplosionPart
|
||||
{
|
||||
coord3d pos;
|
||||
u32 size;
|
||||
u32 rot;
|
||||
f32 size;
|
||||
f32 rot;
|
||||
s16 frame;
|
||||
u8 bb;
|
||||
};
|
||||
|
||||
struct Explosion {
|
||||
PropRecord *prop;
|
||||
u32 unk04;
|
||||
PropRecord *prop; // maybe explosion prop
|
||||
PropRecord *source; // maybe source prop (e.g., crate)
|
||||
struct ExplosionPart parts[EXPLOSION_PARTS_LEN];
|
||||
u32 unk3C8;
|
||||
s8 unk3CC;
|
||||
u8 unk3CD;
|
||||
u16 unk3CE;
|
||||
u32 unk3D0;
|
||||
u32 unk3D4;
|
||||
u32 unk3D8;
|
||||
u32 unk3DC;
|
||||
s16 age; // some kind of current tick + total elapsed?
|
||||
s16 unk3CA; // total elapsed? Or "next tick" age?
|
||||
|
||||
s8 explosion_type;
|
||||
s8 unk3CD;
|
||||
s8 player;
|
||||
s8 unk3CF;
|
||||
|
||||
struct coord3d pos;
|
||||
s16 room;
|
||||
s16 unk3DE;
|
||||
};
|
||||
|
||||
struct SmokePart
|
||||
{
|
||||
coord3d pos; /*0x00*/
|
||||
f32 size; /*0x0c*/
|
||||
u32 rot; /*0x10*/
|
||||
u32 deltarot; /*0x14*/
|
||||
u32 offset1; /*0x18*/
|
||||
u32 offset2; /*0x1c*/
|
||||
u32 alpha; /*0x20*/
|
||||
u16 count; /*0x24*/
|
||||
f32 rot; /*0x10*/
|
||||
f32 deltarot; /*0x14*/
|
||||
f32 offset1; /*0x18*/
|
||||
f32 offset2; /*0x1c*/
|
||||
f32 alpha; /*0x20*/
|
||||
s16 count; /*0x24*/
|
||||
};
|
||||
|
||||
struct Smoke {
|
||||
PropRecord *prop;
|
||||
s16 unk04;
|
||||
s16 unk06;
|
||||
s16 duration;
|
||||
s16 smoke_type;
|
||||
struct SmokePart parts[SMOKE_PARTS_LEN]; /*0x008*/
|
||||
};
|
||||
|
||||
struct Scorch {
|
||||
s16 roomid;
|
||||
s16 unk02;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
u8 unk02;
|
||||
s8 unk03;
|
||||
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 vertex_list[4];
|
||||
struct coord3d pos;
|
||||
f32 explosion_size;
|
||||
struct Model *model;
|
||||
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
u32 unk48;
|
||||
u32 unk4C;
|
||||
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
Vtx vertex_list[4];
|
||||
};
|
||||
|
||||
struct BulletImpact {
|
||||
s16 unk00;
|
||||
s16 unk02;
|
||||
s16 room;
|
||||
s16 impact_type;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
|
||||
u32 unk10;
|
||||
u16 unk14;
|
||||
s8 unk16;
|
||||
s8 unk17;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u16 unk24;
|
||||
s8 unk26;
|
||||
s8 unk27;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u16 unk34;
|
||||
s8 unk36;
|
||||
s8 unk37;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u16 unk44;
|
||||
s8 unk46;
|
||||
s8 unk47;
|
||||
PropRecord* unk48;
|
||||
s8 unk4C;
|
||||
s8 unk4D;
|
||||
Vtx vertex_list[4];
|
||||
PropRecord* prop;
|
||||
s8 model_render_pos_index;
|
||||
s8 room_clear_flag;
|
||||
s16 unk4E;
|
||||
};
|
||||
|
||||
struct FlyingParticles_unk38 {
|
||||
s16 unk00;
|
||||
s16 unk02;
|
||||
s16 unk04;
|
||||
s16 unk06;
|
||||
s16 unk08;
|
||||
s16 unk0A;
|
||||
s8 unk0C;
|
||||
s8 unk0D;
|
||||
s8 unk0E;
|
||||
u8 unk0F;
|
||||
};
|
||||
|
||||
struct FlyingParticles {
|
||||
s32 unk00;
|
||||
|
||||
// coord3d?
|
||||
f32 x;
|
||||
f32 y;
|
||||
f32 z;
|
||||
|
||||
// coord3d?
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
|
||||
// coord3d?
|
||||
f32 unk1C;
|
||||
f32 unk20;
|
||||
f32 unk24;
|
||||
|
||||
// coord3d?
|
||||
f32 unk28;
|
||||
f32 unk2C;
|
||||
f32 unk30;
|
||||
struct coord3d position; // 0x04
|
||||
struct coord3d rotation; // 0x10
|
||||
struct coord3d position_drift; // 0x1c
|
||||
struct coord3d rotation_drift; // 0x28
|
||||
|
||||
s32 unk34;
|
||||
|
||||
struct FlyingParticles_unk38 unk38[4];
|
||||
Vtx vertex_list[4];
|
||||
};
|
||||
|
||||
extern f32 D_80040178;
|
||||
extern char dword_CODE_bss_8007A100[];
|
||||
extern struct Smoke *ptr_smoke_buf;
|
||||
extern struct Explosion *ptr_explosion_buf;
|
||||
extern f32 g_SpExplosionDamageMult;
|
||||
extern Mtx dword_CODE_bss_8007A100;
|
||||
extern struct Smoke *g_SmokeBuffer;
|
||||
extern struct Explosion *g_ExplosionBuffer;
|
||||
extern s32 max_particles;
|
||||
extern struct FlyingParticles *ptr_flying_particles_buf;
|
||||
extern struct Scorch *ptr_scorch_buf;
|
||||
extern struct BulletImpact *ptr_bullet_impact_buf;
|
||||
extern s32 numExplosionEntries;
|
||||
extern s32 numSmokeEntries;
|
||||
extern s32 numParticleEntries;
|
||||
extern s32 numScorchEntries;
|
||||
extern s32 numImpactEntries;
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU)
|
||||
s32 sub_GAME_7F09C250(s32 arg0, struct coord3d *pos, struct StandTile *stan, s16 arg3, s32 flag4, s32 playernum, u8 *rooms, s32 flag7);
|
||||
#else
|
||||
void sub_GAME_7F09C250(s32 arg0, struct coord3d *pos, struct StandTile *stan, s16 arg3, s32 flag4, s32 playernum, u8 *rooms, s32 flag7);
|
||||
#endif
|
||||
extern struct FlyingParticles *g_FlyingParticlesBuffer;
|
||||
extern struct Scorch *g_ScorchBuffer;
|
||||
extern struct BulletImpact *g_BulletImpactBuffer;
|
||||
extern s32 g_NumExplosionEntries;
|
||||
extern s32 g_NumSmokeEntries;
|
||||
extern s32 g_NumParticleEntries;
|
||||
extern s32 g_NumScorchEntries;
|
||||
extern s32 g_NumImpactEntries;
|
||||
|
||||
|
||||
|
||||
s32 explosionSmokeTick(PropRecord *arg0);
|
||||
void sub_GAME_7F09FD3C(void);
|
||||
Gfx * sub_GAME_7F0A0034(Gfx *arg0);
|
||||
Gfx * sub_GAME_7F0A1D78(Gfx *arg0);
|
||||
Gfx *sub_GAME_7F0A0AB4(Gfx *arg0);
|
||||
Gfx *unk09c250RenderPropExplosion(PropRecord *arg0, Gfx *arg1);
|
||||
Gfx *unk09c250RenderPropSmoke(PropRecord *arg0, Gfx *arg1);
|
||||
Gfx * explosionRenderFlyingParticles(Gfx *arg0);
|
||||
Gfx * explosionCallRenderBulletImpactOnProp(Gfx *arg0);
|
||||
Gfx *explosionRenderScorchBuffer(Gfx *arg0);
|
||||
Gfx *explosionRenderPropExplosion(PropRecord *prop, Gfx *gdl, s32 withalpha);
|
||||
Gfx *explosionRenderPropSmoke(PropRecord *arg0, Gfx *arg1, s32 withalpha);
|
||||
|
||||
|
||||
Gfx *explosionRenderBulletImpactOnProp(Gfx *arg0, PropRecord *arg1, s32 arg2);
|
||||
|
||||
void sub_GAME_7F09E700(coord3d *pos, StandTile *stan, s16 arg2, u8 *rooms, s32 arg4);
|
||||
void explosionCreateSmoke(coord3d *pos, StandTile *stan, s16 smoke_type, u8 *rooms, s32 flags);
|
||||
void explosionUpdateFlyingParticles(void);
|
||||
u8 explosionChrpropSmokeTick(PropRecord* prop);
|
||||
u8 explosionChrpropExplosionTick(PropRecord* prop);
|
||||
void explosionScreenShake(coord3d* source_pos, coord3d* source_mag, coord3d* result);
|
||||
void explosionCreateBulletImpact(struct coord3d *pos, struct coord3d *arg1, s16 impact_type, s16 room, PropRecord *prop, s8 model_render_pos_index, s8 room_clear_flag);
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU)
|
||||
s32 explosionCreate(void *, struct coord3d *pos, struct StandTile *stan, s16 /* enum EXPLOSION_DEF */ explosionType, s32 flag, s32 playernum, u8 *rooms, s32 flag2);
|
||||
s32 explosionCreate(PropRecord *arg0, struct coord3d *target_pos, StandTile *target_stan, s16 /* enum EXPLOSION_DEF */ explosion_type, s32 arg4, s32 player, u8 *rooms, s32 arg7);
|
||||
s32 sub_GAME_7F09C250(s32 arg0, struct coord3d *pos, struct StandTile *stan, s16 arg3, s32 flag4, s32 playernum, u8 *rooms, s32 flag7);
|
||||
#else
|
||||
void explosionCreate(void *, struct coord3d *pos, struct StandTile *stan, s16 /* enum EXPLOSION_DEF */ explosionType, s32 flag, s32 playernum, u8 *rooms, s32 flag2);
|
||||
void explosionCreate(PropRecord *arg0, struct coord3d *target_pos, StandTile *target_stan, s16 /* enum EXPLOSION_DEF */ explosion_type, s32 arg4, s32 player, u8 *rooms, s32 arg7);
|
||||
void sub_GAME_7F09C250(s32 arg0, struct coord3d *pos, struct StandTile *stan, s16 arg3, s32 flag4, s32 playernum, u8 *rooms, s32 flag7);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+10
-6
@@ -47,7 +47,7 @@ void end_of_mission_briefing(void)
|
||||
{
|
||||
if (!fileGetIsCheatUnlocked(fileGetSaveForFoldernum(selected_folder_num), mission_folder_setup_entries[briefingpage].mission_num))
|
||||
{
|
||||
sub_GAME_7F01E760(selected_folder_num, mission_folder_setup_entries[briefingpage].mission_num);
|
||||
fileSaveFolderUnlockCheat(selected_folder_num, mission_folder_setup_entries[briefingpage].mission_num);
|
||||
g_NewCheatUnlocked = TRUE;
|
||||
return;
|
||||
}
|
||||
@@ -60,7 +60,11 @@ void end_of_mission_briefing(void)
|
||||
|
||||
void fileLoadSaveSettingsForSelectedFolder(int stage)
|
||||
{
|
||||
if(stage){}
|
||||
if(stage){
|
||||
#ifdef DEBUG
|
||||
|
||||
#endif
|
||||
}
|
||||
fileLoadSettingsForFolder(selected_folder_num);
|
||||
}
|
||||
|
||||
@@ -69,17 +73,17 @@ void deleteCurrentSelectedFolder(void)
|
||||
fileClearSavefileForFolder(selected_folder_num);
|
||||
}
|
||||
|
||||
void copyCurrentEEPROMtoStack(void)
|
||||
void fileUpdateBondInCurrentFolder(void)
|
||||
{
|
||||
fileCopySaveIfSelectedBondDifferent(selected_folder_num);
|
||||
fileUpdateSelectedBondInSave(selected_folder_num);
|
||||
}
|
||||
|
||||
s32 getSelectedFolderBond(void)
|
||||
s32 fileGetBondForCurrentFolder(void)
|
||||
{
|
||||
return fileGetBondForFolder(selected_folder_num);
|
||||
}
|
||||
|
||||
void set_selected_folder_num(u32 foldernum)
|
||||
void fileSetCurrentFolder(u32 foldernum)
|
||||
{
|
||||
selected_folder_num = foldernum;
|
||||
}
|
||||
|
||||
+3
-18
@@ -29,24 +29,9 @@ typedef struct smallSave
|
||||
} smallSave;
|
||||
|
||||
extern save_data saves[6];
|
||||
extern save_data D_8002C520;
|
||||
extern save_data D_8002C580;
|
||||
extern save_data D_8002C5E0;
|
||||
extern smallSave blankSmallSave;
|
||||
extern save_data D_8002C660;
|
||||
extern save_data D_8002C6C0;
|
||||
extern save_data D_8002C720;
|
||||
extern save_data D_8002C780;
|
||||
extern save_data D_8002C7E0;
|
||||
extern save_data D_8002C840;
|
||||
extern save_data blank_eeprom;
|
||||
|
||||
extern s32 save_selected_bond[];
|
||||
|
||||
void set_selected_folder_num(u32 foldernum);
|
||||
void set_selected_difficulty(DIFFICULTY difficulty);
|
||||
void set_solo_and_ptr_briefing(LEVELID stage);
|
||||
|
||||
f32 get_007_reaction_speed(void);
|
||||
f32 get_007_health_mod(void);
|
||||
f32 get_007_damage_mod(void);
|
||||
@@ -54,9 +39,9 @@ f32 get_007_accuracy_mod(void);
|
||||
void end_of_mission_briefing(void);
|
||||
void fileLoadSaveSettingsForSelectedFolder(int stage);
|
||||
void deleteCurrentSelectedFolder(void);
|
||||
void copyCurrentEEPROMtoStack(void);
|
||||
s32 getSelectedFolderBond(void);
|
||||
void set_selected_folder_num(u32 foldernum);
|
||||
void fileUpdateBondInCurrentFolder(void);
|
||||
s32 fileGetBondForCurrentFolder(void);
|
||||
void fileSetCurrentFolder(u32 foldernum);
|
||||
void set_selected_difficulty(DIFFICULTY difficulty);
|
||||
void set_solo_and_ptr_briefing(LEVELID stage);
|
||||
void sub_GAME_7F01D61C(struct save_data *savefile);
|
||||
|
||||
+237
-270
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -6,7 +6,7 @@
|
||||
#include <bondtypes.h>
|
||||
#include "file.h"
|
||||
|
||||
#define RAMROM_FOLDERNUM 0x64
|
||||
|
||||
|
||||
/* EEPROM masks for in-game settings */
|
||||
#define OPTION_INVERTLOOK 0x0001
|
||||
@@ -26,13 +26,13 @@
|
||||
u8 fileGetBondForFolder(u32 folder);
|
||||
void fileValidateSaves(void);
|
||||
bool fileGetIsCheatUnlocked(save_data *save, s32 cheat);
|
||||
STAGESTATUS fileIsStageUnlockedAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE stage, DIFFICULTY difficulty);
|
||||
void fileUnlockStageInFolderAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE stage, DIFFICULTY difficulty, s32 newtime);
|
||||
void sub_GAME_7F01E760(s32 foldernum, s32 cheat);
|
||||
STAGESTATUS fileIsStageUnlockedAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE levelid, DIFFICULTY difficulty);
|
||||
void fileUnlockStageInFolderAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE levelid, DIFFICULTY difficulty, s32 newtime);
|
||||
void fileSaveFolderUnlockCheat(s32 foldernum, s32 cheat);
|
||||
void fileLoadSettingsForFolder(u32 folder);
|
||||
void fileDeleteSaveForFolder(s32 foldernum);
|
||||
|
||||
void fileGetHighestStageDifficultyCompletedForFolder(s32 foldernum, LEVEL_SOLO_SEQUENCE *stage, DIFFICULTY *difficulty);
|
||||
void fileGetHighestStageDifficultyCompletedForFolder(s32 foldernum, LEVEL_SOLO_SEQUENCE *levelid, DIFFICULTY *difficulty);
|
||||
bool check_aztec_completed_any_folder_secret_00(void);
|
||||
bool fileIsEgyptCompletedOn00AnyFolder(void);
|
||||
LEVEL_SOLO_SEQUENCE fileGetHighestStageUnlockedAnyFolder(void);
|
||||
|
||||
+37
-574
@@ -64,8 +64,7 @@ EnvironmentRecord * g_EnvironmentAltp;
|
||||
s32 D_800825F4;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
EnvironmentRecord dword_CODE_bss_800825F8;
|
||||
s32 bss_800825F8_padding[2];
|
||||
struct NearFogRecordF eu_loadCurrentNearFog;
|
||||
#endif
|
||||
|
||||
/**
|
||||
@@ -276,7 +275,6 @@ f32 fogGetScaledFarFogIntensitySquared(void)
|
||||
}
|
||||
|
||||
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
/**
|
||||
* Address 0x7F0BA758.
|
||||
*/
|
||||
@@ -333,268 +331,32 @@ void fogLoadCurrentEnvironment(EnvironmentRecord *arg0)
|
||||
g_CurrentEnvironment.WaterBlue = arg0->Sky.WaterBlue;
|
||||
g_CurrentEnvironment.WaterConcavity = arg0->Sky.WaterConcavity;
|
||||
|
||||
if (arg0->Visibility.Nfd.NearFog == 0.0f)
|
||||
#if defined(VERSION_EU)
|
||||
#define FOG_ZERO 0
|
||||
#else
|
||||
#define FOG_ZERO 0.0f
|
||||
#endif
|
||||
|
||||
if (arg0->Visibility.Nfd.NearFog == FOG_ZERO)
|
||||
{
|
||||
g_NearFogValuesP = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if defined(VERSION_EU)
|
||||
eu_loadCurrentNearFog.NearFog = arg0->Visibility.Nfd.NearFog;
|
||||
eu_loadCurrentNearFog.MaxVisRange = arg0->Visibility.Nfd.MaxVisRange;
|
||||
eu_loadCurrentNearFog.MaxObfuscationRange = arg0->Visibility.Nfd.MaxObfuscationRange;
|
||||
g_NearFogValuesP = &eu_loadCurrentNearFog;
|
||||
#else
|
||||
g_NearFogValuesP = &arg0->Visibility.Nfd;
|
||||
#endif
|
||||
}
|
||||
|
||||
#undef FOG_ZERO
|
||||
|
||||
g_FogSkyIsEnabled = 1;
|
||||
}
|
||||
#endif
|
||||
#if defined(VERSION_EU)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel fogLoadCurrentEnvironment
|
||||
/* 0EC3E8 7F0B99F8 27BDFFC8 */ addiu $sp, $sp, -0x38
|
||||
/* 0EC3EC 7F0B99FC AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0EC3F0 7F0B9A00 848F0004 */ lh $t7, 4($a0)
|
||||
/* 0EC3F4 7F0B9A04 848E0002 */ lh $t6, 2($a0)
|
||||
/* 0EC3F8 7F0B9A08 AFA40038 */ sw $a0, 0x38($sp)
|
||||
/* 0EC3FC 7F0B9A0C 448F3000 */ mtc1 $t7, $f6
|
||||
/* 0EC400 7F0B9A10 448E2000 */ mtc1 $t6, $f4
|
||||
/* 0EC404 7F0B9A14 468033A0 */ cvt.s.w $f14, $f6
|
||||
/* 0EC408 7F0B9A18 0C001028 */ jal viSetZRange
|
||||
/* 0EC40C 7F0B9A1C 46802320 */ cvt.s.w $f12, $f4
|
||||
/* 0EC410 7F0B9A20 0C00103F */ jal viGetZRange
|
||||
/* 0EC414 7F0B9A24 27A40030 */ addiu $a0, $sp, 0x30
|
||||
/* 0EC418 7F0B9A28 0FC2CEED */ jal bgGetLevelVisibilityScale
|
||||
/* 0EC41C 7F0B9A2C 00000000 */ nop
|
||||
/* 0EC420 7F0B9A30 C7A80030 */ lwc1 $f8, 0x30($sp)
|
||||
/* 0EC424 7F0B9A34 C7A40034 */ lwc1 $f4, 0x34($sp)
|
||||
/* 0EC428 7F0B9A38 8FA50038 */ lw $a1, 0x38($sp)
|
||||
/* 0EC42C 7F0B9A3C 46004283 */ div.s $f10, $f8, $f0
|
||||
/* 0EC430 7F0B9A40 3C01447A */ li $at, 0x447A0000 # 1000.000000
|
||||
/* 0EC434 7F0B9A44 3C048007 */ lui $a0, %hi(g_DifferenceFromFarFogIntensity) # $a0, 0x8007
|
||||
/* 0EC438 7F0B9A48 2484CF84 */ addiu $a0, %lo(g_DifferenceFromFarFogIntensity) # addiu $a0, $a0, -0x307c
|
||||
/* 0EC43C 7F0B9A4C 3C068007 */ lui $a2, %hi(g_FarFogIntensity) # $a2, 0x8007
|
||||
/* 0EC440 7F0B9A50 24C6CF80 */ addiu $a2, %lo(g_FarFogIntensity) # addiu $a2, $a2, -0x3080
|
||||
/* 0EC444 7F0B9A54 3C038007 */ lui $v1, %hi(g_CurFogDetails) # $v1, 0x8007
|
||||
/* 0EC448 7F0B9A58 2463CF68 */ addiu $v1, %lo(g_CurFogDetails) # addiu $v1, $v1, -0x3098
|
||||
/* 0EC44C 7F0B9A5C 3C028004 */ lui $v0, %hi(g_CurrentEnvironment) # $v0, 0x8004
|
||||
/* 0EC450 7F0B9A60 2442E2BC */ addiu $v0, %lo(g_CurrentEnvironment) # addiu $v0, $v0, -0x1d44
|
||||
/* 0EC454 7F0B9A64 46002183 */ div.s $f6, $f4, $f0
|
||||
/* 0EC458 7F0B9A68 E7AA0030 */ swc1 $f10, 0x30($sp)
|
||||
/* 0EC45C 7F0B9A6C 44812000 */ mtc1 $at, $f4
|
||||
/* 0EC460 7F0B9A70 E7A60034 */ swc1 $f6, 0x34($sp)
|
||||
/* 0EC464 7F0B9A74 84B8000C */ lh $t8, 0xc($a1)
|
||||
/* 0EC468 7F0B9A78 44984000 */ mtc1 $t8, $f8
|
||||
/* 0EC46C 7F0B9A7C 00000000 */ nop
|
||||
/* 0EC470 7F0B9A80 468042A0 */ cvt.s.w $f10, $f8
|
||||
/* 0EC474 7F0B9A84 46045183 */ div.s $f6, $f10, $f4
|
||||
/* 0EC478 7F0B9A88 44812000 */ mtc1 $at, $f4
|
||||
/* 0EC47C 7F0B9A8C 3C018004 */ lui $at, %hi(g_ScaledFarFogIntensity) # $at, 0x8004
|
||||
/* 0EC480 7F0B9A90 E4860000 */ swc1 $f6, ($a0)
|
||||
/* 0EC484 7F0B9A94 84B9000E */ lh $t9, 0xe($a1)
|
||||
/* 0EC488 7F0B9A98 44994000 */ mtc1 $t9, $f8
|
||||
/* 0EC48C 7F0B9A9C 00000000 */ nop
|
||||
/* 0EC490 7F0B9AA0 468042A0 */ cvt.s.w $f10, $f8
|
||||
/* 0EC494 7F0B9AA4 C7A80034 */ lwc1 $f8, 0x34($sp)
|
||||
/* 0EC498 7F0B9AA8 46045183 */ div.s $f6, $f10, $f4
|
||||
/* 0EC49C 7F0B9AAC C7AA0030 */ lwc1 $f10, 0x30($sp)
|
||||
/* 0EC4A0 7F0B9AB0 460A4381 */ sub.s $f14, $f8, $f10
|
||||
/* 0EC4A4 7F0B9AB4 E4C60000 */ swc1 $f6, ($a2)
|
||||
/* 0EC4A8 7F0B9AB8 C4D00000 */ lwc1 $f16, ($a2)
|
||||
/* 0EC4AC 7F0B9ABC 46107102 */ mul.s $f4, $f14, $f16
|
||||
/* 0EC4B0 7F0B9AC0 46045180 */ add.s $f6, $f10, $f4
|
||||
/* 0EC4B4 7F0B9AC4 E426E2B4 */ swc1 $f6, %lo(g_ScaledFarFogIntensity)($at)
|
||||
/* 0EC4B8 7F0B9AC8 C4820000 */ lwc1 $f2, ($a0)
|
||||
/* 0EC4BC 7F0B9ACC 3C018004 */ lui $at, %hi(g_ScaledDifferenceFromFarFogIntensity) # $at, 0x8004
|
||||
/* 0EC4C0 7F0B9AD0 46027202 */ mul.s $f8, $f14, $f2
|
||||
/* 0EC4C4 7F0B9AD4 46085100 */ add.s $f4, $f10, $f8
|
||||
/* 0EC4C8 7F0B9AD8 E424E2B8 */ swc1 $f4, %lo(g_ScaledDifferenceFromFarFogIntensity)($at)
|
||||
/* 0EC4CC 7F0B9ADC 84A80002 */ lh $t0, 2($a1)
|
||||
/* 0EC4D0 7F0B9AE0 3C014300 */ li $at, 0x43000000 # 128.000000
|
||||
/* 0EC4D4 7F0B9AE4 44883000 */ mtc1 $t0, $f6
|
||||
/* 0EC4D8 7F0B9AE8 00000000 */ nop
|
||||
/* 0EC4DC 7F0B9AEC 468032A0 */ cvt.s.w $f10, $f6
|
||||
/* 0EC4E0 7F0B9AF0 46005203 */ div.s $f8, $f10, $f0
|
||||
/* 0EC4E4 7F0B9AF4 E4680000 */ swc1 $f8, ($v1)
|
||||
/* 0EC4E8 7F0B9AF8 84A90004 */ lh $t1, 4($a1)
|
||||
/* 0EC4EC 7F0B9AFC 46028201 */ sub.s $f8, $f16, $f2
|
||||
/* 0EC4F0 7F0B9B00 C4720000 */ lwc1 $f18, ($v1)
|
||||
/* 0EC4F4 7F0B9B04 44892000 */ mtc1 $t1, $f4
|
||||
/* 0EC4F8 7F0B9B08 E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* 0EC4FC 7F0B9B0C 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 0EC500 7F0B9B10 44812000 */ mtc1 $at, $f4
|
||||
/* 0EC504 7F0B9B14 3C013F00 */ li $at, 0x3F000000 # 0.500000
|
||||
/* 0EC508 7F0B9B18 44814000 */ mtc1 $at, $f8
|
||||
/* 0EC50C 7F0B9B1C 3C014380 */ li $at, 0x43800000 # 256.000000
|
||||
/* 0EC510 7F0B9B20 46003283 */ div.s $f10, $f6, $f0
|
||||
/* 0EC514 7F0B9B24 C7A60018 */ lwc1 $f6, 0x18($sp)
|
||||
/* 0EC518 7F0B9B28 E46A0004 */ swc1 $f10, 4($v1)
|
||||
/* 0EC51C 7F0B9B2C 46062283 */ div.s $f10, $f4, $f6
|
||||
/* 0EC520 7F0B9B30 C46C0004 */ lwc1 $f12, 4($v1)
|
||||
/* 0EC524 7F0B9B34 46024101 */ sub.s $f4, $f8, $f2
|
||||
/* 0EC528 7F0B9B38 E7AA0020 */ swc1 $f10, 0x20($sp)
|
||||
/* 0EC52C 7F0B9B3C 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC530 7F0B9B40 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 0EC534 7F0B9B44 460A2202 */ mul.s $f8, $f4, $f10
|
||||
/* 0EC538 7F0B9B48 46126281 */ sub.s $f10, $f12, $f18
|
||||
/* 0EC53C 7F0B9B4C E7AA0018 */ swc1 $f10, 0x18($sp)
|
||||
/* 0EC540 7F0B9B50 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC544 7F0B9B54 46064103 */ div.s $f4, $f8, $f6
|
||||
/* 0EC548 7F0B9B58 C7A80020 */ lwc1 $f8, 0x20($sp)
|
||||
/* 0EC54C 7F0B9B5C 3C01437F */ li $at, 0x437F0000 # 255.000000
|
||||
/* 0EC550 7F0B9B60 46004187 */ neg.s $f6, $f8
|
||||
/* 0EC554 7F0B9B64 460A9200 */ add.s $f8, $f18, $f10
|
||||
/* 0EC558 7F0B9B68 C7AA0018 */ lwc1 $f10, 0x18($sp)
|
||||
/* 0EC55C 7F0B9B6C E7A4001C */ swc1 $f4, 0x1c($sp)
|
||||
/* 0EC560 7F0B9B70 460C3102 */ mul.s $f4, $f6, $f12
|
||||
/* 0EC564 7F0B9B74 00000000 */ nop
|
||||
/* 0EC568 7F0B9B78 46082182 */ mul.s $f6, $f4, $f8
|
||||
/* 0EC56C 7F0B9B7C 44814000 */ mtc1 $at, $f8
|
||||
/* 0EC570 7F0B9B80 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 0EC574 7F0B9B84 460A3103 */ div.s $f4, $f6, $f10
|
||||
/* 0EC578 7F0B9B88 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC57C 7F0B9B8C 3C01437F */ li $at, 0x437F0000 # 255.000000
|
||||
/* 0EC580 7F0B9B90 46082183 */ div.s $f6, $f4, $f8
|
||||
/* 0EC584 7F0B9B94 C7A80020 */ lwc1 $f8, 0x20($sp)
|
||||
/* 0EC588 7F0B9B98 460A6100 */ add.s $f4, $f12, $f10
|
||||
/* 0EC58C 7F0B9B9C C7AA0018 */ lwc1 $f10, 0x18($sp)
|
||||
/* 0EC590 7F0B9BA0 E4660010 */ swc1 $f6, 0x10($v1)
|
||||
/* 0EC594 7F0B9BA4 46082182 */ mul.s $f6, $f4, $f8
|
||||
/* 0EC598 7F0B9BA8 C7A8001C */ lwc1 $f8, 0x1c($sp)
|
||||
/* 0EC59C 7F0B9BAC 460A3103 */ div.s $f4, $f6, $f10
|
||||
/* 0EC5A0 7F0B9BB0 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC5A4 7F0B9BB4 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC5A8 7F0B9BB8 46082180 */ add.s $f6, $f4, $f8
|
||||
/* 0EC5AC 7F0B9BBC 460A3103 */ div.s $f4, $f6, $f10
|
||||
/* 0EC5B0 7F0B9BC0 E4640014 */ swc1 $f4, 0x14($v1)
|
||||
/* 0EC5B4 7F0B9BC4 84AA000C */ lh $t2, 0xc($a1)
|
||||
/* 0EC5B8 7F0B9BC8 AC4A0000 */ sw $t2, ($v0)
|
||||
/* 0EC5BC 7F0B9BCC 84AB000E */ lh $t3, 0xe($a1)
|
||||
/* 0EC5C0 7F0B9BD0 AC4B0004 */ sw $t3, 4($v0)
|
||||
/* 0EC5C4 7F0B9BD4 90AC0010 */ lbu $t4, 0x10($a1)
|
||||
/* 0EC5C8 7F0B9BD8 A04C0008 */ sb $t4, 8($v0)
|
||||
/* 0EC5CC 7F0B9BDC 90AD0011 */ lbu $t5, 0x11($a1)
|
||||
/* 0EC5D0 7F0B9BE0 A04D0009 */ sb $t5, 9($v0)
|
||||
/* 0EC5D4 7F0B9BE4 90AE0012 */ lbu $t6, 0x12($a1)
|
||||
/* 0EC5D8 7F0B9BE8 A04E000A */ sb $t6, 0xa($v0)
|
||||
/* 0EC5DC 7F0B9BEC 90AF0013 */ lbu $t7, 0x13($a1)
|
||||
/* 0EC5E0 7F0B9BF0 A04F000B */ sb $t7, 0xb($v0)
|
||||
/* 0EC5E4 7F0B9BF4 84B80014 */ lh $t8, 0x14($a1)
|
||||
/* 0EC5E8 7F0B9BF8 44984000 */ mtc1 $t8, $f8
|
||||
/* 0EC5EC 7F0B9BFC 00000000 */ nop
|
||||
/* 0EC5F0 7F0B9C00 468041A0 */ cvt.s.w $f6, $f8
|
||||
/* 0EC5F4 7F0B9C04 E446000C */ swc1 $f6, 0xc($v0)
|
||||
/* 0EC5F8 7F0B9C08 90B90016 */ lbu $t9, 0x16($a1)
|
||||
/* 0EC5FC 7F0B9C0C A4590010 */ sh $t9, 0x10($v0)
|
||||
/* 0EC600 7F0B9C10 90A80017 */ lbu $t0, 0x17($a1)
|
||||
/* 0EC604 7F0B9C14 44885000 */ mtc1 $t0, $f10
|
||||
/* 0EC608 7F0B9C18 05010004 */ bgez $t0, .L7F0B9C2C
|
||||
/* 0EC60C 7F0B9C1C 46805120 */ cvt.s.w $f4, $f10
|
||||
/* 0EC610 7F0B9C20 44814000 */ mtc1 $at, $f8
|
||||
/* 0EC614 7F0B9C24 00000000 */ nop
|
||||
/* 0EC618 7F0B9C28 46082100 */ add.s $f4, $f4, $f8
|
||||
.L7F0B9C2C:
|
||||
/* 0EC61C 7F0B9C2C E4440014 */ swc1 $f4, 0x14($v0)
|
||||
/* 0EC620 7F0B9C30 90A90018 */ lbu $t1, 0x18($a1)
|
||||
/* 0EC624 7F0B9C34 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC628 7F0B9C38 44893000 */ mtc1 $t1, $f6
|
||||
/* 0EC62C 7F0B9C3C 05210004 */ bgez $t1, .L7F0B9C50
|
||||
/* 0EC630 7F0B9C40 468032A0 */ cvt.s.w $f10, $f6
|
||||
/* 0EC634 7F0B9C44 44814000 */ mtc1 $at, $f8
|
||||
/* 0EC638 7F0B9C48 00000000 */ nop
|
||||
/* 0EC63C 7F0B9C4C 46085280 */ add.s $f10, $f10, $f8
|
||||
.L7F0B9C50:
|
||||
/* 0EC640 7F0B9C50 E44A0018 */ swc1 $f10, 0x18($v0)
|
||||
/* 0EC644 7F0B9C54 90AA0019 */ lbu $t2, 0x19($a1)
|
||||
/* 0EC648 7F0B9C58 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC64C 7F0B9C5C 448A2000 */ mtc1 $t2, $f4
|
||||
/* 0EC650 7F0B9C60 05410004 */ bgez $t2, .L7F0B9C74
|
||||
/* 0EC654 7F0B9C64 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 0EC658 7F0B9C68 44814000 */ mtc1 $at, $f8
|
||||
/* 0EC65C 7F0B9C6C 00000000 */ nop
|
||||
/* 0EC660 7F0B9C70 46083180 */ add.s $f6, $f6, $f8
|
||||
.L7F0B9C74:
|
||||
/* 0EC664 7F0B9C74 E446001C */ swc1 $f6, 0x1c($v0)
|
||||
/* 0EC668 7F0B9C78 90AB001A */ lbu $t3, 0x1a($a1)
|
||||
/* 0EC66C 7F0B9C7C 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC670 7F0B9C80 240A0001 */ li $t2, 1
|
||||
/* 0EC674 7F0B9C84 A04B0020 */ sb $t3, 0x20($v0)
|
||||
/* 0EC678 7F0B9C88 84AC001C */ lh $t4, 0x1c($a1)
|
||||
/* 0EC67C 7F0B9C8C 448C5000 */ mtc1 $t4, $f10
|
||||
/* 0EC680 7F0B9C90 00000000 */ nop
|
||||
/* 0EC684 7F0B9C94 46805120 */ cvt.s.w $f4, $f10
|
||||
/* 0EC688 7F0B9C98 E4440024 */ swc1 $f4, 0x24($v0)
|
||||
/* 0EC68C 7F0B9C9C 90AD001E */ lbu $t5, 0x1e($a1)
|
||||
/* 0EC690 7F0B9CA0 A44D0028 */ sh $t5, 0x28($v0)
|
||||
/* 0EC694 7F0B9CA4 90AE001F */ lbu $t6, 0x1f($a1)
|
||||
/* 0EC698 7F0B9CA8 448E4000 */ mtc1 $t6, $f8
|
||||
/* 0EC69C 7F0B9CAC 05C10004 */ bgez $t6, .L7F0B9CC0
|
||||
/* 0EC6A0 7F0B9CB0 468041A0 */ cvt.s.w $f6, $f8
|
||||
/* 0EC6A4 7F0B9CB4 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC6A8 7F0B9CB8 00000000 */ nop
|
||||
/* 0EC6AC 7F0B9CBC 460A3180 */ add.s $f6, $f6, $f10
|
||||
.L7F0B9CC0:
|
||||
/* 0EC6B0 7F0B9CC0 E446002C */ swc1 $f6, 0x2c($v0)
|
||||
/* 0EC6B4 7F0B9CC4 90AF0020 */ lbu $t7, 0x20($a1)
|
||||
/* 0EC6B8 7F0B9CC8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC6BC 7F0B9CCC 448F2000 */ mtc1 $t7, $f4
|
||||
/* 0EC6C0 7F0B9CD0 05E10004 */ bgez $t7, .L7F0B9CE4
|
||||
/* 0EC6C4 7F0B9CD4 46802220 */ cvt.s.w $f8, $f4
|
||||
/* 0EC6C8 7F0B9CD8 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC6CC 7F0B9CDC 00000000 */ nop
|
||||
/* 0EC6D0 7F0B9CE0 460A4200 */ add.s $f8, $f8, $f10
|
||||
.L7F0B9CE4:
|
||||
/* 0EC6D4 7F0B9CE4 E4480030 */ swc1 $f8, 0x30($v0)
|
||||
/* 0EC6D8 7F0B9CE8 90B80021 */ lbu $t8, 0x21($a1)
|
||||
/* 0EC6DC 7F0B9CEC 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC6E0 7F0B9CF0 44983000 */ mtc1 $t8, $f6
|
||||
/* 0EC6E4 7F0B9CF4 07010004 */ bgez $t8, .L7F0B9D08
|
||||
/* 0EC6E8 7F0B9CF8 46803120 */ cvt.s.w $f4, $f6
|
||||
/* 0EC6EC 7F0B9CFC 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC6F0 7F0B9D00 00000000 */ nop
|
||||
/* 0EC6F4 7F0B9D04 460A2100 */ add.s $f4, $f4, $f10
|
||||
.L7F0B9D08:
|
||||
/* 0EC6F8 7F0B9D08 E4440034 */ swc1 $f4, 0x34($v0)
|
||||
/* 0EC6FC 7F0B9D0C 90B90022 */ lbu $t9, 0x22($a1)
|
||||
/* 0EC700 7F0B9D10 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0EC704 7F0B9D14 44994000 */ mtc1 $t9, $f8
|
||||
/* 0EC708 7F0B9D18 07210004 */ bgez $t9, .L7F0B9D2C
|
||||
/* 0EC70C 7F0B9D1C 468041A0 */ cvt.s.w $f6, $f8
|
||||
/* 0EC710 7F0B9D20 44815000 */ mtc1 $at, $f10
|
||||
/* 0EC714 7F0B9D24 00000000 */ nop
|
||||
/* 0EC718 7F0B9D28 460A3180 */ add.s $f6, $f6, $f10
|
||||
.L7F0B9D2C:
|
||||
/* 0EC71C 7F0B9D2C E4460038 */ swc1 $f6, 0x38($v0)
|
||||
/* 0EC720 7F0B9D30 84A30006 */ lh $v1, 6($a1)
|
||||
/* 0EC724 7F0B9D34 3C018007 */ lui $at, %hi(g_NearFogValuesP) # $at, 0x8007
|
||||
/* 0EC728 7F0B9D38 54600004 */ bnezl $v1, .L7F0B9D4C
|
||||
/* 0EC72C 7F0B9D3C 44832000 */ mtc1 $v1, $f4
|
||||
/* 0EC730 7F0B9D40 10000012 */ b .L7F0B9D8C
|
||||
/* 0EC734 7F0B9D44 AC20CF64 */ sw $zero, %lo(g_NearFogValuesP)($at)
|
||||
/* 0EC738 7F0B9D48 44832000 */ mtc1 $v1, $f4
|
||||
.L7F0B9D4C:
|
||||
/* 0EC73C 7F0B9D4C 3C028007 */ lui $v0, %hi(dword_CODE_bss_800825F8) # $v0, 0x8007
|
||||
/* 0EC740 7F0B9D50 2442CF98 */ addiu $v0, %lo(dword_CODE_bss_800825F8) # addiu $v0, $v0, -0x3068
|
||||
/* 0EC744 7F0B9D54 46802220 */ cvt.s.w $f8, $f4
|
||||
/* 0EC748 7F0B9D58 3C018007 */ lui $at, %hi(g_NearFogValuesP) # $at, 0x8007
|
||||
/* 0EC74C 7F0B9D5C E4480000 */ swc1 $f8, ($v0)
|
||||
/* 0EC750 7F0B9D60 84A80008 */ lh $t0, 8($a1)
|
||||
/* 0EC754 7F0B9D64 44885000 */ mtc1 $t0, $f10
|
||||
/* 0EC758 7F0B9D68 00000000 */ nop
|
||||
/* 0EC75C 7F0B9D6C 468051A0 */ cvt.s.w $f6, $f10
|
||||
/* 0EC760 7F0B9D70 E4460004 */ swc1 $f6, 4($v0)
|
||||
/* 0EC764 7F0B9D74 84A9000A */ lh $t1, 0xa($a1)
|
||||
/* 0EC768 7F0B9D78 44892000 */ mtc1 $t1, $f4
|
||||
/* 0EC76C 7F0B9D7C 00000000 */ nop
|
||||
/* 0EC770 7F0B9D80 46802220 */ cvt.s.w $f8, $f4
|
||||
/* 0EC774 7F0B9D84 E4480008 */ swc1 $f8, 8($v0)
|
||||
/* 0EC778 7F0B9D88 AC22CF64 */ sw $v0, %lo(g_NearFogValuesP)($at)
|
||||
.L7F0B9D8C:
|
||||
/* 0EC77C 7F0B9D8C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0EC780 7F0B9D90 3C018007 */ lui $at, %hi(g_FogSkyIsEnabled) # $at, 0x8007
|
||||
/* 0EC784 7F0B9D94 AC2ACF60 */ sw $t2, %lo(g_FogSkyIsEnabled)($at)
|
||||
/* 0EC788 7F0B9D98 03E00008 */ jr $ra
|
||||
/* 0EC78C 7F0B9D9C 27BD0038 */ addiu $sp, $sp, 0x38
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Address 0x7F0BA9D0.
|
||||
@@ -730,7 +492,6 @@ void fogLoadLevelEnvironment(s32 level_id, s32 arg1)
|
||||
g_EnvironmentFoundp = NULL;
|
||||
}
|
||||
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
/**
|
||||
* Address 0x7F0BACA8.
|
||||
* Switch to next Environment.
|
||||
@@ -738,13 +499,11 @@ void fogLoadLevelEnvironment(s32 level_id, s32 arg1)
|
||||
*/
|
||||
void fogSwitchToSolosky2(f32 arg0)
|
||||
{
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
static EnvironmentRecord dword_CODE_bss_800825F8;
|
||||
#endif
|
||||
static EnvironmentRecord static_envr;
|
||||
|
||||
dword_CODE_bss_800825F8 = *g_EnvironmentMainp;
|
||||
static_envr = *g_EnvironmentMainp;
|
||||
|
||||
dword_CODE_bss_800825F8.Visibility.BlendMultiplier =
|
||||
static_envr.Visibility.BlendMultiplier =
|
||||
g_EnvironmentMainp->Visibility.BlendMultiplier
|
||||
#if defined(VERSION_EU)
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Visibility.BlendMultiplier - (f32)g_EnvironmentMainp->Visibility.BlendMultiplier));
|
||||
@@ -752,7 +511,7 @@ void fogSwitchToSolosky2(f32 arg0)
|
||||
+ (arg0 * (g_EnvironmentAltp->Visibility.BlendMultiplier - g_EnvironmentMainp->Visibility.BlendMultiplier));
|
||||
#endif
|
||||
|
||||
dword_CODE_bss_800825F8.Visibility.FarFog =
|
||||
static_envr.Visibility.FarFog =
|
||||
g_EnvironmentMainp->Visibility.FarFog
|
||||
#if defined(VERSION_EU)
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Visibility.FarFog - (f32)g_EnvironmentMainp->Visibility.FarFog));
|
||||
@@ -760,329 +519,33 @@ void fogSwitchToSolosky2(f32 arg0)
|
||||
+ (arg0 * (g_EnvironmentAltp->Visibility.FarFog - g_EnvironmentMainp->Visibility.FarFog));
|
||||
#endif
|
||||
|
||||
dword_CODE_bss_800825F8.Fog.DifferenceFromFarIntensity =
|
||||
static_envr.Fog.DifferenceFromFarIntensity =
|
||||
(f32)g_EnvironmentMainp->Fog.DifferenceFromFarIntensity
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Fog.DifferenceFromFarIntensity - (f32)g_EnvironmentMainp->Fog.DifferenceFromFarIntensity));
|
||||
|
||||
dword_CODE_bss_800825F8.Fog.FarIntensity =
|
||||
static_envr.Fog.FarIntensity =
|
||||
(f32)g_EnvironmentMainp->Fog.FarIntensity
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Fog.FarIntensity - (f32)g_EnvironmentMainp->Fog.FarIntensity));
|
||||
|
||||
dword_CODE_bss_800825F8.Sky.Red =
|
||||
static_envr.Sky.Red =
|
||||
(f32)g_EnvironmentMainp->Sky.Red
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Sky.Red - (f32)g_EnvironmentMainp->Sky.Red));
|
||||
|
||||
dword_CODE_bss_800825F8.Sky.Green =
|
||||
static_envr.Sky.Green =
|
||||
(f32)g_EnvironmentMainp->Sky.Green
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Sky.Green - (f32)g_EnvironmentMainp->Sky.Green));
|
||||
|
||||
dword_CODE_bss_800825F8.Sky.Blue =
|
||||
static_envr.Sky.Blue =
|
||||
(f32)g_EnvironmentMainp->Sky.Blue
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Sky.Blue - (f32)g_EnvironmentMainp->Sky.Blue));
|
||||
|
||||
dword_CODE_bss_800825F8.Sky.Red &= 0xf8;
|
||||
dword_CODE_bss_800825F8.Sky.Green &= 0xf8;
|
||||
dword_CODE_bss_800825F8.Sky.Blue &= 0xf8;
|
||||
static_envr.Sky.Red &= 0xf8;
|
||||
static_envr.Sky.Green &= 0xf8;
|
||||
static_envr.Sky.Blue &= 0xf8;
|
||||
|
||||
fogLoadCurrentEnvironment(&dword_CODE_bss_800825F8);
|
||||
fogLoadCurrentEnvironment(&static_envr);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
/**
|
||||
*
|
||||
* .bss
|
||||
glabel dword_CODE_bss_800825F8
|
||||
.word 0,0,0,0
|
||||
.word 0,0,0,0
|
||||
.word 0,0,0,0
|
||||
*
|
||||
*/
|
||||
/**
|
||||
* hack:
|
||||
* variables referenced in the following asm are wrong, just used
|
||||
* to get matching addresses.
|
||||
*/
|
||||
GLOBAL_ASM(
|
||||
|
||||
|
||||
|
||||
|
||||
.text
|
||||
glabel fogSwitchToSolosky2
|
||||
/* 0ECA68 7F0BA078 3C028007 */ lui $v0, %hi(g_EnvironmentMainp) # $v0, 0x8007
|
||||
/* 0ECA6C 7F0BA07C 8C42CF8C */ lw $v0, %lo(g_EnvironmentMainp)($v0)
|
||||
/* 0ECA70 7F0BA080 3C048007 */ lui $a0, %hi(g_EnvironmentMainp + 0x1c) # $a0, 0x8007
|
||||
/* 0ECA74 7F0BA084 2484CFA8 */ addiu $a0, %lo(g_EnvironmentMainp + 0x1c) # addiu $a0, $a0, -0x3058
|
||||
/* 0ECA78 7F0BA088 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 0ECA7C 7F0BA08C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0ECA80 7F0BA090 00804025 */ move $t0, $a0
|
||||
/* 0ECA84 7F0BA094 0040C825 */ move $t9, $v0
|
||||
/* 0ECA88 7F0BA098 24580024 */ addiu $t8, $v0, 0x24
|
||||
.L7F0BA09C:
|
||||
/* 0ECA8C 7F0BA09C 8B210000 */ lwl $at, ($t9)
|
||||
/* 0ECA90 7F0BA0A0 9B210003 */ lwr $at, 3($t9)
|
||||
/* 0ECA94 7F0BA0A4 2739000C */ addiu $t9, $t9, 0xc
|
||||
/* 0ECA98 7F0BA0A8 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 0ECA9C 7F0BA0AC AD01FFF4 */ sw $at, -0xc($t0)
|
||||
/* 0ECAA0 7F0BA0B0 8B21FFF8 */ lwl $at, -8($t9)
|
||||
/* 0ECAA4 7F0BA0B4 9B21FFFB */ lwr $at, -5($t9)
|
||||
/* 0ECAA8 7F0BA0B8 AD01FFF8 */ sw $at, -8($t0)
|
||||
/* 0ECAAC 7F0BA0BC 8B21FFFC */ lwl $at, -4($t9)
|
||||
/* 0ECAB0 7F0BA0C0 9B21FFFF */ lwr $at, -1($t9)
|
||||
/* 0ECAB4 7F0BA0C4 1738FFF5 */ bne $t9, $t8, .L7F0BA09C
|
||||
/* 0ECAB8 7F0BA0C8 AD01FFFC */ sw $at, -4($t0)
|
||||
/* 0ECABC 7F0BA0CC 3C038007 */ lui $v1, %hi(g_EnvironmentMainp) # $v1, 0x8007
|
||||
/* 0ECAC0 7F0BA0D0 8C63CF90 */ lw $v1, %lo(g_EnvironmentMainp+4)($v1)
|
||||
/* 0ECAC4 7F0BA0D4 84490002 */ lh $t1, 2($v0)
|
||||
/* 0ECAC8 7F0BA0D8 3C018007 */ lui $at, %hi(g_EnvironmentMainp+4) # $at, 0x8007
|
||||
/* 0ECACC 7F0BA0DC 846A0002 */ lh $t2, 2($v1)
|
||||
/* 0ECAD0 7F0BA0E0 44892000 */ mtc1 $t1, $f4
|
||||
/* 0ECAD4 7F0BA0E4 448A3000 */ mtc1 $t2, $f6
|
||||
/* 0ECAD8 7F0BA0E8 46802020 */ cvt.s.w $f0, $f4
|
||||
/* 0ECADC 7F0BA0EC 46803220 */ cvt.s.w $f8, $f6
|
||||
/* 0ECAE0 7F0BA0F0 46004281 */ sub.s $f10, $f8, $f0
|
||||
/* 0ECAE4 7F0BA0F4 460A6102 */ mul.s $f4, $f12, $f10
|
||||
/* 0ECAE8 7F0BA0F8 46040180 */ add.s $f6, $f0, $f4
|
||||
/* 0ECAEC 7F0BA0FC 4600320D */ trunc.w.s $f8, $f6
|
||||
/* 0ECAF0 7F0BA100 440C4000 */ mfc1 $t4, $f8
|
||||
/* 0ECAF4 7F0BA104 00000000 */ nop
|
||||
/* 0ECAF8 7F0BA108 A42CCFAA */ sh $t4, %lo(g_EnvironmentMainp+0x1e)($at)
|
||||
/* 0ECAFC 7F0BA10C 844D0004 */ lh $t5, 4($v0)
|
||||
/* 0ECB00 7F0BA110 846F0004 */ lh $t7, 4($v1)
|
||||
/* 0ECB04 7F0BA114 448D5000 */ mtc1 $t5, $f10
|
||||
/* 0ECB08 7F0BA118 448F2000 */ mtc1 $t7, $f4
|
||||
/* 0ECB0C 7F0BA11C 468050A0 */ cvt.s.w $f2, $f10
|
||||
/* 0ECB10 7F0BA120 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 0ECB14 7F0BA124 46023201 */ sub.s $f8, $f6, $f2
|
||||
/* 0ECB18 7F0BA128 46086282 */ mul.s $f10, $f12, $f8
|
||||
/* 0ECB1C 7F0BA12C 460A1100 */ add.s $f4, $f2, $f10
|
||||
/* 0ECB20 7F0BA130 4600218D */ trunc.w.s $f6, $f4
|
||||
/* 0ECB24 7F0BA134 44183000 */ mfc1 $t8, $f6
|
||||
/* 0ECB28 7F0BA138 00000000 */ nop
|
||||
/* 0ECB2C 7F0BA13C A438CFAC */ sh $t8, %lo(g_EnvironmentMainp+0x20)($at)
|
||||
/* 0ECB30 7F0BA140 8459000C */ lh $t9, 0xc($v0)
|
||||
/* 0ECB34 7F0BA144 8468000C */ lh $t0, 0xc($v1)
|
||||
/* 0ECB38 7F0BA148 3C018007 */ lui $at, %hi(g_EnvironmentMainp+0x20) # $at, 0x8007
|
||||
/* 0ECB3C 7F0BA14C 44994000 */ mtc1 $t9, $f8
|
||||
/* 0ECB40 7F0BA150 44885000 */ mtc1 $t0, $f10
|
||||
/* 0ECB44 7F0BA154 468043A0 */ cvt.s.w $f14, $f8
|
||||
/* 0ECB48 7F0BA158 46805120 */ cvt.s.w $f4, $f10
|
||||
/* 0ECB4C 7F0BA15C 460E2181 */ sub.s $f6, $f4, $f14
|
||||
/* 0ECB50 7F0BA160 46066202 */ mul.s $f8, $f12, $f6
|
||||
/* 0ECB54 7F0BA164 46087280 */ add.s $f10, $f14, $f8
|
||||
/* 0ECB58 7F0BA168 4600510D */ trunc.w.s $f4, $f10
|
||||
/* 0ECB5C 7F0BA16C 440A2000 */ mfc1 $t2, $f4
|
||||
/* 0ECB60 7F0BA170 00000000 */ nop
|
||||
/* 0ECB64 7F0BA174 A42ACFB4 */ sh $t2, %lo(g_EnvironmentMainp+0x28)($at)
|
||||
/* 0ECB68 7F0BA178 844B000E */ lh $t3, 0xe($v0)
|
||||
/* 0ECB6C 7F0BA17C 846C000E */ lh $t4, 0xe($v1)
|
||||
/* 0ECB70 7F0BA180 448B3000 */ mtc1 $t3, $f6
|
||||
/* 0ECB74 7F0BA184 448C4000 */ mtc1 $t4, $f8
|
||||
/* 0ECB78 7F0BA188 46803420 */ cvt.s.w $f16, $f6
|
||||
/* 0ECB7C 7F0BA18C 468042A0 */ cvt.s.w $f10, $f8
|
||||
/* 0ECB80 7F0BA190 46105101 */ sub.s $f4, $f10, $f16
|
||||
/* 0ECB84 7F0BA194 46046182 */ mul.s $f6, $f12, $f4
|
||||
/* 0ECB88 7F0BA198 46068200 */ add.s $f8, $f16, $f6
|
||||
/* 0ECB8C 7F0BA19C 4600428D */ trunc.w.s $f10, $f8
|
||||
/* 0ECB90 7F0BA1A0 440F5000 */ mfc1 $t7, $f10
|
||||
/* 0ECB94 7F0BA1A4 00000000 */ nop
|
||||
/* 0ECB98 7F0BA1A8 A42FCFB6 */ sh $t7, %lo(g_EnvironmentMainp+0x2a)($at)
|
||||
/* 0ECB9C 7F0BA1AC 904E0010 */ lbu $t6, 0x10($v0)
|
||||
/* 0ECBA0 7F0BA1B0 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECBA4 7F0BA1B4 448E2000 */ mtc1 $t6, $f4
|
||||
/* 0ECBA8 7F0BA1B8 05C10004 */ bgez $t6, .L7F0BA1CC
|
||||
/* 0ECBAC 7F0BA1BC 468024A0 */ cvt.s.w $f18, $f4
|
||||
/* 0ECBB0 7F0BA1C0 44813000 */ mtc1 $at, $f6
|
||||
/* 0ECBB4 7F0BA1C4 00000000 */ nop
|
||||
/* 0ECBB8 7F0BA1C8 46069480 */ add.s $f18, $f18, $f6
|
||||
.L7F0BA1CC:
|
||||
/* 0ECBBC 7F0BA1CC 90780010 */ lbu $t8, 0x10($v1)
|
||||
/* 0ECBC0 7F0BA1D0 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECBC4 7F0BA1D4 44984000 */ mtc1 $t8, $f8
|
||||
/* 0ECBC8 7F0BA1D8 07010004 */ bgez $t8, .L7F0BA1EC
|
||||
/* 0ECBCC 7F0BA1DC 468042A0 */ cvt.s.w $f10, $f8
|
||||
/* 0ECBD0 7F0BA1E0 44812000 */ mtc1 $at, $f4
|
||||
/* 0ECBD4 7F0BA1E4 00000000 */ nop
|
||||
/* 0ECBD8 7F0BA1E8 46045280 */ add.s $f10, $f10, $f4
|
||||
.L7F0BA1EC:
|
||||
/* 0ECBDC 7F0BA1EC 46125181 */ sub.s $f6, $f10, $f18
|
||||
/* 0ECBE0 7F0BA1F0 24080001 */ li $t0, 1
|
||||
/* 0ECBE4 7F0BA1F4 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000
|
||||
/* 0ECBE8 7F0BA1F8 46066202 */ mul.s $f8, $f12, $f6
|
||||
/* 0ECBEC 7F0BA1FC 46089100 */ add.s $f4, $f18, $f8
|
||||
/* 0ECBF0 7F0BA200 4459F800 */ cfc1 $t9, $31
|
||||
/* 0ECBF4 7F0BA204 44C8F800 */ ctc1 $t0, $31
|
||||
/* 0ECBF8 7F0BA208 00000000 */ nop
|
||||
/* 0ECBFC 7F0BA20C 460022A4 */ cvt.w.s $f10, $f4
|
||||
/* 0ECC00 7F0BA210 4448F800 */ cfc1 $t0, $31
|
||||
/* 0ECC04 7F0BA214 00000000 */ nop
|
||||
/* 0ECC08 7F0BA218 31080078 */ andi $t0, $t0, 0x78
|
||||
/* 0ECC0C 7F0BA21C 51000013 */ beql $t0, $zero, .L7F0BA26C
|
||||
/* 0ECC10 7F0BA220 44085000 */ mfc1 $t0, $f10
|
||||
/* 0ECC14 7F0BA224 44815000 */ mtc1 $at, $f10
|
||||
/* 0ECC18 7F0BA228 24080001 */ li $t0, 1
|
||||
/* 0ECC1C 7F0BA22C 460A2281 */ sub.s $f10, $f4, $f10
|
||||
/* 0ECC20 7F0BA230 44C8F800 */ ctc1 $t0, $31
|
||||
/* 0ECC24 7F0BA234 00000000 */ nop
|
||||
/* 0ECC28 7F0BA238 460052A4 */ cvt.w.s $f10, $f10
|
||||
/* 0ECC2C 7F0BA23C 4448F800 */ cfc1 $t0, $31
|
||||
/* 0ECC30 7F0BA240 00000000 */ nop
|
||||
/* 0ECC34 7F0BA244 31080078 */ andi $t0, $t0, 0x78
|
||||
/* 0ECC38 7F0BA248 15000005 */ bnez $t0, .L7F0BA260
|
||||
/* 0ECC3C 7F0BA24C 00000000 */ nop
|
||||
/* 0ECC40 7F0BA250 44085000 */ mfc1 $t0, $f10
|
||||
/* 0ECC44 7F0BA254 3C018000 */ lui $at, 0x8000
|
||||
/* 0ECC48 7F0BA258 10000007 */ b .L7F0BA278
|
||||
/* 0ECC4C 7F0BA25C 01014025 */ or $t0, $t0, $at
|
||||
.L7F0BA260:
|
||||
/* 0ECC50 7F0BA260 10000005 */ b .L7F0BA278
|
||||
/* 0ECC54 7F0BA264 2408FFFF */ li $t0, -1
|
||||
/* 0ECC58 7F0BA268 44085000 */ mfc1 $t0, $f10
|
||||
.L7F0BA26C:
|
||||
/* 0ECC5C 7F0BA26C 00000000 */ nop
|
||||
/* 0ECC60 7F0BA270 0500FFFB */ bltz $t0, .L7F0BA260
|
||||
/* 0ECC64 7F0BA274 00000000 */ nop
|
||||
.L7F0BA278:
|
||||
/* 0ECC68 7F0BA278 3C018007 */ lui $at, %hi(g_EnvironmentMainp+0x2c) # $at, 0x8007
|
||||
/* 0ECC6C 7F0BA27C A028CFB8 */ sb $t0, %lo(g_EnvironmentMainp+0x2c)($at)
|
||||
/* 0ECC70 7F0BA280 90490011 */ lbu $t1, 0x11($v0)
|
||||
/* 0ECC74 7F0BA284 44D9F800 */ ctc1 $t9, $31
|
||||
/* 0ECC78 7F0BA288 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECC7C 7F0BA28C 44893000 */ mtc1 $t1, $f6
|
||||
/* 0ECC80 7F0BA290 05210004 */ bgez $t1, .L7F0BA2A4
|
||||
/* 0ECC84 7F0BA294 46803220 */ cvt.s.w $f8, $f6
|
||||
/* 0ECC88 7F0BA298 44812000 */ mtc1 $at, $f4
|
||||
/* 0ECC8C 7F0BA29C 00000000 */ nop
|
||||
/* 0ECC90 7F0BA2A0 46044200 */ add.s $f8, $f8, $f4
|
||||
.L7F0BA2A4:
|
||||
/* 0ECC94 7F0BA2A4 E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* 0ECC98 7F0BA2A8 906A0011 */ lbu $t2, 0x11($v1)
|
||||
/* 0ECC9C 7F0BA2AC C7A80018 */ lwc1 $f8, 0x18($sp)
|
||||
/* 0ECCA0 7F0BA2B0 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECCA4 7F0BA2B4 448A5000 */ mtc1 $t2, $f10
|
||||
/* 0ECCA8 7F0BA2B8 310900F8 */ andi $t1, $t0, 0xf8
|
||||
/* 0ECCAC 7F0BA2BC 05410004 */ bgez $t2, .L7F0BA2D0
|
||||
/* 0ECCB0 7F0BA2C0 468051A0 */ cvt.s.w $f6, $f10
|
||||
/* 0ECCB4 7F0BA2C4 44812000 */ mtc1 $at, $f4
|
||||
/* 0ECCB8 7F0BA2C8 00000000 */ nop
|
||||
/* 0ECCBC 7F0BA2CC 46043180 */ add.s $f6, $f6, $f4
|
||||
.L7F0BA2D0:
|
||||
/* 0ECCC0 7F0BA2D0 46083281 */ sub.s $f10, $f6, $f8
|
||||
/* 0ECCC4 7F0BA2D4 240C0001 */ li $t4, 1
|
||||
/* 0ECCC8 7F0BA2D8 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000
|
||||
/* 0ECCCC 7F0BA2DC 460A6102 */ mul.s $f4, $f12, $f10
|
||||
/* 0ECCD0 7F0BA2E0 46044180 */ add.s $f6, $f8, $f4
|
||||
/* 0ECCD4 7F0BA2E4 444BF800 */ cfc1 $t3, $31
|
||||
/* 0ECCD8 7F0BA2E8 44CCF800 */ ctc1 $t4, $31
|
||||
/* 0ECCDC 7F0BA2EC 00000000 */ nop
|
||||
/* 0ECCE0 7F0BA2F0 460032A4 */ cvt.w.s $f10, $f6
|
||||
/* 0ECCE4 7F0BA2F4 444CF800 */ cfc1 $t4, $31
|
||||
/* 0ECCE8 7F0BA2F8 00000000 */ nop
|
||||
/* 0ECCEC 7F0BA2FC 318C0078 */ andi $t4, $t4, 0x78
|
||||
/* 0ECCF0 7F0BA300 51800013 */ beql $t4, $zero, .L7F0BA350
|
||||
/* 0ECCF4 7F0BA304 440C5000 */ mfc1 $t4, $f10
|
||||
/* 0ECCF8 7F0BA308 44815000 */ mtc1 $at, $f10
|
||||
/* 0ECCFC 7F0BA30C 240C0001 */ li $t4, 1
|
||||
/* 0ECD00 7F0BA310 460A3281 */ sub.s $f10, $f6, $f10
|
||||
/* 0ECD04 7F0BA314 44CCF800 */ ctc1 $t4, $31
|
||||
/* 0ECD08 7F0BA318 00000000 */ nop
|
||||
/* 0ECD0C 7F0BA31C 460052A4 */ cvt.w.s $f10, $f10
|
||||
/* 0ECD10 7F0BA320 444CF800 */ cfc1 $t4, $31
|
||||
/* 0ECD14 7F0BA324 00000000 */ nop
|
||||
/* 0ECD18 7F0BA328 318C0078 */ andi $t4, $t4, 0x78
|
||||
/* 0ECD1C 7F0BA32C 15800005 */ bnez $t4, .L7F0BA344
|
||||
/* 0ECD20 7F0BA330 00000000 */ nop
|
||||
/* 0ECD24 7F0BA334 440C5000 */ mfc1 $t4, $f10
|
||||
/* 0ECD28 7F0BA338 3C018000 */ lui $at, 0x8000
|
||||
/* 0ECD2C 7F0BA33C 10000007 */ b .L7F0BA35C
|
||||
/* 0ECD30 7F0BA340 01816025 */ or $t4, $t4, $at
|
||||
.L7F0BA344:
|
||||
/* 0ECD34 7F0BA344 10000005 */ b .L7F0BA35C
|
||||
/* 0ECD38 7F0BA348 240CFFFF */ li $t4, -1
|
||||
/* 0ECD3C 7F0BA34C 440C5000 */ mfc1 $t4, $f10
|
||||
.L7F0BA350:
|
||||
/* 0ECD40 7F0BA350 00000000 */ nop
|
||||
/* 0ECD44 7F0BA354 0580FFFB */ bltz $t4, .L7F0BA344
|
||||
/* 0ECD48 7F0BA358 00000000 */ nop
|
||||
.L7F0BA35C:
|
||||
/* 0ECD4C 7F0BA35C 3C018007 */ lui $at, %hi(g_EnvironmentMainp+0x2d) # $at, 0x8007
|
||||
/* 0ECD50 7F0BA360 A02CCFB9 */ sb $t4, %lo(g_EnvironmentMainp+0x2d)($at)
|
||||
/* 0ECD54 7F0BA364 904D0012 */ lbu $t5, 0x12($v0)
|
||||
/* 0ECD58 7F0BA368 44CBF800 */ ctc1 $t3, $31
|
||||
/* 0ECD5C 7F0BA36C 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECD60 7F0BA370 448D4000 */ mtc1 $t5, $f8
|
||||
/* 0ECD64 7F0BA374 318B00F8 */ andi $t3, $t4, 0xf8
|
||||
/* 0ECD68 7F0BA378 05A10004 */ bgez $t5, .L7F0BA38C
|
||||
/* 0ECD6C 7F0BA37C 46804120 */ cvt.s.w $f4, $f8
|
||||
/* 0ECD70 7F0BA380 44813000 */ mtc1 $at, $f6
|
||||
/* 0ECD74 7F0BA384 00000000 */ nop
|
||||
/* 0ECD78 7F0BA388 46062100 */ add.s $f4, $f4, $f6
|
||||
.L7F0BA38C:
|
||||
/* 0ECD7C 7F0BA38C E7A4001C */ swc1 $f4, 0x1c($sp)
|
||||
/* 0ECD80 7F0BA390 906F0012 */ lbu $t7, 0x12($v1)
|
||||
/* 0ECD84 7F0BA394 C7A4001C */ lwc1 $f4, 0x1c($sp)
|
||||
/* 0ECD88 7F0BA398 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 0ECD8C 7F0BA39C 448F5000 */ mtc1 $t7, $f10
|
||||
/* 0ECD90 7F0BA3A0 05E10004 */ bgez $t7, .L7F0BA3B4
|
||||
/* 0ECD94 7F0BA3A4 46805220 */ cvt.s.w $f8, $f10
|
||||
/* 0ECD98 7F0BA3A8 44813000 */ mtc1 $at, $f6
|
||||
/* 0ECD9C 7F0BA3AC 00000000 */ nop
|
||||
/* 0ECDA0 7F0BA3B0 46064200 */ add.s $f8, $f8, $f6
|
||||
.L7F0BA3B4:
|
||||
/* 0ECDA4 7F0BA3B4 46044281 */ sub.s $f10, $f8, $f4
|
||||
/* 0ECDA8 7F0BA3B8 24180001 */ li $t8, 1
|
||||
/* 0ECDAC 7F0BA3BC 3C014F00 */ li $at, 0x4F000000 # 2147483648.000000
|
||||
/* 0ECDB0 7F0BA3C0 460A6182 */ mul.s $f6, $f12, $f10
|
||||
/* 0ECDB4 7F0BA3C4 46062200 */ add.s $f8, $f4, $f6
|
||||
/* 0ECDB8 7F0BA3C8 444EF800 */ cfc1 $t6, $31
|
||||
/* 0ECDBC 7F0BA3CC 44D8F800 */ ctc1 $t8, $31
|
||||
/* 0ECDC0 7F0BA3D0 00000000 */ nop
|
||||
/* 0ECDC4 7F0BA3D4 460042A4 */ cvt.w.s $f10, $f8
|
||||
/* 0ECDC8 7F0BA3D8 4458F800 */ cfc1 $t8, $31
|
||||
/* 0ECDCC 7F0BA3DC 00000000 */ nop
|
||||
/* 0ECDD0 7F0BA3E0 33180078 */ andi $t8, $t8, 0x78
|
||||
/* 0ECDD4 7F0BA3E4 53000013 */ beql $t8, $zero, .L7F0BA434
|
||||
/* 0ECDD8 7F0BA3E8 44185000 */ mfc1 $t8, $f10
|
||||
/* 0ECDDC 7F0BA3EC 44815000 */ mtc1 $at, $f10
|
||||
/* 0ECDE0 7F0BA3F0 24180001 */ li $t8, 1
|
||||
/* 0ECDE4 7F0BA3F4 460A4281 */ sub.s $f10, $f8, $f10
|
||||
/* 0ECDE8 7F0BA3F8 44D8F800 */ ctc1 $t8, $31
|
||||
/* 0ECDEC 7F0BA3FC 00000000 */ nop
|
||||
/* 0ECDF0 7F0BA400 460052A4 */ cvt.w.s $f10, $f10
|
||||
/* 0ECDF4 7F0BA404 4458F800 */ cfc1 $t8, $31
|
||||
/* 0ECDF8 7F0BA408 00000000 */ nop
|
||||
/* 0ECDFC 7F0BA40C 33180078 */ andi $t8, $t8, 0x78
|
||||
/* 0ECE00 7F0BA410 17000005 */ bnez $t8, .L7F0BA428
|
||||
/* 0ECE04 7F0BA414 00000000 */ nop
|
||||
/* 0ECE08 7F0BA418 44185000 */ mfc1 $t8, $f10
|
||||
/* 0ECE0C 7F0BA41C 3C018000 */ lui $at, 0x8000
|
||||
/* 0ECE10 7F0BA420 10000007 */ b .L7F0BA440
|
||||
/* 0ECE14 7F0BA424 0301C025 */ or $t8, $t8, $at
|
||||
.L7F0BA428:
|
||||
/* 0ECE18 7F0BA428 10000005 */ b .L7F0BA440
|
||||
/* 0ECE1C 7F0BA42C 2418FFFF */ li $t8, -1
|
||||
/* 0ECE20 7F0BA430 44185000 */ mfc1 $t8, $f10
|
||||
.L7F0BA434:
|
||||
/* 0ECE24 7F0BA434 00000000 */ nop
|
||||
/* 0ECE28 7F0BA438 0700FFFB */ bltz $t8, .L7F0BA428
|
||||
/* 0ECE2C 7F0BA43C 00000000 */ nop
|
||||
.L7F0BA440:
|
||||
/* 0ECE30 7F0BA440 3C018007 */ lui $at, %hi(g_EnvironmentMainp+0x2e) # $at, 0x8007
|
||||
/* 0ECE34 7F0BA444 A038CFBA */ sb $t8, %lo(g_EnvironmentMainp+0x2e)($at)
|
||||
/* 0ECE38 7F0BA448 44CEF800 */ ctc1 $t6, $31
|
||||
/* 0ECE3C 7F0BA44C 330F00F8 */ andi $t7, $t8, 0xf8
|
||||
/* 0ECE40 7F0BA450 A029CFB8 */ sb $t1, %lo(g_EnvironmentMainp+0x2c)($at)
|
||||
/* 0ECE44 7F0BA454 A02BCFB9 */ sb $t3, %lo(g_EnvironmentMainp+0x2d)($at)
|
||||
/* 0ECE48 7F0BA458 0FC2E67E */ jal fogLoadCurrentEnvironment
|
||||
/* 0ECE4C 7F0BA45C A02FCFBA */ sb $t7, %lo(g_EnvironmentMainp+0x2e)($at)
|
||||
/* 0ECE50 7F0BA460 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0ECE54 7F0BA464 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 0ECE58 7F0BA468 03E00008 */ jr $ra
|
||||
/* 0ECE5C 7F0BA46C 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* @param gdl:
|
||||
@@ -1179,28 +642,28 @@ s32 fogGetPropDistColor(PropRecord *prop, rgba_f32 *color)
|
||||
{
|
||||
if (g_FogSkyIsEnabled == 0)
|
||||
{
|
||||
return 2;
|
||||
return 2; // No fog, props cannot be obscured by fog
|
||||
}
|
||||
|
||||
if (prop->Unk18 < 0.0f)
|
||||
if (prop->zDepth < 0.0f)
|
||||
{
|
||||
return 2;
|
||||
return 2; // Prop is behind the camera
|
||||
}
|
||||
|
||||
color->rgba[0] = (f32) g_CurrentEnvironment.Red / 255.0f;
|
||||
color->rgba[1] = (f32) g_CurrentEnvironment.Green / 255.0f;
|
||||
color->rgba[2] = (f32) g_CurrentEnvironment.Blue / 255.0f;
|
||||
color->rgba[3] = (g_CurFogDetails.far_fog_dist_scaled / prop->Unk18) + g_CurFogDetails.near_fog_dist_scaled;
|
||||
color->rgba[3] = (g_CurFogDetails.far_fog_dist_scaled / prop->zDepth) + g_CurFogDetails.near_fog_dist_scaled;
|
||||
|
||||
if (color->rgba[3] < 0.0f)
|
||||
{
|
||||
return 2;
|
||||
return 2; // Prop has no fog effect coloring applied to it
|
||||
}
|
||||
|
||||
if (color->rgba[3] > 1.0f)
|
||||
{
|
||||
return 0;
|
||||
return 0; // Prop is completely obscured by fog (don't render)
|
||||
}
|
||||
|
||||
return 1;
|
||||
return 1; // Fog color will be applied to prop
|
||||
}
|
||||
|
||||
+1169
-1034
File diff suppressed because it is too large
Load Diff
+31
-1
@@ -4,6 +4,36 @@
|
||||
#include <bondgame.h>
|
||||
#include <bondconstants.h>
|
||||
|
||||
|
||||
#define TABS_LEFT_EDGE 390.0f
|
||||
#define TABS_RIGHT_EDGE 411
|
||||
|
||||
#define NEXTTAB_CURSOR_HPOS 399.0f
|
||||
#define NEXTTAB_CURSOR_VPOS 144.0f
|
||||
|
||||
#define STARTTAB_TAB_TOP 40.0f
|
||||
#define STARTTAB_TEXT_TOP 51
|
||||
//#define STARTTAB_TEXT_HALF 84
|
||||
#define STARTTAB_TEXT_HALF (STARTTAB_TEXT_TOP + ((STARTTAB_TEXT_BOTTOM-STARTTAB_TEXT_TOP)/2))
|
||||
#define STARTTAB_TEXT_BOTTOM 117
|
||||
#define STARTTAB_TAB_BOTTOM 130.5f
|
||||
|
||||
#define NEXTTAB_TAB_TOP 130.5f
|
||||
#define NEXTTAB_TEXT_TOP 144
|
||||
//#define NEXTTAB_TEXT_HALF 177
|
||||
#define NEXTTAB_TEXT_HALF (NEXTTAB_TEXT_TOP + ((NEXTTAB_TEXT_BOTTOM-NEXTTAB_TEXT_TOP)/2))
|
||||
#define NEXTTAB_TEXT_BOTTOM 210
|
||||
#define NEXTTAB_TAB_BOTTOM 223.0f
|
||||
|
||||
#define PREVTAB_TAB_TOP 223.0f
|
||||
#define PREVTAB_TEXT_TOP 236
|
||||
//#define PREVTAB_TEXT_HALF 269
|
||||
#define PREVTAB_TEXT_HALF (PREVTAB_TEXT_TOP + ((PREVTAB_TEXT_BOTTOM-PREVTAB_TEXT_TOP)/2))
|
||||
#define PREVTAB_TEXT_BOTTOM 302
|
||||
#define PREVTAB_TAB_BOTTOM 315.0f
|
||||
|
||||
|
||||
|
||||
struct legal_screen_text {
|
||||
s32 h_pos;
|
||||
s32 v_pos;
|
||||
@@ -311,7 +341,7 @@ int get_mp_timelimit(void);
|
||||
int get_mp_pointlimit(void);
|
||||
void reset_mp_options_for_scenario(MPSCENARIOS scenarioid);
|
||||
void copy_aim_settings_to_playerdata(void);
|
||||
void menu_init();
|
||||
void menu_init(void);
|
||||
Gfx * menu_jump_constructor_handler(Gfx *DL);
|
||||
void unlock_all_mp_chars(void);
|
||||
u8 get_player_mp_char_gender(int player);
|
||||
|
||||
+183
-146
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -274,6 +274,9 @@ struct EarWhistleSounds {
|
||||
};
|
||||
|
||||
extern CasingRecord g_Casings[20];
|
||||
extern u32 size_item_buffer[];
|
||||
extern WeaponStats sniperrifle_stats;
|
||||
extern WeaponStats camera_stats;
|
||||
|
||||
f32 bondwalkItemGetForceOfImpact(ITEM_IDS item);
|
||||
|
||||
@@ -305,7 +308,7 @@ s32 get_max_ammo_for_type(s32);
|
||||
void give_cur_player_ammo(s32, s32);
|
||||
s8 bondwalkItemGetAutomaticFiringRate(ITEM_IDS item);
|
||||
void inc_cur_civilian_casualties(void);
|
||||
void increment_num_kills_display_text_in_MP();
|
||||
void increment_num_kills_display_text_in_MP(void);
|
||||
f32 bondwalkItemGetDestructionAmount(ITEM_IDS item);
|
||||
u16 bondwalkItemGetSound(ITEM_IDS item);
|
||||
u8 bondwalkItemGetSoundTriggerRate(ITEM_IDS item);
|
||||
|
||||
+174
-69
@@ -530,9 +530,113 @@ s32 texShrinkPaletted(u8 *src, u8 *dst, s32 srcwidth, s32 srcheight, s32 format,
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void texFindClosestColourIndexRGBA(void) {
|
||||
// https://decomp.me/scratch/m2ol7 79.87%
|
||||
s32 texFindClosestColourIndexRGBA(u16 *palette, s32 numcolours, s32 r, s32 g, s32 b, s32 a)
|
||||
{
|
||||
s32 var_v1;
|
||||
u16 temp_t6;
|
||||
s32 temp_t0;
|
||||
s32 var_a1;
|
||||
s32 temp_a0;
|
||||
|
||||
s32 loop_start;
|
||||
s32 loop_end;
|
||||
|
||||
s32 bestindex;
|
||||
s32 bestvalue;
|
||||
|
||||
u16 local_color;
|
||||
s32 local_r;
|
||||
s32 local_g;
|
||||
s32 local_b;
|
||||
s32 local_a;
|
||||
s32 temp_s4;
|
||||
|
||||
temp_t6 = ((r << 11) | (g << 6) | (b << 1) | a);
|
||||
|
||||
for (var_v1 = 0; var_v1 < numcolours; var_v1++)
|
||||
{
|
||||
if (temp_t6 == palette[var_v1])
|
||||
{
|
||||
return var_v1;
|
||||
}
|
||||
}
|
||||
|
||||
temp_t0 = (r * r) + (g * g) + (b * b) + (a * 0x3C1);
|
||||
var_v1 = numcolours - 1;
|
||||
var_a1 = 0;
|
||||
|
||||
// binary search for a region
|
||||
while (var_v1 - var_a1 >= 2)
|
||||
{
|
||||
temp_a0 = (s32) (var_v1 + var_a1) >> 1;
|
||||
|
||||
local_color = palette[temp_a0 * 4];
|
||||
local_r = ((s32) local_color >> 0xB) & 0x1F;
|
||||
local_g = ((s32) local_color >> 0x6) & 0x1F;
|
||||
local_b = ((s32) local_color >> 0x1) & 0x1F;
|
||||
local_a = local_color & 1;
|
||||
|
||||
temp_s4 = (local_r * local_r) + (local_g * local_g) + (local_b * local_b) + (local_a * 0x3C1);
|
||||
|
||||
if (temp_s4 < temp_t0)
|
||||
{
|
||||
var_a1 = temp_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (temp_t0 < temp_s4)
|
||||
{
|
||||
var_v1 = temp_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_v1 = temp_a0;
|
||||
var_a1 = temp_a0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
loop_start = var_v1 - 4;
|
||||
if (loop_start < 0)
|
||||
{
|
||||
loop_start = 0;
|
||||
}
|
||||
|
||||
loop_end = var_v1 + 4;
|
||||
if (loop_end >= numcolours)
|
||||
{
|
||||
loop_end = numcolours - 1;
|
||||
}
|
||||
|
||||
bestindex = 0;
|
||||
bestvalue = 999999;
|
||||
|
||||
// search for best within the region
|
||||
for (var_v1 = loop_start; var_v1 < loop_end; var_v1++)
|
||||
{
|
||||
local_color = palette[var_v1 * 4];
|
||||
local_r = (((s32) local_color >> 0xB) & 0x1F) - r;
|
||||
local_g = (((s32) local_color >> 0x6) & 0x1F) - g;
|
||||
local_b = (((s32) local_color >> 0x1) & 0x1F) - b;
|
||||
local_a = 0x3C1;
|
||||
if (a == (local_color & 1))
|
||||
{
|
||||
local_a = 0;
|
||||
}
|
||||
|
||||
temp_s4 = (local_r * local_r) + (local_g * local_g) + (local_b * local_b) + (local_a);
|
||||
|
||||
if (temp_s4 < bestvalue)
|
||||
{
|
||||
bestindex = var_v1;
|
||||
bestvalue = temp_s4;
|
||||
}
|
||||
}
|
||||
|
||||
return bestindex;
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
@@ -839,103 +943,104 @@ glabel texFindClosestColourIndexRGBA
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// 99.38% : regalloc problems
|
||||
|
||||
// https://decomp.me/scratch/tmXxj 99.64%
|
||||
s32 texFindClosestColourIndexIA(u16 *palette, s32 numcolours, s32 intensity, s32 alpha)
|
||||
{
|
||||
s32 loop_start;
|
||||
s32 loop_end;
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
s32 bestindex;
|
||||
s32 bestvalue;
|
||||
|
||||
s32 low;
|
||||
s32 colour;
|
||||
|
||||
s32 value;
|
||||
s32 a;
|
||||
s32 b;
|
||||
s32 sum;
|
||||
|
||||
u32 sum2; // is this real?
|
||||
|
||||
// check palette for existing color
|
||||
colour = (intensity << 8) | alpha;
|
||||
for (i = 0; i < numcolours; i++)
|
||||
{
|
||||
s32 i;
|
||||
s32 colour;
|
||||
colour = (intensity << 8) | alpha;
|
||||
for (i = 0; i < numcolours; i++)
|
||||
if (palette[i] == (colour & 0xFFFFU))
|
||||
{
|
||||
if (palette[i] == (colour & 0xFFFFU))
|
||||
{
|
||||
return i;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
// binary search for a region
|
||||
low = 0;
|
||||
loop_end = numcolours - 1;
|
||||
colour = (intensity * intensity) + (alpha * alpha);
|
||||
|
||||
while ((loop_end - low) >= 2)
|
||||
{
|
||||
s32 low;
|
||||
s32 colour;
|
||||
s32 a;
|
||||
s32 b;
|
||||
s32 sum;
|
||||
s32 index;
|
||||
s32 value;
|
||||
|
||||
low = 0;
|
||||
loop_end = numcolours - 1;
|
||||
colour = (intensity * intensity) + (alpha * alpha);
|
||||
|
||||
while ((loop_end - low) >= 2)
|
||||
|
||||
index = (loop_end + low) >> 1;
|
||||
value = palette[index];
|
||||
a = (((s32) value) >> 8) & 0xFF;
|
||||
b = value & 0xFF;
|
||||
sum = (a * a) + (b * b);
|
||||
if (sum < colour)
|
||||
{
|
||||
index = (loop_end + low) >> 1;
|
||||
value = palette[index];
|
||||
a = (((s32) value) >> 8) & 0xFF;
|
||||
b = value & 0xFF;
|
||||
sum = (a * a) + (b * b);
|
||||
if (sum < colour)
|
||||
{
|
||||
low = index;
|
||||
continue;
|
||||
}
|
||||
if (colour < sum)
|
||||
{
|
||||
loop_end = index;
|
||||
}
|
||||
else
|
||||
{
|
||||
low = index;
|
||||
loop_end = index;
|
||||
}
|
||||
low = index;
|
||||
continue;
|
||||
}
|
||||
if (colour < sum)
|
||||
{
|
||||
loop_end = index;
|
||||
}
|
||||
else
|
||||
{
|
||||
low = index;
|
||||
loop_end = index;
|
||||
}
|
||||
}
|
||||
|
||||
loop_start = loop_end - 4;
|
||||
if (loop_start < 0) { loop_start = 0; }
|
||||
loop_start = loop_end - 4;
|
||||
if (loop_start < 0)
|
||||
{
|
||||
loop_start = 0;
|
||||
}
|
||||
|
||||
loop_end += 4;
|
||||
if (loop_end >= numcolours) { loop_end = numcolours - 1; }
|
||||
loop_end += 4;
|
||||
if (loop_end >= numcolours)
|
||||
{
|
||||
loop_end = numcolours - 1;
|
||||
}
|
||||
|
||||
// search for best within the region
|
||||
bestindex = 0;
|
||||
bestvalue = 999999;
|
||||
|
||||
for (j = loop_start; j <= loop_end; j++)
|
||||
{
|
||||
s32 bestindex;
|
||||
s32 bestvalue;
|
||||
s32 value;
|
||||
s32 a;
|
||||
s32 b;
|
||||
u32 sum2;
|
||||
s32 sum;
|
||||
s32 index;
|
||||
value = palette[j];
|
||||
a = ((value >> 8) & 0xff) - intensity;
|
||||
b = (value & 0xff) - alpha;
|
||||
sum = (a * a) + (b * b);
|
||||
|
||||
bestindex = 0;
|
||||
bestvalue = 999999;
|
||||
sum2 = sum;
|
||||
|
||||
for (index = loop_start; index <= loop_end; index++)
|
||||
if (sum < bestvalue)
|
||||
{
|
||||
value = palette[index];
|
||||
a = ((value >> 8) & 0xff) - intensity;
|
||||
b = (value & 0xff) - alpha;
|
||||
sum2 = (a * a) + (b * b);
|
||||
sum = sum2;
|
||||
if (sum < bestvalue)
|
||||
{
|
||||
bestindex = index;
|
||||
bestvalue = sum;
|
||||
}
|
||||
bestindex = j;
|
||||
bestvalue = sum;
|
||||
}
|
||||
|
||||
return bestindex;
|
||||
// Seems to need to be any variable used in the loop here?
|
||||
if (j);
|
||||
}
|
||||
}
|
||||
|
||||
return bestindex;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define _IMAGE_H_
|
||||
#include <ultra64.h>
|
||||
#include <bondconstants.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
#define TEXFORMAT_RGBA32 0x00 // 32-bit RGBA (8/8/8/8)
|
||||
#define TEXFORMAT_RGBA16 0x01 // 16-bit RGBA (5/5/5/1)
|
||||
@@ -92,5 +93,6 @@ s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpoo
|
||||
void texLoad(s32 *updateword, struct texpool *pool);
|
||||
void texInitPool(struct texpool *arg0, u8 *arg1, s32 arg2);
|
||||
void texLoadFromTextureNum(s32 texturenum, struct texpool *arg1);
|
||||
void texLoadFromModelFileHeader(ModelFileHeader* arg0, struct texpool* arg1);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -170,7 +170,7 @@ void texReset(void)
|
||||
s32 i;
|
||||
|
||||
size = (u32)&_GlobalimagetableSegmentEnd - (u32)&_GlobalimagetableSegmentStart;
|
||||
pGlobalimagetable = mempAllocBytesInBank(size + 0x1000, 4U);
|
||||
pGlobalimagetable = mempAllocBytesInBank(size + 0x1000, MEMPOOL_STAGE);
|
||||
pGlobalimagetable = ((u32)pGlobalimagetable + 0xFFFU) & 0xFFFFF000;
|
||||
|
||||
romCopy(pGlobalimagetable, &_GlobalimagetableSegmentRomStart, size);
|
||||
|
||||
@@ -12,9 +12,12 @@ extern struct sImageTableEntry *genericimage;
|
||||
extern struct sImageTableEntry *skywaterimages;
|
||||
extern struct sImageTableEntry *monitorimages;
|
||||
extern struct sImageTableEntry *mpcharselimages;
|
||||
extern struct sImageTableEntry *mpradarimages;
|
||||
extern struct sImageTableEntry *impactimages;
|
||||
|
||||
extern u8* img_curpos;
|
||||
extern s32 img_bitcount;
|
||||
extern s32 *pGlobalimagetable;
|
||||
|
||||
void texReset(void);
|
||||
u32 texReadBits(s32 bitCount);
|
||||
|
||||
+252
-337
File diff suppressed because it is too large
Load Diff
@@ -128,7 +128,7 @@ typedef struct indy_resource_entry_type10 {
|
||||
|
||||
extern s32 indy_ready;
|
||||
|
||||
s32 indycmdSendCommand(struct indy_resource_entry_header *cmd,u32 size);
|
||||
s32 indycmdSendCommand(u8 *buffer, u32 size);
|
||||
|
||||
s32 indycmdSendInitPacket(void);
|
||||
s32 indycmdSendHostCheckFileExists(char *strptr);
|
||||
@@ -138,7 +138,7 @@ s32 indycmdSendRamRomLoad(char *strptr,u32 ptarget,u32 filesize);
|
||||
s32 indycmdSendHostExportFile(char *strptr,u8 *phwaddr,u32 size);
|
||||
s32 indycmdSendHostCmdPacket(char *strptr);
|
||||
|
||||
s32 indycmdRecieveCommand(struct indy_resource_entry_header *resource,u32 size);
|
||||
s32 indycmdRecieveCommand(u8 *buffer, u32 size);
|
||||
|
||||
s32 indycmdAckHostCheckFileExists(u8 *response1,u8 *response2);
|
||||
s32 indycmdReceiveFile(u8 *response1,u8 *response2,u32 childsize,u8 *child);
|
||||
|
||||
+275
-587
@@ -1,6 +1,11 @@
|
||||
#include <ultra64.h>
|
||||
#include <memp.h>
|
||||
#include "initBondDATA.h"
|
||||
#include "bondtypes.h"
|
||||
#include "bondconstants.h"
|
||||
#include "bondview.h"
|
||||
#include "gun.h"
|
||||
#include "player.h"
|
||||
|
||||
|
||||
#ifdef REFRESH_PAL
|
||||
@@ -8,111 +13,274 @@
|
||||
#else
|
||||
#define VALUENAME 19.999996
|
||||
#endif
|
||||
struct BONDdata_item_control_blocks hand_data_dummy = {
|
||||
0, 0xFFFFFFFF, 0, 0x100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 1.0, 0, 0, 0, 0, 1.0, 0,
|
||||
0, 0, 0, 1.0, 0, 0, 0, 0, 0, 0, -1.0, 0, 1.0, 0, 0, 0, 0, 0, 0, -VALUENAME, 0,
|
||||
VALUENAME, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1.0, 0, 0, -1.0, 0, 0,
|
||||
-1.0, 0, 0, -1.0, 0, 1.0, 0, 0, 1.0, 0, 0, 1.0, 0, 0, 1.0, 0, 0, 0, 1.0, 1.0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1000.0, 0, 0, 0, 0, 0xFF000000, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0, 0, 0
|
||||
|
||||
struct hand hand_data_dummy = {
|
||||
0, // ITEM_IDS weaponnum;
|
||||
0xFFFFFFFF, // ITEM_IDS weaponnum_watchmenu;
|
||||
0, // ITEM_IDS previous_weapon;
|
||||
|
||||
0, // s8 weapon_firing_status;
|
||||
|
||||
0, // s8 field_87D;
|
||||
0x1, // s8 field_87E;
|
||||
0, // s8 field_87F;
|
||||
|
||||
0, // s32 weapon_hold_time;
|
||||
0, // s32 field_884;
|
||||
0, // s32 field_888;
|
||||
0, // s32 field_88C;
|
||||
0, // s32 field_890;
|
||||
0, // s32 when_detonating_mines_is_0;
|
||||
0, // s32 weapon_current_animation;
|
||||
0, // s32 weapon_ammo_in_magazine;
|
||||
0, // s32 field_8A0;
|
||||
0, // s32 field_8A4;
|
||||
0, // s32 field_8A8;
|
||||
0, // s32 weapon_next_weapon;
|
||||
0, // s32 field_8B0;
|
||||
0, // s32 weapon_animation_trigger;
|
||||
0, // s32 field_8B8;
|
||||
0, // s32 field_8BC;
|
||||
0, // s32 field_8C0;
|
||||
0, // s32 field_8C4;
|
||||
0, // s32 field_8C8;
|
||||
0, // s32 field_8CC;
|
||||
0, // s32 field_8D0;
|
||||
0, // s32 field_8D4;
|
||||
0, // s32 field_8D8;
|
||||
0, // s32 field_8DC;
|
||||
0, // s32 field_8E0;
|
||||
0, // s32 field_8E4;
|
||||
0, // s32 field_8E8;
|
||||
|
||||
// Mtxf field_8EC;
|
||||
1.0f,0,0,0,
|
||||
0,1.0f,0,0,
|
||||
0,0,1.0f,0,
|
||||
0,0,0,1.0f,
|
||||
|
||||
0, // s32 field_92C;
|
||||
0, // s32 field_930;
|
||||
0, // s32 field_934;
|
||||
0, // s32 field_938;
|
||||
0, // s32 field_93C;
|
||||
0, // s32 field_940;
|
||||
-1.0f, // s32 field_944;
|
||||
0, // s32 field_948;
|
||||
1.0f, // s32 field_94C;
|
||||
0, // s32 field_950;
|
||||
0, // s32 field_954;
|
||||
0, // s32 field_958;
|
||||
0, // s32 field_95C;
|
||||
0, // s32 field_960;
|
||||
0, // s32 field_964;
|
||||
-VALUENAME, // f32 field_968;
|
||||
0, // s32 field_96C;
|
||||
VALUENAME, // f32 field_970;
|
||||
0, // s32 field_974;
|
||||
|
||||
// coord3d blendpos[4];
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
0,0,0,
|
||||
|
||||
// coord3d blendlook[4];
|
||||
0,0,-1.0f,
|
||||
0,0,-1.0f,
|
||||
0,0,-1.0f,
|
||||
0,0,-1.0f,
|
||||
|
||||
// coord3d blendup[4];
|
||||
0,1.0f,0,
|
||||
0,1.0f,0,
|
||||
0,1.0f,0,
|
||||
0,1.0f,0,
|
||||
|
||||
0, // s32 curblendpos;
|
||||
0, // f32 dampt;
|
||||
1.0f, // f32 blendscale;
|
||||
1.0f, // f32 blendscale1;
|
||||
0, // s32 sideflag;
|
||||
0, // f32 weapon_theta_displacement;
|
||||
0, // f32 weapon_verta_displacement;
|
||||
0, // s32 field_A24;
|
||||
0, // s32 field_A28;
|
||||
0, // s32 field_A2C;
|
||||
0, // f32 field_A30;
|
||||
0, // f32 field_A34;
|
||||
0, // f32 field_A38;
|
||||
0, // f32 field_A3C;
|
||||
1000.0f, // f32 field_A40;
|
||||
NULL, // ALSoundState * audioHandle;
|
||||
0, // s32 field_A48;
|
||||
0, // s32 field_A4C;
|
||||
0, // s32 field_A50;
|
||||
|
||||
// // struct ChrRecord_f180 {
|
||||
{
|
||||
0xff, // s8 unk00;
|
||||
0, // s8 item_id; // type ITEM_IDS
|
||||
0, // char unk02;
|
||||
0, // char unk03;
|
||||
|
||||
// coord3d pos;
|
||||
0,0,0,
|
||||
|
||||
// /**
|
||||
// * Offset 0x10
|
||||
// */
|
||||
// struct coord3d delta;
|
||||
0,0,0,
|
||||
|
||||
0, // f32 unk1c;
|
||||
|
||||
0, // f32 unk20;
|
||||
0, // f32 unk24;
|
||||
0 // f32 unk28;
|
||||
},
|
||||
// // }
|
||||
|
||||
0, // f32 noise;
|
||||
0, // f32 field_A84;
|
||||
0, // f32 field_A88;
|
||||
0, // s32 field_A8C;
|
||||
NULL, // ObjectRecord* rocket;
|
||||
0, // s32 firedrocket;
|
||||
0, // s32 field_A98;
|
||||
0, // s32 field_A9C;
|
||||
0, // s32 field_AA0;
|
||||
0, // s32 field_AA4;
|
||||
0, // s32 field_AA8;
|
||||
0, // s32 field_AAC;
|
||||
0, // s32 field_AB0;
|
||||
0, // s32 field_AB4;
|
||||
0, // s32 field_AB8;
|
||||
0, // s32 field_ABC;
|
||||
0, // s32 field_AC0;
|
||||
0, // s32 field_AC4;
|
||||
0, // s32 field_AC8;
|
||||
0, // s32 field_ACC;
|
||||
0, // s32 field_AD0;
|
||||
0, // s32 field_AD4;
|
||||
|
||||
// // offset 0xad8
|
||||
// Mtxf throw_item_pos_related;
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
0,0,0,0,
|
||||
|
||||
0, // s32 field_B18;
|
||||
0, // s32 field_B1C;
|
||||
0, // s32 field_B20;
|
||||
0, // s32 field_B24;
|
||||
0, // s32 field_B28;
|
||||
0, // s32 field_B2C;
|
||||
0, // s32 field_B30;
|
||||
0, // s32 field_B34;
|
||||
0, // s32 field_B38;
|
||||
0, // s32 field_B3C;
|
||||
0, // s32 field_B40;
|
||||
0, // s32 field_B44;
|
||||
0, // s32 field_B48;
|
||||
0, // s32 field_B4C;
|
||||
0, // s32 field_B50;
|
||||
0, // s32 field_B54;
|
||||
|
||||
// coord3d field_B58;
|
||||
0,0,0,
|
||||
|
||||
0, // f32 field_B64;
|
||||
0, // s32 field_B68;
|
||||
0, // s32 field_B6C;
|
||||
0, // s32 field_B70;
|
||||
0, // s32 field_B74;
|
||||
0, // s32 field_B78;
|
||||
0, // s32 field_B7C;
|
||||
0, // s32 field_B80;
|
||||
0, // s32 field_B84;
|
||||
0, // s32 field_B88;
|
||||
0, // s32 field_B8C;
|
||||
0, // s32 field_B90;
|
||||
0, // s32 field_B94;
|
||||
0, // s32 field_B98;
|
||||
0, // s32 field_B9C;
|
||||
0, // s32 field_BA0;
|
||||
0, // s32 field_BA4;
|
||||
0, // s32 field_BA8;
|
||||
0, // s32 field_BAC;
|
||||
0, // s32 field_BB0;
|
||||
0, // s32 field_BB4;
|
||||
0, // s32 field_BB8;
|
||||
0, // s32 field_BBC;
|
||||
0, // s32 field_BC0;
|
||||
0, // s32 field_BC4;
|
||||
0, // s32 field_BC8;
|
||||
0, // s32 field_BCC;
|
||||
0, // s32 field_BD0;
|
||||
0, // s32 field_BD4;
|
||||
0, // s32 field_BD8;
|
||||
0, // s32 field_BDC;
|
||||
0, // s32 field_BE0;
|
||||
0, // s32 field_BE4;
|
||||
0, // s32 field_BE8;
|
||||
0, // s32 field_BEC;
|
||||
0, // s32 field_BF0;
|
||||
0, // s32 field_BF4;
|
||||
0, // s32 field_BF8;
|
||||
0, // s32 field_BFC;
|
||||
0, // s32 field_C00;
|
||||
0, // s32 field_C04;
|
||||
0, // s32 volley; // Number of bullets discharged in a row. For pistols, it's always 1 even if the fire button is held.
|
||||
// coord3d item_related;
|
||||
0,0,0
|
||||
};
|
||||
|
||||
|
||||
void init_player_BONDdata_stats(void)
|
||||
{
|
||||
s32 i;
|
||||
struct hand sp24;
|
||||
|
||||
sp24 = hand_data_dummy;
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void init_player_BONDdata_stats(void) {
|
||||
s32 sp24;
|
||||
s32 temp_v0;
|
||||
s32 temp_v0_2;
|
||||
s32* temp_t0;
|
||||
s32* temp_t4;
|
||||
s32* temp_t6;
|
||||
s32* temp_t7;
|
||||
void* temp_t1;
|
||||
void* temp_t5;
|
||||
s32* phi_t7;
|
||||
s32* phi_t6;
|
||||
s32* phi_t4;
|
||||
void* phi_t1;
|
||||
s32* phi_t0;
|
||||
void* phi_t5;
|
||||
s32 phi_v0;
|
||||
|
||||
phi_t7 = &BONDdata_item_control_blocks_initdata;
|
||||
phi_t6 = &sp24;
|
||||
do {
|
||||
temp_t7 = phi_t7 + 0xC;
|
||||
temp_t6 = phi_t6 + 0xC;
|
||||
temp_t6->unk-C = (s32) *phi_t7;
|
||||
temp_t6->unk-8 = (s32) temp_t7->unk-8;
|
||||
temp_t6->unk-4 = (s32) temp_t7->unk-4;
|
||||
phi_t7 = temp_t7;
|
||||
phi_t6 = temp_t6;
|
||||
} while (temp_t7 != (&BONDdata_item_control_blocks_initdata + 0x3A8));
|
||||
g_CurrentPlayer->hand_item[0] = mempAllocBytesInBank(size_item_buffer, 4);
|
||||
if (getPlayerCount() == 1) {
|
||||
g_CurrentPlayer->hand_item[1] = mempAllocBytesInBank(*(&size_item_buffer + 4), 4);
|
||||
g_CurrentPlayer->ptr_hand_weapon_buffer[GUNRIGHT] = mempAllocBytesInBank(size_item_buffer[0], MEMPOOL_STAGE);
|
||||
|
||||
if (getPlayerCount() == 1)
|
||||
{
|
||||
g_CurrentPlayer->ptr_hand_weapon_buffer[GUNLEFT] = mempAllocBytesInBank(size_item_buffer[1], MEMPOOL_STAGE);
|
||||
}
|
||||
g_CurrentPlayer->hand_invisible[0] = 0;
|
||||
g_CurrentPlayer->hand_invisible[1] = 0;
|
||||
g_CurrentPlayer->hand_item[0] = 0;
|
||||
g_CurrentPlayer->hand_item[1] = 0;
|
||||
g_CurrentPlayer->field_2A44[0] = -1;
|
||||
g_CurrentPlayer->field_2A44[1] = -1;
|
||||
g_CurrentPlayer->lock_hand_model[0] = 0;
|
||||
g_CurrentPlayer->lock_hand_model[1] = 0;
|
||||
phi_t4 = &sp24;
|
||||
phi_t1 = g_CurrentPlayer;
|
||||
phi_t0 = &sp24;
|
||||
phi_v0 = 0;
|
||||
do {
|
||||
temp_t4 = phi_t4 + 0xC;
|
||||
temp_t1 = phi_t1 + 0xC;
|
||||
temp_t1->right_item_related1 = (s32) *phi_t4;
|
||||
temp_t1->right_item_related2 = (s32) temp_t4->unk-8;
|
||||
temp_t1->right_item_related3 = (s32) temp_t4->unk-4;
|
||||
phi_t4 = temp_t4;
|
||||
phi_t1 = temp_t1;
|
||||
} while (temp_t4 != (&sp24 + 0x3A8));
|
||||
phi_t5 = g_CurrentPlayer;
|
||||
do {
|
||||
temp_t0 = phi_t0 + 0xC;
|
||||
temp_t5 = phi_t5 + 0xC;
|
||||
temp_t5->item_related1 = (s32) *phi_t0;
|
||||
temp_t5->item_related2 = (s32) temp_t0->unk-8;
|
||||
temp_t5->item_related3 = (s32) temp_t0->unk-4;
|
||||
phi_t0 = temp_t0;
|
||||
phi_t5 = temp_t5;
|
||||
} while (temp_t0 != (&sp24 + 0x3A8));
|
||||
do {
|
||||
temp_v0 = phi_v0 + 4;
|
||||
(g_CurrentPlayer + phi_v0)->unk1130 = 0;
|
||||
phi_v0 = temp_v0;
|
||||
} while (temp_v0 < 0x78);
|
||||
temp_v0_2 = 3 * 4;
|
||||
g_playerPerm->pos[0] = 0;
|
||||
g_playerPerm->pos[1] = 0;
|
||||
g_playerPerm->pos[2] = 0;
|
||||
*(g_playerPerm + temp_v0_2) = 0;
|
||||
(g_playerPerm + temp_v0_2)->unk4 = 0;
|
||||
(g_playerPerm + temp_v0_2)->unk8 = 0;
|
||||
(g_playerPerm + temp_v0_2)->unkC = 0;
|
||||
g_playerPerm->field_6C = 0;
|
||||
g_playerPerm->unk1C = 0;
|
||||
g_playerPerm->unk20 = 0;
|
||||
|
||||
g_CurrentPlayer->hand_invisible[GUNRIGHT] = 0;
|
||||
g_CurrentPlayer->hand_invisible[GUNLEFT] = 0;
|
||||
g_CurrentPlayer->hand_item[GUNRIGHT] = ITEM_UNARMED;
|
||||
g_CurrentPlayer->hand_item[GUNLEFT] = ITEM_UNARMED;
|
||||
g_CurrentPlayer->field_2A44[GUNRIGHT] = -1;
|
||||
g_CurrentPlayer->field_2A44[GUNLEFT] = -1;
|
||||
g_CurrentPlayer->lock_hand_model[GUNRIGHT] = 0;
|
||||
g_CurrentPlayer->lock_hand_model[GUNLEFT] = 0;
|
||||
|
||||
g_CurrentPlayer->hands[0] = sp24;
|
||||
g_CurrentPlayer->hands[1] = sp24;
|
||||
|
||||
for (i=0; i<30; i++)
|
||||
{
|
||||
g_CurrentPlayer->ammoheldarr[i] = 0;
|
||||
}
|
||||
|
||||
for (i=0; i<7; i++)
|
||||
{
|
||||
g_playerPerm->shot_count[i] = 0;
|
||||
}
|
||||
|
||||
g_playerPerm->killed_civilians = 0;
|
||||
g_playerPerm->kill_count = 0;
|
||||
g_playerPerm->killed_gg_owner_count = 0;
|
||||
g_CurrentPlayer->deathcount = 0;
|
||||
g_CurrentPlayer->num_suicides = 0;
|
||||
g_CurrentPlayer->gunposamplitude = 1;
|
||||
g_CurrentPlayer->gunxamplitude = 1;
|
||||
g_CurrentPlayer->gunposamplitude = 1.0f;
|
||||
g_CurrentPlayer->gunxamplitude = 1.0f;
|
||||
g_CurrentPlayer->field_FC8 = 0;
|
||||
g_CurrentPlayer->field_FCC = 0;
|
||||
g_CurrentPlayer->field_FD0 = 0;
|
||||
@@ -122,21 +290,21 @@ void init_player_BONDdata_stats(void) {
|
||||
g_CurrentPlayer->tileColor.rgba[1] = 0xFF;
|
||||
g_CurrentPlayer->tileColor.rgba[2] = 0xFF;
|
||||
g_CurrentPlayer->tileColor.rgba[3] = 0;
|
||||
g_CurrentPlayer->resetshadecol = 1;
|
||||
g_CurrentPlayer->resetshadecol = TRUE;
|
||||
g_CurrentPlayer->aimtype = 0;
|
||||
g_CurrentPlayer->crosshair_angle[] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_angle[] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_angle.f[0] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_angle.f[1] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_x_pos = 0.0f;
|
||||
g_CurrentPlayer->crosshair_y_pos = 0.0f;
|
||||
g_CurrentPlayer->guncrossdamp = 0.9f;
|
||||
g_CurrentPlayer->field_FFC.x = 0.0f;
|
||||
g_CurrentPlayer->field_FFC.y = 0.0f;
|
||||
g_CurrentPlayer->field_FFC.f[0] = 0.0f;
|
||||
g_CurrentPlayer->field_FFC.f[1] = 0.0f;
|
||||
g_CurrentPlayer->gun_azimuth_angle = 0.0f;
|
||||
g_CurrentPlayer->gun_azimuth_turning = 0.0f;
|
||||
g_CurrentPlayer->gunaimdamp = 0.9f;
|
||||
g_CurrentPlayer->field_1010 = 0.0f;
|
||||
g_CurrentPlayer->holds_neg_pi = -M_PI_F;
|
||||
g_CurrentPlayer->unk1018 = 0.0f;
|
||||
g_CurrentPlayer->field_1010.f[0] = 0.0f;
|
||||
g_CurrentPlayer->field_1010.f[1] = -3.1415927f;
|
||||
g_CurrentPlayer->field_1010.f[2] = 0.0f;
|
||||
g_CurrentPlayer->copiedgoldeneye = FALSE;
|
||||
g_CurrentPlayer->magnetattracttime = -1;
|
||||
g_CurrentPlayer->gunsync = 0.0f;
|
||||
@@ -151,488 +319,8 @@ void init_player_BONDdata_stats(void) {
|
||||
bgunCalculateBlend(GUNLEFT);
|
||||
bgunCalculateBlend(GUNLEFT);
|
||||
bgunCalculateBlend(GUNLEFT);
|
||||
g_CurrentPlayer->gunammooff = 0;
|
||||
g_CurrentPlayer->gunsightmode = 2; //GUNSIGHTREASON_AIMING
|
||||
g_CurrentPlayer->gunammooff = FALSE;
|
||||
g_CurrentPlayer->gunsightmode = 2;
|
||||
g_CurrentPlayer->sniper_zoom = sniperrifle_stats.Zoom;
|
||||
g_CurrentPlayer->camera_zoom = camera_stats.Zoom;
|
||||
}
|
||||
#else
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel D_8004F0E0
|
||||
.word 0x3f666666
|
||||
glabel fl_neg_pi
|
||||
.word 0xc0490fdb
|
||||
.text
|
||||
glabel init_player_BONDdata_stats
|
||||
/* 039C00 7F0050D0 27BDFC30 */ addiu $sp, $sp, -0x3d0
|
||||
/* 039C04 7F0050D4 3C0F8003 */ lui $t7, %hi(hand_data_dummy)
|
||||
/* 039C08 7F0050D8 25EFA3D0 */ addiu $t7, %lo(hand_data_dummy) # addiu $t7, $t7, -0x5c30
|
||||
/* 039C0C 7F0050DC AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 039C10 7F0050E0 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 039C14 7F0050E4 25E803A8 */ addiu $t0, $t7, 0x3a8
|
||||
/* 039C18 7F0050E8 27AE0024 */ addiu $t6, $sp, 0x24
|
||||
.L7F0050EC:
|
||||
/* 039C1C 7F0050EC 8DE10000 */ lw $at, ($t7)
|
||||
/* 039C20 7F0050F0 25EF000C */ addiu $t7, $t7, 0xc
|
||||
/* 039C24 7F0050F4 25CE000C */ addiu $t6, $t6, 0xc
|
||||
/* 039C28 7F0050F8 ADC1FFF4 */ sw $at, -0xc($t6)
|
||||
/* 039C2C 7F0050FC 8DE1FFF8 */ lw $at, -8($t7)
|
||||
/* 039C30 7F005100 ADC1FFF8 */ sw $at, -8($t6)
|
||||
/* 039C34 7F005104 8DE1FFFC */ lw $at, -4($t7)
|
||||
/* 039C38 7F005108 15E8FFF8 */ bne $t7, $t0, .L7F0050EC
|
||||
/* 039C3C 7F00510C ADC1FFFC */ sw $at, -4($t6)
|
||||
/* 039C40 7F005110 3C048003 */ lui $a0, %hi(size_item_buffer)
|
||||
/* 039C44 7F005114 8C84245C */ lw $a0, %lo(size_item_buffer)($a0)
|
||||
/* 039C48 7F005118 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 039C4C 7F00511C 24050004 */ li $a1, 4
|
||||
/* 039C50 7F005120 3C108008 */ lui $s0, %hi(g_CurrentPlayer)
|
||||
/* 039C54 7F005124 2610A0B0 */ addiu $s0, %lo(g_CurrentPlayer) # addiu $s0, $s0, -0x5f50
|
||||
/* 039C58 7F005128 8E090000 */ lw $t1, ($s0)
|
||||
/* 039C5C 7F00512C 0FC26919 */ jal getPlayerCount
|
||||
/* 039C60 7F005130 AD220808 */ sw $v0, 0x808($t1)
|
||||
/* 039C64 7F005134 24010001 */ li $at, 1
|
||||
/* 039C68 7F005138 14410006 */ bne $v0, $at, .L7F005154
|
||||
/* 039C6C 7F00513C 3C048003 */ lui $a0, %hi(size_item_buffer+0x4)
|
||||
/* 039C70 7F005140 8C842460 */ lw $a0, %lo(size_item_buffer+0x4)($a0)
|
||||
/* 039C74 7F005144 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 039C78 7F005148 24050004 */ li $a1, 4
|
||||
/* 039C7C 7F00514C 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 039C80 7F005150 AD42080C */ sw $v0, 0x80c($t2)
|
||||
.L7F005154:
|
||||
/* 039C84 7F005154 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 039C88 7F005158 2405FFFF */ li $a1, -1
|
||||
/* 039C8C 7F00515C 27A30024 */ addiu $v1, $sp, 0x24
|
||||
/* 039C90 7F005160 AD6007F8 */ sw $zero, 0x7f8($t3)
|
||||
/* 039C94 7F005164 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 039C98 7F005168 246B03A8 */ addiu $t3, $v1, 0x3a8
|
||||
/* 039C9C 7F00516C 00001025 */ move $v0, $zero
|
||||
/* 039CA0 7F005170 AD8007FC */ sw $zero, 0x7fc($t4)
|
||||
/* 039CA4 7F005174 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 039CA8 7F005178 00606025 */ move $t4, $v1
|
||||
/* 039CAC 7F00517C ADA00800 */ sw $zero, 0x800($t5)
|
||||
/* 039CB0 7F005180 8E190000 */ lw $t9, ($s0)
|
||||
/* 039CB4 7F005184 AF200804 */ sw $zero, 0x804($t9)
|
||||
/* 039CB8 7F005188 8E180000 */ lw $t8, ($s0)
|
||||
/* 039CBC 7F00518C AF052A44 */ sw $a1, 0x2a44($t8)
|
||||
/* 039CC0 7F005190 8E080000 */ lw $t0, ($s0)
|
||||
/* 039CC4 7F005194 247803A8 */ addiu $t8, $v1, 0x3a8
|
||||
/* 039CC8 7F005198 AD052A48 */ sw $a1, 0x2a48($t0)
|
||||
/* 039CCC 7F00519C 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039CD0 7F0051A0 00604025 */ move $t0, $v1
|
||||
/* 039CD4 7F0051A4 3C038008 */ lui $v1, %hi(g_playerPerm)
|
||||
/* 039CD8 7F0051A8 ADE02A50 */ sw $zero, 0x2a50($t7)
|
||||
/* 039CDC 7F0051AC 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 039CE0 7F0051B0 2463A0B4 */ addiu $v1, %lo(g_playerPerm) # addiu $v1, $v1, -0x5f4c
|
||||
/* 039CE4 7F0051B4 ADC02A54 */ sw $zero, 0x2a54($t6)
|
||||
/* 039CE8 7F0051B8 8E090000 */ lw $t1, ($s0)
|
||||
.L7F0051BC:
|
||||
/* 039CEC 7F0051BC 8D810000 */ lw $at, ($t4)
|
||||
/* 039CF0 7F0051C0 258C000C */ addiu $t4, $t4, 0xc
|
||||
/* 039CF4 7F0051C4 2529000C */ addiu $t1, $t1, 0xc
|
||||
/* 039CF8 7F0051C8 AD210864 */ sw $at, 0x864($t1)
|
||||
/* 039CFC 7F0051CC 8D81FFF8 */ lw $at, -8($t4)
|
||||
/* 039D00 7F0051D0 AD210868 */ sw $at, 0x868($t1)
|
||||
/* 039D04 7F0051D4 8D81FFFC */ lw $at, -4($t4)
|
||||
/* 039D08 7F0051D8 158BFFF8 */ bne $t4, $t3, .L7F0051BC
|
||||
/* 039D0C 7F0051DC AD21086C */ sw $at, 0x86c($t1)
|
||||
/* 039D10 7F0051E0 8E0D0000 */ lw $t5, ($s0)
|
||||
.L7F0051E4:
|
||||
/* 039D14 7F0051E4 8D010000 */ lw $at, ($t0)
|
||||
/* 039D18 7F0051E8 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 039D1C 7F0051EC 25AD000C */ addiu $t5, $t5, 0xc
|
||||
/* 039D20 7F0051F0 ADA10C0C */ sw $at, 0xc0c($t5)
|
||||
/* 039D24 7F0051F4 8D01FFF8 */ lw $at, -8($t0)
|
||||
/* 039D28 7F0051F8 ADA10C10 */ sw $at, 0xc10($t5)
|
||||
/* 039D2C 7F0051FC 8D01FFFC */ lw $at, -4($t0)
|
||||
/* 039D30 7F005200 1518FFF8 */ bne $t0, $t8, .L7F0051E4
|
||||
/* 039D34 7F005204 ADA10C14 */ sw $at, 0xc14($t5)
|
||||
.L7F005208:
|
||||
/* 039D38 7F005208 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039D3C 7F00520C 01E27021 */ addu $t6, $t7, $v0
|
||||
/* 039D40 7F005210 24420004 */ addiu $v0, $v0, 4
|
||||
/* 039D44 7F005214 28410078 */ slti $at, $v0, 0x78
|
||||
/* 039D48 7F005218 1420FFFB */ bnez $at, .L7F005208
|
||||
/* 039D4C 7F00521C ADC01130 */ sw $zero, 0x1130($t6)
|
||||
/* 039D50 7F005220 8C6A0000 */ lw $t2, ($v1)
|
||||
/* 039D54 7F005224 24040003 */ li $a0, 3
|
||||
/* 039D58 7F005228 00041080 */ sll $v0, $a0, 2
|
||||
/* 039D5C 7F00522C AD400000 */ sw $zero, ($t2)
|
||||
/* 039D60 7F005230 8C6B0000 */ lw $t3, ($v1)
|
||||
/* 039D64 7F005234 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 039D68 7F005238 44811000 */ mtc1 $at, $f2
|
||||
/* 039D6C 7F00523C AD600004 */ sw $zero, 4($t3)
|
||||
/* 039D70 7F005240 8C6C0000 */ lw $t4, ($v1)
|
||||
/* 039D74 7F005244 3C018005 */ lui $at, %hi(D_8004F0E0)
|
||||
/* 039D78 7F005248 44800000 */ mtc1 $zero, $f0
|
||||
/* 039D7C 7F00524C AD800008 */ sw $zero, 8($t4)
|
||||
/* 039D80 7F005250 8C690000 */ lw $t1, ($v1)
|
||||
/* 039D84 7F005254 00002025 */ move $a0, $zero
|
||||
/* 039D88 7F005258 0122C821 */ addu $t9, $t1, $v0
|
||||
/* 039D8C 7F00525C AF200000 */ sw $zero, ($t9)
|
||||
/* 039D90 7F005260 8C780000 */ lw $t8, ($v1)
|
||||
/* 039D94 7F005264 03024021 */ addu $t0, $t8, $v0
|
||||
/* 039D98 7F005268 AD000004 */ sw $zero, 4($t0)
|
||||
/* 039D9C 7F00526C 8C6D0000 */ lw $t5, ($v1)
|
||||
/* 039DA0 7F005270 01A27821 */ addu $t7, $t5, $v0
|
||||
/* 039DA4 7F005274 ADE00008 */ sw $zero, 8($t7)
|
||||
/* 039DA8 7F005278 8C6E0000 */ lw $t6, ($v1)
|
||||
/* 039DAC 7F00527C 01C25021 */ addu $t2, $t6, $v0
|
||||
/* 039DB0 7F005280 AD40000C */ sw $zero, 0xc($t2)
|
||||
/* 039DB4 7F005284 8C6B0000 */ lw $t3, ($v1)
|
||||
/* 039DB8 7F005288 C42CF0E0 */ lwc1 $f12, %lo(D_8004F0E0)($at)
|
||||
/* 039DBC 7F00528C 240200FF */ li $v0, 255
|
||||
/* 039DC0 7F005290 AD60006C */ sw $zero, 0x6c($t3)
|
||||
/* 039DC4 7F005294 8C6C0000 */ lw $t4, ($v1)
|
||||
/* 039DC8 7F005298 3C018005 */ lui $at, %hi(fl_neg_pi)
|
||||
/* 039DCC 7F00529C AD80001C */ sw $zero, 0x1c($t4)
|
||||
/* 039DD0 7F0052A0 8C690000 */ lw $t1, ($v1)
|
||||
/* 039DD4 7F0052A4 AD200020 */ sw $zero, 0x20($t1)
|
||||
/* 039DD8 7F0052A8 8E190000 */ lw $t9, ($s0)
|
||||
/* 039DDC 7F0052AC AF2029D8 */ sw $zero, 0x29d8($t9)
|
||||
/* 039DE0 7F0052B0 8E180000 */ lw $t8, ($s0)
|
||||
/* 039DE4 7F0052B4 AF0029DC */ sw $zero, 0x29dc($t8)
|
||||
/* 039DE8 7F0052B8 8E080000 */ lw $t0, ($s0)
|
||||
/* 039DEC 7F0052BC E5020FC0 */ swc1 $f2, 0xfc0($t0)
|
||||
/* 039DF0 7F0052C0 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 039DF4 7F0052C4 E5A20FC4 */ swc1 $f2, 0xfc4($t5)
|
||||
/* 039DF8 7F0052C8 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039DFC 7F0052CC 240D0001 */ li $t5, 1
|
||||
/* 039E00 7F0052D0 ADE00FC8 */ sw $zero, 0xfc8($t7)
|
||||
/* 039E04 7F0052D4 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 039E08 7F0052D8 ADC00FCC */ sw $zero, 0xfcc($t6)
|
||||
/* 039E0C 7F0052DC 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 039E10 7F0052E0 AD400FD0 */ sw $zero, 0xfd0($t2)
|
||||
/* 039E14 7F0052E4 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 039E18 7F0052E8 AD600FD4 */ sw $zero, 0xfd4($t3)
|
||||
/* 039E1C 7F0052EC 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 039E20 7F0052F0 AD800FD8 */ sw $zero, 0xfd8($t4)
|
||||
/* 039E24 7F0052F4 8E090000 */ lw $t1, ($s0)
|
||||
/* 039E28 7F0052F8 A1220FDC */ sb $v0, 0xfdc($t1)
|
||||
/* 039E2C 7F0052FC 8E190000 */ lw $t9, ($s0)
|
||||
/* 039E30 7F005300 A3220FDD */ sb $v0, 0xfdd($t9)
|
||||
/* 039E34 7F005304 8E180000 */ lw $t8, ($s0)
|
||||
/* 039E38 7F005308 A3020FDE */ sb $v0, 0xfde($t8)
|
||||
/* 039E3C 7F00530C 8E080000 */ lw $t0, ($s0)
|
||||
/* 039E40 7F005310 A1000FDF */ sb $zero, 0xfdf($t0)
|
||||
/* 039E44 7F005314 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039E48 7F005318 ADED0FE0 */ sw $t5, 0xfe0($t7)
|
||||
/* 039E4C 7F00531C 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 039E50 7F005320 ADC00FE4 */ sw $zero, 0xfe4($t6)
|
||||
/* 039E54 7F005324 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 039E58 7F005328 E5400FE8 */ swc1 $f0, 0xfe8($t2)
|
||||
/* 039E5C 7F00532C 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 039E60 7F005330 E5600FEC */ swc1 $f0, 0xfec($t3)
|
||||
/* 039E64 7F005334 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 039E68 7F005338 E5800FF0 */ swc1 $f0, 0xff0($t4)
|
||||
/* 039E6C 7F00533C 8E090000 */ lw $t1, ($s0)
|
||||
/* 039E70 7F005340 E5200FF4 */ swc1 $f0, 0xff4($t1)
|
||||
/* 039E74 7F005344 8E190000 */ lw $t9, ($s0)
|
||||
/* 039E78 7F005348 E72C0FF8 */ swc1 $f12, 0xff8($t9)
|
||||
/* 039E7C 7F00534C 8E180000 */ lw $t8, ($s0)
|
||||
/* 039E80 7F005350 E7000FFC */ swc1 $f0, 0xffc($t8)
|
||||
/* 039E84 7F005354 8E080000 */ lw $t0, ($s0)
|
||||
/* 039E88 7F005358 E5001000 */ swc1 $f0, 0x1000($t0)
|
||||
/* 039E8C 7F00535C 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 039E90 7F005360 E5A01004 */ swc1 $f0, 0x1004($t5)
|
||||
/* 039E94 7F005364 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039E98 7F005368 E5E01008 */ swc1 $f0, 0x1008($t7)
|
||||
/* 039E9C 7F00536C 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 039EA0 7F005370 E5CC100C */ swc1 $f12, 0x100c($t6)
|
||||
/* 039EA4 7F005374 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 039EA8 7F005378 E5401010 */ swc1 $f0, 0x1010($t2)
|
||||
/* 039EAC 7F00537C 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 039EB0 7F005380 C424F0E4 */ lwc1 $f4, %lo(fl_neg_pi)($at)
|
||||
/* 039EB4 7F005384 E5641014 */ swc1 $f4, 0x1014($t3)
|
||||
/* 039EB8 7F005388 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 039EBC 7F00538C E5801018 */ swc1 $f0, 0x1018($t4)
|
||||
/* 039EC0 7F005390 8E090000 */ lw $t1, ($s0)
|
||||
/* 039EC4 7F005394 AD201060 */ sw $zero, 0x1060($t1)
|
||||
/* 039EC8 7F005398 8E190000 */ lw $t9, ($s0)
|
||||
/* 039ECC 7F00539C AF251270 */ sw $a1, 0x1270($t9)
|
||||
/* 039ED0 7F0053A0 8E180000 */ lw $t8, ($s0)
|
||||
/* 039ED4 7F0053A4 E700106C */ swc1 $f0, 0x106c($t8)
|
||||
/* 039ED8 7F0053A8 8E080000 */ lw $t0, ($s0)
|
||||
/* 039EDC 7F0053AC E5001070 */ swc1 $f0, 0x1070($t0)
|
||||
/* 039EE0 7F0053B0 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 039EE4 7F0053B4 E5A01074 */ swc1 $f0, 0x1074($t5)
|
||||
/* 039EE8 7F0053B8 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 039EEC 7F0053BC ADE01078 */ sw $zero, 0x1078($t7)
|
||||
/* 039EF0 7F0053C0 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 039EF4 7F0053C4 E5C0107C */ swc1 $f0, 0x107c($t6)
|
||||
/* 039EF8 7F0053C8 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 039EFC 7F0053CC 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F00 7F0053D0 E5401080 */ swc1 $f0, 0x1080($t2)
|
||||
/* 039F04 7F0053D4 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F08 7F0053D8 00002025 */ move $a0, $zero
|
||||
/* 039F0C 7F0053DC 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F10 7F0053E0 00002025 */ move $a0, $zero
|
||||
/* 039F14 7F0053E4 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F18 7F0053E8 24040001 */ li $a0, 1
|
||||
/* 039F1C 7F0053EC 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F20 7F0053F0 24040001 */ li $a0, 1
|
||||
/* 039F24 7F0053F4 0FC17260 */ jal bgunCalculateBlend
|
||||
/* 039F28 7F0053F8 24040001 */ li $a0, 1
|
||||
/* 039F2C 7F0053FC 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 039F30 7F005400 240C0002 */ li $t4, 2
|
||||
/* 039F34 7F005404 3C018003 */ lui $at, %hi(sniperrifle_stats+52)
|
||||
/* 039F38 7F005408 AD601064 */ sw $zero, 0x1064($t3)
|
||||
/* 039F3C 7F00540C 8E090000 */ lw $t1, ($s0)
|
||||
/* 039F40 7F005410 AD2C1128 */ sw $t4, 0x1128($t1)
|
||||
/* 039F44 7F005414 8E190000 */ lw $t9, ($s0)
|
||||
/* 039F48 7F005418 C4262C38 */ lwc1 $f6, %lo(sniperrifle_stats+52)($at)
|
||||
/* 039F4C 7F00541C 3C018003 */ lui $at, %hi(camera_stats+52)
|
||||
/* 039F50 7F005420 E7261084 */ swc1 $f6, 0x1084($t9)
|
||||
/* 039F54 7F005424 8E180000 */ lw $t8, ($s0)
|
||||
/* 039F58 7F005428 C42836B8 */ lwc1 $f8, %lo(camera_stats+52)($at)
|
||||
/* 039F5C 7F00542C E7081088 */ swc1 $f8, 0x1088($t8)
|
||||
/* 039F60 7F005430 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 039F64 7F005434 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 039F68 7F005438 27BD03D0 */ addiu $sp, $sp, 0x3d0
|
||||
/* 039F6C 7F00543C 03E00008 */ jr $ra
|
||||
/* 039F70 7F005440 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
#if !defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel D_8004F0E0
|
||||
.word 0x3f666666
|
||||
glabel fl_neg_pi
|
||||
.word 0xc0490fdb
|
||||
|
||||
.text
|
||||
glabel init_player_BONDdata_stats
|
||||
/* 037A60 7F005070 27BDFC30 */ addiu $sp, $sp, -0x3d0
|
||||
/* 037A64 7F005074 3C0F8002 */ lui $t7, %hi(hand_data_dummy) # $t7, 0x8002
|
||||
/* 037A68 7F005078 25EF5920 */ addiu $t7, %lo(hand_data_dummy) # addiu $t7, $t7, 0x5920
|
||||
/* 037A6C 7F00507C AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 037A70 7F005080 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 037A74 7F005084 25E803A8 */ addiu $t0, $t7, 0x3a8
|
||||
/* 037A78 7F005088 27AE0024 */ addiu $t6, $sp, 0x24
|
||||
.L7F00508C:
|
||||
/* 037A7C 7F00508C 8DE10000 */ lw $at, ($t7)
|
||||
/* 037A80 7F005090 25EF000C */ addiu $t7, $t7, 0xc
|
||||
/* 037A84 7F005094 25CE000C */ addiu $t6, $t6, 0xc
|
||||
/* 037A88 7F005098 ADC1FFF4 */ sw $at, -0xc($t6)
|
||||
/* 037A8C 7F00509C 8DE1FFF8 */ lw $at, -8($t7)
|
||||
/* 037A90 7F0050A0 ADC1FFF8 */ sw $at, -8($t6)
|
||||
/* 037A94 7F0050A4 8DE1FFFC */ lw $at, -4($t7)
|
||||
/* 037A98 7F0050A8 15E8FFF8 */ bne $t7, $t0, .L7F00508C
|
||||
/* 037A9C 7F0050AC ADC1FFFC */ sw $at, -4($t6)
|
||||
/* 037AA0 7F0050B0 3C048003 */ lui $a0, %hi(size_item_buffer) # $a0, 0x8003
|
||||
/* 037AA4 7F0050B4 8C84D9AC */ lw $a0, %lo(size_item_buffer)($a0)
|
||||
/* 037AA8 7F0050B8 0C0022E0 */ jal mempAllocBytesInBank
|
||||
/* 037AAC 7F0050BC 24050004 */ li $a1, 4
|
||||
/* 037AB0 7F0050C0 3C108007 */ lui $s0, %hi(g_CurrentPlayer) # $s0, 0x8007
|
||||
/* 037AB4 7F0050C4 26108BC0 */ addiu $s0, %lo(g_CurrentPlayer) # addiu $s0, $s0, -0x7440
|
||||
/* 037AB8 7F0050C8 8E090000 */ lw $t1, ($s0)
|
||||
/* 037ABC 7F0050CC 0FC26669 */ jal getPlayerCount
|
||||
/* 037AC0 7F0050D0 AD220808 */ sw $v0, 0x808($t1)
|
||||
/* 037AC4 7F0050D4 24010001 */ li $at, 1
|
||||
/* 037AC8 7F0050D8 14410006 */ bne $v0, $at, .L7F0050F4
|
||||
/* 037ACC 7F0050DC 3C048003 */ lui $a0, %hi(size_item_buffer+0x4) # $a0, 0x8003
|
||||
/* 037AD0 7F0050E0 8C84D9B0 */ lw $a0, %lo(size_item_buffer+0x4)($a0)
|
||||
/* 037AD4 7F0050E4 0C0022E0 */ jal mempAllocBytesInBank
|
||||
/* 037AD8 7F0050E8 24050004 */ li $a1, 4
|
||||
/* 037ADC 7F0050EC 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 037AE0 7F0050F0 AD42080C */ sw $v0, 0x80c($t2)
|
||||
.L7F0050F4:
|
||||
/* 037AE4 7F0050F4 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 037AE8 7F0050F8 2405FFFF */ li $a1, -1
|
||||
/* 037AEC 7F0050FC 27A30024 */ addiu $v1, $sp, 0x24
|
||||
/* 037AF0 7F005100 AD6007F8 */ sw $zero, 0x7f8($t3)
|
||||
/* 037AF4 7F005104 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 037AF8 7F005108 246B03A8 */ addiu $t3, $v1, 0x3a8
|
||||
/* 037AFC 7F00510C 00001025 */ move $v0, $zero
|
||||
/* 037B00 7F005110 AD8007FC */ sw $zero, 0x7fc($t4)
|
||||
/* 037B04 7F005114 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 037B08 7F005118 00606025 */ move $t4, $v1
|
||||
/* 037B0C 7F00511C ADA00800 */ sw $zero, 0x800($t5)
|
||||
/* 037B10 7F005120 8E190000 */ lw $t9, ($s0)
|
||||
/* 037B14 7F005124 AF200804 */ sw $zero, 0x804($t9)
|
||||
/* 037B18 7F005128 8E180000 */ lw $t8, ($s0)
|
||||
/* 037B1C 7F00512C AF052A3C */ sw $a1, 0x2a3c($t8)
|
||||
/* 037B20 7F005130 8E080000 */ lw $t0, ($s0)
|
||||
/* 037B24 7F005134 247803A8 */ addiu $t8, $v1, 0x3a8
|
||||
/* 037B28 7F005138 AD052A40 */ sw $a1, 0x2a40($t0)
|
||||
/* 037B2C 7F00513C 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037B30 7F005140 00604025 */ move $t0, $v1
|
||||
/* 037B34 7F005144 3C038007 */ lui $v1, %hi(g_playerPerm) # $v1, 0x8007
|
||||
/* 037B38 7F005148 ADE02A48 */ sw $zero, 0x2a48($t7)
|
||||
/* 037B3C 7F00514C 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 037B40 7F005150 24638BC4 */ addiu $v1, %lo(g_playerPerm) # addiu $v1, $v1, -0x743c
|
||||
/* 037B44 7F005154 ADC02A4C */ sw $zero, 0x2a4c($t6)
|
||||
/* 037B48 7F005158 8E090000 */ lw $t1, ($s0)
|
||||
.L7F00515C:
|
||||
/* 037B4C 7F00515C 8D810000 */ lw $at, ($t4)
|
||||
/* 037B50 7F005160 258C000C */ addiu $t4, $t4, 0xc
|
||||
/* 037B54 7F005164 2529000C */ addiu $t1, $t1, 0xc
|
||||
/* 037B58 7F005168 AD21085C */ sw $at, 0x85c($t1)
|
||||
/* 037B5C 7F00516C 8D81FFF8 */ lw $at, -8($t4)
|
||||
/* 037B60 7F005170 AD210860 */ sw $at, 0x860($t1)
|
||||
/* 037B64 7F005174 8D81FFFC */ lw $at, -4($t4)
|
||||
/* 037B68 7F005178 158BFFF8 */ bne $t4, $t3, .L7F00515C
|
||||
/* 037B6C 7F00517C AD210864 */ sw $at, 0x864($t1)
|
||||
/* 037B70 7F005180 8E0D0000 */ lw $t5, ($s0)
|
||||
.L7F005184:
|
||||
/* 037B74 7F005184 8D010000 */ lw $at, ($t0)
|
||||
/* 037B78 7F005188 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 037B7C 7F00518C 25AD000C */ addiu $t5, $t5, 0xc
|
||||
/* 037B80 7F005190 ADA10C04 */ sw $at, 0xc04($t5)
|
||||
/* 037B84 7F005194 8D01FFF8 */ lw $at, -8($t0)
|
||||
/* 037B88 7F005198 ADA10C08 */ sw $at, 0xc08($t5)
|
||||
/* 037B8C 7F00519C 8D01FFFC */ lw $at, -4($t0)
|
||||
/* 037B90 7F0051A0 1518FFF8 */ bne $t0, $t8, .L7F005184
|
||||
/* 037B94 7F0051A4 ADA10C0C */ sw $at, 0xc0c($t5)
|
||||
.L7F0051A8:
|
||||
/* 037B98 7F0051A8 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037B9C 7F0051AC 01E27021 */ addu $t6, $t7, $v0
|
||||
/* 037BA0 7F0051B0 24420004 */ addiu $v0, $v0, 4
|
||||
/* 037BA4 7F0051B4 28410078 */ slti $at, $v0, 0x78
|
||||
/* 037BA8 7F0051B8 1420FFFB */ bnez $at, .L7F0051A8
|
||||
/* 037BAC 7F0051BC ADC01128 */ sw $zero, 0x1128($t6)
|
||||
/* 037BB0 7F0051C0 8C6A0000 */ lw $t2, ($v1)
|
||||
/* 037BB4 7F0051C4 24040003 */ li $a0, 3
|
||||
/* 037BB8 7F0051C8 00041080 */ sll $v0, $a0, 2
|
||||
/* 037BBC 7F0051CC AD400000 */ sw $zero, ($t2)
|
||||
/* 037BC0 7F0051D0 8C6B0000 */ lw $t3, ($v1)
|
||||
/* 037BC4 7F0051D4 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 037BC8 7F0051D8 44811000 */ mtc1 $at, $f2
|
||||
/* 037BCC 7F0051DC AD600004 */ sw $zero, 4($t3)
|
||||
/* 037BD0 7F0051E0 8C6C0000 */ lw $t4, ($v1)
|
||||
/* 037BD4 7F0051E4 3C018004 */ lui $at, %hi(D_8004F0E0) # $at, 0x8004
|
||||
/* 037BD8 7F0051E8 44800000 */ mtc1 $zero, $f0
|
||||
/* 037BDC 7F0051EC AD800008 */ sw $zero, 8($t4)
|
||||
/* 037BE0 7F0051F0 8C690000 */ lw $t1, ($v1)
|
||||
/* 037BE4 7F0051F4 00002025 */ move $a0, $zero
|
||||
/* 037BE8 7F0051F8 0122C821 */ addu $t9, $t1, $v0
|
||||
/* 037BEC 7F0051FC AF200000 */ sw $zero, ($t9)
|
||||
/* 037BF0 7F005200 8C780000 */ lw $t8, ($v1)
|
||||
/* 037BF4 7F005204 03024021 */ addu $t0, $t8, $v0
|
||||
/* 037BF8 7F005208 AD000004 */ sw $zero, 4($t0)
|
||||
/* 037BFC 7F00520C 8C6D0000 */ lw $t5, ($v1)
|
||||
/* 037C00 7F005210 01A27821 */ addu $t7, $t5, $v0
|
||||
/* 037C04 7F005214 ADE00008 */ sw $zero, 8($t7)
|
||||
/* 037C08 7F005218 8C6E0000 */ lw $t6, ($v1)
|
||||
/* 037C0C 7F00521C 01C25021 */ addu $t2, $t6, $v0
|
||||
/* 037C10 7F005220 AD40000C */ sw $zero, 0xc($t2)
|
||||
/* 037C14 7F005224 8C6B0000 */ lw $t3, ($v1)
|
||||
/* 037C18 7F005228 C42C7530 */ lwc1 $f12, %lo(D_8004F0E0)($at)
|
||||
/* 037C1C 7F00522C 240200FF */ li $v0, 255
|
||||
/* 037C20 7F005230 AD60006C */ sw $zero, 0x6c($t3)
|
||||
/* 037C24 7F005234 8C6C0000 */ lw $t4, ($v1)
|
||||
/* 037C28 7F005238 3C018004 */ lui $at, %hi(fl_neg_pi) # $at, 0x8004
|
||||
/* 037C2C 7F00523C AD80001C */ sw $zero, 0x1c($t4)
|
||||
/* 037C30 7F005240 8C690000 */ lw $t1, ($v1)
|
||||
/* 037C34 7F005244 AD200020 */ sw $zero, 0x20($t1)
|
||||
/* 037C38 7F005248 8E190000 */ lw $t9, ($s0)
|
||||
/* 037C3C 7F00524C AF2029D0 */ sw $zero, 0x29d0($t9)
|
||||
/* 037C40 7F005250 8E180000 */ lw $t8, ($s0)
|
||||
/* 037C44 7F005254 AF0029D4 */ sw $zero, 0x29d4($t8)
|
||||
/* 037C48 7F005258 8E080000 */ lw $t0, ($s0)
|
||||
/* 037C4C 7F00525C E5020FB8 */ swc1 $f2, 0xfb8($t0)
|
||||
/* 037C50 7F005260 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 037C54 7F005264 E5A20FBC */ swc1 $f2, 0xfbc($t5)
|
||||
/* 037C58 7F005268 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037C5C 7F00526C 240D0001 */ li $t5, 1
|
||||
/* 037C60 7F005270 ADE00FC0 */ sw $zero, 0xfc0($t7)
|
||||
/* 037C64 7F005274 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 037C68 7F005278 ADC00FC4 */ sw $zero, 0xfc4($t6)
|
||||
/* 037C6C 7F00527C 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 037C70 7F005280 AD400FC8 */ sw $zero, 0xfc8($t2)
|
||||
/* 037C74 7F005284 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 037C78 7F005288 AD600FCC */ sw $zero, 0xfcc($t3)
|
||||
/* 037C7C 7F00528C 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 037C80 7F005290 AD800FD0 */ sw $zero, 0xfd0($t4)
|
||||
/* 037C84 7F005294 8E090000 */ lw $t1, ($s0)
|
||||
/* 037C88 7F005298 A1220FD4 */ sb $v0, 0xfd4($t1)
|
||||
/* 037C8C 7F00529C 8E190000 */ lw $t9, ($s0)
|
||||
/* 037C90 7F0052A0 A3220FD5 */ sb $v0, 0xfd5($t9)
|
||||
/* 037C94 7F0052A4 8E180000 */ lw $t8, ($s0)
|
||||
/* 037C98 7F0052A8 A3020FD6 */ sb $v0, 0xfd6($t8)
|
||||
/* 037C9C 7F0052AC 8E080000 */ lw $t0, ($s0)
|
||||
/* 037CA0 7F0052B0 A1000FD7 */ sb $zero, 0xfd7($t0)
|
||||
/* 037CA4 7F0052B4 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037CA8 7F0052B8 ADED0FD8 */ sw $t5, 0xfd8($t7)
|
||||
/* 037CAC 7F0052BC 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 037CB0 7F0052C0 ADC00FDC */ sw $zero, 0xfdc($t6)
|
||||
/* 037CB4 7F0052C4 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 037CB8 7F0052C8 E5400FE0 */ swc1 $f0, 0xfe0($t2)
|
||||
/* 037CBC 7F0052CC 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 037CC0 7F0052D0 E5600FE4 */ swc1 $f0, 0xfe4($t3)
|
||||
/* 037CC4 7F0052D4 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 037CC8 7F0052D8 E5800FE8 */ swc1 $f0, 0xfe8($t4)
|
||||
/* 037CCC 7F0052DC 8E090000 */ lw $t1, ($s0)
|
||||
/* 037CD0 7F0052E0 E5200FEC */ swc1 $f0, 0xfec($t1)
|
||||
/* 037CD4 7F0052E4 8E190000 */ lw $t9, ($s0)
|
||||
/* 037CD8 7F0052E8 E72C0FF0 */ swc1 $f12, 0xff0($t9)
|
||||
/* 037CDC 7F0052EC 8E180000 */ lw $t8, ($s0)
|
||||
/* 037CE0 7F0052F0 E7000FF4 */ swc1 $f0, 0xff4($t8)
|
||||
/* 037CE4 7F0052F4 8E080000 */ lw $t0, ($s0)
|
||||
/* 037CE8 7F0052F8 E5000FF8 */ swc1 $f0, 0xff8($t0)
|
||||
/* 037CEC 7F0052FC 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 037CF0 7F005300 E5A00FFC */ swc1 $f0, 0xffc($t5)
|
||||
/* 037CF4 7F005304 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037CF8 7F005308 E5E01000 */ swc1 $f0, 0x1000($t7)
|
||||
/* 037CFC 7F00530C 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 037D00 7F005310 E5CC1004 */ swc1 $f12, 0x1004($t6)
|
||||
/* 037D04 7F005314 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 037D08 7F005318 E5401008 */ swc1 $f0, 0x1008($t2)
|
||||
/* 037D0C 7F00531C 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 037D10 7F005320 C4247534 */ lwc1 $f4, %lo(fl_neg_pi)($at)
|
||||
/* 037D14 7F005324 E564100C */ swc1 $f4, 0x100c($t3)
|
||||
/* 037D18 7F005328 8E0C0000 */ lw $t4, ($s0)
|
||||
/* 037D1C 7F00532C E5801010 */ swc1 $f0, 0x1010($t4)
|
||||
/* 037D20 7F005330 8E090000 */ lw $t1, ($s0)
|
||||
/* 037D24 7F005334 AD201058 */ sw $zero, 0x1058($t1)
|
||||
/* 037D28 7F005338 8E190000 */ lw $t9, ($s0)
|
||||
/* 037D2C 7F00533C AF251268 */ sw $a1, 0x1268($t9)
|
||||
/* 037D30 7F005340 8E180000 */ lw $t8, ($s0)
|
||||
/* 037D34 7F005344 E7001064 */ swc1 $f0, 0x1064($t8)
|
||||
/* 037D38 7F005348 8E080000 */ lw $t0, ($s0)
|
||||
/* 037D3C 7F00534C E5001068 */ swc1 $f0, 0x1068($t0)
|
||||
/* 037D40 7F005350 8E0D0000 */ lw $t5, ($s0)
|
||||
/* 037D44 7F005354 E5A0106C */ swc1 $f0, 0x106c($t5)
|
||||
/* 037D48 7F005358 8E0F0000 */ lw $t7, ($s0)
|
||||
/* 037D4C 7F00535C ADE01070 */ sw $zero, 0x1070($t7)
|
||||
/* 037D50 7F005360 8E0E0000 */ lw $t6, ($s0)
|
||||
/* 037D54 7F005364 E5C01074 */ swc1 $f0, 0x1074($t6)
|
||||
/* 037D58 7F005368 8E0A0000 */ lw $t2, ($s0)
|
||||
/* 037D5C 7F00536C 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D60 7F005370 E5401078 */ swc1 $f0, 0x1078($t2)
|
||||
/* 037D64 7F005374 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D68 7F005378 00002025 */ move $a0, $zero
|
||||
/* 037D6C 7F00537C 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D70 7F005380 00002025 */ move $a0, $zero
|
||||
/* 037D74 7F005384 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D78 7F005388 24040001 */ li $a0, 1
|
||||
/* 037D7C 7F00538C 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D80 7F005390 24040001 */ li $a0, 1
|
||||
/* 037D84 7F005394 0FC1738C */ jal bgunCalculateBlend
|
||||
/* 037D88 7F005398 24040001 */ li $a0, 1
|
||||
/* 037D8C 7F00539C 8E0B0000 */ lw $t3, ($s0)
|
||||
/* 037D90 7F0053A0 240C0002 */ li $t4, 2
|
||||
/* 037D94 7F0053A4 3C018003 */ lui $at, %hi(sniperrifle_stats+52) # $at, 0x8003
|
||||
/* 037D98 7F0053A8 AD60105C */ sw $zero, 0x105c($t3)
|
||||
/* 037D9C 7F0053AC 8E090000 */ lw $t1, ($s0)
|
||||
/* 037DA0 7F0053B0 AD2C1120 */ sw $t4, 0x1120($t1)
|
||||
/* 037DA4 7F0053B4 8E190000 */ lw $t9, ($s0)
|
||||
/* 037DA8 7F0053B8 C426E188 */ lwc1 $f6, %lo(sniperrifle_stats+52)($at)
|
||||
/* 037DAC 7F0053BC 3C018003 */ lui $at, %hi(camera_stats+52) # $at, 0x8003
|
||||
/* 037DB0 7F0053C0 E726107C */ swc1 $f6, 0x107c($t9)
|
||||
/* 037DB4 7F0053C4 8E180000 */ lw $t8, ($s0)
|
||||
/* 037DB8 7F0053C8 C428EC08 */ lwc1 $f8, %lo(camera_stats+52)($at)
|
||||
/* 037DBC 7F0053CC E7081080 */ swc1 $f8, 0x1080($t8)
|
||||
/* 037DC0 7F0053D0 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 037DC4 7F0053D4 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 037DC8 7F0053D8 27BD03D0 */ addiu $sp, $sp, 0x3d0
|
||||
/* 037DCC 7F0053DC 03E00008 */ jr $ra
|
||||
/* 037DD0 7F0053E0 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ struct BONDdata_item_control_blocks {
|
||||
int field_1B8;
|
||||
int field_1BC;
|
||||
int field_1C0;
|
||||
int field_1C4;
|
||||
int timer_1C4;
|
||||
int field_1C8;
|
||||
int field_1CC;
|
||||
float field_1D0;
|
||||
|
||||
@@ -11,7 +11,26 @@
|
||||
|
||||
|
||||
//data
|
||||
struct unk_joint_list D_8002A790 = {NULL, 1, 3, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}, 0};
|
||||
ModelRenderData D_8002A790 = {
|
||||
NULL,
|
||||
TRUE,
|
||||
0x00000003,
|
||||
NULL,
|
||||
|
||||
NULL,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
|
||||
0,
|
||||
{0,0,0,0},
|
||||
{0,0,0,0},
|
||||
CULLMODE_BOTH};
|
||||
|
||||
// forward declarations
|
||||
|
||||
@@ -28,7 +47,7 @@ void sub_GAME_7F0062C0(void *anim, s32 arg1, s32 arg2, s32 *arg3);
|
||||
* @param arg1:
|
||||
* @param arg2:
|
||||
* @param arg3: unknown type.
|
||||
*
|
||||
*
|
||||
* Address 0x7F0062C0.
|
||||
*/
|
||||
void sub_GAME_7F0062C0(void *anim, s32 arg1, s32 arg2, s32 *arg3)
|
||||
@@ -66,7 +85,7 @@ void sets_a_bunch_of_BONDdata_values_to_default(void)
|
||||
{
|
||||
s32 i;
|
||||
s32 spD0[3];
|
||||
struct unk_joint_list sp90;
|
||||
ModelRenderData sp90;
|
||||
Mtxf sp50;
|
||||
|
||||
#ifdef LEFTOVERDEBUG
|
||||
@@ -110,9 +129,9 @@ void sets_a_bunch_of_BONDdata_values_to_default(void)
|
||||
g_CurrentPlayer->headupsum.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headupsum.f[1] = HEADSUM;
|
||||
g_CurrentPlayer->headupsum.f[2] = 0.0f;
|
||||
g_CurrentPlayer->resetheadpos = 1;
|
||||
g_CurrentPlayer->resetheadrot = 1;
|
||||
g_CurrentPlayer->resetheadtick = 1;
|
||||
g_CurrentPlayer->resetheadpos = TRUE;
|
||||
g_CurrentPlayer->resetheadrot = TRUE;
|
||||
g_CurrentPlayer->resetheadtick = TRUE;
|
||||
g_CurrentPlayer->headbodyoffset.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset.f[2] = 0.0f;
|
||||
@@ -144,7 +163,7 @@ void sets_a_bunch_of_BONDdata_values_to_default(void)
|
||||
(s32)g_BondMoveAnimationSetup[i].endframe,
|
||||
&spD0);
|
||||
|
||||
g_BondMoveAnimationSetup[i].unk0C = (f32) (((f32) spD0[2] * IDO_POINT_ONE) / (g_BondMoveAnimationSetup[i].endframe - g_BondMoveAnimationSetup[i].loopframe));
|
||||
g_BondMoveAnimationSetup[i].speedMultiplier = (f32) (((f32) spD0[2] * IDO_POINT_ONE) / (g_BondMoveAnimationSetup[i].endframe - g_BondMoveAnimationSetup[i].loopframe));
|
||||
}
|
||||
|
||||
sp90 = D_8002A790;
|
||||
|
||||
@@ -3,5 +3,8 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
void sets_a_bunch_of_BONDdata_values_to_default(void);
|
||||
#ifdef LEFTOVERDEBUG
|
||||
extern void exit(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -32,25 +32,18 @@ void reset_counter_rand_body_head(void)
|
||||
}
|
||||
|
||||
|
||||
u32 sub_GAME_7F0001F0(void *ani,int aniid,int param_3)
|
||||
{
|
||||
short asStack8 [4];
|
||||
u32 uVar1;
|
||||
u32 i;
|
||||
|
||||
|
||||
i = 0;
|
||||
while (aniid < param_3) {
|
||||
uVar1 = sub_GAME_7F06D2E4(0,0,&skeleton_guard,ani,aniid,asStack8);
|
||||
i = i + uVar1 & 0xffff;
|
||||
aniid=1+aniid;
|
||||
|
||||
}
|
||||
return i;
|
||||
u32 sub_GAME_7F0001F0(void *ani, int aniid, int param_3) {
|
||||
short asStack8[4];
|
||||
u16 result = 0;
|
||||
|
||||
while (aniid < param_3) {
|
||||
result += sub_GAME_7F06D2E4(0, 0, &skeleton_guard, ani, aniid, asStack8);
|
||||
aniid++;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F000290(void) {
|
||||
|
||||
|
||||
+64
-71
@@ -2,19 +2,26 @@
|
||||
#include <memp.h>
|
||||
#include "initanitable.h"
|
||||
#include "objecthandler.h"
|
||||
#include "bondgame.h"
|
||||
|
||||
//bss
|
||||
char dword_CODE_bss_80069170[0x2D0];
|
||||
|
||||
// Where animation frames are saved. Can possibly hold as much as nine, but the game will ever store four at maximum.
|
||||
char animations_frame_buffer[0x2D0];
|
||||
|
||||
// Msg Queue stuff (unused)
|
||||
OSMesgQueue animMsgQ;
|
||||
char dword_CODE_bss_80069458[0xC0];
|
||||
char dword_CODE_bss_80069458[0xC0]; // Unused. Possibly meant for unused message queue.
|
||||
OSMesg animMesg[8];
|
||||
|
||||
// Animation table ptr
|
||||
struct animation_table_data * ptr_animation_table;
|
||||
|
||||
//data
|
||||
struct bondstruct_unk_animation_related D_80029D60 = {
|
||||
NULL,
|
||||
&dword_CODE_bss_80069170,
|
||||
&dword_CODE_bss_80069170
|
||||
&animations_frame_buffer, // Two pointers. One always points to the start of the buffer, the other can be modified.
|
||||
&animations_frame_buffer
|
||||
};
|
||||
|
||||
s32 animation_table_ptrs1[] = {
|
||||
@@ -213,8 +220,47 @@ struct ModelAnimation *animation_table_ptrs2[] = {
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void expand_ani_table_entries(void) {
|
||||
struct anim_data_entry
|
||||
{
|
||||
void *unk00;
|
||||
s32 unk04;
|
||||
void *unk08;
|
||||
s32 unk0C;
|
||||
void *unk10;
|
||||
};
|
||||
/**
|
||||
* https://decomp.me/scratch/n0qGM 82.91%
|
||||
*/
|
||||
void expand_ani_table_entries(s32** arg0)
|
||||
{
|
||||
s32 **var_v0;
|
||||
struct anim_data_entry *temp_t7;
|
||||
s32 intval;
|
||||
|
||||
for (var_v0 = arg0; *var_v0 != 0; var_v0++)
|
||||
{
|
||||
//var_v1 = *var_v0;
|
||||
if (*var_v0 != (s32*)1)
|
||||
{
|
||||
temp_t7 = (struct anim_data_entry *)(&ptr_animation_table->data[(s32)*var_v0]);
|
||||
//temp_t7->unk00 = (s32*)temp_t7;
|
||||
//*var_v0 = (s32*)temp_t7;
|
||||
|
||||
intval = *(s32*)temp_t7->unk08;
|
||||
temp_t7->unk08 = &ptr_animation_table->data[intval];
|
||||
intval = *(s32*)temp_t7->unk10;
|
||||
temp_t7->unk10 = &ptr_animation_table->data[intval];
|
||||
}
|
||||
}
|
||||
|
||||
for (var_v0 = arg0; *var_v0 != 0; var_v0++)
|
||||
{
|
||||
//var_v1 = *var_v0;
|
||||
if (*var_v0 != (s32*)1)
|
||||
{
|
||||
**var_v0 += (s32)&_animation_entriesSegmentRomStart;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
@@ -272,71 +318,18 @@ glabel expand_ani_table_entries
|
||||
)
|
||||
#endif
|
||||
|
||||
extern u8* _animation_dataSegmentRomStart;
|
||||
extern u8* _animation_dataSegmentStart;
|
||||
extern u8* _animation_dataSegmentEnd;
|
||||
#ifdef NONMATCHING
|
||||
void alloc_load_expand_ani_table(void) {
|
||||
//u32 sp18;
|
||||
u32 size;
|
||||
//void *temp_v0;
|
||||
|
||||
osCreateMesgQueue(&animMsgQ, &animMesg, 8);
|
||||
void alloc_load_expand_ani_table(void)
|
||||
{
|
||||
s32 animsDataSegmentSize;
|
||||
|
||||
osCreateMesgQueue(&animMsgQ, animMesg, 8);
|
||||
sub_GAME_7F0009E0(&D_80029D60, &animMsgQ, &dword_CODE_bss_80069458);
|
||||
size = ((u32)_animation_dataSegmentEnd - (u32)_animation_dataSegmentStart);
|
||||
//sp18 = size;
|
||||
//temp_v0 = mempAllocBytesInBank(size, 6U);
|
||||
ptr_animation_table = mempAllocBytesInBank(size, 6U);
|
||||
romCopy(ptr_animation_table, &_animation_dataSegmentRomStart, size);
|
||||
expand_ani_table_entries(&animation_table_ptrs1);
|
||||
expand_ani_table_entries(&animation_table_ptrs2);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel alloc_load_expand_ani_table
|
||||
/* 0355DC 7F000AAC 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 0355E0 7F000AB0 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0355E4 7F000AB4 3C048007 */ lui $a0, %hi(animMsgQ)
|
||||
/* 0355E8 7F000AB8 3C058007 */ lui $a1, %hi(animMesg)
|
||||
/* 0355EC 7F000ABC 24A59518 */ addiu $a1, %lo(animMesg) # addiu $a1, $a1, -0x6ae8
|
||||
/* 0355F0 7F000AC0 24849440 */ addiu $a0, %lo(animMsgQ) # addiu $a0, $a0, -0x6bc0
|
||||
/* 0355F4 7F000AC4 0C0035B4 */ jal osCreateMesgQueue
|
||||
/* 0355F8 7F000AC8 24060008 */ li $a2, 8
|
||||
/* 0355FC 7F000ACC 3C048003 */ lui $a0, %hi(D_80029D60)
|
||||
/* 035600 7F000AD0 3C058007 */ lui $a1, %hi(animMsgQ)
|
||||
/* 035604 7F000AD4 3C068007 */ lui $a2, %hi(dword_CODE_bss_80069458)
|
||||
/* 035608 7F000AD8 24C69458 */ addiu $a2, %lo(dword_CODE_bss_80069458) # addiu $a2, $a2, -0x6ba8
|
||||
/* 03560C 7F000ADC 24A59440 */ addiu $a1, %lo(animMsgQ) # addiu $a1, $a1, -0x6bc0
|
||||
/* 035610 7F000AE0 0FC00278 */ jal sub_GAME_7F0009E0
|
||||
/* 035614 7F000AE4 24849D60 */ addiu $a0, %lo(D_80029D60) # addiu $a0, $a0, -0x62a0
|
||||
/* 035618 7F000AE8 3C0E0001 */ lui $t6, %hi(0x0000E7E0) # $t6, 1
|
||||
/* 03561C 7F000AEC 3C0F0000 */ lui $t7, 0
|
||||
/* 035620 7F000AF0 25EF0000 */ addiu $t7, $t7, 0
|
||||
/* 035624 7F000AF4 25CEE7E0 */ addiu $t6, %lo(0x0000E7E0) # addiu $t6, $t6, -0x1820
|
||||
/* 035628 7F000AF8 01CF3023 */ subu $a2, $t6, $t7
|
||||
/* 03562C 7F000AFC 00C02025 */ move $a0, $a2
|
||||
/* 035630 7F000B00 AFA60018 */ sw $a2, 0x18($sp)
|
||||
/* 035634 7F000B04 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 035638 7F000B08 24050006 */ li $a1, 6
|
||||
/* 03563C 7F000B0C 3C038007 */ lui $v1, %hi(ptr_animation_table)
|
||||
/* 035640 7F000B10 24639538 */ addiu $v1, %lo(ptr_animation_table) # addiu $v1, $v1, -0x6ac8
|
||||
/* 035644 7F000B14 3C050029 */ lui $a1, %hi(_animation_dataSegmentRomStart) # $a1, 0x29
|
||||
/* 035648 7F000B18 AC620000 */ sw $v0, ($v1)
|
||||
/* 03564C 7F000B1C 8FA60018 */ lw $a2, 0x18($sp)
|
||||
/* 035650 7F000B20 24A5E980 */ addiu $a1, %lo(_animation_dataSegmentRomStart) # addiu $a1, $a1, -0x1680
|
||||
/* 035654 7F000B24 0C001707 */ jal romCopy
|
||||
/* 035658 7F000B28 00402025 */ move $a0, $v0
|
||||
/* 03565C 7F000B2C 3C048003 */ lui $a0, %hi(animation_table_ptrs1)
|
||||
/* 035660 7F000B30 0FC00280 */ jal expand_ani_table_entries
|
||||
/* 035664 7F000B34 24849D6C */ addiu $a0, %lo(animation_table_ptrs1) # addiu $a0, $a0, -0x6294
|
||||
/* 035668 7F000B38 3C048003 */ lui $a0, %hi(animation_table_ptrs2)
|
||||
/* 03566C 7F000B3C 0FC00280 */ jal expand_ani_table_entries
|
||||
/* 035670 7F000B40 2484A04C */ addiu $a0, %lo(animation_table_ptrs2) # addiu $a0, $a0, -0x5fb4
|
||||
/* 035674 7F000B44 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 035678 7F000B48 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 03567C 7F000B4C 03E00008 */ jr $ra
|
||||
/* 035680 7F000B50 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
animsDataSegmentSize = (s32)&_animation_dataSegmentEnd - (s32)&_animation_dataSegmentStart;
|
||||
|
||||
ptr_animation_table = mempAllocBytesInBank(animsDataSegmentSize, MEMPOOL_PERMANENT);
|
||||
|
||||
romCopy(ptr_animation_table, &_animation_dataSegmentRomStart, animsDataSegmentSize);
|
||||
expand_ani_table_entries((s32*)&animation_table_ptrs1);
|
||||
expand_ani_table_entries((s32*)&animation_table_ptrs2);
|
||||
}
|
||||
|
||||
@@ -10,53 +10,53 @@ void alloc_explosion_smoke_casing_scorch_impact_buffers(void)
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
numExplosionEntries = 0;
|
||||
numSmokeEntries = 0;
|
||||
numParticleEntries = 0;
|
||||
numScorchEntries = 0;
|
||||
numImpactEntries = 0;
|
||||
D_80040178 = 1.0f;
|
||||
g_NumExplosionEntries = 0;
|
||||
g_NumSmokeEntries = 0;
|
||||
g_NumParticleEntries = 0;
|
||||
g_NumScorchEntries = 0;
|
||||
g_NumImpactEntries = 0;
|
||||
g_SpExplosionDamageMult = 1.0f;
|
||||
|
||||
ptr_explosion_buf = (struct Explosion*)mempAllocBytesInBank(EXPLOSION_BUFFER_LEN * sizeof(struct Explosion), 4);
|
||||
g_ExplosionBuffer = (struct Explosion *)mempAllocBytesInBank(EXPLOSION_BUFFER_LEN * sizeof(struct Explosion), MEMPOOL_STAGE);
|
||||
|
||||
for (i=0; i<EXPLOSION_BUFFER_LEN; i++)
|
||||
{
|
||||
ptr_explosion_buf[i].prop = NULL;
|
||||
g_ExplosionBuffer[i].prop = NULL;
|
||||
|
||||
for (j=0; j<EXPLOSION_PARTS_LEN; j++)
|
||||
{
|
||||
ptr_explosion_buf[i].parts[j].frame = 0;
|
||||
g_ExplosionBuffer[i].parts[j].frame = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ptr_smoke_buf = (struct Smoke*)mempAllocBytesInBank(SMOKE_BUFFER_LEN * sizeof(struct Smoke), 4);
|
||||
g_SmokeBuffer = (struct Smoke *)mempAllocBytesInBank(SMOKE_BUFFER_LEN * sizeof(struct Smoke), MEMPOOL_STAGE);
|
||||
|
||||
for (i=0; i<SMOKE_BUFFER_LEN; i++)
|
||||
{
|
||||
ptr_smoke_buf[i].prop = NULL;
|
||||
g_SmokeBuffer[i].prop = NULL;
|
||||
|
||||
for (j=0; j<SMOKE_PARTS_LEN; j++)
|
||||
{
|
||||
ptr_smoke_buf[i].parts[j].size = 0.0f;
|
||||
g_SmokeBuffer[i].parts[j].size = 0.0f;
|
||||
}
|
||||
}
|
||||
|
||||
if (getPlayerCount() == 1)
|
||||
{
|
||||
// scorches are the circle burn marks left on the ground from explosions
|
||||
ptr_scorch_buf = (struct Scorch*)mempAllocBytesInBank(SCORCH_BUFFER_LEN * sizeof(struct Scorch), 4);
|
||||
g_ScorchBuffer = (struct Scorch *)mempAllocBytesInBank(SCORCH_BUFFER_LEN * sizeof(struct Scorch), MEMPOOL_STAGE);
|
||||
|
||||
for (i=0; i<SCORCH_BUFFER_LEN; i++)
|
||||
{
|
||||
ptr_scorch_buf[i].roomid = -1;
|
||||
g_ScorchBuffer[i].roomid = -1;
|
||||
}
|
||||
}
|
||||
|
||||
ptr_bullet_impact_buf = (struct BulletImpact*)mempAllocBytesInBank(BULLET_IMPACT_BUFFER_LEN * sizeof(struct BulletImpact), 4);
|
||||
g_BulletImpactBuffer = (struct BulletImpact *)mempAllocBytesInBank(BULLET_IMPACT_BUFFER_LEN * sizeof(struct BulletImpact), MEMPOOL_STAGE);
|
||||
|
||||
for (i=0; i<BULLET_IMPACT_BUFFER_LEN; i++)
|
||||
{
|
||||
ptr_bullet_impact_buf[i].unk00 = -1;
|
||||
g_BulletImpactBuffer[i].room = -1;
|
||||
}
|
||||
|
||||
max_particles = MAX_FLYING_PARTICLES / getPlayerCount();
|
||||
@@ -66,10 +66,10 @@ void alloc_explosion_smoke_casing_scorch_impact_buffers(void)
|
||||
max_particles = (s32) max_particles >> 1;
|
||||
}
|
||||
|
||||
ptr_flying_particles_buf = (struct FlyingParticles*)mempAllocBytesInBank(((max_particles * sizeof(struct FlyingParticles)) + 0xF) & ~0xF, 4);
|
||||
g_FlyingParticlesBuffer = (struct FlyingParticles *)mempAllocBytesInBank(((max_particles * sizeof(struct FlyingParticles)) + 0xF) & ~0xF, MEMPOOL_STAGE);
|
||||
|
||||
for (i=0; i<max_particles; i++)
|
||||
{
|
||||
ptr_flying_particles_buf[i].unk00 = 0;
|
||||
g_FlyingParticlesBuffer[i].unk00 = 0;
|
||||
}
|
||||
}
|
||||
|
||||
+12
-12
@@ -7,30 +7,30 @@
|
||||
**/
|
||||
void initGameData(void) {
|
||||
current_menu = MENU_INVALID;
|
||||
menu_update = 0;
|
||||
menu_update = MENU_LEGAL_SCREEN;
|
||||
maybe_prev_menu = MENU_INVALID;
|
||||
g_MenuTimer = 0;
|
||||
selected_stage = -1;
|
||||
selected_stage = LEVELID_NONE;
|
||||
briefingpage = BRIEFING_INVALID;
|
||||
selected_difficulty = DIFFICULTY_MULTI;
|
||||
screen_size = 0;
|
||||
screen_size = SCREEN_SIZE_320x240;
|
||||
folder_selection_screen_option_icon = 0;
|
||||
selected_folder_num = 0;
|
||||
mission_failed_or_aborted = 0;
|
||||
is_first_time_on_legal_screen = 1;
|
||||
is_first_time_on_main_menu = 1;
|
||||
prev_keypresses = 0;
|
||||
selected_folder_num = FOLDER1;
|
||||
mission_failed_or_aborted = FALSE;
|
||||
is_first_time_on_legal_screen = TRUE;
|
||||
is_first_time_on_main_menu = TRUE;
|
||||
prev_keypresses = FALSE;
|
||||
maybe_is_in_menu = TRUE;
|
||||
slider_007_mode_reaction = 0.0f;
|
||||
slider_007_mode_health = 1.0f;
|
||||
slider_007_mode_accuracy = 1.0f;
|
||||
slider_007_mode_damage = 1.0f;
|
||||
intro_character_index = 0;
|
||||
randomly_selected_intro_animation = 0;
|
||||
randomly_selected_intro_animation = ANIM_idle;
|
||||
intro_animation_count = 0;
|
||||
cast_model = 0;
|
||||
cast_model_weapon = 0;
|
||||
full_actor_intro = 0;
|
||||
cast_model = NULL;
|
||||
cast_model_weapon = NULL;
|
||||
full_actor_intro = FALSE;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ void init_guards(void) {
|
||||
D_8002C90C = 0;
|
||||
D_8002C910 = 0;
|
||||
D_8002CC58 = 0;
|
||||
show_patrols_flag = 0;
|
||||
show_patrols_flag = FALSE;
|
||||
player1_guardID = 0x1388;
|
||||
g_ChrSlots = 0;
|
||||
g_NumChrSlots = 0;
|
||||
@@ -27,9 +27,9 @@ void alloc_init_GUARDdata_entries(s32 count)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
g_NumChrSlots = count + 0xA;
|
||||
g_NumChrSlots = count + 10; //special guards?
|
||||
|
||||
g_ChrSlots = mempAllocBytesInBank(align_addr_zero(g_NumChrSlots*sizeof(ChrRecord)), 4);
|
||||
g_ChrSlots = mempAllocBytesInBank(align_addr_zero(g_NumChrSlots * sizeof(ChrRecord)), MEMPOOL_STAGE);
|
||||
for(i = 0; g_NumChrSlots > i; i++)
|
||||
{
|
||||
g_ChrSlots[i].model = 0;
|
||||
|
||||
+21
-75
@@ -1,82 +1,28 @@
|
||||
#include <ultra64.h>
|
||||
#include "image.h"
|
||||
|
||||
extern g_Textures;
|
||||
/**
|
||||
* NTSC address 0x7F000BD0.
|
||||
*/
|
||||
void image_entries_load(void)
|
||||
{
|
||||
s32 offset;
|
||||
s32 next_offset;
|
||||
s32 temp_t3;
|
||||
struct image_entry *entryp;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void image_entries_load(void) {
|
||||
image_entry *piVar1;
|
||||
image_entry *piVar2;
|
||||
uint uVar3;
|
||||
uint uVar4;
|
||||
uint uVar5;
|
||||
uint uVar6;
|
||||
entryp = g_Textures;
|
||||
offset = 0;
|
||||
next_offset = entryp->dataoffset;
|
||||
|
||||
piVar1 = g_Textures;
|
||||
uVar3 = 0;
|
||||
piVar2 = g_Textures;
|
||||
if (g_Textures[0].size != -1) //this (& 0xFFFFFF) is auto genrated by bitfield
|
||||
while (entryp->dataoffset != 0xffff)
|
||||
{
|
||||
uVar5 = g_Textures[0].size;
|
||||
uVar4 = g_Textures[0].size;
|
||||
do
|
||||
{
|
||||
uVar6 = (uVar3 ^ uVar4) ^ uVar4;
|
||||
uVar4 = *(uint *)(piVar1 + 1);
|
||||
uVar3 += uVar5;
|
||||
*(uint *)piVar1 = uVar6;
|
||||
uVar5 = uVar4;
|
||||
piVar1 = piVar1 + 1;
|
||||
piVar2 = piVar1;
|
||||
} while (uVar5 != -1);
|
||||
temp_t3 = entryp->dataoffset;
|
||||
entryp->dataoffset = offset;
|
||||
offset += temp_t3;
|
||||
entryp++;
|
||||
next_offset = entryp->dataoffset;
|
||||
}
|
||||
*(uint *)piVar2 =
|
||||
(uVar3 ^ *(uint *)piVar2) ^ *(uint *)piVar2;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel image_entries_load
|
||||
/* 035700 7F000BD0 3C048005 */ lui $a0, %hi(g_Textures)
|
||||
/* 035704 7F000BD4 24829300 */ addiu $v0, $a0, %lo(g_Textures)
|
||||
/* 035708 7F000BD8 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 03570C 7F000BDC 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff
|
||||
/* 035710 7F000BE0 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff
|
||||
/* 035714 7F000BE4 3407FFFF */ li $a3, 65535
|
||||
/* 035718 7F000BE8 01C17824 */ and $t7, $t6, $at
|
||||
/* 03571C 7F000BEC 10EF0014 */ beq $a3, $t7, .L7F000C40
|
||||
/* 035720 7F000BF0 00001825 */ move $v1, $zero
|
||||
/* 035724 7F000BF4 3C188005 */ lui $t8, %hi(g_Textures)
|
||||
/* 035728 7F000BF8 27189300 */ addiu $t8, %lo(g_Textures) # addiu $t8, $t8, -0x6d00
|
||||
/* 03572C 7F000BFC 8F050000 */ lw $a1, ($t8)
|
||||
/* 035730 7F000C00 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff
|
||||
/* 035734 7F000C04 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff
|
||||
/* 035738 7F000C08 00A13024 */ and $a2, $a1, $at
|
||||
.L7F000C0C:
|
||||
/* 03573C 7F000C0C 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff
|
||||
/* 035740 7F000C10 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff
|
||||
/* 035744 7F000C14 0061C824 */ and $t9, $v1, $at
|
||||
/* 035748 7F000C18 03254026 */ xor $t0, $t9, $a1
|
||||
/* 03574C 7F000C1C 00084A00 */ sll $t1, $t0, 8
|
||||
/* 035750 7F000C20 00095202 */ srl $t2, $t1, 8
|
||||
/* 035754 7F000C24 01455826 */ xor $t3, $t2, $a1
|
||||
/* 035758 7F000C28 8C450008 */ lw $a1, 8($v0)
|
||||
/* 03575C 7F000C2C 00661821 */ addu $v1, $v1, $a2
|
||||
/* 035760 7F000C30 AC4B0000 */ sw $t3, ($v0)
|
||||
/* 035764 7F000C34 00A13024 */ and $a2, $a1, $at
|
||||
/* 035768 7F000C38 14E6FFF4 */ bne $a3, $a2, .L7F000C0C
|
||||
/* 03576C 7F000C3C 24420008 */ addiu $v0, $v0, 8
|
||||
.L7F000C40:
|
||||
/* 035770 7F000C40 8C450000 */ lw $a1, ($v0)
|
||||
/* 035774 7F000C44 3C0100FF */ lui $at, (0x00FFFFFF >> 16) # lui $at, 0xff
|
||||
/* 035778 7F000C48 3421FFFF */ ori $at, (0x00FFFFFF & 0xFFFF) # ori $at, $at, 0xffff
|
||||
/* 03577C 7F000C4C 00616024 */ and $t4, $v1, $at
|
||||
/* 035780 7F000C50 01856826 */ xor $t5, $t4, $a1
|
||||
/* 035784 7F000C54 000D7200 */ sll $t6, $t5, 8
|
||||
/* 035788 7F000C58 000E7A02 */ srl $t7, $t6, 8
|
||||
/* 03578C 7F000C5C 01E5C026 */ xor $t8, $t7, $a1
|
||||
/* 035790 7F000C60 03E00008 */ jr $ra
|
||||
/* 035794 7F000C64 AC580000 */ sw $t8, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
entryp->dataoffset = offset;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
void alloc_intro_matrices(void)
|
||||
{
|
||||
D_8002A7D0 = 0;
|
||||
matrix_buffer_rarelogo_0 = mempAllocBytesInBank(0x80, 4);
|
||||
matrix_buffer_gunbarrel_0 = mempAllocBytesInBank(0x40, 4);
|
||||
matrix_buffer_rarelogo_1 = mempAllocBytesInBank(0x80, 4);
|
||||
matrix_buffer_rarelogo_2 = mempAllocBytesInBank(0x80, 4);
|
||||
matrix_buffer_gunbarrel_1 = mempAllocBytesInBank(0x80, 4);
|
||||
matrix_buffer_intro_backdrop = mempAllocBytesInBank(0x80, 4);
|
||||
matrix_buffer_intro_bond = mempAllocBytesInBank(0x80, 4);
|
||||
matrixBufferRareLogo0 = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
matrixBufferGunbarrel0 = mempAllocBytesInBank(0x40, MEMPOOL_STAGE);
|
||||
matrixBufferRareLogo1 = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
matrixBufferRareLogo2 = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
matrixBufferGunbarrel1 = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
matrixBufferIntroBackdrop = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
matrixBufferIntroBond = mempAllocBytesInBank(0x80, MEMPOOL_STAGE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,6 @@ void reinit_gunheld_totaltime(void) {
|
||||
|
||||
void alloc_additional_item_slots(s32 additionalentries) {
|
||||
g_CurrentPlayer->equipmaxitems = additionalentries + 0x1e;
|
||||
g_CurrentPlayer->p_itemcur = mempAllocBytesInBank((g_CurrentPlayer->equipmaxitems * 0x14 + 0xfU | 0xf) ^ 0xf,'\x04');
|
||||
g_CurrentPlayer->p_itemcur = mempAllocBytesInBank((g_CurrentPlayer->equipmaxitems * 0x14 + 0xfU | 0xf) ^ 0xf, MEMPOOL_STAGE);
|
||||
bondinvReinitInv();
|
||||
}
|
||||
|
||||
@@ -3,5 +3,6 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
void reinit_gunheld_totaltime(void);
|
||||
void alloc_additional_item_slots(s32 additionalentries);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,12 +31,12 @@ void init_menus_or_reset(void)
|
||||
menu_update = MENU_FILE_SELECT;
|
||||
}
|
||||
|
||||
ptr_logo_and_walletbond_DL = (u8 *)mempAllocBytesInBank(0x78000, 4);
|
||||
ptr_logo_and_walletbond_DL = (u8 *)mempAllocBytesInBank(0x78000, MEMPOOL_STAGE);
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
ptr_menu_videobuffer = mempAllocBytesInBank(0x55040, 4);
|
||||
ptr_menu_videobuffer = mempAllocBytesInBank(0x55040, MEMPOOL_STAGE);
|
||||
#else
|
||||
ptr_menu_videobuffer = mempAllocBytesInBank(0x4b040, 4);
|
||||
ptr_menu_videobuffer = mempAllocBytesInBank(0x4b040, MEMPOOL_STAGE);
|
||||
#endif
|
||||
|
||||
ptr_menu_videobuffer = ALIGN64_V1(ptr_menu_videobuffer);
|
||||
@@ -47,4 +47,4 @@ void init_menus_or_reset(void)
|
||||
}
|
||||
|
||||
alloc_intro_matrices();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,8 +9,8 @@ void set_mt_tex_alloc(void)
|
||||
|
||||
if (tokenFind(1, "-mt"))
|
||||
{
|
||||
bytes = strtol(tokenFind(1, "-mt"), 0x0, 0) << 10;
|
||||
bytes = strtol(tokenFind(1, "-mt"), 0x0, 0) * 1024; //get KB
|
||||
}
|
||||
|
||||
texInitPool(&ptr_texture_alloc_start, mempAllocBytesInBank(bytes, 4), bytes);
|
||||
texInitPool(&ptr_texture_alloc_start, mempAllocBytesInBank(bytes, MEMPOOL_STAGE), bytes);
|
||||
}
|
||||
|
||||
@@ -69,13 +69,13 @@ void alloc_lookup_buffers(void)
|
||||
s32 j;
|
||||
s32 i;
|
||||
|
||||
ptr_list_object_lookup_indices = (s16*)mempAllocBytesInBank(PTR_LIST_OBJECT_LOOKUP_INDICES_LEN * sizeof(s16), 4);
|
||||
RoomPropListChunkIndexes = (s16*)mempAllocBytesInBank((((MaxNumRooms * 4) + 0xF) | 0xF) ^ 0xF, 4);
|
||||
RoomPropListChunks = (s16*)mempAllocBytesInBank(BSS_8007161C_LEN * sizeof(struct roomproplistchunk), 4);
|
||||
ptr_list_object_lookup_indices = (s16 *)mempAllocBytesInBank(PTR_LIST_OBJECT_LOOKUP_INDICES_LEN * sizeof(s16), MEMPOOL_STAGE);
|
||||
RoomPropListChunkIndexes = (s16 *)mempAllocBytesInBank((((g_MaxNumRooms * 4) + 0xF) | 0xF) ^ 0xF, MEMPOOL_STAGE);
|
||||
RoomPropListChunks = (s16 *)mempAllocBytesInBank(BSS_8007161C_LEN * sizeof(struct roomproplistchunk), MEMPOOL_STAGE);
|
||||
|
||||
ptr_list_object_lookup_indices[0] = -1;
|
||||
|
||||
for (i=0; i<MaxNumRooms; i++)
|
||||
for (i=0; i<g_MaxNumRooms; i++)
|
||||
{
|
||||
RoomPropListChunkIndexes[i] = -1;
|
||||
}
|
||||
@@ -165,9 +165,9 @@ void reinit_between_menus(void)
|
||||
* Called from proplvreset2 when PROPDEF type is PROPDEF_SWITCH.
|
||||
* Address 0x7F001910.
|
||||
*/
|
||||
void initSetLevelLoadPropSwitch(struct ObjectRecord *arg0)
|
||||
void initSetLevelLoadPropSwitch(struct LinkRecord *arg0)
|
||||
{
|
||||
*((struct ObjectRecord **)&arg0->flags2) = g_LevelLoadPropSwitch;
|
||||
arg0->next = g_LevelLoadPropSwitch;
|
||||
g_LevelLoadPropSwitch = arg0;
|
||||
}
|
||||
|
||||
@@ -176,9 +176,9 @@ void initSetLevelLoadPropSwitch(struct ObjectRecord *arg0)
|
||||
* Called from proplvreset2 when PROPDEF type is PROPDEF_LOCK_DOOR.
|
||||
* Address 0x7F001928.
|
||||
*/
|
||||
void initSetLevelLoadPropLockDoor(struct ObjectRecord *arg0)
|
||||
void initSetLevelLoadPropLockDoor(struct LockDoorRecord *arg0)
|
||||
{
|
||||
*((struct ObjectRecord **)&arg0->flags2) = g_LevelLoadPropLockDoor;
|
||||
arg0->next = g_LevelLoadPropLockDoor;
|
||||
g_LevelLoadPropLockDoor = arg0;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,5 +8,8 @@ void init_load_objpos_table(void);
|
||||
void reinit_between_menus(void);
|
||||
void init_sound_effects_registers(void);
|
||||
void sub_GAME_7F001910(struct ObjectRecord *arg0);
|
||||
void initSetLevelLoadPropSwitch(struct LinkRecord *arg0);
|
||||
void initSetLevelLoadPropLockDoor(struct LockDoorRecord *arg0);
|
||||
void initSetLevelLoadPropSafeItem(struct ObjectRecord *arg0);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,12 +1,333 @@
|
||||
#include <ultra64.h>
|
||||
#include "initpathtablelinks.h"
|
||||
|
||||
#include "padhalllv.h"
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void init_path_table_links(void) {
|
||||
|
||||
/***
|
||||
* Ryan spent a few minutes looking at this and left some notes about what this function does:
|
||||
*
|
||||
* var_s6 is an "error" variable. If set anywhere, the function goes into an infinite loop at the end.
|
||||
* The first outer loop appears to be verifying that the waypoints don't list themselves as their own neighbour.
|
||||
* The second outer loop appears to do the same but for waygroups. It also calls sub_GAME_7F08F438, which is a more simple version of PD's waypointFindSegmentIntoGroup, so it's likely verifying that there is a waypoint path between this group and each neighbour.
|
||||
* The third outer loop is iterating waygroups, then iterating each group's waypoints, and assigning each waypoint's groupNum if it's less than 0. If a value is stored and it's wrong, the error variable is set.
|
||||
* The fourth outer loop is checking that all waypoints have a groupNum assigned.
|
||||
* The fifth outer loop I'm not sure about without actually decompiling it and naming stuff. It appears to be using the waypoint->dist property temporary so it can validate something. If it doesn't like it then the error variable is set.
|
||||
* The final outer loop is the infinite loop which occurs if the error variable is true.
|
||||
*/
|
||||
|
||||
/**
|
||||
* NTSC address 0x7F006890.
|
||||
* https://decomp.me/scratch/nSCDd 40.03%
|
||||
*/
|
||||
void init_path_table_links(void)
|
||||
{
|
||||
waypoint *spA0;
|
||||
waypoint *sp9C;
|
||||
|
||||
s32 var_s6;
|
||||
waypoint *temp_s0;
|
||||
waygroup *spD8;
|
||||
|
||||
waypoint *var_t5;
|
||||
s32 var_v0_2;
|
||||
s32 var_s3;
|
||||
s32 var_s1;
|
||||
s32 *temp_a2;
|
||||
s32 var_a1;
|
||||
s32 var_a3;
|
||||
s32 *temp_v0;
|
||||
s32 var_a0;
|
||||
s32 *temp_v1;
|
||||
s32 var_t1;
|
||||
s32 *var_v1_3;
|
||||
waypoint *temp_a1_2;
|
||||
s32 temp_a2_2;
|
||||
waygroup *var_t3;
|
||||
s32 *var_v0_4;
|
||||
s32 var_a3_2;
|
||||
waypoint *var_a2_2;
|
||||
s32 var_t4;
|
||||
s32 var_t0_2;
|
||||
s32 var_t1_2;
|
||||
s32 var_v0_5;
|
||||
s32 var_v1_4;
|
||||
s32 var_t1_3;
|
||||
waypoint *temp_a2_3;
|
||||
s32 var_v1_5;
|
||||
s32 var_v0_6;
|
||||
|
||||
var_s6 = 0;
|
||||
|
||||
temp_s0 = g_CurrentSetup.pathwaypoints;
|
||||
spD8 = g_CurrentSetup.waypointgroups;
|
||||
|
||||
if (temp_s0 != NULL)
|
||||
{
|
||||
var_a3 = 0;
|
||||
|
||||
var_t5 = temp_s0;
|
||||
while (var_t5->padID >= 0)
|
||||
{
|
||||
temp_v0 = var_t5->neighbours;
|
||||
|
||||
while (*temp_v0 >= 0)
|
||||
{
|
||||
if (*temp_v0 == var_a3)
|
||||
{
|
||||
var_s6 = 1;
|
||||
if (g_CurrentSetup.padnames != NULL)
|
||||
{
|
||||
// removed
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a0 = 0;
|
||||
|
||||
temp_v1 = temp_s0[*temp_v0].neighbours;
|
||||
|
||||
while (*temp_v1 >= 0)
|
||||
{
|
||||
var_a0++;
|
||||
|
||||
if (var_a3 != *temp_v1)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (var_a3 != temp_s0[*temp_v0].neighbours[var_a0])
|
||||
{
|
||||
var_s6 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
temp_v0++;
|
||||
}
|
||||
|
||||
var_a3++;
|
||||
var_t5 = &temp_s0[var_a3];
|
||||
}
|
||||
}
|
||||
|
||||
if (spD8 != NULL)
|
||||
{
|
||||
var_s1 = 0;
|
||||
|
||||
var_s3 = 0;
|
||||
var_v0_2 = spD8->neighbours[var_s3];
|
||||
|
||||
while (var_v0_2 >= 0)
|
||||
{
|
||||
if (var_v0_2 == var_s1)
|
||||
{
|
||||
var_s6 = 1;
|
||||
if (g_CurrentSetup.boundpadnames != NULL)
|
||||
{
|
||||
// removed
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a1 = 0;
|
||||
temp_a2 = &spD8->neighbours[var_v0_2];
|
||||
|
||||
while (*temp_a2 >= 0)
|
||||
{
|
||||
var_a1++;
|
||||
|
||||
if (var_s1 != *temp_a2)
|
||||
{
|
||||
temp_a2++;
|
||||
continue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if (var_s1 != temp_a2[var_a1])
|
||||
{
|
||||
var_s6 = 1;
|
||||
if (g_CurrentSetup.boundpadnames != NULL)
|
||||
{
|
||||
// removed
|
||||
}
|
||||
}
|
||||
else if (g_CurrentSetup.pathwaypoints != NULL)
|
||||
{
|
||||
sub_GAME_7F08F438(spD8, &spD8[var_v0_2], &spA0, &sp9C);
|
||||
|
||||
if (spA0 == NULL || sp9C == NULL)
|
||||
{
|
||||
var_s6 = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var_s3++;
|
||||
var_v0_2 = spD8->neighbours[var_s3];
|
||||
}
|
||||
}
|
||||
|
||||
if ((temp_s0 != NULL) && (spD8 != NULL))
|
||||
{
|
||||
var_t1 = 0;
|
||||
|
||||
var_t3 = spD8;
|
||||
while (var_t3 != NULL)
|
||||
{
|
||||
if (var_t3->neighbours != NULL)
|
||||
{
|
||||
var_a3_2 = 0;
|
||||
var_v1_3 = var_t3->waypoints;
|
||||
while (*var_v1_3 >= 0)
|
||||
{
|
||||
temp_a1_2 = &temp_s0[*var_v1_3];
|
||||
temp_a2_2 = temp_a1_2->groupNum;
|
||||
|
||||
if (temp_a2_2 < 0)
|
||||
{
|
||||
temp_a1_2->groupNum = var_t1;
|
||||
var_v0_4 = &var_t3->waypoints[var_a3_2];
|
||||
}
|
||||
else
|
||||
{
|
||||
var_v0_4 = &var_t3->waypoints[var_a3_2];
|
||||
if (var_t1 != temp_a2_2)
|
||||
{
|
||||
var_s6 = 1;
|
||||
}
|
||||
}
|
||||
|
||||
var_a3_2++;
|
||||
|
||||
var_v1_3 = var_v0_4 + 1;
|
||||
}
|
||||
|
||||
var_t1 = 0;
|
||||
}
|
||||
|
||||
var_t3++;
|
||||
}
|
||||
|
||||
var_a2_2 = temp_s0;
|
||||
while (var_a2_2->padID >= 0)
|
||||
{
|
||||
var_a2_2 = &temp_s0[var_t1];
|
||||
if (var_a2_2->groupNum < 0)
|
||||
{
|
||||
var_s6 = 1;
|
||||
}
|
||||
var_t1++;
|
||||
}
|
||||
|
||||
if (spD8->neighbours != NULL)
|
||||
{
|
||||
var_t3 = spD8;
|
||||
|
||||
|
||||
while (var_t3 != NULL)
|
||||
{
|
||||
var_v1_4 = 0;
|
||||
var_t0_2 = 0;
|
||||
var_t4 = 0;
|
||||
var_t1_2 = 0;
|
||||
|
||||
var_v0_5 = *var_t3->waypoints;
|
||||
while (var_v0_5 >= 0)
|
||||
{
|
||||
if (var_t1_2 == 0)
|
||||
{
|
||||
temp_s0[var_v0_5].dist = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_s0[var_v0_5].dist = 0;
|
||||
}
|
||||
|
||||
var_v0_5 = var_t3->waypoints[var_t1_2];
|
||||
var_t1_2++;
|
||||
}
|
||||
|
||||
// loop_57
|
||||
var_t1_3 = 0;
|
||||
var_v0_5 = var_t3->waypoints[var_t1_3];
|
||||
while (var_v0_5 >= 0)
|
||||
{
|
||||
temp_a2_3 = &temp_s0[var_v0_5];
|
||||
|
||||
if (temp_a2_3->dist == 1)
|
||||
{
|
||||
var_v1_5 = 0;
|
||||
var_v0_6 = temp_a2_3->neighbours[var_v1_5];
|
||||
while (var_v0_6 >= 0) //var_v0_6 >= 0
|
||||
{
|
||||
if (temp_s0[var_v0_6].dist != 1)
|
||||
{
|
||||
temp_s0[var_v0_6].dist = 1;
|
||||
var_t0_2 = 1;
|
||||
}
|
||||
|
||||
var_v1_5++;
|
||||
var_v0_6 = temp_a2_3->neighbours[var_v1_5];
|
||||
}
|
||||
}
|
||||
|
||||
var_v0_5 = var_t3->waypoints[var_t1_3];
|
||||
}
|
||||
|
||||
// loop_67
|
||||
var_v0_5 = *var_t3->waypoints;
|
||||
while (var_v0_5 >= 0) // var_v0_5 >= 0
|
||||
{
|
||||
var_v1_4++;
|
||||
if (temp_s0[var_v0_5].dist != 1)
|
||||
{
|
||||
var_t4 = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
var_v0_5 = var_t3->waypoints[var_v1_4];
|
||||
}
|
||||
|
||||
//var_v1_4 = 0;
|
||||
if (var_t0_2 != 0)
|
||||
{
|
||||
//var_v0_5 = var_a1_2;
|
||||
if (var_t4 != 0)
|
||||
{
|
||||
//var_t0_2 = 0;
|
||||
//var_t4 = 0;
|
||||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (var_t4 != 0)
|
||||
{
|
||||
var_s6 = 1;
|
||||
|
||||
if (g_CurrentSetup.boundpadnames != NULL)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
var_t3++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (var_s6 != 0)
|
||||
{
|
||||
while(1);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
|
||||
@@ -3,90 +3,33 @@
|
||||
#include "stan.h"
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
typedef coord3d_s32 {
|
||||
s32 x;
|
||||
s32 y;
|
||||
s32 z;
|
||||
};
|
||||
s32 init_pathtable_something( coord3d_s32 *tilepos, u8 *tilename, StandTilePoint *tilestack)
|
||||
/**
|
||||
* NTSC address 0x7F0067C0.
|
||||
*/
|
||||
s32 init_pathtable_something(struct PadRecord *pad, char *tilename, struct StandTile **tile_stack)
|
||||
{
|
||||
coord3d coord;
|
||||
|
||||
struct coord3d coord;
|
||||
|
||||
tilestack = stanMatchTileName(tilename);
|
||||
if ((tilestack == 0) || (isPointInsideTriStandTileUnscaled_Maybe(tilestack, tilepos->x, tilepos->z) == 0))
|
||||
*tile_stack = stanMatchTileName(tilename);
|
||||
|
||||
if ((*tile_stack == NULL) || (isPointInsideTriStandTileUnscaled_Maybe(*tile_stack, pad->pos.f[0], pad->pos.f[2]) == 0))
|
||||
{
|
||||
tilestack = sub_GAME_7F0AFB78(coord.x, coord.y, coord.z, 0);
|
||||
if ((tilestack != 0) && (walkTilesBetweenPoints_NoCallback(tilestack, tilepos->x, tilepos->z, tilepos->x, tilepos->z) != 0))
|
||||
coord.f[0] = pad->pos.f[0];
|
||||
coord.f[1] = pad->pos.f[1];
|
||||
coord.f[2] = pad->pos.f[2];
|
||||
|
||||
*tile_stack = sub_GAME_7F0AFB78(&coord.f[0], &coord.f[1], &coord.f[2], 0);
|
||||
|
||||
if ((*tile_stack != NULL) && (walkTilesBetweenPoints_NoCallback(tile_stack, coord.f[0], coord.f[2], pad->pos.f[0], pad->pos.f[2]) != 0))
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
tilestack = 0;
|
||||
|
||||
*tile_stack = NULL;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel init_pathtable_something
|
||||
/* 03B2F0 7F0067C0 27BDFFC8 */ addiu $sp, $sp, -0x38
|
||||
/* 03B2F4 7F0067C4 AFB0001C */ sw $s0, 0x1c($sp)
|
||||
/* 03B2F8 7F0067C8 00808025 */ move $s0, $a0
|
||||
/* 03B2FC 7F0067CC AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 03B300 7F0067D0 AFB10020 */ sw $s1, 0x20($sp)
|
||||
/* 03B304 7F0067D4 00C08825 */ move $s1, $a2
|
||||
/* 03B308 7F0067D8 0FC2CB96 */ jal stanMatchTileName
|
||||
/* 03B30C 7F0067DC 00A02025 */ move $a0, $a1
|
||||
/* 03B310 7F0067E0 10400007 */ beqz $v0, .L7F006800
|
||||
/* 03B314 7F0067E4 AE220000 */ sw $v0, ($s1)
|
||||
/* 03B318 7F0067E8 00402025 */ move $a0, $v0
|
||||
/* 03B31C 7F0067EC 8E050000 */ lw $a1, ($s0)
|
||||
/* 03B320 7F0067F0 0FC2C0DB */ jal isPointInsideTriStandTileUnscaled_Maybe
|
||||
/* 03B324 7F0067F4 8E060008 */ lw $a2, 8($s0)
|
||||
/* 03B328 7F0067F8 5440001D */ bnezl $v0, .L7F006870
|
||||
/* 03B32C 7F0067FC 24020001 */ li $v0, 1
|
||||
.L7F006800:
|
||||
/* 03B330 7F006800 C6040000 */ lwc1 $f4, ($s0)
|
||||
/* 03B334 7F006804 27A4002C */ addiu $a0, $sp, 0x2c
|
||||
/* 03B338 7F006808 27A50030 */ addiu $a1, $sp, 0x30
|
||||
/* 03B33C 7F00680C E7A4002C */ swc1 $f4, 0x2c($sp)
|
||||
/* 03B340 7F006810 C6060004 */ lwc1 $f6, 4($s0)
|
||||
/* 03B344 7F006814 27A60034 */ addiu $a2, $sp, 0x34
|
||||
/* 03B348 7F006818 24070000 */ li $a3, 0
|
||||
/* 03B34C 7F00681C E7A60030 */ swc1 $f6, 0x30($sp)
|
||||
/* 03B350 7F006820 C6080008 */ lwc1 $f8, 8($s0)
|
||||
/* 03B354 7F006824 0FC2BEDE */ jal sub_GAME_7F0AFB78
|
||||
/* 03B358 7F006828 E7A80034 */ swc1 $f8, 0x34($sp)
|
||||
/* 03B35C 7F00682C 1040000C */ beqz $v0, .L7F006860
|
||||
/* 03B360 7F006830 AE220000 */ sw $v0, ($s1)
|
||||
/* 03B364 7F006834 C60A0008 */ lwc1 $f10, 8($s0)
|
||||
/* 03B368 7F006838 8E070000 */ lw $a3, ($s0)
|
||||
/* 03B36C 7F00683C 02202025 */ move $a0, $s1
|
||||
/* 03B370 7F006840 8FA5002C */ lw $a1, 0x2c($sp)
|
||||
/* 03B374 7F006844 8FA60034 */ lw $a2, 0x34($sp)
|
||||
/* 03B378 7F006848 0FC2C2F9 */ jal walkTilesBetweenPoints_NoCallback
|
||||
/* 03B37C 7F00684C E7AA0010 */ swc1 $f10, 0x10($sp)
|
||||
/* 03B380 7F006850 50400004 */ beql $v0, $zero, .L7F006864
|
||||
/* 03B384 7F006854 AE200000 */ sw $zero, ($s1)
|
||||
/* 03B388 7F006858 10000005 */ b .L7F006870
|
||||
/* 03B38C 7F00685C 24020002 */ li $v0, 2
|
||||
.L7F006860:
|
||||
/* 03B390 7F006860 AE200000 */ sw $zero, ($s1)
|
||||
.L7F006864:
|
||||
/* 03B394 7F006864 10000002 */ b .L7F006870
|
||||
/* 03B398 7F006868 00001025 */ move $v0, $zero
|
||||
/* 03B39C 7F00686C 24020001 */ li $v0, 1
|
||||
.L7F006870:
|
||||
/* 03B3A0 7F006870 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 03B3A4 7F006874 8FB0001C */ lw $s0, 0x1c($sp)
|
||||
/* 03B3A8 7F006878 8FB10020 */ lw $s1, 0x20($sp)
|
||||
/* 03B3AC 7F00687C 03E00008 */ jr $ra
|
||||
/* 03B3B0 7F006880 27BD0038 */ addiu $sp, $sp, 0x38
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@
|
||||
#define _INITPATHTABLESOMETHING_H_
|
||||
#include <ultra64.h>
|
||||
|
||||
void init_pathtable_something(void);
|
||||
s32 init_pathtable_something(struct PadRecord *pad, char *tilename, struct StandTile **tile_stack);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include <ultra64.h>
|
||||
#include "objecthandler.h"
|
||||
|
||||
void sub_GAME_7F0009E0(struct bondstruct_unk_animation_related* arg0, OSMesgQueue* mq, s32 arg2) {
|
||||
D_80036414 = arg0;
|
||||
D_80036418 = mq;
|
||||
D_8003641C = arg2;
|
||||
void sub_GAME_7F0009E0(struct bondstruct_unk_animation_related* animBuffer, OSMesgQueue* mq, s32 unused) {
|
||||
D_80036414 = animBuffer; // Data structure with offset and two tables
|
||||
D_80036418 = mq; // Unused message queue
|
||||
D_8003641C = unused; // Some unused array
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,41 @@
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F005450(void) {
|
||||
struct unk_7F005450
|
||||
{
|
||||
s32 unk00;
|
||||
s32 unk04;
|
||||
s32 unk08;
|
||||
s32 unk0c; // prev struct unk_7F005450 ?
|
||||
|
||||
s32 unk10; // next struct unk_7F005450 ?
|
||||
};
|
||||
|
||||
#define D80076A50_LEN 600
|
||||
|
||||
extern struct unk_7F005450 *D_80036060;
|
||||
|
||||
struct unk_7F005450 dword_CODE_bss_80076A50[D80076A50_LEN];
|
||||
|
||||
// There's some loop unrolling, and the type for D_80036060 / dword_CODE_bss_80076A50 isn't known.
|
||||
//
|
||||
// https://decomp.me/scratch/W8anf 69%
|
||||
void sub_GAME_7F005450(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
D_80036060 = dword_CODE_bss_80076A50;
|
||||
|
||||
for (i = 0; i < D80076A50_LEN - 2; i++)
|
||||
{
|
||||
dword_CODE_bss_80076A50[i].unk04 = &dword_CODE_bss_80076A50[i+2].unk00;
|
||||
dword_CODE_bss_80076A50[i].unk0c = &dword_CODE_bss_80076A50[i+2].unk00;
|
||||
dword_CODE_bss_80076A50[i].unk10 = &dword_CODE_bss_80076A50[i+2].unk00;
|
||||
}
|
||||
|
||||
// target: t8,t8,%lo(dword_CODE_bss_80079908)
|
||||
// current: t7,t7,%lo(dword_CODE_bss_80076A50+0x2eb8) ----> 0x80076A50 + 0x2eb8 == 0x80079908
|
||||
dword_CODE_bss_80076A50[599].unk10 = &dword_CODE_bss_80076A50[598].unk00;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
|
||||
+54
-143
@@ -1,7 +1,8 @@
|
||||
#include <ultra64.h>
|
||||
#include <memp.h>
|
||||
#include "initunk_005520.h"
|
||||
|
||||
#include "objecthandler.h"
|
||||
#include "memp.h"
|
||||
|
||||
extern s32 D_80036070;
|
||||
extern s32 D_80036074;
|
||||
@@ -20,151 +21,61 @@ void set_contents_of_80036078(s32 arg0) {
|
||||
|
||||
//this may be a file split
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F005540(void) {
|
||||
/**
|
||||
* NTSC address 0x7F005540.
|
||||
*/
|
||||
void sub_GAME_7F005540(s32 arg0)
|
||||
{
|
||||
s32 temp_t6;
|
||||
s32 var_s1;
|
||||
|
||||
D_80036074 = arg0 + 30;
|
||||
|
||||
ptr_allocation_1 = mempAllocBytesInBank(D_80036074 * sizeof(struct ptr_1_s), MEMPOOL_STAGE);
|
||||
|
||||
for (var_s1 = 0; var_s1 < D_80036074; var_s1++)
|
||||
{
|
||||
ptr_allocation_1[var_s1].unk08 = 0;
|
||||
|
||||
if (var_s1 < arg0)
|
||||
{
|
||||
ptr_allocation_1[var_s1].unk10 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_allocation_1[var_s1].unk10 = mempAllocBytesInBank(0x50, MEMPOOL_STAGE);
|
||||
ptr_allocation_1[var_s1].unk02 = 0x14;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F005540
|
||||
/* 03A070 7F005540 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 03A074 7F005544 AFB40024 */ sw $s4, 0x24($sp)
|
||||
/* 03A078 7F005548 3C148003 */ lui $s4, %hi(D_80036074)
|
||||
/* 03A07C 7F00554C AFB50028 */ sw $s5, 0x28($sp)
|
||||
/* 03A080 7F005550 0080A825 */ move $s5, $a0
|
||||
/* 03A084 7F005554 26946074 */ addiu $s4, %lo(D_80036074) # addiu $s4, $s4, 0x6074
|
||||
/* 03A088 7F005558 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 03A08C 7F00555C 248E001E */ addiu $t6, $a0, 0x1e
|
||||
/* 03A090 7F005560 AFB30020 */ sw $s3, 0x20($sp)
|
||||
/* 03A094 7F005564 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* 03A098 7F005568 AFB10018 */ sw $s1, 0x18($sp)
|
||||
/* 03A09C 7F00556C AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* 03A0A0 7F005570 AE8E0000 */ sw $t6, ($s4)
|
||||
/* 03A0A4 7F005574 000E2140 */ sll $a0, $t6, 5
|
||||
/* 03A0A8 7F005578 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 03A0AC 7F00557C 24050004 */ li $a1, 4
|
||||
/* 03A0B0 7F005580 8E980000 */ lw $t8, ($s4)
|
||||
/* 03A0B4 7F005584 3C128008 */ lui $s2, %hi(ptr_allocation_1)
|
||||
/* 03A0B8 7F005588 26529934 */ addiu $s2, %lo(ptr_allocation_1) # addiu $s2, $s2, -0x66cc
|
||||
/* 03A0BC 7F00558C AE420000 */ sw $v0, ($s2)
|
||||
/* 03A0C0 7F005590 1B00001B */ blez $t8, .L7F005600
|
||||
/* 03A0C4 7F005594 00008825 */ move $s1, $zero
|
||||
/* 03A0C8 7F005598 00008025 */ move $s0, $zero
|
||||
/* 03A0CC 7F00559C 24130014 */ li $s3, 20
|
||||
/* 03A0D0 7F0055A0 8E590000 */ lw $t9, ($s2)
|
||||
.L7F0055A4:
|
||||
/* 03A0D4 7F0055A4 0235082A */ slt $at, $s1, $s5
|
||||
/* 03A0D8 7F0055A8 24040050 */ li $a0, 80
|
||||
/* 03A0DC 7F0055AC 03304021 */ addu $t0, $t9, $s0
|
||||
/* 03A0E0 7F0055B0 10200005 */ beqz $at, .L7F0055C8
|
||||
/* 03A0E4 7F0055B4 AD000008 */ sw $zero, 8($t0)
|
||||
/* 03A0E8 7F0055B8 8E490000 */ lw $t1, ($s2)
|
||||
/* 03A0EC 7F0055BC 01305021 */ addu $t2, $t1, $s0
|
||||
/* 03A0F0 7F0055C0 10000009 */ b .L7F0055E8
|
||||
/* 03A0F4 7F0055C4 AD400010 */ sw $zero, 0x10($t2)
|
||||
.L7F0055C8:
|
||||
/* 03A0F8 7F0055C8 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 03A0FC 7F0055CC 24050004 */ li $a1, 4
|
||||
/* 03A100 7F0055D0 8E4B0000 */ lw $t3, ($s2)
|
||||
/* 03A104 7F0055D4 01706021 */ addu $t4, $t3, $s0
|
||||
/* 03A108 7F0055D8 AD820010 */ sw $v0, 0x10($t4)
|
||||
/* 03A10C 7F0055DC 8E4D0000 */ lw $t5, ($s2)
|
||||
/* 03A110 7F0055E0 01B07021 */ addu $t6, $t5, $s0
|
||||
/* 03A114 7F0055E4 A5D30002 */ sh $s3, 2($t6)
|
||||
.L7F0055E8:
|
||||
/* 03A118 7F0055E8 8E8F0000 */ lw $t7, ($s4)
|
||||
/* 03A11C 7F0055EC 26310001 */ addiu $s1, $s1, 1
|
||||
/* 03A120 7F0055F0 26100020 */ addiu $s0, $s0, 0x20
|
||||
/* 03A124 7F0055F4 022F082A */ slt $at, $s1, $t7
|
||||
/* 03A128 7F0055F8 5420FFEA */ bnezl $at, .L7F0055A4
|
||||
/* 03A12C 7F0055FC 8E590000 */ lw $t9, ($s2)
|
||||
.L7F005600:
|
||||
/* 03A130 7F005600 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 03A134 7F005604 8FB00014 */ lw $s0, 0x14($sp)
|
||||
/* 03A138 7F005608 8FB10018 */ lw $s1, 0x18($sp)
|
||||
/* 03A13C 7F00560C 8FB2001C */ lw $s2, 0x1c($sp)
|
||||
/* 03A140 7F005610 8FB30020 */ lw $s3, 0x20($sp)
|
||||
/* 03A144 7F005614 8FB40024 */ lw $s4, 0x24($sp)
|
||||
/* 03A148 7F005618 8FB50028 */ lw $s5, 0x28($sp)
|
||||
/* 03A14C 7F00561C 03E00008 */ jr $ra
|
||||
/* 03A150 7F005620 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F005624(void) {
|
||||
/**
|
||||
* NTSC address 0x7F005540.
|
||||
*/
|
||||
void sub_GAME_7F005624(s32 arg0)
|
||||
{
|
||||
s32 temp_t6;
|
||||
s32 var_s1;
|
||||
|
||||
D_80036070 = arg0 + 10;
|
||||
|
||||
// mips2c says: ptr_allocation_0 = mempAllocBytesInBank(temp_t6 * 0xC0, 4);
|
||||
// however, the pointer is incremented by 0xbc in the loop below.
|
||||
ptr_allocation_0 = mempAllocBytesInBank(D_80036070 * (4 + sizeof(struct ptr_0_s)), MEMPOOL_STAGE);
|
||||
|
||||
for (var_s1 = 0; var_s1 < D_80036070; var_s1++)
|
||||
{
|
||||
ptr_allocation_0[var_s1].unk08 = 0;
|
||||
|
||||
if (var_s1 < arg0)
|
||||
{
|
||||
ptr_allocation_0[var_s1].unk10 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
ptr_allocation_0[var_s1].unk10 = mempAllocBytesInBank(0x230, MEMPOOL_STAGE);
|
||||
ptr_allocation_0[var_s1].unk02 = 0x8c;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F005624
|
||||
/* 03A154 7F005624 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 03A158 7F005628 AFB40024 */ sw $s4, 0x24($sp)
|
||||
/* 03A15C 7F00562C 248E000A */ addiu $t6, $a0, 0xa
|
||||
/* 03A160 7F005630 3C148003 */ lui $s4, %hi(D_80036070)
|
||||
/* 03A164 7F005634 AFB50028 */ sw $s5, 0x28($sp)
|
||||
/* 03A168 7F005638 000E7880 */ sll $t7, $t6, 2
|
||||
/* 03A16C 7F00563C 0080A825 */ move $s5, $a0
|
||||
/* 03A170 7F005640 26946070 */ addiu $s4, %lo(D_80036070) # addiu $s4, $s4, 0x6070
|
||||
/* 03A174 7F005644 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 03A178 7F005648 01EE7823 */ subu $t7, $t7, $t6
|
||||
/* 03A17C 7F00564C AFB30020 */ sw $s3, 0x20($sp)
|
||||
/* 03A180 7F005650 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* 03A184 7F005654 AFB10018 */ sw $s1, 0x18($sp)
|
||||
/* 03A188 7F005658 AFB00014 */ sw $s0, 0x14($sp)
|
||||
/* 03A18C 7F00565C AE8E0000 */ sw $t6, ($s4)
|
||||
/* 03A190 7F005660 000F2180 */ sll $a0, $t7, 6
|
||||
/* 03A194 7F005664 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 03A198 7F005668 24050004 */ li $a1, 4
|
||||
/* 03A19C 7F00566C 8E980000 */ lw $t8, ($s4)
|
||||
/* 03A1A0 7F005670 3C128008 */ lui $s2, %hi(ptr_allocation_0)
|
||||
/* 03A1A4 7F005674 26529930 */ addiu $s2, %lo(ptr_allocation_0) # addiu $s2, $s2, -0x66d0
|
||||
/* 03A1A8 7F005678 AE420000 */ sw $v0, ($s2)
|
||||
/* 03A1AC 7F00567C 1B00001B */ blez $t8, .L7F0056EC
|
||||
/* 03A1B0 7F005680 00008825 */ move $s1, $zero
|
||||
/* 03A1B4 7F005684 00008025 */ move $s0, $zero
|
||||
/* 03A1B8 7F005688 2413008C */ li $s3, 140
|
||||
/* 03A1BC 7F00568C 8E590000 */ lw $t9, ($s2)
|
||||
.L7F005690:
|
||||
/* 03A1C0 7F005690 0235082A */ slt $at, $s1, $s5
|
||||
/* 03A1C4 7F005694 24040230 */ li $a0, 560
|
||||
/* 03A1C8 7F005698 03304021 */ addu $t0, $t9, $s0
|
||||
/* 03A1CC 7F00569C 10200005 */ beqz $at, .L7F0056B4
|
||||
/* 03A1D0 7F0056A0 AD000008 */ sw $zero, 8($t0)
|
||||
/* 03A1D4 7F0056A4 8E490000 */ lw $t1, ($s2)
|
||||
/* 03A1D8 7F0056A8 01305021 */ addu $t2, $t1, $s0
|
||||
/* 03A1DC 7F0056AC 10000009 */ b .L7F0056D4
|
||||
/* 03A1E0 7F0056B0 AD400010 */ sw $zero, 0x10($t2)
|
||||
.L7F0056B4:
|
||||
/* 03A1E4 7F0056B4 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 03A1E8 7F0056B8 24050004 */ li $a1, 4
|
||||
/* 03A1EC 7F0056BC 8E4B0000 */ lw $t3, ($s2)
|
||||
/* 03A1F0 7F0056C0 01706021 */ addu $t4, $t3, $s0
|
||||
/* 03A1F4 7F0056C4 AD820010 */ sw $v0, 0x10($t4)
|
||||
/* 03A1F8 7F0056C8 8E4D0000 */ lw $t5, ($s2)
|
||||
/* 03A1FC 7F0056CC 01B07021 */ addu $t6, $t5, $s0
|
||||
/* 03A200 7F0056D0 A5D30002 */ sh $s3, 2($t6)
|
||||
.L7F0056D4:
|
||||
/* 03A204 7F0056D4 8E8F0000 */ lw $t7, ($s4)
|
||||
/* 03A208 7F0056D8 26310001 */ addiu $s1, $s1, 1
|
||||
/* 03A20C 7F0056DC 261000BC */ addiu $s0, $s0, 0xbc
|
||||
/* 03A210 7F0056E0 022F082A */ slt $at, $s1, $t7
|
||||
/* 03A214 7F0056E4 5420FFEA */ bnezl $at, .L7F005690
|
||||
/* 03A218 7F0056E8 8E590000 */ lw $t9, ($s2)
|
||||
.L7F0056EC:
|
||||
/* 03A21C 7F0056EC 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 03A220 7F0056F0 8FB00014 */ lw $s0, 0x14($sp)
|
||||
/* 03A224 7F0056F4 8FB10018 */ lw $s1, 0x18($sp)
|
||||
/* 03A228 7F0056F8 8FB2001C */ lw $s2, 0x1c($sp)
|
||||
/* 03A22C 7F0056FC 8FB30020 */ lw $s3, 0x20($sp)
|
||||
/* 03A230 7F005700 8FB40024 */ lw $s4, 0x24($sp)
|
||||
/* 03A234 7F005704 8FB50028 */ lw $s5, 0x28($sp)
|
||||
/* 03A238 7F005708 03E00008 */ jr $ra
|
||||
/* 03A23C 7F00570C 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,7 @@ Vtx * return_ptr_vertex_of_entry_room(Gfx * gfx, s32 room_index)
|
||||
|
||||
// weird memory checking, not sure what's going on here
|
||||
if (((s32) ret & 0xFF000000) == 0x0E000000) {
|
||||
ret = (s32)array_room_info[room_index].ptr_point_index + ((s32) ret & 0xFFFFFF);
|
||||
ret = (s32)g_BgRoomInfo[room_index].ptr_point_index + ((s32) ret & 0xFFFFFF);
|
||||
}
|
||||
|
||||
return ret;
|
||||
@@ -185,7 +185,7 @@ void redarken_lights_in_room(s32 room_index)
|
||||
s32 i;
|
||||
struct s_darkened_light* unk;
|
||||
|
||||
vertex = array_room_info[room_index].ptr_point_index;
|
||||
vertex = g_BgRoomInfo[room_index].ptr_point_index;
|
||||
|
||||
for (i = 0; i < DARKENED_LIGHT_TABLE_MAX; i++)
|
||||
{
|
||||
@@ -208,7 +208,7 @@ void darken_vertex_in_room(Vtx * vertex, s32 room_index)
|
||||
if (darkened_light_table_contains_vertex(vertex, room_index) != 0) { return; }
|
||||
|
||||
// weird memory stuff going on here
|
||||
vtx_index = ((u32)vertex - (u32)array_room_info[room_index].ptr_point_index) >> 4;
|
||||
vtx_index = ((u32)vertex - (u32)g_BgRoomInfo[room_index].ptr_point_index) >> 4;
|
||||
|
||||
darkened_light_table[cur_entry_darkened_light_table].room_index = (u16) room_index;
|
||||
darkened_light_table[cur_entry_darkened_light_table].vtx_index = vtx_index;
|
||||
@@ -233,7 +233,7 @@ s32 darkened_light_table_contains_vertex(Vtx * vertex, s32 room_index)
|
||||
s32 i;
|
||||
|
||||
// weird memory stuff going on here
|
||||
vtx_index = ((u32)vertex - (u32)array_room_info[room_index].ptr_point_index) >> 4;
|
||||
vtx_index = ((u32)vertex - (u32)g_BgRoomInfo[room_index].ptr_point_index) >> 4;
|
||||
|
||||
for (i = 0; i < DARKENED_LIGHT_TABLE_MAX; i++)
|
||||
{
|
||||
@@ -298,7 +298,7 @@ s32 sub_GAME_7F0BBCCC(coord16 * coord, s32 room_index)
|
||||
{
|
||||
if (room_index == darkened_light_table[i].room_index)
|
||||
{
|
||||
vertex = &array_room_info[room_index].ptr_point_index[darkened_light_table[i].vtx_index];
|
||||
vertex = &g_BgRoomInfo[room_index].ptr_point_index[darkened_light_table[i].vtx_index];
|
||||
|
||||
var_s0 = vertex->v.ob[0] - coord->AsArray[0];
|
||||
var_s1 = vertex->v.ob[1] - coord->AsArray[1];
|
||||
@@ -382,7 +382,7 @@ void sub_GAME_7F0BBE0C(Gfx * gfx, u32 tri_type, s32 room_index)
|
||||
dist_nn = sqrtf((diff_x_13 * diff_x_13) + (diff_y_13 * diff_y_13) + (diff_z_13 * diff_z_13));
|
||||
inv_dist_13 = 10.0f / (get_room_data_float2() * dist_nn);
|
||||
|
||||
sub_GAME_7F0BCA34(light_fixture_table[i].room_index, &origin);
|
||||
getRoomPositionScaledByIndex(light_fixture_table[i].room_index, &origin);
|
||||
|
||||
for (dist_tween = 0.0f; dist_tween < 1.0f; dist_tween += inv_dist_12)
|
||||
{
|
||||
|
||||
+25
-15
@@ -8,31 +8,38 @@
|
||||
|
||||
/**
|
||||
* Address 0x7F056850.
|
||||
* @brief getposstan
|
||||
*/
|
||||
s32 sub_GAME_7F056850(PadRecord *arg0, StandTile *arg1, f32 arg2, PadRecord *arg3, StandTile **arg4)
|
||||
s32 sub_GAME_7F056850(struct coord3d *arg0, StandTile *arg1, f32 arg2, struct coord3d *arg3, StandTile **arg4)
|
||||
{
|
||||
arg3->pos.f[0] = arg0->pos.f[0];
|
||||
arg3->pos.f[1] = arg0->pos.f[1];
|
||||
arg3->pos.f[2] = arg0->pos.f[2];
|
||||
|
||||
arg3->f[0] = arg0->f[0];
|
||||
arg3->f[1] = arg0->f[1];
|
||||
arg3->f[2] = arg0->f[2];
|
||||
|
||||
*arg4 = arg1;
|
||||
|
||||
|
||||
if (arg1 == 0)
|
||||
{
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("getposstan: no stan!\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((arg2 > 0.0f) && (stanTestVolume(arg4, arg3->pos.f[0], arg3->pos.f[2], arg2, 0x1F, 0.0f, 1.0f) >= 0))
|
||||
|
||||
if ((arg2 > 0.0f) && (stanTestVolume(arg4, arg3->f[0], arg3->f[2], arg2, CDTYPE_OBJS | CDTYPE_DOORS | CDTYPE_PLAYERS | CDTYPE_CHRS | CDTYPE_PATHBLOCKER, 0.0f, 1.0f) >= 0))
|
||||
{
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("getposstan: circle not legal!\n");
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//Todo: finish this func
|
||||
/**
|
||||
* Get Size of Prop Definition
|
||||
* Get Size of Prop Definition
|
||||
* @param pdef: Prop Defenition to get size of
|
||||
* @return Size of prop in Words (32bit)
|
||||
*/
|
||||
@@ -129,6 +136,9 @@ s32 sizepropdef(PropDefHeaderRecord *pdef)
|
||||
case PROPDEF_CAMERAPOS:
|
||||
return 7;//return sizeof(GlassRecord) / 4;
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("sizepropdef: unknown prop def type %d!!\n",pdef->type);
|
||||
#endif
|
||||
return sizeof(PropDefHeaderRecord) / 4;;
|
||||
}
|
||||
}
|
||||
@@ -222,9 +232,9 @@ s32 setupGetCommandIndexByProp(struct PropRecord *prop)
|
||||
|
||||
s32 modelLoad(s32 modelid)
|
||||
{
|
||||
if (PitemZ_entries[modelid].header->RootNode == NULL)
|
||||
if (PitemZ_entries[modelid].header->RootNode == NULL)
|
||||
{
|
||||
fileLoad(PitemZ_entries[modelid].header,PitemZ_entries[modelid].filename);
|
||||
fileLoad(PitemZ_entries[modelid].header,PitemZ_entries[modelid].filename/*, "prop"*/);
|
||||
modelCalculateRwDataLen(PitemZ_entries[modelid].header);
|
||||
return TRUE;
|
||||
}
|
||||
@@ -315,9 +325,9 @@ void setupUpdateObjectRoomPosition(ObjectRecord *obj)
|
||||
/**
|
||||
* Address 0x7F056EA0.
|
||||
*/
|
||||
struct ObjectRecord *setupCommandGetObject(s32 stageID, s32 index)
|
||||
ObjectRecord *setupCommandGetObject(s32 stageID, s32 index)
|
||||
{
|
||||
struct PropDefHeaderRecord *obj;
|
||||
PropDefHeaderRecord *obj;
|
||||
|
||||
obj = setupGetPtrToCommandByIndex(index);
|
||||
|
||||
@@ -377,7 +387,7 @@ struct ObjectRecord *setupCommandGetObject(s32 stageID, s32 index)
|
||||
break;
|
||||
|
||||
// not included:
|
||||
//case PROPDEF_UNK15: //15:
|
||||
//case PROPDEF_DEBRIS: //15:
|
||||
//case PROPDEF_UNK16: //16:
|
||||
// return ???
|
||||
}
|
||||
|
||||
@@ -5,9 +5,10 @@
|
||||
s32 sizepropdef(PropDefHeaderRecord *pdef);
|
||||
|
||||
void setupUpdateObjectRoomPosition(ObjectRecord *);
|
||||
s32 sub_GAME_7F056850(PadRecord *arg0, StandTile *arg1, f32 arg2, PadRecord *arg3, StandTile **arg4);
|
||||
s32 sub_GAME_7F056850(struct coord3d *arg0, StandTile *arg1, f32 arg2, struct coord3d *arg3, StandTile **arg4);
|
||||
ObjectRecord *setupGetPtrToCommandByIndex(s32 index);
|
||||
s32 tagGetCommandIndex(struct ObjectRecord *arg0);
|
||||
s32 modelLoad(s32 modelid);
|
||||
struct ObjectRecord *setupCommandGetObject(s32 stageID, s32 index);
|
||||
|
||||
#endif
|
||||
|
||||
+145
-141
@@ -176,7 +176,7 @@ f32 g_PowerOnTimeSec = 0;
|
||||
/**
|
||||
* Debug variable, seems to track whether user input has changed since
|
||||
* the last time the method was entered.
|
||||
*
|
||||
*
|
||||
* Addres 0x800483C0.
|
||||
*/
|
||||
s32 D_800483C0 = 1;
|
||||
@@ -237,7 +237,7 @@ void lvInit(void)
|
||||
debTryAdd(&lvl_c_debug_notice_list, "lv_c_debug");
|
||||
size = (s32)&_fontdlSegmentRomEnd - (s32)&_fontdlSegmentRomStart;
|
||||
lvl_c_debug_notice_list = 1;
|
||||
ptr_font_DL = mempAllocBytesInBank(size, 6);
|
||||
ptr_font_DL = mempAllocBytesInBank(size, MEMPOOL_PERMANENT);
|
||||
romCopy(ptr_font_DL, &_fontdlSegmentRomStart, size);
|
||||
}
|
||||
|
||||
@@ -293,7 +293,7 @@ void lvlMusicPlayStageTrackOrRandom(void)
|
||||
* Title screen is handled as a special case.
|
||||
* First half of method resets stage and player values (including mutliplayer values) to defaults.
|
||||
* Second part loads stage data (init guards, init guard heads, etc).
|
||||
*
|
||||
*
|
||||
* NTSC Address: 0x7F0BDAB0.
|
||||
* NTSC-J Address: 7F0BE660.
|
||||
* PAL Address: 7F0BCE60.
|
||||
@@ -302,7 +302,7 @@ void lvlStageLoad(s32 stage)
|
||||
{
|
||||
s32 i;
|
||||
struct player_data *player_data;
|
||||
|
||||
|
||||
g_CurrentStageToLoad = stage;
|
||||
|
||||
// this if block pushes where g_CurrentStageToLoad gets loaded to the
|
||||
@@ -332,7 +332,7 @@ void lvlStageLoad(s32 stage)
|
||||
g_GlobalTimerDelta = 1.f;
|
||||
#endif
|
||||
#if defined(VERSION_EU)
|
||||
g_GlobalTimerDelta = 1.20000004768f;
|
||||
g_GlobalTimerDelta = 1.20000004768f;
|
||||
#endif
|
||||
|
||||
D_80048388 = 0;
|
||||
@@ -359,7 +359,7 @@ void lvlStageLoad(s32 stage)
|
||||
texReset();
|
||||
load_font_tables();
|
||||
|
||||
/* If title screen, initialize screen and folder setup.
|
||||
/* If title screen, initialize screen and folder setup.
|
||||
* Otherwise:
|
||||
* - enable cheats for player
|
||||
* - init watch
|
||||
@@ -392,7 +392,7 @@ void lvlStageLoad(s32 stage)
|
||||
|
||||
load_bg_file(g_CurrentStageToLoad);
|
||||
skySetStageNum(g_CurrentStageToLoad);
|
||||
|
||||
|
||||
// HACK: This method call is wrong. The function takes one argument, but the asm calls it without
|
||||
// any arguments here.
|
||||
init_watch_at_start_of_stage();
|
||||
@@ -427,7 +427,7 @@ void lvlStageLoad(s32 stage)
|
||||
{
|
||||
g_playerPlayerData[s3].handicap = get_player_mp_handicap(s3);
|
||||
}
|
||||
|
||||
|
||||
g_playerPlayerData[s3].player_perspective_height = get_player_mp_char_height(s3);
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ void lvlStageLoad(s32 stage)
|
||||
else
|
||||
{
|
||||
s32 s0;
|
||||
|
||||
|
||||
init_path_table_links();
|
||||
init_ejected_cartridges();
|
||||
|
||||
@@ -502,7 +502,7 @@ void lvlStageLoad(s32 stage)
|
||||
|
||||
set_contents_of_80036078(0);
|
||||
zbufDeallocate();
|
||||
viSetVideoMode(1);
|
||||
viSetVideoMode(MD_NORMAL);
|
||||
D_80048368 = 1.0f;
|
||||
lvlSetControlsLockedFlag(0);
|
||||
}
|
||||
@@ -521,9 +521,9 @@ s32 lvlGetCurrentStageToLoad(void)
|
||||
* on controller 1 and 2 are used for control flow.
|
||||
*
|
||||
* address 0x7F0BDF10.
|
||||
*
|
||||
*
|
||||
* https://decomp.me/scratch/C83v8 90.47%
|
||||
*
|
||||
*
|
||||
* decomp status:
|
||||
* - compiles: yes
|
||||
* - stack resize: wrong
|
||||
@@ -594,7 +594,7 @@ Gfx * lvlPortalDebug7F0BDF10(Gfx * arg0)
|
||||
else if (joyGetButtons(PLAYER_1, R_TRIG) | joyGetButtons(PLAYER_2, R_TRIG))
|
||||
{
|
||||
if (
|
||||
(joyGetButtonsPressedThisFrame(PLAYER_1, D_JPAD) | joyGetButtonsPressedThisFrame(PLAYER_2, D_JPAD))
|
||||
(joyGetButtonsPressedThisFrame(PLAYER_1, D_JPAD) | joyGetButtonsPressedThisFrame(PLAYER_2, D_JPAD))
|
||||
&& (bgGetDataPortalsControlBytes1Bit1(g_DebugPortalsD_800483CC) == 0))
|
||||
{
|
||||
bgToggleDataPortalsContrlBytes1Bit1(g_DebugPortalsD_800483CC, 0);
|
||||
@@ -932,7 +932,7 @@ glabel lvlPortalDebug7F0BDF10
|
||||
/**
|
||||
* Graphics render method.
|
||||
* Also sets player max ammo if infinite ammo cheat is enabled.
|
||||
*
|
||||
*
|
||||
* Address 0x7F0BE30C (VERSION_US).
|
||||
*/
|
||||
|
||||
@@ -941,8 +941,8 @@ Gfx* lvlRender(Gfx* DL)
|
||||
gSPSegment(DL++, SPSEGMENT_PHYSICAL, NULL);
|
||||
gSPSegment(DL++, SPSEGMENT_UNKNOWN, osVirtualToPhysical(ptr_font_DL));
|
||||
|
||||
gSPDisplayList(DL++, &fontDL_0x040);
|
||||
gSPDisplayList(DL++, &fontDL_0x020);
|
||||
gSPDisplayList(DL++, &dlFastPipelineSetup);
|
||||
gSPDisplayList(DL++, &dlZBufferGeometry);
|
||||
|
||||
if (g_CurrentStageToLoad == LEVELID_TITLE)
|
||||
{
|
||||
@@ -971,7 +971,7 @@ Gfx* lvlRender(Gfx* DL)
|
||||
|
||||
DL = viClearZBufCurrentPlayer(DL);
|
||||
DL = video_related_F(DL);
|
||||
|
||||
|
||||
if (get_debug_render_raster() == DEB_MOVE_VIEW)
|
||||
{
|
||||
DL = sub_GAME_7F091580(DL);
|
||||
@@ -989,7 +989,7 @@ Gfx* lvlRender(Gfx* DL)
|
||||
|
||||
DL = viSetupScreensForNumPlayers(DL);
|
||||
DL = skyRender(DL);
|
||||
sub_GAME_7F0B4884();
|
||||
bgRoomVisibilityRelated();
|
||||
determing_type_of_object_and_detection();
|
||||
chraiUpdateOnscreenPropCount();
|
||||
chrpropUpdateAutoaimTarget();
|
||||
@@ -1065,7 +1065,7 @@ Gfx* lvlRender(Gfx* DL)
|
||||
sub_GAME_7F0A4824(&DL, 1);
|
||||
#endif
|
||||
DL = sub_GAME_7F0A2C44(DL);
|
||||
DL = sub_GAME_7F0A0034(DL);
|
||||
DL = explosionRenderFlyingParticles(DL);
|
||||
|
||||
if (
|
||||
|
||||
@@ -1105,7 +1105,7 @@ Gfx* lvlRender(Gfx* DL)
|
||||
/**
|
||||
* Sets the modifier values for the level being loaded.
|
||||
* This covers the enemy accuracy, reaction speed, and similar values.
|
||||
*
|
||||
*
|
||||
* address 0x7F0BE8D0
|
||||
*/
|
||||
void lvlSetMultipliersForDifficulty(void)
|
||||
@@ -1132,7 +1132,7 @@ void lvlSetMultipliersForDifficulty(void)
|
||||
g_AiAccuracyModifier = DEFAULT_AGENT_AI_ACCURACY_MODIFIER;
|
||||
g_AiDamageModifier = (DEFAULT_AGENT_AI_DAMAGE_MODIFIER * damageMultiplier);
|
||||
g_AiHealthModifier = 2.0f;
|
||||
D_80040178 = (f32) (0.25f * damageMultiplier);
|
||||
g_SpExplosionDamageMult = (f32) (0.25f * damageMultiplier);
|
||||
difficulty = 1.5f;
|
||||
g_SoloAmmoMultiplier = DEFAULT_AGENT_SOLO_AMMO_MULTIPLIER;
|
||||
g_AiReactionSpeed = DEFAULT_AGENT_AI_REACTION_SPEED;
|
||||
@@ -1147,7 +1147,7 @@ void lvlSetMultipliersForDifficulty(void)
|
||||
g_AiAccuracyModifier = DEFAULT_SECRET_AGENT_AI_ACCURACY_MODIFIER;
|
||||
g_AiDamageModifier = DEFAULT_SECRET_AGENT_AI_DAMAGE_MODIFIER;
|
||||
g_AiHealthModifier = 1.0f;
|
||||
D_80040178 = 0.75f;
|
||||
g_SpExplosionDamageMult = 0.75f;
|
||||
|
||||
#if defined(BUGFIX_R1)
|
||||
if (j_text_trigger)
|
||||
@@ -1176,7 +1176,7 @@ void lvlSetMultipliersForDifficulty(void)
|
||||
g_AiAccuracyModifier = DEFAULT_00_AGENT_AI_ACCURACY_MODIFIER;
|
||||
g_AiDamageModifier = DEFAULT_00_AGENT_AI_DAMAGE_MODIFIER;
|
||||
g_AiHealthModifier = 1.0f;
|
||||
D_80040178 = 1.0f;
|
||||
g_SpExplosionDamageMult = 1.0f;
|
||||
|
||||
#if defined(BUGFIX_R1)
|
||||
if (j_text_trigger)
|
||||
@@ -1205,7 +1205,7 @@ void lvlSetMultipliersForDifficulty(void)
|
||||
g_AiAccuracyModifier = DEFAULT_007_AI_ACCURACY_MODIFIER;
|
||||
g_AiDamageModifier = DEFAULT_007_AI_DAMAGE_MODIFIER;
|
||||
g_AiHealthModifier = 1.0f;
|
||||
D_80040178 = 1.0f;
|
||||
g_SpExplosionDamageMult = 1.0f;
|
||||
difficulty = 1.0f;
|
||||
g_SoloAmmoMultiplier = DEFAULT_007_SOLO_AMMO_MULTIPLIER;
|
||||
g_AiReactionSpeed = DEFAULT_007_AI_REACTION_SPEED;
|
||||
@@ -1218,17 +1218,21 @@ void lvlSetMultipliersForDifficulty(void)
|
||||
* Multiplayer method.
|
||||
* Tracks you-only-live-twice kills/deaths.
|
||||
* Lots of debug code.
|
||||
*
|
||||
*
|
||||
* Address: 0x7F0BEB88 (NTSC).
|
||||
*
|
||||
*
|
||||
* decomp status:
|
||||
* - compiles: yes
|
||||
* - stack resize: fail
|
||||
* - identical instructions: fail
|
||||
* - identical registers: fail
|
||||
*
|
||||
*
|
||||
* notes: there is one big `if` block that is very wrong. A few places where two instructions are swapped.
|
||||
* Otherwise just lots of regalloc.
|
||||
*
|
||||
* mismatch section is probably Perfect Dark void mpCalculateAwards(void)
|
||||
*
|
||||
* https://decomp.me/scratch/YWqVR 63.28%
|
||||
*/
|
||||
void lvlManageMpGame(void)
|
||||
{
|
||||
@@ -1305,10 +1309,10 @@ void lvlManageMpGame(void)
|
||||
{
|
||||
p = g_playerPointers[i];
|
||||
|
||||
if (p->bonddead != 0)
|
||||
if (p->bonddead != FALSE)
|
||||
{
|
||||
mp_alive_count++;
|
||||
if (p->redbloodfinished != 0)
|
||||
if (p->redbloodfinished)
|
||||
{
|
||||
mp_player_field424_count++;
|
||||
}
|
||||
@@ -1376,8 +1380,8 @@ void lvlManageMpGame(void)
|
||||
{
|
||||
p = g_playerPointers[i];
|
||||
|
||||
if (p->bonddead != 0 &&
|
||||
(p->redbloodfinished == 0 || p->deathanimfinished == 0 || p->colourfadetimemax60 >= 0.0f))
|
||||
if (p->bonddead != FALSE &&
|
||||
(p->redbloodfinished == FALSE || p->deathanimfinished == FALSE || p->colourfadetimemax60 >= 0.0f))
|
||||
{
|
||||
mp_player_currently_in_dying_animation++;
|
||||
}
|
||||
@@ -1427,7 +1431,7 @@ void lvlManageMpGame(void)
|
||||
{
|
||||
for (j=0; j<var_player_count2_again; j++)
|
||||
{
|
||||
if (g_playerPointers[j]->bonddead == 0)
|
||||
if (g_playerPointers[j]->bonddead == FALSE)
|
||||
{
|
||||
not_dead_count++;
|
||||
}
|
||||
@@ -1439,28 +1443,28 @@ void lvlManageMpGame(void)
|
||||
{
|
||||
for (j=0; j<var_player_count2_again; j++)
|
||||
{
|
||||
if (g_playerPointers[0]->bonddead == 0)
|
||||
if (g_playerPointers[PLAYER_1]->bonddead == FALSE)
|
||||
{
|
||||
not_dead_count++;
|
||||
}
|
||||
if (g_playerPointers[1]->bonddead == 0)
|
||||
if (g_playerPointers[PLAYER_2]->bonddead == FALSE)
|
||||
{
|
||||
not_dead_count++;
|
||||
}
|
||||
if (g_playerPointers[2]->bonddead == 0)
|
||||
if (g_playerPointers[PLAYER_3]->bonddead == FALSE)
|
||||
{
|
||||
not_dead_count++;
|
||||
}
|
||||
if (g_playerPointers[3]->bonddead == 0)
|
||||
if (g_playerPointers[PLAYER_4]->bonddead == FALSE)
|
||||
{
|
||||
not_dead_count++;
|
||||
}
|
||||
|
||||
killed_count =
|
||||
g_playerPlayerData[0].killed_p1 +
|
||||
g_playerPlayerData[1].killed_p1 +
|
||||
g_playerPlayerData[2].killed_p1 +
|
||||
g_playerPlayerData[3].killed_p1;
|
||||
g_playerPlayerData[PLAYER_1].killed_p1 +
|
||||
g_playerPlayerData[PLAYER_2].killed_p1 +
|
||||
g_playerPlayerData[PLAYER_3].killed_p1 +
|
||||
g_playerPlayerData[PLAYER_4].killed_p1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1472,14 +1476,14 @@ void lvlManageMpGame(void)
|
||||
g_playerPlayerData[i].order_out_in_yolt = (u8) (phi_a2_5 + 1);
|
||||
}
|
||||
|
||||
if ((g_playerPointers[i]->redbloodfinished != 0) && (g_playerPointers[i]->deathanimfinished != 0) && (g_playerPointers[i]->colourfadetimemax60 < 0.0f))
|
||||
if ((g_playerPointers[i]->redbloodfinished) && (g_playerPointers[i]->deathanimfinished) && (g_playerPointers[i]->colourfadetimemax60 < 0.0f))
|
||||
{
|
||||
phi_ra_2 = phi_ra_3 + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//}
|
||||
|
||||
|
||||
temp_v1_7 = var_player_count2 - 1;
|
||||
if (not_dead_count >= temp_v1_7)
|
||||
{
|
||||
@@ -1539,13 +1543,13 @@ void lvlManageMpGame(void)
|
||||
{
|
||||
sub_GAME_7F09BBBC();
|
||||
lvlSetMultipliersForDifficulty();
|
||||
sub_GAME_7F0BC7D4();
|
||||
updateRoomStatusFlags();
|
||||
sub_GAME_7F092E50();
|
||||
sub_GAME_7F094438();
|
||||
update_bullet_sparks_and_dust_clouds();
|
||||
update_bullet_casings();
|
||||
update_broken_windows();
|
||||
update_gray_flying_particles();
|
||||
explosionUpdateFlyingParticles();
|
||||
handle_mp_respawn_and_some_things();
|
||||
reset_all_music_slots();
|
||||
langTick();
|
||||
@@ -1553,7 +1557,7 @@ void lvlManageMpGame(void)
|
||||
if ((get_debug_joy2detailedit_flag() != 0) && (D_800483C8 == 0))
|
||||
{
|
||||
s32 i;
|
||||
D_800483C8 = (struct LvlMpUnknown*)mempAllocBytesInBank(0x3000, 4);
|
||||
D_800483C8 = (struct LvlMpUnknown *)mempAllocBytesInBank(0x3000, MEMPOOL_STAGE);
|
||||
if (D_800483C8 != 0)
|
||||
{
|
||||
for (i=0; i<3000; i++)
|
||||
@@ -1577,13 +1581,13 @@ void lvlManageMpGame(void)
|
||||
if (joyGetButtonsPressedThisFrame(PLAYER_1, L_CBUTTONS))
|
||||
{
|
||||
sub_GAME_7F0AF630(-1);
|
||||
sub_GAME_7F0B2D38(0, 0, 0);
|
||||
debugStanView(0, 0, 0);
|
||||
}
|
||||
|
||||
if (joyGetButtonsPressedThisFrame(PLAYER_1, R_CBUTTONS))
|
||||
{
|
||||
sub_GAME_7F0AF630(1);
|
||||
sub_GAME_7F0B2D38(0, 0, 0);
|
||||
debugStanView(0, 0, 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2274,7 +2278,7 @@ glabel lvlManageMpGame
|
||||
/* 0F3E90 7F0BF360 00000000 */ nop
|
||||
/* 0F3E94 7F0BF364 0FC2FA34 */ jal lvlSetMultipliersForDifficulty
|
||||
/* 0F3E98 7F0BF368 00000000 */ nop
|
||||
/* 0F3E9C 7F0BF36C 0FC2F1F5 */ jal sub_GAME_7F0BC7D4
|
||||
/* 0F3E9C 7F0BF36C 0FC2F1F5 */ jal updateRoomStatusFlags
|
||||
/* 0F3EA0 7F0BF370 00000000 */ nop
|
||||
/* 0F3EA4 7F0BF374 0FC24B94 */ jal sub_GAME_7F092E50
|
||||
/* 0F3EA8 7F0BF378 00000000 */ nop
|
||||
@@ -2286,7 +2290,7 @@ glabel lvlManageMpGame
|
||||
/* 0F3EC0 7F0BF390 00000000 */ nop
|
||||
/* 0F3EC4 7F0BF394 0FC28A35 */ jal update_broken_windows
|
||||
/* 0F3EC8 7F0BF398 00000000 */ nop
|
||||
/* 0F3ECC 7F0BF39C 0FC27F4F */ jal update_gray_flying_particles
|
||||
/* 0F3ECC 7F0BF39C 0FC27F4F */ jal explosionUpdateFlyingParticles
|
||||
/* 0F3ED0 7F0BF3A0 00000000 */ nop
|
||||
/* 0F3ED4 7F0BF3A4 0FC0F192 */ jal handle_mp_respawn_and_some_things
|
||||
/* 0F3ED8 7F0BF3A8 00000000 */ nop
|
||||
@@ -2402,7 +2406,7 @@ glabel lvlManageMpGame
|
||||
/* 0F4080 7F0BF550 2404FFFF */ li $a0, -1
|
||||
/* 0F4084 7F0BF554 00002025 */ move $a0, $zero
|
||||
/* 0F4088 7F0BF558 00002825 */ move $a1, $zero
|
||||
/* 0F408C 7F0BF55C 0FC2CB4E */ jal sub_GAME_7F0B2D38
|
||||
/* 0F408C 7F0BF55C 0FC2CB4E */ jal debugStanView
|
||||
/* 0F4090 7F0BF560 00003025 */ move $a2, $zero
|
||||
/* 0F4094 7F0BF564 00002025 */ move $a0, $zero
|
||||
.L7F0BF568:
|
||||
@@ -2414,7 +2418,7 @@ glabel lvlManageMpGame
|
||||
/* 0F40AC 7F0BF57C 24040001 */ li $a0, 1
|
||||
/* 0F40B0 7F0BF580 00002025 */ move $a0, $zero
|
||||
/* 0F40B4 7F0BF584 00002825 */ move $a1, $zero
|
||||
/* 0F40B8 7F0BF588 0FC2CB4E */ jal sub_GAME_7F0B2D38
|
||||
/* 0F40B8 7F0BF588 0FC2CB4E */ jal debugStanView
|
||||
/* 0F40BC 7F0BF58C 00003025 */ move $a2, $zero
|
||||
/* 0F40C0 7F0BF590 1000001A */ b .L7F0BF5FC
|
||||
/* 0F40C4 7F0BF594 00000000 */ nop
|
||||
@@ -3165,7 +3169,7 @@ glabel lvlManageMpGame
|
||||
/* 0F4B08 7F0BFF98 00000000 */ nop
|
||||
/* 0F4B0C 7F0BFF9C 0FC2FD2D */ jal lvlSetMultipliersForDifficulty
|
||||
/* 0F4B10 7F0BFFA0 00000000 */ nop
|
||||
/* 0F4B14 7F0BFFA4 0FC2F4E1 */ jal sub_GAME_7F0BC7D4
|
||||
/* 0F4B14 7F0BFFA4 0FC2F4E1 */ jal updateRoomStatusFlags
|
||||
/* 0F4B18 7F0BFFA8 00000000 */ nop
|
||||
/* 0F4B1C 7F0BFFAC 0FC24E7C */ jal sub_GAME_7F092E50
|
||||
/* 0F4B20 7F0BFFB0 00000000 */ nop
|
||||
@@ -3177,7 +3181,7 @@ glabel lvlManageMpGame
|
||||
/* 0F4B38 7F0BFFC8 00000000 */ nop
|
||||
/* 0F4B3C 7F0BFFCC 0FC28D1D */ jal update_broken_windows
|
||||
/* 0F4B40 7F0BFFD0 00000000 */ nop
|
||||
/* 0F4B44 7F0BFFD4 0FC28238 */ jal update_gray_flying_particles
|
||||
/* 0F4B44 7F0BFFD4 0FC28238 */ jal explosionUpdateFlyingParticles
|
||||
/* 0F4B48 7F0BFFD8 00000000 */ nop
|
||||
/* 0F4B4C 7F0BFFDC 0FC0F252 */ jal handle_mp_respawn_and_some_things
|
||||
/* 0F4B50 7F0BFFE0 00000000 */ nop
|
||||
@@ -3293,7 +3297,7 @@ glabel lvlManageMpGame
|
||||
/* 0F4CF8 7F0C0188 2404FFFF */ li $a0, -1
|
||||
/* 0F4CFC 7F0C018C 00002025 */ move $a0, $zero
|
||||
/* 0F4D00 7F0C0190 00002825 */ move $a1, $zero
|
||||
/* 0F4D04 7F0C0194 0FC2CE3A */ jal sub_GAME_7F0B2D38
|
||||
/* 0F4D04 7F0C0194 0FC2CE3A */ jal debugStanView
|
||||
/* 0F4D08 7F0C0198 00003025 */ move $a2, $zero
|
||||
/* 0F4D0C 7F0C019C 00002025 */ move $a0, $zero
|
||||
.Ljp7F0C01A0:
|
||||
@@ -3305,7 +3309,7 @@ glabel lvlManageMpGame
|
||||
/* 0F4D24 7F0C01B4 24040001 */ li $a0, 1
|
||||
/* 0F4D28 7F0C01B8 00002025 */ move $a0, $zero
|
||||
/* 0F4D2C 7F0C01BC 00002825 */ move $a1, $zero
|
||||
/* 0F4D30 7F0C01C0 0FC2CE3A */ jal sub_GAME_7F0B2D38
|
||||
/* 0F4D30 7F0C01C0 0FC2CE3A */ jal debugStanView
|
||||
/* 0F4D34 7F0C01C4 00003025 */ move $a2, $zero
|
||||
/* 0F4D38 7F0C01C8 1000001A */ b .Ljp7F0C0234
|
||||
/* 0F4D3C 7F0C01CC 00000000 */ nop
|
||||
@@ -3508,17 +3512,17 @@ glabel lvlManageMpGame
|
||||
/* 0F099C 7F0BDFAC 27BDFE68 */ addiu $sp, $sp, -0x198
|
||||
/* 0F09A0 7F0BDFB0 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0F09A4 7F0BDFB4 0C000744 */ jal tlbmanageResetCurrentEntriesCount
|
||||
/* 0F09A8 7F0BDFB8 00000000 */ nop
|
||||
/* 0F09A8 7F0BDFB8 00000000 */ nop
|
||||
/* 0F09AC 7F0BDFBC 3C0E8004 */ lui $t6, %hi(g_ControlsLockedFlag) # $t6, 0x8004
|
||||
/* 0F09B0 7F0BDFC0 8DCE0FF0 */ lw $t6, %lo(g_ControlsLockedFlag)($t6)
|
||||
/* 0F09B4 7F0BDFC4 3C018004 */ lui $at, %hi(g_ClockTimer) # $at, 0x8004
|
||||
/* 0F09B8 7F0BDFC8 11C00003 */ beqz $t6, .L7F0BDFD8
|
||||
/* 0F09BC 7F0BDFCC 00000000 */ nop
|
||||
/* 0F09BC 7F0BDFCC 00000000 */ nop
|
||||
/* 0F09C0 7F0BDFD0 10000010 */ b .L7F0BE014
|
||||
/* 0F09C4 7F0BDFD4 AC200FF4 */ sw $zero, %lo(g_ClockTimer)($at)
|
||||
.L7F0BDFD8:
|
||||
/* 0F09C8 7F0BDFD8 0FC31565 */ jal checkGamePaused
|
||||
/* 0F09CC 7F0BDFDC 00000000 */ nop
|
||||
/* 0F09CC 7F0BDFDC 00000000 */ nop
|
||||
/* 0F09D0 7F0BDFE0 10400004 */ beqz $v0, .L7F0BDFF4
|
||||
/* 0F09D4 7F0BDFE4 3C0F8004 */ lui $t7, %hi(speedgraphframes) # $t7, 0x8004
|
||||
/* 0F09D8 7F0BDFE8 3C018004 */ lui $at, %hi(g_ClockTimer) # $at, 0x8004
|
||||
@@ -3557,10 +3561,10 @@ glabel lvlManageMpGame
|
||||
/* 0F0A54 7F0BE064 AC8F0000 */ sw $t7, ($a0)
|
||||
/* 0F0A58 7F0BE068 8F180FE4 */ lw $t8, %lo(g_CurrentStageToLoad)($t8)
|
||||
/* 0F0A5C 7F0BE06C 1301001D */ beq $t8, $at, .L7F0BE0E4
|
||||
/* 0F0A60 7F0BE070 00000000 */ nop
|
||||
/* 0F0A60 7F0BE070 00000000 */ nop
|
||||
/* 0F0A64 7F0BE074 8F391018 */ lw $t9, %lo(D_80048394)($t9)
|
||||
/* 0F0A68 7F0BE078 1720001A */ bnez $t9, .L7F0BE0E4
|
||||
/* 0F0A6C 7F0BE07C 00000000 */ nop
|
||||
/* 0F0A6C 7F0BE07C 00000000 */ nop
|
||||
/* 0F0A70 7F0BE080 18400018 */ blez $v0, .L7F0BE0E4
|
||||
/* 0F0A74 7F0BE084 3C0E8002 */ lui $t6, %hi(g_AppendCheatSinglePlayer) # $t6, 0x8002
|
||||
/* 0F0A78 7F0BE088 8DCE5E50 */ lw $t6, %lo(g_AppendCheatSinglePlayer)($t6)
|
||||
@@ -3591,19 +3595,19 @@ glabel lvlManageMpGame
|
||||
/* 0F0AD0 7F0BE0E0 24630001 */ addiu $v1, $v1, 1
|
||||
.L7F0BE0E4:
|
||||
/* 0F0AD4 7F0BE0E4 0FC26669 */ jal getPlayerCount
|
||||
/* 0F0AD8 7F0BE0E8 00000000 */ nop
|
||||
/* 0F0AD8 7F0BE0E8 00000000 */ nop
|
||||
/* 0F0ADC 7F0BE0EC 28410002 */ slti $at, $v0, 2
|
||||
/* 0F0AE0 7F0BE0F0 1420014C */ bnez $at, .L7F0BE624
|
||||
/* 0F0AE4 7F0BE0F4 3C188004 */ lui $t8, %hi(g_CurrentStageToLoad) # $t8, 0x8004
|
||||
/* 0F0AE8 7F0BE0F8 8F180FE4 */ lw $t8, %lo(g_CurrentStageToLoad)($t8)
|
||||
/* 0F0AEC 7F0BE0FC 2401005A */ li $at, 90
|
||||
/* 0F0AF0 7F0BE100 13010148 */ beq $t8, $at, .L7F0BE624
|
||||
/* 0F0AF4 7F0BE104 00000000 */ nop
|
||||
/* 0F0AF4 7F0BE104 00000000 */ nop
|
||||
/* 0F0AF8 7F0BE108 0FC3003C */ jal get_mission_state
|
||||
/* 0F0AFC 7F0BE10C 00000000 */ nop
|
||||
/* 0F0AFC 7F0BE10C 00000000 */ nop
|
||||
/* 0F0B00 7F0BE110 24010006 */ li $at, 6
|
||||
/* 0F0B04 7F0BE114 14410029 */ bne $v0, $at, .L7F0BE1BC
|
||||
/* 0F0B08 7F0BE118 00000000 */ nop
|
||||
/* 0F0B08 7F0BE118 00000000 */ nop
|
||||
/* 0F0B0C 7F0BE11C AFA00190 */ sw $zero, 0x190($sp)
|
||||
/* 0F0B10 7F0BE120 AFA0018C */ sw $zero, 0x18c($sp)
|
||||
/* 0F0B14 7F0BE124 0FC26669 */ jal getPlayerCount
|
||||
@@ -3642,9 +3646,9 @@ glabel lvlManageMpGame
|
||||
/* 0F0B90 7F0BE1A0 8FA60188 */ lw $a2, 0x188($sp)
|
||||
.L7F0BE1A4:
|
||||
/* 0F0B94 7F0BE1A4 18A00005 */ blez $a1, .L7F0BE1BC
|
||||
/* 0F0B98 7F0BE1A8 00000000 */ nop
|
||||
/* 0F0B98 7F0BE1A8 00000000 */ nop
|
||||
/* 0F0B9C 7F0BE1AC 14A60003 */ bne $a1, $a2, .L7F0BE1BC
|
||||
/* 0F0BA0 7F0BE1B0 00000000 */ nop
|
||||
/* 0F0BA0 7F0BE1B0 00000000 */ nop
|
||||
/* 0F0BA4 7F0BE1B4 0FC3003F */ jal set_missionstate
|
||||
/* 0F0BA8 7F0BE1B8 24040001 */ li $a0, 1
|
||||
.L7F0BE1BC:
|
||||
@@ -3653,7 +3657,7 @@ glabel lvlManageMpGame
|
||||
/* 0F0BB4 7F0BE1C4 3C028004 */ lui $v0, %hi(D_80048394) # $v0, 0x8004
|
||||
/* 0F0BB8 7F0BE1C8 3C198004 */ lui $t9, %hi(g_ClockTimer) # $t9, 0x8004
|
||||
/* 0F0BBC 7F0BE1CC 1860004A */ blez $v1, .Leu7F0BE2F8
|
||||
/* 0F0BC0 7F0BE1D0 00000000 */ nop
|
||||
/* 0F0BC0 7F0BE1D0 00000000 */ nop
|
||||
/* 0F0BC4 7F0BE1D4 8C421018 */ lw $v0, %lo(D_80048394)($v0)
|
||||
/* 0F0BC8 7F0BE1D8 8F390FF4 */ lw $t9, %lo(g_ClockTimer)($t9)
|
||||
/* 0F0BCC 7F0BE1DC 2464F448 */ addiu $a0, $v1, -0xbb8
|
||||
@@ -3664,11 +3668,11 @@ glabel lvlManageMpGame
|
||||
/* 0F0BE0 7F0BE1F0 AFA20184 */ sw $v0, 0x184($sp)
|
||||
/* 0F0BE4 7F0BE1F4 01C4082A */ slt $at, $t6, $a0
|
||||
/* 0F0BE8 7F0BE1F8 14200013 */ bnez $at, .L7F0BE248
|
||||
/* 0F0BEC 7F0BE1FC 00000000 */ nop
|
||||
/* 0F0BEC 7F0BE1FC 00000000 */ nop
|
||||
/* 0F0BF0 7F0BE200 0FC26669 */ jal getPlayerCount
|
||||
/* 0F0BF4 7F0BE204 AFA0017C */ sw $zero, 0x17c($sp)
|
||||
/* 0F0BF8 7F0BE208 1840000F */ blez $v0, .L7F0BE248
|
||||
/* 0F0BFC 7F0BE20C 00000000 */ nop
|
||||
/* 0F0BFC 7F0BE20C 00000000 */ nop
|
||||
.L7F0BE210:
|
||||
/* 0F0C00 7F0BE210 0FC26993 */ jal set_cur_player
|
||||
/* 0F0C04 7F0BE214 8FA4017C */ lw $a0, 0x17c($sp)
|
||||
@@ -3683,7 +3687,7 @@ glabel lvlManageMpGame
|
||||
/* 0F0C28 7F0BE238 8FB9017C */ lw $t9, 0x17c($sp)
|
||||
/* 0F0C2C 7F0BE23C 0322082A */ slt $at, $t9, $v0
|
||||
/* 0F0C30 7F0BE240 1420FFF3 */ bnez $at, .L7F0BE210
|
||||
/* 0F0C34 7F0BE244 00000000 */ nop
|
||||
/* 0F0C34 7F0BE244 00000000 */ nop
|
||||
.L7F0BE248:
|
||||
/* 0F0C38 7F0BE248 3C0F8004 */ lui $t7, %hi(g_MpTime) # $t7, 0x8004
|
||||
/* 0F0C3C 7F0BE24C 8DEF101C */ lw $t7, %lo(g_MpTime)($t7)
|
||||
@@ -3692,12 +3696,12 @@ glabel lvlManageMpGame
|
||||
/* 0F0C48 7F0BE258 25F8FE0C */ addiu $t8, $t7, -0x1f4
|
||||
/* 0F0C4C 7F0BE25C 01D8082A */ slt $at, $t6, $t8
|
||||
/* 0F0C50 7F0BE260 1420000D */ bnez $at, .L7F0BE298
|
||||
/* 0F0C54 7F0BE264 00000000 */ nop
|
||||
/* 0F0C54 7F0BE264 00000000 */ nop
|
||||
/* 0F0C58 7F0BE268 8F391024 */ lw $t9, %lo(g_MpSoundStateRelated)($t9)
|
||||
/* 0F0C5C 7F0BE26C 1720000A */ bnez $t9, .L7F0BE298
|
||||
/* 0F0C60 7F0BE270 00000000 */ nop
|
||||
/* 0F0C60 7F0BE270 00000000 */ nop
|
||||
/* 0F0C64 7F0BE274 0FC2FC1E */ jal lvlGetControlsLockedFlag
|
||||
/* 0F0C68 7F0BE278 00000000 */ nop
|
||||
/* 0F0C68 7F0BE278 00000000 */ nop
|
||||
/* 0F0C6C 7F0BE27C 14400006 */ bnez $v0, .L7F0BE298
|
||||
/* 0F0C70 7F0BE280 3C048005 */ lui $a0, %hi(g_musicSfxBufferPtr) # $a0, 0x8005
|
||||
/* 0F0C74 7F0BE284 3C068004 */ lui $a2, %hi(g_MpSoundStateRelated) # $a2, 0x8004
|
||||
@@ -3707,14 +3711,14 @@ glabel lvlManageMpGame
|
||||
/* 0F0C84 7F0BE294 240500A1 */ li $a1, 161
|
||||
.L7F0BE298:
|
||||
/* 0F0C88 7F0BE298 0FC2FC1E */ jal lvlGetControlsLockedFlag
|
||||
/* 0F0C8C 7F0BE29C 00000000 */ nop
|
||||
/* 0F0C8C 7F0BE29C 00000000 */ nop
|
||||
/* 0F0C90 7F0BE2A0 1040000A */ beqz $v0, .L7F0BE2CC
|
||||
/* 0F0C94 7F0BE2A4 3C048004 */ lui $a0, %hi(g_MpSoundStateRelated) # $a0, 0x8004
|
||||
/* 0F0C98 7F0BE2A8 8C841024 */ lw $a0, %lo(g_MpSoundStateRelated)($a0)
|
||||
/* 0F0C9C 7F0BE2AC 10800007 */ beqz $a0, .L7F0BE2CC
|
||||
/* 0F0CA0 7F0BE2B0 00000000 */ nop
|
||||
/* 0F0CA0 7F0BE2B0 00000000 */ nop
|
||||
/* 0F0CA4 7F0BE2B4 0C002094 */ jal sndGetPlayingState
|
||||
/* 0F0CA8 7F0BE2B8 00000000 */ nop
|
||||
/* 0F0CA8 7F0BE2B8 00000000 */ nop
|
||||
/* 0F0CAC 7F0BE2BC 10400003 */ beqz $v0, .L7F0BE2CC
|
||||
/* 0F0CB0 7F0BE2C0 3C048004 */ lui $a0, %hi(g_MpSoundStateRelated) # $a0, 0x8004
|
||||
/* 0F0CB4 7F0BE2C4 0C002120 */ jal sndDeactivate
|
||||
@@ -3728,7 +3732,7 @@ glabel lvlManageMpGame
|
||||
/* 0F0CD0 7F0BE2E0 10200005 */ beqz $at, .Leu7F0BE2F8
|
||||
/* 0F0CD4 7F0BE2E4 01C3082A */ slt $at, $t6, $v1
|
||||
/* 0F0CD8 7F0BE2E8 14200003 */ bnez $at, .Leu7F0BE2F8
|
||||
/* 0F0CDC 7F0BE2EC 00000000 */ nop
|
||||
/* 0F0CDC 7F0BE2EC 00000000 */ nop
|
||||
/* 0F0CE0 7F0BE2F0 0FC30684 */ jal mpCalculateAwards
|
||||
/* 0F0CE4 7F0BE2F4 00002025 */ move $a0, $zero
|
||||
.Leu7F0BE2F8:
|
||||
@@ -3736,12 +3740,12 @@ glabel lvlManageMpGame
|
||||
/* 0F0CEC 7F0BE2FC 8F181020 */ lw $t8, %lo(g_MpPoint)($t8)
|
||||
/* 0F0CF0 7F0BE300 3C198004 */ lui $t9, %hi(g_ClockTimer) # $t9, 0x8004
|
||||
/* 0F0CF4 7F0BE304 1B00003D */ blez $t8, .L7F0BE3FC
|
||||
/* 0F0CF8 7F0BE308 00000000 */ nop
|
||||
/* 0F0CF8 7F0BE308 00000000 */ nop
|
||||
/* 0F0CFC 7F0BE30C 8F390FF4 */ lw $t9, %lo(g_ClockTimer)($t9)
|
||||
/* 0F0D00 7F0BE310 1320003A */ beqz $t9, .L7F0BE3FC
|
||||
/* 0F0D04 7F0BE314 00000000 */ nop
|
||||
/* 0F0D04 7F0BE314 00000000 */ nop
|
||||
/* 0F0D08 7F0BE318 0FC26669 */ jal getPlayerCount
|
||||
/* 0F0D0C 7F0BE31C 00000000 */ nop
|
||||
/* 0F0D0C 7F0BE31C 00000000 */ nop
|
||||
/* 0F0D10 7F0BE320 00403825 */ move $a3, $v0
|
||||
/* 0F0D14 7F0BE324 00002825 */ move $a1, $zero
|
||||
/* 0F0D18 7F0BE328 00003025 */ move $a2, $zero
|
||||
@@ -3763,7 +3767,7 @@ glabel lvlManageMpGame
|
||||
/* 0F0D54 7F0BE364 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 0F0D58 7F0BE368 C45203E4 */ lwc1 $f18, 0x3e4($v0)
|
||||
/* 0F0D5C 7F0BE36C 4612003E */ c.le.s $f0, $f18
|
||||
/* 0F0D60 7F0BE370 00000000 */ nop
|
||||
/* 0F0D60 7F0BE370 00000000 */ nop
|
||||
/* 0F0D64 7F0BE374 45020003 */ bc1fl .L7F0BE384
|
||||
/* 0F0D68 7F0BE378 AFA3001C */ sw $v1, 0x1c($sp)
|
||||
/* 0F0D6C 7F0BE37C 24A50001 */ addiu $a1, $a1, 1
|
||||
@@ -3793,27 +3797,27 @@ glabel lvlManageMpGame
|
||||
/* 0F0DC0 7F0BE3D0 24630004 */ addiu $v1, $v1, 4
|
||||
.L7F0BE3D4:
|
||||
/* 0F0DC4 7F0BE3D4 18C00009 */ blez $a2, .L7F0BE3FC
|
||||
/* 0F0DC8 7F0BE3D8 00000000 */ nop
|
||||
/* 0F0DC8 7F0BE3D8 00000000 */ nop
|
||||
/* 0F0DCC 7F0BE3DC 14A00005 */ bnez $a1, .L7F0BE3F4
|
||||
/* 0F0DD0 7F0BE3E0 00000000 */ nop
|
||||
/* 0F0DD0 7F0BE3E0 00000000 */ nop
|
||||
/* 0F0DD4 7F0BE3E4 0FC30684 */ jal mpCalculateAwards
|
||||
/* 0F0DD8 7F0BE3E8 00002025 */ move $a0, $zero
|
||||
/* 0F0DDC 7F0BE3EC 10000003 */ b .L7F0BE3FC
|
||||
/* 0F0DE0 7F0BE3F0 00000000 */ nop
|
||||
/* 0F0DE0 7F0BE3F0 00000000 */ nop
|
||||
.L7F0BE3F4:
|
||||
/* 0F0DE4 7F0BE3F4 0FC30680 */ jal mpwatchSetStopPlayFlag
|
||||
/* 0F0DE8 7F0BE3F8 00000000 */ nop
|
||||
/* 0F0DE8 7F0BE3F8 00000000 */ nop
|
||||
.L7F0BE3FC:
|
||||
/* 0F0DEC 7F0BE3FC 0FC051B2 */ jal get_scenario
|
||||
/* 0F0DF0 7F0BE400 00000000 */ nop
|
||||
/* 0F0DF0 7F0BE400 00000000 */ nop
|
||||
/* 0F0DF4 7F0BE404 24010001 */ li $at, 1
|
||||
/* 0F0DF8 7F0BE408 14410086 */ bne $v0, $at, .L7F0BE624
|
||||
/* 0F0DFC 7F0BE40C 3C0F8004 */ lui $t7, %hi(g_ClockTimer) # $t7, 0x8004
|
||||
/* 0F0E00 7F0BE410 8DEF0FF4 */ lw $t7, %lo(g_ClockTimer)($t7)
|
||||
/* 0F0E04 7F0BE414 11E00083 */ beqz $t7, .L7F0BE624
|
||||
/* 0F0E08 7F0BE418 00000000 */ nop
|
||||
/* 0F0E08 7F0BE418 00000000 */ nop
|
||||
/* 0F0E0C 7F0BE41C 0FC26669 */ jal getPlayerCount
|
||||
/* 0F0E10 7F0BE420 00000000 */ nop
|
||||
/* 0F0E10 7F0BE420 00000000 */ nop
|
||||
/* 0F0E14 7F0BE424 44800000 */ mtc1 $zero, $f0
|
||||
/* 0F0E18 7F0BE428 00405025 */ move $t2, $v0
|
||||
/* 0F0E1C 7F0BE42C 00006825 */ move $t5, $zero
|
||||
@@ -3932,7 +3936,7 @@ glabel lvlManageMpGame
|
||||
/* 0F0FB4 7F0BE5C4 258C0001 */ addiu $t4, $t4, 1
|
||||
/* 0F0FB8 7F0BE5C8 C46403E4 */ lwc1 $f4, 0x3e4($v1)
|
||||
/* 0F0FBC 7F0BE5CC 4600203C */ c.lt.s $f4, $f0
|
||||
/* 0F0FC0 7F0BE5D0 00000000 */ nop
|
||||
/* 0F0FC0 7F0BE5D0 00000000 */ nop
|
||||
/* 0F0FC4 7F0BE5D4 45020003 */ bc1fl .L7F0BE5E4
|
||||
/* 0F0FC8 7F0BE5D8 258C0001 */ addiu $t4, $t4, 1
|
||||
/* 0F0FCC 7F0BE5DC 27FF0001 */ addiu $ra, $ra, 1
|
||||
@@ -3950,13 +3954,13 @@ glabel lvlManageMpGame
|
||||
/* 0F0FF0 7F0BE600 0FC30684 */ jal mpCalculateAwards
|
||||
/* 0F0FF4 7F0BE604 00002025 */ move $a0, $zero
|
||||
/* 0F0FF8 7F0BE608 10000006 */ b .L7F0BE624
|
||||
/* 0F0FFC 7F0BE60C 00000000 */ nop
|
||||
/* 0F0FFC 7F0BE60C 00000000 */ nop
|
||||
/* 0F1000 7F0BE610 01A3082A */ slt $at, $t5, $v1
|
||||
.L7F0BE614:
|
||||
/* 0F1004 7F0BE614 14200003 */ bnez $at, .L7F0BE624
|
||||
/* 0F1008 7F0BE618 00000000 */ nop
|
||||
/* 0F1008 7F0BE618 00000000 */ nop
|
||||
/* 0F100C 7F0BE61C 0FC30680 */ jal mpwatchSetStopPlayFlag
|
||||
/* 0F1010 7F0BE620 00000000 */ nop
|
||||
/* 0F1010 7F0BE620 00000000 */ nop
|
||||
.L7F0BE624:
|
||||
/* 0F1014 7F0BE624 3C028004 */ lui $v0, %hi(g_ClockTimer) # $v0, 0x8004
|
||||
/* 0F1018 7F0BE628 3C0F8004 */ lui $t7, %hi(D_80048394) # $t7, 0x8004
|
||||
@@ -4015,7 +4019,7 @@ glabel lvlManageMpGame
|
||||
/* 0F10E4 7F0BE6F4 3C038004 */ lui $v1, %hi(D_8004838C) # $v1, 0x8004
|
||||
/* 0F10E8 7F0BE6F8 24631010 */ addiu $v1, %lo(D_8004838C) # addiu $v1, $v1, 0x1010
|
||||
/* 0F10EC 7F0BE6FC 11C00005 */ beqz $t6, .L7F0BE714
|
||||
/* 0F10F0 7F0BE700 00000000 */ nop
|
||||
/* 0F10F0 7F0BE700 00000000 */ nop
|
||||
/* 0F10F4 7F0BE704 8C790000 */ lw $t9, ($v1)
|
||||
/* 0F10F8 7F0BE708 0322C021 */ addu $t8, $t9, $v0
|
||||
/* 0F10FC 7F0BE70C 10000015 */ b .L7F0BE764
|
||||
@@ -4048,49 +4052,49 @@ glabel lvlManageMpGame
|
||||
/* 0F1160 7F0BE770 8F390FE4 */ lw $t9, %lo(g_CurrentStageToLoad)($t9)
|
||||
/* 0F1164 7F0BE774 2401005A */ li $at, 90
|
||||
/* 0F1168 7F0BE778 17210009 */ bne $t9, $at, .L7F0BE7A0
|
||||
/* 0F116C 7F0BE77C 00000000 */ nop
|
||||
/* 0F116C 7F0BE77C 00000000 */ nop
|
||||
/* 0F1170 7F0BE780 0FC2436F */ jal cheat_buttons_mp_related
|
||||
/* 0F1174 7F0BE784 00000000 */ nop
|
||||
/* 0F1174 7F0BE784 00000000 */ nop
|
||||
/* 0F1178 7F0BE788 0FC06920 */ jal menu_init
|
||||
/* 0F117C 7F0BE78C 00000000 */ nop
|
||||
/* 0F117C 7F0BE78C 00000000 */ nop
|
||||
/* 0F1180 7F0BE790 0FC30388 */ jal langTick
|
||||
/* 0F1184 7F0BE794 00000000 */ nop
|
||||
/* 0F1184 7F0BE794 00000000 */ nop
|
||||
/* 0F1188 7F0BE798 100000A9 */ b .L7F0BEA40
|
||||
/* 0F118C 7F0BE79C 00000000 */ nop
|
||||
/* 0F118C 7F0BE79C 00000000 */ nop
|
||||
.L7F0BE7A0:
|
||||
/* 0F1190 7F0BE7A0 0FC26C3F */ jal sub_GAME_7F09BBBC
|
||||
/* 0F1194 7F0BE7A4 00000000 */ nop
|
||||
/* 0F1194 7F0BE7A4 00000000 */ nop
|
||||
/* 0F1198 7F0BE7A8 0FC2F72D */ jal lvlSetMultipliersForDifficulty
|
||||
/* 0F119C 7F0BE7AC 00000000 */ nop
|
||||
/* 0F11A0 7F0BE7B0 0FC2EEF5 */ jal sub_GAME_7F0BC7D4
|
||||
/* 0F11A4 7F0BE7B4 00000000 */ nop
|
||||
/* 0F119C 7F0BE7AC 00000000 */ nop
|
||||
/* 0F11A0 7F0BE7B0 0FC2EEF5 */ jal updateRoomStatusFlags
|
||||
/* 0F11A4 7F0BE7B4 00000000 */ nop
|
||||
/* 0F11A8 7F0BE7B8 0FC248E4 */ jal sub_GAME_7F092E50
|
||||
/* 0F11AC 7F0BE7BC 00000000 */ nop
|
||||
/* 0F11AC 7F0BE7BC 00000000 */ nop
|
||||
/* 0F11B0 7F0BE7C0 0FC24E5E */ jal sub_GAME_7F094438
|
||||
/* 0F11B4 7F0BE7C4 00000000 */ nop
|
||||
/* 0F11B4 7F0BE7C4 00000000 */ nop
|
||||
/* 0F11B8 7F0BE7C8 0FC28ECE */ jal sub_GAME_7F0A4600
|
||||
/* 0F11BC 7F0BE7CC 00000000 */ nop
|
||||
/* 0F11BC 7F0BE7CC 00000000 */ nop
|
||||
/* 0F11C0 7F0BE7D0 0FC1A580 */ jal update_bullet_casings
|
||||
/* 0F11C4 7F0BE7D4 00000000 */ nop
|
||||
/* 0F11C4 7F0BE7D4 00000000 */ nop
|
||||
/* 0F11C8 7F0BE7D8 0FC28785 */ jal update_broken_windows
|
||||
/* 0F11CC 7F0BE7DC 00000000 */ nop
|
||||
/* 0F11D0 7F0BE7E0 0FC27CA0 */ jal update_gray_flying_particles
|
||||
/* 0F11D4 7F0BE7E4 00000000 */ nop
|
||||
/* 0F11CC 7F0BE7DC 00000000 */ nop
|
||||
/* 0F11D0 7F0BE7E0 0FC27CA0 */ jal explosionUpdateFlyingParticles
|
||||
/* 0F11D4 7F0BE7E4 00000000 */ nop
|
||||
/* 0F11D8 7F0BE7E8 0FC0F1C2 */ jal handle_mp_respawn_and_some_things
|
||||
/* 0F11DC 7F0BE7EC 00000000 */ nop
|
||||
/* 0F11DC 7F0BE7EC 00000000 */ nop
|
||||
/* 0F11E0 7F0BE7F0 0FC3022A */ jal reset_all_music_slots
|
||||
/* 0F11E4 7F0BE7F4 00000000 */ nop
|
||||
/* 0F11E4 7F0BE7F4 00000000 */ nop
|
||||
/* 0F11E8 7F0BE7F8 0FC30388 */ jal langTick
|
||||
/* 0F11EC 7F0BE7FC 00000000 */ nop
|
||||
/* 0F11EC 7F0BE7FC 00000000 */ nop
|
||||
/* 0F11F0 7F0BE800 0FC24116 */ jal get_debug_joy2detailedit_flag
|
||||
/* 0F11F4 7F0BE804 00000000 */ nop
|
||||
/* 0F11F4 7F0BE804 00000000 */ nop
|
||||
/* 0F11F8 7F0BE808 1040004D */ beqz $v0, .L7F0BE940
|
||||
/* 0F11FC 7F0BE80C 3C068004 */ lui $a2, %hi(D_800483C8) # $a2, 0x8004
|
||||
/* 0F1200 7F0BE810 24C6104C */ addiu $a2, %lo(D_800483C8) # addiu $a2, $a2, 0x104c
|
||||
/* 0F1204 7F0BE814 8CD80000 */ lw $t8, ($a2)
|
||||
/* 0F1208 7F0BE818 24043000 */ li $a0, 12288
|
||||
/* 0F120C 7F0BE81C 17000048 */ bnez $t8, .L7F0BE940
|
||||
/* 0F1210 7F0BE820 00000000 */ nop
|
||||
/* 0F1210 7F0BE820 00000000 */ nop
|
||||
/* 0F1214 7F0BE824 0C0022E0 */ jal mempAllocBytesInBank
|
||||
/* 0F1218 7F0BE828 24050004 */ li $a1, 4
|
||||
/* 0F121C 7F0BE82C 3C068004 */ lui $a2, %hi(D_800483C8) # $a2, 0x8004
|
||||
@@ -4165,14 +4169,14 @@ glabel lvlManageMpGame
|
||||
/* 0F132C 7F0BE93C A04F000D */ sb $t7, 0xd($v0)
|
||||
.L7F0BE940:
|
||||
/* 0F1330 7F0BE940 0FC2413C */ jal get_debug_portal_flag
|
||||
/* 0F1334 7F0BE944 00000000 */ nop
|
||||
/* 0F1334 7F0BE944 00000000 */ nop
|
||||
/* 0F1338 7F0BE948 10400003 */ beqz $v0, .L7F0BE958
|
||||
/* 0F133C 7F0BE94C 00000000 */ nop
|
||||
/* 0F133C 7F0BE94C 00000000 */ nop
|
||||
/* 0F1340 7F0BE950 0FC2F4B4 */ jal lvlPortalDebug7F0BDF10
|
||||
/* 0F1344 7F0BE954 00002025 */ move $a0, $zero
|
||||
.L7F0BE958:
|
||||
/* 0F1348 7F0BE958 0FC240FC */ jal getDebugMode
|
||||
/* 0F134C 7F0BE95C 00000000 */ nop
|
||||
/* 0F134C 7F0BE95C 00000000 */ nop
|
||||
/* 0F1350 7F0BE960 24010004 */ li $at, 4
|
||||
/* 0F1354 7F0BE964 10410006 */ beq $v0, $at, .L7F0BE980
|
||||
/* 0F1358 7F0BE968 00002025 */ move $a0, $zero
|
||||
@@ -4180,7 +4184,7 @@ glabel lvlManageMpGame
|
||||
/* 0F1360 7F0BE970 1041001A */ beq $v0, $at, .L7F0BE9DC
|
||||
/* 0F1364 7F0BE974 00002025 */ move $a0, $zero
|
||||
/* 0F1368 7F0BE978 10000031 */ b .L7F0BEA40
|
||||
/* 0F136C 7F0BE97C 00000000 */ nop
|
||||
/* 0F136C 7F0BE97C 00000000 */ nop
|
||||
.L7F0BE980:
|
||||
/* 0F1370 7F0BE980 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
/* 0F1374 7F0BE984 24050002 */ li $a1, 2
|
||||
@@ -4190,29 +4194,29 @@ glabel lvlManageMpGame
|
||||
/* 0F1384 7F0BE994 2404FFFF */ li $a0, -1
|
||||
/* 0F1388 7F0BE998 00002025 */ move $a0, $zero
|
||||
/* 0F138C 7F0BE99C 00002825 */ move $a1, $zero
|
||||
/* 0F1390 7F0BE9A0 0FC2C7FE */ jal sub_GAME_7F0B2D38
|
||||
/* 0F1390 7F0BE9A0 0FC2C7FE */ jal debugStanView
|
||||
/* 0F1394 7F0BE9A4 00003025 */ move $a2, $zero
|
||||
/* 0F1398 7F0BE9A8 00002025 */ move $a0, $zero
|
||||
.L7F0BE9AC:
|
||||
/* 0F139C 7F0BE9AC 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
/* 0F13A0 7F0BE9B0 24050001 */ li $a1, 1
|
||||
/* 0F13A4 7F0BE9B4 10400022 */ beqz $v0, .L7F0BEA40
|
||||
/* 0F13A8 7F0BE9B8 00000000 */ nop
|
||||
/* 0F13A8 7F0BE9B8 00000000 */ nop
|
||||
/* 0F13AC 7F0BE9BC 0FC2BA3C */ jal sub_GAME_7F0AF630
|
||||
/* 0F13B0 7F0BE9C0 24040001 */ li $a0, 1
|
||||
/* 0F13B4 7F0BE9C4 00002025 */ move $a0, $zero
|
||||
/* 0F13B8 7F0BE9C8 00002825 */ move $a1, $zero
|
||||
/* 0F13BC 7F0BE9CC 0FC2C7FE */ jal sub_GAME_7F0B2D38
|
||||
/* 0F13BC 7F0BE9CC 0FC2C7FE */ jal debugStanView
|
||||
/* 0F13C0 7F0BE9D0 00003025 */ move $a2, $zero
|
||||
/* 0F13C4 7F0BE9D4 1000001A */ b .L7F0BEA40
|
||||
/* 0F13C8 7F0BE9D8 00000000 */ nop
|
||||
/* 0F13C8 7F0BE9D8 00000000 */ nop
|
||||
.L7F0BE9DC:
|
||||
/* 0F13CC 7F0BE9DC 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
/* 0F13D0 7F0BE9E0 24050002 */ li $a1, 2
|
||||
/* 0F13D4 7F0BE9E4 50400004 */ beql $v0, $zero, .L7F0BE9F8
|
||||
/* 0F13D8 7F0BE9E8 00002025 */ move $a0, $zero
|
||||
/* 0F13DC 7F0BE9EC 0FC08B7E */ jal chrDecrementAnimationTablePointerCount
|
||||
/* 0F13E0 7F0BE9F0 00000000 */ nop
|
||||
/* 0F13E0 7F0BE9F0 00000000 */ nop
|
||||
/* 0F13E4 7F0BE9F4 00002025 */ move $a0, $zero
|
||||
.L7F0BE9F8:
|
||||
/* 0F13E8 7F0BE9F8 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4220,7 +4224,7 @@ glabel lvlManageMpGame
|
||||
/* 0F13F0 7F0BEA00 50400004 */ beql $v0, $zero, .L7F0BEA14
|
||||
/* 0F13F4 7F0BEA04 00002025 */ move $a0, $zero
|
||||
/* 0F13F8 7F0BEA08 0FC08B96 */ jal chrIncrementAnimationTablePointerCount
|
||||
/* 0F13FC 7F0BEA0C 00000000 */ nop
|
||||
/* 0F13FC 7F0BEA0C 00000000 */ nop
|
||||
/* 0F1400 7F0BEA10 00002025 */ move $a0, $zero
|
||||
.L7F0BEA14:
|
||||
/* 0F1404 7F0BEA14 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4228,7 +4232,7 @@ glabel lvlManageMpGame
|
||||
/* 0F140C 7F0BEA1C 50400004 */ beql $v0, $zero, .L7F0BEA30
|
||||
/* 0F1410 7F0BEA20 00002025 */ move $a0, $zero
|
||||
/* 0F1414 7F0BEA24 0FC08BA4 */ jal chrToggleD_8002C90C
|
||||
/* 0F1418 7F0BEA28 00000000 */ nop
|
||||
/* 0F1418 7F0BEA28 00000000 */ nop
|
||||
/* 0F141C 7F0BEA2C 00002025 */ move $a0, $zero
|
||||
.L7F0BEA30:
|
||||
/* 0F1420 7F0BEA30 0C002C20 */ jal joyGetButtons
|
||||
@@ -4237,7 +4241,7 @@ glabel lvlManageMpGame
|
||||
/* 0F142C 7F0BEA3C 0002202B */ sltu $a0, $zero, $v0
|
||||
.L7F0BEA40:
|
||||
/* 0F1430 7F0BEA40 0FC240FC */ jal getDebugMode
|
||||
/* 0F1434 7F0BEA44 00000000 */ nop
|
||||
/* 0F1434 7F0BEA44 00000000 */ nop
|
||||
/* 0F1438 7F0BEA48 2401000C */ li $at, 12
|
||||
/* 0F143C 7F0BEA4C 1041002E */ beq $v0, $at, .L7F0BEB08
|
||||
/* 0F1440 7F0BEA50 00002025 */ move $a0, $zero
|
||||
@@ -4248,7 +4252,7 @@ glabel lvlManageMpGame
|
||||
/* 0F1454 7F0BEA64 54410074 */ bnel $v0, $at, .L7F0BEC38
|
||||
/* 0F1458 7F0BEA68 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0F145C 7F0BEA6C 0C000F7E */ jal viGetHorizontalOffset
|
||||
/* 0F1460 7F0BEA70 00000000 */ nop
|
||||
/* 0F1460 7F0BEA70 00000000 */ nop
|
||||
/* 0F1464 7F0BEA74 0C000F78 */ jal viGet800232A0
|
||||
/* 0F1468 7F0BEA78 AFA20030 */ sw $v0, 0x30($sp)
|
||||
/* 0F146C 7F0BEA7C AFA2002C */ sw $v0, 0x2c($sp)
|
||||
@@ -4296,7 +4300,7 @@ glabel lvlManageMpGame
|
||||
/* 0F1500 7F0BEB10 50400004 */ beql $v0, $zero, .L7F0BEB24
|
||||
/* 0F1504 7F0BEB14 00002025 */ move $a0, $zero
|
||||
/* 0F1508 7F0BEB18 0FC2F37A */ jal lvlMusicAppendPlayEndTheme
|
||||
/* 0F150C 7F0BEB1C 00000000 */ nop
|
||||
/* 0F150C 7F0BEB1C 00000000 */ nop
|
||||
/* 0F1510 7F0BEB20 00002025 */ move $a0, $zero
|
||||
.L7F0BEB24:
|
||||
/* 0F1514 7F0BEB24 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4304,7 +4308,7 @@ glabel lvlManageMpGame
|
||||
/* 0F151C 7F0BEB2C 50400004 */ beql $v0, $zero, .L7F0BEB40
|
||||
/* 0F1520 7F0BEB30 00002025 */ move $a0, $zero
|
||||
/* 0F1524 7F0BEB34 0FC2F367 */ jal lvlMusicAppendPlaySoloDeathShort
|
||||
/* 0F1528 7F0BEB38 00000000 */ nop
|
||||
/* 0F1528 7F0BEB38 00000000 */ nop
|
||||
/* 0F152C 7F0BEB3C 00002025 */ move $a0, $zero
|
||||
.L7F0BEB40:
|
||||
/* 0F1530 7F0BEB40 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4312,7 +4316,7 @@ glabel lvlManageMpGame
|
||||
/* 0F1538 7F0BEB48 50400004 */ beql $v0, $zero, .L7F0BEB5C
|
||||
/* 0F153C 7F0BEB4C 00002025 */ move $a0, $zero
|
||||
/* 0F1540 7F0BEB50 0C00190C */ jal musicTrack1Stop
|
||||
/* 0F1544 7F0BEB54 00000000 */ nop
|
||||
/* 0F1544 7F0BEB54 00000000 */ nop
|
||||
/* 0F1548 7F0BEB58 00002025 */ move $a0, $zero
|
||||
.L7F0BEB5C:
|
||||
/* 0F154C 7F0BEB5C 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4320,7 +4324,7 @@ glabel lvlManageMpGame
|
||||
/* 0F1554 7F0BEB64 50400034 */ beql $v0, $zero, .L7F0BEC38
|
||||
/* 0F1558 7F0BEB68 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0F155C 7F0BEB6C 0C001940 */ jal musicTrack1SaveCurrentVolumeAsTrackDefault
|
||||
/* 0F1560 7F0BEB70 00000000 */ nop
|
||||
/* 0F1560 7F0BEB70 00000000 */ nop
|
||||
/* 0F1564 7F0BEB74 10000030 */ b .L7F0BEC38
|
||||
/* 0F1568 7F0BEB78 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0BEB7C:
|
||||
@@ -4361,7 +4365,7 @@ glabel lvlManageMpGame
|
||||
/* 0F15EC 7F0BEBFC 50400004 */ beql $v0, $zero, .L7F0BEC10
|
||||
/* 0F15F0 7F0BEC00 00002025 */ move $a0, $zero
|
||||
/* 0F15F4 7F0BEC04 0C002161 */ jal sndDeactivateAllSfxByFlag_1
|
||||
/* 0F15F8 7F0BEC08 00000000 */ nop
|
||||
/* 0F15F8 7F0BEC08 00000000 */ nop
|
||||
/* 0F15FC 7F0BEC0C 00002025 */ move $a0, $zero
|
||||
.L7F0BEC10:
|
||||
/* 0F1600 7F0BEC10 0C002C48 */ jal joyGetButtonsPressedThisFrame
|
||||
@@ -4378,7 +4382,7 @@ glabel lvlManageMpGame
|
||||
.L7F0BEC38:
|
||||
/* 0F1628 7F0BEC38 27BD0198 */ addiu $sp, $sp, 0x198
|
||||
/* 0F162C 7F0BEC3C 03E00008 */ jr $ra
|
||||
/* 0F1630 7F0BEC40 00000000 */ nop
|
||||
/* 0F1630 7F0BEC40 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
@@ -4389,10 +4393,10 @@ glabel lvlManageMpGame
|
||||
* Assumes a debug mode is present, and handles debug edit intro, debug stan edit, debug bond "view."
|
||||
* By default, the DEB_BOND_VIEW path is chosen without debug info.
|
||||
* This updates the player viewport(s), and handles player movement.
|
||||
*
|
||||
*
|
||||
* Multiplayer:
|
||||
* Updates distance_traveled and possibly (depending on scenario) have_token_or_goldengun.
|
||||
*
|
||||
*
|
||||
* US Address 0x7F0BF800.
|
||||
* EU address 7F0BEC44.
|
||||
*/
|
||||
@@ -4412,11 +4416,11 @@ void lvlViewMoveTick(void)
|
||||
{
|
||||
if ((getDebugMode() == DEB_MOVE_VIEW) || ((getDebugMode() == DEB_INTRO_EDIT) && (D_80036ABC < 0)))
|
||||
{
|
||||
sub_GAME_7F091080(joyGetStickX(local_player_number), joyGetStickY(local_player_number), joyGetButtons(local_player_number, ANY_BUTTON));
|
||||
debugFreeCamera(joyGetStickX(local_player_number), joyGetStickY(local_player_number), joyGetButtons(local_player_number, ANY_BUTTON));
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_GAME_7F091080(joyGetStickX(local_player_number), joyGetStickY(local_player_number), 0);
|
||||
debugFreeCamera(joyGetStickX(local_player_number), joyGetStickY(local_player_number), 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4425,11 +4429,11 @@ void lvlViewMoveTick(void)
|
||||
{
|
||||
if (getDebugMode() == DEB_STAN_VIEW)
|
||||
{
|
||||
sub_GAME_7F0B2D38(joyGetStickX(local_player_number), joyGetStickY(local_player_number), joyGetButtons(local_player_number, ANY_BUTTON));
|
||||
debugStanView(joyGetStickX(local_player_number), joyGetStickY(local_player_number), joyGetButtons(local_player_number, ANY_BUTTON));
|
||||
}
|
||||
else
|
||||
{
|
||||
sub_GAME_7F0B2D38(joyGetStickX(local_player_number), joyGetStickY(local_player_number), 0);
|
||||
debugStanView(joyGetStickX(local_player_number), joyGetStickY(local_player_number), 0);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -4464,13 +4468,13 @@ void lvlViewMoveTick(void)
|
||||
currentPlayerEquipWeaponWrapper(GUNRIGHT, ITEM_TOKEN);
|
||||
|
||||
if(1);
|
||||
|
||||
|
||||
if (g_CurrentPlayer->hands[GUNRIGHT].when_detonating_mines_is_0 == 2)
|
||||
{
|
||||
g_CurrentPlayer->hands[GUNRIGHT].when_detonating_mines_is_0 = 5;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
g_playerPerm->flag_counter += g_ClockTimer;
|
||||
g_playerPerm->have_token_or_goldengun = 1;
|
||||
}
|
||||
|
||||
+28
-10
@@ -11,7 +11,7 @@ s32 g_LangBanks[45];
|
||||
|
||||
//CODE.bss:8008C6F4
|
||||
struct jpncharpixels* g_JpnCharCachePixels;
|
||||
//CODE.bss:8008C6F8
|
||||
//CODE.bss:8008C6F8 canonically jloaddata
|
||||
struct jpncacheitem *g_JpnCacheCacheItems;
|
||||
|
||||
|
||||
@@ -125,6 +125,7 @@ void *LnameX_lookuptable[45][2] = {
|
||||
{"LmiscP", "LmiscJ"}}; /* Cheat options */
|
||||
#endif
|
||||
|
||||
// cannonically gettextloadnum
|
||||
LEVELID langGetLangBankIndexFromStagenum(LEVELID level)
|
||||
{
|
||||
LEVELID return_id;
|
||||
@@ -214,6 +215,9 @@ LEVELID langGetLangBankIndexFromStagenum(LEVELID level)
|
||||
break;
|
||||
default:
|
||||
{
|
||||
#ifdef DEBUG
|
||||
osSyncPrintf("gettextloadnum: level %d unknown. (HANG now.)\n",level);
|
||||
#endif
|
||||
/* infinite loop on invalid text bank */
|
||||
while(1) {};
|
||||
}
|
||||
@@ -248,15 +252,22 @@ void langInit(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
void langTick(void) {
|
||||
//assert here reveals this file is language.c
|
||||
void langTick(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (j_text_trigger) {
|
||||
for (i = 0; i < 0x7c; i++) {
|
||||
if (g_JpnCacheCacheItems[i].ttl) {
|
||||
g_JpnCacheCacheItems[i].ttl--;
|
||||
}
|
||||
if (j_text_trigger)
|
||||
{
|
||||
for (i = 0; i < 0x7c; i++)
|
||||
{
|
||||
if (g_JpnCacheCacheItems[i].ttl)
|
||||
{
|
||||
g_JpnCacheCacheItems[i].ttl--;
|
||||
}
|
||||
#ifdef DEBUG
|
||||
assert(jloaddata[i].timeleft<=3);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -356,7 +367,11 @@ void langClearBank(s32 textBank) {
|
||||
g_LangBanks[textBank] = 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get pointer of a string based on language of game (E/J)
|
||||
* @param slotID: UniqueID of string (a combination of Bank ID and string index)
|
||||
* @return char* string.
|
||||
*/
|
||||
u8 * langGet(s32 slotID)
|
||||
{
|
||||
u32 * textbank_ptr = g_LangBanks[slotID >> 10]; /* get the text file bank ID index the text ptr table */
|
||||
@@ -364,5 +379,8 @@ u8 * langGet(s32 slotID)
|
||||
|
||||
u32 output_slot = textslot_offset; /* add the text slot offset to the base ptr to get the ptr to text file's slot */
|
||||
output_slot += (u32)textbank_ptr;
|
||||
#ifdef DEBUG
|
||||
return (textslot_offset != 0) ? (u8 *)output_slot : "Sorry, string not loaded.";
|
||||
#endif
|
||||
return (textslot_offset != 0) ? (u8*)output_slot : NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+2
-1
@@ -10,13 +10,14 @@ struct jpncharpixels {
|
||||
};
|
||||
|
||||
struct jpncacheitem {
|
||||
u16 ttl : 2;
|
||||
u16 ttl : 2; //cannonically timeleft
|
||||
u16 codepoint : 14;
|
||||
};
|
||||
|
||||
|
||||
extern s32 j_text_trigger;
|
||||
|
||||
void langLoadToAddr(u32 id);
|
||||
void langTick(void);
|
||||
u8 * langGet(s32 slotID);
|
||||
void langLoadToBank(int id, u8 *target, int size);
|
||||
|
||||
@@ -46,7 +46,7 @@ glabel cosf
|
||||
/* 08C9D0 7F057EA0 3C018005 */ lui $at, %hi(D_800536C0)
|
||||
/* 08C9D4 7F057EA4 C42A36C0 */ lwc1 $f10, %lo(D_800536C0)($at)
|
||||
/* 08C9D8 7F057EA8 460A6300 */ add.s $f12, $f12, $f10
|
||||
|
||||
.size cosf, . - cosf
|
||||
|
||||
# ################################################################
|
||||
glabel sinf
|
||||
@@ -125,4 +125,4 @@ glabel sinf
|
||||
.L7F057FC4:
|
||||
/* 08CAF4 7F057FC4 03E00008 */ jr $ra
|
||||
/* 08CAF8 7F057FC8 00000000 */ nop
|
||||
|
||||
.size sinf, . - sinf
|
||||
|
||||
@@ -68,9 +68,11 @@ void sub_GAME_7F05AEFC(coord3d *arg0, coord3d *arg1, coord3d *arg2, coord3d *arg
|
||||
* - stack resize: fail
|
||||
* - identical instructions: fail
|
||||
* - identical registers: fail
|
||||
*
|
||||
* https://decomp.me/scratch/EHA1A 74.55 %
|
||||
*/
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F05B024(f32 *arg0, f32 *arg1, f32 *arg2, f32 *arg3, f32 arg4, f32 arg5, f32 *result)
|
||||
void sub_GAME_7F05B024(coord3d *arg0, coord3d *arg1, coord3d *arg2, coord3d *arg3, f32 arg4, f32 arg5, coord3d *result)
|
||||
{
|
||||
f32 square;
|
||||
f32 cube;
|
||||
@@ -86,9 +88,9 @@ void sub_GAME_7F05B024(f32 *arg0, f32 *arg1, f32 *arg2, f32 *arg3, f32 arg4, f32
|
||||
temp_f18 = ((2.0f - arg5) * cube) + (square * (arg5 - 3.0f)) + 1.0f;
|
||||
temp_f8 = ((arg5 - 2.0f) * cube) + (square * (3.0f - (2.0f * arg5))) + (arg4 * arg5);
|
||||
|
||||
result[0] = (arg3[0] * temp_f6) + ((temp_f16 * arg0[0]) + (temp_f18 * arg1[0]) + (temp_f8 * arg2[0]));
|
||||
result[1] = (arg3[1] * temp_f6) + ((temp_f16 * arg0[1]) + (temp_f18 * arg1[1]) + (temp_f8 * arg2[1]));
|
||||
result[2] = (arg3[2] * temp_f6) + ((temp_f16 * arg0[2]) + (temp_f18 * arg1[2]) + (temp_f8 * arg2[2]));
|
||||
result->f[0] = temp_f16 * arg0->f[0] + temp_f18 * arg1->f[0] + temp_f8 * arg2->f[0] + temp_f6 * arg3->f[0];
|
||||
result->f[1] = temp_f16 * arg0->f[1] + temp_f18 * arg1->f[1] + temp_f8 * arg2->f[1] + temp_f6 * arg3->f[1];
|
||||
result->f[2] = temp_f16 * arg0->f[2] + temp_f18 * arg1->f[2] + temp_f8 * arg2->f[2] + temp_f6 * arg3->f[2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
|
||||
+564
-526
File diff suppressed because it is too large
Load Diff
+349
-1873
File diff suppressed because it is too large
Load Diff
+35
-34
@@ -31,19 +31,12 @@ s32 who_paused;
|
||||
|
||||
// data
|
||||
u16 g_AwardNames[] = {
|
||||
TEXT(LMPMENU, MPMENU_STR_00),TEXT(LMPMENU, MPMENU_STR_01),TEXT(LMPMENU, MPMENU_STR_02),TEXT(LMPMENU, MPMENU_STR_03),TEXT(LMPMENU, MPMENU_STR_04),TEXT(LMPMENU, MPMENU_STR_05),
|
||||
TEXT(LMPMENU, MPMENU_STR_06),TEXT(LMPMENU, MPMENU_STR_07),TEXT(LMPMENU, MPMENU_STR_08),TEXT(LMPMENU, MPMENU_STR_09),TEXT(LMPMENU, MPMENU_STR_0A),TEXT(LMPMENU, MPMENU_STR_0B),
|
||||
TEXT(LMPMENU, MPMENU_STR_0C),TEXT(LMPMENU, MPMENU_STR_0D),TEXT(LMPMENU, MPMENU_STR_0E),TEXT(LMPMENU, MPMENU_STR_0F),TEXT(LMPMENU, MPMENU_STR_10)
|
||||
getStringID(LMPMENU, MPMENU_STR_00_LEMMINGAWARD),getStringID(LMPMENU, MPMENU_STR_01_WHERESTHEAMMO),getStringID(LMPMENU, MPMENU_STR_02_WHERESTHEARMOR),getStringID(LMPMENU, MPMENU_STR_03_AC10AWARD),getStringID(LMPMENU, MPMENU_STR_04_MARKSMANSHIPAWARD),getStringID(LMPMENU, MPMENU_STR_05_MOSTPROFESSIONAL),
|
||||
getStringID(LMPMENU, MPMENU_STR_06_MOSTDEADLY),getStringID(LMPMENU, MPMENU_STR_07_MOSTLYHARMLESS),getStringID(LMPMENU, MPMENU_STR_08_MOSTCOWARD),getStringID(LMPMENU, MPMENU_STR_09_MOSTFRANTIC),getStringID(LMPMENU, MPMENU_STR_0A_MOSTHONORABLE),getStringID(LMPMENU, MPMENU_STR_0B_MOSTDISHONORABLE),
|
||||
getStringID(LMPMENU, MPMENU_STR_0C_SHORTESTINNINGS),getStringID(LMPMENU, MPMENU_STR_0D_LONGESTINNINGS),getStringID(LMPMENU, MPMENU_STR_0E_DOUBLEKILL),getStringID(LMPMENU, MPMENU_STR_0F_TRIPLEKILL),getStringID(LMPMENU, MPMENU_STR_10_QUADKILL)
|
||||
};
|
||||
|
||||
//rodata
|
||||
/*8005BC20*/
|
||||
const char ascii_MP_watch_menu_percentd[] = "%d";
|
||||
const char ascii_MP_watch_menu_BLANK[] = "";
|
||||
const char ascii_MP_watch_menu_left_chevron[] = "<";
|
||||
const char ascii_MP_watch_menu_right_chevron[] = ">";
|
||||
const char ascii_pnum_KILLS[] = "%s%d %s";
|
||||
const char ascii_pnum_LOSSES[] = "%s%d %s";
|
||||
|
||||
|
||||
// rodata
|
||||
|
||||
@@ -268,7 +261,7 @@ s32 mpFindMinFloat(s32 numplayers, f32 arg1, f32 arg2, f32 arg3, f32 arg4)
|
||||
|
||||
void pauseAndLockControls(void) {
|
||||
lvlSetControlsLockedFlag(1);
|
||||
g_pausedFlag = 1;
|
||||
g_pausedFlag = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -276,26 +269,26 @@ s32 disablePlayerActionsWhenPausedOrInMpMenu(void)
|
||||
{
|
||||
if (getPlayerCount() == 1)
|
||||
{
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (g_stopPlayFlag)
|
||||
{
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (g_CurrentPlayer->mpmenuon)
|
||||
{
|
||||
return 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return 1;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
void mpwatchSetStopPlayFlag(void)
|
||||
{
|
||||
g_stopPlayFlag = 1;
|
||||
g_stopPlayFlag = TRUE;
|
||||
}
|
||||
|
||||
|
||||
@@ -346,7 +339,7 @@ void mpCalculateAwards(s32 arg0)
|
||||
|
||||
set_cur_player(i);
|
||||
|
||||
g_CurrentPlayer->mpmenuon = 1;
|
||||
g_CurrentPlayer->mpmenuon = TRUE;
|
||||
g_CurrentPlayer->mpmenumode = 3;
|
||||
g_CurrentPlayer->ptr_text_first_mp_award = 0;
|
||||
g_CurrentPlayer->ptr_text_second_mp_award = 0;
|
||||
@@ -405,7 +398,7 @@ void mpCalculateAwards(s32 arg0)
|
||||
|
||||
if (metrics[i].body_armor_pickups <= 2.0f)
|
||||
{
|
||||
metrics[i].awards |= AWARD_WHERESTHEARMOR;
|
||||
metrics[i].awards |= AWARD_WHERESTHEARMOUR;
|
||||
}
|
||||
|
||||
i = mpFindMaxFloat(player_count, metrics[0].body_armor_pickups, metrics[1].body_armor_pickups, metrics[2].body_armor_pickups, metrics[3].body_armor_pickups);
|
||||
@@ -556,9 +549,9 @@ void sub_GAME_7F0C2E80(void)
|
||||
|
||||
if (player_count != 1)
|
||||
{
|
||||
if ((g_CurrentPlayer->bonddead != 0) && (g_gameOverFlag == 0))
|
||||
if ((g_CurrentPlayer->bonddead != FALSE) && (g_gameOverFlag == FALSE))
|
||||
{
|
||||
g_CurrentPlayer->mpmenuon = 0;
|
||||
g_CurrentPlayer->mpmenuon = FALSE;
|
||||
g_CurrentPlayer->healthdisplaytime = 0;
|
||||
return;
|
||||
}
|
||||
@@ -593,7 +586,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
g_playerPerm->longest_inning = getMissiontimer() - g_CurrentPlayer->field_29F4;
|
||||
}
|
||||
|
||||
if (g_CurrentPlayer->mpmenuon != 0)
|
||||
if (g_CurrentPlayer->mpmenuon != FALSE)
|
||||
{
|
||||
if (mpwatchIsPlayerPressingRight(player_num) && mpwatchMenuCanGoRight())
|
||||
{
|
||||
@@ -635,7 +628,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
if (joyGetButtonsPressedThisFrame(player_num, 0x4000U))
|
||||
{
|
||||
mpwatchPlayBeep();
|
||||
g_CurrentPlayer->mpmenuon = 1;
|
||||
g_CurrentPlayer->mpmenuon = TRUE;
|
||||
g_CurrentPlayer->mpmenumode = 3;
|
||||
}
|
||||
}
|
||||
@@ -662,7 +655,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_CurrentPlayer->mpmenuon = 0;
|
||||
g_CurrentPlayer->mpmenuon = FALSE;
|
||||
g_CurrentPlayer->healthdisplaytime = (PAL ? 0x32 : 0x3C);
|
||||
if (get_cur_playernum() == who_paused)
|
||||
{
|
||||
@@ -682,7 +675,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
if ((g_CurrentPlayer->mpmenumode == 6) && (g_CurrentPlayer->mpquitconfirm == 1))
|
||||
{
|
||||
mpwatchPlayBeep();
|
||||
g_CurrentPlayer->mpmenuon = 0;
|
||||
g_CurrentPlayer->mpmenuon = FALSE;
|
||||
g_CurrentPlayer->healthdisplaytime = 0;
|
||||
mpCalculateAwards(0);
|
||||
}
|
||||
@@ -701,7 +694,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
if (joyGetButtonsPressedThisFrame(player_num, 0x1000U) != 0)
|
||||
{
|
||||
mpwatchPlayBeep();
|
||||
g_CurrentPlayer->mpmenuon = 1;
|
||||
g_CurrentPlayer->mpmenuon = TRUE;
|
||||
g_CurrentPlayer->mpmenumode = 3;
|
||||
g_CurrentPlayer->mpjoywascentre = 1;
|
||||
g_CurrentPlayer->apparenthealth = g_CurrentPlayer->bondhealth;
|
||||
@@ -712,6 +705,7 @@ void sub_GAME_7F0C2E80(void)
|
||||
}
|
||||
|
||||
|
||||
|
||||
Gfx *display_text_for_playerdata_on_MP_menu(Gfx *gdl, s32 x, s32 y, u16* arg3, TEXTCOLORS text_color) {
|
||||
|
||||
s32 sp5C;
|
||||
@@ -723,7 +717,7 @@ Gfx *display_text_for_playerdata_on_MP_menu(Gfx *gdl, s32 x, s32 y, u16* arg3, T
|
||||
s16 viX;
|
||||
s32 viY;
|
||||
|
||||
sprintf(&sp48, &ascii_MP_watch_menu_percentd, arg3);
|
||||
sprintf(&sp48, "%d", arg3);
|
||||
|
||||
textMeasure(&sp50, &sp54, &sp48, ptrFontBankGothicChars, ptrFontBankGothic, 0);
|
||||
|
||||
@@ -773,7 +767,13 @@ Gfx *display_text_for_playerdata_on_MP_menu(Gfx *gdl, s32 x, s32 y, u16* arg3, T
|
||||
}
|
||||
|
||||
|
||||
|
||||
//rodata
|
||||
/*8005BC20*/
|
||||
const char ascii_MP_watch_menu_BLANK[] = "";
|
||||
const char ascii_MP_watch_menu_left_chevron[] = "<";
|
||||
const char ascii_MP_watch_menu_right_chevron[] = ">";
|
||||
const char ascii_pnum_KILLS[] = "%s%d %s";
|
||||
const char ascii_pnum_LOSSES[] = "%s%d %s";
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
@@ -793,6 +793,7 @@ glabel jpt_MP_overlays_scoring
|
||||
.word team_player_kills
|
||||
.word team_player_kills
|
||||
.word team_player_kills
|
||||
.size jpt_MP_overlays_scoring, . - jpt_MP_overlays_scoring
|
||||
|
||||
.text
|
||||
glabel get_points_for_mp_player
|
||||
@@ -1306,7 +1307,6 @@ s32 mpwatchShouldDisplayRank(s32 param_1)
|
||||
return param_1 ? 0 : 1;
|
||||
default:
|
||||
do {
|
||||
/* WARNING: Do nothing block with infinite loop */
|
||||
} while(1);
|
||||
}
|
||||
}
|
||||
@@ -1329,7 +1329,6 @@ s32 mpwatchShouldDisplayScore(s32 param_1)
|
||||
break;
|
||||
default:
|
||||
do {
|
||||
/* WARNING: Do nothing block with infinite loop */
|
||||
} while(1);
|
||||
}
|
||||
}
|
||||
@@ -1355,6 +1354,7 @@ glabel jpt_MP_menu_window_text
|
||||
.word text_exit
|
||||
.word text_exit
|
||||
.word text_blank
|
||||
.size jpt_MP_menu_window_text, . - jpt_MP_menu_window_text
|
||||
|
||||
.text
|
||||
glabel mp_watch_menu_display
|
||||
@@ -3003,7 +3003,7 @@ def_7F0C40C0:
|
||||
/* 0FA3B8 7F0C5888 AFAF0010 */ sw $t7, 0x10($sp)
|
||||
/* 0FA3BC 7F0C588C 00408825 */ move $s1, $v0
|
||||
/* 0FA3C0 7F0C5890 8FA400D4 */ lw $a0, 0xd4($sp)
|
||||
/* 0FA3C4 7F0C5894 0FC026D4 */ jal getplayerfavoredweapon
|
||||
/* 0FA3C4 7F0C5894 0FC026D4 */ jal frontGetPlayersFavoriteWeaponInHand
|
||||
/* 0FA3C8 7F0C5898 00002825 */ move $a1, $zero
|
||||
/* 0FA3CC 7F0C589C 3C188004 */ lui $t8, %hi(ptrFontBankGothic)
|
||||
/* 0FA3D0 7F0C58A0 8F180EAC */ lw $t8, %lo(ptrFontBankGothic)($t8)
|
||||
@@ -3513,6 +3513,7 @@ def_7F0C40C0:
|
||||
/* 0FAB6C 7F0C603C 8FB10038 */ lw $s1, 0x38($sp)
|
||||
/* 0FAB70 7F0C6040 03E00008 */ jr $ra
|
||||
/* 0FAB74 7F0C6044 27BD00D8 */ addiu $sp, $sp, 0xd8
|
||||
.size mp_watch_menu_display, . - mp_watch_menu_display
|
||||
)
|
||||
#endif
|
||||
|
||||
@@ -5178,7 +5179,7 @@ def_7F0C40C0:
|
||||
/* 0FB0A8 7F0C6538 AFAF0010 */ sw $t7, 0x10($sp)
|
||||
/* 0FB0AC 7F0C653C 00408825 */ move $s1, $v0
|
||||
/* 0FB0B0 7F0C6540 8FA400D4 */ lw $a0, 0xd4($sp)
|
||||
/* 0FB0B4 7F0C6544 0FC026DC */ jal getplayerfavoredweapon
|
||||
/* 0FB0B4 7F0C6544 0FC026DC */ jal frontGetPlayersFavoriteWeaponInHand
|
||||
/* 0FB0B8 7F0C6548 00002825 */ move $a1, $zero
|
||||
/* 0FB0BC 7F0C654C 3C198004 */ lui $t9, %hi(ptrFontBankGothic) # $t9, 0x8004
|
||||
/* 0FB0C0 7F0C6550 8F390EDC */ lw $t9, %lo(ptrFontBankGothic)($t9)
|
||||
@@ -7365,7 +7366,7 @@ text_exit:
|
||||
/* 0F7758 7F0C4D68 AFAF0010 */ sw $t7, 0x10($sp)
|
||||
/* 0F775C 7F0C4D6C 00408825 */ move $s1, $v0
|
||||
/* 0F7760 7F0C4D70 8FA400D4 */ lw $a0, 0xd4($sp)
|
||||
/* 0F7764 7F0C4D74 0FC02694 */ jal getplayerfavoredweapon
|
||||
/* 0F7764 7F0C4D74 0FC02694 */ jal frontGetPlayersFavoriteWeaponInHand
|
||||
/* 0F7768 7F0C4D78 00002825 */ move $a1, $zero
|
||||
/* 0F776C 7F0C4D7C 3C198004 */ lui $t9, %hi(ptrFontBankGothic) # $t9, 0x8004
|
||||
/* 0F7770 7F0C4D80 8F39AAFC */ lw $t9, %lo(ptrFontBankGothic)($t9)
|
||||
@@ -7896,7 +7897,7 @@ text_exit:
|
||||
|
||||
s32 sub_GAME_7F0C6048(void)
|
||||
{
|
||||
return g_gameOverFlag ? 0 : (g_CurrentPlayer->mpmenuon | (g_CurrentPlayer->healthdisplaytime > 0));
|
||||
return g_gameOverFlag ? FALSE : (g_CurrentPlayer->mpmenuon | (g_CurrentPlayer->healthdisplaytime > 0));
|
||||
}
|
||||
|
||||
s32 checkGamePaused(void) {
|
||||
|
||||
+14
-14
@@ -199,20 +199,20 @@ struct s_mp_weapon_set mp_weapon_set_golden[] =
|
||||
//D:800490F0
|
||||
struct s_mp_weapon_set_text mp_weapon_set_text_table[] =
|
||||
{
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_00), mp_weapon_set_slaps},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_01), mp_weapon_set_pistols},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_0D), mp_weapon_set_knife},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_02), mp_weapon_set_auto},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_03), mp_weapon_set_power},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_04), mp_weapon_set_sniper},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_05), mp_weapon_set_grenade},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_06), mp_weapon_set_remote_m},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_07), mp_weapon_set_glaunch},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_08), mp_weapon_set_timed_m},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_09), mp_weapon_set_prox_m},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_0A), mp_weapon_set_rockets},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_0B), mp_weapon_set_lasers},
|
||||
{TEXT(LMPWEAPONS, MPWEAPON_STR_0C), mp_weapon_set_golden}
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_00_SLAPPERSONLY), mp_weapon_set_slaps},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_01_PISTOLS), mp_weapon_set_pistols},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_0D_THROWINGKNIVES), mp_weapon_set_knife},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_02_AUTOMATICS), mp_weapon_set_auto},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_03_POWERWEAPONS), mp_weapon_set_power},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_04_SNIPERRIFLES), mp_weapon_set_sniper},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_05_GRENADES), mp_weapon_set_grenade},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_06_REMOTEMINES), mp_weapon_set_remote_m},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_07_GRENADELAUNCHERS), mp_weapon_set_glaunch},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_08_TIMEDMINES), mp_weapon_set_timed_m},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_09_PROXIMITYMINES), mp_weapon_set_prox_m},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_0A_ROCKETS), mp_weapon_set_rockets},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_0B_LASERS), mp_weapon_set_lasers},
|
||||
{getStringID(LMPWEAPONS, MPWEAPON_STR_0C_GOLDENGUN), mp_weapon_set_golden}
|
||||
};
|
||||
|
||||
s32 mp_weapon_set = 0xB;
|
||||
|
||||
+13
-5
@@ -16,11 +16,19 @@ struct s_mp_weapon_set
|
||||
* enum PROP
|
||||
*/
|
||||
s16 propID;
|
||||
s8 size;
|
||||
/**
|
||||
* Decimal portion of size, normalized to one byte. That is, 0x80 means 0.5.
|
||||
*/
|
||||
s8 size_frac;
|
||||
union
|
||||
{
|
||||
struct
|
||||
{
|
||||
s8 size;
|
||||
/**
|
||||
* Decimal portion of size, normalized to one byte. That is, 0x80 means 0.5.
|
||||
*/
|
||||
s8 size_frac;
|
||||
};
|
||||
|
||||
s16 size16;
|
||||
};
|
||||
#else
|
||||
/**
|
||||
* enum ITEM_IDS
|
||||
|
||||
+46
-95
@@ -1,5 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
#include "bondconstants.h"
|
||||
#include "random.h"
|
||||
|
||||
struct music_setup
|
||||
{
|
||||
@@ -87,103 +88,53 @@ s16 random_tracks[] = {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* NTSC address 0x7F0D2720.
|
||||
*/
|
||||
s32 getmusictrack_or_randomtrack(s32 arg0)
|
||||
{
|
||||
s32 index;
|
||||
|
||||
for (index = 0; music_setup_entries[index].stage_id != 0; index++)
|
||||
{
|
||||
if (music_setup_entries[index].stage_id == arg0)
|
||||
{
|
||||
s32 count;
|
||||
s32 result;
|
||||
|
||||
if (music_setup_entries[index].main_music == -1)
|
||||
{
|
||||
count = 0;
|
||||
while (random_tracks[count] != M_NONE)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void getmusictrack_or_randomtrack(void) {
|
||||
result = random_tracks[randomGetNext() % count];
|
||||
return result;
|
||||
}
|
||||
|
||||
result = music_setup_entries[index].main_music;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if(1)
|
||||
{
|
||||
s32 count;
|
||||
s32 result;
|
||||
|
||||
count = 0;
|
||||
|
||||
while (random_tracks[count] != M_NONE)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
|
||||
result = random_tracks[randomGetNext() % count];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel getmusictrack_or_randomtrack
|
||||
/* 107250 7F0D2720 3C0E8005 */ lui $t6, %hi(music_setup_entries)
|
||||
/* 107254 7F0D2724 85CEEB10 */ lh $t6, %lo(music_setup_entries)($t6)
|
||||
/* 107258 7F0D2728 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 10725C 7F0D272C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 107260 7F0D2730 11C0002A */ beqz $t6, .L7F0D27DC
|
||||
/* 107264 7F0D2734 3C0A8005 */ lui $t2, %hi(random_tracks)
|
||||
/* 107268 7F0D2738 3C0F8005 */ lui $t7, %hi(music_setup_entries)
|
||||
/* 10726C 7F0D273C 25E2EB10 */ addiu $v0, $t7, %lo(music_setup_entries)
|
||||
/* 107270 7F0D2740 84430000 */ lh $v1, ($v0)
|
||||
.L7F0D2744:
|
||||
/* 107274 7F0D2744 54830022 */ bnel $a0, $v1, .L7F0D27D0
|
||||
/* 107278 7F0D2748 84430008 */ lh $v1, 8($v0)
|
||||
/* 10727C 7F0D274C 84430002 */ lh $v1, 2($v0)
|
||||
/* 107280 7F0D2750 2401FFFF */ li $at, -1
|
||||
/* 107284 7F0D2754 3C188005 */ lui $t8, %hi(random_tracks)
|
||||
/* 107288 7F0D2758 1461001A */ bne $v1, $at, .L7F0D27C4
|
||||
/* 10728C 7F0D275C 00000000 */ nop
|
||||
/* 107290 7F0D2760 8718EBD0 */ lh $t8, %lo(random_tracks)($t8)
|
||||
/* 107294 7F0D2764 3C028005 */ lui $v0, %hi(random_tracks)
|
||||
/* 107298 7F0D2768 00001825 */ move $v1, $zero
|
||||
/* 10729C 7F0D276C 13000006 */ beqz $t8, .L7F0D2788
|
||||
/* 1072A0 7F0D2770 2442EBD0 */ addiu $v0, %lo(random_tracks) # addiu $v0, $v0, -0x1430
|
||||
/* 1072A4 7F0D2774 84590002 */ lh $t9, 2($v0)
|
||||
.L7F0D2778:
|
||||
/* 1072A8 7F0D2778 24630001 */ addiu $v1, $v1, 1
|
||||
/* 1072AC 7F0D277C 24420002 */ addiu $v0, $v0, 2
|
||||
/* 1072B0 7F0D2780 5720FFFD */ bnezl $t9, .L7F0D2778
|
||||
/* 1072B4 7F0D2784 84590002 */ lh $t9, 2($v0)
|
||||
.L7F0D2788:
|
||||
/* 1072B8 7F0D2788 0C002914 */ jal randomGetNext
|
||||
/* 1072BC 7F0D278C AFA30020 */ sw $v1, 0x20($sp)
|
||||
/* 1072C0 7F0D2790 8FA30020 */ lw $v1, 0x20($sp)
|
||||
/* 1072C4 7F0D2794 3C048005 */ lui $a0, %hi(random_tracks)
|
||||
/* 1072C8 7F0D2798 0043001B */ divu $zero, $v0, $v1
|
||||
/* 1072CC 7F0D279C 00004010 */ mfhi $t0
|
||||
/* 1072D0 7F0D27A0 00084840 */ sll $t1, $t0, 1
|
||||
/* 1072D4 7F0D27A4 00892021 */ addu $a0, $a0, $t1
|
||||
/* 1072D8 7F0D27A8 8484EBD0 */ lh $a0, %lo(random_tracks)($a0)
|
||||
/* 1072DC 7F0D27AC 14600002 */ bnez $v1, .L7F0D27B8
|
||||
/* 1072E0 7F0D27B0 00000000 */ nop
|
||||
/* 1072E4 7F0D27B4 0007000D */ break 7
|
||||
.L7F0D27B8:
|
||||
/* 1072E8 7F0D27B8 00801025 */ move $v0, $a0
|
||||
/* 1072EC 7F0D27BC 1000001F */ b .L7F0D283C
|
||||
/* 1072F0 7F0D27C0 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0D27C4:
|
||||
/* 1072F4 7F0D27C4 1000001C */ b .L7F0D2838
|
||||
/* 1072F8 7F0D27C8 00601025 */ move $v0, $v1
|
||||
/* 1072FC 7F0D27CC 84430008 */ lh $v1, 8($v0)
|
||||
.L7F0D27D0:
|
||||
/* 107300 7F0D27D0 24420008 */ addiu $v0, $v0, 8
|
||||
/* 107304 7F0D27D4 1460FFDB */ bnez $v1, .L7F0D2744
|
||||
/* 107308 7F0D27D8 00000000 */ nop
|
||||
.L7F0D27DC:
|
||||
/* 10730C 7F0D27DC 854AEBD0 */ lh $t2, %lo(random_tracks)($t2)
|
||||
/* 107310 7F0D27E0 3C028005 */ lui $v0, %hi(random_tracks)
|
||||
/* 107314 7F0D27E4 00001825 */ move $v1, $zero
|
||||
/* 107318 7F0D27E8 11400006 */ beqz $t2, .L7F0D2804
|
||||
/* 10731C 7F0D27EC 2442EBD0 */ addiu $v0, %lo(random_tracks) # addiu $v0, $v0, -0x1430
|
||||
/* 107320 7F0D27F0 844B0002 */ lh $t3, 2($v0)
|
||||
.L7F0D27F4:
|
||||
/* 107324 7F0D27F4 24630001 */ addiu $v1, $v1, 1
|
||||
/* 107328 7F0D27F8 24420002 */ addiu $v0, $v0, 2
|
||||
/* 10732C 7F0D27FC 5560FFFD */ bnezl $t3, .L7F0D27F4
|
||||
/* 107330 7F0D2800 844B0002 */ lh $t3, 2($v0)
|
||||
.L7F0D2804:
|
||||
/* 107334 7F0D2804 0C002914 */ jal randomGetNext
|
||||
/* 107338 7F0D2808 AFA30018 */ sw $v1, 0x18($sp)
|
||||
/* 10733C 7F0D280C 8FA30018 */ lw $v1, 0x18($sp)
|
||||
/* 107340 7F0D2810 3C048005 */ lui $a0, %hi(random_tracks)
|
||||
/* 107344 7F0D2814 0043001B */ divu $zero, $v0, $v1
|
||||
/* 107348 7F0D2818 00006010 */ mfhi $t4
|
||||
/* 10734C 7F0D281C 000C6840 */ sll $t5, $t4, 1
|
||||
/* 107350 7F0D2820 008D2021 */ addu $a0, $a0, $t5
|
||||
/* 107354 7F0D2824 8484EBD0 */ lh $a0, %lo(random_tracks)($a0)
|
||||
/* 107358 7F0D2828 14600002 */ bnez $v1, .L7F0D2834
|
||||
/* 10735C 7F0D282C 00000000 */ nop
|
||||
/* 107360 7F0D2830 0007000D */ break 7
|
||||
.L7F0D2834:
|
||||
/* 107364 7F0D2834 00801025 */ move $v0, $a0
|
||||
.L7F0D2838:
|
||||
/* 107368 7F0D2838 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0D283C:
|
||||
/* 10736C 7F0D283C 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 107370 7F0D2840 03E00008 */ jr $ra
|
||||
/* 107374 7F0D2844 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -216,4 +167,4 @@ s32 musicGetXTrackForStage(s32 stageID)
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,5 +4,6 @@
|
||||
|
||||
s32 musicGetBgTrackForStage(s32 stageID);
|
||||
s32 musicGetXTrackForStage(s32 stageID);
|
||||
s32 getmusictrack_or_randomtrack(s32 arg0);
|
||||
|
||||
#endif
|
||||
|
||||
+20
-20
@@ -19,7 +19,7 @@ s32 ob_c_debug_notice_list_entry = 0;
|
||||
|
||||
|
||||
#include <assets/obseg/file_resource_table.inc.c>
|
||||
/* struct fileentry file_resource_table[] =
|
||||
/* struct fileentry file_resource_table[] =
|
||||
{
|
||||
blah;
|
||||
};
|
||||
@@ -37,7 +37,7 @@ void load_resource(u8 *ptrdata, s32 bytes, fileentry *srcfile, resource_lookup
|
||||
u8 *source;
|
||||
u8 buffer[0x2100];
|
||||
s32 unused;
|
||||
|
||||
|
||||
|
||||
if (bytes == 0)
|
||||
{
|
||||
@@ -113,7 +113,7 @@ void resource_load_from_indy(u8 *ptrdata, s32 bytes, fileentry *srcfile, resou
|
||||
void obInit(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
||||
debTryAdd(&ob_c_debug_notice_list_entry,"ob_c_debug");
|
||||
for (i = file_entry_max-1; i > 1 ; i--)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ glabel obInit
|
||||
/* 0F1790 7F0BCC60 3C028009 */ lui $v0, %hi(resource_lookup_data_array+0x14)
|
||||
/* 0F1794 7F0BCC64 00037080 */ sll $t6, $v1, 2
|
||||
/* 0F1798 7F0BCC68 01C37021 */ addu $t6, $t6, $v1
|
||||
/* 0F179C 7F0BCC6C 3C0F8009 */ lui $t7, %hi(resource_lookup_data_array)
|
||||
/* 0F179C 7F0BCC6C 3C0F8009 */ lui $t7, %hi(resource_lookup_data_array)
|
||||
/* 0F17A0 7F0BCC70 25EF88B0 */ addiu $t7, %lo(resource_lookup_data_array) # addiu $t7, $t7, -0x7750
|
||||
/* 0F17A4 7F0BCC74 000E7080 */ sll $t6, $t6, 2
|
||||
/* 0F17A8 7F0BCC78 01CF2821 */ addu $a1, $t6, $t7
|
||||
@@ -171,7 +171,7 @@ glabel obInit
|
||||
/* 0F17DC 7F0BCCAC 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0F17E0 7F0BCCB0 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 0F17E4 7F0BCCB4 03E00008 */ jr $ra
|
||||
/* 0F17E8 7F0BCCB8 00000000 */ nop
|
||||
/* 0F17E8 7F0BCCB8 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
@@ -186,7 +186,7 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
|
||||
index = fileGetIndex(bgname);
|
||||
fileentry = &file_resource_table[index];
|
||||
|
||||
|
||||
if (resource_lookup_data_array[index].rom_size != 0)
|
||||
{
|
||||
//if the size of offset data would exceed file size, loop forever
|
||||
@@ -239,7 +239,7 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
|
||||
index = fileGetIndex(bgname);
|
||||
fileentry = &file_resource_table[index];
|
||||
|
||||
|
||||
if (resource_lookup_data_array[index].rom_size != 0)
|
||||
{
|
||||
//if the size of offset data would exceed file size, loop forever
|
||||
@@ -272,10 +272,10 @@ void *fileIndexLoadToBank(s32 index, FILELOADMETHOD loadMethod, s32 size, u8 ban
|
||||
// info->poolRemaining = bytes;
|
||||
}
|
||||
// bytes = info->poolRemaining;
|
||||
ptrdata = mempAllocBytesInBank(info->poolRemaining, bank); // get pointer to allocated space
|
||||
ptrdata = mempAllocBytesInBank(info->poolRemaining, bank); // get pointer to allocated space in bank
|
||||
info->rom_remaining = info->poolRemaining;
|
||||
|
||||
if (file_resource_table[index].hw_address == 0)
|
||||
if (file_resource_table[index].hw_address == 0) //IF NULL, check indy
|
||||
{
|
||||
resource_load_from_indy(ptrdata, info->poolRemaining, &file_resource_table[index], info);
|
||||
}
|
||||
@@ -392,7 +392,7 @@ void fileSetSize(s32 filenum, u8* ptr, u32 size, s32 reallocate)
|
||||
resource_lookup_data_array[filenum].rom_remaining = size;
|
||||
if (reallocate != 0)
|
||||
{
|
||||
mempAddEntryOfSizeToBank(ptr, resource_lookup_data_array[filenum].poolRemaining, 4U);
|
||||
mempAddEntryOfSizeToBank(ptr, resource_lookup_data_array[filenum].poolRemaining, MEMPOOL_STAGE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -400,7 +400,7 @@ void fileSetSize(s32 filenum, u8* ptr, u32 size, s32 reallocate)
|
||||
s32 get_pc_buffer_remaining_value(u8 *name)
|
||||
{
|
||||
int index;
|
||||
|
||||
|
||||
index = fileGetIndex(name);
|
||||
return resource_lookup_data_array[index].poolRemaining;
|
||||
}
|
||||
@@ -436,7 +436,7 @@ int fileGetIndex(u8 *resname)
|
||||
//if file exists, return index
|
||||
for (i = 1; i < file_entry_max; i++)
|
||||
{
|
||||
if ((file_resource_table[i].filename) &&
|
||||
if ((file_resource_table[i].filename) &&
|
||||
(strcmp(resname,file_resource_table[i].filename) == 0));
|
||||
{
|
||||
return i;
|
||||
@@ -519,13 +519,13 @@ glabel fileGetIndex
|
||||
/* 0F1E30 7F0BD300 00001025 */ move $v0, $zero
|
||||
.L7F0BD304:
|
||||
/* 0F1E34 7F0BD304 01F17823 */ subu $t7, $t7, $s1
|
||||
/* 0F1E38 7F0BD308 3C188004 */ lui $t8, %hi(file_resource_table)
|
||||
/* 0F1E38 7F0BD308 3C188004 */ lui $t8, %hi(file_resource_table)
|
||||
/* 0F1E3C 7F0BD30C 27186054 */ addiu $t8, %lo(file_resource_table) # addiu $t8, $t8, 0x6054
|
||||
/* 0F1E40 7F0BD310 000F7880 */ sll $t7, $t7, 2
|
||||
/* 0F1E44 7F0BD314 0011C880 */ sll $t9, $s1, 2
|
||||
/* 0F1E48 7F0BD318 01F88021 */ addu $s0, $t7, $t8
|
||||
/* 0F1E4C 7F0BD31C 0331C821 */ addu $t9, $t9, $s1
|
||||
/* 0F1E50 7F0BD320 3C088009 */ lui $t0, %hi(resource_lookup_data_array)
|
||||
/* 0F1E50 7F0BD320 3C088009 */ lui $t0, %hi(resource_lookup_data_array)
|
||||
/* 0F1E54 7F0BD324 250888B0 */ addiu $t0, %lo(resource_lookup_data_array) # addiu $t0, $t0, -0x7750
|
||||
/* 0F1E58 7F0BD328 0019C880 */ sll $t9, $t9, 2
|
||||
/* 0F1E5C 7F0BD32C AE110000 */ sw $s1, ($s0)
|
||||
@@ -665,7 +665,7 @@ void removed_loop_handle_filetable_entries(void)
|
||||
void removed_loop_filetableentries(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
||||
for (i = 1; (i < file_entry_max); i++)
|
||||
{
|
||||
;
|
||||
@@ -681,8 +681,8 @@ void removed_loop_filetableentries(void)
|
||||
void sub_GAME_7F0BD410(void)
|
||||
{
|
||||
struct resource_lookup_data_entry *entry= &resource_lookup_data_array[1];
|
||||
|
||||
if (file_entry_max > 1)
|
||||
|
||||
if (file_entry_max > 1)
|
||||
{
|
||||
for (;&resource_lookup_data_array[file_entry_max] > entry;entry++)
|
||||
{
|
||||
@@ -703,7 +703,7 @@ glabel sub_GAME_7F0BD410
|
||||
/* 0F1F54 7F0BD424 1420000A */ bnez $at, .L7F0BD450
|
||||
/* 0F1F58 7F0BD428 00037080 */ sll $t6, $v1, 2
|
||||
/* 0F1F5C 7F0BD42C 01C37021 */ addu $t6, $t6, $v1
|
||||
/* 0F1F60 7F0BD430 3C0F8009 */ lui $t7, %hi(resource_lookup_data_array)
|
||||
/* 0F1F60 7F0BD430 3C0F8009 */ lui $t7, %hi(resource_lookup_data_array)
|
||||
/* 0F1F64 7F0BD434 25EF88B0 */ addiu $t7, %lo(resource_lookup_data_array) # addiu $t7, $t7, -0x7750
|
||||
/* 0F1F68 7F0BD438 000E7080 */ sll $t6, $t6, 2
|
||||
/* 0F1F6C 7F0BD43C 01CF2021 */ addu $a0, $t6, $t7
|
||||
@@ -714,9 +714,9 @@ glabel sub_GAME_7F0BD410
|
||||
/* 0F1F7C 7F0BD44C 24420014 */ addiu $v0, $v0, 0x14
|
||||
.L7F0BD450:
|
||||
/* 0F1F80 7F0BD450 03E00008 */ jr $ra
|
||||
/* 0F1F84 7F0BD454 00000000 */ nop
|
||||
/* 0F1F84 7F0BD454 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -45,5 +45,9 @@ void *_fileIndexLoadToBank(s32 index, FILELOADMETHOD param_2, s32 size, u8 bank)
|
||||
#endif
|
||||
|
||||
s32 get_pc_buffer_remaining_value(u8 *name);
|
||||
s32 get_rom_remaining_buffer_for_index(s32 index);
|
||||
s32 get_pc_remaining_buffer_for_index(s32 index);
|
||||
s32 fileGetIndex(char *resname);
|
||||
s32 get_pc_remaining_buffer_for_index(s32 index);
|
||||
|
||||
#endif
|
||||
|
||||
+189
-68
@@ -51,9 +51,9 @@ char dword_CODE_bss_80076AE0[0x2E28];
|
||||
char dword_CODE_bss_80079908[0x28];
|
||||
|
||||
//CODE.bss:80079930
|
||||
void * ptr_allocation_0;
|
||||
struct ptr_0_s *ptr_allocation_0;
|
||||
//CODE.bss:80079934
|
||||
void * ptr_allocation_1;
|
||||
struct ptr_1_s *ptr_allocation_1;
|
||||
|
||||
|
||||
// data
|
||||
@@ -347,7 +347,7 @@ glabel sub_GAME_7F06B120
|
||||
/* 09FC94 7F06B164 00380821 */ addu $at, $at, $t8
|
||||
/* 09FC98 7F06B168 8C384490 */ lw $t8, %lo(jpt_80054490)($at)
|
||||
/* 09FC9C 7F06B16C 03000008 */ jr $t8
|
||||
/* 09FCA0 7F06B170 00000000 */ nop
|
||||
/* 09FCA0 7F06B170 00000000 */ nop
|
||||
loc_CODE_7F06B174:
|
||||
/* 09FCA4 7F06B174 AC650000 */ sw $a1, ($v1)
|
||||
/* 09FCA8 7F06B178 AC620004 */ sw $v0, 4($v1)
|
||||
@@ -359,12 +359,12 @@ def_7F06B16C:
|
||||
/* 09FCB8 7F06B188 8C440014 */ lw $a0, 0x14($v0)
|
||||
.L7F06B18C:
|
||||
/* 09FCBC 7F06B18C 10800003 */ beqz $a0, .L7F06B19C
|
||||
/* 09FCC0 7F06B190 00000000 */ nop
|
||||
/* 09FCC0 7F06B190 00000000 */ nop
|
||||
/* 09FCC4 7F06B194 1000000B */ b .L7F06B1C4
|
||||
/* 09FCC8 7F06B198 00801025 */ move $v0, $a0
|
||||
.L7F06B19C:
|
||||
/* 09FCCC 7F06B19C 10400009 */ beqz $v0, .L7F06B1C4
|
||||
/* 09FCD0 7F06B1A0 00000000 */ nop
|
||||
/* 09FCD0 7F06B1A0 00000000 */ nop
|
||||
/* 09FCD4 7F06B1A4 8C44000C */ lw $a0, 0xc($v0)
|
||||
.L7F06B1A8:
|
||||
/* 09FCD8 7F06B1A8 50800004 */ beql $a0, $zero, .L7F06B1BC
|
||||
@@ -383,7 +383,7 @@ def_7F06B16C:
|
||||
/* 09FD04 7F06B1D4 8CE20000 */ lw $v0, ($a3)
|
||||
.L7F06B1D8:
|
||||
/* 09FD08 7F06B1D8 10620019 */ beq $v1, $v0, .L7F06B240
|
||||
/* 09FD0C 7F06B1DC 00000000 */ nop
|
||||
/* 09FD0C 7F06B1DC 00000000 */ nop
|
||||
/* 09FD10 7F06B1E0 50C0000F */ beql $a2, $zero, .L7F06B220
|
||||
/* 09FD14 7F06B1E4 00403025 */ move $a2, $v0
|
||||
/* 09FD18 7F06B1E8 8CD9000C */ lw $t9, 0xc($a2)
|
||||
@@ -452,7 +452,7 @@ glabel sub_GAME_7F06B248
|
||||
/* 09FDC0 7F06B290 ACC40000 */ sw $a0, ($a2)
|
||||
.L7F06B294:
|
||||
/* 09FDC4 7F06B294 03E00008 */ jr $ra
|
||||
/* 09FDC8 7F06B298 00000000 */ nop
|
||||
/* 09FDC8 7F06B298 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
@@ -490,6 +490,7 @@ glabel jpt_800544E4
|
||||
.word .L7F06B6A4
|
||||
.word .L7F06B6A4
|
||||
.word .L7F06B428
|
||||
.size jpt_800544E4, . - jpt_800544E4
|
||||
|
||||
.text
|
||||
glabel sub_GAME_7F06B29C
|
||||
@@ -504,7 +505,7 @@ glabel sub_GAME_7F06B29C
|
||||
/* 09FDEC 7F06B2BC AFA00110 */ sw $zero, 0x110($sp)
|
||||
/* 09FDF0 7F06B2C0 3C013F00 */ li $at, 0x3F000000 # 0.500000
|
||||
/* 09FDF4 7F06B2C4 4481A000 */ mtc1 $at, $f20
|
||||
/* 09FDF8 7F06B2C8 00000000 */ nop
|
||||
/* 09FDF8 7F06B2C8 00000000 */ nop
|
||||
/* 09FDFC 7F06B2CC 8E300004 */ lw $s0, 4($s1)
|
||||
.L7F06B2D0:
|
||||
/* 09FE00 7F06B2D0 96020000 */ lhu $v0, ($s0)
|
||||
@@ -518,7 +519,7 @@ glabel sub_GAME_7F06B29C
|
||||
/* 09FE20 7F06B2F0 8C3944E4 */ lw $t9, %lo(jpt_800544E4)($at)
|
||||
.L7F06B2F4:
|
||||
/* 09FE24 7F06B2F4 03200008 */ jr $t9
|
||||
/* 09FE28 7F06B2F8 00000000 */ nop
|
||||
/* 09FE28 7F06B2F8 00000000 */ nop
|
||||
.L7F06B2FC:
|
||||
/* 09FE2C 7F06B2FC 8E020004 */ lw $v0, 4($s0)
|
||||
/* 09FE30 7F06B300 8E240000 */ lw $a0, ($s1)
|
||||
@@ -662,9 +663,9 @@ glabel sub_GAME_7F06B29C
|
||||
/* 0A0038 7F06B508 460A0480 */ add.s $f18, $f0, $f10
|
||||
/* 0A003C 7F06B50C 46009487 */ neg.s $f18, $f18
|
||||
/* 0A0040 7F06B510 4612803C */ c.lt.s $f16, $f18
|
||||
/* 0A0044 7F06B514 00000000 */ nop
|
||||
/* 0A0044 7F06B514 00000000 */ nop
|
||||
/* 0A0048 7F06B518 45000003 */ bc1f .L7F06B528
|
||||
/* 0A004C 7F06B51C 00000000 */ nop
|
||||
/* 0A004C 7F06B51C 00000000 */ nop
|
||||
/* 0A0050 7F06B520 10000060 */ b .L7F06B6A4
|
||||
/* 0A0054 7F06B524 E6300008 */ swc1 $f16, 8($s1)
|
||||
.L7F06B528:
|
||||
@@ -814,11 +815,11 @@ def_7F06B2F4:
|
||||
/* 0A0278 7F06B748 8C640004 */ lw $a0, 4($v1)
|
||||
.L7F06B74C:
|
||||
/* 0A027C 7F06B74C 16240002 */ bne $s1, $a0, .L7F06B758
|
||||
/* 0A0280 7F06B750 00000000 */ nop
|
||||
/* 0A0280 7F06B750 00000000 */ nop
|
||||
/* 0A0284 7F06B754 00605025 */ move $t2, $v1
|
||||
.L7F06B758:
|
||||
/* 0A0288 7F06B758 14E40002 */ bne $a3, $a0, .L7F06B764
|
||||
/* 0A028C 7F06B75C 00000000 */ nop
|
||||
/* 0A028C 7F06B75C 00000000 */ nop
|
||||
/* 0A0290 7F06B760 00604825 */ move $t1, $v1
|
||||
.L7F06B764:
|
||||
/* 0A0294 7F06B764 55040003 */ bnel $t0, $a0, .L7F06B774
|
||||
@@ -907,13 +908,13 @@ def_7F06B2F4:
|
||||
/* 0A03D8 7F06B8A8 C7A60050 */ lwc1 $f6, 0x50($sp)
|
||||
/* 0A03DC 7F06B8AC 46062202 */ mul.s $f8, $f4, $f6
|
||||
/* 0A03E0 7F06B8B0 44802000 */ mtc1 $zero, $f4
|
||||
/* 0A03E4 7F06B8B4 00000000 */ nop
|
||||
/* 0A03E4 7F06B8B4 00000000 */ nop
|
||||
/* 0A03E8 7F06B8B8 4604103C */ c.lt.s $f2, $f4
|
||||
/* 0A03EC 7F06B8BC 460A4480 */ add.s $f18, $f8, $f10
|
||||
/* 0A03F0 7F06B8C0 45020018 */ bc1fl .L7F06B924
|
||||
/* 0A03F4 7F06B8C4 44803000 */ mtc1 $zero, $f6
|
||||
/* 0A03F8 7F06B8C8 460E803C */ c.lt.s $f16, $f14
|
||||
/* 0A03FC 7F06B8CC 00000000 */ nop
|
||||
/* 0A03FC 7F06B8CC 00000000 */ nop
|
||||
/* 0A0400 7F06B8D0 4502000B */ bc1fl .L7F06B900
|
||||
/* 0A0404 7F06B8D4 4614703C */ c.lt.s $f14, $f20
|
||||
/* 0A0408 7F06B8D8 4614803C */ c.lt.s $f16, $f20
|
||||
@@ -937,9 +938,9 @@ def_7F06B2F4:
|
||||
/* 0A044C 7F06B91C E5A40008 */ swc1 $f4, 8($t5)
|
||||
/* 0A0450 7F06B920 44803000 */ mtc1 $zero, $f6
|
||||
.L7F06B924:
|
||||
/* 0A0454 7F06B924 00000000 */ nop
|
||||
/* 0A0454 7F06B924 00000000 */ nop
|
||||
/* 0A0458 7F06B928 4602303E */ c.le.s $f6, $f2
|
||||
/* 0A045C 7F06B92C 00000000 */ nop
|
||||
/* 0A045C 7F06B92C 00000000 */ nop
|
||||
/* 0A0460 7F06B930 4502001C */ bc1fl .L7F06B9A4
|
||||
/* 0A0464 7F06B934 44802000 */ mtc1 $zero, $f4
|
||||
/* 0A0468 7F06B938 460EA03C */ c.lt.s $f20, $f14
|
||||
@@ -947,12 +948,12 @@ def_7F06B2F4:
|
||||
/* 0A0470 7F06B940 45020006 */ bc1fl .L7F06B95C
|
||||
/* 0A0474 7F06B944 4610A03C */ c.lt.s $f20, $f16
|
||||
/* 0A0478 7F06B948 44814000 */ mtc1 $at, $f8
|
||||
/* 0A047C 7F06B94C 00000000 */ nop
|
||||
/* 0A047C 7F06B94C 00000000 */ nop
|
||||
/* 0A0480 7F06B950 4608A281 */ sub.s $f10, $f20, $f8
|
||||
/* 0A0484 7F06B954 E54A0008 */ swc1 $f10, 8($t2)
|
||||
/* 0A0488 7F06B958 4610A03C */ c.lt.s $f20, $f16
|
||||
.L7F06B95C:
|
||||
/* 0A048C 7F06B95C 00000000 */ nop
|
||||
/* 0A048C 7F06B95C 00000000 */ nop
|
||||
/* 0A0490 7F06B960 45020010 */ bc1fl .L7F06B9A4
|
||||
/* 0A0494 7F06B964 44802000 */ mtc1 $zero, $f4
|
||||
/* 0A0498 7F06B968 460E803C */ c.lt.s $f16, $f14
|
||||
@@ -961,13 +962,13 @@ def_7F06B2F4:
|
||||
/* 0A04A4 7F06B974 44814000 */ mtc1 $at, $f8
|
||||
/* 0A04A8 7F06B978 3C0138C0 */ li $at, 0x38C00000 # 0.000092
|
||||
/* 0A04AC 7F06B97C 44812000 */ mtc1 $at, $f4
|
||||
/* 0A04B0 7F06B980 00000000 */ nop
|
||||
/* 0A04B0 7F06B980 00000000 */ nop
|
||||
/* 0A04B4 7F06B984 4604A181 */ sub.s $f6, $f20, $f4
|
||||
/* 0A04B8 7F06B988 10000005 */ b .L7F06B9A0
|
||||
/* 0A04BC 7F06B98C E5660008 */ swc1 $f6, 8($t3)
|
||||
/* 0A04C0 7F06B990 44814000 */ mtc1 $at, $f8
|
||||
.L7F06B994:
|
||||
/* 0A04C4 7F06B994 00000000 */ nop
|
||||
/* 0A04C4 7F06B994 00000000 */ nop
|
||||
/* 0A04C8 7F06B998 4608A281 */ sub.s $f10, $f20, $f8
|
||||
/* 0A04CC 7F06B99C E56A0008 */ swc1 $f10, 8($t3)
|
||||
.L7F06B9A0:
|
||||
@@ -975,17 +976,17 @@ def_7F06B2F4:
|
||||
.L7F06B9A4:
|
||||
/* 0A04D4 7F06B9A4 8FAE0110 */ lw $t6, 0x110($sp)
|
||||
/* 0A04D8 7F06B9A8 4604903C */ c.lt.s $f18, $f4
|
||||
/* 0A04DC 7F06B9AC 00000000 */ nop
|
||||
/* 0A04DC 7F06B9AC 00000000 */ nop
|
||||
/* 0A04E0 7F06B9B0 45020033 */ bc1fl .L7F06BA80
|
||||
/* 0A04E4 7F06B9B4 44802000 */ mtc1 $zero, $f4
|
||||
/* 0A04E8 7F06B9B8 C5C20008 */ lwc1 $f2, 8($t6)
|
||||
/* 0A04EC 7F06B9BC 4602603C */ c.lt.s $f12, $f2
|
||||
/* 0A04F0 7F06B9C0 00000000 */ nop
|
||||
/* 0A04F0 7F06B9C0 00000000 */ nop
|
||||
/* 0A04F4 7F06B9C4 45020053 */ bc1fl .L7F06BB14
|
||||
/* 0A04F8 7F06B9C8 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0A04FC 7F06B9CC C5400008 */ lwc1 $f0, 8($t2)
|
||||
/* 0A0500 7F06B9D0 4602003C */ c.lt.s $f0, $f2
|
||||
/* 0A0504 7F06B9D4 00000000 */ nop
|
||||
/* 0A0504 7F06B9D4 00000000 */ nop
|
||||
/* 0A0508 7F06B9D8 4502000C */ bc1fl .L7F06BA0C
|
||||
/* 0A050C 7F06B9DC C5600008 */ lwc1 $f0, 8($t3)
|
||||
/* 0A0510 7F06B9E0 4600603C */ c.lt.s $f12, $f0
|
||||
@@ -993,7 +994,7 @@ def_7F06B2F4:
|
||||
/* 0A0518 7F06B9E8 45020008 */ bc1fl .L7F06BA0C
|
||||
/* 0A051C 7F06B9EC C5600008 */ lwc1 $f0, 8($t3)
|
||||
/* 0A0520 7F06B9F0 44813000 */ mtc1 $at, $f6
|
||||
/* 0A0524 7F06B9F4 00000000 */ nop
|
||||
/* 0A0524 7F06B9F4 00000000 */ nop
|
||||
/* 0A0528 7F06B9F8 46066201 */ sub.s $f8, $f12, $f6
|
||||
/* 0A052C 7F06B9FC E5480008 */ swc1 $f8, 8($t2)
|
||||
/* 0A0530 7F06BA00 8FAF0110 */ lw $t7, 0x110($sp)
|
||||
@@ -1001,11 +1002,11 @@ def_7F06B2F4:
|
||||
/* 0A0538 7F06BA08 C5600008 */ lwc1 $f0, 8($t3)
|
||||
.L7F06BA0C:
|
||||
/* 0A053C 7F06BA0C 4602003C */ c.lt.s $f0, $f2
|
||||
/* 0A0540 7F06BA10 00000000 */ nop
|
||||
/* 0A0540 7F06BA10 00000000 */ nop
|
||||
/* 0A0544 7F06BA14 45020014 */ bc1fl .L7F06BA68
|
||||
/* 0A0548 7F06BA18 3C013780 */ lui $at, 0x3780
|
||||
/* 0A054C 7F06BA1C 4600603C */ c.lt.s $f12, $f0
|
||||
/* 0A0550 7F06BA20 00000000 */ nop
|
||||
/* 0A0550 7F06BA20 00000000 */ nop
|
||||
/* 0A0554 7F06BA24 45020010 */ bc1fl .L7F06BA68
|
||||
/* 0A0558 7F06BA28 3C013780 */ li $at, 0x37800000 # 0.000015
|
||||
/* 0A055C 7F06BA2C 460E803C */ c.lt.s $f16, $f14
|
||||
@@ -1014,13 +1015,13 @@ def_7F06B2F4:
|
||||
/* 0A0568 7F06BA38 44813000 */ mtc1 $at, $f6
|
||||
/* 0A056C 7F06BA3C 3C0138C0 */ li $at, 0x38C00000 # 0.000092
|
||||
/* 0A0570 7F06BA40 44815000 */ mtc1 $at, $f10
|
||||
/* 0A0574 7F06BA44 00000000 */ nop
|
||||
/* 0A0574 7F06BA44 00000000 */ nop
|
||||
/* 0A0578 7F06BA48 460A6101 */ sub.s $f4, $f12, $f10
|
||||
/* 0A057C 7F06BA4C 10000005 */ b .L7F06BA64
|
||||
/* 0A0580 7F06BA50 E5640008 */ swc1 $f4, 8($t3)
|
||||
/* 0A0584 7F06BA54 44813000 */ mtc1 $at, $f6
|
||||
.L7F06BA58:
|
||||
/* 0A0588 7F06BA58 00000000 */ nop
|
||||
/* 0A0588 7F06BA58 00000000 */ nop
|
||||
/* 0A058C 7F06BA5C 46066201 */ sub.s $f8, $f12, $f6
|
||||
/* 0A0590 7F06BA60 E5680008 */ swc1 $f8, 8($t3)
|
||||
.L7F06BA64:
|
||||
@@ -1035,13 +1036,13 @@ def_7F06B2F4:
|
||||
.L7F06BA80:
|
||||
/* 0A05B0 7F06BA80 8FB90110 */ lw $t9, 0x110($sp)
|
||||
/* 0A05B4 7F06BA84 4612203E */ c.le.s $f4, $f18
|
||||
/* 0A05B8 7F06BA88 00000000 */ nop
|
||||
/* 0A05B8 7F06BA88 00000000 */ nop
|
||||
/* 0A05BC 7F06BA8C 45020021 */ bc1fl .L7F06BB14
|
||||
/* 0A05C0 7F06BA90 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0A05C4 7F06BA94 C7220008 */ lwc1 $f2, 8($t9)
|
||||
/* 0A05C8 7F06BA98 3C013780 */ li $at, 0x37800000 # 0.000015
|
||||
/* 0A05CC 7F06BA9C 460C103C */ c.lt.s $f2, $f12
|
||||
/* 0A05D0 7F06BAA0 00000000 */ nop
|
||||
/* 0A05D0 7F06BAA0 00000000 */ nop
|
||||
/* 0A05D4 7F06BAA4 4502001B */ bc1fl .L7F06BB14
|
||||
/* 0A05D8 7F06BAA8 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0A05DC 7F06BAAC 44819000 */ mtc1 $at, $f18
|
||||
@@ -1052,7 +1053,7 @@ def_7F06B2F4:
|
||||
/* 0A05F0 7F06BAC0 C5400008 */ lwc1 $f0, 8($t2)
|
||||
/* 0A05F4 7F06BAC4 C5280008 */ lwc1 $f8, 8($t1)
|
||||
/* 0A05F8 7F06BAC8 4608003C */ c.lt.s $f0, $f8
|
||||
/* 0A05FC 7F06BACC 00000000 */ nop
|
||||
/* 0A05FC 7F06BACC 00000000 */ nop
|
||||
/* 0A0600 7F06BAD0 45020004 */ bc1fl .L7F06BAE4
|
||||
/* 0A0604 7F06BAD4 4610603C */ c.lt.s $f12, $f16
|
||||
/* 0A0608 7F06BAD8 46120281 */ sub.s $f10, $f0, $f18
|
||||
@@ -1060,13 +1061,13 @@ def_7F06B2F4:
|
||||
.L7F06BAE0:
|
||||
/* 0A0610 7F06BAE0 4610603C */ c.lt.s $f12, $f16
|
||||
.L7F06BAE4:
|
||||
/* 0A0614 7F06BAE4 00000000 */ nop
|
||||
/* 0A0614 7F06BAE4 00000000 */ nop
|
||||
/* 0A0618 7F06BAE8 4502000A */ bc1fl .L7F06BB14
|
||||
/* 0A061C 7F06BAEC 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0A0620 7F06BAF0 C5600008 */ lwc1 $f0, 8($t3)
|
||||
/* 0A0624 7F06BAF4 C5240008 */ lwc1 $f4, 8($t1)
|
||||
/* 0A0628 7F06BAF8 4604003C */ c.lt.s $f0, $f4
|
||||
/* 0A062C 7F06BAFC 00000000 */ nop
|
||||
/* 0A062C 7F06BAFC 00000000 */ nop
|
||||
/* 0A0630 7F06BB00 45020004 */ bc1fl .L7F06BB14
|
||||
/* 0A0634 7F06BB04 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0A0638 7F06BB08 46120181 */ sub.s $f6, $f0, $f18
|
||||
@@ -1123,7 +1124,7 @@ glabel sub_GAME_7F06BB28
|
||||
/* 0A06B4 7F06BB84 C4820008 */ lwc1 $f2, 8($a0)
|
||||
.L7F06BB88:
|
||||
/* 0A06B8 7F06BB88 4602003C */ c.lt.s $f0, $f2
|
||||
/* 0A06BC 7F06BB8C 00000000 */ nop
|
||||
/* 0A06BC 7F06BB8C 00000000 */ nop
|
||||
/* 0A06C0 7F06BB90 45020004 */ bc1fl .L7F06BBA4
|
||||
/* 0A06C4 7F06BB94 8C84000C */ lw $a0, 0xc($a0)
|
||||
/* 0A06C8 7F06BB98 46001006 */ mov.s $f0, $f2
|
||||
@@ -1134,7 +1135,7 @@ glabel sub_GAME_7F06BB28
|
||||
/* 0A06D8 7F06BBA8 C4820008 */ lwc1 $f2, 8($a0)
|
||||
.L7F06BBAC:
|
||||
/* 0A06DC 7F06BBAC 1040000E */ beqz $v0, .L7F06BBE8
|
||||
/* 0A06E0 7F06BBB0 00000000 */ nop
|
||||
/* 0A06E0 7F06BBB0 00000000 */ nop
|
||||
/* 0A06E4 7F06BBB4 8C4F0010 */ lw $t7, 0x10($v0)
|
||||
/* 0A06E8 7F06BBB8 8C58000C */ lw $t8, 0xc($v0)
|
||||
/* 0A06EC 7F06BBBC 00402825 */ move $a1, $v0
|
||||
@@ -1176,9 +1177,124 @@ const char aDrawjointlistObjectNotInitialised0[] = "drawjointlist: object not in
|
||||
#endif
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void drawjointlist(void) {
|
||||
void drawjointlist(ModelRenderData *mrData, void *field_20)
|
||||
{
|
||||
Model *temp_a2;
|
||||
ModelFileHeader *mfhModel;
|
||||
ModelNode *temp_s1;
|
||||
ModelNode *temp_v0_2;
|
||||
ModelNode *temp_v0_3;
|
||||
ModelNode *var_s0;
|
||||
s32 temp_t3;
|
||||
s32 var_s2;
|
||||
u64 *temp_v0;
|
||||
|
||||
|
||||
|
||||
if (mrData->gdl == NULL)
|
||||
{
|
||||
osSyncPrintf(&aDrawjointlistNoGfxlist);
|
||||
exit();
|
||||
}
|
||||
if (field_20 != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
temp_a2 = field_20->unk0;
|
||||
temp_s1 = field_20->unk4;
|
||||
mfhModel = temp_a2->obj;
|
||||
var_s0 = temp_s1;
|
||||
if (mfhModel == NULL)
|
||||
{
|
||||
osSyncPrintf(&aDrawjointlistNoObject0xX, temp_a2, temp_a2);
|
||||
exit();
|
||||
mfhModel = field_20->unk0->obj;
|
||||
}
|
||||
if (mfhModel->isLoaded == 0)
|
||||
{
|
||||
osSyncPrintf(&aDrawjointlistObjectNotInitialised0, mfhModel);
|
||||
exit();
|
||||
}
|
||||
if (mrData->unk18 != 0)
|
||||
{
|
||||
if (field_20->unk8 < getjointsize(field_20->unk0, temp_s1))
|
||||
{
|
||||
var_s0 = NULL;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_v0 = mrData->gdl;
|
||||
mrData->gdl = temp_v0 + 8;
|
||||
temp_v0->unk0 = 0xBC000C06;
|
||||
temp_v0->unk4 = osVirtualToPhysical(field_20->unk0->unk0c, temp_s1);
|
||||
}
|
||||
if (var_s0 != NULL)
|
||||
{
|
||||
do
|
||||
{
|
||||
var_s2 = 1;
|
||||
temp_t3 = var_s0->Opcode & 0xFF;
|
||||
switch (temp_t3)
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 21:
|
||||
if (var_s0 == temp_s1)
|
||||
{
|
||||
sub_GAME_7F074534(mrData, field_20->unk0, var_s0);
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s2 = 0;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
sub_GAME_7F074534(mrData, field_20->unk0, var_s0);
|
||||
break;
|
||||
}
|
||||
if ((var_s2 != 0) && (temp_v0_2 = var_s0->Child, (temp_v0_2 != NULL)))
|
||||
{
|
||||
var_s0 = temp_v0_2;
|
||||
}
|
||||
else if (var_s0 != NULL)
|
||||
{
|
||||
loop_22:
|
||||
if (var_s0 == temp_s1)
|
||||
{
|
||||
var_s0 = NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
temp_v0_3 = var_s0->Next;
|
||||
if (temp_v0_3 != NULL)
|
||||
{
|
||||
var_s0 = temp_v0_3;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s0 = var_s0->Parent;
|
||||
if (var_s0 != NULL)
|
||||
{
|
||||
goto loop_22;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} while (var_s0 != NULL);
|
||||
}
|
||||
field_20 = field_20->unkC;
|
||||
} while (field_20 != NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
#ifndef VERSION_EU
|
||||
GLOBAL_ASM(
|
||||
@@ -1227,7 +1343,7 @@ glabel drawjointlist
|
||||
/* 0A076C 7F06BC3C 0C0033D1 */ jal osSyncPrintf
|
||||
/* 0A0770 7F06BC40 24844420 */ addiu $a0, %lo(aDrawjointlistNoGfxlist) # addiu $a0, $a0, 0x4420
|
||||
/* 0A0774 7F06BC44 0FC1B11B */ jal return_null
|
||||
/* 0A0778 7F06BC48 00000000 */ nop
|
||||
/* 0A0778 7F06BC48 00000000 */ nop
|
||||
.L7F06BC4C:
|
||||
/* 0A077C 7F06BC4C 52600065 */ beql $s3, $zero, .L7F06BDE4
|
||||
/* 0A0780 7F06BC50 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
@@ -1243,7 +1359,7 @@ glabel drawjointlist
|
||||
/* 0A07A4 7F06BC74 0C0033D1 */ jal osSyncPrintf
|
||||
/* 0A07A8 7F06BC78 00C02825 */ move $a1, $a2
|
||||
/* 0A07AC 7F06BC7C 0FC1B11B */ jal return_null
|
||||
/* 0A07B0 7F06BC80 00000000 */ nop
|
||||
/* 0A07B0 7F06BC80 00000000 */ nop
|
||||
/* 0A07B4 7F06BC84 8E6F0000 */ lw $t7, ($s3)
|
||||
/* 0A07B8 7F06BC88 8DE50008 */ lw $a1, 8($t7)
|
||||
/* 0A07BC 7F06BC8C 8CB8001C */ lw $t8, 0x1c($a1)
|
||||
@@ -1254,7 +1370,7 @@ glabel drawjointlist
|
||||
/* 0A07CC 7F06BC9C 0C0033D1 */ jal osSyncPrintf
|
||||
/* 0A07D0 7F06BCA0 24844460 */ addiu $a0, %lo(aDrawjointlistObjectNotInitialised0) # addiu $a0, $a0, 0x4460
|
||||
/* 0A07D4 7F06BCA4 0FC1B11B */ jal return_null
|
||||
/* 0A07D8 7F06BCA8 00000000 */ nop
|
||||
/* 0A07D8 7F06BCA8 00000000 */ nop
|
||||
/* 0A07DC 7F06BCAC 8E990018 */ lw $t9, 0x18($s4)
|
||||
.L7F06BCB0:
|
||||
/* 0A07E0 7F06BCB0 02202825 */ move $a1, $s1
|
||||
@@ -1264,9 +1380,9 @@ glabel drawjointlist
|
||||
/* 0A07F0 7F06BCC0 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A07F4 7F06BCC4 C6640008 */ lwc1 $f4, 8($s3)
|
||||
/* 0A07F8 7F06BCC8 4600203C */ c.lt.s $f4, $f0
|
||||
/* 0A07FC 7F06BCCC 00000000 */ nop
|
||||
/* 0A07FC 7F06BCCC 00000000 */ nop
|
||||
/* 0A0800 7F06BCD0 4500000E */ bc1f .L7F06BD0C
|
||||
/* 0A0804 7F06BCD4 00000000 */ nop
|
||||
/* 0A0804 7F06BCD4 00000000 */ nop
|
||||
/* 0A0808 7F06BCD8 1000000C */ b .L7F06BD0C
|
||||
/* 0A080C 7F06BCDC 00008025 */ move $s0, $zero
|
||||
/* 0A0810 7F06BCE0 8E82000C */ lw $v0, 0xc($s4)
|
||||
@@ -1297,7 +1413,7 @@ glabel drawjointlist
|
||||
/* 0A0868 7F06BD38 8C2C4538 */ lw $t4, %lo(obj_table_jointlist)($at)
|
||||
.L7F06BD3C:
|
||||
/* 0A086C 7F06BD3C 01800008 */ jr $t4
|
||||
/* 0A0870 7F06BD40 00000000 */ nop
|
||||
/* 0A0870 7F06BD40 00000000 */ nop
|
||||
.L7F06BD44:
|
||||
/* 0A0874 7F06BD44 16110006 */ bne $s0, $s1, .L7F06BD60
|
||||
/* 0A0878 7F06BD48 02802025 */ move $a0, $s4
|
||||
@@ -1305,7 +1421,7 @@ glabel drawjointlist
|
||||
/* 0A0880 7F06BD50 0FC1D14D */ jal sub_GAME_7F074534
|
||||
/* 0A0884 7F06BD54 02003025 */ move $a2, $s0
|
||||
/* 0A0888 7F06BD58 10000007 */ b .L7F06BD78
|
||||
/* 0A088C 7F06BD5C 00000000 */ nop
|
||||
/* 0A088C 7F06BD5C 00000000 */ nop
|
||||
.L7F06BD60:
|
||||
/* 0A0890 7F06BD60 10000005 */ b .L7F06BD78
|
||||
/* 0A0894 7F06BD64 00009025 */ move $s2, $zero
|
||||
@@ -1317,15 +1433,15 @@ def_7F06BD3C:
|
||||
/* 0A08A4 7F06BD74 02003025 */ move $a2, $s0
|
||||
.L7F06BD78:
|
||||
/* 0A08A8 7F06BD78 12400006 */ beqz $s2, .L7F06BD94
|
||||
/* 0A08AC 7F06BD7C 00000000 */ nop
|
||||
/* 0A08AC 7F06BD7C 00000000 */ nop
|
||||
/* 0A08B0 7F06BD80 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 0A08B4 7F06BD84 10400003 */ beqz $v0, .L7F06BD94
|
||||
/* 0A08B8 7F06BD88 00000000 */ nop
|
||||
/* 0A08B8 7F06BD88 00000000 */ nop
|
||||
/* 0A08BC 7F06BD8C 1000000F */ b .L7F06BDCC
|
||||
/* 0A08C0 7F06BD90 00408025 */ move $s0, $v0
|
||||
.L7F06BD94:
|
||||
/* 0A08C4 7F06BD94 1200000D */ beqz $s0, .L7F06BDCC
|
||||
/* 0A08C8 7F06BD98 00000000 */ nop
|
||||
/* 0A08C8 7F06BD98 00000000 */ nop
|
||||
.L7F06BD9C:
|
||||
/* 0A08CC 7F06BD9C 56110004 */ bnel $s0, $s1, .L7F06BDB0
|
||||
/* 0A08D0 7F06BDA0 8E02000C */ lw $v0, 0xc($s0)
|
||||
@@ -1340,7 +1456,7 @@ def_7F06BD3C:
|
||||
/* 0A08F0 7F06BDC0 8E100008 */ lw $s0, 8($s0)
|
||||
.L7F06BDC4:
|
||||
/* 0A08F4 7F06BDC4 1600FFF5 */ bnez $s0, .L7F06BD9C
|
||||
/* 0A08F8 7F06BDC8 00000000 */ nop
|
||||
/* 0A08F8 7F06BDC8 00000000 */ nop
|
||||
.L7F06BDCC:
|
||||
/* 0A08FC 7F06BDCC 5600FFD2 */ bnezl $s0, .L7F06BD18
|
||||
/* 0A0900 7F06BDD0 96020000 */ lhu $v0, ($s0)
|
||||
@@ -1412,9 +1528,9 @@ glabel drawjointlist
|
||||
/* 09EDEC 7F06C3FC 02202825 */ move $a1, $s1
|
||||
/* 09EDF0 7F06C400 C6640008 */ lwc1 $f4, 8($s3)
|
||||
/* 09EDF4 7F06C404 4600203C */ c.lt.s $f4, $f0
|
||||
/* 09EDF8 7F06C408 00000000 */ nop
|
||||
/* 09EDF8 7F06C408 00000000 */ nop
|
||||
/* 09EDFC 7F06C40C 4500000E */ bc1f .L7F06C448
|
||||
/* 09EE00 7F06C410 00000000 */ nop
|
||||
/* 09EE00 7F06C410 00000000 */ nop
|
||||
/* 09EE04 7F06C414 1000000C */ b .L7F06C448
|
||||
/* 09EE08 7F06C418 00008025 */ move $s0, $zero
|
||||
.L7F06C41C:
|
||||
@@ -1445,7 +1561,7 @@ glabel drawjointlist
|
||||
/* 09EE64 7F06C474 8C29A608 */ lw $t1, %lo(obj_table_jointlist)($at)
|
||||
.L7F06BD3C:
|
||||
/* 09EE68 7F06C478 01200008 */ jr $t1
|
||||
/* 09EE6C 7F06C47C 00000000 */ nop
|
||||
/* 09EE6C 7F06C47C 00000000 */ nop
|
||||
.L7F06BD44:
|
||||
/* 09EE70 7F06C480 16110006 */ bne $s0, $s1, .L7F06C49C
|
||||
/* 09EE74 7F06C484 02802025 */ move $a0, $s4
|
||||
@@ -1453,7 +1569,7 @@ glabel drawjointlist
|
||||
/* 09EE7C 7F06C48C 0FC1D182 */ jal sub_GAME_7F074534
|
||||
/* 09EE80 7F06C490 02003025 */ move $a2, $s0
|
||||
/* 09EE84 7F06C494 10000007 */ b .L7F06C4B4
|
||||
/* 09EE88 7F06C498 00000000 */ nop
|
||||
/* 09EE88 7F06C498 00000000 */ nop
|
||||
.L7F06C49C:
|
||||
/* 09EE8C 7F06C49C 10000005 */ b .L7F06C4B4
|
||||
/* 09EE90 7F06C4A0 00009025 */ move $s2, $zero
|
||||
@@ -1465,15 +1581,15 @@ glabel drawjointlist
|
||||
/* 09EEA0 7F06C4B0 02003025 */ move $a2, $s0
|
||||
.L7F06C4B4:
|
||||
/* 09EEA4 7F06C4B4 12400006 */ beqz $s2, .L7F06C4D0
|
||||
/* 09EEA8 7F06C4B8 00000000 */ nop
|
||||
/* 09EEA8 7F06C4B8 00000000 */ nop
|
||||
/* 09EEAC 7F06C4BC 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 09EEB0 7F06C4C0 10400003 */ beqz $v0, .L7F06C4D0
|
||||
/* 09EEB4 7F06C4C4 00000000 */ nop
|
||||
/* 09EEB4 7F06C4C4 00000000 */ nop
|
||||
/* 09EEB8 7F06C4C8 1000000F */ b .L7F06C508
|
||||
/* 09EEBC 7F06C4CC 00408025 */ move $s0, $v0
|
||||
.L7F06C4D0:
|
||||
/* 09EEC0 7F06C4D0 1200000D */ beqz $s0, .L7F06C508
|
||||
/* 09EEC4 7F06C4D4 00000000 */ nop
|
||||
/* 09EEC4 7F06C4D4 00000000 */ nop
|
||||
.L7F06C4D8:
|
||||
/* 09EEC8 7F06C4D8 56110004 */ bnel $s0, $s1, .L7F06C4EC
|
||||
/* 09EECC 7F06C4DC 8E02000C */ lw $v0, 0xc($s0)
|
||||
@@ -1488,7 +1604,7 @@ glabel drawjointlist
|
||||
/* 09EEEC 7F06C4FC 8E100008 */ lw $s0, 8($s0)
|
||||
.L7F06C500:
|
||||
/* 09EEF0 7F06C500 1600FFF5 */ bnez $s0, .L7F06C4D8
|
||||
/* 09EEF4 7F06C504 00000000 */ nop
|
||||
/* 09EEF4 7F06C504 00000000 */ nop
|
||||
.L7F06C508:
|
||||
/* 09EEF8 7F06C508 5600FFD2 */ bnezl $s0, .L7F06C454
|
||||
/* 09EEFC 7F06C50C 96020000 */ lhu $v0, ($s0)
|
||||
@@ -1545,6 +1661,7 @@ glabel jpt_damage_detail
|
||||
.word .L7F06BFC8
|
||||
.word .L7F06BFBC
|
||||
.word .L7F06BFC8
|
||||
.size jpt_damage_detail, . - jpt_damage_detail
|
||||
|
||||
/*D:800545F8*/
|
||||
glabel D_800545F8
|
||||
@@ -1582,15 +1699,15 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0994 7F06BE64 8E730010 */ lw $s3, 0x10($s3)
|
||||
.L7F06BE68:
|
||||
/* 0A0998 7F06BE68 12200006 */ beqz $s1, .L7F06BE84
|
||||
/* 0A099C 7F06BE6C 00000000 */ nop
|
||||
/* 0A099C 7F06BE6C 00000000 */ nop
|
||||
/* 0A09A0 7F06BE70 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 0A09A4 7F06BE74 10400003 */ beqz $v0, .L7F06BE84
|
||||
/* 0A09A8 7F06BE78 00000000 */ nop
|
||||
/* 0A09A8 7F06BE78 00000000 */ nop
|
||||
/* 0A09AC 7F06BE7C 10000011 */ b .L7F06BEC4
|
||||
/* 0A09B0 7F06BE80 00408025 */ move $s0, $v0
|
||||
.L7F06BE84:
|
||||
/* 0A09B4 7F06BE84 1200000D */ beqz $s0, .L7F06BEBC
|
||||
/* 0A09B8 7F06BE88 00000000 */ nop
|
||||
/* 0A09B8 7F06BE88 00000000 */ nop
|
||||
.L7F06BE8C:
|
||||
/* 0A09BC 7F06BE8C 56120004 */ bnel $s0, $s2, .L7F06BEA0
|
||||
/* 0A09C0 7F06BE90 8E02000C */ lw $v0, 0xc($s0)
|
||||
@@ -1605,7 +1722,7 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A09E0 7F06BEB0 8E100008 */ lw $s0, 8($s0)
|
||||
.L7F06BEB4:
|
||||
/* 0A09E4 7F06BEB4 1600FFF5 */ bnez $s0, .L7F06BE8C
|
||||
/* 0A09E8 7F06BEB8 00000000 */ nop
|
||||
/* 0A09E8 7F06BEB8 00000000 */ nop
|
||||
.L7F06BEBC:
|
||||
/* 0A09EC 7F06BEBC 52000045 */ beql $s0, $zero, .L7F06BFD4
|
||||
/* 0A09F0 7F06BEC0 8E730010 */ lw $s3, 0x10($s3)
|
||||
@@ -1622,7 +1739,7 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0A18 7F06BEE8 8C384598 */ lw $t8, %lo(jpt_damage_detail)($at)
|
||||
.L7F06BEEC:
|
||||
/* 0A0A1C 7F06BEEC 03000008 */ jr $t8
|
||||
/* 0A0A20 7F06BEF0 00000000 */ nop
|
||||
/* 0A0A20 7F06BEF0 00000000 */ nop
|
||||
.L7F06BEF4:
|
||||
/* 0A0A24 7F06BEF4 10000034 */ b .L7F06BFC8
|
||||
/* 0A0A28 7F06BEF8 00008825 */ move $s1, $zero
|
||||
@@ -1636,7 +1753,7 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0A40 7F06BF10 0FC1D31A */ jal sub_GAME_7F074C68
|
||||
/* 0A0A44 7F06BF14 02A03825 */ move $a3, $s5
|
||||
/* 0A0A48 7F06BF18 1040000A */ beqz $v0, .L7F06BF44
|
||||
/* 0A0A4C 7F06BF1C 00000000 */ nop
|
||||
/* 0A0A4C 7F06BF1C 00000000 */ nop
|
||||
/* 0A0A50 7F06BF20 8E790000 */ lw $t9, ($s3)
|
||||
/* 0A0A54 7F06BF24 8FA80044 */ lw $t0, 0x44($sp)
|
||||
/* 0A0A58 7F06BF28 AD190000 */ sw $t9, ($t0)
|
||||
@@ -1656,7 +1773,7 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0A88 7F06BF58 0FC1D32B */ jal sub_GAME_7F074CAC
|
||||
/* 0A0A8C 7F06BF5C 02A03825 */ move $a3, $s5
|
||||
/* 0A0A90 7F06BF60 1040000A */ beqz $v0, .L7F06BF8C
|
||||
/* 0A0A94 7F06BF64 00000000 */ nop
|
||||
/* 0A0A94 7F06BF64 00000000 */ nop
|
||||
/* 0A0A98 7F06BF68 8E6B0000 */ lw $t3, ($s3)
|
||||
/* 0A0A9C 7F06BF6C 8FAC0044 */ lw $t4, 0x44($sp)
|
||||
/* 0A0AA0 7F06BF70 AD8B0000 */ sw $t3, ($t4)
|
||||
@@ -1674,13 +1791,13 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0AC8 7F06BF98 0FC1BA5C */ jal modelApplyDistanceRelations
|
||||
/* 0A0ACC 7F06BF9C 02002825 */ move $a1, $s0
|
||||
/* 0A0AD0 7F06BFA0 10000009 */ b .L7F06BFC8
|
||||
/* 0A0AD4 7F06BFA4 00000000 */ nop
|
||||
/* 0A0AD4 7F06BFA4 00000000 */ nop
|
||||
.L7F06BFA8:
|
||||
/* 0A0AD8 7F06BFA8 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A0ADC 7F06BFAC 0FC1BA6F */ jal modelApplyToggleRelations
|
||||
/* 0A0AE0 7F06BFB0 02002825 */ move $a1, $s0
|
||||
/* 0A0AE4 7F06BFB4 10000004 */ b .L7F06BFC8
|
||||
/* 0A0AE8 7F06BFB8 00000000 */ nop
|
||||
/* 0A0AE8 7F06BFB8 00000000 */ nop
|
||||
.L7F06BFBC:
|
||||
/* 0A0AEC 7F06BFBC 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A0AF0 7F06BFC0 0FC1BA82 */ jal modelApplyHeadRelations
|
||||
@@ -1688,7 +1805,7 @@ glabel probably_damage_detail_blood_effect_related
|
||||
def_7F06BEEC:
|
||||
.L7F06BFC8:
|
||||
/* 0A0AF8 7F06BFC8 1600FFA7 */ bnez $s0, .L7F06BE68
|
||||
/* 0A0AFC 7F06BFCC 00000000 */ nop
|
||||
/* 0A0AFC 7F06BFCC 00000000 */ nop
|
||||
/* 0A0B00 7F06BFD0 8E730010 */ lw $s3, 0x10($s3)
|
||||
.L7F06BFD4:
|
||||
/* 0A0B04 7F06BFD4 5660FF9B */ bnezl $s3, .L7F06BE44
|
||||
@@ -1716,7 +1833,11 @@ def_7F06BEEC:
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F06C010(void) {
|
||||
/*
|
||||
* Address: 0x7F06C010
|
||||
* https://decomp.me/scratch/IDiXU
|
||||
*/
|
||||
void sub_GAME_7F06C010(ModelNode **head, /*s32 unused, s32 unused2,*/ s32 *arg3, s32 *arg4) {
|
||||
|
||||
}
|
||||
#else
|
||||
@@ -1744,7 +1865,7 @@ glabel sub_GAME_7F06C010
|
||||
/* 0A0B80 7F06C050 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 0A0B84 7F06C054 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 0A0B88 7F06C058 03E00008 */ jr $ra
|
||||
/* 0A0B8C 7F06C05C 00000000 */ nop
|
||||
/* 0A0B8C 7F06C05C 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
#define _OBJECTHANDLER_
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
#include <image.h>
|
||||
|
||||
struct bondstruct_unk_animation_related {
|
||||
char* unk00;
|
||||
char* unk04;
|
||||
char* unk08;
|
||||
char* uselessPointer; // Is incremented like a count when an animation is copied from ROM to RAM but it's never read
|
||||
char* animBufferPtr1;
|
||||
char* animBufferPtr2;
|
||||
};
|
||||
|
||||
struct bondstruct_unk_op07_related {
|
||||
@@ -15,6 +16,75 @@ struct bondstruct_unk_op07_related {
|
||||
s32 unk0C;
|
||||
};
|
||||
|
||||
struct ptr_0_s {
|
||||
s16 unk00;
|
||||
s16 unk02;
|
||||
s32 unk04;
|
||||
s32 unk08;
|
||||
s32 unk0c;
|
||||
void *unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
s32 unk1c;
|
||||
s32 unk20;
|
||||
s32 unk24;
|
||||
s32 unk28;
|
||||
s32 unk2c;
|
||||
s32 unk30;
|
||||
s32 unk34;
|
||||
s32 unk38;
|
||||
s32 unk3c;
|
||||
s32 unk40;
|
||||
s32 unk44;
|
||||
s32 unk48;
|
||||
s32 unk4c;
|
||||
s32 unk50;
|
||||
s32 unk54;
|
||||
s32 unk58;
|
||||
s32 unk5c;
|
||||
s32 unk60;
|
||||
s32 unk64;
|
||||
s32 unk68;
|
||||
s32 unk6c;
|
||||
s32 unk70;
|
||||
s32 unk74;
|
||||
s32 unk78;
|
||||
s32 unk7c;
|
||||
s32 unk80;
|
||||
s32 unk84;
|
||||
s32 unk88;
|
||||
s32 unk8c;
|
||||
s32 unk90;
|
||||
s32 unk94;
|
||||
s32 unk98;
|
||||
s32 unk9c;
|
||||
s32 unka0;
|
||||
s32 unka4;
|
||||
s32 unka8;
|
||||
s32 unkac;
|
||||
s32 unkb0;
|
||||
s32 unkb4;
|
||||
s32 unkb8;
|
||||
|
||||
// is this struct size 0xbc or 0xc0 ?
|
||||
//s32 unkbc;
|
||||
};
|
||||
|
||||
struct ptr_1_s {
|
||||
s16 unk00;
|
||||
s16 unk02;
|
||||
s32 unk04;
|
||||
s32 unk08;
|
||||
s32 unk0c;
|
||||
void *unk10;
|
||||
s32 unk14;
|
||||
s32 unk18;
|
||||
s32 unk1c;
|
||||
};
|
||||
|
||||
extern struct ptr_0_s *ptr_allocation_0;
|
||||
extern struct ptr_1_s *ptr_allocation_1;
|
||||
|
||||
extern s32 g_ModelDistanceDisabled;
|
||||
extern f32 g_ModelDistanceScale;
|
||||
extern u32 g_ModelAnimMergingEnabled;
|
||||
@@ -81,7 +151,7 @@ Mtxf* modelFindNodeMtx(Model *arg0, ModelNode *arg1, s32 arg2);
|
||||
|
||||
// called with struct ChrRecord->field_20
|
||||
void sub_GAME_7F06B248(void *arg0);
|
||||
void drawjointlist(struct unk_joint_list *arg0, void* arg1);
|
||||
void drawjointlist(ModelRenderData *arg0, void* arg1);
|
||||
void sub_GAME_7F073FC8(s32);
|
||||
void modelSetAnimMergingEnabled(s32 arg0);
|
||||
u32 modelIsAnimMergingEnabled(void);
|
||||
@@ -92,11 +162,11 @@ void sub_GAME_7F06D2E4(s32, s32, ModelSkeleton*, void* anim, s32, s16*);
|
||||
void modelInit(struct Model *, struct ModelFileHeader *, u32 *);
|
||||
void animInit(struct Model *, struct ModelFileHeader *, u32 *);
|
||||
void modelSetAnimFlipFunction(Model *, void *);
|
||||
void subcalcmatrices(struct unk_joint_list *, Model *);
|
||||
void instcalcmatrices(struct unk_joint_list *arg0, Model *arg1);
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, u8 *name, void *targetloc, s32 sizeleft, struct texpool * buffer);
|
||||
void subcalcmatrices(ModelRenderData *, Model *);
|
||||
void instcalcmatrices(ModelRenderData *arg0, Model *arg1);
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, u8 *name, u8* dst, s32 size, struct texpool * buffer);
|
||||
void* get_obj_instance_controller_for_header(struct ModelFileHeader* arg0);
|
||||
void subdraw(struct unk_joint_list *arg0, struct Model *);
|
||||
void subdraw(ModelRenderData *arg0, struct Model *);
|
||||
void sub_GAME_7F06EFC4(struct Model *);
|
||||
void modelAttachPart(Model *pmodel, ModelFileHeader *pmodeldef, ModelNode *pnode, ModelFileHeader *cmodeldef);
|
||||
void modelInitRwData(Model *model, ModelNode *startnode);
|
||||
@@ -108,4 +178,8 @@ void modelApplyToggleRelations(Model* model, ModelNode* node);
|
||||
void return_null(void);
|
||||
#endif
|
||||
|
||||
void modelIterateDisplayLists(ModelFileHeader *fileheader, ModelNode **nodeptr, Gfx **gdlptr);
|
||||
void modelNodeReplaceGdl(u32 arg0, ModelNode *node, Gfx *find, Gfx *replacement);
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
+93
-63
@@ -6,11 +6,88 @@
|
||||
#include "math_unk_05A9E0.h"
|
||||
#include "chrobjdata.h"
|
||||
#include "ob.h"
|
||||
#include "objecthandler.h"
|
||||
#include "unk_0CC4C0.h"
|
||||
#include "image.h"
|
||||
|
||||
//file split per EU
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F0762E0(void) {
|
||||
|
||||
/***
|
||||
* Perfect Dark:
|
||||
* void modeldef0f1a7560(struct modeldef *modeldef, u16 filenum, u32 arg2, struct modeldef *modeldef2, struct texpool *texpool, bool arg5)
|
||||
*
|
||||
* NTSC address 0x7F0762E0.
|
||||
*/
|
||||
// https://decomp.me/scratch/9a4EO 69.88
|
||||
void sub_GAME_7F0762E0(ModelFileHeader *arg0, char *arg1, void *arg2, s32 arg3)
|
||||
{
|
||||
ModelNode *sp74;
|
||||
uintptr_t gdl; // sp6C
|
||||
uintptr_t sp58;
|
||||
ModelNode **sp54;
|
||||
s32 sp50;
|
||||
s32 temp_fp;
|
||||
s32 temp_s0;
|
||||
Gfx *var_s3;
|
||||
Gfx *temp_a0;
|
||||
uintptr_t temp_a2;
|
||||
uintptr_t temp_a1;
|
||||
s32 var_s1;
|
||||
s32 var_s2;
|
||||
|
||||
sp54 = arg0->Switches;
|
||||
sp50 = fileGetIndex(arg1);
|
||||
temp_s0 = get_rom_remaining_buffer_for_index(sp50);
|
||||
temp_fp = get_pc_remaining_buffer_for_index(sp50);
|
||||
sp74 = NULL;
|
||||
modelIterateDisplayLists(arg0, &sp74, (Gfx**)&gdl);
|
||||
|
||||
if (gdl)
|
||||
{
|
||||
var_s3 = gdl;
|
||||
|
||||
//temp_a0 = ((s32)arg0->Switches + ((s32) gdl & 0xFFFFFF));
|
||||
temp_a2 = ((s32)temp_fp - (s32)((s32)arg0->Switches + ((s32) gdl & 0xFFFFFF))) + (s32)sp54;
|
||||
temp_a1 = ((s32)temp_s0 + (s32)sp54) - (s32)temp_a2;
|
||||
|
||||
sp58 = (s32)temp_a1 - (s32)((s32)arg0->Switches + ((s32) gdl & 0xFFFFFF));
|
||||
|
||||
// texCopyGdls
|
||||
sub_GAME_7F0CE794(((s32)arg0->Switches + ((s32) gdl & 0xFFFFFF)), temp_a1, (s32) temp_a2);
|
||||
|
||||
texLoadFromModelFileHeader(arg0, arg3);
|
||||
|
||||
while (sp74 != NULL)
|
||||
{
|
||||
modelIterateDisplayLists(arg0, &sp74, (Gfx**)&gdl);
|
||||
|
||||
if (gdl)
|
||||
{
|
||||
var_s2 = (s32) gdl * 0;
|
||||
var_s1 = (s32) gdl & 0xFFFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s1 = (s32) gdl & 0xFFFFFF;
|
||||
var_s2 = (temp_fp + (s32)arg0->Switches - (s32)arg0->Switches) - (var_s1);
|
||||
}
|
||||
|
||||
modelNodeReplaceGdl((u32) arg0, sp74, gdl, var_s3);
|
||||
|
||||
var_s3 += texLoadFromGdl(
|
||||
(Gfx *)((uintptr_t)arg0->Switches + ((s32)(var_s1) + (s32)sp58)),
|
||||
var_s2,
|
||||
(Gfx *)((uintptr_t)arg0->Switches + ((s32) var_s3 & 0xFFFFFF)),
|
||||
arg3);
|
||||
}
|
||||
|
||||
fileSetSize(
|
||||
sp50,
|
||||
(u8*)sp54,
|
||||
(((u32)((s32)arg0->Switches + ((s32) var_s3 & 0xFFFFFF)) - (u32)sp54) + 0xf) & ~0xf,
|
||||
arg2 == NULL);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
@@ -60,7 +137,7 @@ glabel sub_GAME_7F0762E0
|
||||
/* 0AAEB4 7F076384 01262823 */ subu $a1, $t1, $a2
|
||||
/* 0AAEB8 7F076388 00A45023 */ subu $t2, $a1, $a0
|
||||
/* 0AAEBC 7F07638C 02E09825 */ move $s3, $s7
|
||||
/* 0AAEC0 7F076390 0FC339E5 */ jal sub_GAME_7F0CE794
|
||||
/* 0AAEC0 7F076390 0FC339E5 */ jal texCopyGdls
|
||||
/* 0AAEC4 7F076394 AFAA0058 */ sw $t2, 0x58($sp)
|
||||
/* 0AAEC8 7F076398 02A02025 */ move $a0, $s5
|
||||
/* 0AAECC 7F07639C 0FC32F94 */ jal texLoadFromModelFileHeader
|
||||
@@ -100,7 +177,7 @@ glabel sub_GAME_7F0762E0
|
||||
/* 0AAF48 7F076418 02402825 */ move $a1, $s2
|
||||
/* 0AAF4C 7F07641C 8FA70084 */ lw $a3, 0x84($sp)
|
||||
/* 0AAF50 7F076420 00483021 */ addu $a2, $v0, $t0
|
||||
/* 0AAF54 7F076424 0FC33846 */ jal process_microcode_sort_display_modes_expand_image_calls
|
||||
/* 0AAF54 7F076424 0FC33846 */ jal texLoadFromGdl
|
||||
/* 0AAF58 7F076428 01F92021 */ addu $a0, $t7, $t9
|
||||
/* 0AAF5C 7F07642C 8FA90074 */ lw $t1, 0x74($sp)
|
||||
/* 0AAF60 7F076430 02629821 */ addu $s3, $s3, $v0
|
||||
@@ -140,12 +217,12 @@ glabel sub_GAME_7F0762E0
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, s8 *name, u8* dst, s32 size, struct texpool * buffer)
|
||||
/***
|
||||
* NTSC addres 0x7F0764A4.
|
||||
*/
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, u8 *name, u8* dst, s32 size, struct texpool * buffer)
|
||||
{
|
||||
|
||||
struct ModelNode *filedata;
|
||||
void *filedata;
|
||||
|
||||
if (dst != 0)
|
||||
{
|
||||
@@ -155,65 +232,18 @@ void load_object_fill_header(struct ModelFileHeader *objheader, s8 *name, u8* ds
|
||||
{
|
||||
filedata = _fileNameLoadToBank(name, 0, 0x100, 4);
|
||||
}
|
||||
objheader->Switches = filedata;
|
||||
objheader->Textures = &filedata[objheader->numSwitches];
|
||||
objheader->RootNode = objheader->Textures[objheader->numtextures];
|
||||
|
||||
objheader->Switches = (struct ModelNode **)filedata;
|
||||
|
||||
// hmmmmmmmmmmmm
|
||||
objheader->Textures = (struct ModelFileTextures *)&((s32*)filedata)[objheader->numSwitches];
|
||||
|
||||
objheader->RootNode = (struct ModelNode *)&objheader->Textures[objheader->numtextures];
|
||||
|
||||
sub_GAME_7F075A90(objheader, 0x5000000, filedata);
|
||||
sub_GAME_7F0762E0(objheader, name, dst, buffer);
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel load_object_fill_header
|
||||
/* 0AAFD4 7F0764A4 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 0AAFD8 7F0764A8 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 0AAFDC 7F0764AC 00808025 */ move $s0, $a0
|
||||
/* 0AAFE0 7F0764B0 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 0AAFE4 7F0764B4 AFA50024 */ sw $a1, 0x24($sp)
|
||||
/* 0AAFE8 7F0764B8 10C00006 */ beqz $a2, .L7F0764D4
|
||||
/* 0AAFEC 7F0764BC AFA60028 */ sw $a2, 0x28($sp)
|
||||
/* 0AAFF0 7F0764C0 00A02025 */ move $a0, $a1
|
||||
/* 0AAFF4 7F0764C4 0FC2F350 */ jal _fileNameLoadToAddr
|
||||
/* 0AAFF8 7F0764C8 00002825 */ move $a1, $zero
|
||||
/* 0AAFFC 7F0764CC 10000007 */ b .L7F0764EC
|
||||
/* 0AB000 7F0764D0 00403025 */ move $a2, $v0
|
||||
.L7F0764D4:
|
||||
/* 0AB004 7F0764D4 8FA40024 */ lw $a0, 0x24($sp)
|
||||
/* 0AB008 7F0764D8 00002825 */ move $a1, $zero
|
||||
/* 0AB00C 7F0764DC 24060100 */ li $a2, 256
|
||||
/* 0AB010 7F0764E0 0FC2F341 */ jal _fileNameLoadToBank
|
||||
/* 0AB014 7F0764E4 24070004 */ li $a3, 4
|
||||
/* 0AB018 7F0764E8 00403025 */ move $a2, $v0
|
||||
.L7F0764EC:
|
||||
/* 0AB01C 7F0764EC 86190016 */ lh $t9, 0x16($s0)
|
||||
/* 0AB020 7F0764F0 860F000C */ lh $t7, 0xc($s0)
|
||||
/* 0AB024 7F0764F4 AE060008 */ sw $a2, 8($s0)
|
||||
/* 0AB028 7F0764F8 00194080 */ sll $t0, $t9, 2
|
||||
/* 0AB02C 7F0764FC 01194023 */ subu $t0, $t0, $t9
|
||||
/* 0AB030 7F076500 000FC080 */ sll $t8, $t7, 2
|
||||
/* 0AB034 7F076504 00D81021 */ addu $v0, $a2, $t8
|
||||
/* 0AB038 7F076508 00084080 */ sll $t0, $t0, 2
|
||||
/* 0AB03C 7F07650C 00484821 */ addu $t1, $v0, $t0
|
||||
/* 0AB040 7F076510 AE020018 */ sw $v0, 0x18($s0)
|
||||
/* 0AB044 7F076514 AE090000 */ sw $t1, ($s0)
|
||||
/* 0AB048 7F076518 02002025 */ move $a0, $s0
|
||||
/* 0AB04C 7F07651C 0FC1D6A4 */ jal sub_GAME_7F075A90
|
||||
/* 0AB050 7F076520 3C050500 */ lui $a1, 0x500
|
||||
/* 0AB054 7F076524 02002025 */ move $a0, $s0
|
||||
/* 0AB058 7F076528 8FA50024 */ lw $a1, 0x24($sp)
|
||||
/* 0AB05C 7F07652C 8FA60028 */ lw $a2, 0x28($sp)
|
||||
/* 0AB060 7F076530 0FC1D8B8 */ jal sub_GAME_7F0762E0
|
||||
/* 0AB064 7F076534 8FA70030 */ lw $a3, 0x30($sp)
|
||||
/* 0AB068 7F076538 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 0AB06C 7F07653C 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 0AB070 7F076540 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 0AB074 7F076544 03E00008 */ jr $ra
|
||||
/* 0AB078 7F076548 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+38
-322
@@ -4,294 +4,61 @@
|
||||
#include "objective_status.h"
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
||||
//CODE.bss:80075D30
|
||||
extern struct objective_entry *objective_ptrs[OBJECTIVES_MAX];
|
||||
extern OBJECTIVESTATUS dword_CODE_bss_80075D58[OBJECTIVES_MAX]; //This is an array of 10 OBJECTIVESTATUS,
|
||||
|
||||
//CODE.bss:80075D80
|
||||
extern u32 *ptr_last_tag_entry_type16;
|
||||
//CODE.bss:80075D84
|
||||
extern u32 *ptr_last_briefing_setup_entry_type23;
|
||||
//CODE.bss:80075D88
|
||||
struct criteria_roomentered *ptr_last_enter_room_subobject_entry_type20;
|
||||
//CODE.bss:80075D8C
|
||||
extern struct criteria_deposit *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
//CODE.bss:80075D90
|
||||
extern u32 *ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
// data
|
||||
extern s32 objective_count;
|
||||
extern s32 objective_count_related;
|
||||
/*
|
||||
* Clears Objectives and states
|
||||
* Note: this matches in everthing except that calling the var "dword_CODE_bss_80075D58"
|
||||
* as-is means the var is offset by 1 word.
|
||||
* somewhere along the line either the var will change or the func will need re-doing.
|
||||
* https://decomp.me/scratch/ecX06
|
||||
* Clears Objectives and states.
|
||||
*
|
||||
* NTSC address 0x7F004EC0.
|
||||
*/
|
||||
void something_with_stage_objectives() //#99% MATCH
|
||||
void something_with_stage_objectives(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
OBJECTIVESTATUS *start;
|
||||
OBJECTIVESTATUS *end;
|
||||
|
||||
if (bossGetStageNum() != LEVELID_TITLE)
|
||||
{
|
||||
objective_count = -1;
|
||||
//dword_CODE_bss_80075D58 = NULL;
|
||||
//dword_CODE_bss_80075D58+4 = NULL;
|
||||
//*dword_CODE_bss_80075D58+8 = *clear2;
|
||||
//dword_CODE_bss_80075D58[0] = OBJECTIVESTATUS_INCOMPLETE;
|
||||
for (i = 1; i <= 10; i++) //using 0-10 causes mismatch
|
||||
|
||||
for (i = 0; i < OBJECTIVES_MAX; i++)
|
||||
{
|
||||
dword_CODE_bss_80075D58[i] = OBJECTIVESTATUS_INCOMPLETE;
|
||||
objectiveStatuses[i] = OBJECTIVESTATUS_INCOMPLETE;
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 1; i <= 10; i++) //using 0-10 causes mismatch
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU)
|
||||
objective_count_related = 0;
|
||||
#endif
|
||||
|
||||
for (i = 0; i < OBJECTIVES_MAX; i++)
|
||||
{
|
||||
objective_ptrs[i] = NULL;
|
||||
}
|
||||
ptr_last_tag_entry_type16 = NULL;
|
||||
ptr_last_briefing_setup_entry_type23 = NULL;
|
||||
ptr_last_enter_room_subobject_entry_type20 = NULL;
|
||||
ptr_last_deposit_in_room_subobject_entry_type21 = NULL;
|
||||
|
||||
ptr_last_tag_entry_type16 = NULL;
|
||||
ptr_last_briefing_setup_entry_type23 = NULL;
|
||||
ptr_last_enter_room_subobject_entry_type20 = NULL;
|
||||
ptr_last_deposit_in_room_subobject_entry_type21 = NULL;
|
||||
ptr_last_photo_obj_in_room_subobject_entry_type1E = NULL;
|
||||
}
|
||||
#else
|
||||
|
||||
#ifdef VERSION_US
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel something_with_stage_objectives
|
||||
/* 0399F0 7F004EC0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 0399F4 7F004EC4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0399F8 7F004EC8 0C001A57 */ jal bossGetStageNum
|
||||
/* 0399FC 7F004ECC 00000000 */ nop
|
||||
/* 039A00 7F004ED0 2401005A */ li $at, 90
|
||||
/* 039A04 7F004ED4 10410011 */ beq $v0, $at, .L7F004F1C
|
||||
/* 039A08 7F004ED8 240EFFFF */ li $t6, -1
|
||||
/* 039A0C 7F004EDC 3C018003 */ lui $at, %hi(objective_count)
|
||||
/* 039A10 7F004EE0 AC2E22F0 */ sw $t6, %lo(objective_count)($at)
|
||||
/* 039A14 7F004EE4 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58)
|
||||
/* 039A18 7F004EE8 AC205D58 */ sw $zero, %lo(dword_CODE_bss_80075D58)($at)
|
||||
/* 039A1C 7F004EEC 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58+4)
|
||||
/* 039A20 7F004EF0 3C028007 */ lui $v0, %hi(dword_CODE_bss_80075D58+8)
|
||||
/* 039A24 7F004EF4 3C038007 */ lui $v1, %hi(ptr_last_tag_entry_type16)
|
||||
/* 039A28 7F004EF8 24635D80 */ addiu $v1, %lo(ptr_last_tag_entry_type16) # addiu $v1, $v1, 0x5d80
|
||||
/* 039A2C 7F004EFC 24425D60 */ addiu $v0, %lo(dword_CODE_bss_80075D58+8) # addiu $v0, $v0, 0x5d60
|
||||
/* 039A30 7F004F00 AC205D5C */ sw $zero, %lo(dword_CODE_bss_80075D58+4)($at)
|
||||
.L7F004F04:
|
||||
/* 039A34 7F004F04 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039A38 7F004F08 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039A3C 7F004F0C AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039A40 7F004F10 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039A44 7F004F14 1443FFFB */ bne $v0, $v1, .L7F004F04
|
||||
/* 039A48 7F004F18 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
.L7F004F1C:
|
||||
/* 039A4C 7F004F1C 3C018007 */ lui $at, %hi(objective_ptrs)
|
||||
/* 039A50 7F004F20 AC205D30 */ sw $zero, %lo(objective_ptrs)($at)
|
||||
/* 039A54 7F004F24 3C018007 */ lui $at, %hi(objective_ptrs+4)
|
||||
/* 039A58 7F004F28 3C028007 */ lui $v0, %hi(objective_ptrs+8)
|
||||
/* 039A5C 7F004F2C 3C038007 */ lui $v1, %hi(dword_CODE_bss_80075D58)
|
||||
/* 039A60 7F004F30 24635D58 */ addiu $v1, %lo(dword_CODE_bss_80075D58) # addiu $v1, $v1, 0x5d58
|
||||
/* 039A64 7F004F34 24425D38 */ addiu $v0, %lo(objective_ptrs+8) # addiu $v0, $v0, 0x5d38
|
||||
/* 039A68 7F004F38 AC205D34 */ sw $zero, %lo(objective_ptrs+4)($at)
|
||||
.L7F004F3C:
|
||||
/* 039A6C 7F004F3C 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039A70 7F004F40 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039A74 7F004F44 AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039A78 7F004F48 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039A7C 7F004F4C 1443FFFB */ bne $v0, $v1, .L7F004F3C
|
||||
/* 039A80 7F004F50 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
/* 039A84 7F004F54 3C018007 */ lui $at, %hi(ptr_last_tag_entry_type16)
|
||||
/* 039A88 7F004F58 AC205D80 */ sw $zero, %lo(ptr_last_tag_entry_type16)($at)
|
||||
/* 039A8C 7F004F5C 3C018007 */ lui $at, %hi(ptr_last_briefing_setup_entry_type23)
|
||||
/* 039A90 7F004F60 AC205D84 */ sw $zero, %lo(ptr_last_briefing_setup_entry_type23)($at)
|
||||
/* 039A94 7F004F64 3C018007 */ lui $at, %hi(ptr_last_enter_room_subobject_entry_type20)
|
||||
/* 039A98 7F004F68 AC205D88 */ sw $zero, %lo(ptr_last_enter_room_subobject_entry_type20)($at)
|
||||
/* 039A9C 7F004F6C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 039AA0 7F004F70 3C018007 */ lui $at, %hi(ptr_last_deposit_in_room_subobject_entry_type21)
|
||||
/* 039AA4 7F004F74 AC205D8C */ sw $zero, %lo(ptr_last_deposit_in_room_subobject_entry_type21)($at)
|
||||
/* 039AA8 7F004F78 3C018007 */ lui $at, %hi(ptr_last_photo_obj_in_room_subobject_entry_type1E)
|
||||
/* 039AAC 7F004F7C AC205D90 */ sw $zero, %lo(ptr_last_photo_obj_in_room_subobject_entry_type1E)($at)
|
||||
/* 039AB0 7F004F80 03E00008 */ jr $ra
|
||||
/* 039AB4 7F004F84 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_JP
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel something_with_stage_objectives
|
||||
/* 039A40 7F004ED0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 039A44 7F004ED4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 039A48 7F004ED8 0C001A57 */ jal bossGetStageNum
|
||||
/* 039A4C 7F004EDC 00000000 */ nop
|
||||
/* 039A50 7F004EE0 2401005A */ li $at, 90
|
||||
/* 039A54 7F004EE4 10410011 */ beq $v0, $at, .L7F004F2C
|
||||
/* 039A58 7F004EE8 240EFFFF */ li $t6, -1
|
||||
/* 039A5C 7F004EEC 3C018003 */ lui $at, %hi(objective_count) # $at, 0x8003
|
||||
/* 039A60 7F004EF0 AC2E2330 */ sw $t6, %lo(objective_count)($at)
|
||||
/* 039A64 7F004EF4 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58) # $at, 0x8007
|
||||
/* 039A68 7F004EF8 AC205D98 */ sw $zero, %lo(dword_CODE_bss_80075D58)($at)
|
||||
/* 039A6C 7F004EFC 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58+4) # $at, 0x8007
|
||||
/* 039A70 7F004F00 3C028007 */ lui $v0, %hi(dword_CODE_bss_80075D58+8) # $v0, 0x8007
|
||||
/* 039A74 7F004F04 3C038007 */ lui $v1, %hi(ptr_last_tag_entry_type16) # $v1, 0x8007
|
||||
/* 039A78 7F004F08 24635DC0 */ addiu $v1, %lo(ptr_last_tag_entry_type16) # addiu $v1, $v1, 0x5dc0
|
||||
/* 039A7C 7F004F0C 24425DA0 */ addiu $v0, %lo(dword_CODE_bss_80075D58+8) # addiu $v0, $v0, 0x5da0
|
||||
/* 039A80 7F004F10 AC205D9C */ sw $zero, %lo(dword_CODE_bss_80075D58+4)($at)
|
||||
.L7F004F14:
|
||||
/* 039A84 7F004F14 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039A88 7F004F18 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039A8C 7F004F1C AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039A90 7F004F20 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039A94 7F004F24 1443FFFB */ bne $v0, $v1, .L7F004F14
|
||||
/* 039A98 7F004F28 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
.L7F004F2C:
|
||||
/* 039A9C 7F004F2C 3C018003 */ lui $at, %hi(objective_count+4) # $at, 0x8003
|
||||
/* 039AA0 7F004F30 AC202334 */ sw $zero, %lo(objective_count+4)($at)
|
||||
/* 039AA4 7F004F34 3C018007 */ lui $at, %hi(objective_ptrs) # $at, 0x8007
|
||||
/* 039AA8 7F004F38 AC205D70 */ sw $zero, %lo(objective_ptrs)($at)
|
||||
/* 039AAC 7F004F3C 3C018007 */ lui $at, %hi(objective_ptrs+4) # $at, 0x8007
|
||||
/* 039AB0 7F004F40 3C028007 */ lui $v0, %hi(objective_ptrs+8) # $v0, 0x8007
|
||||
/* 039AB4 7F004F44 3C038007 */ lui $v1, %hi(dword_CODE_bss_80075D58) # $v1, 0x8007
|
||||
/* 039AB8 7F004F48 24635D98 */ addiu $v1, %lo(dword_CODE_bss_80075D58) # addiu $v1, $v1, 0x5d98
|
||||
/* 039ABC 7F004F4C 24425D78 */ addiu $v0, %lo(objective_ptrs+8) # addiu $v0, $v0, 0x5d78
|
||||
/* 039AC0 7F004F50 AC205D74 */ sw $zero, %lo(objective_ptrs+4)($at)
|
||||
.L7F004F54:
|
||||
/* 039AC4 7F004F54 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039AC8 7F004F58 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039ACC 7F004F5C AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039AD0 7F004F60 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039AD4 7F004F64 1443FFFB */ bne $v0, $v1, .L7F004F54
|
||||
/* 039AD8 7F004F68 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
/* 039ADC 7F004F6C 3C018007 */ lui $at, %hi(ptr_last_tag_entry_type16) # $at, 0x8007
|
||||
/* 039AE0 7F004F70 AC205DC0 */ sw $zero, %lo(ptr_last_tag_entry_type16)($at)
|
||||
/* 039AE4 7F004F74 3C018007 */ lui $at, %hi(ptr_last_briefing_setup_entry_type23) # $at, 0x8007
|
||||
/* 039AE8 7F004F78 AC205DC4 */ sw $zero, %lo(ptr_last_briefing_setup_entry_type23)($at)
|
||||
/* 039AEC 7F004F7C 3C018007 */ lui $at, %hi(ptr_last_enter_room_subobject_entry_type20) # $at, 0x8007
|
||||
/* 039AF0 7F004F80 AC205DC8 */ sw $zero, %lo(ptr_last_enter_room_subobject_entry_type20)($at)
|
||||
/* 039AF4 7F004F84 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 039AF8 7F004F88 3C018007 */ lui $at, %hi(ptr_last_deposit_in_room_subobject_entry_type21) # $at, 0x8007
|
||||
/* 039AFC 7F004F8C AC205DCC */ sw $zero, %lo(ptr_last_deposit_in_room_subobject_entry_type21)($at)
|
||||
/* 039B00 7F004F90 3C018007 */ lui $at, %hi(ptr_last_photo_obj_in_room_subobject_entry_type1E) # $at, 0x8007
|
||||
/* 039B04 7F004F94 AC205DD0 */ sw $zero, %lo(ptr_last_photo_obj_in_room_subobject_entry_type1E)($at)
|
||||
/* 039B08 7F004F98 03E00008 */ jr $ra
|
||||
/* 039B0C 7F004F9C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel something_with_stage_objectives
|
||||
/* 039A40 7F004ED0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 039A44 7F004ED4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 039A48 7F004ED8 0C001A57 */ jal bossGetStageNum
|
||||
/* 039A4C 7F004EDC 00000000 */ nop
|
||||
/* 039A50 7F004EE0 2401005A */ li $at, 90
|
||||
/* 039A54 7F004EE4 10410011 */ beq $v0, $at, .L7F004F2C
|
||||
/* 039A58 7F004EE8 240EFFFF */ li $t6, -1
|
||||
/* 039A5C 7F004EEC 3C018003 */ lui $at, %hi(objective_count) # $at, 0x8003
|
||||
/* 039A60 7F004EF0 AC2E2330 */ sw $t6, %lo(objective_count)($at)
|
||||
/* 039A64 7F004EF4 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58) # $at, 0x8007
|
||||
/* 039A68 7F004EF8 AC205D98 */ sw $zero, %lo(dword_CODE_bss_80075D58)($at)
|
||||
/* 039A6C 7F004EFC 3C018007 */ lui $at, %hi(dword_CODE_bss_80075D58+4) # $at, 0x8007
|
||||
/* 039A70 7F004F00 3C028007 */ lui $v0, %hi(dword_CODE_bss_80075D58+8) # $v0, 0x8007
|
||||
/* 039A74 7F004F04 3C038007 */ lui $v1, %hi(ptr_last_tag_entry_type16) # $v1, 0x8007
|
||||
/* 039A78 7F004F08 24635DC0 */ addiu $v1, %lo(ptr_last_tag_entry_type16) # addiu $v1, $v1, 0x5dc0
|
||||
/* 039A7C 7F004F0C 24425DA0 */ addiu $v0, %lo(dword_CODE_bss_80075D58+8) # addiu $v0, $v0, 0x5da0
|
||||
/* 039A80 7F004F10 AC205D9C */ sw $zero, %lo(dword_CODE_bss_80075D58+4)($at)
|
||||
.L7F004F14:
|
||||
/* 039A84 7F004F14 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039A88 7F004F18 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039A8C 7F004F1C AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039A90 7F004F20 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039A94 7F004F24 1443FFFB */ bne $v0, $v1, .L7F004F14
|
||||
/* 039A98 7F004F28 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
.L7F004F2C:
|
||||
/* 039A9C 7F004F2C 3C018003 */ lui $at, %hi(objective_count+4) # $at, 0x8003
|
||||
/* 039AA0 7F004F30 AC202334 */ sw $zero, %lo(objective_count+4)($at)
|
||||
/* 039AA4 7F004F34 3C018007 */ lui $at, %hi(objective_ptrs) # $at, 0x8007
|
||||
/* 039AA8 7F004F38 AC205D70 */ sw $zero, %lo(objective_ptrs)($at)
|
||||
/* 039AAC 7F004F3C 3C018007 */ lui $at, %hi(objective_ptrs+4) # $at, 0x8007
|
||||
/* 039AB0 7F004F40 3C028007 */ lui $v0, %hi(objective_ptrs+8) # $v0, 0x8007
|
||||
/* 039AB4 7F004F44 3C038007 */ lui $v1, %hi(dword_CODE_bss_80075D58) # $v1, 0x8007
|
||||
/* 039AB8 7F004F48 24635D98 */ addiu $v1, %lo(dword_CODE_bss_80075D58) # addiu $v1, $v1, 0x5d98
|
||||
/* 039ABC 7F004F4C 24425D78 */ addiu $v0, %lo(objective_ptrs+8) # addiu $v0, $v0, 0x5d78
|
||||
/* 039AC0 7F004F50 AC205D74 */ sw $zero, %lo(objective_ptrs+4)($at)
|
||||
.L7F004F54:
|
||||
/* 039AC4 7F004F54 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 039AC8 7F004F58 AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 039ACC 7F004F5C AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 039AD0 7F004F60 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 039AD4 7F004F64 1443FFFB */ bne $v0, $v1, .L7F004F54
|
||||
/* 039AD8 7F004F68 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
/* 039ADC 7F004F6C 3C018007 */ lui $at, %hi(ptr_last_tag_entry_type16) # $at, 0x8007
|
||||
/* 039AE0 7F004F70 AC205DC0 */ sw $zero, %lo(ptr_last_tag_entry_type16)($at)
|
||||
/* 039AE4 7F004F74 3C018007 */ lui $at, %hi(ptr_last_briefing_setup_entry_type23) # $at, 0x8007
|
||||
/* 039AE8 7F004F78 AC205DC4 */ sw $zero, %lo(ptr_last_briefing_setup_entry_type23)($at)
|
||||
/* 039AEC 7F004F7C 3C018007 */ lui $at, %hi(ptr_last_enter_room_subobject_entry_type20) # $at, 0x8007
|
||||
/* 039AF0 7F004F80 AC205DC8 */ sw $zero, %lo(ptr_last_enter_room_subobject_entry_type20)($at)
|
||||
/* 039AF4 7F004F84 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 039AF8 7F004F88 3C018007 */ lui $at, %hi(ptr_last_deposit_in_room_subobject_entry_type21) # $at, 0x8007
|
||||
/* 039AFC 7F004F8C AC205DCC */ sw $zero, %lo(ptr_last_deposit_in_room_subobject_entry_type21)($at)
|
||||
/* 039B00 7F004F90 3C018007 */ lui $at, %hi(ptr_last_photo_obj_in_room_subobject_entry_type1E) # $at, 0x8007
|
||||
/* 039B04 7F004F94 AC205DD0 */ sw $zero, %lo(ptr_last_photo_obj_in_room_subobject_entry_type1E)($at)
|
||||
/* 039B08 7F004F98 03E00008 */ jr $ra
|
||||
/* 039B0C 7F004F9C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void *set_parent_cur_tag_entry(void *arg0) {
|
||||
// Node 0
|
||||
arg0->unk8 = (void *) ptr_last_tag_entry_type16;
|
||||
void set_parent_cur_tag_entry(struct TagObjectRecord *arg0)
|
||||
{
|
||||
arg0->NextTag = ptr_last_tag_entry_type16;
|
||||
ptr_last_tag_entry_type16 = arg0;
|
||||
return;
|
||||
// (possible return value: &ptr_last_tag_entry_type16)
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel set_parent_cur_tag_entry
|
||||
/* 039AB8 7F004F88 3C028007 */ lui $v0, %hi(ptr_last_tag_entry_type16)
|
||||
/* 039ABC 7F004F8C 24425D80 */ addiu $v0, %lo(ptr_last_tag_entry_type16) # addiu $v0, $v0, 0x5d80
|
||||
/* 039AC0 7F004F90 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 039AC4 7F004F94 AC8E0008 */ sw $t6, 8($a0)
|
||||
/* 039AC8 7F004F98 03E00008 */ jr $ra
|
||||
/* 039ACC 7F004F9C AC440000 */ sw $a0, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void *setup_briefing_text_entry_parent(void *arg0) {
|
||||
// Node 0
|
||||
arg0->unkC = (void *) ptr_last_briefing_setup_entry_type23;
|
||||
void setup_briefing_text_entry_parent(struct setup_objective_text *arg0)
|
||||
{
|
||||
arg0->next = ptr_last_briefing_setup_entry_type23;
|
||||
ptr_last_briefing_setup_entry_type23 = arg0;
|
||||
return;
|
||||
// (possible return value: &ptr_last_briefing_setup_entry_type23)
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel setup_briefing_text_entry_parent
|
||||
/* 039AD0 7F004FA0 3C028007 */ lui $v0, %hi(ptr_last_briefing_setup_entry_type23)
|
||||
/* 039AD4 7F004FA4 24425D84 */ addiu $v0, %lo(ptr_last_briefing_setup_entry_type23) # addiu $v0, $v0, 0x5d84
|
||||
/* 039AD8 7F004FA8 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 039ADC 7F004FAC AC8E000C */ sw $t6, 0xc($a0)
|
||||
/* 039AE0 7F004FB0 03E00008 */ jr $ra
|
||||
/* 039AE4 7F004FB4 AC440000 */ sw $a0, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f004fb8
|
||||
*/
|
||||
void add_ptr_to_objective(struct objective_entry* objective)
|
||||
{
|
||||
objective_ptrs[objective->menu] = objective;
|
||||
@@ -302,73 +69,22 @@ void add_ptr_to_objective(struct objective_entry* objective)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void *set_parent_cur_obj_enter_room(void *arg0) {
|
||||
// Node 0
|
||||
arg0->unkC = (void *) ptr_last_enter_room_subobject_entry_type20;
|
||||
void set_parent_cur_obj_enter_room(struct criteria_roomentered *arg0)
|
||||
{
|
||||
arg0->next = ptr_last_enter_room_subobject_entry_type20;
|
||||
ptr_last_enter_room_subobject_entry_type20 = arg0;
|
||||
return;
|
||||
// (possible return value: &ptr_last_enter_room_subobject_entry_type20)
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel set_parent_cur_obj_enter_room
|
||||
/* 039B24 7F004FF4 3C028007 */ lui $v0, %hi(ptr_last_enter_room_subobject_entry_type20)
|
||||
/* 039B28 7F004FF8 24425D88 */ addiu $v0, %lo(ptr_last_enter_room_subobject_entry_type20) # addiu $v0, $v0, 0x5d88
|
||||
/* 039B2C 7F004FFC 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 039B30 7F005000 AC8E000C */ sw $t6, 0xc($a0)
|
||||
/* 039B34 7F005004 03E00008 */ jr $ra
|
||||
/* 039B38 7F005008 AC440000 */ sw $a0, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void *set_parent_cur_obj_deposited_in_room(void *arg0) {
|
||||
// Node 0
|
||||
arg0->unk10 = (void *) ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
void set_parent_cur_obj_deposited_in_room(struct criteria_deposit *arg0)
|
||||
{
|
||||
arg0->next = ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
ptr_last_deposit_in_room_subobject_entry_type21 = arg0;
|
||||
return;
|
||||
// (possible return value: &ptr_last_deposit_in_room_subobject_entry_type21)
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel set_parent_cur_obj_deposited_in_room
|
||||
/* 039B3C 7F00500C 3C028007 */ lui $v0, %hi(ptr_last_deposit_in_room_subobject_entry_type21)
|
||||
/* 039B40 7F005010 24425D8C */ addiu $v0, %lo(ptr_last_deposit_in_room_subobject_entry_type21) # addiu $v0, $v0, 0x5d8c
|
||||
/* 039B44 7F005014 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 039B48 7F005018 AC8E0010 */ sw $t6, 0x10($a0)
|
||||
/* 039B4C 7F00501C 03E00008 */ jr $ra
|
||||
/* 039B50 7F005020 AC440000 */ sw $a0, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void *set_parent_cur_obj_photograph(void *arg0) {
|
||||
// Node 0
|
||||
arg0->unkC = (void *) ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
void set_parent_cur_obj_photograph(struct criteria_picture *arg0)
|
||||
{
|
||||
arg0->next = ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
ptr_last_photo_obj_in_room_subobject_entry_type1E = arg0;
|
||||
return;
|
||||
// (possible return value: &ptr_last_photo_obj_in_room_subobject_entry_type1E)
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel set_parent_cur_obj_photograph
|
||||
/* 039B54 7F005024 3C028007 */ lui $v0, %hi(ptr_last_photo_obj_in_room_subobject_entry_type1E)
|
||||
/* 039B58 7F005028 24425D90 */ addiu $v0, %lo(ptr_last_photo_obj_in_room_subobject_entry_type1E) # addiu $v0, $v0, 0x5d90
|
||||
/* 039B5C 7F00502C 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 039B60 7F005030 AC8E000C */ sw $t6, 0xc($a0)
|
||||
/* 039B64 7F005034 03E00008 */ jr $ra
|
||||
/* 039B68 7F005038 AC440000 */ sw $a0, ($v0)
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
@@ -4,4 +4,10 @@
|
||||
|
||||
void something_with_stage_objectives(void);
|
||||
|
||||
void set_parent_cur_tag_entry(struct TagObjectRecord *arg0);
|
||||
void setup_briefing_text_entry_parent(struct setup_objective_text *arg0);
|
||||
void set_parent_cur_obj_enter_room(struct criteria_roomentered *arg0);
|
||||
void set_parent_cur_obj_deposited_in_room(struct criteria_deposit *arg0);
|
||||
void set_parent_cur_obj_photograph(struct criteria_picture *arg0);
|
||||
|
||||
#endif
|
||||
|
||||
+82
-170
@@ -12,7 +12,7 @@
|
||||
// bss
|
||||
//CODE.bss:80075D30
|
||||
struct objective_entry * objective_ptrs[OBJECTIVES_MAX];
|
||||
OBJECTIVESTATUS dword_CODE_bss_80075D58[OBJECTIVES_MAX]; //This is an array of 10 OBJECTIVESTATUS,
|
||||
OBJECTIVESTATUS objectiveStatuses[OBJECTIVES_MAX]; //This is an array of 10 OBJECTIVESTATUS,
|
||||
|
||||
//CODE.bss:80075D80
|
||||
u32 *ptr_last_tag_entry_type16;
|
||||
@@ -23,7 +23,7 @@ struct criteria_roomentered *ptr_last_enter_room_subobject_entry_type20;
|
||||
//CODE.bss:80075D8C
|
||||
struct criteria_deposit *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
//CODE.bss:80075D90
|
||||
u32 *ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
struct criteria_picture *ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
|
||||
// data
|
||||
s32 objective_count = 0xFFFFFFFF;
|
||||
@@ -75,6 +75,9 @@ ObjectRecord *objFindByTagId(s32 TagID) //#MATCH
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Address: 0x7f057104
|
||||
*/
|
||||
u8 * get_ptr_text_for_watch_breifing_page(WATCH_BRIEFING_PAGE page)
|
||||
{
|
||||
struct watchMenuObjectiveText * curentry;
|
||||
@@ -95,15 +98,15 @@ u8 * get_ptr_text_for_watch_breifing_page(WATCH_BRIEFING_PAGE page)
|
||||
{
|
||||
if (page == 0)
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_29)); //"E R R O R\n"
|
||||
textptr = langGet(getStringID(LMISC, MISC_STR_29_ERROR_LF)); //"E R R O R\n"
|
||||
}
|
||||
else if (page == 1)
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_2A)); //"no briefing for this mission\n"
|
||||
textptr = langGet(getStringID(LMISC, MISC_STR_2A_NOBRIEFING_LF)); //"no briefing for this mission\n"
|
||||
}
|
||||
else
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_2B)); //"\n"
|
||||
textptr = langGet(getStringID(LMISC, MISC_STR_2B_LF)); //"\n"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -155,7 +158,7 @@ s32 get_difficulty_for_objective(s32 objectiveIndex)
|
||||
/*
|
||||
* Return Status of objective.
|
||||
* Note: This matches but may not in future depending on the result of var
|
||||
* "OBJECTIVESTATUS *dword_CODE_bss_80075D58".
|
||||
* "OBJECTIVESTATUS *objectiveStatuses".
|
||||
* https://decomp.me/scratch/MF31e
|
||||
*/
|
||||
OBJECTIVESTATUS get_status_of_objective(s32 objectiveNum) //#MATCH
|
||||
@@ -168,7 +171,7 @@ OBJECTIVESTATUS get_status_of_objective(s32 objectiveNum) //#MATCH
|
||||
{
|
||||
if (!&objective_ptrs[objectiveNum]->id)
|
||||
{
|
||||
status = dword_CODE_bss_80075D58[objectiveNum];
|
||||
status = objectiveStatuses[objectiveNum];
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -347,20 +350,28 @@ void display_objective_status_text_on_status_change(void) {
|
||||
|
||||
for (i = 0; i <= objective_count; i++) {
|
||||
status = get_status_of_objective(i);
|
||||
if (dword_CODE_bss_80075D58[i] != status) {
|
||||
dword_CODE_bss_80075D58[i] = status;
|
||||
if (objectiveStatuses[i] != status) {
|
||||
objectiveStatuses[i] = status;
|
||||
if (get_difficulty_for_objective(i) <= lvlGetSelectedDifficulty()) {
|
||||
if (j_text_trigger != 0) {
|
||||
sprintf(&buffer, "%s \x80%c ", langGet(0xB02C), availableindex + 0x1A);
|
||||
} else {
|
||||
sprintf(&buffer, "%s %c: ", langGet(0xB02C), availableindex + 0x61);
|
||||
if (j_text_trigger != 0)
|
||||
{
|
||||
sprintf(&buffer, "%s \x80%c ", langGet(getStringID(LMISC, MISC_STR_2C_OBJECTIVE)), availableindex + 0x1A);
|
||||
}
|
||||
if (status == OBJECTIVESTATUS_COMPLETE) {
|
||||
strcat(&buffer, langGet(0xB02D));
|
||||
} else if (status == OBJECTIVESTATUS_INCOMPLETE) {
|
||||
strcat(&buffer, langGet(0xB02E));
|
||||
} else if (status == OBJECTIVESTATUS_FAILED) {
|
||||
strcat(&buffer, langGet(0xB02F));
|
||||
else
|
||||
{
|
||||
sprintf(&buffer, "%s %c: ", langGet(getStringID(LMISC, MISC_STR_2C_OBJECTIVE)), availableindex + 0x61);
|
||||
}
|
||||
if (status == OBJECTIVESTATUS_COMPLETE)
|
||||
{
|
||||
strcat(&buffer, langGet(getStringID(LMISC, MISC_STR_2D_COMPLETED_LF)));
|
||||
}
|
||||
else if (status == OBJECTIVESTATUS_INCOMPLETE)
|
||||
{
|
||||
strcat(&buffer, langGet(getStringID(LMISC, MISC_STR_2E_INCOMPLETE_LF)));
|
||||
}
|
||||
else if (status == OBJECTIVESTATUS_FAILED)
|
||||
{
|
||||
strcat(&buffer, langGet(getStringID(LMISC, MISC_STR_2F_FAILED_LF)));
|
||||
}
|
||||
#ifdef VERSION_US
|
||||
hudmsgBottomShow(&buffer);
|
||||
@@ -454,159 +465,60 @@ void objectivestatusCheckDeposit(s32 weaponnum, s32 roomid)
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* NTSC address 0x7F057898.
|
||||
*/
|
||||
void objectiveTakePictureHandler(void)
|
||||
{
|
||||
ObjectRecord *target_object;
|
||||
PropRecord *target_prop;
|
||||
struct coord3d sp84;
|
||||
struct coord2d sp7C;
|
||||
struct coord2d sp74;
|
||||
struct rectbbox sp64;
|
||||
s32 padding2[2];
|
||||
struct criteria_picture *criteria;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void objectiveTakePictureHandler(void) {
|
||||
|
||||
criteria = ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
for (; criteria != NULL; criteria = criteria->next)
|
||||
{
|
||||
if (criteria->flag == 0)
|
||||
{
|
||||
target_object = objFindByTagId(criteria->tag_id);
|
||||
|
||||
if (target_object != NULL)
|
||||
{
|
||||
target_prop = target_object->prop;
|
||||
|
||||
if ((target_prop != NULL)
|
||||
&& (target_prop->flags & PROPFLAG_ONSCREEN)
|
||||
&& (target_prop->zDepth >= 0.0f) // draw/render distance
|
||||
&& (objIsHealthy(target_object) != 0)
|
||||
&& (sub_GAME_7F050D30(target_object->prop, &sp84, &sp7C, &sp74) != 0))
|
||||
{
|
||||
sub_GAME_7F03F948(&sp84, &sp7C, &sp74, &sp64.right, &sp64.left);
|
||||
|
||||
if (getPlayer_c_screenleft() < sp64.right)
|
||||
{
|
||||
if ((sp64.right < (getPlayer_c_screenleft() + getPlayer_c_screenwidth())) && (getPlayer_c_screenleft() < sp64.left))
|
||||
{
|
||||
if ((sp64.left < (getPlayer_c_screenleft() + getPlayer_c_screenwidth())) && (getPlayer_c_screentop() < sp64.down))
|
||||
{
|
||||
if ((sp64.down < (getPlayer_c_screentop() + getPlayer_c_screenheight())) && (getPlayer_c_screentop() < sp64.up))
|
||||
{
|
||||
if (sp64.up < (getPlayer_c_screentop() + getPlayer_c_screenheight()))
|
||||
{
|
||||
criteria->flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel objectiveTakePictureHandler
|
||||
/* 08C3C8 7F057898 27BDFF68 */ addiu $sp, $sp, -0x98
|
||||
/* 08C3CC 7F05789C AFB10034 */ sw $s1, 0x34($sp)
|
||||
/* 08C3D0 7F0578A0 3C118007 */ lui $s1, %hi(ptr_last_photo_obj_in_room_subobject_entry_type1E)
|
||||
/* 08C3D4 7F0578A4 8E315D90 */ lw $s1, %lo(ptr_last_photo_obj_in_room_subobject_entry_type1E)($s1)
|
||||
/* 08C3D8 7F0578A8 AFBF004C */ sw $ra, 0x4c($sp)
|
||||
/* 08C3DC 7F0578AC AFB60048 */ sw $s6, 0x48($sp)
|
||||
/* 08C3E0 7F0578B0 AFB50044 */ sw $s5, 0x44($sp)
|
||||
/* 08C3E4 7F0578B4 AFB40040 */ sw $s4, 0x40($sp)
|
||||
/* 08C3E8 7F0578B8 AFB3003C */ sw $s3, 0x3c($sp)
|
||||
/* 08C3EC 7F0578BC AFB20038 */ sw $s2, 0x38($sp)
|
||||
/* 08C3F0 7F0578C0 AFB00030 */ sw $s0, 0x30($sp)
|
||||
/* 08C3F4 7F0578C4 F7B60028 */ sdc1 $f22, 0x28($sp)
|
||||
/* 08C3F8 7F0578C8 12200071 */ beqz $s1, .L7F057A90
|
||||
/* 08C3FC 7F0578CC F7B40020 */ sdc1 $f20, 0x20($sp)
|
||||
/* 08C400 7F0578D0 4480B000 */ mtc1 $zero, $f22
|
||||
/* 08C404 7F0578D4 24160001 */ li $s6, 1
|
||||
/* 08C408 7F0578D8 27B50064 */ addiu $s5, $sp, 0x64
|
||||
/* 08C40C 7F0578DC 27B40074 */ addiu $s4, $sp, 0x74
|
||||
/* 08C410 7F0578E0 27B3007C */ addiu $s3, $sp, 0x7c
|
||||
/* 08C414 7F0578E4 27B20084 */ addiu $s2, $sp, 0x84
|
||||
/* 08C418 7F0578E8 8E2E0008 */ lw $t6, 8($s1)
|
||||
.L7F0578EC:
|
||||
/* 08C41C 7F0578EC 55C00066 */ bnezl $t6, .L7F057A88
|
||||
/* 08C420 7F0578F0 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C424 7F0578F4 0FC15C30 */ jal objFindByTagId
|
||||
/* 08C428 7F0578F8 8E240004 */ lw $a0, 4($s1)
|
||||
/* 08C42C 7F0578FC 10400061 */ beqz $v0, .L7F057A84
|
||||
/* 08C430 7F057900 00408025 */ move $s0, $v0
|
||||
/* 08C434 7F057904 8C430010 */ lw $v1, 0x10($v0)
|
||||
/* 08C438 7F057908 5060005F */ beql $v1, $zero, .L7F057A88
|
||||
/* 08C43C 7F05790C 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C440 7F057910 906F0001 */ lbu $t7, 1($v1)
|
||||
/* 08C444 7F057914 31F80002 */ andi $t8, $t7, 2
|
||||
/* 08C448 7F057918 5300005B */ beql $t8, $zero, .L7F057A88
|
||||
/* 08C44C 7F05791C 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C450 7F057920 C4640018 */ lwc1 $f4, 0x18($v1)
|
||||
/* 08C454 7F057924 4604B03E */ c.le.s $f22, $f4
|
||||
/* 08C458 7F057928 00000000 */ nop
|
||||
/* 08C45C 7F05792C 45020056 */ bc1fl .L7F057A88
|
||||
/* 08C460 7F057930 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C464 7F057934 0FC13BCD */ jal objIsHealthy
|
||||
/* 08C468 7F057938 00402025 */ move $a0, $v0
|
||||
/* 08C46C 7F05793C 10400051 */ beqz $v0, .L7F057A84
|
||||
/* 08C470 7F057940 02402825 */ move $a1, $s2
|
||||
/* 08C474 7F057944 8E040010 */ lw $a0, 0x10($s0)
|
||||
/* 08C478 7F057948 02603025 */ move $a2, $s3
|
||||
/* 08C47C 7F05794C 0FC1434C */ jal sub_GAME_7F050D30
|
||||
/* 08C480 7F057950 02803825 */ move $a3, $s4
|
||||
/* 08C484 7F057954 1040004B */ beqz $v0, .L7F057A84
|
||||
/* 08C488 7F057958 02402025 */ move $a0, $s2
|
||||
/* 08C48C 7F05795C 02602825 */ move $a1, $s3
|
||||
/* 08C490 7F057960 02803025 */ move $a2, $s4
|
||||
/* 08C494 7F057964 27A7006C */ addiu $a3, $sp, 0x6c
|
||||
/* 08C498 7F057968 0FC0FE52 */ jal sub_GAME_7F03F948
|
||||
/* 08C49C 7F05796C AFB50010 */ sw $s5, 0x10($sp)
|
||||
/* 08C4A0 7F057970 0FC1E131 */ jal getPlayer_c_screenleft
|
||||
/* 08C4A4 7F057974 00000000 */ nop
|
||||
/* 08C4A8 7F057978 C7A6006C */ lwc1 $f6, 0x6c($sp)
|
||||
/* 08C4AC 7F05797C 4606003C */ c.lt.s $f0, $f6
|
||||
/* 08C4B0 7F057980 00000000 */ nop
|
||||
/* 08C4B4 7F057984 45020040 */ bc1fl .L7F057A88
|
||||
/* 08C4B8 7F057988 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C4BC 7F05798C 0FC1E131 */ jal getPlayer_c_screenleft
|
||||
/* 08C4C0 7F057990 00000000 */ nop
|
||||
/* 08C4C4 7F057994 0FC1E129 */ jal getPlayer_c_screenwidth
|
||||
/* 08C4C8 7F057998 46000506 */ mov.s $f20, $f0
|
||||
/* 08C4CC 7F05799C 46140280 */ add.s $f10, $f0, $f20
|
||||
/* 08C4D0 7F0579A0 C7A8006C */ lwc1 $f8, 0x6c($sp)
|
||||
/* 08C4D4 7F0579A4 460A403C */ c.lt.s $f8, $f10
|
||||
/* 08C4D8 7F0579A8 00000000 */ nop
|
||||
/* 08C4DC 7F0579AC 45020036 */ bc1fl .L7F057A88
|
||||
/* 08C4E0 7F0579B0 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C4E4 7F0579B4 0FC1E131 */ jal getPlayer_c_screenleft
|
||||
/* 08C4E8 7F0579B8 00000000 */ nop
|
||||
/* 08C4EC 7F0579BC C7B00064 */ lwc1 $f16, 0x64($sp)
|
||||
/* 08C4F0 7F0579C0 4610003C */ c.lt.s $f0, $f16
|
||||
/* 08C4F4 7F0579C4 00000000 */ nop
|
||||
/* 08C4F8 7F0579C8 4502002F */ bc1fl .L7F057A88
|
||||
/* 08C4FC 7F0579CC 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C500 7F0579D0 0FC1E131 */ jal getPlayer_c_screenleft
|
||||
/* 08C504 7F0579D4 00000000 */ nop
|
||||
/* 08C508 7F0579D8 0FC1E129 */ jal getPlayer_c_screenwidth
|
||||
/* 08C50C 7F0579DC 46000506 */ mov.s $f20, $f0
|
||||
/* 08C510 7F0579E0 46140100 */ add.s $f4, $f0, $f20
|
||||
/* 08C514 7F0579E4 C7B20064 */ lwc1 $f18, 0x64($sp)
|
||||
/* 08C518 7F0579E8 4604903C */ c.lt.s $f18, $f4
|
||||
/* 08C51C 7F0579EC 00000000 */ nop
|
||||
/* 08C520 7F0579F0 45020025 */ bc1fl .L7F057A88
|
||||
/* 08C524 7F0579F4 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C528 7F0579F8 0FC1E135 */ jal getPlayer_c_screentop
|
||||
/* 08C52C 7F0579FC 00000000 */ nop
|
||||
/* 08C530 7F057A00 C7A60070 */ lwc1 $f6, 0x70($sp)
|
||||
/* 08C534 7F057A04 4606003C */ c.lt.s $f0, $f6
|
||||
/* 08C538 7F057A08 00000000 */ nop
|
||||
/* 08C53C 7F057A0C 4502001E */ bc1fl .L7F057A88
|
||||
/* 08C540 7F057A10 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C544 7F057A14 0FC1E135 */ jal getPlayer_c_screentop
|
||||
/* 08C548 7F057A18 00000000 */ nop
|
||||
/* 08C54C 7F057A1C 0FC1E12D */ jal getPlayer_c_screenheight
|
||||
/* 08C550 7F057A20 46000506 */ mov.s $f20, $f0
|
||||
/* 08C554 7F057A24 46140280 */ add.s $f10, $f0, $f20
|
||||
/* 08C558 7F057A28 C7A80070 */ lwc1 $f8, 0x70($sp)
|
||||
/* 08C55C 7F057A2C 460A403C */ c.lt.s $f8, $f10
|
||||
/* 08C560 7F057A30 00000000 */ nop
|
||||
/* 08C564 7F057A34 45020014 */ bc1fl .L7F057A88
|
||||
/* 08C568 7F057A38 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C56C 7F057A3C 0FC1E135 */ jal getPlayer_c_screentop
|
||||
/* 08C570 7F057A40 00000000 */ nop
|
||||
/* 08C574 7F057A44 C7B00068 */ lwc1 $f16, 0x68($sp)
|
||||
/* 08C578 7F057A48 4610003C */ c.lt.s $f0, $f16
|
||||
/* 08C57C 7F057A4C 00000000 */ nop
|
||||
/* 08C580 7F057A50 4502000D */ bc1fl .L7F057A88
|
||||
/* 08C584 7F057A54 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C588 7F057A58 0FC1E135 */ jal getPlayer_c_screentop
|
||||
/* 08C58C 7F057A5C 00000000 */ nop
|
||||
/* 08C590 7F057A60 0FC1E12D */ jal getPlayer_c_screenheight
|
||||
/* 08C594 7F057A64 46000506 */ mov.s $f20, $f0
|
||||
/* 08C598 7F057A68 46140100 */ add.s $f4, $f0, $f20
|
||||
/* 08C59C 7F057A6C C7B20068 */ lwc1 $f18, 0x68($sp)
|
||||
/* 08C5A0 7F057A70 4604903C */ c.lt.s $f18, $f4
|
||||
/* 08C5A4 7F057A74 00000000 */ nop
|
||||
/* 08C5A8 7F057A78 45020003 */ bc1fl .L7F057A88
|
||||
/* 08C5AC 7F057A7C 8E31000C */ lw $s1, 0xc($s1)
|
||||
/* 08C5B0 7F057A80 AE360008 */ sw $s6, 8($s1)
|
||||
.L7F057A84:
|
||||
/* 08C5B4 7F057A84 8E31000C */ lw $s1, 0xc($s1)
|
||||
.L7F057A88:
|
||||
/* 08C5B8 7F057A88 5620FF98 */ bnezl $s1, .L7F0578EC
|
||||
/* 08C5BC 7F057A8C 8E2E0008 */ lw $t6, 8($s1)
|
||||
.L7F057A90:
|
||||
/* 08C5C0 7F057A90 8FBF004C */ lw $ra, 0x4c($sp)
|
||||
/* 08C5C4 7F057A94 D7B40020 */ ldc1 $f20, 0x20($sp)
|
||||
/* 08C5C8 7F057A98 D7B60028 */ ldc1 $f22, 0x28($sp)
|
||||
/* 08C5CC 7F057A9C 8FB00030 */ lw $s0, 0x30($sp)
|
||||
/* 08C5D0 7F057AA0 8FB10034 */ lw $s1, 0x34($sp)
|
||||
/* 08C5D4 7F057AA4 8FB20038 */ lw $s2, 0x38($sp)
|
||||
/* 08C5D8 7F057AA8 8FB3003C */ lw $s3, 0x3c($sp)
|
||||
/* 08C5DC 7F057AAC 8FB40040 */ lw $s4, 0x40($sp)
|
||||
/* 08C5E0 7F057AB0 8FB50044 */ lw $s5, 0x44($sp)
|
||||
/* 08C5E4 7F057AB4 8FB60048 */ lw $s6, 0x48($sp)
|
||||
/* 08C5E8 7F057AB8 03E00008 */ jr $ra
|
||||
/* 08C5EC 7F057ABC 27BD0098 */ addiu $sp, $sp, 0x98
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
//filebreak
|
||||
|
||||
@@ -3,11 +3,19 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
extern struct objective_entry * objective_ptrs[];
|
||||
extern struct objective_entry * objective_ptrs[OBJECTIVES_MAX];
|
||||
extern OBJECTIVESTATUS objectiveStatuses[OBJECTIVES_MAX]; //This is an array of 10 OBJECTIVESTATUS,
|
||||
|
||||
extern u32 *ptr_last_tag_entry_type16;
|
||||
extern struct watchMenuObjectiveText *ptr_last_briefing_setup_entry_type23;
|
||||
extern struct criteria_roomentered *ptr_last_enter_room_subobject_entry_type20;
|
||||
extern struct criteria_deposit *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
extern struct criteria_picture *ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
|
||||
extern s32 objective_count;
|
||||
extern s32 objective_count_related;
|
||||
|
||||
void objectiveTakePictureHandler();
|
||||
void objectiveTakePictureHandler(void);
|
||||
bool objectiveIsAllComplete(void);
|
||||
TagObjectRecord *sub_GAME_7F057080(s32 TagID);
|
||||
s32 objectiveGetCount(void);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user