mirror of
https://gitlab.com/kholdfuzion/goldeneye_src
synced 2026-09-09 11:24:13 -04:00
update
This commit is contained in:
+375
-807
File diff suppressed because it is too large
Load Diff
+5
-3
@@ -109,14 +109,14 @@ extern bg_room_data * ptr_bgdata_room_fileposition_list;
|
||||
extern s_room_info array_room_info[];
|
||||
|
||||
|
||||
void bgInitDebugNoticeList(void);
|
||||
void bgInit(void);
|
||||
|
||||
// sub_GAME_7F033B38 requres arg be s32
|
||||
s32 sub_GAME_7F0B8FD0(s32 roomA, u8 roomB);
|
||||
|
||||
//f32 sub_GAME_7F0B4F9C(s32 room); // u8 not s32 for sub_GAME_7F0B2FE0
|
||||
u32 bgDecompress(u8* source, u8 *target);
|
||||
void sub_GAME_7F0B65C4(s32 roomID);
|
||||
void delete_room_data(s32 roomID);
|
||||
void load_bg_file(LEVEL_INDEX stagenum);
|
||||
|
||||
s32 bgDebugRemoved7F0B9DE4(s32 arg0, s32 arg1, s32 arg2);
|
||||
@@ -140,6 +140,8 @@ 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);
|
||||
|
||||
#endif
|
||||
|
||||
+7
-7
@@ -33,11 +33,11 @@ u32 sub_GAME_7F0BA5C0(u32 arg0, u32 arg1) {
|
||||
phi_v0 = arg0;
|
||||
loop_2:
|
||||
// Node 2
|
||||
if (FogDL_primary_80044940 != 0)
|
||||
if (DL_LUT_PRIMARY_ADDFOG != 0)
|
||||
{
|
||||
// Node 3
|
||||
phi_a0 = FogDL_primary_80044940;
|
||||
phi_v1 = &FogDL_primary_80044940;
|
||||
phi_a0 = DL_LUT_PRIMARY_ADDFOG;
|
||||
phi_v1 = &DL_LUT_PRIMARY_ADDFOG;
|
||||
loop_4:
|
||||
// Node 4
|
||||
if (*phi_v0 == phi_a0)
|
||||
@@ -77,12 +77,12 @@ 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(FogDL_primary_80044940)
|
||||
/* 0EF100 7F0BA5D0 24C64940 */ addiu $a2, %lo(FogDL_primary_80044940) # addiu $a2, $a2, 0x4940
|
||||
/* 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(FogDL_primary_80044940)
|
||||
/* 0EF10C 7F0BA5DC 25EF4940 */ addiu $t7, %lo(FogDL_primary_80044940) # addiu $t7, $t7, 0x4940
|
||||
/* 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)
|
||||
|
||||
+169
-500
@@ -1,138 +1,71 @@
|
||||
#include "blood_decrypt.h"
|
||||
|
||||
#ifdef NONMATCHING
|
||||
u8 *decrypt_bleeding_animation_data(u8*, s32, s32, u8*, s8*) {
|
||||
// address 0x7F01CAE0 NTSC
|
||||
u8 *decrypt_bleeding_animation_data(u8 *arg0, u8 arg1, u8 arg2, u8 *arg3, u8 *arg4)
|
||||
{
|
||||
u8 var_a2;
|
||||
u8 var_a3;
|
||||
u8 temp_v0;
|
||||
u8 var_v1;
|
||||
u8 next;
|
||||
|
||||
temp_v0 = *arg0++;
|
||||
*arg4 = temp_v0;
|
||||
|
||||
do
|
||||
{
|
||||
s32 unused;
|
||||
var_v1 = *arg0++;
|
||||
unused = var_v1;
|
||||
|
||||
var_a2 = 0xFF;
|
||||
|
||||
if (var_v1 == 0xFF)
|
||||
{
|
||||
var_a3 = 0;
|
||||
for (var_v1 = *arg0++; var_v1 != 0xFF; var_a2 ^= 0xff, var_v1 = *arg0++ )
|
||||
{
|
||||
var_a3 += var_v1;
|
||||
|
||||
while (var_v1-- > 0)
|
||||
{
|
||||
*arg3++ = var_a2;
|
||||
}
|
||||
}
|
||||
|
||||
while (var_a3++ < arg1)
|
||||
{
|
||||
*arg3++ = var_a2;
|
||||
}
|
||||
|
||||
arg2--;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a3 = temp_v0 + (var_v1 & 0x1f);
|
||||
var_v1 = (var_v1 >> 5) + 1;
|
||||
arg2 -= var_v1;
|
||||
|
||||
do
|
||||
{
|
||||
var_a2 = var_a3;
|
||||
while (var_a2-- > 0)
|
||||
{
|
||||
*arg3++ = 0xff;
|
||||
}
|
||||
|
||||
var_a2 = arg1 - var_a3;
|
||||
while (var_a2-- > 0)
|
||||
{
|
||||
*arg3++ = 0;
|
||||
}
|
||||
} while (--var_v1 > 0);
|
||||
}
|
||||
} while (arg2 > 0);
|
||||
|
||||
return arg0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel decrypt_bleeding_animation_data
|
||||
/* 051610 7F01CAE0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 051614 7F01CAE4 AFB30014 */ sw $s3, 0x14($sp)
|
||||
/* 051618 7F01CAE8 AFB20010 */ sw $s2, 0x10($sp)
|
||||
/* 05161C 7F01CAEC AFB1000C */ sw $s1, 0xc($sp)
|
||||
/* 051620 7F01CAF0 AFB00008 */ sw $s0, 8($sp)
|
||||
/* 051624 7F01CAF4 AFA5001C */ sw $a1, 0x1c($sp)
|
||||
/* 051628 7F01CAF8 AFA60020 */ sw $a2, 0x20($sp)
|
||||
/* 05162C 7F01CAFC 90820000 */ lbu $v0, ($a0)
|
||||
/* 051630 7F01CB00 8FAF0028 */ lw $t7, 0x28($sp)
|
||||
/* 051634 7F01CB04 00E08025 */ move $s0, $a3
|
||||
/* 051638 7F01CB08 30D100FF */ andi $s1, $a2, 0xff
|
||||
/* 05163C 7F01CB0C 30A900FF */ andi $t1, $a1, 0xff
|
||||
/* 051640 7F01CB10 24840001 */ addiu $a0, $a0, 1
|
||||
/* 051644 7F01CB14 241200FF */ li $s2, 255
|
||||
/* 051648 7F01CB18 241300FF */ li $s3, 255
|
||||
/* 05164C 7F01CB1C A1E20000 */ sb $v0, ($t7)
|
||||
/* 051650 7F01CB20 90850000 */ lbu $a1, ($a0)
|
||||
.L7F01CB24:
|
||||
/* 051654 7F01CB24 24840001 */ addiu $a0, $a0, 1
|
||||
/* 051658 7F01CB28 326600FF */ andi $a2, $s3, 0xff
|
||||
/* 05165C 7F01CB2C 1645002B */ bne $s2, $a1, .L7F01CBDC
|
||||
/* 051660 7F01CB30 30B8001F */ andi $t8, $a1, 0x1f
|
||||
/* 051664 7F01CB34 90830000 */ lbu $v1, ($a0)
|
||||
/* 051668 7F01CB38 00003825 */ move $a3, $zero
|
||||
/* 05166C 7F01CB3C 24840001 */ addiu $a0, $a0, 1
|
||||
/* 051670 7F01CB40 12430016 */ beq $s2, $v1, .L7F01CB9C
|
||||
/* 051674 7F01CB44 00602825 */ move $a1, $v1
|
||||
.L7F01CB48:
|
||||
/* 051678 7F01CB48 00E53821 */ addu $a3, $a3, $a1
|
||||
/* 05167C 7F01CB4C 2463FFFF */ addiu $v1, $v1, -1
|
||||
/* 051680 7F01CB50 30F800FF */ andi $t8, $a3, 0xff
|
||||
/* 051684 7F01CB54 307900FF */ andi $t9, $v1, 0xff
|
||||
/* 051688 7F01CB58 0005402A */ slt $t0, $zero, $a1
|
||||
/* 05168C 7F01CB5C 03003825 */ move $a3, $t8
|
||||
/* 051690 7F01CB60 11000008 */ beqz $t0, .L7F01CB84
|
||||
/* 051694 7F01CB64 03201825 */ move $v1, $t9
|
||||
.L7F01CB68:
|
||||
/* 051698 7F01CB68 0003402A */ slt $t0, $zero, $v1
|
||||
/* 05169C 7F01CB6C 2463FFFF */ addiu $v1, $v1, -1
|
||||
/* 0516A0 7F01CB70 306E00FF */ andi $t6, $v1, 0xff
|
||||
/* 0516A4 7F01CB74 01C01825 */ move $v1, $t6
|
||||
/* 0516A8 7F01CB78 A2060000 */ sb $a2, ($s0)
|
||||
/* 0516AC 7F01CB7C 1500FFFA */ bnez $t0, .L7F01CB68
|
||||
/* 0516B0 7F01CB80 26100001 */ addiu $s0, $s0, 1
|
||||
.L7F01CB84:
|
||||
/* 0516B4 7F01CB84 90830000 */ lbu $v1, ($a0)
|
||||
/* 0516B8 7F01CB88 38CF00FF */ xori $t7, $a2, 0xff
|
||||
/* 0516BC 7F01CB8C 31E600FF */ andi $a2, $t7, 0xff
|
||||
/* 0516C0 7F01CB90 24840001 */ addiu $a0, $a0, 1
|
||||
/* 0516C4 7F01CB94 1643FFEC */ bne $s2, $v1, .L7F01CB48
|
||||
/* 0516C8 7F01CB98 00602825 */ move $a1, $v1
|
||||
.L7F01CB9C:
|
||||
/* 0516CC 7F01CB9C 00E9402A */ slt $t0, $a3, $t1
|
||||
/* 0516D0 7F01CBA0 24E70001 */ addiu $a3, $a3, 1
|
||||
/* 0516D4 7F01CBA4 30F900FF */ andi $t9, $a3, 0xff
|
||||
/* 0516D8 7F01CBA8 11000008 */ beqz $t0, .L7F01CBCC
|
||||
/* 0516DC 7F01CBAC 03203825 */ move $a3, $t9
|
||||
.L7F01CBB0:
|
||||
/* 0516E0 7F01CBB0 00E9402A */ slt $t0, $a3, $t1
|
||||
/* 0516E4 7F01CBB4 24E70001 */ addiu $a3, $a3, 1
|
||||
/* 0516E8 7F01CBB8 30EE00FF */ andi $t6, $a3, 0xff
|
||||
/* 0516EC 7F01CBBC 01C03825 */ move $a3, $t6
|
||||
/* 0516F0 7F01CBC0 A2060000 */ sb $a2, ($s0)
|
||||
/* 0516F4 7F01CBC4 1500FFFA */ bnez $t0, .L7F01CBB0
|
||||
/* 0516F8 7F01CBC8 26100001 */ addiu $s0, $s0, 1
|
||||
.L7F01CBCC:
|
||||
/* 0516FC 7F01CBCC 2631FFFF */ addiu $s1, $s1, -1
|
||||
/* 051700 7F01CBD0 322F00FF */ andi $t7, $s1, 0xff
|
||||
/* 051704 7F01CBD4 10000026 */ b .L7F01CC70
|
||||
/* 051708 7F01CBD8 01E08825 */ move $s1, $t7
|
||||
.L7F01CBDC:
|
||||
/* 05170C 7F01CBDC 00583821 */ addu $a3, $v0, $t8
|
||||
/* 051710 7F01CBE0 00051943 */ sra $v1, $a1, 5
|
||||
/* 051714 7F01CBE4 30F900FF */ andi $t9, $a3, 0xff
|
||||
/* 051718 7F01CBE8 24630001 */ addiu $v1, $v1, 1
|
||||
/* 05171C 7F01CBEC 306E00FF */ andi $t6, $v1, 0xff
|
||||
/* 051720 7F01CBF0 01393023 */ subu $a2, $t1, $t9
|
||||
/* 051724 7F01CBF4 022E8823 */ subu $s1, $s1, $t6
|
||||
/* 051728 7F01CBF8 30D800FF */ andi $t8, $a2, 0xff
|
||||
/* 05172C 7F01CBFC 322F00FF */ andi $t7, $s1, 0xff
|
||||
/* 051730 7F01CC00 01C01825 */ move $v1, $t6
|
||||
/* 051734 7F01CC04 01E08825 */ move $s1, $t7
|
||||
/* 051738 7F01CC08 0018602A */ slt $t4, $zero, $t8
|
||||
/* 05173C 7F01CC0C 270DFFFF */ addiu $t5, $t8, -1
|
||||
/* 051740 7F01CC10 0019502A */ slt $t2, $zero, $t9
|
||||
/* 051744 7F01CC14 272BFFFF */ addiu $t3, $t9, -1
|
||||
.L7F01CC18:
|
||||
/* 051748 7F01CC18 11400008 */ beqz $t2, .L7F01CC3C
|
||||
/* 05174C 7F01CC1C 316600FF */ andi $a2, $t3, 0xff
|
||||
.L7F01CC20:
|
||||
/* 051750 7F01CC20 0006402A */ slt $t0, $zero, $a2
|
||||
/* 051754 7F01CC24 24C6FFFF */ addiu $a2, $a2, -1
|
||||
/* 051758 7F01CC28 30D900FF */ andi $t9, $a2, 0xff
|
||||
/* 05175C 7F01CC2C 03203025 */ move $a2, $t9
|
||||
/* 051760 7F01CC30 A2130000 */ sb $s3, ($s0)
|
||||
/* 051764 7F01CC34 1500FFFA */ bnez $t0, .L7F01CC20
|
||||
/* 051768 7F01CC38 26100001 */ addiu $s0, $s0, 1
|
||||
.L7F01CC3C:
|
||||
/* 05176C 7F01CC3C 11800008 */ beqz $t4, .L7F01CC60
|
||||
/* 051770 7F01CC40 31A600FF */ andi $a2, $t5, 0xff
|
||||
.L7F01CC44:
|
||||
/* 051774 7F01CC44 0006402A */ slt $t0, $zero, $a2
|
||||
/* 051778 7F01CC48 24C6FFFF */ addiu $a2, $a2, -1
|
||||
/* 05177C 7F01CC4C 30CE00FF */ andi $t6, $a2, 0xff
|
||||
/* 051780 7F01CC50 01C03025 */ move $a2, $t6
|
||||
/* 051784 7F01CC54 A2000000 */ sb $zero, ($s0)
|
||||
/* 051788 7F01CC58 1500FFFA */ bnez $t0, .L7F01CC44
|
||||
/* 05178C 7F01CC5C 26100001 */ addiu $s0, $s0, 1
|
||||
.L7F01CC60:
|
||||
/* 051790 7F01CC60 2463FFFF */ addiu $v1, $v1, -1
|
||||
/* 051794 7F01CC64 306F00FF */ andi $t7, $v1, 0xff
|
||||
/* 051798 7F01CC68 1DE0FFEB */ bgtz $t7, .L7F01CC18
|
||||
/* 05179C 7F01CC6C 01E01825 */ move $v1, $t7
|
||||
.L7F01CC70:
|
||||
/* 0517A0 7F01CC70 5E20FFAC */ bgtzl $s1, .L7F01CB24
|
||||
/* 0517A4 7F01CC74 90850000 */ lbu $a1, ($a0)
|
||||
/* 0517A8 7F01CC78 8FB00008 */ lw $s0, 8($sp)
|
||||
/* 0517AC 7F01CC7C 8FB1000C */ lw $s1, 0xc($sp)
|
||||
/* 0517B0 7F01CC80 8FB20010 */ lw $s2, 0x10($sp)
|
||||
/* 0517B4 7F01CC84 8FB30014 */ lw $s3, 0x14($sp)
|
||||
/* 0517B8 7F01CC88 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 0517BC 7F01CC8C 03E00008 */ jr $ra
|
||||
/* 0517C0 7F01CC90 00801025 */ move $v0, $a0
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -145,398 +78,134 @@ void sub_GAME_7F01CC94(u8* arg0, u16 arg1, u8* arg2)
|
||||
}
|
||||
}
|
||||
|
||||
// Address 0x7F01CCEC NTSC
|
||||
void sub_GAME_7F01CCEC(u8 *arg0, u8 arg1, u8 arg2, u8 *arg3, u8 arg4)
|
||||
{
|
||||
s16 i;
|
||||
s16 j;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F01CCEC(void) {
|
||||
u32 var_t0;
|
||||
u32 var_t1;
|
||||
|
||||
s16 var_t5;
|
||||
|
||||
s16 var_s4;
|
||||
|
||||
u8 tempt9;
|
||||
|
||||
for (i = 0; i < arg2; i++)
|
||||
{
|
||||
for (j = 0; j < arg1; j++)
|
||||
{
|
||||
var_t0 = 0;
|
||||
var_t1 = 0;
|
||||
|
||||
var_t5 = ((i - arg4) < 0) ? 0 : (i - arg4);
|
||||
|
||||
while ((((arg2 - 1) < (i + arg4)) ? (arg2 - 1) : (i + arg4)) >= var_t5)
|
||||
{
|
||||
var_s4 = ((j - arg4) < 0) ? 0 : (j - arg4);
|
||||
|
||||
while ((((arg1 - 1) < (j + arg4)) ? (arg1 - 1) : (j + arg4)) >= var_s4)
|
||||
{
|
||||
var_t1 += arg0[var_s4 + (var_t5 * arg1)];
|
||||
|
||||
var_s4 += 1;
|
||||
var_t0 += 1;
|
||||
}
|
||||
|
||||
var_t5 += 1;
|
||||
}
|
||||
|
||||
tempt9 = (u8) ((u32) ((var_t0 >> 1) + var_t1) / var_t0);
|
||||
arg3[j + (i * arg1)] = tempt9;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F01CCEC
|
||||
/* 05181C 7F01CCEC 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 051820 7F01CCF0 30CF00FF */ andi $t7, $a2, 0xff
|
||||
/* 051824 7F01CCF4 AFBE0024 */ sw $fp, 0x24($sp)
|
||||
/* 051828 7F01CCF8 AFB70020 */ sw $s7, 0x20($sp)
|
||||
/* 05182C 7F01CCFC AFB6001C */ sw $s6, 0x1c($sp)
|
||||
/* 051830 7F01CD00 AFB50018 */ sw $s5, 0x18($sp)
|
||||
/* 051834 7F01CD04 AFB40014 */ sw $s4, 0x14($sp)
|
||||
/* 051838 7F01CD08 AFB30010 */ sw $s3, 0x10($sp)
|
||||
/* 05183C 7F01CD0C AFB2000C */ sw $s2, 0xc($sp)
|
||||
/* 051840 7F01CD10 AFB10008 */ sw $s1, 8($sp)
|
||||
/* 051844 7F01CD14 AFB00004 */ sw $s0, 4($sp)
|
||||
/* 051848 7F01CD18 AFA5002C */ sw $a1, 0x2c($sp)
|
||||
/* 05184C 7F01CD1C AFA60030 */ sw $a2, 0x30($sp)
|
||||
/* 051850 7F01CD20 30AE00FF */ andi $t6, $a1, 0xff
|
||||
/* 051854 7F01CD24 01E01825 */ move $v1, $t7
|
||||
/* 051858 7F01CD28 19E00065 */ blez $t7, .L7F01CEC0
|
||||
/* 05185C 7F01CD2C 00001025 */ move $v0, $zero
|
||||
/* 051860 7F01CD30 01C03025 */ move $a2, $t6
|
||||
/* 051864 7F01CD34 93AA003B */ lbu $t2, 0x3b($sp)
|
||||
.L7F01CD38:
|
||||
/* 051868 7F01CD38 18C0005B */ blez $a2, .L7F01CEA8
|
||||
/* 05186C 7F01CD3C 00002825 */ move $a1, $zero
|
||||
/* 051870 7F01CD40 00460019 */ multu $v0, $a2
|
||||
/* 051874 7F01CD44 01405825 */ move $t3, $t2
|
||||
/* 051878 7F01CD48 004A6023 */ subu $t4, $v0, $t2
|
||||
/* 05187C 7F01CD4C 2470FFFF */ addiu $s0, $v1, -1
|
||||
/* 051880 7F01CD50 004A8821 */ addu $s1, $v0, $t2
|
||||
/* 051884 7F01CD54 0000F012 */ mflo $fp
|
||||
/* 051888 7F01CD58 00000000 */ nop
|
||||
/* 05188C 7F01CD5C 00000000 */ nop
|
||||
/* 051890 7F01CD60 00004025 */ move $t0, $zero
|
||||
.L7F01CD64:
|
||||
/* 051894 7F01CD64 05810003 */ bgez $t4, .L7F01CD74
|
||||
/* 051898 7F01CD68 00004825 */ move $t1, $zero
|
||||
/* 05189C 7F01CD6C 10000004 */ b .L7F01CD80
|
||||
/* 0518A0 7F01CD70 00006825 */ move $t5, $zero
|
||||
.L7F01CD74:
|
||||
/* 0518A4 7F01CD74 000C6C00 */ sll $t5, $t4, 0x10
|
||||
/* 0518A8 7F01CD78 000DC403 */ sra $t8, $t5, 0x10
|
||||
/* 0518AC 7F01CD7C 03006825 */ move $t5, $t8
|
||||
.L7F01CD80:
|
||||
/* 0518B0 7F01CD80 0211082A */ slt $at, $s0, $s1
|
||||
/* 0518B4 7F01CD84 10200003 */ beqz $at, .L7F01CD94
|
||||
/* 0518B8 7F01CD88 02209025 */ move $s2, $s1
|
||||
/* 0518BC 7F01CD8C 10000001 */ b .L7F01CD94
|
||||
/* 0518C0 7F01CD90 02009025 */ move $s2, $s0
|
||||
.L7F01CD94:
|
||||
/* 0518C4 7F01CD94 024D082A */ slt $at, $s2, $t5
|
||||
/* 0518C8 7F01CD98 54200033 */ bnezl $at, .L7F01CE68
|
||||
/* 0518CC 7F01CD9C 0008C842 */ srl $t9, $t0, 1
|
||||
/* 0518D0 7F01CDA0 00AB9823 */ subu $s3, $a1, $t3
|
||||
/* 0518D4 7F01CDA4 24D5FFFF */ addiu $s5, $a2, -1
|
||||
/* 0518D8 7F01CDA8 00ABB021 */ addu $s6, $a1, $t3
|
||||
.L7F01CDAC:
|
||||
/* 0518DC 7F01CDAC 06610003 */ bgez $s3, .L7F01CDBC
|
||||
/* 0518E0 7F01CDB0 02B6082A */ slt $at, $s5, $s6
|
||||
/* 0518E4 7F01CDB4 10000004 */ b .L7F01CDC8
|
||||
/* 0518E8 7F01CDB8 0000A025 */ move $s4, $zero
|
||||
.L7F01CDBC:
|
||||
/* 0518EC 7F01CDBC 0013A400 */ sll $s4, $s3, 0x10
|
||||
/* 0518F0 7F01CDC0 0014CC03 */ sra $t9, $s4, 0x10
|
||||
/* 0518F4 7F01CDC4 0320A025 */ move $s4, $t9
|
||||
.L7F01CDC8:
|
||||
/* 0518F8 7F01CDC8 10200003 */ beqz $at, .L7F01CDD8
|
||||
/* 0518FC 7F01CDCC 02C09025 */ move $s2, $s6
|
||||
/* 051900 7F01CDD0 10000001 */ b .L7F01CDD8
|
||||
/* 051904 7F01CDD4 02A09025 */ move $s2, $s5
|
||||
.L7F01CDD8:
|
||||
/* 051908 7F01CDD8 0254082A */ slt $at, $s2, $s4
|
||||
/* 05190C 7F01CDDC 54200016 */ bnezl $at, .L7F01CE38
|
||||
/* 051910 7F01CDE0 25AD0001 */ addiu $t5, $t5, 1
|
||||
/* 051914 7F01CDE4 01A60019 */ multu $t5, $a2
|
||||
/* 051918 7F01CDE8 0000B812 */ mflo $s7
|
||||
/* 05191C 7F01CDEC 00000000 */ nop
|
||||
/* 051920 7F01CDF0 00000000 */ nop
|
||||
/* 051924 7F01CDF4 00947021 */ addu $t6, $a0, $s4
|
||||
.L7F01CDF8:
|
||||
/* 051928 7F01CDF8 01D77821 */ addu $t7, $t6, $s7
|
||||
/* 05192C 7F01CDFC 91F80000 */ lbu $t8, ($t7)
|
||||
/* 051930 7F01CE00 26940001 */ addiu $s4, $s4, 1
|
||||
/* 051934 7F01CE04 0014CC00 */ sll $t9, $s4, 0x10
|
||||
/* 051938 7F01CE08 02B6082A */ slt $at, $s5, $s6
|
||||
/* 05193C 7F01CE0C 0019A403 */ sra $s4, $t9, 0x10
|
||||
/* 051940 7F01CE10 25080001 */ addiu $t0, $t0, 1
|
||||
/* 051944 7F01CE14 10200003 */ beqz $at, .L7F01CE24
|
||||
/* 051948 7F01CE18 01384821 */ addu $t1, $t1, $t8
|
||||
/* 05194C 7F01CE1C 10000002 */ b .L7F01CE28
|
||||
/* 051950 7F01CE20 02A09025 */ move $s2, $s5
|
||||
.L7F01CE24:
|
||||
/* 051954 7F01CE24 02C09025 */ move $s2, $s6
|
||||
.L7F01CE28:
|
||||
/* 051958 7F01CE28 0254082A */ slt $at, $s2, $s4
|
||||
/* 05195C 7F01CE2C 5020FFF2 */ beql $at, $zero, .L7F01CDF8
|
||||
/* 051960 7F01CE30 00947021 */ addu $t6, $a0, $s4
|
||||
/* 051964 7F01CE34 25AD0001 */ addiu $t5, $t5, 1
|
||||
.L7F01CE38:
|
||||
/* 051968 7F01CE38 000D7C00 */ sll $t7, $t5, 0x10
|
||||
/* 05196C 7F01CE3C 000FC403 */ sra $t8, $t7, 0x10
|
||||
/* 051970 7F01CE40 0211082A */ slt $at, $s0, $s1
|
||||
/* 051974 7F01CE44 10200003 */ beqz $at, .L7F01CE54
|
||||
/* 051978 7F01CE48 03006825 */ move $t5, $t8
|
||||
/* 05197C 7F01CE4C 10000002 */ b .L7F01CE58
|
||||
/* 051980 7F01CE50 02009025 */ move $s2, $s0
|
||||
.L7F01CE54:
|
||||
/* 051984 7F01CE54 02209025 */ move $s2, $s1
|
||||
.L7F01CE58:
|
||||
/* 051988 7F01CE58 024D082A */ slt $at, $s2, $t5
|
||||
/* 05198C 7F01CE5C 1020FFD3 */ beqz $at, .L7F01CDAC
|
||||
/* 051990 7F01CE60 00000000 */ nop
|
||||
/* 051994 7F01CE64 0008C842 */ srl $t9, $t0, 1
|
||||
.L7F01CE68:
|
||||
/* 051998 7F01CE68 03297021 */ addu $t6, $t9, $t1
|
||||
/* 05199C 7F01CE6C 01C8001B */ divu $zero, $t6, $t0
|
||||
/* 0519A0 7F01CE70 00E5C021 */ addu $t8, $a3, $a1
|
||||
/* 0519A4 7F01CE74 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 0519A8 7F01CE78 00057400 */ sll $t6, $a1, 0x10
|
||||
/* 0519AC 7F01CE7C 031EC821 */ addu $t9, $t8, $fp
|
||||
/* 0519B0 7F01CE80 000EC403 */ sra $t8, $t6, 0x10
|
||||
/* 0519B4 7F01CE84 0306082A */ slt $at, $t8, $a2
|
||||
/* 0519B8 7F01CE88 00007812 */ mflo $t7
|
||||
/* 0519BC 7F01CE8C 03002825 */ move $a1, $t8
|
||||
/* 0519C0 7F01CE90 15000002 */ bnez $t0, .L7F01CE9C
|
||||
/* 0519C4 7F01CE94 00000000 */ nop
|
||||
/* 0519C8 7F01CE98 0007000D */ break 7
|
||||
.L7F01CE9C:
|
||||
/* 0519CC 7F01CE9C A32F0000 */ sb $t7, ($t9)
|
||||
/* 0519D0 7F01CEA0 5420FFB0 */ bnezl $at, .L7F01CD64
|
||||
/* 0519D4 7F01CEA4 00004025 */ move $t0, $zero
|
||||
.L7F01CEA8:
|
||||
/* 0519D8 7F01CEA8 24420001 */ addiu $v0, $v0, 1
|
||||
/* 0519DC 7F01CEAC 00027C00 */ sll $t7, $v0, 0x10
|
||||
/* 0519E0 7F01CEB0 000F1403 */ sra $v0, $t7, 0x10
|
||||
/* 0519E4 7F01CEB4 0043082A */ slt $at, $v0, $v1
|
||||
/* 0519E8 7F01CEB8 1420FF9F */ bnez $at, .L7F01CD38
|
||||
/* 0519EC 7F01CEBC 00000000 */ nop
|
||||
.L7F01CEC0:
|
||||
/* 0519F0 7F01CEC0 8FB00004 */ lw $s0, 4($sp)
|
||||
/* 0519F4 7F01CEC4 8FB10008 */ lw $s1, 8($sp)
|
||||
/* 0519F8 7F01CEC8 8FB2000C */ lw $s2, 0xc($sp)
|
||||
/* 0519FC 7F01CECC 8FB30010 */ lw $s3, 0x10($sp)
|
||||
/* 051A00 7F01CED0 8FB40014 */ lw $s4, 0x14($sp)
|
||||
/* 051A04 7F01CED4 8FB50018 */ lw $s5, 0x18($sp)
|
||||
/* 051A08 7F01CED8 8FB6001C */ lw $s6, 0x1c($sp)
|
||||
/* 051A0C 7F01CEDC 8FB70020 */ lw $s7, 0x20($sp)
|
||||
/* 051A10 7F01CEE0 8FBE0024 */ lw $fp, 0x24($sp)
|
||||
/* 051A14 7F01CEE4 03E00008 */ jr $ra
|
||||
/* 051A18 7F01CEE8 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F01CEEC(u8*, s32, u8*) {
|
||||
// Averages 4 pixel data, ending on "second" row.
|
||||
// Address 0x7F01CEEC NTSC
|
||||
void sub_GAME_7F01CEEC(u8 *arg0, s32 arg1, u8 *arg2)
|
||||
{
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
arg0 += 0x61;
|
||||
arg2 += 0x61;
|
||||
|
||||
for (i = 1; i < arg1 - 1; i++, arg2 += 2, arg0 += 2) {
|
||||
for (j = 1; j < 0x5f; j++, arg2++, arg0++) {
|
||||
*arg2 = (arg0[-1] + arg0[0] + arg0[-0x61] + arg0[-0x60] + 2) >> 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F01CEEC
|
||||
/* 051A1C 7F01CEEC 24A3FFFF */ addiu $v1, $a1, -1
|
||||
/* 051A20 7F01CEF0 28610002 */ slti $at, $v1, 2
|
||||
/* 051A24 7F01CEF4 24840061 */ addiu $a0, $a0, 0x61
|
||||
/* 051A28 7F01CEF8 24C60061 */ addiu $a2, $a2, 0x61
|
||||
/* 051A2C 7F01CEFC 14200049 */ bnez $at, .L7F01D024
|
||||
/* 051A30 7F01CF00 24020001 */ li $v0, 1
|
||||
/* 051A34 7F01CF04 2407005F */ li $a3, 95
|
||||
.L7F01CF08:
|
||||
/* 051A38 7F01CF08 908EFFA0 */ lbu $t6, -0x60($a0)
|
||||
/* 051A3C 7F01CF0C 908FFFFF */ lbu $t7, -1($a0)
|
||||
/* 051A40 7F01CF10 90990000 */ lbu $t9, ($a0)
|
||||
/* 051A44 7F01CF14 9089FF9F */ lbu $t1, -0x61($a0)
|
||||
/* 051A48 7F01CF18 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051A4C 7F01CF1C 03194021 */ addu $t0, $t8, $t9
|
||||
/* 051A50 7F01CF20 01095021 */ addu $t2, $t0, $t1
|
||||
/* 051A54 7F01CF24 254B0002 */ addiu $t3, $t2, 2
|
||||
/* 051A58 7F01CF28 000B6083 */ sra $t4, $t3, 2
|
||||
/* 051A5C 7F01CF2C A0CC0000 */ sb $t4, ($a2)
|
||||
/* 051A60 7F01CF30 908E0000 */ lbu $t6, ($a0)
|
||||
/* 051A64 7F01CF34 908DFFA1 */ lbu $t5, -0x5f($a0)
|
||||
/* 051A68 7F01CF38 90980001 */ lbu $t8, 1($a0)
|
||||
/* 051A6C 7F01CF3C 9088FFA0 */ lbu $t0, -0x60($a0)
|
||||
/* 051A70 7F01CF40 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051A74 7F01CF44 01F8C821 */ addu $t9, $t7, $t8
|
||||
/* 051A78 7F01CF48 03284821 */ addu $t1, $t9, $t0
|
||||
/* 051A7C 7F01CF4C 252A0002 */ addiu $t2, $t1, 2
|
||||
/* 051A80 7F01CF50 000A5883 */ sra $t3, $t2, 2
|
||||
/* 051A84 7F01CF54 A0CB0001 */ sb $t3, 1($a2)
|
||||
/* 051A88 7F01CF58 24050003 */ li $a1, 3
|
||||
/* 051A8C 7F01CF5C 24C60002 */ addiu $a2, $a2, 2
|
||||
/* 051A90 7F01CF60 24840002 */ addiu $a0, $a0, 2
|
||||
.L7F01CF64:
|
||||
/* 051A94 7F01CF64 908CFFA0 */ lbu $t4, -0x60($a0)
|
||||
/* 051A98 7F01CF68 908DFFFF */ lbu $t5, -1($a0)
|
||||
/* 051A9C 7F01CF6C 908F0000 */ lbu $t7, ($a0)
|
||||
/* 051AA0 7F01CF70 9099FF9F */ lbu $t9, -0x61($a0)
|
||||
/* 051AA4 7F01CF74 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 051AA8 7F01CF78 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051AAC 7F01CF7C 03194021 */ addu $t0, $t8, $t9
|
||||
/* 051AB0 7F01CF80 25090002 */ addiu $t1, $t0, 2
|
||||
/* 051AB4 7F01CF84 00095083 */ sra $t2, $t1, 2
|
||||
/* 051AB8 7F01CF88 A0CA0000 */ sb $t2, ($a2)
|
||||
/* 051ABC 7F01CF8C 908BFFA1 */ lbu $t3, -0x5f($a0)
|
||||
/* 051AC0 7F01CF90 908C0000 */ lbu $t4, ($a0)
|
||||
/* 051AC4 7F01CF94 908E0001 */ lbu $t6, 1($a0)
|
||||
/* 051AC8 7F01CF98 9098FFA0 */ lbu $t8, -0x60($a0)
|
||||
/* 051ACC 7F01CF9C 016C6821 */ addu $t5, $t3, $t4
|
||||
/* 051AD0 7F01CFA0 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051AD4 7F01CFA4 01F8C821 */ addu $t9, $t7, $t8
|
||||
/* 051AD8 7F01CFA8 27280002 */ addiu $t0, $t9, 2
|
||||
/* 051ADC 7F01CFAC 00084883 */ sra $t1, $t0, 2
|
||||
/* 051AE0 7F01CFB0 A0C90001 */ sb $t1, 1($a2)
|
||||
/* 051AE4 7F01CFB4 908AFFA2 */ lbu $t2, -0x5e($a0)
|
||||
/* 051AE8 7F01CFB8 908B0001 */ lbu $t3, 1($a0)
|
||||
/* 051AEC 7F01CFBC 908D0002 */ lbu $t5, 2($a0)
|
||||
/* 051AF0 7F01CFC0 908FFFA1 */ lbu $t7, -0x5f($a0)
|
||||
/* 051AF4 7F01CFC4 014B6021 */ addu $t4, $t2, $t3
|
||||
/* 051AF8 7F01CFC8 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 051AFC 7F01CFCC 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051B00 7F01CFD0 27190002 */ addiu $t9, $t8, 2
|
||||
/* 051B04 7F01CFD4 00194083 */ sra $t0, $t9, 2
|
||||
/* 051B08 7F01CFD8 A0C80002 */ sb $t0, 2($a2)
|
||||
/* 051B0C 7F01CFDC 908A0002 */ lbu $t2, 2($a0)
|
||||
/* 051B10 7F01CFE0 9089FFA3 */ lbu $t1, -0x5d($a0)
|
||||
/* 051B14 7F01CFE4 908C0003 */ lbu $t4, 3($a0)
|
||||
/* 051B18 7F01CFE8 908EFFA2 */ lbu $t6, -0x5e($a0)
|
||||
/* 051B1C 7F01CFEC 012A5821 */ addu $t3, $t1, $t2
|
||||
/* 051B20 7F01CFF0 016C6821 */ addu $t5, $t3, $t4
|
||||
/* 051B24 7F01CFF4 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051B28 7F01CFF8 25F80002 */ addiu $t8, $t7, 2
|
||||
/* 051B2C 7F01CFFC 0018C883 */ sra $t9, $t8, 2
|
||||
/* 051B30 7F01D000 24A50004 */ addiu $a1, $a1, 4
|
||||
/* 051B34 7F01D004 A0D90003 */ sb $t9, 3($a2)
|
||||
/* 051B38 7F01D008 24C60004 */ addiu $a2, $a2, 4
|
||||
/* 051B3C 7F01D00C 14A7FFD5 */ bne $a1, $a3, .L7F01CF64
|
||||
/* 051B40 7F01D010 24840004 */ addiu $a0, $a0, 4
|
||||
/* 051B44 7F01D014 24420001 */ addiu $v0, $v0, 1
|
||||
/* 051B48 7F01D018 24C60002 */ addiu $a2, $a2, 2
|
||||
/* 051B4C 7F01D01C 1443FFBA */ bne $v0, $v1, .L7F01CF08
|
||||
/* 051B50 7F01D020 24840002 */ addiu $a0, $a0, 2
|
||||
.L7F01D024:
|
||||
/* 051B54 7F01D024 03E00008 */ jr $ra
|
||||
/* 051B58 7F01D028 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F01D02C(u8*, s32, u8*) {
|
||||
// Averages 4 pixel data, ending on "first" row.
|
||||
// Address 0x7F01D02C NTSC
|
||||
void sub_GAME_7F01D02C(u8 *arg0, s32 arg1, u8 *arg2)
|
||||
{
|
||||
s32 i;
|
||||
s32 j;
|
||||
|
||||
arg0 += 0x61;
|
||||
arg2 += 0x61;
|
||||
|
||||
for (i = 1; i < arg1 - 1; i++, arg2 += 2, arg0 += 2) {
|
||||
for (j = 1; j < 0x5f; j++, arg2++, arg0++) {
|
||||
*arg2 = (arg0[1] + arg0[0] + arg0[0x61] + arg0[0x60] + 2) >> 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F01D02C
|
||||
/* 051B5C 7F01D02C 24A3FFFF */ addiu $v1, $a1, -1
|
||||
/* 051B60 7F01D030 28610002 */ slti $at, $v1, 2
|
||||
/* 051B64 7F01D034 24840061 */ addiu $a0, $a0, 0x61
|
||||
/* 051B68 7F01D038 24C60061 */ addiu $a2, $a2, 0x61
|
||||
/* 051B6C 7F01D03C 14200049 */ bnez $at, .L7F01D164
|
||||
/* 051B70 7F01D040 24020001 */ li $v0, 1
|
||||
/* 051B74 7F01D044 2407005F */ li $a3, 95
|
||||
.L7F01D048:
|
||||
/* 051B78 7F01D048 908E0060 */ lbu $t6, 0x60($a0)
|
||||
/* 051B7C 7F01D04C 908F0001 */ lbu $t7, 1($a0)
|
||||
/* 051B80 7F01D050 90990000 */ lbu $t9, ($a0)
|
||||
/* 051B84 7F01D054 90890061 */ lbu $t1, 0x61($a0)
|
||||
/* 051B88 7F01D058 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051B8C 7F01D05C 03194021 */ addu $t0, $t8, $t9
|
||||
/* 051B90 7F01D060 01095021 */ addu $t2, $t0, $t1
|
||||
/* 051B94 7F01D064 254B0002 */ addiu $t3, $t2, 2
|
||||
/* 051B98 7F01D068 000B6083 */ sra $t4, $t3, 2
|
||||
/* 051B9C 7F01D06C A0CC0000 */ sb $t4, ($a2)
|
||||
/* 051BA0 7F01D070 908E0002 */ lbu $t6, 2($a0)
|
||||
/* 051BA4 7F01D074 908D0061 */ lbu $t5, 0x61($a0)
|
||||
/* 051BA8 7F01D078 90980001 */ lbu $t8, 1($a0)
|
||||
/* 051BAC 7F01D07C 90880062 */ lbu $t0, 0x62($a0)
|
||||
/* 051BB0 7F01D080 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051BB4 7F01D084 01F8C821 */ addu $t9, $t7, $t8
|
||||
/* 051BB8 7F01D088 03284821 */ addu $t1, $t9, $t0
|
||||
/* 051BBC 7F01D08C 252A0002 */ addiu $t2, $t1, 2
|
||||
/* 051BC0 7F01D090 000A5883 */ sra $t3, $t2, 2
|
||||
/* 051BC4 7F01D094 A0CB0001 */ sb $t3, 1($a2)
|
||||
/* 051BC8 7F01D098 24050003 */ li $a1, 3
|
||||
/* 051BCC 7F01D09C 24C60002 */ addiu $a2, $a2, 2
|
||||
/* 051BD0 7F01D0A0 24840002 */ addiu $a0, $a0, 2
|
||||
.L7F01D0A4:
|
||||
/* 051BD4 7F01D0A4 908C0060 */ lbu $t4, 0x60($a0)
|
||||
/* 051BD8 7F01D0A8 908D0001 */ lbu $t5, 1($a0)
|
||||
/* 051BDC 7F01D0AC 908F0000 */ lbu $t7, ($a0)
|
||||
/* 051BE0 7F01D0B0 90990061 */ lbu $t9, 0x61($a0)
|
||||
/* 051BE4 7F01D0B4 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 051BE8 7F01D0B8 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051BEC 7F01D0BC 03194021 */ addu $t0, $t8, $t9
|
||||
/* 051BF0 7F01D0C0 25090002 */ addiu $t1, $t0, 2
|
||||
/* 051BF4 7F01D0C4 00095083 */ sra $t2, $t1, 2
|
||||
/* 051BF8 7F01D0C8 A0CA0000 */ sb $t2, ($a2)
|
||||
/* 051BFC 7F01D0CC 908C0002 */ lbu $t4, 2($a0)
|
||||
/* 051C00 7F01D0D0 908B0061 */ lbu $t3, 0x61($a0)
|
||||
/* 051C04 7F01D0D4 908E0001 */ lbu $t6, 1($a0)
|
||||
/* 051C08 7F01D0D8 90980062 */ lbu $t8, 0x62($a0)
|
||||
/* 051C0C 7F01D0DC 016C6821 */ addu $t5, $t3, $t4
|
||||
/* 051C10 7F01D0E0 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051C14 7F01D0E4 01F8C821 */ addu $t9, $t7, $t8
|
||||
/* 051C18 7F01D0E8 27280002 */ addiu $t0, $t9, 2
|
||||
/* 051C1C 7F01D0EC 00084883 */ sra $t1, $t0, 2
|
||||
/* 051C20 7F01D0F0 A0C90001 */ sb $t1, 1($a2)
|
||||
/* 051C24 7F01D0F4 908B0003 */ lbu $t3, 3($a0)
|
||||
/* 051C28 7F01D0F8 908A0062 */ lbu $t2, 0x62($a0)
|
||||
/* 051C2C 7F01D0FC 908D0002 */ lbu $t5, 2($a0)
|
||||
/* 051C30 7F01D100 908F0063 */ lbu $t7, 0x63($a0)
|
||||
/* 051C34 7F01D104 014B6021 */ addu $t4, $t2, $t3
|
||||
/* 051C38 7F01D108 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 051C3C 7F01D10C 01CFC021 */ addu $t8, $t6, $t7
|
||||
/* 051C40 7F01D110 27190002 */ addiu $t9, $t8, 2
|
||||
/* 051C44 7F01D114 00194083 */ sra $t0, $t9, 2
|
||||
/* 051C48 7F01D118 A0C80002 */ sb $t0, 2($a2)
|
||||
/* 051C4C 7F01D11C 908A0004 */ lbu $t2, 4($a0)
|
||||
/* 051C50 7F01D120 90890063 */ lbu $t1, 0x63($a0)
|
||||
/* 051C54 7F01D124 908C0003 */ lbu $t4, 3($a0)
|
||||
/* 051C58 7F01D128 908E0064 */ lbu $t6, 0x64($a0)
|
||||
/* 051C5C 7F01D12C 012A5821 */ addu $t3, $t1, $t2
|
||||
/* 051C60 7F01D130 016C6821 */ addu $t5, $t3, $t4
|
||||
/* 051C64 7F01D134 01AE7821 */ addu $t7, $t5, $t6
|
||||
/* 051C68 7F01D138 25F80002 */ addiu $t8, $t7, 2
|
||||
/* 051C6C 7F01D13C 0018C883 */ sra $t9, $t8, 2
|
||||
/* 051C70 7F01D140 24A50004 */ addiu $a1, $a1, 4
|
||||
/* 051C74 7F01D144 A0D90003 */ sb $t9, 3($a2)
|
||||
/* 051C78 7F01D148 24C60004 */ addiu $a2, $a2, 4
|
||||
/* 051C7C 7F01D14C 14A7FFD5 */ bne $a1, $a3, .L7F01D0A4
|
||||
/* 051C80 7F01D150 24840004 */ addiu $a0, $a0, 4
|
||||
/* 051C84 7F01D154 24420001 */ addiu $v0, $v0, 1
|
||||
/* 051C88 7F01D158 24C60002 */ addiu $a2, $a2, 2
|
||||
/* 051C8C 7F01D15C 1443FFBA */ bne $v0, $v1, .L7F01D048
|
||||
/* 051C90 7F01D160 24840002 */ addiu $a0, $a0, 2
|
||||
.L7F01D164:
|
||||
/* 051C94 7F01D164 03E00008 */ jr $ra
|
||||
/* 051C98 7F01D168 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
// Address 0x7F01D16C NTSC
|
||||
void sub_GAME_7F01D16C(u8 *arg0, s32 arg1, s32 arg2, u8 *arg3)
|
||||
{
|
||||
s32 temp_lo;
|
||||
u32 temp_a0;
|
||||
u32 var_t2;
|
||||
u8 *var_t0;
|
||||
u8 *var_v1;
|
||||
u32 t1;
|
||||
|
||||
temp_lo = arg1 * arg2;
|
||||
var_v1 = arg0;
|
||||
var_t0 = arg3;
|
||||
t1 = arg0 + temp_lo;
|
||||
var_t2 = arg0 + arg1;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F01D16C(u8*, s32, s32, u8*) {
|
||||
do
|
||||
{
|
||||
temp_a0 = var_t2;
|
||||
|
||||
do
|
||||
{
|
||||
*var_t0 = *var_v1++;
|
||||
var_t2 += 1;
|
||||
var_t0 += arg2;
|
||||
|
||||
} while ((u32) var_v1 < temp_a0);
|
||||
|
||||
var_t0 = (var_t0 - (temp_lo)) + 1;
|
||||
|
||||
} while ((u32) var_v1 < (u32) t1);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F01D16C
|
||||
/* 051C9C 7F01D16C 00A60019 */ multu $a1, $a2
|
||||
/* 051CA0 7F01D170 00801825 */ move $v1, $a0
|
||||
/* 051CA4 7F01D174 00E04025 */ move $t0, $a3
|
||||
/* 051CA8 7F01D178 00855021 */ addu $t2, $a0, $a1
|
||||
/* 051CAC 7F01D17C 00001012 */ mflo $v0
|
||||
/* 051CB0 7F01D180 00824821 */ addu $t1, $a0, $v0
|
||||
/* 051CB4 7F01D184 00000000 */ nop
|
||||
.L7F01D188:
|
||||
/* 051CB8 7F01D188 01402025 */ move $a0, $t2
|
||||
.L7F01D18C:
|
||||
/* 051CBC 7F01D18C 906E0000 */ lbu $t6, ($v1)
|
||||
/* 051CC0 7F01D190 24630001 */ addiu $v1, $v1, 1
|
||||
/* 051CC4 7F01D194 0064082B */ sltu $at, $v1, $a0
|
||||
/* 051CC8 7F01D198 A10E0000 */ sb $t6, ($t0)
|
||||
/* 051CCC 7F01D19C 254A0001 */ addiu $t2, $t2, 1
|
||||
/* 051CD0 7F01D1A0 1420FFFA */ bnez $at, .L7F01D18C
|
||||
/* 051CD4 7F01D1A4 01064021 */ addu $t0, $t0, $a2
|
||||
/* 051CD8 7F01D1A8 01024023 */ subu $t0, $t0, $v0
|
||||
/* 051CDC 7F01D1AC 0069082B */ sltu $at, $v1, $t1
|
||||
/* 051CE0 7F01D1B0 1420FFF5 */ bnez $at, .L7F01D188
|
||||
/* 051CE4 7F01D1B4 25080001 */ addiu $t0, $t0, 1
|
||||
/* 051CE8 7F01D1B8 03E00008 */ jr $ra
|
||||
/* 051CEC 7F01D1BC 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F01D1C0(void) {
|
||||
// Unreferenced.
|
||||
// Address 0x7F01D1C0 NTSC.
|
||||
u8 *sub_GAME_7F01D1C0(u8 *arg0, s32 arg1, s32 arg2, u8 *arg3)
|
||||
{
|
||||
// mips2c output makes this look like `decrypt_bleeding_animation_data`, but without
|
||||
// u8 variables, and without arg4. But I can't get it to generate anything
|
||||
// close to matching.
|
||||
|
||||
// https://decomp.me/scratch/ptG72 0%
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
|
||||
@@ -3,7 +3,8 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
u8 *decrypt_bleeding_animation_data(u8*, s32, s32, u8*, s8*);
|
||||
u8 *decrypt_bleeding_animation_data(u8 *arg0, u8 arg1, u8 arg2, u8 *arg3, u8 *arg4);
|
||||
|
||||
void sub_GAME_7F01D16C(u8*, s32, s32, u8*);
|
||||
void sub_GAME_7F01D02C(u8*, s32, u8*);
|
||||
void sub_GAME_7F01CEEC(u8*, s32, u8*);
|
||||
|
||||
+82
-70
@@ -72,20 +72,20 @@ void bheadUpdateIdleRoll()
|
||||
{
|
||||
f32 mult = 1.0f / UINT_MAX;
|
||||
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt][0] = ((f32)randomGetNext() * mult - 0.5f) * 0.02f;
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt][2] = 1;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt][0] = ((f32)randomGetNext() * mult - 0.5f) * 0.02f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt][1] = 1;
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt].f[0] = ((f32)randomGetNext() * mult - 0.5f) * 0.02f;
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt].f[2] = 1;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt].f[0] = ((f32)randomGetNext() * mult - 0.5f) * 0.02f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt].f[1] = 1;
|
||||
|
||||
if (g_CurrentPlayer->standcnt)
|
||||
{
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt][1] = (f32)randomGetNext() * mult * 0.01f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt][2] = (f32)randomGetNext() * mult * -0.01f;
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt].f[1] = (f32)randomGetNext() * mult * 0.01f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt].f[2] = (f32)randomGetNext() * mult * -0.01f;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt][1] = (f32)randomGetNext() * mult * -0.01f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt][2] = (f32)randomGetNext() * mult * 0.01f;
|
||||
g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt].f[1] = (f32)randomGetNext() * mult * -0.01f;
|
||||
g_CurrentPlayer->standup[g_CurrentPlayer->standcnt].f[2] = (f32)randomGetNext() * mult * 0.01f;
|
||||
}
|
||||
|
||||
g_CurrentPlayer->standcnt = 1 - g_CurrentPlayer->standcnt;
|
||||
@@ -102,23 +102,23 @@ void bheadUpdatePos(coord3d *vel)
|
||||
|
||||
if (g_CurrentPlayer->resetheadpos)
|
||||
{
|
||||
g_CurrentPlayer->headpossum[0] = 0.0f;
|
||||
g_CurrentPlayer->headpossum[1] = (vel->f[1] / (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpossum[2] = 0.0f;
|
||||
g_CurrentPlayer->headpossum.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headpossum.f[1] = (vel->f[1] / (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpossum.f[2] = 0.0f;
|
||||
|
||||
g_CurrentPlayer->resetheadpos = FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < g_ClockTimer; i++)
|
||||
{
|
||||
g_CurrentPlayer->headpossum[0] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum[0]) + vel->f[0]);
|
||||
g_CurrentPlayer->headpossum[1] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum[1]) + vel->f[1]);
|
||||
g_CurrentPlayer->headpossum[2] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum[2]) + vel->f[2]);
|
||||
g_CurrentPlayer->headpossum.f[0] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum.f[0]) + vel->f[0]);
|
||||
g_CurrentPlayer->headpossum.f[1] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum.f[1]) + vel->f[1]);
|
||||
g_CurrentPlayer->headpossum.f[2] = ((CURRENTPLAYERUPDATEHEADPOS_SCALE * g_CurrentPlayer->headpossum.f[2]) + vel->f[2]);
|
||||
}
|
||||
|
||||
g_CurrentPlayer->headpos[0] = (g_CurrentPlayer->headpossum[0] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpos[1] = (g_CurrentPlayer->headpossum[1] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpos[2] = (g_CurrentPlayer->headpossum[2] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpos.f[0] = (g_CurrentPlayer->headpossum.f[0] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpos.f[1] = (g_CurrentPlayer->headpossum.f[1] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
g_CurrentPlayer->headpos.f[2] = (g_CurrentPlayer->headpossum.f[2] * (1.0f - CURRENTPLAYERUPDATEHEADPOS_SCALE));
|
||||
#undef CURRENTPLAYERUPDATEHEADPOS_SCALE
|
||||
}
|
||||
|
||||
@@ -128,32 +128,35 @@ void bheadUpdateRot(coord3d *lookvel, coord3d *upvel)
|
||||
|
||||
if (g_CurrentPlayer->resetheadrot)
|
||||
{
|
||||
g_CurrentPlayer->headlooksum[0] = lookvel->f[0] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlooksum[1] = lookvel->f[1] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlooksum[2] = lookvel->f[2] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headupsum[0] = upvel->f[0] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headupsum[1] = upvel->f[1] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headupsum[2] = upvel->f[2] / (1.0f - g_CurrentPlayer->headdamp);
|
||||
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);
|
||||
|
||||
g_CurrentPlayer->resetheadrot = FALSE;
|
||||
}
|
||||
|
||||
for (i = 0; i < g_ClockTimer; i++)
|
||||
{
|
||||
g_CurrentPlayer->headlooksum[0] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum[0] + lookvel->f[0];
|
||||
g_CurrentPlayer->headlooksum[1] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum[1] + lookvel->f[1];
|
||||
g_CurrentPlayer->headlooksum[2] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headlooksum[2] + lookvel->f[2];
|
||||
g_CurrentPlayer->headupsum[0] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum[0] + upvel->f[0];
|
||||
g_CurrentPlayer->headupsum[1] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum[1] + upvel->f[1];
|
||||
g_CurrentPlayer->headupsum[2] = g_CurrentPlayer->headdamp * g_CurrentPlayer->headupsum[2] + upvel->f[2];
|
||||
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];
|
||||
}
|
||||
|
||||
g_CurrentPlayer->headlook[0] = g_CurrentPlayer->headlooksum[0] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlook[1] = g_CurrentPlayer->headlooksum[1] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headlook[2] = g_CurrentPlayer->headlooksum[2] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headup[0] = g_CurrentPlayer->headupsum[0] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headup[1] = g_CurrentPlayer->headupsum[1] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
g_CurrentPlayer->headup[2] = g_CurrentPlayer->headupsum[2] * (1.0f - g_CurrentPlayer->headdamp);
|
||||
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);
|
||||
}
|
||||
|
||||
void bheadSetdamp(f32 headdamp)
|
||||
@@ -161,22 +164,25 @@ void bheadSetdamp(f32 headdamp)
|
||||
if (headdamp != g_CurrentPlayer->headdamp)
|
||||
{
|
||||
f32 divisor = 1.0f - headdamp;
|
||||
g_CurrentPlayer->headlooksum[0] = (g_CurrentPlayer->headlooksum[0] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headlooksum[1] = (g_CurrentPlayer->headlooksum[1] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headlooksum[2] = (g_CurrentPlayer->headlooksum[2] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headupsum[0] = (g_CurrentPlayer->headupsum[0] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headupsum[1] = (g_CurrentPlayer->headupsum[1] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headupsum[2] = (g_CurrentPlayer->headupsum[2] * (1.0f - g_CurrentPlayer->headdamp)) / divisor;
|
||||
g_CurrentPlayer->headdamp = 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;
|
||||
}
|
||||
}
|
||||
|
||||
void bheadUpdate(f32 arg0, f32 arg1)
|
||||
void bheadUpdate(f32 percent_speed, f32 speedsideways)
|
||||
{
|
||||
coord3d headpos;
|
||||
coord3d lookvel;
|
||||
coord3d upvel;
|
||||
f32 spC0;
|
||||
f32 abs_anim_speed;
|
||||
struct unk_joint_list sp80;
|
||||
Mtxf sp40;
|
||||
coord3d sp34;
|
||||
@@ -186,17 +192,17 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
lookvel = D_80036B0C;
|
||||
upvel = D_80036B18;
|
||||
|
||||
spC0 = modelGetAbsAnimSpeed(&g_CurrentPlayer->model);
|
||||
abs_anim_speed = modelGetAbsAnimSpeed(&g_CurrentPlayer->model);
|
||||
|
||||
if (g_CurrentPlayer->headanim == 0)
|
||||
{
|
||||
if (spC0 > 0.7f)
|
||||
if (abs_anim_speed > 0.7f)
|
||||
{
|
||||
g_CurrentPlayer->headamplitude = 1.0f;
|
||||
}
|
||||
else if (spC0 > 0.1f)
|
||||
else if (abs_anim_speed > 0.1f)
|
||||
{
|
||||
g_CurrentPlayer->headamplitude = (((spC0 - 0.1f) * 0.6f) / 0.59999996f) + 0.4f;
|
||||
g_CurrentPlayer->headamplitude = (((abs_anim_speed - 0.1f) * 0.6f) / 0.59999996f) + 0.4f;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -217,16 +223,15 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
}
|
||||
|
||||
sp80 = D_80036B24;
|
||||
|
||||
sp34 = D_80036B64;
|
||||
|
||||
sp30 = sub_GAME_7F0701E0();
|
||||
sp30 = modelIsAnimMergingEnabled();
|
||||
|
||||
g_CurrentPlayer->resetheadtick = 0;
|
||||
|
||||
sub_GAME_7F0701D4(0);
|
||||
sub_GAME_7F070AEC(&g_CurrentPlayer->model, g_ClockTimer, 1);
|
||||
sub_GAME_7F0701D4((s32) sp30);
|
||||
modelSetAnimMergingEnabled(0);
|
||||
modelTickAnimQuarterSpeed(&g_CurrentPlayer->model, g_ClockTimer, 1);
|
||||
modelSetAnimMergingEnabled((s32) sp30);
|
||||
|
||||
subcalcpos(&g_CurrentPlayer->model);
|
||||
matrix_4x4_set_identity(&sp40);
|
||||
@@ -236,9 +241,9 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
|
||||
subcalcmatrices(&sp80, &g_CurrentPlayer->model);
|
||||
|
||||
g_CurrentPlayer->headbodyoffset[0] = g_CurrentPlayer->standbodyoffset.x;
|
||||
g_CurrentPlayer->headbodyoffset[1] = g_CurrentPlayer->standbodyoffset.y;
|
||||
g_CurrentPlayer->headbodyoffset[2] = g_CurrentPlayer->standbodyoffset.z;
|
||||
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);
|
||||
|
||||
@@ -247,10 +252,10 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
|
||||
setsuboffset(&g_CurrentPlayer->model, (coord3d *) &sp34);
|
||||
|
||||
if (spC0 > 0.0f)
|
||||
if (abs_anim_speed > 0.0f)
|
||||
{
|
||||
g_CurrentPlayer->bondheadmatrices[0].m[3][0] += arg1;
|
||||
g_CurrentPlayer->bondheadmatrices[0].m[3][2] *= arg0;
|
||||
g_CurrentPlayer->bondheadmatrices[0].m[3][0] += speedsideways;
|
||||
g_CurrentPlayer->bondheadmatrices[0].m[3][2] *= percent_speed;
|
||||
|
||||
if (g_ClockTimer > 0)
|
||||
{
|
||||
@@ -258,9 +263,9 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
g_CurrentPlayer->bondheadmatrices[0].m[3][2] /= g_GlobalTimerDelta;
|
||||
}
|
||||
|
||||
headpos.f[0] = g_CurrentPlayer->bondheadmatrices[0].m[3][0] * g_CurrentPlayer->headamplitude;
|
||||
headpos.f[0] = g_CurrentPlayer->bondheadmatrices[0].m[3][0] * g_CurrentPlayer->headamplitude;
|
||||
headpos.f[1] = ((g_CurrentPlayer->bondheadmatrices[0].m[3][1] - g_CurrentPlayer->standheight) * g_CurrentPlayer->headamplitude) + g_CurrentPlayer->standheight;
|
||||
headpos.f[2] = g_CurrentPlayer->bondheadmatrices[0].m[3][2] * g_CurrentPlayer->headamplitude;
|
||||
headpos.f[2] = g_CurrentPlayer->bondheadmatrices[0].m[3][2] * g_CurrentPlayer->headamplitude;
|
||||
|
||||
if (g_CurrentPlayer->headanim >= 0)
|
||||
{
|
||||
@@ -275,7 +280,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
g_CurrentPlayer->headwalkingtime60 += g_ClockTimer;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
if (g_CurrentPlayer->headwalkingtime60 >= 0x33)
|
||||
if (g_CurrentPlayer->headwalkingtime60 > TICKS_PER_SECOND)
|
||||
{
|
||||
bheadSetdamp(0.916599988937f);
|
||||
}
|
||||
@@ -284,7 +289,7 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
bheadSetdamp(0.987999975681f);
|
||||
}
|
||||
#else
|
||||
if (g_CurrentPlayer->headwalkingtime60 >= 0x3D)
|
||||
if (g_CurrentPlayer->headwalkingtime60 > TICKS_PER_SECOND)
|
||||
{
|
||||
bheadSetdamp(0.93f);
|
||||
}
|
||||
@@ -309,9 +314,9 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
}
|
||||
else
|
||||
{
|
||||
g_CurrentPlayer->headbodyoffset[0] = g_CurrentPlayer->standbodyoffset.x;
|
||||
g_CurrentPlayer->headbodyoffset[1] = g_CurrentPlayer->standbodyoffset.y;
|
||||
g_CurrentPlayer->headbodyoffset[2] = g_CurrentPlayer->standbodyoffset.z;
|
||||
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;
|
||||
|
||||
headpos.f[0] = 0.0f;
|
||||
headpos.f[1] = g_CurrentPlayer->standheight;
|
||||
@@ -331,18 +336,22 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
g_CurrentPlayer->standfrac -= 1.0f;
|
||||
}
|
||||
|
||||
// result = x vector plus ((y - x vector) * scaler)
|
||||
// lookvel = ...
|
||||
sub_GAME_7F05AE00(
|
||||
&g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt][0],
|
||||
&g_CurrentPlayer->standlook[1 - g_CurrentPlayer->standcnt][0],
|
||||
&g_CurrentPlayer->standlook[g_CurrentPlayer->standcnt].f[0],
|
||||
&g_CurrentPlayer->standlook[1 - g_CurrentPlayer->standcnt].f[0],
|
||||
g_CurrentPlayer->standfrac,
|
||||
&lookvel);
|
||||
|
||||
lookvel.f[0] *= (1.0f + (5.0f * bondviewGetBondBreathing()));
|
||||
lookvel.f[1] *= (1.0f + (5.0f * bondviewGetBondBreathing()));
|
||||
|
||||
// result = x vector plus ((y - x vector) * scaler)
|
||||
// upvel = ...
|
||||
sub_GAME_7F05AE00(
|
||||
&g_CurrentPlayer->standup[g_CurrentPlayer->standcnt][0],
|
||||
&g_CurrentPlayer->standup[1 - g_CurrentPlayer->standcnt][0],
|
||||
&g_CurrentPlayer->standup[g_CurrentPlayer->standcnt].f[0],
|
||||
&g_CurrentPlayer->standup[1 - g_CurrentPlayer->standcnt].f[0],
|
||||
g_CurrentPlayer->standfrac,
|
||||
&upvel);
|
||||
|
||||
@@ -357,6 +366,8 @@ void bheadUpdate(f32 arg0, f32 arg1)
|
||||
|
||||
|
||||
/**
|
||||
* Adjust Bond model based on speed (speedforwards).
|
||||
* Toggle the currently selected headanim index.
|
||||
* Address 0x7F08E8BC.
|
||||
*/
|
||||
void bheadAdjustAnimation(f32 speed)
|
||||
@@ -435,6 +446,7 @@ void bheadSetSpeed(f32 speed)
|
||||
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);
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ s32 waypointFindRoute(waypoint *, waypoint *, waypoint ** arr, s32 arr_len);
|
||||
waypoint * sub_GAME_7F08FB90(waypoint *, waypoint *);
|
||||
void bheadFlipAnimation();
|
||||
void bheadUpdateIdleRoll();
|
||||
void bheadUpdate(f32 arg0, f32 arg1);
|
||||
void bheadUpdate(f32 percent_speed, f32 speedsideways);
|
||||
void bheadAdjustAnimation(f32 arg0);
|
||||
void bheadStartDeathAnimation(struct ModelAnimation *arg0, s32 arg1, f32 arg2, f32 arg3);
|
||||
void bheadSetSpeed(f32 arg0);
|
||||
|
||||
+11
-11
@@ -274,7 +274,7 @@ int bondinvItemAvailableForHand(ITEM_IDS right, ITEM_IDS left)
|
||||
right < ITEM_BOMBCASE &&
|
||||
right == left &&
|
||||
getPlayerCount() == 1 &&
|
||||
bondwalkItemCheckBitflags(right, 0x100000))
|
||||
bondwalkItemCheckBitflags(right, WEAPONSTATBITFLAG_CAN_DUAL_WIELD))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
@@ -289,7 +289,7 @@ int bondinvItemAvailableForHand(ITEM_IDS right, ITEM_IDS left)
|
||||
right < ITEM_BOMBCASE &&
|
||||
right == left &&
|
||||
getPlayerCount() == 1 &&
|
||||
bondwalkItemCheckBitflags(right, 0x100000) &&
|
||||
bondwalkItemCheckBitflags(right, WEAPONSTATBITFLAG_CAN_DUAL_WIELD) &&
|
||||
(j_text_trigger == FALSE || (right != ITEM_KNIFE)))
|
||||
{
|
||||
return TRUE;
|
||||
@@ -561,7 +561,7 @@ void bondinvCycleForward(s32 *nextright, s32 *nextleft, s32 requireammo)
|
||||
{
|
||||
s32 candidate = *nextright;
|
||||
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(*nextright, 0x100000) && (*nextleft < *nextright) && (requireammo == FALSE || bondwalkItemHasAmmo(*nextright)) && (weapon1 != *nextright || *nextright < weapon2)
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(*nextright, WEAPONSTATBITFLAG_CAN_DUAL_WIELD) && (*nextleft < *nextright) && (requireammo == FALSE || bondwalkItemHasAmmo(*nextright)) && (weapon1 != *nextright || *nextright < weapon2)
|
||||
#ifdef BUGFIX_R1
|
||||
&& (!j_text_trigger || *nextright != ITEM_KNIFE)
|
||||
#endif
|
||||
@@ -671,7 +671,7 @@ void bondinvCycleBackward(s32 *nextright, s32 *nextleft, s32 requireammo)
|
||||
{
|
||||
if (candidate == weapon1)
|
||||
{
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(candidate, 0x100000) && (requireammo == FALSE || bondwalkItemHasAmmo(candidate)) && (candidate != *nextright || candidate < *nextleft) && (weapon2 < candidate)
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(candidate, WEAPONSTATBITFLAG_CAN_DUAL_WIELD) && (requireammo == FALSE || bondwalkItemHasAmmo(candidate)) && (candidate != *nextright || candidate < *nextleft) && (weapon2 < candidate)
|
||||
#ifdef BUGFIX_R1
|
||||
&& (!j_text_trigger || candidate != ITEM_KNIFE)
|
||||
#endif
|
||||
@@ -690,7 +690,7 @@ void bondinvCycleBackward(s32 *nextright, s32 *nextleft, s32 requireammo)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(candidate, 0x100000) && (candidate != *nextright || candidate < *nextleft))
|
||||
if (getPlayerCount() == 1 && bondwalkItemCheckBitflags(candidate, WEAPONSTATBITFLAG_CAN_DUAL_WIELD) && (candidate != *nextright || candidate < *nextleft))
|
||||
{
|
||||
weapon1 = candidate;
|
||||
weapon2 = candidate;
|
||||
@@ -1389,9 +1389,9 @@ u8 *bondinvGetActivatedTextObject(ObjectRecord *obj)
|
||||
{
|
||||
textoverride *override = bondinvGetTextbyObj(obj);
|
||||
|
||||
if (override && override->unk8)
|
||||
if (override && override->pickuptext)
|
||||
{
|
||||
return langGet(override->unk8);
|
||||
return langGet(override->pickuptext);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -1401,9 +1401,9 @@ u8 *bondinvGetActivatedTextWeapon(ITEM_IDS weaponnum)
|
||||
{
|
||||
textoverride *override = bondinvGetTextbyWeaponID(weaponnum);
|
||||
|
||||
if (override && override->unk8)
|
||||
if (override && override->pickuptext)
|
||||
{
|
||||
return langGet(override->unk8);
|
||||
return langGet(override->pickuptext);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@@ -1415,7 +1415,7 @@ void bondinvIncrementHeldTime(s32 weapon1, s32 weapon2)
|
||||
s32 leastusedindex;
|
||||
s32 i;
|
||||
|
||||
if (!bondwalkItemCheckBitflags(weapon1, 0x20000))
|
||||
if (!bondwalkItemCheckBitflags(weapon1, WEAPONSTATBITFLAG_USE_HOLD_TIME))
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1423,7 +1423,7 @@ void bondinvIncrementHeldTime(s32 weapon1, s32 weapon2)
|
||||
leastusedtime = 0x7fffffff;
|
||||
leastusedindex = 0;
|
||||
|
||||
if (!bondwalkItemCheckBitflags(weapon2, 0x20000))
|
||||
if (!bondwalkItemCheckBitflags(weapon2, WEAPONSTATBITFLAG_USE_HOLD_TIME))
|
||||
{
|
||||
weapon2 = ITEM_UNARMED;
|
||||
}
|
||||
|
||||
+4567
-26864
File diff suppressed because it is too large
Load Diff
+155
-108
@@ -43,9 +43,15 @@ struct collision434 {
|
||||
coord3d collision_position;
|
||||
|
||||
/**
|
||||
* This affects Bond's movement, but not the viewport.
|
||||
* This does not affect boost direction.
|
||||
*
|
||||
* f[0]: forward component (sin theta) in radians
|
||||
* f[1]: zero
|
||||
* f[2]: sideways component (cos theta) in radians.
|
||||
* Offset 0x10.
|
||||
*/
|
||||
struct coord3d field_10;
|
||||
struct coord3d theta_transform;
|
||||
|
||||
/**
|
||||
* Some kind of alternative to pos3 (in player struct).
|
||||
@@ -167,7 +173,7 @@ struct hand
|
||||
f32 field_A38;
|
||||
f32 field_A3C;
|
||||
f32 field_A40;
|
||||
s32 field_A44;
|
||||
ALSoundState * audioHandle;
|
||||
s32 field_A48;
|
||||
s32 field_A4C;
|
||||
s32 field_A50;
|
||||
@@ -176,8 +182,8 @@ struct hand
|
||||
f32 field_A84;
|
||||
f32 field_A88;
|
||||
s32 field_A8C;
|
||||
ObjectRecord* field_A90;
|
||||
s32 field_A94;
|
||||
ObjectRecord* rocket;
|
||||
s32 firedrocket;
|
||||
s32 field_A98;
|
||||
s32 field_A9C;
|
||||
s32 field_AA0;
|
||||
@@ -256,7 +262,7 @@ struct hand
|
||||
s32 field_BFC;
|
||||
s32 field_C00;
|
||||
s32 field_C04;
|
||||
s32 field_C08;
|
||||
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;
|
||||
};
|
||||
|
||||
@@ -284,7 +290,7 @@ typedef struct textoverride {
|
||||
/*0x10*/ u32 unk5;
|
||||
/*0x14*/ u32 unk6;
|
||||
/*0x18*/ u32 unk7;
|
||||
/*0x1c*/ u32 unk8;
|
||||
/*0x1c*/ u32 pickuptext;
|
||||
/*0x20*/ struct textoverride *next;
|
||||
/*0x24*/ struct ObjectRecord *obj;
|
||||
} textoverride;
|
||||
@@ -398,9 +404,12 @@ 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 field_90;
|
||||
/* 0x0090 */ f32 vertical_bounce_adjust;
|
||||
/* 0x0094 */ s32 field_94;
|
||||
/* 0x0098 */ f32 field_98;
|
||||
|
||||
@@ -438,11 +447,29 @@ struct player
|
||||
/* 0x00f0 */ f32 apparentarmour;
|
||||
|
||||
#if defined(VERSION_JP) || defined (VERSION_EU)
|
||||
/* 0x00f4 */ f32 damageshowtime;
|
||||
/* 0x00f8 */ f32 healthshowtime;
|
||||
|
||||
/*
|
||||
* When a non-negative integer:
|
||||
* - hide ammo and aim sight
|
||||
* - hide any active speech text
|
||||
* - disable shoot and B press interact
|
||||
* Otherwise,
|
||||
* - undo the above.
|
||||
* 0x00f4
|
||||
**/
|
||||
f32 damageshowtime;
|
||||
|
||||
/**
|
||||
* When a non-negative integer:
|
||||
* - Show health and body armor overlay if Bond isn't dead.
|
||||
* Otherwise,
|
||||
* - undo the above.
|
||||
* 0x00f8
|
||||
**/
|
||||
f32 healthshowtime;
|
||||
#else
|
||||
/* 0x00f4 */ s32 damageshowtime;
|
||||
/* 0x00f8 */ s32 healthshowtime;
|
||||
/* See comments above. 0x00f4 */ s32 damageshowtime;
|
||||
/* See comments above. 0x00f8 */ s32 healthshowtime;
|
||||
#endif
|
||||
|
||||
|
||||
@@ -466,21 +493,53 @@ struct player
|
||||
/* 0x0124 */ s32 insightaimmode;
|
||||
/* 0x0128 */ s32 autoyaimenabled;
|
||||
/* 0x012c */ f32 autoaimy;
|
||||
/* 0x0130 */ s32 autoyaimtime;
|
||||
/* 0x0130 */ struct PropRecord *autoaim_target_y;
|
||||
/* 0x0134 */ s32 autoyaimtime60;
|
||||
/* 0x0138 */ s32 autoxaimenabled;
|
||||
/* 0x013c */ f32 autoaimx;
|
||||
/* 0x0140 */ s32 autoxaimtime;
|
||||
/* 0x0140 */ struct PropRecord *autoaim_target_x;
|
||||
/* 0x0144 */ s32 autoxaimtime60;
|
||||
/* 0x0148 */ f32 vv_theta;
|
||||
/* 0x014c */ f32 speedtheta;
|
||||
/* 0x0150 */ f32 vv_costheta;
|
||||
/* 0x0154 */ f32 vv_sintheta;
|
||||
/* 0x0158 */ f32 vv_verta;
|
||||
/* 0x015c */ f32 vv_verta360;
|
||||
|
||||
/**
|
||||
* 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
|
||||
**/
|
||||
f32 vv_verta360;
|
||||
|
||||
/* 0x0160 */ f32 speedverta;
|
||||
/* 0x0164 */ f32 vv_cosverta;
|
||||
/* 0x0168 */ f32 vv_sinverta;
|
||||
|
||||
/**
|
||||
* Computed value from vv_verta360, but otherwise unused?
|
||||
* 0x0164
|
||||
**/
|
||||
f32 vv_cosverta;
|
||||
|
||||
/**
|
||||
* Computed value from vv_verta360, but otherwise unused?
|
||||
* 0x0168
|
||||
**/
|
||||
f32 vv_sinverta;
|
||||
|
||||
/* 0x016c */ f32 speedsideways;
|
||||
/* 0x0170 */ f32 speedstrafe;
|
||||
/* 0x0174 */ f32 speedforwards;
|
||||
@@ -689,7 +748,7 @@ struct player
|
||||
* Address 0x800C6B17
|
||||
*/
|
||||
u16 buttons_pressed;
|
||||
s16 field_3B6;
|
||||
u16 prev_buttons_pressed;
|
||||
|
||||
struct coord3d field_3B8;
|
||||
|
||||
@@ -754,18 +813,18 @@ struct player
|
||||
s32 headwalkingtime60; //0x4f0
|
||||
f32 headamplitude; //0x4f4
|
||||
f32 sideamplitude; //0x4f8
|
||||
vec3 headpos;
|
||||
vec3 headlook;
|
||||
struct coord3d headpos;
|
||||
struct coord3d headlook;
|
||||
|
||||
vec3 headup;
|
||||
vec3 headpossum;
|
||||
struct coord3d headup;
|
||||
struct coord3d headpossum;
|
||||
|
||||
// headlooksum[2] has NTSC->PAL conversion rate (5/6)
|
||||
vec3 headlooksum;
|
||||
struct coord3d headlooksum;
|
||||
|
||||
// headupsum[1] has NTSC->PAL conversion rate (5/6)
|
||||
vec3 headupsum;
|
||||
vec3 headbodyoffset; //0x544
|
||||
struct coord3d headupsum;
|
||||
struct coord3d headbodyoffset; //0x544
|
||||
f32 standheight; // old name stationary_ground_offset
|
||||
|
||||
// f32[4] ?? or 2 x f32[2] ??
|
||||
@@ -773,10 +832,10 @@ struct player
|
||||
f32 standfrac; //0x560
|
||||
|
||||
// offset 0x564
|
||||
vec3 standlook[2];
|
||||
struct coord3d standlook[2];
|
||||
|
||||
// offset 0x57C
|
||||
vec3 standup[2];
|
||||
struct coord3d standup[2];
|
||||
|
||||
// offset 0x594
|
||||
s32 standcnt;
|
||||
@@ -890,7 +949,7 @@ struct player
|
||||
|
||||
s32 hand_invisible[2]; /* 0x7f8*/
|
||||
ITEM_IDS hand_item[2]; /* 0x800 */
|
||||
u8 *ptr_hand_weapon_buffer[2]; /* 0x808 */
|
||||
ModelFileHeader *ptr_hand_weapon_buffer[2]; /* 0x808 */
|
||||
|
||||
/**
|
||||
* Offset 0x810.
|
||||
@@ -919,12 +978,11 @@ struct player
|
||||
|
||||
s32 z_trigger_timer;
|
||||
s32 field_FD8;
|
||||
u8 field_FDC;
|
||||
u8 field_FDD;
|
||||
u8 field_FDE;
|
||||
u8 field_FDF;
|
||||
struct rgba_u8 tileColor;
|
||||
s32 resetshadecol;
|
||||
s32 field_FE4;
|
||||
|
||||
// unused. Name comes from XBLA debug.
|
||||
s32 aimtype;
|
||||
|
||||
/**
|
||||
* Crosshair or bullet angle related.
|
||||
@@ -942,7 +1000,7 @@ struct player
|
||||
Mtxf field_101C;
|
||||
s32 last_z_trigger_timer;
|
||||
s32 copiedgoldeneye;
|
||||
s32 ammodispflags;
|
||||
s32 gunammooff;
|
||||
s32 field_1068;
|
||||
f32 gunsync;
|
||||
f32 syncchange;
|
||||
@@ -1088,8 +1146,8 @@ struct player
|
||||
gunheld gunheldarr[10];
|
||||
s32 magnetattracttime;
|
||||
f32 swaytarget;
|
||||
f32 field_1278;
|
||||
f32 field_127C;
|
||||
f32 swayoffset0;
|
||||
f32 swayoffset2;
|
||||
f32 field_1280;
|
||||
s32 players_cur_animation;
|
||||
f32 field_1288;
|
||||
@@ -2509,7 +2567,7 @@ struct player
|
||||
s32 field_29B4;
|
||||
|
||||
// Alt field_29C0 ?? Used in EU.
|
||||
s32 field_29B8;
|
||||
s32 healthDamageType;
|
||||
|
||||
/**
|
||||
* Related to player perspective.
|
||||
@@ -2596,42 +2654,42 @@ struct struct_4 {
|
||||
};
|
||||
|
||||
#ifdef BUGFIX_R0
|
||||
typedef struct bondstruct_unk_80036634
|
||||
typedef struct DamageType
|
||||
{
|
||||
u32 field_0x0;
|
||||
u32 field_0x4;
|
||||
s32 field_0x8;
|
||||
f32 field_0xC;
|
||||
u32 field_0x10;
|
||||
u32 field_0x14;
|
||||
s32 field_0x18;
|
||||
f32 field_0x1c;
|
||||
u32 field_0x20;
|
||||
u32 field_0x24;
|
||||
u32 field_0x28;
|
||||
} bondstruct_unk_80036634;
|
||||
s32 flashStartFrame;
|
||||
u32 flashFullFrame;
|
||||
s32 flashEndFrame;
|
||||
f32 maxAlpha;
|
||||
u32 red;
|
||||
u32 green;
|
||||
u32 blue;
|
||||
} DamageType;
|
||||
#else
|
||||
typedef struct bondstruct_unk_80036634
|
||||
typedef struct DamageType
|
||||
{
|
||||
f32 field_0x0;
|
||||
f32 field_0x4;
|
||||
f32 field_0x8;
|
||||
f32 field_0xC;
|
||||
f32 field_0x10;
|
||||
f32 field_0x14;
|
||||
f32 field_0x18;
|
||||
f32 field_0x1c;
|
||||
u32 field_0x20;
|
||||
u32 field_0x24;
|
||||
u32 field_0x28;
|
||||
} bondstruct_unk_80036634;
|
||||
f32 flashStartFrame;
|
||||
f32 flashFullFrame;
|
||||
f32 flashEndFrame;
|
||||
f32 maxAlpha;
|
||||
u32 red;
|
||||
u32 green;
|
||||
u32 blue;
|
||||
} DamageType;
|
||||
#endif
|
||||
|
||||
typedef struct bondstruct_unk_80036794 { // time related idk
|
||||
s32 unk0;
|
||||
s32 unk4;
|
||||
s32 unk8;
|
||||
} bondstruct_unk_80036794;
|
||||
typedef struct HealthDamageType { // time related idk
|
||||
s32 updateStartFrame;
|
||||
s32 updateEndFrame;
|
||||
s32 otherEndFrame;
|
||||
} HealthDamageType;
|
||||
|
||||
typedef struct bondstruct_unk_80035904 {
|
||||
u32 unk00;
|
||||
@@ -2641,6 +2699,12 @@ typedef struct bondstruct_unk_80035904 {
|
||||
f32 unk20;
|
||||
} bondstruct_unk_80035904;
|
||||
|
||||
// placeholder while matching
|
||||
struct move_bond_temp_struct {
|
||||
s32 unk00;
|
||||
s32 unk04;
|
||||
};
|
||||
|
||||
//D:80036424
|
||||
extern s32 g_bondviewForceDisarm;
|
||||
//D:80036428
|
||||
@@ -2658,23 +2722,23 @@ extern s32 D_8003643C;
|
||||
//D:80036440
|
||||
extern CreditsEntry *D_80036440;
|
||||
//D:80036444
|
||||
extern s32 D_80036444;
|
||||
extern s32 g_SurroundBondWithExplosionsFlag;
|
||||
//D:80036448
|
||||
extern s32 in_tank_flag;
|
||||
//D:8003644C
|
||||
extern struct PropRecord *D_8003644C;
|
||||
extern struct PropRecord *g_WorldTankProp;
|
||||
|
||||
//D:80036450
|
||||
extern struct PropRecord *ptr_playerstank;
|
||||
extern struct PropRecord *g_PlayerTankProp;
|
||||
|
||||
/**
|
||||
* Related to ptr_playerstank.
|
||||
* Related to g_PlayerTankProp.
|
||||
* Address 0x80036454.
|
||||
*/
|
||||
extern f32 g_PlayerTankYOffset;
|
||||
|
||||
//D:80036458
|
||||
extern ALSoundState * SFX_80036458[2];
|
||||
extern ALSoundState * g_TankSfxState[2];
|
||||
|
||||
//D:80036460
|
||||
extern f32 g_TankTurnSpeed;
|
||||
@@ -2699,13 +2763,13 @@ extern f32 g_TankTurretAngle;
|
||||
//D:80036488
|
||||
extern f32 g_TankTurretTurn;
|
||||
//D:8003648C
|
||||
extern s32 D_8003648C;
|
||||
extern s32 g_ExplodeTankOnDeathFlag;
|
||||
//D:80036490
|
||||
extern s32 D_80036490;
|
||||
extern s32 g_TankDamagePenaltyTicks;
|
||||
//D:80036494
|
||||
extern s32 g_CameraMode;
|
||||
extern enum CAMERAMODE g_CameraMode;
|
||||
//D:80036498
|
||||
extern s32 enable_move_after_cinema;
|
||||
extern enum CAMERAMODE g_CameraAfterCinema;
|
||||
//D:8003649C
|
||||
extern s32 D_8003649C;
|
||||
//D:800364A0
|
||||
@@ -2742,7 +2806,7 @@ extern s32 g_bondviewBondDeathAnimations[];
|
||||
//D:8003650C
|
||||
extern s32 g_bondviewBondDeathAnimationsCount;
|
||||
//D:80036510
|
||||
extern s32 D_80036510;
|
||||
extern enum CAMERAMODE D_80036510;
|
||||
//D:80036514
|
||||
extern s32 g_IntroAnimationIndex;
|
||||
/*
|
||||
@@ -2778,7 +2842,7 @@ D:80036624 .word 0xFFFFFF00, 0xFFFFFF00, 0x4FFFFFF
|
||||
//D:80036630
|
||||
extern u32 D_80036630;
|
||||
//D:80036634
|
||||
extern bondstruct_unk_80036634 D_80036634[];
|
||||
extern struct DamageType g_DamageTypes[];
|
||||
/*
|
||||
D:80036638 .byte 0
|
||||
D:80036639 .byte 0, 0, 0xA
|
||||
@@ -2820,7 +2884,7 @@ D:8003676C .byte 0
|
||||
D:8003676D .byte 0, 0, 0xA
|
||||
D:80036770 .word 0x1E, 0x3F19999A, 0
|
||||
D:8003677C .word 5, 0xF, 0x3ECCCCCD, 0xFF, 0xFF, 0xFF
|
||||
D:80036794 D_80036794:.word 0
|
||||
D:80036794 g_HealthDamageTypes:.word 0
|
||||
D:80036798 .byte 0
|
||||
D:80036799 .byte 0, 0, 0x28
|
||||
D:8003679C .word 0x64, 0
|
||||
@@ -2845,30 +2909,11 @@ D:800367ED .byte 0, 0, 0x14
|
||||
D:800367F0 .word 0x32
|
||||
*/
|
||||
|
||||
//D:80036800
|
||||
extern s32 D_80036800;
|
||||
//D:80036804
|
||||
extern s32 D_80036804;
|
||||
//D:80036808
|
||||
extern s32 D_80036808;
|
||||
//D:8003680C
|
||||
extern s32 D_8003680C;
|
||||
//D:80036810
|
||||
extern s32 D_80036810;
|
||||
//D:80036814
|
||||
extern s32 D_80036814;
|
||||
//D:80036818
|
||||
extern s32 D_80036818;
|
||||
//D:8003681C
|
||||
extern s32 D_8003681C;
|
||||
//D:80036820
|
||||
extern s32 D_80036820;
|
||||
//D:80036824
|
||||
extern s32 D_80036824;
|
||||
//D:80036828
|
||||
extern s32 D_80036828;
|
||||
//D:8003682C
|
||||
extern s32 D_8003682C;
|
||||
extern struct coord3d g_DefaultFrozenPlayerPos;
|
||||
extern struct coord3d g_DefaultFrozenPlayerPos2;
|
||||
extern struct coord3d g_DefaultFrozenPlayerOffset;
|
||||
extern struct coord3d g_DefaultFrozenMoveOffset;
|
||||
|
||||
//D:80036830
|
||||
extern s32 D_80036830;
|
||||
//D:80036834
|
||||
@@ -2906,7 +2951,7 @@ extern s32 upper_text_buffer_index;
|
||||
extern s32 display_upper_text_window;
|
||||
//D:800368B0
|
||||
extern s32 upper_text_window_timer;
|
||||
extern s32 D_800368B4;
|
||||
extern s32 g_UpperTextDisplayFlag;
|
||||
/*
|
||||
D:800368D8 firing_animation_groups:firing_anim_struct <pistol_firing_animation_group1, 0, 0.1, 79.0, 87.0>
|
||||
D:800368D8 # DATA XREF: sub_CODE_7F08B0F0+720o
|
||||
@@ -2944,7 +2989,7 @@ extern f32 D_80036AC0;
|
||||
extern f32 D_80036AC4;
|
||||
|
||||
extern s32 startpadcount;
|
||||
extern vec3d flt_CODE_bss_80079990;
|
||||
extern vec3d g_ForceBondMoveOffset;
|
||||
extern s32 mission_timer;
|
||||
|
||||
#if defined(VERSION_JP) || defined(VERSION_EU)
|
||||
@@ -3006,6 +3051,7 @@ void jp_hudmsgBottomShow(char *string);
|
||||
// VERSION_US
|
||||
#define HUDMESSAGEBOTTOM hudmsgBottomShow
|
||||
void hudmsgBottomShow(char *string);
|
||||
void setFontTables(s32 arg0, s32 arg1);
|
||||
#endif
|
||||
|
||||
Gfx * sub_GAME_7F087A08(Gfx *arg0);
|
||||
@@ -3016,13 +3062,13 @@ Gfx * bondviewRemoved7F08BCB8(Gfx *arg0);
|
||||
s32 sub_GAME_7F078A58(coord3d *vec_scale, f32 norm_scale);
|
||||
s32 getMissiontimer(void);
|
||||
void solo_char_load(void);
|
||||
void bondviewUpdateYAutoAimTime(s32 auto_aim_time, f32 auto_aim_y);
|
||||
void bondviewUpdateXAutoAimTime(s32 auto_aim_time, f32 auto_aim_x);
|
||||
void bondviewUpdateYAutoAimTime(struct PropRecord *autoaim_target, f32 auto_aim_y);
|
||||
void bondviewUpdateXAutoAimTime(struct PropRecord *autoaim_target, f32 auto_aim_x);
|
||||
void bondviewSet3dCoord7F07CEB0(coord3d *arg0);
|
||||
f32 bondviewYPositionRelated(struct StandTile *arg0, f32 arg1, f32 arg2);
|
||||
f32 bondviewGetPlayerDuckingHeightRelated(struct player *player);
|
||||
void bondviewCollisionRadiusRelated(PropRecord* arg0, f32 *collision_radius, f32 *height, f32 *always_30);
|
||||
void bondviewUpdatePlayerClipping(s32 use_stanHeight, f32 stanHeight_offset);
|
||||
void bondviewGetCollisionRadius(PropRecord* arg0, f32 *collision_radius, f32 *height, f32 *always_30);
|
||||
void bondviewUpdatePlayerY(s32 use_stanHeight, f32 stanHeight_offset);
|
||||
void currentPlayerSetFadeColour(s32 r, s32 g, s32 b, f32 frac);
|
||||
void currentPlayerSetFadeFrac(f32 maxfadetime, f32 frac);
|
||||
void set_BONDdata_autoaim_x(s32 param_1);
|
||||
@@ -3052,7 +3098,7 @@ void set_bondata_invincible_flag(u32 arg0);
|
||||
void bondviewSetVisibleToGuardsFlag(s32 param_1);
|
||||
Mtxf *currentPlayerGetMatrix10EC(void);
|
||||
f32 get_curplay_horizontal_rotation_in_degrees(void);
|
||||
Mtxf *currentPlayerGetMatrix10CC(void);
|
||||
Mtxf *camGetWorldToScreenMtxf(void);
|
||||
void sub_GAME_7F077EEC(struct coord2d *in, coord3d *out, f32 value);
|
||||
s32 camIsPosInScreenBox(coord3d *, f32, struct bbox2d *);
|
||||
|
||||
@@ -3063,9 +3109,9 @@ Mtx *currentPlayerGetProjectionMatrix(void);
|
||||
Gfx *bondviewRenderProp(PropRecord *arg0, Gfx *arg1, s32 arg2);
|
||||
f32 getPlayer_c_lodscalez(void);
|
||||
f32 bondviewGetBondBreathing(void);
|
||||
void sub_GAME_7F08A928(int param_1);
|
||||
void bondviewClearUpperTextDisplayFlag(int param_1);
|
||||
|
||||
void sub_GAME_7F08A944(PLAYERFLAG flag);
|
||||
void bondviewSetUpperTextDisplayFlag(PLAYERFLAG flag);
|
||||
void set_camera_mode(s32 arg0);
|
||||
bool isBondInTank(void);
|
||||
void hudmsgTopShow(char* string);
|
||||
@@ -3077,9 +3123,10 @@ struct PropRecord *get_ptr_for_players_tank(void);
|
||||
s32 bondviewGetRandomSpawnPadIndex(void);
|
||||
void change_player_pos_to_target(struct collision434* arg0, struct coord3d *arg1, struct StandTile *arg2);
|
||||
void sub_GAME_7F089718(f32);
|
||||
void sub_GAME_7F08A900(void);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
||||
+16
-16
@@ -129,17 +129,17 @@ void bondviewLoadSetupIntroSection(void)
|
||||
camera_80036438 = 0;
|
||||
D_8003643C = 0;
|
||||
D_80036440 = NULL;
|
||||
flt_CODE_bss_80079990.f[0] = FLOAT_INIT;
|
||||
flt_CODE_bss_80079990.f[1] = FLOAT_INIT;
|
||||
flt_CODE_bss_80079990.f[2] = FLOAT_INIT;
|
||||
D_80036444 = 0;
|
||||
g_ForceBondMoveOffset.f[0] = FLOAT_INIT;
|
||||
g_ForceBondMoveOffset.f[1] = FLOAT_INIT;
|
||||
g_ForceBondMoveOffset.f[2] = FLOAT_INIT;
|
||||
g_SurroundBondWithExplosionsFlag = 0;
|
||||
startpadcount = 0;
|
||||
in_tank_flag = 0;
|
||||
D_8003644C = 0;
|
||||
ptr_playerstank = NULL;
|
||||
g_WorldTankProp = 0;
|
||||
g_PlayerTankProp = NULL;
|
||||
g_PlayerTankYOffset = FLOAT_INIT;
|
||||
SFX_80036458[0] = NULL;
|
||||
SFX_80036458[1] = NULL;
|
||||
g_TankSfxState[0] = NULL;
|
||||
g_TankSfxState[1] = NULL;
|
||||
g_TankTurnSpeed = FLOAT_INIT;
|
||||
g_TankOrientationAngle = FLOAT_INIT;
|
||||
D_80036468 = FLOAT_INIT;
|
||||
@@ -151,11 +151,11 @@ void bondviewLoadSetupIntroSection(void)
|
||||
g_BondCanEnterTank = 0;
|
||||
g_TankTurretAngle = FLOAT_INIT;
|
||||
g_TankTurretTurn = FLOAT_INIT;
|
||||
D_8003648C = 0;
|
||||
g_ExplodeTankOnDeathFlag = 0;
|
||||
D_800364B0 = 1;
|
||||
g_PlayerInvincible = 0;
|
||||
g_CameraMode = 0;
|
||||
enable_move_after_cinema = 0;
|
||||
g_CameraAfterCinema = 0;
|
||||
D_8003649C = 0;
|
||||
stop_time_flag = 0;
|
||||
D_800364A4 = FLOAT_INIT;
|
||||
@@ -412,9 +412,9 @@ void bondviewLoadSetupIntroSection(void)
|
||||
g_CurrentPlayer->stanHeight = stan_height;
|
||||
g_CurrentPlayer->field_6C = stan_height / FIELD_6C_FACTOR;
|
||||
change_player_pos_to_target(&g_CurrentPlayer->field_488, &start_pos, start_stan);
|
||||
g_CurrentPlayer->field_488.field_10.f[0] = -sinf(start_look_angle);
|
||||
g_CurrentPlayer->field_488.field_10.f[1] = FLOAT_INIT;
|
||||
g_CurrentPlayer->field_488.field_10.f[2] = cosf(start_look_angle);
|
||||
g_CurrentPlayer->field_488.theta_transform.f[0] = -sinf(start_look_angle);
|
||||
g_CurrentPlayer->field_488.theta_transform.f[1] = FLOAT_INIT;
|
||||
g_CurrentPlayer->field_488.theta_transform.f[2] = cosf(start_look_angle);
|
||||
sub_GAME_7F089718(D_800364D0);
|
||||
dword_CODE_bss_80079DA0 = 0;
|
||||
|
||||
@@ -426,8 +426,8 @@ void bondviewLoadSetupIntroSection(void)
|
||||
}
|
||||
|
||||
bondviewResetIntroCameraMessageDialogs();
|
||||
sub_GAME_7F08A900();
|
||||
g_CurrentPlayer->prop = chrpropAllocate();
|
||||
bondviewResetUpperTextDisplay();
|
||||
g_CurrentPlayer->prop = propAllocate();
|
||||
g_CurrentPlayer->prop->obj = NULL;
|
||||
g_CurrentPlayer->prop->type = PROP_TYPE_VIEWER;
|
||||
|
||||
@@ -466,5 +466,5 @@ void bondviewLoadSetupIntroSection(void)
|
||||
g_CurrentPlayer->startnewbonddie = 1;
|
||||
g_CurrentPlayer->redbloodfinished = 0;
|
||||
g_CurrentPlayer->deathanimfinished = 0;
|
||||
D_80036510 = 0;
|
||||
D_80036510 = CAMERAMODE_NONE;
|
||||
}
|
||||
|
||||
+31
-29
@@ -17,6 +17,8 @@
|
||||
#include "objecthandler.h"
|
||||
#include "player.h"
|
||||
#include "player_2.h"
|
||||
#include "assets/obseg/text/LmiscE.h"
|
||||
|
||||
//#include "chraicommands.h" /* needed for ai list commands, remove when moving global ai lists to chraicommands/chrai */
|
||||
// bss
|
||||
|
||||
@@ -683,39 +685,39 @@ u16 mBtnCheatUnlockAllGuns[] = {
|
||||
*/
|
||||
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,0x00), 0, /* 0x06 */ CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ALLGUNS, 0xA, 0, 0, mBtnCheatAllGuns, TEXT(LMISC,0x01), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ 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,0x37), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ 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,0x04), 0, /* 0x62 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_INFINITE_AMMO, 0, 0, 0, 0, TEXT(LMISC,0x06), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_DK_MODE, 0, 0, 0, 0, TEXT(LMISC,0x07), 0, /* 0x26 */ CHEAT_MASK_GLOBAL | 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,0x08), 0, /* 0x02 */ CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_PAINTBALL, 0, 0, 0, 0, TEXT(LMISC,0x38), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | 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,0x0A), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_LASER, 0, 0, 0, 0, TEXT(LMISC,0x0B), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLDEN_GUN, 0, 0, 0, 0, TEXT(LMISC,0x0C), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SILVER_PP7, 0, 0, 0, 0, TEXT(LMISC,0x0D), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_GOLD_PP7, 0, 0, 0, 0, TEXT(LMISC,0x0E), 0, /* 0x12 */ CHEAT_MASK_16 | 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,0x43), 0, /* 0x64 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME},
|
||||
{ CHEAT_TURBO_MODE, 0, 0, 0, 0, TEXT(LMISC,0x40), 0, /* 0x66 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_MPGAME | CHEAT_MASK_SPGAME},
|
||||
{ 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,0x41), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_SLOW_ANIMATION, 0, 0, 0, 0, TEXT(LMISC,0x42), 0, /* 0x72 */ CHEAT_MASK_TOGGLE | CHEAT_MASK_GLOBAL | CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_ENEMY_ROCKETS, 0, 0, 0, 0, TEXT(LMISC,0x39), 0, /* 0x01 */ CHEAT_MASK_MENUS},
|
||||
{ CHEAT_2X_ROCKET_LAUNCHER, 0, 0, 0, 0, TEXT(LMISC,0x3A), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_GRENADE_LAUNCHER, 0, 0, 0, 0, TEXT(LMISC,0x3B), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_RCP90, 0, 0, 0, 0, TEXT(LMISC,0x3C), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_THROWING_KNIFE, 0, 0, 0, 0, TEXT(LMISC,0x3D), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_HUNTING_KNIFE, 0, 0, 0, 0, TEXT(LMISC,0x3E), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ CHEAT_2X_LASER, 0, 0, 0, 0, TEXT(LMISC,0x3F), 0, /* 0x12 */ CHEAT_MASK_16 | CHEAT_MASK_SPGAME},
|
||||
{ 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_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
|
||||
@@ -1646,7 +1648,7 @@ char *cheatGetMenuTextPointer(CHEAT_ID cheat_id)
|
||||
return langGet((s32) temp_v0);
|
||||
}
|
||||
|
||||
return langGet(TEXT(LMISC,0x28));
|
||||
return langGet(TEXT(LMISC, MISC_STR_28));
|
||||
}
|
||||
|
||||
|
||||
@@ -1667,13 +1669,13 @@ bool cheatIsActive(CHEAT_ID cheat)
|
||||
*/
|
||||
void cheatButtonSetDkMode(CHEAT_ID cheat_id)
|
||||
{
|
||||
s32 num_guards;
|
||||
s32 g_NumChrSlots;
|
||||
s32 i;
|
||||
f32 scale;
|
||||
Model *model;
|
||||
ChrRecord* guard = ptr_guard_data;
|
||||
ChrRecord* guard = g_ChrSlots;
|
||||
|
||||
num_guards = get_numguards();
|
||||
g_NumChrSlots = get_numguards();
|
||||
|
||||
if (cheat_id)
|
||||
{
|
||||
@@ -1684,7 +1686,7 @@ void cheatButtonSetDkMode(CHEAT_ID cheat_id)
|
||||
scale = 1.25f;
|
||||
}
|
||||
|
||||
for (i=0; i<num_guards; i++, guard++)
|
||||
for (i=0; i<g_NumChrSlots; i++, guard++)
|
||||
{
|
||||
|
||||
#if defined(VERSION_US)
|
||||
|
||||
+173
-186
@@ -23,7 +23,7 @@
|
||||
|
||||
// forward declarations
|
||||
|
||||
void chrAimGlobalTimerTickRelated( ChrRecord *arg0);
|
||||
void chrUpdateAimProperties( ChrRecord *arg0);
|
||||
void chrPositionRelated7F020E40( ChrRecord *chr, s32 arg1);
|
||||
|
||||
// end forward declarations
|
||||
@@ -68,8 +68,8 @@ struct animation_something D_8002C914[] = {
|
||||
s32 D_8002CC58 = 0;
|
||||
s32 show_patrols_flag = FALSE;
|
||||
s32 player1_guardID = 5000;
|
||||
ChrRecord *ptr_guard_data = 0;
|
||||
s32 num_guards = 0;
|
||||
ChrRecord *g_ChrSlots = 0;
|
||||
s32 g_NumChrSlots = 0;
|
||||
struct unk_joint_list D_8002CC6C = {NULL, 1, 3, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}, 0};
|
||||
s32 D_8002CCAC = 0;
|
||||
s32 D_8002CCB0 = 0;
|
||||
@@ -90,15 +90,15 @@ u32 num_female_heads = 0;
|
||||
|
||||
s32 list_of_bodies[] = {
|
||||
BODY_Jungle_Commando,BODY_St_Petersburg_Guard,BODY_Russian_Soldier,BODY_Russian_Infantry,
|
||||
BODY_Janus_Special_Forces,BODY_Tuxedo,BODY_Boris,BODY_Ourumov,
|
||||
BODY_Janus_Special_Forces,BODY_Brosnan_Tuxedo,BODY_Boris,BODY_Ourumov,
|
||||
BODY_Trevelyan_Janus,BODY_Valentin_,BODY_Xenia,BODY_Baron_Samedi,
|
||||
BODY_Jaws,BODY_Mayday,BODY_Oddjob,BODY_Natalya_Skirt,
|
||||
BODY_Janus_Marine,BODY_Russian_Commandant,BODY_Siberian_Guard_1_Mishkin,BODY_Naval_Officer,
|
||||
BODY_Siberian_Special_Forces,BODY_Special_Operations_Uniform,BODY_Formal_Wear,BODY_Jungle_Fatigues,
|
||||
BODY_Unused_Female,BODY_Rosika,BODY_Scientist_2_Female,BODY_Civilian_1_Female,
|
||||
BODY_Unused_Male_1,BODY_Unused_Male_2,BODY_Civilian_4,BODY_Civilian_2,
|
||||
BODY_Civilian_3,BODY_Scientist_1_Male,BODY_Tuxedo,BODY_Tuxedo,
|
||||
BODY_Tuxedo,BODY_Helicopter_Pilot,BODY_Siberian_Guard_2,BODY_Arctic_Commando,
|
||||
BODY_Civilian_3,BODY_Scientist_1_Male,BODY_Brosnan_Tuxedo,BODY_Brosnan_Tuxedo,
|
||||
BODY_Brosnan_Tuxedo,BODY_Helicopter_Pilot,BODY_Siberian_Guard_2,BODY_Arctic_Commando,
|
||||
BODY_Moonraker_Elite_1_Male,BODY_Moonraker_Elite_2_Female,-1,
|
||||
};
|
||||
|
||||
@@ -1139,7 +1139,7 @@ coord3d D_80030A44 = {0,0,0};
|
||||
|
||||
s32 get_numguards(void)
|
||||
{
|
||||
return num_guards;
|
||||
return g_NumChrSlots;
|
||||
}
|
||||
|
||||
void get_ptr_allocated_block_for_vertices(int param_1)
|
||||
@@ -1182,15 +1182,15 @@ f32 chrUnusedYPositionRelated(PropRecord *arg0)
|
||||
|
||||
|
||||
|
||||
void set_or_unset_GUARDdata_flag(ChrRecord *self, bool unset)
|
||||
void chrSetMoving(ChrRecord *self, bool unset)
|
||||
{
|
||||
if (unset)
|
||||
{
|
||||
self->hidden &= ~0x100;
|
||||
self->hidden &= ~CHRHIDDEN_MOVING;
|
||||
}
|
||||
else
|
||||
{
|
||||
self->hidden |= 0x100;
|
||||
self->hidden |= CHRHIDDEN_MOVING;
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -1220,7 +1220,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 054178 7F01F648 0FC08C58 */ jal chrGetChrWidthHeight
|
||||
/* 05417C 7F01F64C 27A6008C */ addiu $a2, $sp, 0x8c
|
||||
/* 054180 7F01F650 8FA40098 */ lw $a0, 0x98($sp)
|
||||
/* 054184 7F01F654 0FC07D7A */ jal set_or_unset_GUARDdata_flag
|
||||
/* 054184 7F01F654 0FC07D7A */ jal chrSetMoving
|
||||
/* 054188 7F01F658 00002825 */ move $a1, $zero
|
||||
/* 05418C 7F01F65C 0FC2C731 */ jal sub_GAME_7F0B1CC4
|
||||
/* 054190 7F01F660 00000000 */ nop
|
||||
@@ -1240,7 +1240,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 0541C8 7F01F698 E7A60018 */ swc1 $f6, 0x18($sp)
|
||||
/* 0541CC 7F01F69C E7B00024 */ swc1 $f16, 0x24($sp)
|
||||
/* 0541D0 7F01F6A0 E7A8001C */ swc1 $f8, 0x1c($sp)
|
||||
/* 0541D4 7F01F6A4 0FC2C389 */ jal sub_GAME_7F0B0E24
|
||||
/* 0541D4 7F01F6A4 0FC2C389 */ jal stanTestLineUnobstructed
|
||||
/* 0541D8 7F01F6A8 E7AA0020 */ swc1 $f10, 0x20($sp)
|
||||
/* 0541DC 7F01F6AC 10400016 */ beqz $v0, .L7F01F708
|
||||
/* 0541E0 7F01F6B0 27A40090 */ addiu $a0, $sp, 0x90
|
||||
@@ -1252,7 +1252,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 0541F8 7F01F6C8 AFB90010 */ sw $t9, 0x10($sp)
|
||||
/* 0541FC 7F01F6CC 8FA70084 */ lw $a3, 0x84($sp)
|
||||
/* 054200 7F01F6D0 E7B20014 */ swc1 $f18, 0x14($sp)
|
||||
/* 054204 7F01F6D4 0FC2C62E */ jal sub_GAME_7F0B18B8
|
||||
/* 054204 7F01F6D4 0FC2C62E */ jal stanTestVolume
|
||||
/* 054208 7F01F6D8 E7A40018 */ swc1 $f4, 0x18($sp)
|
||||
/* 05420C 7F01F6DC 0441000A */ bgez $v0, .L7F01F708
|
||||
/* 054210 7F01F6E0 8FA800A8 */ lw $t0, 0xa8($sp)
|
||||
@@ -1349,7 +1349,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 05436C 7F01F83C E7B20018 */ swc1 $f18, 0x18($sp)
|
||||
/* 054370 7F01F840 E7A60024 */ swc1 $f6, 0x24($sp)
|
||||
/* 054374 7F01F844 E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* 054378 7F01F848 0FC2C389 */ jal sub_GAME_7F0B0E24
|
||||
/* 054378 7F01F848 0FC2C389 */ jal stanTestLineUnobstructed
|
||||
/* 05437C 7F01F84C E7A80020 */ swc1 $f8, 0x20($sp)
|
||||
/* 054380 7F01F850 10400016 */ beqz $v0, .L7F01F8AC
|
||||
/* 054384 7F01F854 27A40090 */ addiu $a0, $sp, 0x90
|
||||
@@ -1361,7 +1361,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 05439C 7F01F86C 8FA60048 */ lw $a2, 0x48($sp)
|
||||
/* 0543A0 7F01F870 8FA70084 */ lw $a3, 0x84($sp)
|
||||
/* 0543A4 7F01F874 E7B00014 */ swc1 $f16, 0x14($sp)
|
||||
/* 0543A8 7F01F878 0FC2C62E */ jal sub_GAME_7F0B18B8
|
||||
/* 0543A8 7F01F878 0FC2C62E */ jal stanTestVolume
|
||||
/* 0543AC 7F01F87C E7A40018 */ swc1 $f4, 0x18($sp)
|
||||
/* 0543B0 7F01F880 0441000A */ bgez $v0, .L7F01F8AC
|
||||
/* 0543B4 7F01F884 C7B20040 */ lwc1 $f18, 0x40($sp)
|
||||
@@ -1455,7 +1455,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 05450C 7F01F9DC E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* 054510 7F01F9E0 E7B20018 */ swc1 $f18, 0x18($sp)
|
||||
/* 054514 7F01F9E4 E7A60024 */ swc1 $f6, 0x24($sp)
|
||||
/* 054518 7F01F9E8 0FC2C389 */ jal sub_GAME_7F0B0E24
|
||||
/* 054518 7F01F9E8 0FC2C389 */ jal stanTestLineUnobstructed
|
||||
/* 05451C 7F01F9EC E7B00020 */ swc1 $f16, 0x20($sp)
|
||||
/* 054520 7F01F9F0 10400079 */ beqz $v0, .L7F01FBD8
|
||||
/* 054524 7F01F9F4 27A40090 */ addiu $a0, $sp, 0x90
|
||||
@@ -1467,7 +1467,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 05453C 7F01FA0C 8FA60048 */ lw $a2, 0x48($sp)
|
||||
/* 054540 7F01FA10 8FA70084 */ lw $a3, 0x84($sp)
|
||||
/* 054544 7F01FA14 E7A40014 */ swc1 $f4, 0x14($sp)
|
||||
/* 054548 7F01FA18 0FC2C62E */ jal sub_GAME_7F0B18B8
|
||||
/* 054548 7F01FA18 0FC2C62E */ jal stanTestVolume
|
||||
/* 05454C 7F01FA1C E7A80018 */ swc1 $f8, 0x18($sp)
|
||||
/* 054550 7F01FA20 0441006D */ bgez $v0, .L7F01FBD8
|
||||
/* 054554 7F01FA24 C7B20040 */ lwc1 $f18, 0x40($sp)
|
||||
@@ -1557,7 +1557,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 05469C 7F01FB6C E7AA001C */ swc1 $f10, 0x1c($sp)
|
||||
/* 0546A0 7F01FB70 E7A60018 */ swc1 $f6, 0x18($sp)
|
||||
/* 0546A4 7F01FB74 E7B20024 */ swc1 $f18, 0x24($sp)
|
||||
/* 0546A8 7F01FB78 0FC2C389 */ jal sub_GAME_7F0B0E24
|
||||
/* 0546A8 7F01FB78 0FC2C389 */ jal stanTestLineUnobstructed
|
||||
/* 0546AC 7F01FB7C E7A40020 */ swc1 $f4, 0x20($sp)
|
||||
/* 0546B0 7F01FB80 10400015 */ beqz $v0, .L7F01FBD8
|
||||
/* 0546B4 7F01FB84 27A40090 */ addiu $a0, $sp, 0x90
|
||||
@@ -1569,7 +1569,7 @@ glabel sub_GAME_7F01F614
|
||||
/* 0546CC 7F01FB9C 8FA60048 */ lw $a2, 0x48($sp)
|
||||
/* 0546D0 7F01FBA0 8FA70084 */ lw $a3, 0x84($sp)
|
||||
/* 0546D4 7F01FBA4 E7A80014 */ swc1 $f8, 0x14($sp)
|
||||
/* 0546D8 7F01FBA8 0FC2C62E */ jal sub_GAME_7F0B18B8
|
||||
/* 0546D8 7F01FBA8 0FC2C62E */ jal stanTestVolume
|
||||
/* 0546DC 7F01FBAC E7B00018 */ swc1 $f16, 0x18($sp)
|
||||
/* 0546E0 7F01FBB0 04410009 */ bgez $v0, .L7F01FBD8
|
||||
/* 0546E4 7F01FBB4 C7A60040 */ lwc1 $f6, 0x40($sp)
|
||||
@@ -1584,7 +1584,7 @@ glabel sub_GAME_7F01F614
|
||||
.L7F01FBD8:
|
||||
/* 054708 7F01FBD8 8FA40098 */ lw $a0, 0x98($sp)
|
||||
.L7F01FBDC:
|
||||
/* 05470C 7F01FBDC 0FC07D7A */ jal set_or_unset_GUARDdata_flag
|
||||
/* 05470C 7F01FBDC 0FC07D7A */ jal chrSetMoving
|
||||
/* 054710 7F01FBE0 24050001 */ li $a1, 1
|
||||
/* 054714 7F01FBE4 8FAC0094 */ lw $t4, 0x94($sp)
|
||||
/* 054718 7F01FBE8 8FAE0098 */ lw $t6, 0x98($sp)
|
||||
@@ -2527,9 +2527,9 @@ s32 chrGetNumFree(void)
|
||||
s32 count = 0;
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < num_guards; i++)
|
||||
for (i = 0; i < g_NumChrSlots; i++)
|
||||
{
|
||||
if (ptr_guard_data[i].model == 0)
|
||||
if (g_ChrSlots[i].model == 0)
|
||||
{
|
||||
count++;
|
||||
}
|
||||
@@ -2577,8 +2577,8 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 054BEC 7F0200BC 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 054BF0 7F0200C0 F7B40010 */ sdc1 $f20, 0x10($sp)
|
||||
/* 054BF4 7F0200C4 4487A000 */ mtc1 $a3, $f20
|
||||
/* 054BF8 7F0200C8 3C078003 */ lui $a3, %hi(num_guards)
|
||||
/* 054BFC 7F0200CC 8CE7CC68 */ lw $a3, %lo(num_guards)($a3)
|
||||
/* 054BF8 7F0200C8 3C078003 */ lui $a3, %hi(g_NumChrSlots)
|
||||
/* 054BFC 7F0200CC 8CE7CC68 */ lw $a3, %lo(g_NumChrSlots)($a3)
|
||||
/* 054C00 7F0200D0 AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* 054C04 7F0200D4 AFB20024 */ sw $s2, 0x24($sp)
|
||||
/* 054C08 7F0200D8 AFB10020 */ sw $s1, 0x20($sp)
|
||||
@@ -2590,8 +2590,8 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 054C20 7F0200F0 00008025 */ move $s0, $zero
|
||||
/* 054C24 7F0200F4 18E0000E */ blez $a3, .L7F020130
|
||||
/* 054C28 7F0200F8 00001025 */ move $v0, $zero
|
||||
/* 054C2C 7F0200FC 3C058003 */ lui $a1, %hi(ptr_guard_data)
|
||||
/* 054C30 7F020100 8CA5CC64 */ lw $a1, %lo(ptr_guard_data)($a1)
|
||||
/* 054C2C 7F0200FC 3C058003 */ lui $a1, %hi(g_ChrSlots)
|
||||
/* 054C30 7F020100 8CA5CC64 */ lw $a1, %lo(g_ChrSlots)($a1)
|
||||
/* 054C34 7F020104 00002025 */ move $a0, $zero
|
||||
/* 054C38 7F020108 00A01825 */ move $v1, $a1
|
||||
.L7F02010C:
|
||||
@@ -2634,7 +2634,7 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 054CC4 7F020194 3C058003 */ lui $a1, %hi(animation_rate)
|
||||
/* 054CC8 7F020198 8CA5C900 */ lw $a1, %lo(animation_rate)($a1)
|
||||
/* 054CCC 7F02019C 4406A000 */ mfc1 $a2, $f20
|
||||
/* 054CD0 7F0201A0 0FC1BFC6 */ jal modelSetAnimRateForDuration
|
||||
/* 054CD0 7F0201A0 0FC1BFC6 */ jal modelSetAnimPlaySpeed
|
||||
/* 054CD4 7F0201A4 02402025 */ move $a0, $s2
|
||||
/* 054CD8 7F0201A8 3C028003 */ lui $v0, %hi(player1_guardID)
|
||||
/* 054CDC 7F0201AC 2442CC60 */ addiu $v0, %lo(player1_guardID) # addiu $v0, $v0, -0x33a0
|
||||
@@ -2781,8 +2781,8 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 05290C 7F01FF1C 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 052910 7F01FF20 F7B40010 */ sdc1 $f20, 0x10($sp)
|
||||
/* 052914 7F01FF24 4487A000 */ mtc1 $a3, $f20
|
||||
/* 052918 7F01FF28 3C078003 */ lui $a3, %hi(num_guards) # $a3, 0x8003
|
||||
/* 05291C 7F01FF2C 8CE781B8 */ lw $a3, %lo(num_guards)($a3)
|
||||
/* 052918 7F01FF28 3C078003 */ lui $a3, %hi(g_NumChrSlots) # $a3, 0x8003
|
||||
/* 05291C 7F01FF2C 8CE781B8 */ lw $a3, %lo(g_NumChrSlots)($a3)
|
||||
/* 052920 7F01FF30 AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* 052924 7F01FF34 AFB20024 */ sw $s2, 0x24($sp)
|
||||
/* 052928 7F01FF38 AFB10020 */ sw $s1, 0x20($sp)
|
||||
@@ -2794,8 +2794,8 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 052940 7F01FF50 00008025 */ move $s0, $zero
|
||||
/* 052944 7F01FF54 18E0000E */ blez $a3, .L7F01FF90
|
||||
/* 052948 7F01FF58 00001025 */ move $v0, $zero
|
||||
/* 05294C 7F01FF5C 3C058003 */ lui $a1, %hi(ptr_guard_data) # $a1, 0x8003
|
||||
/* 052950 7F01FF60 8CA581B4 */ lw $a1, %lo(ptr_guard_data)($a1)
|
||||
/* 05294C 7F01FF5C 3C058003 */ lui $a1, %hi(g_ChrSlots) # $a1, 0x8003
|
||||
/* 052950 7F01FF60 8CA581B4 */ lw $a1, %lo(g_ChrSlots)($a1)
|
||||
/* 052954 7F01FF64 00002025 */ move $a0, $zero
|
||||
/* 052958 7F01FF68 00A01825 */ move $v1, $a1
|
||||
.L7F01FF6C:
|
||||
@@ -2843,7 +2843,7 @@ glabel init_GUARDdata_with_set_values
|
||||
/* 0529F8 7F020008 46105482 */ mul.s $f18, $f10, $f16
|
||||
/* 0529FC 7F02000C 4406A000 */ mfc1 $a2, $f20
|
||||
/* 052A00 7F020010 44059000 */ mfc1 $a1, $f18
|
||||
/* 052A04 7F020014 0FC1C02E */ jal modelSetAnimRateForDuration
|
||||
/* 052A04 7F020014 0FC1C02E */ jal modelSetAnimPlaySpeed
|
||||
/* 052A08 7F020018 00000000 */ nop
|
||||
/* 052A0C 7F02001C 3C028003 */ lui $v0, %hi(player1_guardID) # $v0, 0x8003
|
||||
/* 052A10 7F020020 244281B0 */ addiu $v0, %lo(player1_guardID) # addiu $v0, $v0, -0x7e50
|
||||
@@ -2986,12 +2986,12 @@ glabel init_GUARDdata_with_set_values
|
||||
/**
|
||||
* Address 0x7F0203B8.
|
||||
*/
|
||||
PropRecord * replace_GUARDdata_with_actual_values( Model * arg0, coord3d * arg1, f32 arg2, StandTile * arg3, s32 arg4)
|
||||
PropRecord * chrAllocate( Model * arg0, coord3d * arg1, f32 arg2, StandTile * arg3, s32 arg4)
|
||||
{
|
||||
PropRecord * ret;
|
||||
s32 phi_a0;
|
||||
|
||||
ret = chrpropAllocate();
|
||||
ret = propAllocate();
|
||||
|
||||
if (ret != 0)
|
||||
{
|
||||
@@ -3051,12 +3051,12 @@ void disable_sounds_attached_to_player_then_something(PropRecord *prop)
|
||||
p = prop->child;
|
||||
while (p != NULL)
|
||||
{
|
||||
sub_GAME_7F04C044(p);
|
||||
objDetach(p);
|
||||
objFreePermanently(p->chr, 1);
|
||||
p = p->nextSibling;
|
||||
}
|
||||
|
||||
set_aircraft_obj_inst_scale_to_zero(model);
|
||||
clear_aircraft_model_obj(model);
|
||||
|
||||
chr->model = NULL;
|
||||
chr->chrnum = -1;
|
||||
@@ -3127,7 +3127,7 @@ glabel disable_sounds_attached_to_player_then_something
|
||||
/* 055010 7F0204E0 00000000 */ nop
|
||||
.L7F0204E4:
|
||||
/* 055014 7F0204E4 8C910004 */ lw $s1, 4($a0)
|
||||
/* 055018 7F0204E8 0FC13011 */ jal sub_GAME_7F04C044
|
||||
/* 055018 7F0204E8 0FC13011 */ jal objDetach
|
||||
/* 05501C 7F0204EC 8C900024 */ lw $s0, 0x24($a0)
|
||||
/* 055020 7F0204F0 02202025 */ move $a0, $s1
|
||||
/* 055024 7F0204F4 0FC10409 */ jal objFreePermanently
|
||||
@@ -3135,7 +3135,7 @@ glabel disable_sounds_attached_to_player_then_something
|
||||
/* 05502C 7F0204FC 1600FFF9 */ bnez $s0, .L7F0204E4
|
||||
/* 055030 7F020500 02002025 */ move $a0, $s0
|
||||
.L7F020504:
|
||||
/* 055034 7F020504 0FC1B0FE */ jal set_aircraft_obj_inst_scale_to_zero
|
||||
/* 055034 7F020504 0FC1B0FE */ jal clear_aircraft_model_obj
|
||||
/* 055038 7F020508 8FA40028 */ lw $a0, 0x28($sp)
|
||||
/* 05503C 7F02050C 8E440020 */ lw $a0, 0x20($s2)
|
||||
/* 055040 7F020510 240FFFFF */ li $t7, -1
|
||||
@@ -3166,15 +3166,15 @@ void setAnimationRate(f32 arg0)
|
||||
|
||||
animation_rate = arg0;
|
||||
|
||||
for (i=0; i<num_guards; i++)
|
||||
for (i=0; i<g_NumChrSlots; i++)
|
||||
{
|
||||
if (ptr_guard_data[i].model != NULL)
|
||||
if (g_ChrSlots[i].model != NULL)
|
||||
{
|
||||
#if defined(REFRESH_PAL)
|
||||
/* should reference D_80047E4C (1.2f) */
|
||||
modelSetAnimRateForDuration(ptr_guard_data[i].model, animation_rate * 1.2f, 600.0f);
|
||||
modelSetAnimPlaySpeed(g_ChrSlots[i].model, animation_rate * 1.2f, 600.0f);
|
||||
#else
|
||||
modelSetAnimRateForDuration(ptr_guard_data[i].model, animation_rate, 600.0f);
|
||||
modelSetAnimPlaySpeed(g_ChrSlots[i].model, animation_rate, 600.0f);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
@@ -3193,27 +3193,27 @@ f32 getAnimationRate(void)
|
||||
/**
|
||||
* Address 0x7F0205F0 (all versions).
|
||||
*/
|
||||
void chrAimGlobalTimerTickRelated( ChrRecord *self)
|
||||
void chrUpdateAimProperties( ChrRecord *self)
|
||||
{
|
||||
f32 temp_f0;
|
||||
f32 mult;
|
||||
|
||||
if (self->aimendcount >= 2)
|
||||
{
|
||||
#if defined(BUGFIX_R1)
|
||||
temp_f0 = g_JP_GlobalTimerDelta / (f32) self->aimendcount;
|
||||
mult = g_JP_GlobalTimerDelta / (f32) self->aimendcount;
|
||||
#else
|
||||
temp_f0 = g_GlobalTimerDelta / (f32) self->aimendcount;
|
||||
mult = g_GlobalTimerDelta / (f32) self->aimendcount;
|
||||
#endif
|
||||
|
||||
if (temp_f0 > 1.0f)
|
||||
if (mult > 1.0f)
|
||||
{
|
||||
temp_f0 = 1.0f;
|
||||
mult = 1.0f;
|
||||
}
|
||||
|
||||
self->aimuplshoulder += ((self->aimendlshoulder - self->aimuplshoulder) * temp_f0);
|
||||
self->aimuprshoulder += ((self->aimendrshoulder - self->aimuprshoulder) * temp_f0);
|
||||
self->aimupback += ((self->aimendback - self->aimupback) * temp_f0);
|
||||
self->aimsideback += ((self->aimendsideback - self->aimsideback) * temp_f0);
|
||||
self->aimuplshoulder += ((self->aimendlshoulder - self->aimuplshoulder) * mult);
|
||||
self->aimuprshoulder += ((self->aimendrshoulder - self->aimuprshoulder) * mult);
|
||||
self->aimupback += ((self->aimendback - self->aimupback) * mult);
|
||||
self->aimsideback += ((self->aimendsideback - self->aimsideback) * mult);
|
||||
self->aimendcount -= g_ClockTimer;
|
||||
|
||||
return;
|
||||
@@ -3249,11 +3249,11 @@ void chrSetHiddenToRandom(ChrRecord *self)
|
||||
|
||||
if (rand == 0)
|
||||
{
|
||||
self->hidden |= 0x1000;
|
||||
self->hidden |= CHRHIDDEN_1000;
|
||||
}
|
||||
else if (rand == 1)
|
||||
{
|
||||
self->hidden |= 0x2000;
|
||||
self->hidden |= CHRHIDDEN_2000;
|
||||
}
|
||||
|
||||
// roll for bits 14,15.
|
||||
@@ -3265,11 +3265,11 @@ void chrSetHiddenToRandom(ChrRecord *self)
|
||||
|
||||
if (rand == 0)
|
||||
{
|
||||
self->hidden |= 0x4000;
|
||||
self->hidden |= CHRHIDDEN_4000;
|
||||
}
|
||||
else if (rand == 1)
|
||||
{
|
||||
self->hidden |= 0x8000;
|
||||
self->hidden |= CHRHIDDEN_8000;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3421,8 +3421,25 @@ s32 not_in_us_7F0209EC(s32 bodynum, s32 headnum)
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ((bodynum != 6) && (bodynum != 7) && (bodynum != 8) && (bodynum != 9) && (bodynum != 0xA) && (bodynum != 0xB) && (bodynum != 0xC) && (bodynum != 0xD) && (bodynum != 0xE) && (bodynum != 0xF) && (bodynum != 0x10) && (bodynum != 0x4F)
|
||||
&& (headnum != 0x4A) && (headnum != 0x4B) && (headnum != 0x4C) && (headnum != 0x4D) && (headnum != 0x4E) && (headnum != 0x45))
|
||||
if ((bodynum != BODY_Boris) &&
|
||||
(bodynum != BODY_Ourumov) &&
|
||||
(bodynum != BODY_Trevelyan_Janus) &&
|
||||
(bodynum != BODY_Trevelyan_006) &&
|
||||
(bodynum != BODY_Valentin_) &&
|
||||
(bodynum != BODY_Xenia) &&
|
||||
(bodynum != BODY_Baron_Samedi) &&
|
||||
(bodynum != BODY_Jaws) &&
|
||||
(bodynum != BODY_Mayday) &&
|
||||
(bodynum != BODY_Oddjob) &&
|
||||
(bodynum != BODY_Natalya_Skirt) &&
|
||||
(bodynum != BODY_Natalya_Jungle_Fatigues) &&
|
||||
|
||||
(headnum != BODY_Male_Pierce_Bond_1) &&
|
||||
(headnum != BODY_Male_Pierce_Bond_2) &&
|
||||
(headnum != BODY_Male_Pierce_Bond_3) &&
|
||||
(headnum != BODY_Male_Pierce_Bond_Parka) &&
|
||||
(headnum != BODY_Male_Pierce_Bond_Tuxedo) &&
|
||||
(headnum != BODY_Male_Mishkin))
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
@@ -3810,7 +3827,7 @@ glabel sub_GAME_7F02083C
|
||||
/* 055894 7F020D64 C7A80078 */ lwc1 $f8, 0x78($sp)
|
||||
/* 055898 7F020D68 E5080034 */ swc1 $f8, 0x34($t0)
|
||||
/* 05589C 7F020D6C C7A4007C */ lwc1 $f4, 0x7c($sp)
|
||||
/* 0558A0 7F020D70 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
|
||||
/* 0558A0 7F020D70 0FC1E0F1 */ jal camGetWorldToScreenMtxf
|
||||
/* 0558A4 7F020D74 E5040038 */ swc1 $f4, 0x38($t0)
|
||||
/* 0558A8 7F020D78 00402025 */ move $a0, $v0
|
||||
/* 0558AC 7F020D7C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
|
||||
@@ -4204,7 +4221,7 @@ glabel sub_GAME_7F02083C
|
||||
/* 055B6C 7F020FFC C7A80078 */ lwc1 $f8, 0x78($sp)
|
||||
/* 055B70 7F021000 E5280034 */ swc1 $f8, 0x34($t1)
|
||||
/* 055B74 7F021004 C7A4007C */ lwc1 $f4, 0x7c($sp)
|
||||
/* 055B78 7F021008 0FC1E26D */ jal currentPlayerGetMatrix10CC
|
||||
/* 055B78 7F021008 0FC1E26D */ jal camGetWorldToScreenMtxf
|
||||
/* 055B7C 7F02100C E5240038 */ swc1 $f4, 0x38($t1)
|
||||
/* 055B80 7F021010 00402025 */ move $a0, $v0
|
||||
/* 055B84 7F021014 0FC1616E */ jal matrix_4x4_multiply_homogeneous_in_place
|
||||
@@ -4256,10 +4273,10 @@ void chrPositionRelated7F020E40(ChrRecord *chr, s32 arg1)
|
||||
model = chr->model;
|
||||
prop = chr->prop;
|
||||
|
||||
if ((chr->hidden & 0x800) == 0)
|
||||
if (!(chr->hidden & CHRHIDDEN_FREEZE))
|
||||
{
|
||||
getsuboffset(model, &chr->prevpos);
|
||||
sub_GAME_7F070AEC(model, arg1, 1);
|
||||
modelTickAnimQuarterSpeed(model, arg1, 1);
|
||||
subcalcpos(model);
|
||||
set_color_shading_from_tile(prop, &chr->nextcol);
|
||||
getsuboffset(model, &prop->pos);
|
||||
@@ -4419,7 +4436,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055C0C 7F0210DC 24010006 */ li $at, 6
|
||||
/* 055C10 7F0210E0 55A1000D */ bnel $t5, $at, .L7F021118
|
||||
/* 055C14 7F0210E4 00027A00 */ sll $t7, $v0, 8
|
||||
/* 055C18 7F0210E8 0FC26C57 */ jal sub_GAME_7F09B15C
|
||||
/* 055C18 7F0210E8 0FC26C57 */ jal getPlayerPointerIndex
|
||||
/* 055C1C 7F0210EC 01802025 */ move $a0, $t4
|
||||
/* 055C20 7F0210F0 0002C880 */ sll $t9, $v0, 2
|
||||
/* 055C24 7F0210F4 3C188008 */ lui $t8, %hi(g_playerPointers)
|
||||
@@ -4449,7 +4466,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055C7C 7F02114C 00003025 */ move $a2, $zero
|
||||
/* 055C80 7F021150 11600005 */ beqz $t3, .L7F021168
|
||||
/* 055C84 7F021154 00000000 */ nop
|
||||
/* 055C88 7F021158 0FC1C2BB */ jal sub_GAME_7F070AEC
|
||||
/* 055C88 7F021158 0FC1C2BB */ jal modelTickAnimQuarterSpeed
|
||||
/* 055C8C 7F02115C 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 055C90 7F021160 10000003 */ b .L7F021170
|
||||
/* 055C94 7F021164 00000000 */ nop
|
||||
@@ -4564,7 +4581,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055E1C 7F0212EC 8FA40110 */ lw $a0, 0x110($sp)
|
||||
.L7F0212F0:
|
||||
/* 055E20 7F0212F0 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 055E24 7F0212F4 0FC1C2BB */ jal sub_GAME_7F070AEC
|
||||
/* 055E24 7F0212F4 0FC1C2BB */ jal modelTickAnimQuarterSpeed
|
||||
/* 055E28 7F0212F8 00003025 */ move $a2, $zero
|
||||
.L7F0212FC:
|
||||
/* 055E2C 7F0212FC 10000032 */ b .L7F0213C8
|
||||
@@ -4598,7 +4615,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055E90 7F021360 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 055E94 7F021364 13000003 */ beqz $t8, .L7F021374
|
||||
/* 055E98 7F021368 00000000 */ nop
|
||||
/* 055E9C 7F02136C 0FC1C2BB */ jal sub_GAME_7F070AEC
|
||||
/* 055E9C 7F02136C 0FC1C2BB */ jal modelTickAnimQuarterSpeed
|
||||
/* 055EA0 7F021370 00003025 */ move $a2, $zero
|
||||
.L7F021374:
|
||||
/* 055EA4 7F021374 10000014 */ b .L7F0213C8
|
||||
@@ -4608,7 +4625,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055EB0 7F021380 02002025 */ move $a0, $s0
|
||||
/* 055EB4 7F021384 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 055EB8 7F021388 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 055EBC 7F02138C 0FC1C2BB */ jal sub_GAME_7F070AEC
|
||||
/* 055EBC 7F02138C 0FC1C2BB */ jal modelTickAnimQuarterSpeed
|
||||
/* 055EC0 7F021390 00003025 */ move $a2, $zero
|
||||
/* 055EC4 7F021394 10000003 */ b .L7F0213A4
|
||||
/* 055EC8 7F021398 00000000 */ nop
|
||||
@@ -4643,7 +4660,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055F28 7F0213F8 35AC0200 */ ori $t4, $t5, 0x200
|
||||
/* 055F2C 7F0213FC A60C0012 */ sh $t4, 0x12($s0)
|
||||
.L7F021400:
|
||||
/* 055F30 7F021400 0FC0817C */ jal chrAimGlobalTimerTickRelated
|
||||
/* 055F30 7F021400 0FC0817C */ jal chrUpdateAimProperties
|
||||
/* 055F34 7F021404 02002025 */ move $a0, $s0
|
||||
/* 055F38 7F021408 8E040020 */ lw $a0, 0x20($s0)
|
||||
/* 055F3C 7F02140C 50800005 */ beql $a0, $zero, .L7F021424
|
||||
@@ -4670,7 +4687,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055F8C 7F02145C 10400004 */ beqz $v0, .L7F021470
|
||||
/* 055F90 7F021460 3C013EA0 */ li $at, 0x3EA00000 # 0.312500
|
||||
/* 055F94 7F021464 44816000 */ mtc1 $at, $f12
|
||||
/* 055F98 7F021468 0FC1B103 */ jal set_float_80036088
|
||||
/* 055F98 7F021468 0FC1B103 */ jal modelSetDistanceScale
|
||||
/* 055F9C 7F02146C 00000000 */ nop
|
||||
.L7F021470:
|
||||
/* 055FA0 7F021470 3C0A7F02 */ lui $t2, %hi(sub_GAME_7F02083C) # $t2, 0x7f02
|
||||
@@ -4678,7 +4695,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055FA8 7F021478 3C018003 */ lui $at, %hi(D_80036090)
|
||||
/* 055FAC 7F02147C AC2A6090 */ sw $t2, %lo(D_80036090)($at)
|
||||
/* 055FB0 7F021480 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60)
|
||||
/* 055FB4 7F021484 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
|
||||
/* 055FB4 7F021484 0FC1E0F1 */ jal camGetWorldToScreenMtxf
|
||||
/* 055FB8 7F021488 AC309B60 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at)
|
||||
/* 055FBC 7F02148C 8FAB0110 */ lw $t3, 0x110($sp)
|
||||
/* 055FC0 7F021490 AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -4713,7 +4730,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 05602C 7F0214FC AC206090 */ sw $zero, %lo(D_80036090)($at)
|
||||
/* 056030 7F021500 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 056034 7F021504 44816000 */ mtc1 $at, $f12
|
||||
/* 056038 7F021508 0FC1B103 */ jal set_float_80036088
|
||||
/* 056038 7F021508 0FC1B103 */ jal modelSetDistanceScale
|
||||
/* 05603C 7F02150C 00000000 */ nop
|
||||
/* 056040 7F021510 260400F4 */ addiu $a0, $s0, 0xf4
|
||||
/* 056044 7F021514 0FC100C4 */ jal update_color_shading
|
||||
@@ -4747,7 +4764,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 0560B4 7F021584 8C65001C */ lw $a1, 0x1c($v1)
|
||||
/* 0560B8 7F021588 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 0560BC 7F02158C AFA70100 */ sw $a3, 0x100($sp)
|
||||
/* 0560C0 7F021590 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0560C0 7F021590 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0560C4 7F021594 AFA300FC */ sw $v1, 0xfc($sp)
|
||||
/* 0560C8 7F021598 8FAB00FC */ lw $t3, 0xfc($sp)
|
||||
/* 0560CC 7F02159C AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -5110,7 +5127,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056608 7F021AD8 3058FFFE */ andi $t8, $v0, 0xfffe
|
||||
/* 05660C 7F021ADC 8C830024 */ lw $v1, 0x24($a0)
|
||||
.L7F021AE0:
|
||||
/* 056610 7F021AE0 0FC1304C */ jal sub_GAME_7F04C130
|
||||
/* 056610 7F021AE0 0FC1304C */ jal objDrop
|
||||
/* 056614 7F021AE4 AFA3003C */ sw $v1, 0x3c($sp)
|
||||
/* 056618 7F021AE8 8FA4003C */ lw $a0, 0x3c($sp)
|
||||
/* 05661C 7F021AEC 5480FFFC */ bnezl $a0, .L7F021AE0
|
||||
@@ -5271,7 +5288,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055EE4 7F021374 24010006 */ li $at, 6
|
||||
/* 055EE8 7F021378 55A1000D */ bnel $t5, $at, .Ljp7F0213B0
|
||||
/* 055EEC 7F02137C 00027A00 */ sll $t7, $v0, 8
|
||||
/* 055EF0 7F021380 0FC26F3F */ jal sub_GAME_7F09B15C
|
||||
/* 055EF0 7F021380 0FC26F3F */ jal getPlayerPointerIndex
|
||||
/* 055EF4 7F021384 01802025 */ move $a0, $t4
|
||||
/* 055EF8 7F021388 0002C880 */ sll $t9, $v0, 2
|
||||
/* 055EFC 7F02138C 3C188008 */ lui $t8, %hi(g_playerPointers)
|
||||
@@ -5301,7 +5318,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 055F54 7F0213E4 00003025 */ move $a2, $zero
|
||||
/* 055F58 7F0213E8 11600005 */ beqz $t3, .Ljp7F021400
|
||||
/* 055F5C 7F0213EC 00000000 */ nop
|
||||
/* 055F60 7F0213F0 0FC1C437 */ jal sub_GAME_7F070AEC
|
||||
/* 055F60 7F0213F0 0FC1C437 */ jal modelTickAnimQuarterSpeed
|
||||
/* 055F64 7F0213F4 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 055F68 7F0213F8 10000003 */ b .Ljp7F021408
|
||||
/* 055F6C 7F0213FC 00000000 */ nop
|
||||
@@ -5416,7 +5433,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 0560F4 7F021584 8FA40110 */ lw $a0, 0x110($sp)
|
||||
.Ljp7F021588:
|
||||
/* 0560F8 7F021588 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 0560FC 7F02158C 0FC1C437 */ jal sub_GAME_7F070AEC
|
||||
/* 0560FC 7F02158C 0FC1C437 */ jal modelTickAnimQuarterSpeed
|
||||
/* 056100 7F021590 00003025 */ move $a2, $zero
|
||||
.Ljp7F021594:
|
||||
/* 056104 7F021594 10000032 */ b .Ljp7F021660
|
||||
@@ -5450,7 +5467,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056168 7F0215F8 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 05616C 7F0215FC 13000003 */ beqz $t8, .Ljp7F02160C
|
||||
/* 056170 7F021600 00000000 */ nop
|
||||
/* 056174 7F021604 0FC1C437 */ jal sub_GAME_7F070AEC
|
||||
/* 056174 7F021604 0FC1C437 */ jal modelTickAnimQuarterSpeed
|
||||
/* 056178 7F021608 00003025 */ move $a2, $zero
|
||||
.Ljp7F02160C:
|
||||
/* 05617C 7F02160C 10000014 */ b .Ljp7F021660
|
||||
@@ -5460,7 +5477,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056188 7F021618 02002025 */ move $a0, $s0
|
||||
/* 05618C 7F02161C 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 056190 7F021620 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 056194 7F021624 0FC1C437 */ jal sub_GAME_7F070AEC
|
||||
/* 056194 7F021624 0FC1C437 */ jal modelTickAnimQuarterSpeed
|
||||
/* 056198 7F021628 00003025 */ move $a2, $zero
|
||||
/* 05619C 7F02162C 10000003 */ b .Ljp7F02163C
|
||||
/* 0561A0 7F021630 00000000 */ nop
|
||||
@@ -5495,7 +5512,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056200 7F021690 35AC0200 */ ori $t4, $t5, 0x200
|
||||
/* 056204 7F021694 A60C0012 */ sh $t4, 0x12($s0)
|
||||
.Ljp7F021698:
|
||||
/* 056208 7F021698 0FC081E8 */ jal chrAimGlobalTimerTickRelated
|
||||
/* 056208 7F021698 0FC081E8 */ jal chrUpdateAimProperties
|
||||
/* 05620C 7F02169C 02002025 */ move $a0, $s0
|
||||
/* 056210 7F0216A0 8E040020 */ lw $a0, 0x20($s0)
|
||||
/* 056214 7F0216A4 50800005 */ beql $a0, $zero, .Ljp7F0216BC
|
||||
@@ -5527,7 +5544,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056278 7F021708 10400013 */ beqz $v0, .Ljp7F021758
|
||||
/* 05627C 7F02170C 3C013EA0 */ li $at, 0x3EA00000 # 0.312500
|
||||
/* 056280 7F021710 44816000 */ mtc1 $at, $f12
|
||||
/* 056284 7F021714 0FC1B27F */ jal set_float_80036088
|
||||
/* 056284 7F021714 0FC1B27F */ jal modelSetDistanceScale
|
||||
/* 056288 7F021718 00000000 */ nop
|
||||
/* 05628C 7F02171C 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 056290 7F021720 3C01EFFF */ lui $at, (0xEFFFFFFF >> 16) # lui $at, 0xefff
|
||||
@@ -5550,7 +5567,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 0562D0 7F021760 3C018003 */ lui $at, %hi(D_80036090) # $at, 0x8003
|
||||
/* 0562D4 7F021764 AC2D60D0 */ sw $t5, %lo(D_80036090)($at)
|
||||
/* 0562D8 7F021768 3C018007 */ lui $at, %hi(dword_CODE_bss_80069B60) # $at, 0x8007
|
||||
/* 0562DC 7F02176C 0FC1E26D */ jal currentPlayerGetMatrix10CC
|
||||
/* 0562DC 7F02176C 0FC1E26D */ jal camGetWorldToScreenMtxf
|
||||
/* 0562E0 7F021770 AC309BA0 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at)
|
||||
/* 0562E4 7F021774 8FAC0110 */ lw $t4, 0x110($sp)
|
||||
/* 0562E8 7F021778 AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -5585,7 +5602,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056354 7F0217E4 AC2060D0 */ sw $zero, %lo(D_80036090)($at)
|
||||
/* 056358 7F0217E8 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 05635C 7F0217EC 44816000 */ mtc1 $at, $f12
|
||||
/* 056360 7F0217F0 0FC1B27F */ jal set_float_80036088
|
||||
/* 056360 7F0217F0 0FC1B27F */ jal modelSetDistanceScale
|
||||
/* 056364 7F0217F4 00000000 */ nop
|
||||
/* 056368 7F0217F8 260400F4 */ addiu $a0, $s0, 0xf4
|
||||
/* 05636C 7F0217FC 0FC10184 */ jal update_color_shading
|
||||
@@ -5619,7 +5636,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 0563DC 7F02186C 8C65001C */ lw $a1, 0x1c($v1)
|
||||
/* 0563E0 7F021870 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 0563E4 7F021874 AFA70100 */ sw $a3, 0x100($sp)
|
||||
/* 0563E8 7F021878 0FC1B314 */ jal sub_GAME_7F06C660
|
||||
/* 0563E8 7F021878 0FC1B314 */ jal modelFindNodeMtx
|
||||
/* 0563EC 7F02187C AFA300FC */ sw $v1, 0xfc($sp)
|
||||
/* 0563F0 7F021880 8FAC00FC */ lw $t4, 0xfc($sp)
|
||||
/* 0563F4 7F021884 AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -5982,7 +5999,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 056930 7F021DC0 3048FFFE */ andi $t0, $v0, 0xfffe
|
||||
/* 056934 7F021DC4 8C830024 */ lw $v1, 0x24($a0)
|
||||
.Ljp7F021DC8:
|
||||
/* 056938 7F021DC8 0FC1314D */ jal sub_GAME_7F04C130
|
||||
/* 056938 7F021DC8 0FC1314D */ jal objDrop
|
||||
/* 05693C 7F021DCC AFA3003C */ sw $v1, 0x3c($sp)
|
||||
/* 056940 7F021DD0 8FA4003C */ lw $a0, 0x3c($sp)
|
||||
/* 056944 7F021DD4 5480FFFC */ bnezl $a0, .Ljp7F021DC8
|
||||
@@ -6197,7 +6214,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053A44 7F021054 24010006 */ li $at, 6
|
||||
/* 053A48 7F021058 55A1000D */ bnel $t5, $at, .L7F021090
|
||||
/* 053A4C 7F02105C 00027A00 */ sll $t7, $v0, 8
|
||||
/* 053A50 7F021060 0FC269A7 */ jal sub_GAME_7F09B15C
|
||||
/* 053A50 7F021060 0FC269A7 */ jal getPlayerPointerIndex
|
||||
/* 053A54 7F021064 01802025 */ move $a0, $t4
|
||||
/* 053A58 7F021068 0002C880 */ sll $t9, $v0, 2
|
||||
/* 053A5C 7F02106C 3C188007 */ lui $t8, %hi(g_playerPointers)
|
||||
@@ -6227,7 +6244,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053AB4 7F0210C4 00003025 */ move $a2, $zero
|
||||
/* 053AB8 7F0210C8 11600005 */ beqz $t3, .L7F0210E0
|
||||
/* 053ABC 7F0210CC 00000000 */ nop
|
||||
/* 053AC0 7F0210D0 0FC1C323 */ jal sub_GAME_7F070AEC
|
||||
/* 053AC0 7F0210D0 0FC1C323 */ jal modelTickAnimQuarterSpeed
|
||||
/* 053AC4 7F0210D4 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 053AC8 7F0210D8 10000003 */ b .L7F0210E8
|
||||
/* 053ACC 7F0210DC 00000000 */ nop
|
||||
@@ -6342,7 +6359,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053C54 7F021264 8FA40110 */ lw $a0, 0x110($sp)
|
||||
.L7F021268:
|
||||
/* 053C58 7F021268 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 053C5C 7F02126C 0FC1C323 */ jal sub_GAME_7F070AEC
|
||||
/* 053C5C 7F02126C 0FC1C323 */ jal modelTickAnimQuarterSpeed
|
||||
/* 053C60 7F021270 00003025 */ move $a2, $zero
|
||||
.L7F021274:
|
||||
/* 053C64 7F021274 10000032 */ b .L7F021340
|
||||
@@ -6376,7 +6393,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053CC8 7F0212D8 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 053CCC 7F0212DC 13000003 */ beqz $t8, .L7F0212EC
|
||||
/* 053CD0 7F0212E0 00000000 */ nop
|
||||
/* 053CD4 7F0212E4 0FC1C323 */ jal sub_GAME_7F070AEC
|
||||
/* 053CD4 7F0212E4 0FC1C323 */ jal modelTickAnimQuarterSpeed
|
||||
/* 053CD8 7F0212E8 00003025 */ move $a2, $zero
|
||||
.L7F0212EC:
|
||||
/* 053CDC 7F0212EC 10000014 */ b .L7F021340
|
||||
@@ -6386,7 +6403,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053CE8 7F0212F8 02002025 */ move $a0, $s0
|
||||
/* 053CEC 7F0212FC 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 053CF0 7F021300 8FA50104 */ lw $a1, 0x104($sp)
|
||||
/* 053CF4 7F021304 0FC1C323 */ jal sub_GAME_7F070AEC
|
||||
/* 053CF4 7F021304 0FC1C323 */ jal modelTickAnimQuarterSpeed
|
||||
/* 053CF8 7F021308 00003025 */ move $a2, $zero
|
||||
/* 053CFC 7F02130C 10000003 */ b .L7F02131C
|
||||
/* 053D00 7F021310 00000000 */ nop
|
||||
@@ -6421,7 +6438,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053D60 7F021370 35AC0200 */ ori $t4, $t5, 0x200
|
||||
/* 053D64 7F021374 A60C0012 */ sh $t4, 0x12($s0)
|
||||
.L7F021378:
|
||||
/* 053D68 7F021378 0FC08120 */ jal chrAimGlobalTimerTickRelated
|
||||
/* 053D68 7F021378 0FC08120 */ jal chrUpdateAimProperties
|
||||
/* 053D6C 7F02137C 02002025 */ move $a0, $s0
|
||||
/* 053D70 7F021380 8E040020 */ lw $a0, 0x20($s0)
|
||||
/* 053D74 7F021384 50800005 */ beql $a0, $zero, .L7F02139C
|
||||
@@ -6453,7 +6470,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053DD8 7F0213E8 10400013 */ beqz $v0, .L7F021438
|
||||
/* 053DDC 7F0213EC 3C013EA0 */ li $at, 0x3EA00000 # 0.312500
|
||||
/* 053DE0 7F0213F0 44816000 */ mtc1 $at, $f12
|
||||
/* 053DE4 7F0213F4 0FC1B2D3 */ jal set_float_80036088
|
||||
/* 053DE4 7F0213F4 0FC1B2D3 */ jal modelSetDistanceScale
|
||||
/* 053DE8 7F0213F8 00000000 */ nop
|
||||
/* 053DEC 7F0213FC 8E020014 */ lw $v0, 0x14($s0)
|
||||
/* 053DF0 7F021400 3C01EFFF */ lui $at, (0xEFFFFFFF >> 16) # lui $at, 0xefff
|
||||
@@ -6476,7 +6493,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053E30 7F021440 3C018003 */ lui $at, %hi(D_80036090) # $at, 0x8003
|
||||
/* 053E34 7F021444 AC2D15E0 */ sw $t5, %lo(D_80036090)($at)
|
||||
/* 053E38 7F021448 3C018006 */ lui $at, %hi(dword_CODE_bss_80069B60) # $at, 0x8006
|
||||
/* 053E3C 7F02144C 0FC1E111 */ jal currentPlayerGetMatrix10CC
|
||||
/* 053E3C 7F02144C 0FC1E111 */ jal camGetWorldToScreenMtxf
|
||||
/* 053E40 7F021450 AC308AA0 */ sw $s0, %lo(dword_CODE_bss_80069B60)($at)
|
||||
/* 053E44 7F021454 8FAC0110 */ lw $t4, 0x110($sp)
|
||||
/* 053E48 7F021458 AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -6511,7 +6528,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053EB4 7F0214C4 AC2015E0 */ sw $zero, %lo(D_80036090)($at)
|
||||
/* 053EB8 7F0214C8 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 053EBC 7F0214CC 44816000 */ mtc1 $at, $f12
|
||||
/* 053EC0 7F0214D0 0FC1B2D3 */ jal set_float_80036088
|
||||
/* 053EC0 7F0214D0 0FC1B2D3 */ jal modelSetDistanceScale
|
||||
/* 053EC4 7F0214D4 00000000 */ nop
|
||||
/* 053EC8 7F0214D8 260400F4 */ addiu $a0, $s0, 0xf4
|
||||
/* 053ECC 7F0214DC 0FC100F4 */ jal update_color_shading
|
||||
@@ -6545,7 +6562,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 053F3C 7F02154C 8C65001C */ lw $a1, 0x1c($v1)
|
||||
/* 053F40 7F021550 8FA40110 */ lw $a0, 0x110($sp)
|
||||
/* 053F44 7F021554 AFA70100 */ sw $a3, 0x100($sp)
|
||||
/* 053F48 7F021558 0FC1B366 */ jal sub_GAME_7F06C660
|
||||
/* 053F48 7F021558 0FC1B366 */ jal modelFindNodeMtx
|
||||
/* 053F4C 7F02155C AFA300FC */ sw $v1, 0xfc($sp)
|
||||
/* 053F50 7F021560 8FAC00FC */ lw $t4, 0xfc($sp)
|
||||
/* 053F54 7F021564 AFA20118 */ sw $v0, 0x118($sp)
|
||||
@@ -6908,7 +6925,7 @@ glabel sub_GAME_7F020EF0
|
||||
/* 054490 7F021AA0 3048FFFE */ andi $t0, $v0, 0xfffe
|
||||
/* 054494 7F021AA4 8C830024 */ lw $v1, 0x24($a0)
|
||||
.L7F021AA8:
|
||||
/* 054498 7F021AA8 0FC130C9 */ jal sub_GAME_7F04C130
|
||||
/* 054498 7F021AA8 0FC130C9 */ jal objDrop
|
||||
/* 05449C 7F021AAC AFA3003C */ sw $v1, 0x3c($sp)
|
||||
/* 0544A0 7F021AB0 8FA4003C */ lw $a0, 0x3c($sp)
|
||||
/* 0544A4 7F021AB4 5480FFFC */ bnezl $a0, .L7F021AA8
|
||||
@@ -7258,7 +7275,7 @@ glabel sub_GAME_7F022078
|
||||
/* 056CA4 7F022174 0FC1E111 */ jal currentPlayerGetMatrix10D4
|
||||
/* 056CA8 7F022178 E7A40044 */ swc1 $f4, 0x44($sp)
|
||||
/* 056CAC 7F02217C 00402025 */ move $a0, $v0
|
||||
/* 056CB0 7F022180 0FC1611D */ jal matrix_4x4_transform_vector_in_place
|
||||
/* 056CB0 7F022180 0FC1611D */ jal mtx4TransformVecInPlace
|
||||
/* 056CB4 7F022184 27A5003C */ addiu $a1, $sp, 0x3c
|
||||
/* 056CB8 7F022188 8FAD0050 */ lw $t5, 0x50($sp)
|
||||
/* 056CBC 7F02218C 27A4003C */ addiu $a0, $sp, 0x3c
|
||||
@@ -7385,17 +7402,17 @@ glabel sub_GAME_7F0221DC
|
||||
/* 056E54 7F022324 1000000C */ b .L7F022358
|
||||
/* 056E58 7F022328 00000000 */ nop
|
||||
.L7F02232C:
|
||||
/* 056E5C 7F02232C 0FC1BA5C */ jal sub_GAME_7F06E970
|
||||
/* 056E5C 7F02232C 0FC1BA5C */ jal modelApplyDistanceRelations
|
||||
/* 056E60 7F022330 02002825 */ move $a1, $s0
|
||||
/* 056E64 7F022334 10000008 */ b .L7F022358
|
||||
/* 056E68 7F022338 8E090014 */ lw $t1, 0x14($s0)
|
||||
.L7F02233C:
|
||||
/* 056E6C 7F02233C 0FC1BA6F */ jal process_12_handle_switch
|
||||
/* 056E6C 7F02233C 0FC1BA6F */ jal modelApplyToggleRelations
|
||||
/* 056E70 7F022340 02002825 */ move $a1, $s0
|
||||
/* 056E74 7F022344 10000004 */ b .L7F022358
|
||||
/* 056E78 7F022348 8E090014 */ lw $t1, 0x14($s0)
|
||||
.L7F02234C:
|
||||
/* 056E7C 7F02234C 0FC1BA82 */ jal process_17_pointer_to_head
|
||||
/* 056E7C 7F02234C 0FC1BA82 */ jal modelApplyHeadRelations
|
||||
/* 056E80 7F022350 02002825 */ move $a1, $s0
|
||||
/* 056E84 7F022354 8E090014 */ lw $t1, 0x14($s0)
|
||||
.L7F022358:
|
||||
@@ -7754,11 +7771,11 @@ glabel sub_GAME_7F022648
|
||||
/* 05736C 7F02283C 0FC1E111 */ jal currentPlayerGetMatrix10D4
|
||||
/* 057370 7F022840 E7A4007C */ swc1 $f4, 0x7c($sp)
|
||||
/* 057374 7F022844 00402025 */ move $a0, $v0
|
||||
/* 057378 7F022848 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
|
||||
/* 057378 7F022848 0FC160F6 */ jal mtx4RotateVecInPlace
|
||||
/* 05737C 7F02284C 27A50074 */ addiu $a1, $sp, 0x74
|
||||
/* 057380 7F022850 8FA400DC */ lw $a0, 0xdc($sp)
|
||||
/* 057384 7F022854 8FA500D8 */ lw $a1, 0xd8($sp)
|
||||
/* 057388 7F022858 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 057388 7F022858 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 05738C 7F02285C 00003025 */ move $a2, $zero
|
||||
/* 057390 7F022860 C4460030 */ lwc1 $f6, 0x30($v0)
|
||||
/* 057394 7F022864 C6480000 */ lwc1 $f8, ($s2)
|
||||
@@ -7910,7 +7927,7 @@ glabel sub_GAME_7F022980
|
||||
/* 0575A0 7F022A70 E7A800B0 */ swc1 $f8, 0xb0($sp)
|
||||
/* 0575A4 7F022A74 27B000A8 */ addiu $s0, $sp, 0xa8
|
||||
/* 0575A8 7F022A78 02002825 */ move $a1, $s0
|
||||
/* 0575AC 7F022A7C 0FC1611D */ jal matrix_4x4_transform_vector_in_place
|
||||
/* 0575AC 7F022A7C 0FC1611D */ jal mtx4TransformVecInPlace
|
||||
/* 0575B0 7F022A80 00402025 */ move $a0, $v0
|
||||
/* 0575B4 7F022A84 0FC19ED3 */ jal sub_GAME_7F067B4C
|
||||
/* 0575B8 7F022A88 02002025 */ move $a0, $s0
|
||||
@@ -8077,7 +8094,7 @@ glabel sub_GAME_7F022980
|
||||
/* 057810 7F022CE0 8FBF004C */ lw $ra, 0x4c($sp)
|
||||
.L7F022CE4:
|
||||
/* 057814 7F022CE4 8E240048 */ lw $a0, 0x48($s1)
|
||||
/* 057818 7F022CE8 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 057818 7F022CE8 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 05781C 7F022CEC 8E25000C */ lw $a1, 0xc($s1)
|
||||
/* 057820 7F022CF0 C7B20098 */ lwc1 $f18, 0x98($sp)
|
||||
/* 057824 7F022CF4 C7A4009C */ lwc1 $f4, 0x9c($sp)
|
||||
@@ -8136,7 +8153,7 @@ glabel sub_GAME_7F022980
|
||||
/* 0578F8 7F022DC8 E7A60078 */ swc1 $f6, 0x78($sp)
|
||||
/* 0578FC 7F022DCC 27B00070 */ addiu $s0, $sp, 0x70
|
||||
/* 057900 7F022DD0 02002825 */ move $a1, $s0
|
||||
/* 057904 7F022DD4 0FC1611D */ jal matrix_4x4_transform_vector_in_place
|
||||
/* 057904 7F022DD4 0FC1611D */ jal mtx4TransformVecInPlace
|
||||
/* 057908 7F022DD8 02402025 */ move $a0, $s2
|
||||
/* 05790C 7F022DDC 8E240048 */ lw $a0, 0x48($s1)
|
||||
/* 057910 7F022DE0 8E250008 */ lw $a1, 8($s1)
|
||||
@@ -8254,13 +8271,13 @@ void chrCheckGuardsHeardSound(f32 noise)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i=0; i<num_guards; i++)
|
||||
for (i=0; i<g_NumChrSlots; i++)
|
||||
{
|
||||
if (ptr_guard_data[i].model != NULL)
|
||||
if (g_ChrSlots[i].model != NULL)
|
||||
{
|
||||
if (chrGetDistanceToBond(&ptr_guard_data[i]) < ptr_guard_data[i].hearingscale * (noise * 100.0f))
|
||||
if (chrGetDistanceToBond(&g_ChrSlots[i]) < g_ChrSlots[i].hearingscale * (noise * 100.0f))
|
||||
{
|
||||
chrlvAlertGuardToPlayerPosition(&ptr_guard_data[i]);
|
||||
chrlvAlertGuardToPlayerPosition(&g_ChrSlots[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8269,7 +8286,7 @@ void chrCheckGuardsHeardSound(f32 noise)
|
||||
|
||||
|
||||
/**
|
||||
* Iterates ptr_guard_data. Returns the first object that (1) model
|
||||
* Iterates g_ChrSlots. Returns the first object that (1) model
|
||||
* is not null and (2) chrnum matches index.
|
||||
*
|
||||
* Address 0x7F022FC8.
|
||||
@@ -8279,11 +8296,11 @@ ChrRecord* chrFindByLiteralId(s32 index)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i=0; i<num_guards; i++)
|
||||
for (i=0; i<g_NumChrSlots; i++)
|
||||
{
|
||||
if (ptr_guard_data[i].model != NULL && ptr_guard_data[i].chrnum == index)
|
||||
if (g_ChrSlots[i].model != NULL && g_ChrSlots[i].chrnum == index)
|
||||
{
|
||||
return &ptr_guard_data[i];
|
||||
return &g_ChrSlots[i];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8313,7 +8330,7 @@ PropRecord *chrGetEquippedWeaponPropWithCheck(ChrRecord *self, GUNHAND hand)
|
||||
{
|
||||
WeaponObjRecord *wep = gunprop->weapon;
|
||||
|
||||
if (bondwalkItemCheckBitflags(wep->weaponnum, 0x200) == 0)
|
||||
if (bondwalkItemCheckBitflags(wep->weaponnum, WEAPONSTATBITFLAG_HOLD_AS_GUN) == 0)
|
||||
{
|
||||
gunprop = NULL;
|
||||
}
|
||||
@@ -8408,81 +8425,51 @@ f32 chrGetChrGround(PropRecord *arg0)
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F023194(void) {
|
||||
/**
|
||||
* Calculate auto aim position coordinates.
|
||||
*
|
||||
* US address 7F023194.
|
||||
*/
|
||||
s32 sub_GAME_7F023194(PropRecord *arg0, struct coord3d *arg1, struct coord2d *arg2, struct coord2d *arg3)
|
||||
{
|
||||
struct ChrRecord *temp_v1;
|
||||
|
||||
temp_v1 = arg0->chr;
|
||||
|
||||
if (arg0->flags & PROPFLAG_ONSCREEN)
|
||||
{
|
||||
if ((temp_v1->actiontype != ACT_DIE) && (temp_v1->actiontype != ACT_DEAD) && !(temp_v1->chrflags & CHRFLAG_NO_AUTOAIM))
|
||||
{
|
||||
struct Model *model;
|
||||
RenderPosView *model_render_pos_1;
|
||||
RenderPosView *model_render_pos_2;
|
||||
|
||||
model = temp_v1->model;
|
||||
model_render_pos_1 = &model->render_pos[0];
|
||||
model_render_pos_2 = &model->render_pos[1];
|
||||
|
||||
arg1->f[2] = model_render_pos_2->pos.m[3][2] + ((model_render_pos_1->pos.m[3][2] - model_render_pos_2->pos.m[3][2]) * 0.25f);
|
||||
|
||||
if (arg1->f[2] < 0.0f)
|
||||
{
|
||||
arg1->f[0] = model_render_pos_2->pos.m[3][0] + ((model_render_pos_1->pos.m[3][0] - model_render_pos_2->pos.m[3][0]) * 0.25f);
|
||||
arg1->f[1] = model_render_pos_2->pos.m[3][1] + ((model_render_pos_1->pos.m[3][1] - model_render_pos_2->pos.m[3][1]) * 0.25f);
|
||||
|
||||
arg3->y = 0.0f;
|
||||
arg3->x = 0.0f;
|
||||
|
||||
arg2->x = 0.0f;
|
||||
arg2->y = 0.0f;
|
||||
|
||||
sub_GAME_7F03F90C(model, &arg2->y, &arg2->x, &arg3->y, &arg3->x);
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F023194
|
||||
/* 057CC4 7F023194 27BDFFE0 */ addiu $sp, $sp, -0x20
|
||||
/* 057CC8 7F023198 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 057CCC 7F02319C AFA50024 */ sw $a1, 0x24($sp)
|
||||
/* 057CD0 7F0231A0 AFA7002C */ sw $a3, 0x2c($sp)
|
||||
/* 057CD4 7F0231A4 908E0001 */ lbu $t6, 1($a0)
|
||||
/* 057CD8 7F0231A8 8C830004 */ lw $v1, 4($a0)
|
||||
/* 057CDC 7F0231AC 31CF0002 */ andi $t7, $t6, 2
|
||||
/* 057CE0 7F0231B0 51E00033 */ beql $t7, $zero, .L7F023280
|
||||
/* 057CE4 7F0231B4 00001025 */ move $v0, $zero
|
||||
/* 057CE8 7F0231B8 80620007 */ lb $v0, 7($v1)
|
||||
/* 057CEC 7F0231BC 24010004 */ li $at, 4
|
||||
/* 057CF0 7F0231C0 1041002E */ beq $v0, $at, .L7F02327C
|
||||
/* 057CF4 7F0231C4 24010005 */ li $at, 5
|
||||
/* 057CF8 7F0231C8 5041002D */ beql $v0, $at, .L7F023280
|
||||
/* 057CFC 7F0231CC 00001025 */ move $v0, $zero
|
||||
/* 057D00 7F0231D0 8C780014 */ lw $t8, 0x14($v1)
|
||||
/* 057D04 7F0231D4 33190800 */ andi $t9, $t8, 0x800
|
||||
/* 057D08 7F0231D8 57200029 */ bnezl $t9, .L7F023280
|
||||
/* 057D0C 7F0231DC 00001025 */ move $v0, $zero
|
||||
/* 057D10 7F0231E0 8C64001C */ lw $a0, 0x1c($v1)
|
||||
/* 057D14 7F0231E4 3C013E80 */ li $at, 0x3E800000 # 0.250000
|
||||
/* 057D18 7F0231E8 44817000 */ mtc1 $at, $f14
|
||||
/* 057D1C 7F0231EC 8C82000C */ lw $v0, 0xc($a0)
|
||||
/* 057D20 7F0231F0 44806000 */ mtc1 $zero, $f12
|
||||
/* 057D24 7F0231F4 24480040 */ addiu $t0, $v0, 0x40
|
||||
/* 057D28 7F0231F8 C5000038 */ lwc1 $f0, 0x38($t0)
|
||||
/* 057D2C 7F0231FC C4440038 */ lwc1 $f4, 0x38($v0)
|
||||
/* 057D30 7F023200 46002181 */ sub.s $f6, $f4, $f0
|
||||
/* 057D34 7F023204 460E3202 */ mul.s $f8, $f6, $f14
|
||||
/* 057D38 7F023208 46004280 */ add.s $f10, $f8, $f0
|
||||
/* 057D3C 7F02320C 460C503C */ c.lt.s $f10, $f12
|
||||
/* 057D40 7F023210 E4AA0008 */ swc1 $f10, 8($a1)
|
||||
/* 057D44 7F023214 4502001A */ bc1fl .L7F023280
|
||||
/* 057D48 7F023218 00001025 */ move $v0, $zero
|
||||
/* 057D4C 7F02321C C5000030 */ lwc1 $f0, 0x30($t0)
|
||||
/* 057D50 7F023220 C4500030 */ lwc1 $f16, 0x30($v0)
|
||||
/* 057D54 7F023224 46008481 */ sub.s $f18, $f16, $f0
|
||||
/* 057D58 7F023228 460E9102 */ mul.s $f4, $f18, $f14
|
||||
/* 057D5C 7F02322C 46002180 */ add.s $f6, $f4, $f0
|
||||
/* 057D60 7F023230 E4A60000 */ swc1 $f6, ($a1)
|
||||
/* 057D64 7F023234 C4480034 */ lwc1 $f8, 0x34($v0)
|
||||
/* 057D68 7F023238 C5020034 */ lwc1 $f2, 0x34($t0)
|
||||
/* 057D6C 7F02323C 46024281 */ sub.s $f10, $f8, $f2
|
||||
/* 057D70 7F023240 460E5402 */ mul.s $f16, $f10, $f14
|
||||
/* 057D74 7F023244 46028480 */ add.s $f18, $f16, $f2
|
||||
/* 057D78 7F023248 E4B20004 */ swc1 $f18, 4($a1)
|
||||
/* 057D7C 7F02324C 8FAB002C */ lw $t3, 0x2c($sp)
|
||||
/* 057D80 7F023250 24C50004 */ addiu $a1, $a2, 4
|
||||
/* 057D84 7F023254 E56C0004 */ swc1 $f12, 4($t3)
|
||||
/* 057D88 7F023258 E56C0000 */ swc1 $f12, ($t3)
|
||||
/* 057D8C 7F02325C E4CC0000 */ swc1 $f12, ($a2)
|
||||
/* 057D90 7F023260 E4CC0004 */ swc1 $f12, 4($a2)
|
||||
/* 057D94 7F023264 8FAC002C */ lw $t4, 0x2c($sp)
|
||||
/* 057D98 7F023268 25870004 */ addiu $a3, $t4, 4
|
||||
/* 057D9C 7F02326C 0FC0FE43 */ jal sub_GAME_7F03F90C
|
||||
/* 057DA0 7F023270 AFAC0010 */ sw $t4, 0x10($sp)
|
||||
/* 057DA4 7F023274 10000002 */ b .L7F023280
|
||||
/* 057DA8 7F023278 24020001 */ li $v0, 1
|
||||
.L7F02327C:
|
||||
/* 057DAC 7F02327C 00001025 */ move $v0, $zero
|
||||
.L7F023280:
|
||||
/* 057DB0 7F023280 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 057DB4 7F023284 27BD0020 */ addiu $sp, $sp, 0x20
|
||||
/* 057DB8 7F023288 03E00008 */ jr $ra
|
||||
/* 057DBC 7F02328C 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
+7
-4
@@ -230,8 +230,8 @@ extern s32 D_8002C910;
|
||||
extern s32 D_8002CC58;
|
||||
extern s32 show_patrols_flag;
|
||||
extern s32 player1_guardID;
|
||||
extern ChrRecord *ptr_guard_data;
|
||||
extern s32 num_guards;
|
||||
extern ChrRecord *g_ChrSlots;
|
||||
extern s32 g_NumChrSlots;
|
||||
extern struct unk_joint_list D_8002CC6C;
|
||||
extern s32 D_8002CCAC;
|
||||
extern s32 D_8002CCB0;
|
||||
@@ -285,11 +285,11 @@ void sub_GAME_7F022EE0(s32 param_1);
|
||||
void setanimationdebugflag(s32 param_1);
|
||||
void disable_sounds_attached_to_player_then_something(PropRecord* prop);
|
||||
void chrPositionRelated7F020D94(ChrRecord *);
|
||||
void set_or_unset_GUARDdata_flag(ChrRecord *guard,s32 param_2);
|
||||
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 *replace_GUARDdata_with_actual_values(struct Model * arg0, coord3d * arg1, f32 arg2, StandTile * arg3, s32 arg4);
|
||||
PropRecord *chrAllocate(struct Model * arg0, coord3d * arg1, f32 arg2, StandTile * arg3, s32 arg4);
|
||||
void chrSetHiddenToRandom(ChrRecord *arg0);
|
||||
void chrRemoved7F022E1C(f32 arg0);
|
||||
void chrDecrementAnimationTablePointerCount(void);
|
||||
@@ -307,9 +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);
|
||||
|
||||
//tentative signature
|
||||
s32 sub_GAME_7F01FC10(Model *, coord3d *, coord3d *, f32 *);
|
||||
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
-1
@@ -20,6 +20,8 @@ s32 load_body_head_if_not_loaded(s32 model)
|
||||
/**
|
||||
* Address 0x7F0232E8 (VERSION_US)
|
||||
* Address 0x7F0235D8 (other version)
|
||||
* Not a very descriptive name for a function. What it does is load Bond's model or those
|
||||
* for spawning guards. It is not used for guards that spawn at level loading.
|
||||
*/
|
||||
struct Model *makeonebody(s32 body, s32 head, struct ModelFileHeader *bodyHeader, struct ModelFileHeader *headHeader, s32 sunglasses, struct Model *model)
|
||||
{
|
||||
@@ -95,7 +97,7 @@ struct Model *makeonebody(s32 body, s32 head, struct ModelFileHeader *bodyHeader
|
||||
if ((headHeader != 0) && (c_item_entries[body].hasHead == 0))
|
||||
{
|
||||
bodyHeader->numRecords -= headHeader->numRecords;
|
||||
sub_GAME_7F06C3B4(model, opcode, headHeader);
|
||||
modelAttachHead(model, opcode, headHeader);
|
||||
|
||||
if ((sunglasses == 0) && ((s32) headHeader->numSwitches > 0))
|
||||
{
|
||||
|
||||
+33
-33
@@ -847,9 +847,9 @@ PathRecord *pathFindById(s32 ID)
|
||||
extern void chrpropDelist(PropRecord *prop);
|
||||
extern PadRecord * dword_CODE_bss_800799F8;
|
||||
extern CutsceneRecord *gBondViewCutscene;
|
||||
extern s32 dword_CODE_bss_80079A18;
|
||||
extern enum CAMERAMODE dword_CODE_bss_80079A18;
|
||||
extern s32 dword_CODE_bss_80079A1C;
|
||||
extern vec3d flt_CODE_bss_80079990;
|
||||
extern vec3d g_ForceBondMoveOffset;
|
||||
//CODE.bss:80079A00
|
||||
extern f32 flt_CODE_bss_80079A00;
|
||||
//CODE.bss:80079A04
|
||||
@@ -2290,14 +2290,14 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
#endif
|
||||
if (obj && obj->prop)
|
||||
{
|
||||
if (!do_something_if_object_destroyed(obj))
|
||||
if (!objGetDestroyedLevel(obj))
|
||||
{
|
||||
f32 damage = ((obj->damage - obj->maxdamage) + 1) / 250.0f;
|
||||
#ifdef ENABLE_LOG
|
||||
osSyncPrintf("ai_destroyobj 3 : adddamageobj\n");
|
||||
#endif
|
||||
|
||||
maybe_detonate_object(obj, damage, &obj->runtime_pos, 29, -1);
|
||||
maybe_detonate_object(obj, damage, &obj->runtime_pos, 0x1D, -1);
|
||||
}
|
||||
}
|
||||
Offset += AI_DestroyObject_LENGTH;
|
||||
@@ -2354,7 +2354,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
if (obj && obj->prop)
|
||||
{
|
||||
INV_ITEM_TYPE iType = collect_or_interact_object(obj->prop, FALSE);
|
||||
sub_GAME_7F03C2BC(obj->prop, iType);
|
||||
propExecuteTickOperation(obj->prop, iType);
|
||||
}
|
||||
Offset += AI_BondCollectObject_LENGTH;
|
||||
break;
|
||||
@@ -2368,7 +2368,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
if (obj->prop->parent)
|
||||
{
|
||||
sub_GAME_7F04C044(obj->prop);
|
||||
objDetach(obj->prop);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2376,7 +2376,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
chrpropDelist(obj->prop);
|
||||
chrpropDisable(obj->prop);
|
||||
}
|
||||
if (obj->type != PROPDEF_COLLECTABLE || !sub_GAME_7F051E1C(obj, chr))
|
||||
if (obj->type != PROPDEF_COLLECTABLE || !chrEquipWeapon(obj, chr))
|
||||
{
|
||||
chrpropReparent(obj->prop, chr->prop);
|
||||
}
|
||||
@@ -3586,7 +3586,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
bool ok = FALSE;
|
||||
if (ChrEntityp && ChrEntityp->prop && ChrEntityp->model)
|
||||
{
|
||||
ok = chrTryEquipHat(ChrEntityp, modelnum, flags);
|
||||
ok = hatCreateForChr(ChrEntityp, modelnum, flags);
|
||||
}
|
||||
if (ok)
|
||||
{
|
||||
@@ -3665,7 +3665,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
{
|
||||
hatobj = hatprop->obj;
|
||||
|
||||
chrTryEquipHat(clone, hatobj->obj, 0);
|
||||
hatCreateForChr(clone, hatobj->obj, 0);
|
||||
}
|
||||
}
|
||||
/* PD extras */
|
||||
@@ -3953,15 +3953,15 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
if (obj->type == PROPDEF_MONITOR)
|
||||
{
|
||||
MonitorObjRecord *sm = (MonitorObjRecord *)obj;
|
||||
monitorSetImageByNum(&sm->Monitor.image, ai->val[2]);
|
||||
monitorSetImageByNum(&sm->Monitor.cmdlist, ai->val[2]);
|
||||
}
|
||||
else if (obj->type == PROPDEF_MULTI_MONITOR)
|
||||
{
|
||||
u8 slot = ai->val[1];
|
||||
if (slot < 4)
|
||||
{
|
||||
multimonitorobj *mm = (multimonitorobj *)obj; //need new size here 0x74 (116) + 0x80 (so monitor is obj + 74)
|
||||
monitorSetImageByNum(&mm->Monitor[slot].image, ai->val[2]);
|
||||
MultiMonitorObjRecord *mm = (MultiMonitorObjRecord *)obj; //need new size here 0x74 (116) + 0x80 (so monitor is obj + 74)
|
||||
monitorSetImageByNum(&mm->Monitor[slot].cmdlist, ai->val[2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4065,15 +4065,15 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
case AI_BondDisableControl:
|
||||
{
|
||||
AIRecord1 *ai = AiListp + Offset;
|
||||
set_unset_bitflags(4, FALSE);
|
||||
set_unset_ammo_on_screen_setting(2, FALSE);
|
||||
gunSetSightVisible(GUNSIGHTREASON_NOCONTROL, FALSE);
|
||||
gunSetGunAmmoVisible(GUNAMMOREASON_NOCONTROL, FALSE);
|
||||
if (!(PLAYERFLAG_NOCONTROL & ai->val))
|
||||
{
|
||||
hudmsgsSetOff(PLAYERFLAG_NOCONTROL);
|
||||
}
|
||||
if (!(ai->val & PLAYERFLAG_LOCKCONTROLS))
|
||||
{
|
||||
sub_GAME_7F08A944(PLAYERFLAG_NOCONTROL);
|
||||
bondviewSetUpperTextDisplayFlag(PLAYERFLAG_NOCONTROL);
|
||||
}
|
||||
if (!(ai->val & PLAYERFLAG_NOTIMER))
|
||||
{
|
||||
@@ -4088,10 +4088,10 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
#ifdef ENABLE_LOG
|
||||
osSyncPrintf("AI_BONDENABLECONTROL\n");
|
||||
#endif
|
||||
set_unset_bitflags(4, TRUE);
|
||||
set_unset_ammo_on_screen_setting(2, TRUE);
|
||||
gunSetSightVisible(GUNSIGHTREASON_NOCONTROL, TRUE);
|
||||
gunSetGunAmmoVisible(GUNAMMOREASON_NOCONTROL, TRUE);
|
||||
hudmsgsSetOn(PLAYERFLAG_NOCONTROL);
|
||||
sub_GAME_7F08A928(2);
|
||||
bondviewClearUpperTextDisplayFlag(2);
|
||||
countdownTimerSetVisible(16, TRUE);
|
||||
D_800364B0 = TRUE;
|
||||
Offset += AI_BondEnableControl_LENGTH;
|
||||
@@ -4202,9 +4202,9 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
s32 num;
|
||||
for (num = get_numguards() - 1; num >= 0; num--)
|
||||
{
|
||||
if (ptr_guard_data[num].model != NULL)
|
||||
if (g_ChrSlots[num].model != NULL)
|
||||
{
|
||||
ptr_guard_data[num].chrflags |= CHRFLAG_HIDDEN;
|
||||
g_ChrSlots[num].chrflags |= CHRFLAG_HIDDEN;
|
||||
}
|
||||
}
|
||||
Offset += AI_HideAllChrs_LENGTH;
|
||||
@@ -4215,7 +4215,7 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
s32 num;
|
||||
for (num = get_numguards() - 1; num >= 0; num--)
|
||||
{
|
||||
ptr_guard_data[num].chrflags &= ~CHRFLAG_HIDDEN;
|
||||
g_ChrSlots[num].chrflags &= ~CHRFLAG_HIDDEN;
|
||||
}
|
||||
|
||||
Offset += AI_ShowAllChrs_LENGTH;
|
||||
@@ -4305,9 +4305,9 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
g_Vars.currentplayer->bondforcespeed.z = (s8)ai->val[2];
|
||||
*/
|
||||
AIRecord *ai = AiListp + Offset;
|
||||
flt_CODE_bss_80079990.x = (s8)ai->val[0];
|
||||
flt_CODE_bss_80079990.y = 0;
|
||||
flt_CODE_bss_80079990.z = (s8)ai->val[1];
|
||||
g_ForceBondMoveOffset.x = (s8)ai->val[0];
|
||||
g_ForceBondMoveOffset.y = 0;
|
||||
g_ForceBondMoveOffset.z = (s8)ai->val[1];
|
||||
Offset += AI_BondSetLockedVelocity_LENGTH;
|
||||
break;
|
||||
}
|
||||
@@ -4549,15 +4549,15 @@ void ai(PropDefHeaderRecord *Entityp, PROP_TYPE EntityType)
|
||||
|
||||
if (obj->runtime_bitflags & RUNTIMEBITFLAG_DEPOSIT)
|
||||
{
|
||||
obj->unk6C->flags |= 0x601;
|
||||
sub_GAME_7F03FE14(obj->prop);
|
||||
matrix_4x4_set_identity(&obj->unk6C->m);
|
||||
obj->unk6C->pos.x = 0;
|
||||
obj->unk6C->pos.y = 0.016666666f; //step height?
|
||||
obj->unk6C->pos.z = 0;
|
||||
obj->unk6C->vec.x = 0;
|
||||
obj->unk6C->vec.y = 0.29166666f; //direction to move?
|
||||
obj->unk6C->vec.z = 0;
|
||||
obj->projectile->flags |= 0x601;
|
||||
projectileSetSticky(obj->prop);
|
||||
matrix_4x4_set_identity(&obj->projectile->mtx);
|
||||
obj->projectile->speed.x = 0;
|
||||
obj->projectile->speed.y = 0.016666666f; //step height?
|
||||
obj->projectile->speed.z = 0;
|
||||
obj->projectile->unk10.x = 0;
|
||||
obj->projectile->unk10.y = 0.29166666f; //direction to move?
|
||||
obj->projectile->unk10.z = 0;
|
||||
}
|
||||
}
|
||||
Offset += AI_ObjectRocketLaunch_LENGTH;
|
||||
|
||||
+30
-259
@@ -165,11 +165,11 @@ Rotate Image:
|
||||
#define PTR_LIST_OBJECT_LOOKUP_INDICES_LEN 512
|
||||
#define BSS_8007161C_LEN 256
|
||||
#define BSS_8007161C_DATA_LEN 16
|
||||
#define PROJECTILEDATA_START_ADDRESS_LEN 30
|
||||
#define BSS_80072E70_DATA_LEN 10
|
||||
#define BSS_80073370_DATA_LEN 20
|
||||
#define BSS_80073DC0_DATA_LEN 20
|
||||
#define BSS_80075030_DATA_LEN 40
|
||||
#define MAX_WEAPON_SLOTS 30
|
||||
#define MAX_HAT_SLOTS 10
|
||||
#define MAX_AMMO_CRATES 20
|
||||
#define PROJECTILES_ARR_MAX 20
|
||||
#define EMBEDMENT_ARR_MAX 40
|
||||
#define ONSCREEN_PROP_LIST_LEN 500
|
||||
|
||||
|
||||
@@ -178,242 +178,9 @@ Rotate Image:
|
||||
* Getting a match on alloc_lookup_buffers makes it seem
|
||||
* the struct is just one continuous array. (or maybe there's no struct....)
|
||||
*/
|
||||
struct unk_8007161c
|
||||
struct roomproplistchunk
|
||||
{
|
||||
s16 data[16];
|
||||
};
|
||||
|
||||
struct projectile_data {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
u32 unk48;
|
||||
u32 unk4C;
|
||||
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
u32 unk58;
|
||||
u32 unk5C;
|
||||
|
||||
u32 unk60;
|
||||
u32 unk64;
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
u32 unk78;
|
||||
u32 unk7C;
|
||||
|
||||
u32 unk80;
|
||||
u32 unk84;
|
||||
};
|
||||
|
||||
struct bss_80072E70 {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
u32 unk48;
|
||||
u32 unk4C;
|
||||
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
u32 unk58;
|
||||
u32 unk5C;
|
||||
|
||||
u32 unk60;
|
||||
u32 unk64;
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
u32 unk78;
|
||||
u32 unk7C;
|
||||
};
|
||||
|
||||
struct bss_80073370 {
|
||||
u32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
u32 unk48;
|
||||
u32 unk4C;
|
||||
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
u32 unk58;
|
||||
u32 unk5C;
|
||||
|
||||
u32 unk60;
|
||||
u32 unk64;
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
u32 unk78;
|
||||
u32 unk7C;
|
||||
|
||||
u32 unk80;
|
||||
};
|
||||
|
||||
struct bss_80073DC0 {
|
||||
u32 unk00;
|
||||
f32 unk04;
|
||||
f32 unk08;
|
||||
f32 unk0C;
|
||||
|
||||
f32 unk10;
|
||||
f32 unk14;
|
||||
f32 unk18;
|
||||
f32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
u32 unk48;
|
||||
u32 unk4C;
|
||||
|
||||
u32 unk50;
|
||||
u32 unk54;
|
||||
u32 unk58;
|
||||
u32 unk5C;
|
||||
|
||||
f32 unk60;
|
||||
u32 unk64;
|
||||
u32 unk68;
|
||||
u32 unk6C;
|
||||
|
||||
u32 unk70;
|
||||
u32 unk74;
|
||||
u32 unk78;
|
||||
u32 unk7C;
|
||||
|
||||
u32 unk80;
|
||||
u32 unk84;
|
||||
u32 unk88;
|
||||
f32 unk8C;
|
||||
|
||||
u32 unk90;
|
||||
f32 unk94;
|
||||
u32 unk98;
|
||||
u32 unk9C;
|
||||
|
||||
u32 unkA0;
|
||||
u32 unkA4;
|
||||
u32 unkA8;
|
||||
u32 unkAC;
|
||||
|
||||
u32 unkB0;
|
||||
u32 unkB4;
|
||||
u32 unkB8;
|
||||
u32 unkBC;
|
||||
|
||||
f32 unkC0;
|
||||
f32 unkC4;
|
||||
f32 unkC8;
|
||||
u32 unkCC;
|
||||
|
||||
u32 unkD0;
|
||||
u32 unkD4;
|
||||
u32 unkD8;
|
||||
u32 unkDC;
|
||||
|
||||
u32 unkE0;
|
||||
u32 unkE4;
|
||||
u32 unkE8;
|
||||
};
|
||||
|
||||
|
||||
struct bss_80075030 {
|
||||
s32 unk00;
|
||||
u32 unk04;
|
||||
u32 unk08;
|
||||
u32 unk0C;
|
||||
|
||||
u32 unk10;
|
||||
u32 unk14;
|
||||
u32 unk18;
|
||||
u32 unk1C;
|
||||
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
u32 unk28;
|
||||
u32 unk2C;
|
||||
|
||||
u32 unk30;
|
||||
u32 unk34;
|
||||
u32 unk38;
|
||||
u32 unk3C;
|
||||
|
||||
u32 unk40;
|
||||
u32 unk44;
|
||||
s16 propnums[16];
|
||||
};
|
||||
|
||||
extern struct SetupPtrs g_SetupPtrs;
|
||||
@@ -465,17 +232,20 @@ extern PropRecord *ptr_obj_pos_list_final_entry;
|
||||
extern s32 g_OnScreenPropCount;
|
||||
extern PropRecord ** g_LastOnScreenProp;
|
||||
extern PropRecord * g_OnScreenPropList[];
|
||||
extern s16 * ptr_room_lookup_buffer_maybe;
|
||||
extern struct unk_8007161c * dword_CODE_bss_8007161C;
|
||||
extern PropRecord * g_InteractProp;
|
||||
extern s16 * RoomPropListChunkIndexes;
|
||||
extern struct roomproplistchunk * RoomPropListChunks;
|
||||
extern sfxRecord sfx_related[];
|
||||
extern struct projectile_data ProjectileData_start_address[];
|
||||
extern struct bss_80072E70 dword_CODE_bss_80072E70[];
|
||||
extern struct bss_80073370 dword_CODE_bss_80073370[];
|
||||
extern struct bss_80073DC0 dword_CODE_bss_80073DC0[];
|
||||
extern struct bss_80075030 dword_CODE_bss_80075030[];
|
||||
extern struct WeaponObjRecord g_WeaponSlots[];
|
||||
extern struct HatRecord g_HatSlots[];
|
||||
extern struct AmmoCrateRecord g_AmmoCrates[];
|
||||
extern struct Projectile g_Projectiles[];
|
||||
extern struct Embedment g_Embedments[];
|
||||
extern struct coord3d flt_CODE_bss_80075B78;
|
||||
extern struct coord3d flt_CODE_bss_80075B88;
|
||||
|
||||
|
||||
extern struct object_animation_controller g_MonitorAnimController;
|
||||
extern MonitorRecord g_MonitorAnimController;
|
||||
extern struct object_animation_controller g_UnknownAnimController;
|
||||
extern struct object_animation_controller g_TaserAnimController;
|
||||
|
||||
@@ -487,12 +257,12 @@ void check_deactivate_gas_sound(void);
|
||||
void handle_mp_respawn_and_some_things(void);
|
||||
void determing_type_of_object_and_detection(void);
|
||||
void chraiUpdateOnscreenPropCount(void);
|
||||
void sub_GAME_7F03D78C(void);
|
||||
void chrpropUpdateAutoaimTarget(void);
|
||||
void chraiCheckUseHeldItems(void);
|
||||
s32 bond_interact_object(void);
|
||||
bool bond_interact_object(void);
|
||||
void sub_GAME_7F03D0D4(void);
|
||||
void chrpropRegisterRoom(PropRecord *, s16);
|
||||
PropRecord* chrpropAllocate();
|
||||
PropRecord* propAllocate();
|
||||
void chrpropDeregisterRooms(PropRecord *);
|
||||
void sub_GAME_7F03E27C(PropRecord *, coord3d *, coord3d *, f32);
|
||||
void chrpropRegisterRooms(PropRecord *posData);
|
||||
@@ -506,7 +276,7 @@ void chraiGetCollisionBounds(PropRecord *arg0, struct rect4f **arg1, s3
|
||||
void sub_GAME_7F03D058(PropRecord *prop, bool unset);
|
||||
void chraiGetCollisionBoundsWithoutY(PropRecord *arg0, struct rect4f **arg1, s32 *arg2);
|
||||
s32 chrpropTestPointInPolygon(coord3d *point, struct rect4f *polygon, s32 edges);
|
||||
void sub_GAME_7F03E3FC(s32 *roomids);
|
||||
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);
|
||||
@@ -521,11 +291,12 @@ ObjectRecord *sub_GAME_7F03FAB0(PadRecord *pad, 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);
|
||||
f32 chrpropSumMatrixPosX(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixNegX(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixPosY(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixNegY(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixPosZ(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixNegZ(struct modeldata_unk_pos* arg0, Mtxf *arg1);
|
||||
void sub_GAME_7F03F540(struct modeldata_unk_pos *arg0, Mtxf *arg1, s32* arg2, struct collision_data *arg3);
|
||||
f32 chrpropSumMatrixPosX(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixNegX(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1);
|
||||
f32 chrpropSumMatrixPosY(struct ModelRoData_BoundingBoxRecord *bbox, Mtxf *arg1);
|
||||
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);
|
||||
#endif
|
||||
|
||||
+296
-799
File diff suppressed because it is too large
Load Diff
+3
-3
@@ -47,14 +47,14 @@ Model * retrieve_header_for_body_and_head(s32 body, s32 head, u32 bitflags);
|
||||
|
||||
s32 get_current_random_body(void);
|
||||
|
||||
s32 select_psuedorandom_heads(s32 id);
|
||||
s32 bodyChooseHead(s32 id);
|
||||
|
||||
s32 get_random_head(s32 id);
|
||||
f32 chrGetDistanceToBond(ChrRecord *guardData);
|
||||
s32 chrCheckTargetInSight(ChrRecord *self);
|
||||
bool actor_fire_or_aim_at_target_update(ChrRecord *self, s32 newtargettype, s32 newtargetid);
|
||||
void chrlvAlertGuardToPlayerPosition(ChrRecord *);
|
||||
void chrlvIdleAnimationRelated7F023A94(ChrRecord *arg0, f32 duration);
|
||||
void chrlvIdleAnimationRelated7F023A94(ChrRecord *self, f32 mergetime);
|
||||
f32 chrGetAngleToBond(ChrRecord *arg0);
|
||||
s32 chrHasStoppedOrPatroling(ChrRecord *);
|
||||
s32 chrResolvePadId(ChrRecord *guardData,s32 padNo);
|
||||
@@ -80,7 +80,7 @@ bool if_actor_able_set_on_path(ChrRecord *self, s32 pathid);
|
||||
f32 chrlvGetSubrotySideback(ChrRecord *arg0);
|
||||
f32 chrlvGetAimLimitAngle(f32 arg0);
|
||||
void chrlvUpdateAimendbackShoulders(ChrRecord *arg0, void *arg1, s32 same, s32 swap, f32 next);
|
||||
void sub_GAME_7F02D118(ChrRecord *arg0, s32 hand, s32 arg2);
|
||||
void chrSetFiring(ChrRecord *arg0, s32 hand, s32 firing);
|
||||
s32 sub_GAME_7F02D630(ChrRecord *arg0, GUNHAND hand, coord3d *arg2);
|
||||
void chrlvTriggerFireWeapon(ChrRecord *arg0);
|
||||
s32 chrlvGeometryRelated7F02FC34(coord3d *arg0, coord3d *arg1, coord3d *arg2, f32 arg3);
|
||||
|
||||
@@ -568,5 +568,4 @@ extern struct ChrModelFileRecord c_item_entries[];
|
||||
extern struct ModelSkeleton SKELETON(guard);
|
||||
extern struct ModelSkeleton SKELETON(suit_lf_hand);
|
||||
|
||||
extern struct object_weapon blank_08_object_preset_1[];
|
||||
#endif
|
||||
|
||||
+6468
-11946
File diff suppressed because it is too large
Load Diff
+64
-26
@@ -6,10 +6,40 @@
|
||||
#include <bondtypes.h>
|
||||
#include <snd.h>
|
||||
|
||||
struct ShotData {
|
||||
// temporary definition for GE:
|
||||
/*0x00*/ s32 unk00[13];
|
||||
/*0x34*/ f32 unk34;
|
||||
|
||||
// the following is from PD, it seems to line up:
|
||||
/*0x00*/ //struct coord unk00;
|
||||
/*0x0c*/ //struct coord unk0c;
|
||||
/*0x18*/ //struct gset gset;
|
||||
/*0x1c*/ //struct coord gunpos;
|
||||
/*0x28*/ //struct coord dir;
|
||||
/*0x34*/ //f32 unk34;
|
||||
/*0x38*/ //s32 penetration;
|
||||
/*0x3c*/ //struct hit hits[10];
|
||||
};
|
||||
|
||||
struct HitThing {
|
||||
// the following is taken from PD
|
||||
// may need adjustments
|
||||
coord3d unk00;
|
||||
coord3d unk0c;
|
||||
Vertex *unk18;
|
||||
Vertex *unk1c;
|
||||
Vertex *unk20;
|
||||
Gfx *tricmd;
|
||||
s16 unk28;
|
||||
s16 texturenum;
|
||||
s16 unk2c;
|
||||
};
|
||||
|
||||
extern f32 F_80030B14;
|
||||
extern f32 F_80030B18;
|
||||
extern f32 F_80030B1C;
|
||||
extern f32 F_80030B20;
|
||||
extern f32 g_AutogunPendingDamageTick;
|
||||
extern f32 g_AutogunDamageScalar;
|
||||
extern f32 F_80030B24;
|
||||
extern f32 g_SoloAmmoMultiplier;
|
||||
|
||||
@@ -24,18 +54,18 @@ extern ALSoundState *ptr_gas_sound;
|
||||
extern s32 clock_drawn_flag;
|
||||
extern s32 clock_enable;
|
||||
extern f32 clock_time;
|
||||
extern s32 D_80030AF4;
|
||||
extern s32 D_80030AF8;
|
||||
extern s32 D_80030AFC;
|
||||
extern s32 g_RemoteMineOwnerTriggerFlag;
|
||||
extern s32 g_NextWeaponSlot;
|
||||
extern s32 g_NextHatSlot;
|
||||
extern ObjectRecord *g_LevelLoadPropSwitch;
|
||||
extern ObjectRecord *g_LevelLoadPropLockDoor;
|
||||
extern LockDoorRecord *g_LevelLoadPropLockDoor;
|
||||
extern ObjectRecord *g_LevelLoadPropSafeItem;
|
||||
extern s32 D_80030B0C;
|
||||
extern struct PropRecord *D_80030B0C;
|
||||
extern s32 bodypartshot;
|
||||
extern f32 F_80030B14;
|
||||
extern f32 F_80030B18;
|
||||
extern f32 F_80030B1C;
|
||||
extern f32 F_80030B20;
|
||||
extern f32 g_AutogunPendingDamageTick;
|
||||
extern f32 g_AutogunDamageScalar;
|
||||
extern f32 F_80030B24;
|
||||
extern f32 g_SoloAmmoMultiplier;
|
||||
|
||||
@@ -51,24 +81,24 @@ void chrobjApplySpeed(f32 *openPosition, f32 maxFrac, f32 *speed
|
||||
void chrobjCallsApplySpeed(f32 *openPosition, f32 maxFrac, f32 *speedPtr, f32 accel, f32 decel, f32 maxSpeed);
|
||||
Gfx *sub_GAME_7F049B58(Gfx *arg0);
|
||||
void set_color_shading_from_tile(PropRecord *, rgba_u8 *);
|
||||
void propobjSetDropped(PropRecord *, s32);
|
||||
void sub_GAME_7F053A10(ALSoundState *, coord3d *);
|
||||
void propobjSetDropped(PropRecord *prop, DROPTYPE droptype);
|
||||
void chrobjSndCreatePostEventDefault(ALSoundState *, coord3d *);
|
||||
void alarmActivate(void);
|
||||
void sub_GAME_7F052574(PropRecord *, s32);
|
||||
s32 sub_GAME_7F052604(PropRecord *);
|
||||
void weaponSetGunfireVisible(PropRecord *prop, s32 firing);
|
||||
s32 weaponIsGunfireVisible(PropRecord *);
|
||||
s32 sub_GAME_7F0539E4(coord3d *pos); //getVolume?
|
||||
ObjectRecord *create_new_item_instance_of_model(PROP propid, s32 arg1);
|
||||
void maybe_detonate_object(ObjectRecord *arg0, f32 arg1, coord3d *arg2, ITEM_IDS item, s32 arg4);
|
||||
void maybe_detonate_object(ObjectRecord *obj, f32 damage, coord3d *pos, ITEM_IDS item, s32 owner);
|
||||
void chrobjMaybeDetonateObjectIfFlags(ObjectRecord *arg0, f32 arg1, coord3d *arg2, ITEM_IDS item, s32 arg4);
|
||||
void sub_GAME_7F03FDA8(PropRecord *);
|
||||
void sub_GAME_7F03FE14(PropRecord *);
|
||||
void projectileSetSticky(PropRecord *);
|
||||
void chrobjCollisionRelated(ObjectRecord *);
|
||||
void sub_GAME_7F040754(ObjectRecord *, coord3d *, Mtxf *, StandTile *);
|
||||
void objChangeShading(ObjectRecord *, coord3d *, Mtxf *, StandTile *);
|
||||
s32 sub_GAME_7F041074(coord3d *arg0, coord3d *arg1, coord3d *arg2, f32 arg3);
|
||||
void sub_GAME_7F04F244(PropRecord *arg0, struct rect4f **arg1, s32 *arg2, f32 *arg3, f32 *arg4);
|
||||
void doorActivate(DoorRecord *door, DOORSTATE State);
|
||||
s32 sub_GAME_7F055A70(PropRecord *arg0, DoorRecord *arg1);
|
||||
void sub_GAME_7F055B78(PropRecord *arg0, DoorRecord *arg1);
|
||||
s32 posIsInFrontOfDoor(PropRecord *arg0, DoorRecord *arg1);
|
||||
void doorsChooseSwingDirection(PropRecord *arg0, DoorRecord *arg1);
|
||||
Gfx *chrobjRenderProp(PropRecord *arg0, Gfx *arg1, s32 arg2);
|
||||
|
||||
f32 chrobjFogVisRangeRelated(PropRecord *prop, f32 size);
|
||||
@@ -78,8 +108,8 @@ s32 sub_GAME_7F054A64(PropRecord *prop, bbox2d *bbox);
|
||||
void sub_GAME_7F040384(rgba_s32 *arg0, s32 arg1, rgba_f32 *arg2);
|
||||
void trigger_remote_mine_detonation(void);
|
||||
|
||||
void sub_GAME_7F04C044(PropRecord *prop);
|
||||
void sub_GAME_7F040CF0(PropRecord *);
|
||||
void objDetach(PropRecord *prop);
|
||||
void objFreeEmbedmentOrProjectile(PropRecord *);
|
||||
bool alarmIsActive();
|
||||
void init_trigger_toxic_gas_effect(coord3d *source);
|
||||
void chrSetWeaponFlag4(ChrRecord *chr, GUNHAND hand);
|
||||
@@ -95,19 +125,27 @@ 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);
|
||||
bool sub_GAME_7F051E1C(WeaponObjRecord *wep, ChrRecord *chr);
|
||||
bool chrEquipWeapon(WeaponObjRecord *wep, ChrRecord *chr);
|
||||
INV_ITEM_TYPE collect_or_interact_object(PropRecord *prop, bool showstring);
|
||||
INV_ITEM_TYPE propobjInteract(PropRecord *prop);
|
||||
s32 do_something_if_object_destroyed(ObjectRecord *obj);
|
||||
s32 objGetDestroyedLevel(ObjectRecord *obj);
|
||||
void doorActivateWrapper(PropRecord *prop);
|
||||
bool objIsHealthy(ObjectRecord *self);
|
||||
ObjectRecord *weaponFindThrown(s32 ID);
|
||||
bool check_if_toxic_gas_activated();
|
||||
PropRecord *chrTryEquipHat(ChrRecord *self, s32 index, s32 flags);
|
||||
void sub_GAME_7F04C044(PropRecord *prop);
|
||||
HatRecord *hatCreate(bool musthaveprop, bool musthavemodel, ModelFileHeader *modeldef);
|
||||
PropRecord* objInitWithAutoModel(ObjectRecord* obj);
|
||||
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 chrobjTestPointPolygonCollision(struct coord3d *arg0, f32 arg1, struct rect4f *arg2, s32 arg3);
|
||||
void sub_GAME_7F04DEFC(PropRecord *arg0, f32 arg1, struct coord3d *arg2, s32 arg3, s32 owner);
|
||||
struct modeldata_unk_pos * sub_GAME_7F040078(ObjectRecord *arg0);
|
||||
void maybe_detonate_object_and_its_children(PropRecord *arg0, f32 arg1, struct coord3d *arg2, s32 arg3, s32 owner);
|
||||
struct ModelRoData_BoundingBoxRecord* chrobjGetBboxFromObjectRecord(ObjectRecord *arg0);
|
||||
void deactivate_alarm_sound_effect(void);
|
||||
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);
|
||||
|
||||
#endif
|
||||
|
||||
+660
-915
File diff suppressed because it is too large
Load Diff
+9
-121
@@ -2,137 +2,25 @@
|
||||
#include <PR/libaudio.h>
|
||||
#include "game/player.h"
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// Address 0x7F007980 NTSC.
|
||||
// Address 0x7F007900 PAL.
|
||||
void cleanupplayersoundrelated(void)
|
||||
{
|
||||
int i;
|
||||
int j=0;
|
||||
int j;
|
||||
|
||||
for(i=0; i < getPlayerCount(); i++)
|
||||
for (i = 0; i < getPlayerCount(); i++)
|
||||
{
|
||||
for(;j<2;j++)
|
||||
for (j = 0; j < 2; j++)
|
||||
{
|
||||
if((&g_playerPointers[i]->hands[j])->field_A44 && sndGetPlayingState((&g_playerPointers[i]->hands[j])->field_A44))
|
||||
struct hand *hand = &g_playerPointers[i]->hands[j];
|
||||
|
||||
if (hand->audioHandle != NULL && sndGetPlayingState(hand->audioHandle))
|
||||
{
|
||||
sndDeactivate((&g_playerPointers[i]->hands[j])->field_A44);
|
||||
sndDeactivate(hand->audioHandle);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel cleanupplayersoundrelated
|
||||
/* 03C4B0 7F007980 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 03C4B4 7F007984 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 03C4B8 7F007988 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 03C4BC 7F00798C AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 03C4C0 7F007990 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 03C4C4 7F007994 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 03C4C8 7F007998 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 03C4CC 7F00799C 0FC26919 */ jal getPlayerCount
|
||||
/* 03C4D0 7F0079A0 0000A025 */ move $s4, $zero
|
||||
/* 03C4D4 7F0079A4 1840001B */ blez $v0, .L7F007A14
|
||||
/* 03C4D8 7F0079A8 00147080 */ sll $t6, $s4, 2
|
||||
/* 03C4DC 7F0079AC 3C0F8008 */ lui $t7, %hi(g_playerPointers)
|
||||
/* 03C4E0 7F0079B0 25EF9EE0 */ addiu $t7, %lo(g_playerPointers) # addiu $t7, $t7, -0x6120
|
||||
/* 03C4E4 7F0079B4 01CF9021 */ addu $s2, $t6, $t7
|
||||
/* 03C4E8 7F0079B8 24130750 */ li $s3, 1872
|
||||
/* 03C4EC 7F0079BC 00008825 */ move $s1, $zero
|
||||
.L7F0079C0:
|
||||
/* 03C4F0 7F0079C0 8E580000 */ lw $t8, ($s2)
|
||||
.L7F0079C4:
|
||||
/* 03C4F4 7F0079C4 03118021 */ addu $s0, $t8, $s1
|
||||
/* 03C4F8 7F0079C8 8E040A44 */ lw $a0, 0xa44($s0)
|
||||
/* 03C4FC 7F0079CC 26100870 */ addiu $s0, $s0, 0x870
|
||||
/* 03C500 7F0079D0 50800008 */ beql $a0, $zero, .L7F0079F4
|
||||
/* 03C504 7F0079D4 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
/* 03C508 7F0079D8 0C00237C */ jal sndGetPlayingState
|
||||
/* 03C50C 7F0079DC 00000000 */ nop
|
||||
/* 03C510 7F0079E0 50400004 */ beql $v0, $zero, .L7F0079F4
|
||||
/* 03C514 7F0079E4 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
/* 03C518 7F0079E8 0C002408 */ jal sndDeactivate
|
||||
/* 03C51C 7F0079EC 8E0401D4 */ lw $a0, 0x1d4($s0)
|
||||
/* 03C520 7F0079F0 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
.L7F0079F4:
|
||||
/* 03C524 7F0079F4 5633FFF3 */ bnel $s1, $s3, .L7F0079C4
|
||||
/* 03C528 7F0079F8 8E580000 */ lw $t8, ($s2)
|
||||
/* 03C52C 7F0079FC 26940001 */ addiu $s4, $s4, 1
|
||||
/* 03C530 7F007A00 0FC26919 */ jal getPlayerCount
|
||||
/* 03C534 7F007A04 26520004 */ addiu $s2, $s2, 4
|
||||
/* 03C538 7F007A08 0282082A */ slt $at, $s4, $v0
|
||||
/* 03C53C 7F007A0C 5420FFEC */ bnezl $at, .L7F0079C0
|
||||
/* 03C540 7F007A10 00008825 */ move $s1, $zero
|
||||
.L7F007A14:
|
||||
/* 03C544 7F007A14 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 03C548 7F007A18 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 03C54C 7F007A1C 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 03C550 7F007A20 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 03C554 7F007A24 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 03C558 7F007A28 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 03C55C 7F007A2C 03E00008 */ jr $ra
|
||||
/* 03C560 7F007A30 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
)
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel cleanupplayersoundrelated
|
||||
/* 03A2F0 7F007900 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 03A2F4 7F007904 AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 03A2F8 7F007908 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 03A2FC 7F00790C AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 03A300 7F007910 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 03A304 7F007914 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 03A308 7F007918 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 03A30C 7F00791C 0FC26669 */ jal getPlayerCount
|
||||
/* 03A310 7F007920 0000A025 */ move $s4, $zero
|
||||
/* 03A314 7F007924 1840001B */ blez $v0, .L7F007994
|
||||
/* 03A318 7F007928 00147080 */ sll $t6, $s4, 2
|
||||
/* 03A31C 7F00792C 3C0F8007 */ lui $t7, %hi(g_playerPointers) # $t7, 0x8007
|
||||
/* 03A320 7F007930 25EF89F0 */ addiu $t7, %lo(g_playerPointers) # addiu $t7, $t7, -0x7610
|
||||
/* 03A324 7F007934 01CF9021 */ addu $s2, $t6, $t7
|
||||
/* 03A328 7F007938 24130750 */ li $s3, 1872
|
||||
/* 03A32C 7F00793C 00008825 */ move $s1, $zero
|
||||
.L7F007940:
|
||||
/* 03A330 7F007940 8E580000 */ lw $t8, ($s2)
|
||||
.L7F007944:
|
||||
/* 03A334 7F007944 03118021 */ addu $s0, $t8, $s1
|
||||
/* 03A338 7F007948 8E040A3C */ lw $a0, 0xa3c($s0)
|
||||
/* 03A33C 7F00794C 26100868 */ addiu $s0, $s0, 0x868
|
||||
/* 03A340 7F007950 50800008 */ beql $a0, $zero, .L7F007974
|
||||
/* 03A344 7F007954 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
/* 03A348 7F007958 0C002094 */ jal sndGetPlayingState
|
||||
/* 03A34C 7F00795C 00000000 */ nop
|
||||
/* 03A350 7F007960 50400004 */ beql $v0, $zero, .L7F007974
|
||||
/* 03A354 7F007964 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
/* 03A358 7F007968 0C002120 */ jal sndDeactivate
|
||||
/* 03A35C 7F00796C 8E0401D4 */ lw $a0, 0x1d4($s0)
|
||||
/* 03A360 7F007970 263103A8 */ addiu $s1, $s1, 0x3a8
|
||||
.L7F007974:
|
||||
/* 03A364 7F007974 5633FFF3 */ bnel $s1, $s3, .L7F007944
|
||||
/* 03A368 7F007978 8E580000 */ lw $t8, ($s2)
|
||||
/* 03A36C 7F00797C 26940001 */ addiu $s4, $s4, 1
|
||||
/* 03A370 7F007980 0FC26669 */ jal getPlayerCount
|
||||
/* 03A374 7F007984 26520004 */ addiu $s2, $s2, 4
|
||||
/* 03A378 7F007988 0282082A */ slt $at, $s4, $v0
|
||||
/* 03A37C 7F00798C 5420FFEC */ bnezl $at, .L7F007940
|
||||
/* 03A380 7F007990 00008825 */ move $s1, $zero
|
||||
.L7F007994:
|
||||
/* 03A384 7F007994 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 03A388 7F007998 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 03A38C 7F00799C 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 03A390 7F0079A0 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 03A394 7F0079A4 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 03A398 7F0079A8 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 03A39C 7F0079AC 03E00008 */ jr $ra
|
||||
/* 03A3A0 7F0079B0 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
#include "bondview.h"
|
||||
|
||||
void cleanupSFXRelated(void) {
|
||||
if (SFX_80036458[0] != 0)
|
||||
if (g_TankSfxState[0] != 0)
|
||||
{
|
||||
if (sndGetPlayingState(SFX_80036458[0]) != AL_STOPPED)
|
||||
if (sndGetPlayingState(g_TankSfxState[0]) != AL_STOPPED)
|
||||
{
|
||||
sndDeactivate(SFX_80036458[0]);
|
||||
sndDeactivate(g_TankSfxState[0]);
|
||||
}
|
||||
}
|
||||
|
||||
if (SFX_80036458[1] != 0)
|
||||
if (g_TankSfxState[1] != 0)
|
||||
{
|
||||
if (sndGetPlayingState(SFX_80036458[1]) != AL_STOPPED)
|
||||
if (sndGetPlayingState(g_TankSfxState[1]) != AL_STOPPED)
|
||||
{
|
||||
sndDeactivate(SFX_80036458[1]);
|
||||
sndDeactivate(g_TankSfxState[1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,23 +12,23 @@ void cleanupGuardData(void) {
|
||||
s32 phi_v1;
|
||||
|
||||
// Node 0
|
||||
if (num_guards > 0)
|
||||
if (g_NumChrSlots > 0)
|
||||
{
|
||||
// Node 1
|
||||
phi_s0 = 0;
|
||||
phi_s2 = 0;
|
||||
phi_v1 = num_guards;
|
||||
phi_v1 = g_NumChrSlots;
|
||||
loop_2:
|
||||
// Node 2
|
||||
temp_v0 = (ptr_guard_data + phi_s0);
|
||||
temp_v0 = (g_ChrSlots + phi_s0);
|
||||
if (temp_v0->unk1C != 0)
|
||||
{
|
||||
// Node 3
|
||||
disable_sounds_attached_to_player_then_something(temp_v0->unk18);
|
||||
chrpropDelist((ptr_guard_data + phi_s0)->unk18);
|
||||
chrpropDisable((ptr_guard_data + phi_s0)->unk18);
|
||||
chrpropFree((ptr_guard_data + phi_s0)->unk18);
|
||||
phi_v1 = num_guards;
|
||||
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);
|
||||
@@ -47,8 +47,8 @@ loop_2:
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel cleanupGuardData
|
||||
/* 03BEE0 7F0073B0 3C038003 */ lui $v1, %hi(num_guards)
|
||||
/* 03BEE4 7F0073B4 8C63CC68 */ lw $v1, %lo(num_guards)($v1)
|
||||
/* 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)
|
||||
@@ -56,8 +56,8 @@ glabel cleanupGuardData
|
||||
/* 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(ptr_guard_data)
|
||||
/* 03BF08 7F0073D8 2631CC64 */ addiu $s1, %lo(ptr_guard_data) # addiu $s1, $s1, -0x339c
|
||||
/* 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)
|
||||
@@ -79,8 +79,8 @@ glabel cleanupGuardData
|
||||
/* 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(num_guards)
|
||||
/* 03BF60 7F007430 8C63CC68 */ lw $v1, %lo(num_guards)($v1)
|
||||
/* 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
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "aicommands2.h"
|
||||
#include "dyn.h"
|
||||
#include "memp.h"
|
||||
#include <macro.h>
|
||||
|
||||
//i belong in a header, probably to another file
|
||||
|
||||
|
||||
+40
-171
@@ -181,234 +181,103 @@ void gotoBelowDebugOption(void)
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
void gotoRightDebugOption(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[0]) {
|
||||
if (g_DMenuNumGroups >= 2) {
|
||||
g_DMenuSelectedOption += g_DMenuCurOffsets[0];
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[0])
|
||||
{
|
||||
g_DMenuSelectedOption += g_DMenuCurOffsets[0];
|
||||
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[1]) {
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[1] - 1;
|
||||
}
|
||||
}
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[1])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[1] - 1;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
for (i = 0; i < g_DMenuNumGroups; i++) {
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[i]) {
|
||||
for (i = 0; i < g_DMenuNumGroups; i++)
|
||||
{
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[i])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuSelectedOption + g_DMenuCurOffsets[i] - g_DMenuCurOffsets[i - 1];
|
||||
|
||||
if (g_DMenuCurOffsets[i + 1] < 0) {
|
||||
if (g_DMenuCurOffsets[i + 1] < 0)
|
||||
{
|
||||
g_DMenuSelectedOption -= g_DMenuCurOffsets[i];
|
||||
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[0]) {
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[0])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[0] - 1;
|
||||
}
|
||||
} else {
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i + 1]) {
|
||||
}
|
||||
else
|
||||
{
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i + 1])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[i + 1] - 1;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel gotoRightDebugOption
|
||||
/* 0C4DF0 7F0902C0 3C038003 */ lui $v1, %hi(g_DMenuCurOffsets)
|
||||
/* 0C4DF4 7F0902C4 8C636B84 */ lw $v1, %lo(g_DMenuCurOffsets)($v1)
|
||||
/* 0C4DF8 7F0902C8 3C088003 */ lui $t0, %hi(g_DMenuSelectedOption)
|
||||
/* 0C4DFC 7F0902CC 25086B70 */ addiu $t0, %lo(g_DMenuSelectedOption) # addiu $t0, $t0, 0x6b70
|
||||
/* 0C4E00 7F0902D0 8D020000 */ lw $v0, ($t0)
|
||||
/* 0C4E04 7F0902D4 8C640000 */ lw $a0, ($v1)
|
||||
/* 0C4E08 7F0902D8 3C058003 */ lui $a1, %hi(g_DMenuNumGroups )
|
||||
/* 0C4E0C 7F0902DC 0044082A */ slt $at, $v0, $a0
|
||||
/* 0C4E10 7F0902E0 10200008 */ beqz $at, .L7F090304
|
||||
/* 0C4E14 7F0902E4 00447021 */ addu $t6, $v0, $a0
|
||||
/* 0C4E18 7F0902E8 AD0E0000 */ sw $t6, ($t0)
|
||||
/* 0C4E1C 7F0902EC 8C650004 */ lw $a1, 4($v1)
|
||||
/* 0C4E20 7F0902F0 01C5082A */ slt $at, $t6, $a1
|
||||
/* 0C4E24 7F0902F4 14200027 */ bnez $at, .L7F090394
|
||||
/* 0C4E28 7F0902F8 24B8FFFF */ addiu $t8, $a1, -1
|
||||
/* 0C4E2C 7F0902FC 03E00008 */ jr $ra
|
||||
/* 0C4E30 7F090300 AD180000 */ sw $t8, ($t0)
|
||||
|
||||
.L7F090304:
|
||||
/* 0C4E34 7F090304 8CA56B80 */ lw $a1, %lo(g_DMenuNumGroups )($a1)
|
||||
/* 0C4E38 7F090308 00002025 */ move $a0, $zero
|
||||
/* 0C4E3C 7F09030C 00603025 */ move $a2, $v1
|
||||
/* 0C4E40 7F090310 18A00020 */ blez $a1, .L7F090394
|
||||
/* 0C4E44 7F090314 00000000 */ nop
|
||||
.L7F090318:
|
||||
/* 0C4E48 7F090318 8CC70000 */ lw $a3, ($a2)
|
||||
/* 0C4E4C 7F09031C 24840001 */ addiu $a0, $a0, 1
|
||||
/* 0C4E50 7F090320 0047082A */ slt $at, $v0, $a3
|
||||
/* 0C4E54 7F090324 50200019 */ beql $at, $zero, .L7F09038C
|
||||
/* 0C4E58 7F090328 0085082A */ slt $at, $a0, $a1
|
||||
/* 0C4E5C 7F09032C 8CC9FFFC */ lw $t1, -4($a2)
|
||||
/* 0C4E60 7F090330 0047C821 */ addu $t9, $v0, $a3
|
||||
/* 0C4E64 7F090334 03295023 */ subu $t2, $t9, $t1
|
||||
/* 0C4E68 7F090338 AD0A0000 */ sw $t2, ($t0)
|
||||
/* 0C4E6C 7F09033C 8CC40004 */ lw $a0, 4($a2)
|
||||
/* 0C4E70 7F090340 0483000B */ bgezl $a0, .L7F090370
|
||||
/* 0C4E74 7F090344 8D180000 */ lw $t8, ($t0)
|
||||
/* 0C4E78 7F090348 8CCC0000 */ lw $t4, ($a2)
|
||||
/* 0C4E7C 7F09034C 014C6823 */ subu $t5, $t2, $t4
|
||||
/* 0C4E80 7F090350 AD0D0000 */ sw $t5, ($t0)
|
||||
/* 0C4E84 7F090354 8C640000 */ lw $a0, ($v1)
|
||||
/* 0C4E88 7F090358 01A4082A */ slt $at, $t5, $a0
|
||||
/* 0C4E8C 7F09035C 1420000D */ bnez $at, .L7F090394
|
||||
/* 0C4E90 7F090360 248FFFFF */ addiu $t7, $a0, -1
|
||||
/* 0C4E94 7F090364 03E00008 */ jr $ra
|
||||
/* 0C4E98 7F090368 AD0F0000 */ sw $t7, ($t0)
|
||||
|
||||
/* 0C4E9C 7F09036C 8D180000 */ lw $t8, ($t0)
|
||||
.L7F090370:
|
||||
/* 0C4EA0 7F090370 2499FFFF */ addiu $t9, $a0, -1
|
||||
/* 0C4EA4 7F090374 0304082A */ slt $at, $t8, $a0
|
||||
/* 0C4EA8 7F090378 14200006 */ bnez $at, .L7F090394
|
||||
/* 0C4EAC 7F09037C 00000000 */ nop
|
||||
/* 0C4EB0 7F090380 03E00008 */ jr $ra
|
||||
/* 0C4EB4 7F090384 AD190000 */ sw $t9, ($t0)
|
||||
|
||||
/* 0C4EB8 7F090388 0085082A */ slt $at, $a0, $a1
|
||||
.L7F09038C:
|
||||
/* 0C4EBC 7F09038C 1420FFE2 */ bnez $at, .L7F090318
|
||||
/* 0C4EC0 7F090390 24C60004 */ addiu $a2, $a2, 4
|
||||
.L7F090394:
|
||||
/* 0C4EC4 7F090394 03E00008 */ jr $ra
|
||||
/* 0C4EC8 7F090398 00000000 */ nop
|
||||
)
|
||||
#else
|
||||
void gotoRightDebugOption(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
void gotoLeftDebugOption(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
// First group
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[0]) {
|
||||
if (g_DMenuSelectedOption < g_DMenuCurOffsets[0])
|
||||
{
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < g_DMenuNumGroups - 1; i++);
|
||||
for (i = 0; i < g_DMenuNumGroups - 1; i++)
|
||||
{}
|
||||
|
||||
if (i > 0) {
|
||||
g_DMenuSelectedOption += g_DMenuCurOffsets[i - 1];
|
||||
g_DMenuSelectedOption += g_DMenuCurOffsets[i - 1];
|
||||
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i]) {
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[i] - 1;
|
||||
}
|
||||
}
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[i] - 1;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Any other group
|
||||
for (i = 0; g_DMenuSelectedOption >= g_DMenuCurOffsets[i]; i++);
|
||||
for (i = 0; g_DMenuSelectedOption >= g_DMenuCurOffsets[i]; i++)
|
||||
{}
|
||||
|
||||
g_DMenuSelectedOption -= g_DMenuCurOffsets[i - 1];
|
||||
|
||||
if (i - 2 >= 0) {
|
||||
if (i - 2 >= 0)
|
||||
{
|
||||
g_DMenuSelectedOption += g_DMenuCurOffsets[i - 2];
|
||||
}
|
||||
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i - 1]) {
|
||||
if (g_DMenuSelectedOption >= g_DMenuCurOffsets[i - 1])
|
||||
{
|
||||
g_DMenuSelectedOption = g_DMenuCurOffsets[i - 1] - 1;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel gotoLeftDebugOption
|
||||
/* 0C4ECC 7F09039C 3C038003 */ lui $v1, %hi(g_DMenuCurOffsets)
|
||||
/* 0C4ED0 7F0903A0 8C636B84 */ lw $v1, %lo(g_DMenuCurOffsets)($v1)
|
||||
/* 0C4ED4 7F0903A4 3C078003 */ lui $a3, %hi(g_DMenuSelectedOption)
|
||||
/* 0C4ED8 7F0903A8 24E76B70 */ addiu $a3, %lo(g_DMenuSelectedOption) # addiu $a3, $a3, 0x6b70
|
||||
/* 0C4EDC 7F0903AC 8CE20000 */ lw $v0, ($a3)
|
||||
/* 0C4EE0 7F0903B0 8C640000 */ lw $a0, ($v1)
|
||||
/* 0C4EE4 7F0903B4 3C058003 */ lui $a1, %hi(g_DMenuNumGroups )
|
||||
/* 0C4EE8 7F0903B8 0044082A */ slt $at, $v0, $a0
|
||||
/* 0C4EEC 7F0903BC 50200016 */ beql $at, $zero, .L7F090418
|
||||
/* 0C4EF0 7F0903C0 0044082A */ slt $at, $v0, $a0
|
||||
/* 0C4EF4 7F0903C4 8CA56B80 */ lw $a1, %lo(g_DMenuNumGroups )($a1)
|
||||
/* 0C4EF8 7F0903C8 00002025 */ move $a0, $zero
|
||||
/* 0C4EFC 7F0903CC 24A5FFFF */ addiu $a1, $a1, -1
|
||||
/* 0C4F00 7F0903D0 58A00006 */ blezl $a1, .L7F0903EC
|
||||
/* 0C4F04 7F0903D4 00047080 */ sll $t6, $a0, 2
|
||||
/* 0C4F08 7F0903D8 24840001 */ addiu $a0, $a0, 1
|
||||
.L7F0903DC:
|
||||
/* 0C4F0C 7F0903DC 0085082A */ slt $at, $a0, $a1
|
||||
/* 0C4F10 7F0903E0 5420FFFE */ bnezl $at, .L7F0903DC
|
||||
/* 0C4F14 7F0903E4 24840001 */ addiu $a0, $a0, 1
|
||||
/* 0C4F18 7F0903E8 00047080 */ sll $t6, $a0, 2
|
||||
.L7F0903EC:
|
||||
/* 0C4F1C 7F0903EC 006E2821 */ addu $a1, $v1, $t6
|
||||
/* 0C4F20 7F0903F0 8CAFFFFC */ lw $t7, -4($a1)
|
||||
/* 0C4F24 7F0903F4 004FC021 */ addu $t8, $v0, $t7
|
||||
/* 0C4F28 7F0903F8 ACF80000 */ sw $t8, ($a3)
|
||||
/* 0C4F2C 7F0903FC 8CA60000 */ lw $a2, ($a1)
|
||||
/* 0C4F30 7F090400 0306082A */ slt $at, $t8, $a2
|
||||
/* 0C4F34 7F090404 1420001E */ bnez $at, .L7F090480
|
||||
/* 0C4F38 7F090408 24C8FFFF */ addiu $t0, $a2, -1
|
||||
/* 0C4F3C 7F09040C 03E00008 */ jr $ra
|
||||
/* 0C4F40 7F090410 ACE80000 */ sw $t0, ($a3)
|
||||
|
||||
/* 0C4F44 7F090414 0044082A */ slt $at, $v0, $a0
|
||||
.L7F090418:
|
||||
/* 0C4F48 7F090418 14200008 */ bnez $at, .L7F09043C
|
||||
/* 0C4F4C 7F09041C 00002825 */ move $a1, $zero
|
||||
/* 0C4F50 7F090420 00602025 */ move $a0, $v1
|
||||
/* 0C4F54 7F090424 8C890004 */ lw $t1, 4($a0)
|
||||
.L7F090428:
|
||||
/* 0C4F58 7F090428 24A50001 */ addiu $a1, $a1, 1
|
||||
/* 0C4F5C 7F09042C 24840004 */ addiu $a0, $a0, 4
|
||||
/* 0C4F60 7F090430 0049082A */ slt $at, $v0, $t1
|
||||
/* 0C4F64 7F090434 5020FFFC */ beql $at, $zero, .L7F090428
|
||||
/* 0C4F68 7F090438 8C890004 */ lw $t1, 4($a0)
|
||||
.L7F09043C:
|
||||
/* 0C4F6C 7F09043C 00055080 */ sll $t2, $a1, 2
|
||||
/* 0C4F70 7F090440 006A2021 */ addu $a0, $v1, $t2
|
||||
/* 0C4F74 7F090444 8C8BFFFC */ lw $t3, -4($a0)
|
||||
/* 0C4F78 7F090448 24ADFFFE */ addiu $t5, $a1, -2
|
||||
/* 0C4F7C 7F09044C 004B6023 */ subu $t4, $v0, $t3
|
||||
/* 0C4F80 7F090450 05A00004 */ bltz $t5, .L7F090464
|
||||
/* 0C4F84 7F090454 ACEC0000 */ sw $t4, ($a3)
|
||||
/* 0C4F88 7F090458 8C8FFFF8 */ lw $t7, -8($a0)
|
||||
/* 0C4F8C 7F09045C 018FC021 */ addu $t8, $t4, $t7
|
||||
/* 0C4F90 7F090460 ACF80000 */ sw $t8, ($a3)
|
||||
.L7F090464:
|
||||
/* 0C4F94 7F090464 8C82FFFC */ lw $v0, -4($a0)
|
||||
/* 0C4F98 7F090468 8CF90000 */ lw $t9, ($a3)
|
||||
/* 0C4F9C 7F09046C 2448FFFF */ addiu $t0, $v0, -1
|
||||
/* 0C4FA0 7F090470 0322082A */ slt $at, $t9, $v0
|
||||
/* 0C4FA4 7F090474 14200002 */ bnez $at, .L7F090480
|
||||
/* 0C4FA8 7F090478 00000000 */ nop
|
||||
/* 0C4FAC 7F09047C ACE80000 */ sw $t0, ($a3)
|
||||
.L7F090480:
|
||||
/* 0C4FB0 7F090480 03E00008 */ jr $ra
|
||||
/* 0C4FB4 7F090484 00000000 */ nop
|
||||
)
|
||||
#else
|
||||
void gotoLeftDebugOption(void)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
+239
-903
File diff suppressed because it is too large
Load Diff
@@ -31,7 +31,7 @@ s32 get_debug_joy2skyedit_flag(void);
|
||||
s32 get_debug_joy2hitsedit_flag(void);
|
||||
s32 get_debug_joy2detailedit_flag(void);
|
||||
s32 get_debug_explosioninfo_flag(void);
|
||||
s32 get_debug_prroomloads_flag(void);
|
||||
s32 debugIsRoomStateDebugEnabled(void);
|
||||
s32 get_debug_VisCVG_flag(void);
|
||||
void set_debug_VisCVG_flag(s32 flag);
|
||||
s32 get_debug_007_unlock_flag(void);
|
||||
|
||||
+56
-12
@@ -13,27 +13,71 @@ const u8 rz_header_bytes[40] = {
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
//
|
||||
u32 decompressdata(u8 *src, u8 *dst, struct huft *hlist)
|
||||
{
|
||||
rz_inbuf = src;
|
||||
rz_outbuf = dst;
|
||||
rz_hlist = hlist;
|
||||
if ((src[0] != rz_header_bytes[0]) || (src[1] != rz_header_bytes[5]))
|
||||
// https://decomp.me/scratch/IRSKp 96%
|
||||
|
||||
struct aaa {
|
||||
u8 unk00;
|
||||
u8 unk01;
|
||||
u8 unk02;
|
||||
u8 unk03;
|
||||
u8 unk04;
|
||||
u8 unk05;
|
||||
u8 unk06;
|
||||
u8 unk07;
|
||||
u8 unk08;
|
||||
u8 unk09;
|
||||
u8 unk0A;
|
||||
u8 unk0B;
|
||||
s32 unk0C;
|
||||
s32 unk10;
|
||||
s32 unk14;
|
||||
u8 unk18;
|
||||
};
|
||||
|
||||
u32 decompressdata(u8 *arg0, u8 *arg1, struct huft *arg2)
|
||||
{
|
||||
s32 unused = 0;
|
||||
struct aaa *p = &rz_header_bytes;
|
||||
|
||||
rz_inbuf = arg0;
|
||||
rz_outbuf = arg1;
|
||||
rz_hlist = arg2;
|
||||
|
||||
//if(1);
|
||||
|
||||
//if ((arg0[0] != rz_header_bytes[0]) || (arg0[1] != rz_header_bytes[5]))
|
||||
if ((arg0[0] != p->unk00) || (arg0[1] != p->unk05))
|
||||
{
|
||||
if (src[1] != rz_header_bytes[8])
|
||||
u8 a0m1;// = arg0[-1];
|
||||
u8 a0m2;// = arg0[-2];
|
||||
|
||||
//if(arg0[-1]);
|
||||
a0m1 = arg0[-1];
|
||||
|
||||
//if (arg0[-1] == rz_header_bytes[8])
|
||||
if (a0m1 == p->unk08)
|
||||
{
|
||||
|
||||
unused = 2;
|
||||
}
|
||||
if (src[2] != rz_header_bytes[0x18])
|
||||
{
|
||||
|
||||
//if(arg0[-2]);
|
||||
a0m2 = arg0[-2];
|
||||
|
||||
//if (arg0[-2] == rz_header_bytes[24])
|
||||
if (a0m2 == p->unk18)
|
||||
{
|
||||
unused = 1;
|
||||
}
|
||||
}
|
||||
rz_inbuf = (s32) (rz_inbuf + 2);
|
||||
|
||||
if (unused);
|
||||
|
||||
rz_inbuf += 2;
|
||||
rz_wp = 0;
|
||||
rz_inptr = 0;
|
||||
|
||||
zlib_inflate();
|
||||
|
||||
return rz_wp;
|
||||
}
|
||||
#else
|
||||
|
||||
+19
-32
@@ -3,6 +3,7 @@
|
||||
#include <token.h>
|
||||
#include <str.h>
|
||||
#include <memp.h>
|
||||
#include <macro.h>
|
||||
|
||||
/**
|
||||
* This file handles memory usage for graphics related tasks.
|
||||
@@ -40,7 +41,7 @@ char membars_string1[] = ">>>>>>>>>>>>>>>>>>>>>>>>>";
|
||||
char membars_string2[] = "=========================";
|
||||
char membars_string3[] = "-------------------------";
|
||||
|
||||
void dynInitDebugNoticeList(void) {
|
||||
void dynInit(void) {
|
||||
debTryAdd(&D_800482E0, "dyn_c_debug");
|
||||
}
|
||||
|
||||
@@ -118,40 +119,26 @@ s32 dynGetFreeVtx(void) {
|
||||
return g_VtxBuffers[g_GfxActiveBufferIndex + 1] - g_GfxMemPos;
|
||||
}
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// $f2 is used for 0.0f instead of $f0
|
||||
f32 dynCalculateMembarLength(const char* arg0, f32 arg1, f32 arg2) {
|
||||
strlen(arg0);
|
||||
// Address 0x7F0BD7CC NTSC
|
||||
void dynCalculateMembarLength(const char* arg0, f32 arg1, f32 arg2)
|
||||
{
|
||||
s32 len;
|
||||
f32 zero = 0;
|
||||
|
||||
len = strlen(arg0);
|
||||
|
||||
arg1 /= arg2;
|
||||
if (arg1 < 0.0f) {
|
||||
return 0.0f;
|
||||
|
||||
if(zero);
|
||||
|
||||
if (arg1 < zero && len > 1)
|
||||
{
|
||||
if (len > 1)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
f32 dynCalculateMembarLength(const char* arg0, f32 arg1, f32 arg2);
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel dynCalculateMembarLength
|
||||
/* 0F22FC 7F0BD7CC 44856000 */ mtc1 $a1, $f12
|
||||
/* 0F2300 7F0BD7D0 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 0F2304 7F0BD7D4 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0F2308 7F0BD7D8 AFA60020 */ sw $a2, 0x20($sp)
|
||||
/* 0F230C 7F0BD7DC 0C004E1F */ jal strlen
|
||||
/* 0F2310 7F0BD7E0 E7AC001C */ swc1 $f12, 0x1c($sp)
|
||||
/* 0F2314 7F0BD7E4 C7AC001C */ lwc1 $f12, 0x1c($sp)
|
||||
/* 0F2318 7F0BD7E8 C7A40020 */ lwc1 $f4, 0x20($sp)
|
||||
/* 0F231C 7F0BD7EC 44800000 */ mtc1 $zero, $f0
|
||||
/* 0F2320 7F0BD7F0 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0F2324 7F0BD7F4 46046303 */ div.s $f12, $f12, $f4
|
||||
/* 0F2328 7F0BD7F8 4600603C */ c.lt.s $f12, $f0
|
||||
/* 0F232C 7F0BD7FC 00000000 */ nop
|
||||
/* 0F2330 7F0BD800 45000001 */ bc1f .L7F0BD808
|
||||
/* 0F2334 7F0BD804 00000000 */ nop
|
||||
.L7F0BD808:
|
||||
/* 0F2338 7F0BD808 03E00008 */ jr $ra
|
||||
/* 0F233C 7F0BD80C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
)
|
||||
#endif
|
||||
|
||||
void dynDrawMembars(Gfx *gdl) {
|
||||
dynCalculateMembarLength(membars_string2, ((Gfx*)g_GfxBuffers[g_GfxActiveBufferIndex + 1] - gdl), ((Gfx*)g_GfxBuffers[g_GfxActiveBufferIndex + 1] - (Gfx*)g_GfxBuffers[g_GfxActiveBufferIndex]));
|
||||
|
||||
+1
-6
@@ -3,12 +3,7 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
|
||||
/*
|
||||
* Align to 16 bit boundary. Version "a", with preliminary addition.
|
||||
*/
|
||||
#define ALIGN16_a(val) (((val) + 0xf | 0xf) ^ 0xf)
|
||||
|
||||
void dynInitDebugNoticeList(void);
|
||||
void dynInit(void);
|
||||
void dynInitMemory(void);
|
||||
Gfx *dynGetMasterDisplayList(void);
|
||||
s32 dynGetFreeGfx2(Gfx *gdl);
|
||||
|
||||
+29
-27
@@ -59,18 +59,18 @@ f32 D_80040178 = 1.0;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
s_smoketype array_smoke_types[] = {
|
||||
// dur, appr, dis, size, bgrate, r, g, b, fgrate, propclouds
|
||||
{ 0x0001, 0x0032, 0x0063, 0x0000, 0.0f, 0x80, 0x80, 0x80, 0.300000011921f, 0x0096 },
|
||||
{ 0x0190, 0x0032, 0x0025, 0x003C, 0.019999999553f, 0x50, 0x50, 0x60, 0.300000011921f, 0x0096 },
|
||||
{ 0x0190, 0x0032, 0x002A, 0x0014, 0.00999999977648f, 0x80, 0x80, 0x80, 0.300000011921f, 0x0096 },
|
||||
{ 0x020D, 0x0032, 0x0064, 0x0064, 0.00999999977648f, 0xC0, 0xC0, 0xC0, 0.300000011921f, 0x0096 },
|
||||
{ 0x020D, 0x0032, 0x0032, 0x0050, 0.019999999553f, 0x40, 0x40, 0x40, 0.300000011921f, 0x0096 },
|
||||
{ 0x0280, 0x0032, 0x002A, 0x00BE, 0.15000000596f, 0x40, 0x40, 0x40, 0.300000011921f, 0x0096 },
|
||||
{ 0x02EE, 0x0032, 0x003A, 0x012C, 0.00999999977648f, 0x40, 0x40, 0x40, 0.300000011921f, 0x0096 },
|
||||
{ 0x0032, 0x0032, 0x0007, 0x000F, 0.0299999993294f, 0xFF, 0xFF, 0xFF, 0.300000011921f, 0x0096 },
|
||||
{ 0x0011, 0x0001, 0x0005, 0x001E, 0.0299999993294f, 0xFF, 0xFF, 0xFF, 2.0f, 0x0019 },
|
||||
{ 0x0015, 0x0001, 0x0006, 0x0010, 0.0299999993294f, 0xE0, 0xE0, 0xE0, 3.0f, 0x0019 },
|
||||
{ 0x02EE, 0x0032, 0x003A, 0x0384, 0.00999999977648f, 0x40, 0x40, 0x40, 0.300000011921f, 0x0096 }
|
||||
// dur, appr, dis, size, bgrate, r, g, b, fgrate, propclouds
|
||||
{ 1, 50, 99, 0, 0.0f, 128, 128, 128, 0.3f, 150 },
|
||||
{ 400, 50, 37, 60, 0.02f, 80, 80, 96, 0.3f, 150 },
|
||||
{ 400, 50, 42, 20, 0.01f, 128, 128, 128, 0.3f, 150 },
|
||||
{ 525, 50, 100, 100, 0.01f, 192, 192, 192, 0.3f, 150 },
|
||||
{ 525, 50, 50, 80, 0.02f, 64, 64, 64, 0.3f, 150 },
|
||||
{ 640, 50, 42, 190, 0.15f, 64, 64, 64, 0.3f, 150 },
|
||||
{ 750, 50, 58, 300, 0.01f, 64, 64, 64, 0.3f, 150 },
|
||||
{ 50, 50, 7, 15, 0.03f, 255, 255, 255, 0.3f, 150 },
|
||||
{ 17, 1, 5, 30, 0.03f, 255, 255, 255, 2.0f, 25 },
|
||||
{ 21, 1, 6, 16, 0.03f, 224, 224, 224, 3.0f, 25 },
|
||||
{ 750, 50, 58, 900, 0.01f, 64, 64, 64, 0.3f, 150 }
|
||||
};
|
||||
#else
|
||||
//D:8004017C
|
||||
@@ -106,12 +106,14 @@ s_explosiontype array_explosion_types[] = {
|
||||
{ 40.0f, 40.0f, 0.5f, 0.239999994635582f, 70.0f, 100.0f, 180.0f, 162, 4, 5.0f, 120, 6.0f, 30.0f, 2.5f, 6.0f, 4, EXPLOSION_5A_SFX, 1.0f},
|
||||
{ 50.0f, 50.0f, 0.699999988079071f, 0.5f, 100.0f, 150.0f, 260.0f, 150, 1, 4.0f, 150, 6.0f, 30.0f, 3.0f, 6.0f, 4, EXPLOSION_4A_SFX, 2.0f},
|
||||
{ 70.0f, 60.0f, 1.20000004768372f, 0.699999988079071f, 150.0f, 225.0f, 320.0f, 150, 2, 5.0f, 150, 6.0f, 30.0f, 4.0f, 12.0f, 5, EXPLOSION_4A_SFX, 4.0f},
|
||||
/* standard explosion for grenades and mines */
|
||||
{ 80.0f, 60.0f, 2.40000009536743f, 0.899999976158142f, 200.0f, 300.0f, 480.0f, 150, 2, 5.0f, 200, 6.0f, 30.0f, 6.0f, 15.0f, 6, EXPLOSION_4B_SFX, 4.0f},
|
||||
{ 50.0f, 50.0f, 0.0f, 0.0f, 120.0f, 200.0f, 400.0f, 125, 4, 4.0f, 150, 6.0f, 30.0f, 3.0f, 6.0f, 4, EXPLOSION_4B_SFX, 4.0f},
|
||||
{ 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1, 1, 1.0f, 150, 6.0f, 30.0f, 2.5f, 6.0f, 7, EXPLOSION_2B_SFX, 0.0f},
|
||||
{ 1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1, 1, 1.0f, 100, 6.0f, 30.0f, 2.5f, 6.0f, 7, EXPLOSION_2B_SFX, 0.0f},
|
||||
{ 80.0f, 60.0f, 18.0f, 6.0f, 1500.0f, 2200.0f, 3600.0f, 250, 1, 2.0f, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0, EXPLOSION_4B_SFX, 4.0f},
|
||||
{ 80.0f, 60.0f, 3.59999990463257f, 1.20000004768372f, 300.0f, 450.0f, 640.0f, 50, 1, 2.0f, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0, EXPLOSION_4B_SFX, 4.0f},
|
||||
/* facility remote mine */
|
||||
{ 90.0f, 75.0f, 3.0f, 1.0f, 250.0f, 375.0f, 600.0f, 150, 2, 5.0f, 200, 6.0f, 30.0f, 6.0f, 15.0f, 6, EXPLOSION_4B_SFX, 4.0f},
|
||||
{160.0f, 120.0f, 7.19999980926514f, 2.40000009536743f, 600.0f, 450.0f, 640.0f, 50, 1, 2.0f, 0, 0.0f, 0.0f, 0.0f, 0.0f, 0, EXPLOSION_4B_SFX, 4.0f},
|
||||
};
|
||||
@@ -284,7 +286,7 @@ glabel explosionCreate
|
||||
/* 0D0E1C 7F09C2EC 51000129 */ beql $t0, $zero, .L7F09C794
|
||||
/* 0D0E20 7F09C2F0 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 0D0E24 7F09C2F4 A7A70056 */ sh $a3, 0x56($sp)
|
||||
/* 0D0E28 7F09C2F8 0FC0E90C */ jal chrpropAllocate
|
||||
/* 0D0E28 7F09C2F8 0FC0E90C */ jal propAllocate
|
||||
/* 0D0E2C 7F09C2FC AFA80040 */ sw $t0, 0x40($sp)
|
||||
/* 0D0E30 7F09C300 92230039 */ lbu $v1, 0x39($s1)
|
||||
/* 0D0E34 7F09C304 8FA80040 */ lw $t0, 0x40($sp)
|
||||
@@ -300,7 +302,7 @@ glabel explosionCreate
|
||||
/* 0D0E5C 7F09C32C 0C002382 */ jal sndPlaySfx
|
||||
/* 0D0E60 7F09C330 AFA80040 */ sw $t0, 0x40($sp)
|
||||
/* 0D0E64 7F09C334 00402025 */ move $a0, $v0
|
||||
/* 0D0E68 7F09C338 0FC14E84 */ jal sub_GAME_7F053A10
|
||||
/* 0D0E68 7F09C338 0FC14E84 */ jal chrobjSndCreatePostEventDefault
|
||||
/* 0D0E6C 7F09C33C 02602825 */ move $a1, $s3
|
||||
/* 0D0E70 7F09C340 8FA70030 */ lw $a3, 0x30($sp)
|
||||
/* 0D0E74 7F09C344 8FA80040 */ lw $t0, 0x40($sp)
|
||||
@@ -651,7 +653,7 @@ glabel explosionCreate
|
||||
.Ljp7F09CE6C:
|
||||
/* 0D19DC 7F09CE6C 52800124 */ beql $s4, $zero, .Ljp7F09D300
|
||||
/* 0D19E0 7F09CE70 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* 0D19E4 7F09CE74 0FC0E9CC */ jal chrpropAllocate
|
||||
/* 0D19E4 7F09CE74 0FC0E9CC */ jal propAllocate
|
||||
/* 0D19E8 7F09CE78 00000000 */ nop
|
||||
/* 0D19EC 7F09CE7C 87AE005E */ lh $t6, 0x5e($sp)
|
||||
/* 0D19F0 7F09CE80 24010010 */ li $at, 16
|
||||
@@ -674,7 +676,7 @@ glabel explosionCreate
|
||||
/* 0D1A30 7F09CEC0 0C002386 */ jal sndPlaySfx
|
||||
/* 0D1A34 7F09CEC4 AFA70038 */ sw $a3, 0x38($sp)
|
||||
/* 0D1A38 7F09CEC8 00402025 */ move $a0, $v0
|
||||
/* 0D1A3C 7F09CECC 0FC14FC3 */ jal sub_GAME_7F053A10
|
||||
/* 0D1A3C 7F09CECC 0FC14FC3 */ jal chrobjSndCreatePostEventDefault
|
||||
/* 0D1A40 7F09CED0 02602825 */ move $a1, $s3
|
||||
/* 0D1A44 7F09CED4 8FA70038 */ lw $a3, 0x38($sp)
|
||||
.Ljp7F09CED8:
|
||||
@@ -1093,7 +1095,7 @@ glabel sub_GAME_7F09C9D8
|
||||
/* 0D1578 7F09CA48 27B000E0 */ addiu $s0, $sp, 0xe0
|
||||
/* 0D157C 7F09CA4C 0FC0F2E3 */ jal chraiGetPropRoomIds
|
||||
/* 0D1580 7F09CA50 02002825 */ move $a1, $s0
|
||||
/* 0D1584 7F09CA54 0FC0F8FF */ jal sub_GAME_7F03E3FC
|
||||
/* 0D1584 7F09CA54 0FC0F8FF */ jal roomGetProps
|
||||
/* 0D1588 7F09CA58 02002025 */ move $a0, $s0
|
||||
/* 0D158C 7F09CA5C 3C138007 */ lui $s3, %hi(ptr_list_object_lookup_indices)
|
||||
/* 0D1590 7F09CA60 8E739C30 */ lw $s3, %lo(ptr_list_object_lookup_indices)($s3)
|
||||
@@ -1236,7 +1238,7 @@ glabel sub_GAME_7F09C9D8
|
||||
/* 0D1790 7F09CC60 46163200 */ add.s $f8, $f6, $f22
|
||||
/* 0D1794 7F09CC64 46144102 */ mul.s $f4, $f8, $f20
|
||||
/* 0D1798 7F09CC68 44052000 */ mfc1 $a1, $f4
|
||||
/* 0D179C 7F09CC6C 0FC137BF */ jal sub_GAME_7F04DEFC
|
||||
/* 0D179C 7F09CC6C 0FC137BF */ jal maybe_detonate_object_and_its_children
|
||||
/* 0D17A0 7F09CC70 00000000 */ nop
|
||||
.L7F09CC74:
|
||||
/* 0D17A4 7F09CC74 10000084 */ b .L7F09CE88
|
||||
@@ -1358,7 +1360,7 @@ glabel sub_GAME_7F09C9D8
|
||||
/* 0D194C 7F09CE1C 0FC26C54 */ jal get_cur_playernum
|
||||
/* 0D1950 7F09CE20 00000000 */ nop
|
||||
/* 0D1954 7F09CE24 AFA20090 */ sw $v0, 0x90($sp)
|
||||
/* 0D1958 7F09CE28 0FC26C57 */ jal sub_GAME_7F09B15C
|
||||
/* 0D1958 7F09CE28 0FC26C57 */ jal getPlayerPointerIndex
|
||||
/* 0D195C 7F09CE2C 02002025 */ move $a0, $s0
|
||||
/* 0D1960 7F09CE30 0FC26C43 */ jal set_cur_player
|
||||
/* 0D1964 7F09CE34 00402025 */ move $a0, $v0
|
||||
@@ -1851,7 +1853,7 @@ u8 sub_GAME_7F09D4EC(PropRecord* prop)
|
||||
{
|
||||
Mtxf* player_matrix;
|
||||
|
||||
player_matrix = currentPlayerGetMatrix10CC();
|
||||
player_matrix = camGetWorldToScreenMtxf();
|
||||
prop->Unk18 = -((((player_matrix->m[0][2] * prop->pos.x) + (player_matrix->m[1][2] * prop->pos.y)) + (player_matrix->m[2][2] * prop->pos.z)) + player_matrix->m[3][2]);
|
||||
|
||||
if (prop->Unk18 < 100.0f)
|
||||
@@ -3094,7 +3096,7 @@ void sub_GAME_7F09E700(coord3d *pos, StandTile *stan, s16 arg2, u8 *rooms, s32 a
|
||||
|
||||
if (smoke == NULL) { return; }
|
||||
|
||||
prop = chrpropAllocate();
|
||||
prop = propAllocate();
|
||||
if (prop == NULL) { return; }
|
||||
|
||||
prop->type = 8;
|
||||
@@ -3631,7 +3633,7 @@ u8 sub_GAME_7F09EF9C(PropRecord* prop)
|
||||
{
|
||||
Mtxf* player_matrix;
|
||||
|
||||
player_matrix = currentPlayerGetMatrix10CC();
|
||||
player_matrix = camGetWorldToScreenMtxf();
|
||||
prop->Unk18 = -((((player_matrix->m[0][2] * prop->pos.x) + (player_matrix->m[1][2] * prop->pos.y)) + (player_matrix->m[2][2] * prop->pos.z)) + player_matrix->m[3][2]);
|
||||
|
||||
if (prop->Unk18 < 100.0f)
|
||||
@@ -4055,7 +4057,7 @@ glabel sub_GAME_7F0A0034
|
||||
/* 0D4C64 7F0A0134 00000000 */ nop
|
||||
/* 0D4C68 7F0A0138 0FC1624B */ jal matrix_4x4_set_position_and_rotation_around_xyz
|
||||
/* 0D4C6C 7F0A013C 02803025 */ move $a2, $s4
|
||||
/* 0D4C70 7F0A0140 0FC1E0F1 */ jal currentPlayerGetMatrix10CC
|
||||
/* 0D4C70 7F0A0140 0FC1E0F1 */ jal camGetWorldToScreenMtxf
|
||||
/* 0D4C74 7F0A0144 00000000 */ nop
|
||||
/* 0D4C78 7F0A0148 00402025 */ move $a0, $v0
|
||||
/* 0D4C7C 7F0A014C 0FC16026 */ jal matrix_4x4_multiply_homogeneous_in_place
|
||||
@@ -4761,7 +4763,7 @@ s32 sub_GAME_7F0A0C74(f32 arg0)
|
||||
|
||||
|
||||
|
||||
void sub_GAME_7F0A0CCC(s32 arg0, s8 arg1)
|
||||
void sub_GAME_7F0A0CCC(PropRecord* arg0, s8 arg1)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < BULLET_IMPACT_BUFFER_LEN; i++)
|
||||
@@ -4775,7 +4777,7 @@ void sub_GAME_7F0A0CCC(s32 arg0, s8 arg1)
|
||||
|
||||
|
||||
|
||||
void sub_GAME_7F0A0D90(s32 arg0)
|
||||
void sub_GAME_7F0A0D90(PropRecord* arg0)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < BULLET_IMPACT_BUFFER_LEN; i++)
|
||||
@@ -4943,10 +4945,10 @@ glabel sub_GAME_7F0A108C
|
||||
/* 0D5D9C 7F0A126C E7A60080 */ swc1 $f6, 0x80($sp)
|
||||
/* 0D5DA0 7F0A1270 E7A4006C */ swc1 $f4, 0x6c($sp)
|
||||
/* 0D5DA4 7F0A1274 E7A80070 */ swc1 $f8, 0x70($sp)
|
||||
/* 0D5DA8 7F0A1278 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
|
||||
/* 0D5DA8 7F0A1278 0FC160F6 */ jal mtx4RotateVecInPlace
|
||||
/* 0D5DAC 7F0A127C E7AA0074 */ swc1 $f10, 0x74($sp)
|
||||
/* 0D5DB0 7F0A1280 02202025 */ move $a0, $s1
|
||||
/* 0D5DB4 7F0A1284 0FC160F6 */ jal matrix_4x4_rotate_vector_in_place
|
||||
/* 0D5DB4 7F0A1284 0FC160F6 */ jal mtx4RotateVecInPlace
|
||||
/* 0D5DB8 7F0A1288 27A5006C */ addiu $a1, $sp, 0x6c
|
||||
/* 0D5DBC 7F0A128C C7A00078 */ lwc1 $f0, 0x78($sp)
|
||||
/* 0D5DC0 7F0A1290 C7A2007C */ lwc1 $f2, 0x7c($sp)
|
||||
|
||||
@@ -159,7 +159,7 @@ struct BulletImpact {
|
||||
u16 unk44;
|
||||
s8 unk46;
|
||||
s8 unk47;
|
||||
u32 unk48;
|
||||
PropRecord* unk48;
|
||||
s8 unk4C;
|
||||
s8 unk4D;
|
||||
s16 unk4E;
|
||||
@@ -237,4 +237,12 @@ Gfx *unk09c250RenderPropSmoke(PropRecord *arg0, Gfx *arg1);
|
||||
|
||||
Gfx *explosionRenderBulletImpactOnProp(Gfx *arg0, PropRecord *arg1, s32 arg2);
|
||||
|
||||
void sub_GAME_7F09E700(coord3d *pos, StandTile *stan, s16 arg2, u8 *rooms, s32 arg4);
|
||||
|
||||
#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);
|
||||
#else
|
||||
void explosionCreate(void *, struct coord3d *pos, struct StandTile *stan, s16 /* enum EXPLOSION_DEF */ explosionType, s32 flag, s32 playernum, u8 *rooms, s32 flag2);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
+3
-3
@@ -111,15 +111,15 @@ void set_solo_and_ptr_briefing(LEVELID stage)
|
||||
briefingpage = pull_and_display_text_for_folder_a0(stage);
|
||||
}
|
||||
|
||||
void sub_GAME_7F01D61C(struct save_file *savefile)
|
||||
void sub_GAME_7F01D61C(struct save_data *savefile)
|
||||
{
|
||||
fileCopySave(selected_folder_num,savefile);
|
||||
fileCopySave(selected_folder_num, savefile);
|
||||
}
|
||||
|
||||
|
||||
|
||||
//this feels fake, generated with a permuter session i forgot was running
|
||||
void set_selected_foldernum_and_copy_demo_eeprom(struct save_file *eeprom)
|
||||
void set_selected_foldernum_and_copy_demo_eeprom(struct save_data *eeprom)
|
||||
{
|
||||
int new_var;
|
||||
long long new_var2;
|
||||
|
||||
+2
-6
@@ -4,10 +4,6 @@
|
||||
|
||||
#include <bondconstants.h>
|
||||
|
||||
// unknown/unused struct. Adding so that a definition exists.
|
||||
//Private Struct, Move to C
|
||||
struct save_file { s32* data; };
|
||||
|
||||
typedef struct save_data
|
||||
{
|
||||
s32 chksum1;
|
||||
@@ -63,8 +59,8 @@ s32 getSelectedFolderBond(void);
|
||||
void set_selected_folder_num(u32 foldernum);
|
||||
void set_selected_difficulty(DIFFICULTY difficulty);
|
||||
void set_solo_and_ptr_briefing(LEVELID stage);
|
||||
void sub_GAME_7F01D61C(struct save_file *savefile);
|
||||
void set_selected_foldernum_and_copy_demo_eeprom(struct save_file *eeprom);
|
||||
void sub_GAME_7F01D61C(struct save_data *savefile);
|
||||
void set_selected_foldernum_and_copy_demo_eeprom(struct save_data *eeprom);
|
||||
void store_favorite_weapon_current_player(u32 right,u32 left);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,5 +30,11 @@ STAGESTATUS fileIsStageUnlockedAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE s
|
||||
void fileUnlockStageInFolderAtDifficulty(s32 foldernum, LEVEL_SOLO_SEQUENCE stage, DIFFICULTY difficulty, s32 newtime);
|
||||
void sub_GAME_7F01E760(s32 foldernum, s32 cheat);
|
||||
void fileLoadSettingsForFolder(u32 folder);
|
||||
void fileDeleteSaveForFolder(s32 foldernum);
|
||||
|
||||
void fileGetHighestStageDifficultyCompletedForFolder(s32 foldernum, LEVEL_SOLO_SEQUENCE *stage, DIFFICULTY *difficulty);
|
||||
bool check_aztec_completed_any_folder_secret_00(void);
|
||||
bool fileIsEgyptCompletedOn00AnyFolder(void);
|
||||
LEVEL_SOLO_SEQUENCE fileGetHighestStageUnlockedAnyFolder(void);
|
||||
|
||||
#endif
|
||||
|
||||
+29
-182
@@ -63,6 +63,11 @@ EnvironmentRecord * g_EnvironmentAltp;
|
||||
*/
|
||||
s32 D_800825F4;
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
EnvironmentRecord dword_CODE_bss_800825F8;
|
||||
s32 bss_800825F8_padding[2];
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Unreferenced.
|
||||
*
|
||||
@@ -623,7 +628,7 @@ void fogRemoved7F0BAA5C(s32 a)
|
||||
return;
|
||||
}
|
||||
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
|
||||
/**
|
||||
* Address 0x7F0BAA64.
|
||||
*/
|
||||
@@ -724,179 +729,6 @@ void fogLoadLevelEnvironment(s32 level_id, s32 arg1)
|
||||
fogLoadFoglessCurrentEnvironment(sp1C);
|
||||
g_EnvironmentFoundp = NULL;
|
||||
}
|
||||
#endif
|
||||
#if defined(VERSION_EU)
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel default_near_fog
|
||||
.word 0x7f7fffff /*3.4028235e38*/
|
||||
glabel D_80058D74
|
||||
.word 0x461c4000 /*10000.0*/
|
||||
.text
|
||||
glabel fogLoadLevelEnvironment
|
||||
/* 0EC824 7F0B9E34 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 0EC828 7F0B9E38 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0EC82C 7F0B9E3C AFA5002C */ sw $a1, 0x2c($sp)
|
||||
/* 0EC830 7F0B9E40 AFA0001C */ sw $zero, 0x1c($sp)
|
||||
/* 0EC834 7F0B9E44 0FC26669 */ jal getPlayerCount
|
||||
/* 0EC838 7F0B9E48 AFA40028 */ sw $a0, 0x28($sp)
|
||||
/* 0EC83C 7F0B9E4C 24010001 */ li $at, 1
|
||||
/* 0EC840 7F0B9E50 8FA6001C */ lw $a2, 0x1c($sp)
|
||||
/* 0EC844 7F0B9E54 8FA70028 */ lw $a3, 0x28($sp)
|
||||
/* 0EC848 7F0B9E58 14410002 */ bne $v0, $at, .L7F0B9E64
|
||||
/* 0EC84C 7F0B9E5C 00404025 */ move $t0, $v0
|
||||
/* 0EC850 7F0B9E60 00004025 */ move $t0, $zero
|
||||
.L7F0B9E64:
|
||||
/* 0EC854 7F0B9E64 3C018005 */ lui $at, %hi(default_near_fog) # $at, 0x8005
|
||||
/* 0EC858 7F0B9E68 C424D7C0 */ lwc1 $f4, %lo(default_near_fog)($at)
|
||||
/* 0EC85C 7F0B9E6C 8FAE002C */ lw $t6, 0x2c($sp)
|
||||
/* 0EC860 7F0B9E70 3C018004 */ lui $at, %hi(g_ScaledFarFogIntensity) # $at, 0x8004
|
||||
/* 0EC864 7F0B9E74 44803000 */ mtc1 $zero, $f6
|
||||
/* 0EC868 7F0B9E78 E424E2B4 */ swc1 $f4, %lo(g_ScaledFarFogIntensity)($at)
|
||||
/* 0EC86C 7F0B9E7C 3C018004 */ lui $at, %hi(g_ScaledDifferenceFromFarFogIntensity) # $at, 0x8004
|
||||
/* 0EC870 7F0B9E80 11C0001A */ beqz $t6, .L7F0B9EEC
|
||||
/* 0EC874 7F0B9E84 E426E2B8 */ swc1 $f6, %lo(g_ScaledDifferenceFromFarFogIntensity)($at)
|
||||
/* 0EC878 7F0B9E88 3C098004 */ lui $t1, %hi(fog_tables)
|
||||
/* 0EC87C 7F0B9E8C 2523E300 */ addiu $v1, $t1, %lo(fog_tables)
|
||||
/* 0EC880 7F0B9E90 846F0000 */ lh $t7, ($v1)
|
||||
/* 0EC884 7F0B9E94 3C188004 */ lui $t8, %hi(fog_tables) # $t8, 0x8004
|
||||
/* 0EC888 7F0B9E98 2718E300 */ addiu $t8, %lo(fog_tables) # addiu $t8, $t8, -0x1d00
|
||||
/* 0EC88C 7F0B9E9C 11E00013 */ beqz $t7, .L7F0B9EEC
|
||||
/* 0EC890 7F0B9EA0 24E40384 */ addiu $a0, $a3, 0x384
|
||||
/* 0EC894 7F0B9EA4 87020000 */ lh $v0, ($t8)
|
||||
.L7F0B9EA8:
|
||||
/* 0EC898 7F0B9EA8 1482000C */ bne $a0, $v0, .L7F0B9EDC
|
||||
/* 0EC89C 7F0B9EAC 3C028007 */ lui $v0, %hi(g_EnvironmentFoundp) # $v0, 0x8007
|
||||
/* 0EC8A0 7F0B9EB0 2442CF88 */ addiu $v0, %lo(g_EnvironmentFoundp) # addiu $v0, $v0, -0x3078
|
||||
/* 0EC8A4 7F0B9EB4 AC430000 */ sw $v1, ($v0)
|
||||
/* 0EC8A8 7F0B9EB8 3C018007 */ lui $at, %hi(g_EnvironmentMainp) # $at, 0x8007
|
||||
/* 0EC8AC 7F0B9EBC AC23CF8C */ sw $v1, %lo(g_EnvironmentMainp)($at)
|
||||
/* 0EC8B0 7F0B9EC0 3C018007 */ lui $at, %hi(g_EnvironmentAltp) # $at, 0x8007
|
||||
/* 0EC8B4 7F0B9EC4 24790024 */ addiu $t9, $v1, 0x24
|
||||
/* 0EC8B8 7F0B9EC8 AC39CF90 */ sw $t9, %lo(g_EnvironmentAltp)($at)
|
||||
/* 0EC8BC 7F0B9ECC 0FC2E67E */ jal fogLoadCurrentEnvironment
|
||||
/* 0EC8C0 7F0B9ED0 8C440000 */ lw $a0, ($v0)
|
||||
/* 0EC8C4 7F0B9ED4 10000065 */ b .L7F0BA06C
|
||||
/* 0EC8C8 7F0B9ED8 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0B9EDC:
|
||||
/* 0EC8CC 7F0B9EDC 84620024 */ lh $v0, 0x24($v1)
|
||||
/* 0EC8D0 7F0B9EE0 24630024 */ addiu $v1, $v1, 0x24
|
||||
/* 0EC8D4 7F0B9EE4 1440FFF0 */ bnez $v0, .L7F0B9EA8
|
||||
/* 0EC8D8 7F0B9EE8 00000000 */ nop
|
||||
.L7F0B9EEC:
|
||||
/* 0EC8DC 7F0B9EEC 3C098004 */ lui $t1, %hi(fog_tables) # $t1, 0x8004
|
||||
/* 0EC8E0 7F0B9EF0 2529E300 */ addiu $t1, %lo(fog_tables) # addiu $t1, $t1, -0x1d00
|
||||
/* 0EC8E4 7F0B9EF4 85250000 */ lh $a1, ($t1)
|
||||
/* 0EC8E8 7F0B9EF8 3C0A8004 */ lui $t2, %hi(fog_tables) # $t2, 0x8004
|
||||
/* 0EC8EC 7F0B9EFC 254AE300 */ addiu $t2, %lo(fog_tables) # addiu $t2, $t2, -0x1d00
|
||||
/* 0EC8F0 7F0B9F00 10A00019 */ beqz $a1, .L7F0B9F68
|
||||
/* 0EC8F4 7F0B9F04 01201825 */ move $v1, $t1
|
||||
/* 0EC8F8 7F0B9F08 00085880 */ sll $t3, $t0, 2
|
||||
/* 0EC8FC 7F0B9F0C 01685823 */ subu $t3, $t3, $t0
|
||||
/* 0EC900 7F0B9F10 000B58C0 */ sll $t3, $t3, 3
|
||||
/* 0EC904 7F0B9F14 01685821 */ addu $t3, $t3, $t0
|
||||
/* 0EC908 7F0B9F18 000B5880 */ sll $t3, $t3, 2
|
||||
/* 0EC90C 7F0B9F1C 00EB2021 */ addu $a0, $a3, $t3
|
||||
/* 0EC910 7F0B9F20 85420000 */ lh $v0, ($t2)
|
||||
.L7F0B9F24:
|
||||
/* 0EC914 7F0B9F24 1482000C */ bne $a0, $v0, .L7F0B9F58
|
||||
/* 0EC918 7F0B9F28 3C028007 */ lui $v0, %hi(g_EnvironmentFoundp) # $v0, 0x8007
|
||||
/* 0EC91C 7F0B9F2C 2442CF88 */ addiu $v0, %lo(g_EnvironmentFoundp) # addiu $v0, $v0, -0x3078
|
||||
/* 0EC920 7F0B9F30 AC430000 */ sw $v1, ($v0)
|
||||
/* 0EC924 7F0B9F34 3C018007 */ lui $at, %hi(g_EnvironmentMainp) # $at, 0x8007
|
||||
/* 0EC928 7F0B9F38 AC23CF8C */ sw $v1, %lo(g_EnvironmentMainp)($at)
|
||||
/* 0EC92C 7F0B9F3C 3C018007 */ lui $at, %hi(g_EnvironmentAltp) # $at, 0x8007
|
||||
/* 0EC930 7F0B9F40 246C0024 */ addiu $t4, $v1, 0x24
|
||||
/* 0EC934 7F0B9F44 AC2CCF90 */ sw $t4, %lo(g_EnvironmentAltp)($at)
|
||||
/* 0EC938 7F0B9F48 0FC2E67E */ jal fogLoadCurrentEnvironment
|
||||
/* 0EC93C 7F0B9F4C 8C440000 */ lw $a0, ($v0)
|
||||
/* 0EC940 7F0B9F50 10000046 */ b .L7F0BA06C
|
||||
/* 0EC944 7F0B9F54 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0B9F58:
|
||||
/* 0EC948 7F0B9F58 84620024 */ lh $v0, 0x24($v1)
|
||||
/* 0EC94C 7F0B9F5C 24630024 */ addiu $v1, $v1, 0x24
|
||||
/* 0EC950 7F0B9F60 1440FFF0 */ bnez $v0, .L7F0B9F24
|
||||
/* 0EC954 7F0B9F64 00000000 */ nop
|
||||
.L7F0B9F68:
|
||||
/* 0EC958 7F0B9F68 29010002 */ slti $at, $t0, 2
|
||||
/* 0EC95C 7F0B9F6C 5420001D */ bnezl $at, .L7F0B9FE4
|
||||
/* 0EC960 7F0B9F70 3C014170 */ lui $at, 0x4170
|
||||
/* 0EC964 7F0B9F74 10A0001A */ beqz $a1, .L7F0B9FE0
|
||||
/* 0EC968 7F0B9F78 01201825 */ move $v1, $t1
|
||||
/* 0EC96C 7F0B9F7C 00082080 */ sll $a0, $t0, 2
|
||||
/* 0EC970 7F0B9F80 00882023 */ subu $a0, $a0, $t0
|
||||
/* 0EC974 7F0B9F84 000420C0 */ sll $a0, $a0, 3
|
||||
/* 0EC978 7F0B9F88 3C0D8004 */ lui $t5, %hi(fog_tables) # $t5, 0x8004
|
||||
/* 0EC97C 7F0B9F8C 25ADE300 */ addiu $t5, %lo(fog_tables) # addiu $t5, $t5, -0x1d00
|
||||
/* 0EC980 7F0B9F90 00882021 */ addu $a0, $a0, $t0
|
||||
/* 0EC984 7F0B9F94 00042080 */ sll $a0, $a0, 2
|
||||
/* 0EC988 7F0B9F98 85A20000 */ lh $v0, ($t5)
|
||||
.L7F0B9F9C:
|
||||
/* 0EC98C 7F0B9F9C 1482000C */ bne $a0, $v0, .L7F0B9FD0
|
||||
/* 0EC990 7F0B9FA0 3C028007 */ lui $v0, %hi(g_EnvironmentFoundp) # $v0, 0x8007
|
||||
/* 0EC994 7F0B9FA4 2442CF88 */ addiu $v0, %lo(g_EnvironmentFoundp) # addiu $v0, $v0, -0x3078
|
||||
/* 0EC998 7F0B9FA8 AC430000 */ sw $v1, ($v0)
|
||||
/* 0EC99C 7F0B9FAC 3C018007 */ lui $at, %hi(g_EnvironmentMainp) # $at, 0x8007
|
||||
/* 0EC9A0 7F0B9FB0 AC23CF8C */ sw $v1, %lo(g_EnvironmentMainp)($at)
|
||||
/* 0EC9A4 7F0B9FB4 3C018007 */ lui $at, %hi(g_EnvironmentAltp) # $at, 0x8007
|
||||
/* 0EC9A8 7F0B9FB8 246E0024 */ addiu $t6, $v1, 0x24
|
||||
/* 0EC9AC 7F0B9FBC AC2ECF90 */ sw $t6, %lo(g_EnvironmentAltp)($at)
|
||||
/* 0EC9B0 7F0B9FC0 0FC2E67E */ jal fogLoadCurrentEnvironment
|
||||
/* 0EC9B4 7F0B9FC4 8C440000 */ lw $a0, ($v0)
|
||||
/* 0EC9B8 7F0B9FC8 10000028 */ b .L7F0BA06C
|
||||
/* 0EC9BC 7F0B9FCC 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0B9FD0:
|
||||
/* 0EC9C0 7F0B9FD0 84620024 */ lh $v0, 0x24($v1)
|
||||
/* 0EC9C4 7F0B9FD4 24630024 */ addiu $v1, $v1, 0x24
|
||||
/* 0EC9C8 7F0B9FD8 1440FFF0 */ bnez $v0, .L7F0B9F9C
|
||||
/* 0EC9CC 7F0B9FDC 00000000 */ nop
|
||||
.L7F0B9FE0:
|
||||
/* 0EC9D0 7F0B9FE0 3C014170 */ li $at, 0x41700000 # 15.000000
|
||||
.L7F0B9FE4:
|
||||
/* 0EC9D4 7F0B9FE4 44816000 */ mtc1 $at, $f12
|
||||
/* 0EC9D8 7F0B9FE8 3C018005 */ lui $at, %hi(D_80058D74) # $at, 0x8005
|
||||
/* 0EC9DC 7F0B9FEC C42ED7C4 */ lwc1 $f14, %lo(D_80058D74)($at)
|
||||
/* 0EC9E0 7F0B9FF0 AFA6001C */ sw $a2, 0x1c($sp)
|
||||
/* 0EC9E4 7F0B9FF4 0C001028 */ jal viSetZRange
|
||||
/* 0EC9E8 7F0B9FF8 AFA70028 */ sw $a3, 0x28($sp)
|
||||
/* 0EC9EC 7F0B9FFC 3C048004 */ lui $a0, %hi(fog_tables2) # $a0, 0x8004
|
||||
/* 0EC9F0 7F0BA000 3C018007 */ lui $at, %hi(g_FogSkyIsEnabled) # $at, 0x8007
|
||||
/* 0EC9F4 7F0BA004 2484E9C0 */ addiu $a0, %lo(fog_tables2) # addiu $a0, $a0, -0x1640
|
||||
/* 0EC9F8 7F0BA008 AC20CF60 */ sw $zero, %lo(g_FogSkyIsEnabled)($at)
|
||||
/* 0EC9FC 7F0BA00C 8C8F0000 */ lw $t7, ($a0)
|
||||
/* 0ECA00 7F0BA010 8FA6001C */ lw $a2, 0x1c($sp)
|
||||
/* 0ECA04 7F0BA014 8FA70028 */ lw $a3, 0x28($sp)
|
||||
/* 0ECA08 7F0BA018 11E0000B */ beqz $t7, .L7F0BA048
|
||||
/* 0ECA0C 7F0BA01C 00801825 */ move $v1, $a0
|
||||
/* 0ECA10 7F0BA020 3C188004 */ lui $t8, %hi(fog_tables2) # $t8, 0x8004
|
||||
/* 0ECA14 7F0BA024 2718E9C0 */ addiu $t8, %lo(fog_tables2) # addiu $t8, $t8, -0x1640
|
||||
/* 0ECA18 7F0BA028 8F020000 */ lw $v0, ($t8)
|
||||
.L7F0BA02C:
|
||||
/* 0ECA1C 7F0BA02C 54E20003 */ bnel $a3, $v0, .L7F0BA03C
|
||||
/* 0ECA20 7F0BA030 8C620038 */ lw $v0, 0x38($v1)
|
||||
/* 0ECA24 7F0BA034 00603025 */ move $a2, $v1
|
||||
/* 0ECA28 7F0BA038 8C620038 */ lw $v0, 0x38($v1)
|
||||
.L7F0BA03C:
|
||||
/* 0ECA2C 7F0BA03C 24630038 */ addiu $v1, $v1, 0x38
|
||||
/* 0ECA30 7F0BA040 1440FFFA */ bnez $v0, .L7F0BA02C
|
||||
/* 0ECA34 7F0BA044 00000000 */ nop
|
||||
.L7F0BA048:
|
||||
/* 0ECA38 7F0BA048 14C00002 */ bnez $a2, .L7F0BA054
|
||||
/* 0ECA3C 7F0BA04C 00000000 */ nop
|
||||
/* 0ECA40 7F0BA050 00803025 */ move $a2, $a0
|
||||
.L7F0BA054:
|
||||
/* 0ECA44 7F0BA054 0FC2E768 */ jal fogLoadFoglessCurrentEnvironment
|
||||
/* 0ECA48 7F0BA058 00C02025 */ move $a0, $a2
|
||||
/* 0ECA4C 7F0BA05C 3C028007 */ lui $v0, %hi(g_EnvironmentFoundp) # $v0, 0x8007
|
||||
/* 0ECA50 7F0BA060 2442CF88 */ addiu $v0, %lo(g_EnvironmentFoundp) # addiu $v0, $v0, -0x3078
|
||||
/* 0ECA54 7F0BA064 AC400000 */ sw $zero, ($v0)
|
||||
/* 0ECA58 7F0BA068 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
.L7F0BA06C:
|
||||
/* 0ECA5C 7F0BA06C 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 0ECA60 7F0BA070 03E00008 */ jr $ra
|
||||
/* 0ECA64 7F0BA074 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
/**
|
||||
@@ -906,17 +738,27 @@ glabel fogLoadLevelEnvironment
|
||||
*/
|
||||
void fogSwitchToSolosky2(f32 arg0)
|
||||
{
|
||||
#if defined(VERSION_US) || defined(VERSION_JP)
|
||||
static EnvironmentRecord dword_CODE_bss_800825F8;
|
||||
#endif
|
||||
|
||||
dword_CODE_bss_800825F8 = *g_EnvironmentMainp;
|
||||
|
||||
dword_CODE_bss_800825F8.Visibility.BlendMultiplier =
|
||||
g_EnvironmentMainp->Visibility.BlendMultiplier
|
||||
#if defined(VERSION_EU)
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Visibility.BlendMultiplier - (f32)g_EnvironmentMainp->Visibility.BlendMultiplier));
|
||||
#else
|
||||
+ (arg0 * (g_EnvironmentAltp->Visibility.BlendMultiplier - g_EnvironmentMainp->Visibility.BlendMultiplier));
|
||||
#endif
|
||||
|
||||
dword_CODE_bss_800825F8.Visibility.FarFog =
|
||||
g_EnvironmentMainp->Visibility.FarFog
|
||||
#if defined(VERSION_EU)
|
||||
+ (arg0 * ((f32)g_EnvironmentAltp->Visibility.FarFog - (f32)g_EnvironmentMainp->Visibility.FarFog));
|
||||
#else
|
||||
+ (arg0 * (g_EnvironmentAltp->Visibility.FarFog - g_EnvironmentMainp->Visibility.FarFog));
|
||||
#endif
|
||||
|
||||
dword_CODE_bss_800825F8.Fog.DifferenceFromFarIntensity =
|
||||
(f32)g_EnvironmentMainp->Fog.DifferenceFromFarIntensity
|
||||
@@ -944,9 +786,18 @@ void fogSwitchToSolosky2(f32 arg0)
|
||||
|
||||
fogLoadCurrentEnvironment(&dword_CODE_bss_800825F8);
|
||||
}
|
||||
#endif
|
||||
#if defined(VERSION_EU)
|
||||
|
||||
#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
|
||||
@@ -955,11 +806,7 @@ void fogSwitchToSolosky2(f32 arg0)
|
||||
GLOBAL_ASM(
|
||||
|
||||
|
||||
.bss
|
||||
glabel dword_CODE_bss_800825F8
|
||||
.word 0,0,0,0
|
||||
.word 0,0,0,0
|
||||
.word 0,0,0,0
|
||||
|
||||
|
||||
.text
|
||||
glabel fogSwitchToSolosky2
|
||||
@@ -1302,7 +1149,7 @@ s32 fogPositionIsVisibleThroughFog(coord3d *pos, f32 range)
|
||||
}
|
||||
|
||||
player_pos = bondviewGetCurrentPlayersPosition();
|
||||
player_mtx = currentPlayerGetMatrix10CC();
|
||||
player_mtx = camGetWorldToScreenMtxf();
|
||||
|
||||
sp24.f[0] = pos->f[0] - player_pos->f[0];
|
||||
sp24.f[1] = pos->f[1] - player_pos->f[1];
|
||||
|
||||
+23
-4
@@ -4,18 +4,37 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
typedef struct NearFogRecord {
|
||||
#if defined(VERSION_EU)
|
||||
|
||||
// TODO: FIXME:
|
||||
// There's something terrible going on with NearFogRecord on EU
|
||||
// the function chrobjFogVisRangeRelated() treats it as a struct
|
||||
// with 3 floats, but declaring it as such makes the struct too big.
|
||||
// NearFogRecordF was created so we can cast it where applicable...
|
||||
// but it isn't an ideal fix.
|
||||
|
||||
typedef struct NearFogRecord {
|
||||
s16 NearFog;
|
||||
s16 MaxVisRange;
|
||||
s16 MaxObfuscationRange;
|
||||
#else
|
||||
} NearFogRecord;
|
||||
|
||||
typedef struct NearFogRecordF {
|
||||
f32 NearFog;
|
||||
f32 MaxVisRange;
|
||||
f32 MaxObfuscationRange;
|
||||
} NearFogRecordF;
|
||||
|
||||
#else
|
||||
|
||||
typedef struct NearFogRecord {
|
||||
f32 NearFog;
|
||||
f32 MaxVisRange;
|
||||
f32 MaxObfuscationRange;
|
||||
#endif
|
||||
} NearFogRecord;
|
||||
|
||||
#endif
|
||||
|
||||
//New Definitions below
|
||||
// SubRecords
|
||||
|
||||
@@ -125,7 +144,7 @@ typedef struct EnvironmentRecord
|
||||
* ID = StageID + Token eg, Bunker Cinema is 9 + 900 = 909
|
||||
*/
|
||||
#if defined(VERSION_EU)
|
||||
u16 Id;
|
||||
s16 Id;
|
||||
#else
|
||||
u32 Id;
|
||||
#endif
|
||||
|
||||
+4185
-17975
File diff suppressed because it is too large
Load Diff
+33
-64
@@ -7,8 +7,8 @@
|
||||
struct legal_screen_text {
|
||||
s32 h_pos;
|
||||
s32 v_pos;
|
||||
s32 flag;
|
||||
s32 flag2;
|
||||
s32 halign;
|
||||
s32 valign;
|
||||
u16 txtID;
|
||||
u16 anonymous_5;
|
||||
};
|
||||
@@ -39,7 +39,7 @@ struct mp_stage_playercount {
|
||||
|
||||
struct mp_stage_setup {
|
||||
u16 folder_text_preset;
|
||||
s16 select_screen_text_preset;
|
||||
u16 select_screen_text_preset;
|
||||
s32 photo;
|
||||
s32 stage_id;
|
||||
s32 unlock_after;
|
||||
@@ -48,25 +48,25 @@ struct mp_stage_setup {
|
||||
};
|
||||
|
||||
struct MP_selectable_chars {
|
||||
short text_preset;
|
||||
char gender;
|
||||
char select_photo;
|
||||
u16 text_preset;
|
||||
u8 gender;
|
||||
u8 select_photo;
|
||||
short body;
|
||||
short head;
|
||||
float pov;
|
||||
};
|
||||
|
||||
struct MP_handicap_menu {
|
||||
short text_preset;
|
||||
short padding;
|
||||
u16 text_preset;
|
||||
u16 padding;
|
||||
float damage_modifier;
|
||||
};
|
||||
|
||||
struct MP_controller_configuration_menu {
|
||||
u16 anonymous_0;
|
||||
u16 text_preset;
|
||||
//char field_1;
|
||||
char field_2;
|
||||
char field_3;
|
||||
u8 field_2;
|
||||
u8 field_3;
|
||||
};
|
||||
|
||||
struct MP_sight_aim_settings {
|
||||
@@ -76,8 +76,8 @@ struct MP_sight_aim_settings {
|
||||
};
|
||||
|
||||
struct intro_char {
|
||||
int body;
|
||||
int head;
|
||||
enum BODIES body;
|
||||
enum HEADS head;
|
||||
short text1;
|
||||
short text2;
|
||||
short text3;
|
||||
@@ -119,40 +119,24 @@ extern f32 flt_CODE_bss_800695BC;
|
||||
extern f32 flt_CODE_bss_800695C0;
|
||||
//CODE.bss:800695C4 .align 3
|
||||
//CODE.bss:800695C8
|
||||
extern f32 flt_CODE_bss_800695C8;
|
||||
//CODE.bss:800695CC
|
||||
extern f32 flt_CODE_bss_800695CC;
|
||||
//CODE.bss:800695D0
|
||||
extern f32 flt_CODE_bss_800695D0;
|
||||
extern struct coord3d flt_CODE_bss_800695C8;
|
||||
//CODE.bss:800695D4 .align 3
|
||||
//CODE.bss:800695D8
|
||||
extern f32 flt_CODE_bss_800695D8;
|
||||
//CODE.bss:800695DC
|
||||
extern f32 flt_CODE_bss_800695DC;
|
||||
//CODE.bss:800695E0
|
||||
extern f32 flt_CODE_bss_800695E0;
|
||||
extern struct coord3d flt_CODE_bss_800695D8;
|
||||
|
||||
//CODE.bss:800695E4
|
||||
extern f32 flt_CODE_bss_800695E4;
|
||||
extern s32 bss_800695E4;
|
||||
|
||||
//CODE.bss:800695E8
|
||||
extern f32 flt_CODE_bss_800695E8;
|
||||
//CODE.bss:800695EC
|
||||
extern f32 flt_CODE_bss_800695EC;
|
||||
//CODE.bss:800695F0
|
||||
extern f32 flt_CODE_bss_800695F0;
|
||||
extern struct coord3d flt_CODE_bss_800695E8;
|
||||
|
||||
//CODE.bss:800695F4 .align 3
|
||||
//CODE.bss:800695F8
|
||||
extern f32 flt_CODE_bss_800695F8;
|
||||
//CODE.bss:800695FC
|
||||
extern f32 flt_CODE_bss_800695FC;
|
||||
//CODE.bss:80069600
|
||||
extern f32 flt_CODE_bss_80069600;
|
||||
extern struct coord3d flt_CODE_bss_800695F8;
|
||||
//CODE.bss:80069604 .align 3
|
||||
//CODE.bss:80069608
|
||||
extern f32 flt_CODE_bss_80069608;
|
||||
//CODE.bss:8006960C
|
||||
extern f32 flt_CODE_bss_8006960C;
|
||||
//CODE.bss:80069610
|
||||
extern f32 flt_CODE_bss_80069610;
|
||||
extern struct coord3d flt_CODE_bss_80069608;
|
||||
|
||||
//CODE.bss:80069614
|
||||
extern f32 ninLogoRotRate;
|
||||
//CODE.bss:80069618
|
||||
@@ -181,13 +165,7 @@ extern s32 dword_CODE_bss_80069730[4];
|
||||
//CODE.bss:80069740
|
||||
extern s32 player_has_selected_char[];
|
||||
//CODE.bss:80069750
|
||||
extern s32 size_mp_select_image_player1;
|
||||
//CODE.bss:80069754
|
||||
extern s32 size_mp_select_image_player2;
|
||||
//CODE.bss:80069758
|
||||
extern s32 size_mp_select_image_player3;
|
||||
//CODE.bss:8006975C
|
||||
extern s32 size_mp_select_image_player4;
|
||||
extern s32 size_mp_select_image_player[];
|
||||
//CODE.bss:80069760
|
||||
extern s32 player_handicap[];
|
||||
//CODE.bss:80069770
|
||||
@@ -220,7 +198,7 @@ extern s32 highlight_enemy_damage;
|
||||
//CODE.bss:800697A8
|
||||
extern s32 player_handicap[];
|
||||
//CODE.bss:800697B8
|
||||
extern u32 controlstyle_player[];
|
||||
extern s32 controlstyle_player[];
|
||||
|
||||
|
||||
//CODE.bss:800697C8
|
||||
@@ -287,21 +265,12 @@ extern s32 screen_size;
|
||||
extern s32 spectrum_related_flag;
|
||||
extern s32 is_emulating_spectrum;
|
||||
extern s32 is_cheat_menu_available;
|
||||
extern Gfx * ptr_logo_and_walletbond_DL;
|
||||
extern u8 * ptr_logo_and_walletbond_DL;
|
||||
extern s32 ptr_menu_videobuffer;
|
||||
extern Model * walletinst[];
|
||||
extern struct rgba_u8 RGBA_8002A970;
|
||||
extern struct rgba_u8 RGBA_8002A974;
|
||||
extern struct rgba_u8 RGBA_8002A978;
|
||||
extern struct rgba_u8 RGBA_8002A97C;
|
||||
extern struct rgba_u8 RGBA_8002A980;
|
||||
extern struct rgba_u8 RGBA_8002A984;
|
||||
extern struct rgba_u8 RGBA_8002A988;
|
||||
extern struct rgba_u8 RGBA_8002A98C;
|
||||
extern u32 dword_D_8002A990;
|
||||
extern u32 dword_D_8002A994;
|
||||
extern u32 dword_D_8002A998;
|
||||
extern u32 dword_D_8002A99C;
|
||||
extern Lights1 gelogolight;
|
||||
extern Lights1 ninlogolight;
|
||||
|
||||
extern f32 slider_007_mode_reaction;
|
||||
extern f32 slider_007_mode_health;
|
||||
extern f32 slider_007_mode_damage;
|
||||
@@ -325,14 +294,14 @@ extern s32 unlock_control_style;
|
||||
extern s32 unlock_aim_sight;
|
||||
extern s16 solo_target_time_array[20][3];
|
||||
|
||||
extern u32 intro_character_index;
|
||||
extern s32 intro_character_index;
|
||||
extern u32 randomly_selected_intro_animation;
|
||||
extern u32 intro_animation_count;
|
||||
extern u32 objinstance;
|
||||
extern u32 ptrobjinstance;
|
||||
extern struct Model *cast_model;
|
||||
extern struct Model *cast_model_weapon;
|
||||
extern u32 full_actor_intro;
|
||||
|
||||
void set_menu_to_mode(MENU menu, s32 mode);
|
||||
void frontChangeMenu(MENU menu, s32 reload);
|
||||
s32 get_selected_num_players(void);
|
||||
void do_extended_cast_display(s32 flag);
|
||||
MPSCENARIOS get_scenario(void);
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
//D:8004EAE0
|
||||
s32 D_8004EAE0[] = {0, 0, 0, 0};
|
||||
|
||||
void gameInitDebugNoticeList(void) {
|
||||
void gameInit(void) {
|
||||
debTryAdd(&D_8004EAE0, "game_c_debug");
|
||||
}
|
||||
|
||||
void reset_mem_bank_5(void) {
|
||||
obBlankResourcesInBank5();
|
||||
mempResetBank(5);
|
||||
obBlankResourcesLoadedInBank(5);
|
||||
mempResetBank(MEMPOOL_ME);
|
||||
obBlankResourcesLoadedInBank(MEMPOOL_ME);
|
||||
}
|
||||
|
||||
void sub_GAME_7F0D1A7C(void) {
|
||||
mempNullNextEntryInBank(5);
|
||||
obBlankResourcesLoadedInBank(5);
|
||||
mempNullNextEntryInBank(MEMPOOL_ME);
|
||||
obBlankResourcesLoadedInBank(MEMPOOL_ME);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define _GAME_DEBUG_H_
|
||||
#include <ultra64.h>
|
||||
|
||||
void gameInitDebugNoticeList(void);
|
||||
void gameInit(void);
|
||||
void reset_mem_bank_5(void);
|
||||
void sub_GAME_7F0D1A7C(void);
|
||||
|
||||
|
||||
+523
-1931
File diff suppressed because it is too large
Load Diff
+27
-6
@@ -231,7 +231,7 @@ typedef struct GunModelFileRecord
|
||||
} GunModelFileRecord;
|
||||
|
||||
typedef struct CasingRecord {
|
||||
f32 unk00;
|
||||
f32 floor_y_pos;
|
||||
coord3d pos;
|
||||
coord3d vel;
|
||||
#if VERSION_EU
|
||||
@@ -289,17 +289,17 @@ u16 *get_ptr_short_watch_text_for_item(ITEM_IDS item);
|
||||
|
||||
s32 bondwalkItemHasAmmo(ITEM_IDS item);
|
||||
|
||||
void display_in_game_crosshair(s32 *gdl);
|
||||
void gunDrawSight(s32 *gdl);
|
||||
|
||||
WeaponStats *get_ptr_item_statistics(ITEM_IDS item);
|
||||
|
||||
ITEM_IDS getCurrentPlayerWeaponId(GUNHAND hand);
|
||||
s32 currentPlayerEquipWeaponWrapper(GUNHAND hand, s32 next_weapon);
|
||||
void sub_GAME_7F068E6C(void);
|
||||
void update_bullet_casings(void);
|
||||
void attempt_reload_item_in_hand(GUNHAND hand);
|
||||
void set_max_ammo_for_cur_player(void);
|
||||
void set_unset_ammo_on_screen_setting(s32 flags, s32 isset);
|
||||
void set_unset_bitflags(s32 bitflags, s32 flag);
|
||||
void gunSetGunAmmoVisible(s32 reason, s32 enable);
|
||||
void gunSetSightVisible(s32 reason, s32 visible);
|
||||
|
||||
s32 get_max_ammo_for_type(s32);
|
||||
void give_cur_player_ammo(s32, s32);
|
||||
@@ -313,7 +313,7 @@ u8 bondwalkItemGetSoundTriggerRate(ITEM_IDS item);
|
||||
void recall_joy2_hits_edit_detail_edit_flag(enum ITEM_IDS item, PropRecord* prop, s32 texture_index);
|
||||
void recall_joy2_hits_edit_flag(enum ITEM_IDS item, coord3d* arg1, s32 texture_index);
|
||||
void sub_GAME_7F05EB0C(ObjectRecord *arg0, coord3d *arg1, StandTile *arg2, Mtxf *arg3, coord3d *arg4, Mtxf *arg5, PropRecord *arg6);
|
||||
void sub_GAME_7F061948(struct ChrRecord_f180 *arg0, ITEM_IDS item, coord3d *arg2, coord3d *arg3);
|
||||
void CapBeamLengthAndDecideIfRendered(struct ChrRecord_f180 *arg0, ITEM_IDS item, coord3d *arg2, coord3d *arg3);
|
||||
void sub_GAME_7F068190(coord3d *arg0, coord3d *arg1);
|
||||
|
||||
void inc_curplayer_hitcount_with_weapon(ITEM_IDS item, SHOT_REGISTER shot_register);
|
||||
@@ -333,4 +333,25 @@ void gunSetOffsetRelated(f32 param_1);
|
||||
s32 get_curplayer_shot_register(SHOT_REGISTER shot_register);
|
||||
void get_bullet_angle(f32* horizontal_angle, f32* vertical_angle);
|
||||
|
||||
ITEM_IDS get_item_in_hand_or_watch_menu(GUNHAND hand);
|
||||
void draw_item_in_hand(GUNHAND hand, s32 next_weapon);
|
||||
void sub_GAME_7F05DAE4(GUNHAND hand);
|
||||
void sub_GAME_7F067F58(f32 turn_x, f32 turn_y, f32 max_aim_lock_speed);
|
||||
s32 get_ammo_count_for_weapon(ITEM_IDS weapon);
|
||||
void add_ammo_to_weapon(ITEM_IDS weapon, s32 ammo);
|
||||
s32 get_ammo_in_hands_magazine(GUNHAND hand);
|
||||
void autoadvance_on_deplete_all_ammo(void);
|
||||
f32 getCurrentPlayerNoise(GUNHAND hand);
|
||||
void camera_sniper_zoom_in(f32 zoom);
|
||||
void camera_sniper_zoom_out(f32 zoom);
|
||||
f32 get_item_in_hand_zoom(void);
|
||||
void advance_through_inventory(void);
|
||||
void backstep_through_inventory(void);
|
||||
void gunSetAimType(s32 param_1);
|
||||
void sub_GAME_7F067FBC(f32 turn_x, f32 turn_y);
|
||||
void gunTickGameplay(s32 arg0);
|
||||
|
||||
Gfx *gunDrawHudString(Gfx *gdl, s8 *text, s32 x, s32 halign, s32 y, s32 valign, bool glow);
|
||||
Gfx *gunDrawHudInteger(Gfx *gdl, s32 value, s32 x, s32 halign, s32 y, s32 valign, bool glow);
|
||||
|
||||
#endif
|
||||
|
||||
+1
-1
@@ -2765,7 +2765,7 @@ void texLoadFromModelFileHeader(ModelFileHeader* arg0, struct texpool* arg1)
|
||||
}
|
||||
|
||||
|
||||
void texLoadFromTextureNum(u32 texturenum, struct texpool *arg1)
|
||||
void texLoadFromTextureNum(s32 texturenum, struct texpool *arg1)
|
||||
{
|
||||
u32 texturenumcopy;
|
||||
texturenumcopy = texturenum;
|
||||
|
||||
@@ -91,5 +91,6 @@ s32 texInflateNonZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct tex
|
||||
s32 texInflateZlib(u8 *src, u8 *dst, s32 arg2, s32 forcenumimages, struct texpool *arg4);
|
||||
void texLoad(s32 *updateword, struct texpool *pool);
|
||||
void texInitPool(struct texpool *arg0, u8 *arg1, s32 arg2);
|
||||
void texLoadFromTextureNum(s32 texturenum, struct texpool *arg1);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -7,8 +7,11 @@
|
||||
extern struct sImageTableEntry *crosshairimage;
|
||||
|
||||
extern struct sImageTableEntry *mainfolderimages;
|
||||
extern struct sImageTableEntry *mpstageselimages;
|
||||
extern struct sImageTableEntry *genericimage;
|
||||
extern struct sImageTableEntry *skywaterimages;
|
||||
extern struct sImageTableEntry *monitorimages;
|
||||
extern struct sImageTableEntry *mpcharselimages;
|
||||
|
||||
extern u8* img_curpos;
|
||||
extern s32 img_bitcount;
|
||||
|
||||
+133
-134
@@ -194,55 +194,55 @@ s32 send2indyresourcecommands(indy_resource_entry_header * entry1, u32 size1, in
|
||||
}
|
||||
|
||||
|
||||
void indyrescmdSizeNextCmd(s32 readsize,s32 writesize)
|
||||
void indyrescmdStartCmdSeq(s32 readsize,s32 writesize)
|
||||
{
|
||||
indy_resource_entry_type1 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.type = INDY_SIZE;
|
||||
cmd.entry.size = 0x14;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_STARTCMDSEQ;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
indycmdSendCommand(&cmd,0x14);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void indyrescmdSendCmdEnd(s32 readsize,s32 writesize)
|
||||
void indyrescmdEndCmdSeq(s32 readsize,s32 writesize)
|
||||
{
|
||||
indy_resource_entry_type2 cmd;
|
||||
s_indyResCmd02End cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.type = INDY_END;
|
||||
cmd.entry.size = 0x14;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_ENDCMDSEQ;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
indycmdSendCommand(&cmd,0x14);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void indyrescmdInit(s32 readsize,s32 writesize)
|
||||
{
|
||||
indy_resource_entry_type0 cmd;
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_INIT;
|
||||
cmd.entry.size = 0x14;
|
||||
cmd.entry.size = sizeof(indy_resource_entry_type0);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
indycmdSendCommand(&cmd,0x14);
|
||||
indycmdSendCommand(&cmd,sizeof(indy_resource_entry_type0));
|
||||
}
|
||||
|
||||
void post_type3_indyrescmd(s32 rsize,s32 wsize,char *strptr)
|
||||
{
|
||||
struct indy_resource_entry_type3 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_RESCMD;
|
||||
cmd.entry.size = 0x114;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,strptr, 256);
|
||||
strncpy(cmd.strbuffer,strptr, sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = 0;
|
||||
indycmdSendCommand(&cmd.entry,0x114);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -250,13 +250,13 @@ void post_type4_indyrescmd_data_recieved(s32 readsize,s32 writesize,s32 data)
|
||||
{
|
||||
indy_resource_entry_type4 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_RESCMDDATARCVD;
|
||||
cmd.entry.size = 0x18;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data = data;
|
||||
indycmdSendCommand(&cmd.entry,0x18);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -264,63 +264,63 @@ void indyrescmdCheckFileExists(s32 rsize,s32 wsize,char *name)
|
||||
{
|
||||
indy_resource_entry_type5 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_SENDCHECKFILEEXISTS;
|
||||
cmd.entry.size = 0x114;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,name,0x100);
|
||||
strncpy(cmd.strbuffer,name,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = '\0';
|
||||
indycmdSendCommand(&cmd,0x114);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void post_type6_indyrescmd_printfrecieved(s32 readsize,s32 writesize,u32 data1,u32 data2)
|
||||
{
|
||||
struct indy_resource_entry_type6 cmd;
|
||||
indy_resource_entry_type6 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_RECVCHECKFILEEXISTS;
|
||||
cmd.entry.size = 0x1c;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data1 = data1;
|
||||
cmd.data2 = data2;
|
||||
indycmdSendCommand(&cmd.entry,0x1c);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void indyrescmdSendFileLoad(u32 rsize,u32 wsize,u8 *filename,u32 size)
|
||||
{
|
||||
struct indy_resource_entry_type7 cmd;
|
||||
indy_resource_entry_type7 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_SENDFILELOAD;
|
||||
cmd.entry.size = 0x118;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,filename,0x100);
|
||||
strncpy(cmd.strbuffer,filename,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = '\0';
|
||||
cmd.size = size;
|
||||
indycmdSendCommand(&cmd,0x118);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void post_type8_indyrescmd_log_recieved(s32 rsize,s32 wsize,u32 data1,u32 data2,u32 cmd2size,struct indy_resource_entry_type8 *cmd2)
|
||||
{
|
||||
struct indy_resource_entry_type8 cmd;
|
||||
indy_resource_entry_type8 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_LOGRECVD;
|
||||
|
||||
cmd.entry.size = (cmd2size +3 & ~3)+ 0x20;
|
||||
cmd.entry.size = (cmd2size +3 & ~3)+ sizeof(indy_resource_entry_type8);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
|
||||
cmd.data1 = data1;
|
||||
cmd.size = cmd2size;
|
||||
cmd.data2 = data2;
|
||||
send2indyresourcecommands(&cmd,0x20,cmd2,cmd2size);
|
||||
send2indyresourcecommands(&cmd,sizeof(indy_resource_entry_type8),cmd2,cmd2size);
|
||||
}
|
||||
|
||||
|
||||
@@ -328,16 +328,16 @@ void indyrescmdSendDump(s32 rsize,s32 wsize,char *strptr,u32 size2,struct indy_r
|
||||
{
|
||||
indy_resource_entry_type9 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_SENDDUMP;
|
||||
|
||||
cmd.entry.size = (size2 + 3 & 0xfffffffc) + 0x114;
|
||||
cmd.entry.size = (size2 + 3 & 0xfffffffc) + sizeof(indy_resource_entry_type9);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
|
||||
strncpy(cmd.strbuffer,strptr,0x100);
|
||||
strncpy(cmd.strbuffer,strptr,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = '\0';
|
||||
send2indyresourcecommands(&cmd,0x114,cmd2,size2);
|
||||
send2indyresourcecommands(&cmd,sizeof(indy_resource_entry_type9),cmd2,size2);
|
||||
|
||||
}
|
||||
|
||||
@@ -346,13 +346,13 @@ void post_typeA_indyrescmd_app_command_recieved(s32 readsize,s32 writesize,u32 d
|
||||
{
|
||||
indy_resource_entry_typeA cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_APPCMDRECVD;
|
||||
cmd.entry.size = 0x18;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data = data;
|
||||
indycmdSendCommand(&cmd.entry,0x18);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -360,34 +360,34 @@ void indyrescmdRamRomLoad(u32 rsize,u32 wsize,char *name,u32 filesize,u32 ptarge
|
||||
{
|
||||
indy_resource_entry_typeF cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_RAMROMLOAD;
|
||||
cmd.entry.size = 0x11c;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,name,0x100);
|
||||
strncpy(cmd.strbuffer,name,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = '\0';
|
||||
cmd.size = filesize;
|
||||
cmd.hwaddress = ptarget;
|
||||
|
||||
indycmdSendCommand(&cmd,0x11c);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
|
||||
}
|
||||
|
||||
|
||||
void post_type10_indyrescmd_fault_ack_by_host(s32 rsize,s32 wsize,u32 data1,u32 data2,u32 data3)
|
||||
{
|
||||
struct indy_resource_entry_type10 cmd;
|
||||
indy_resource_entry_type10 cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_FAULTACKHOST;
|
||||
cmd.entry.size = 0x20;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
cmd.data1 = data1;
|
||||
cmd.data2 = data2;
|
||||
cmd.data3 = data3;
|
||||
indycmdSendCommand(&cmd,0x20);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -395,16 +395,16 @@ void indyrescmdSendExportFile(u32 rsize,u32 wsize,u8 *ptrstr,u32 size,u8 *hwaddr
|
||||
{
|
||||
indy_resource_entry_typeD cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_EXPORTFILE;
|
||||
cmd.entry.size = 0x11c;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,ptrstr,0x100);
|
||||
strncpy(cmd.strbuffer,ptrstr,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[255] = '\0';
|
||||
cmd.size = size;
|
||||
cmd.hwaddress = hwaddress;
|
||||
indycmdSendCommand(&cmd,0x11c);
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -412,28 +412,28 @@ void post_typeE_indyrescmd_prof_recv(s32 readsize,s32 writesize,u32 data)
|
||||
{
|
||||
indy_resource_entry_typeE cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_PROFILE_RECV;
|
||||
cmd.entry.size = 0x18;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data = data;
|
||||
indycmdSendCommand(&cmd.entry,0x18);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
void indyrescmdSendHostCmd(s32 rsize,s32 wsize,char *strptr)
|
||||
{
|
||||
indy_resource_entry_typeB res;
|
||||
indy_resource_entry_typeB cmd;
|
||||
|
||||
res.entry.resourceID = 0x9abf1623;
|
||||
res.entry.type = INDY_SENDHOSTCMD;
|
||||
res.entry.size = 0x414;
|
||||
res.entry.readsize = rsize;
|
||||
res.entry.writesize = wsize;
|
||||
strncpy(res.strbuffer,strptr,0x400);
|
||||
res.strbuffer[1023] = '\0';
|
||||
indycmdSendCommand(&res,0x414);
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_SENDHOSTCMD;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = rsize;
|
||||
cmd.entry.writesize = wsize;
|
||||
strncpy(cmd.strbuffer,strptr,sizeof(cmd.strbuffer));
|
||||
cmd.strbuffer[1023] = '\0';
|
||||
indycmdSendCommand(&cmd,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -441,13 +441,13 @@ void post_typeC_indyrescmd_prof_send(s32 readsize,s32 writesize,u32 data)
|
||||
{
|
||||
indy_resource_entry_typeC cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_PROFILE_SEND;
|
||||
cmd.entry.size = 0x18;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data = data;
|
||||
indycmdSendCommand(&cmd.entry,0x18);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
@@ -455,156 +455,156 @@ void post_typeA_indyrescmd_app_data_recieved(s32 readsize,s32 writesize,u32 data
|
||||
{
|
||||
indy_resource_entry_typeA cmd;
|
||||
|
||||
cmd.entry.resourceID = 0x9abf1623;
|
||||
cmd.entry.resourceID = INDYMAGIC;
|
||||
cmd.entry.type = INDY_APPCMDRECVD;
|
||||
cmd.entry.size = 0x18;
|
||||
cmd.entry.size = sizeof(cmd);
|
||||
cmd.entry.readsize = readsize;
|
||||
cmd.entry.writesize = writesize;
|
||||
cmd.data = data;
|
||||
indycmdSendCommand(&cmd.entry,0x18);
|
||||
indycmdSendCommand(&cmd.entry,sizeof(cmd));
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendInitPacket(void)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x14,0x14);
|
||||
indyrescmdInit(0x14,0x14);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type0),sizeof(indy_resource_entry_type0));
|
||||
indyrescmdInit(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End));
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_game_data_send(char *strptr)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x114,0x114);
|
||||
post_type3_indyrescmd(0x14,0x14,strptr);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type3),sizeof(indy_resource_entry_type3));
|
||||
post_type3_indyrescmd(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),strptr);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_debug_data_recv(u32 data)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x18,0x18);
|
||||
post_type4_indyrescmd_data_recieved(0x14,0x14,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type4),sizeof(indy_resource_entry_type4));
|
||||
post_type4_indyrescmd_data_recieved(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendHostCheckFileExists(char *strptr)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x114,0x114);
|
||||
indyrescmdCheckFileExists(0x14,0x14,strptr);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type5),sizeof(indy_resource_entry_type5));
|
||||
indyrescmdCheckFileExists(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),strptr);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_debug_printf_recv(u32 data1,u32 data2)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x1c,0x1c);
|
||||
post_type6_indyrescmd_printfrecieved(0x14,0x14,data1,data2);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type6),sizeof(indy_resource_entry_type6));
|
||||
post_type6_indyrescmd_printfrecieved(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data1,data2);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendLoadFile(u8 *filename,u32 size)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x118,0x118);
|
||||
indyrescmdSendFileLoad(0x14,0x14,filename,size);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type7),sizeof(indy_resource_entry_type7));
|
||||
indyrescmdSendFileLoad(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),filename,size);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_1_8_2(u32 data1,u32 data2,u32 size2,struct indy_resource_entry_header *cmd2)
|
||||
{
|
||||
indyrescmdSizeNextCmd((size2 + 3 & 0xfffffffc) + 0x20,0x20);
|
||||
post_type8_indyrescmd_log_recieved(0x14,0x14,data1,data2,size2,cmd2);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq((size2 + 3 & 0xfffffffc) + sizeof(indy_resource_entry_type8),sizeof(indy_resource_entry_type8));
|
||||
post_type8_indyrescmd_log_recieved(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data1,data2,size2,cmd2);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendDump(char *string, u32 size, struct indy_resource_entry_header *data)
|
||||
{
|
||||
indyrescmdSizeNextCmd((size + 3 & 0xfffffffc) + 0x114,0x114);
|
||||
indyrescmdSendDump(0x14,0x14,string,size,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq((size + 3 & 0xfffffffc) + sizeof(indy_resource_entry_type9),sizeof(indy_resource_entry_type9));
|
||||
indyrescmdSendDump(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),string,size,data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_recv_capture_data_success(u32 data)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x18,0x18);
|
||||
post_typeA_indyrescmd_app_command_recieved(0x14,0x14,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeA),sizeof(indy_resource_entry_typeA));
|
||||
post_typeA_indyrescmd_app_command_recieved(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendRamRomLoad(char *strptr,u32 ptarget,u32 filesize)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x11c,0x11c);
|
||||
indyrescmdRamRomLoad(0x14,0x14,strptr,filesize,ptarget);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeF),sizeof(indy_resource_entry_typeF));
|
||||
indyrescmdRamRomLoad(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),strptr,filesize,ptarget);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_1_10_2(u32 param_1,u32 param_2,u32 param_3)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x20,0x20);
|
||||
post_type10_indyrescmd_fault_ack_by_host(0x14,0x14,param_1,param_2,param_3);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_type10),sizeof(indy_resource_entry_type10));
|
||||
post_type10_indyrescmd_fault_ack_by_host(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),param_1,param_2,param_3);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendHostExportFile(char *strptr,u8 *phwaddr,u32 size)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x11c,0x11c);
|
||||
indyrescmdSendExportFile(0x14,0x14,strptr,size,phwaddr);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeD),sizeof(indy_resource_entry_typeD));
|
||||
indyrescmdSendExportFile(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),strptr,size,phwaddr);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_host_prof_recv(u32 data)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x18,0x18);
|
||||
post_typeE_indyrescmd_prof_recv(0x14,0x14,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeE),sizeof(indy_resource_entry_typeE));
|
||||
post_typeE_indyrescmd_prof_recv(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 indycmdSendHostCmdPacket(char *strptr)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x414,0x414);
|
||||
indyrescmdSendHostCmd(0x14,0x14,strptr);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeB),sizeof(indy_resource_entry_typeB));
|
||||
indyrescmdSendHostCmd(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),strptr);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_1_C_2(u32 data)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x18,0x18);
|
||||
post_typeC_indyrescmd_prof_send(0x14,0x14,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeC),sizeof(indy_resource_entry_typeC));
|
||||
post_typeC_indyrescmd_prof_send(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
||||
s32 post_indyrescmd_1_A_2(u32 data)
|
||||
{
|
||||
indyrescmdSizeNextCmd(0x18,0x18);
|
||||
post_typeA_indyrescmd_app_data_recieved(0x14,0x14,data);
|
||||
indyrescmdSendCmdEnd(0,0);
|
||||
indyrescmdStartCmdSeq(sizeof(indy_resource_entry_typeA),sizeof(indy_resource_entry_typeA));
|
||||
post_typeA_indyrescmd_app_data_recieved(sizeof(s_indyResCmd02End),sizeof(s_indyResCmd02End),data);
|
||||
indyrescmdEndCmdSeq(0,0);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
@@ -800,10 +800,9 @@ s32 post_indyrescmd_read_2commands(u8 *buffer1,u32 size1,u8 *buffer2,u32 size2)
|
||||
s32 indyrescmdResponseSize(s32 readsize, s32 writesize)
|
||||
{
|
||||
struct indy_resource_entry_header cmd;
|
||||
u32 ret;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x14);
|
||||
if (cmd.resourceID != 0x9ABF1623)
|
||||
if (cmd.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -832,7 +831,7 @@ s32 indyrescmdResponseEnd(s32 readsize, s32 writesize)
|
||||
struct indy_resource_entry_header cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x14);
|
||||
if (cmd.resourceID != 0x9ABF1623)
|
||||
if (cmd.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -862,7 +861,7 @@ s32 post_indyrescmd_istype4_correctvalue(s32 readsize, s32 writesize, u32 *respo
|
||||
struct indy_resource_entry_type4 cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x18);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -892,7 +891,7 @@ s32 indyrescmdResponseFileExists(s32 readsize, s32 writesize, u32 *response1, u3
|
||||
struct indy_resource_entry_type6 cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x1C);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -923,7 +922,7 @@ s32 indyrescmdResponseRecieveFile(s32 readsize, s32 writesize, u32 *response1, u
|
||||
struct indy_resource_entry_type8 cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x20);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -956,7 +955,7 @@ s32 indyrescmdResponseSendDump(s32 readsize, s32 writesize, u32 *response)
|
||||
struct indy_resource_entry_typeA cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x18);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -986,7 +985,7 @@ s32 indyrescmdResponseRecieveRamRom(s32 readsize, s32 writesize, u32 *data1, u32
|
||||
struct indy_resource_entry_type10 cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x20);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1018,7 +1017,7 @@ s32 indyrescmdResponseHostExportFile(s32 readsize, s32 writesize, u32 *response)
|
||||
indy_resource_entry_typeE cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x18);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1048,7 +1047,7 @@ s32 indyrescmdResponseHostCmdPacket(s32 readsize, s32 writesize, u32 *response)
|
||||
indy_resource_entry_typeC cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x18);
|
||||
if (cmd.entry.resourceID != 0x9ABF1623)
|
||||
if (cmd.entry.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
@@ -1141,7 +1140,7 @@ s32 response_indyrescmd_curr_matches_expected(s32 readsize, s32 writesize)
|
||||
struct indy_resource_entry_header cmd;
|
||||
|
||||
indycmdRecieveCommand(&cmd, 0x14);
|
||||
if (cmd.resourceID != 0x9ABF1623)
|
||||
if (cmd.resourceID != INDYMAGIC)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+14
-12
@@ -2,10 +2,12 @@
|
||||
#define _INDY_COMMANDS_H_
|
||||
#include <ultra64.h>
|
||||
|
||||
#define INDYMAGIC 0x9abf1623
|
||||
|
||||
typedef enum INDYCMDTYPE {
|
||||
INDY_INIT=0,
|
||||
INDY_SIZE=1,
|
||||
INDY_END=2,
|
||||
INDY_STARTCMDSEQ=1,
|
||||
INDY_ENDCMDSEQ=2,
|
||||
INDY_RESCMD=3,
|
||||
INDY_RESCMDDATARCVD=4,
|
||||
INDY_SENDCHECKFILEEXISTS=5,
|
||||
@@ -38,9 +40,9 @@ typedef struct indy_resource_entry_type1 {
|
||||
indy_resource_entry_header entry;
|
||||
} indy_resource_entry_type1;
|
||||
|
||||
typedef struct indy_resource_entry_type2 {
|
||||
typedef struct s_indyResCmd02End {
|
||||
indy_resource_entry_header entry;
|
||||
} indy_resource_entry_type2;
|
||||
} s_indyResCmd02End;
|
||||
|
||||
typedef struct indy_resource_entry_type3 {
|
||||
indy_resource_entry_header entry;
|
||||
@@ -57,24 +59,24 @@ typedef struct indy_resource_entry_type5 {
|
||||
u8 strbuffer[256];
|
||||
} indy_resource_entry_type5;
|
||||
|
||||
struct indy_resource_entry_type6 {
|
||||
typedef struct indy_resource_entry_type6 {
|
||||
struct indy_resource_entry_header entry;
|
||||
u32 data1;
|
||||
u32 data2;
|
||||
};
|
||||
} indy_resource_entry_type6;
|
||||
|
||||
struct indy_resource_entry_type7 {
|
||||
typedef struct indy_resource_entry_type7 {
|
||||
struct indy_resource_entry_header entry;
|
||||
u8 strbuffer[256];
|
||||
u32 size;
|
||||
};
|
||||
} indy_resource_entry_type7;
|
||||
|
||||
struct indy_resource_entry_type8 {
|
||||
typedef struct indy_resource_entry_type8 {
|
||||
struct indy_resource_entry_header entry;
|
||||
u32 data1;
|
||||
u32 data2;
|
||||
u32 size;
|
||||
};
|
||||
} indy_resource_entry_type8;
|
||||
|
||||
typedef struct indy_resource_entry_type9 {
|
||||
indy_resource_entry_header entry;
|
||||
@@ -115,12 +117,12 @@ typedef struct indy_resource_entry_typeF {
|
||||
u8* hwaddress;
|
||||
} indy_resource_entry_typeF;
|
||||
|
||||
struct indy_resource_entry_type10 {
|
||||
typedef struct indy_resource_entry_type10 {
|
||||
struct indy_resource_entry_header entry;
|
||||
u32 data1;
|
||||
u32 data2;
|
||||
u32 data3;
|
||||
};
|
||||
} indy_resource_entry_type10;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ void init_player_BONDdata_stats(void) {
|
||||
g_CurrentPlayer->field_FD0 = 0;
|
||||
g_CurrentPlayer->z_trigger_timer = 0;
|
||||
g_CurrentPlayer->field_FD8 = 0;
|
||||
g_CurrentPlayer->field_FDC = 0xFF;
|
||||
g_CurrentPlayer->field_FDD = 0xFF;
|
||||
g_CurrentPlayer->field_FDE = 0xFF;
|
||||
g_CurrentPlayer->field_FDF = 0;
|
||||
g_CurrentPlayer->tileColor.rgba[0] = 0xFF;
|
||||
g_CurrentPlayer->tileColor.rgba[1] = 0xFF;
|
||||
g_CurrentPlayer->tileColor.rgba[2] = 0xFF;
|
||||
g_CurrentPlayer->tileColor.rgba[3] = 0;
|
||||
g_CurrentPlayer->resetshadecol = 1;
|
||||
g_CurrentPlayer->field_FE4 = 0;
|
||||
g_CurrentPlayer->aimtype = 0;
|
||||
g_CurrentPlayer->crosshair_angle[] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_angle[] = 0.0f;
|
||||
g_CurrentPlayer->crosshair_x_pos = 0.0f;
|
||||
@@ -135,7 +135,7 @@ void init_player_BONDdata_stats(void) {
|
||||
g_CurrentPlayer->gun_azimuth_turning = 0.0f;
|
||||
g_CurrentPlayer->gunaimdamp = 0.9f;
|
||||
g_CurrentPlayer->field_1010 = 0.0f;
|
||||
g_CurrentPlayer->holds_neg_pi = -3.1415927f;
|
||||
g_CurrentPlayer->holds_neg_pi = -M_PI_F;
|
||||
g_CurrentPlayer->unk1018 = 0.0f;
|
||||
g_CurrentPlayer->copiedgoldeneye = FALSE;
|
||||
g_CurrentPlayer->magnetattracttime = -1;
|
||||
|
||||
@@ -55,6 +55,7 @@ struct BONDdata_item_control_blocks {
|
||||
int field_C4;
|
||||
int field_C8;
|
||||
int field_CC;
|
||||
// "reload flag", set when pressing B
|
||||
int field_D0;
|
||||
float field_D4;
|
||||
int field_D8;
|
||||
|
||||
@@ -76,11 +76,11 @@ void sets_a_bunch_of_BONDdata_values_to_default(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
sub_GAME_7F075FAC(&g_CurrentPlayer->model, &player_gait_object_header, &g_CurrentPlayer->field_654);
|
||||
animInit(&g_CurrentPlayer->model, &player_gait_object_header, &g_CurrentPlayer->field_654);
|
||||
modelSetScale(&g_CurrentPlayer->model, IDO_POINT_ONE);
|
||||
|
||||
#if defined (BUGFIX_R1)
|
||||
modelSetAnimRateForDuration(&g_CurrentPlayer->model, ANIMRATE, 0.0f);
|
||||
modelSetAnimPlaySpeed(&g_CurrentPlayer->model, ANIMRATE, 0.0f);
|
||||
#endif
|
||||
|
||||
g_CurrentPlayer->headanim = 0;
|
||||
@@ -90,55 +90,49 @@ void sets_a_bunch_of_BONDdata_values_to_default(void)
|
||||
g_CurrentPlayer->headwalkingtime60 = 0;
|
||||
g_CurrentPlayer->headamplitude = 1.0f;
|
||||
g_CurrentPlayer->sideamplitude = 1.0f;
|
||||
g_CurrentPlayer->headpos[0] = 0.0f;
|
||||
g_CurrentPlayer->headpos[1] = 0.0f;
|
||||
g_CurrentPlayer->headpos[2] = 0.0f;
|
||||
g_CurrentPlayer->headlook[0] = 0.0f;
|
||||
g_CurrentPlayer->headlook[1] = 0.0f;
|
||||
g_CurrentPlayer->headlook[2] = 0.0f;
|
||||
g_CurrentPlayer->headup[0] = 0.0f;
|
||||
g_CurrentPlayer->headup[1] = 0.0f;
|
||||
g_CurrentPlayer->headup[2] = 0.0f;
|
||||
g_CurrentPlayer->headpossum[0] = 0.0f;
|
||||
g_CurrentPlayer->headpossum[1] = 0.0f;
|
||||
g_CurrentPlayer->headpossum[2] = 0.0f;
|
||||
g_CurrentPlayer->headlooksum[0] = 0.0f;
|
||||
g_CurrentPlayer->headlooksum[1] = 0.0f;
|
||||
g_CurrentPlayer->headpos.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headpos.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headpos.f[2] = 0.0f;
|
||||
g_CurrentPlayer->headlook.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headlook.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headlook.f[2] = 0.0f;
|
||||
g_CurrentPlayer->headup.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headup.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headup.f[2] = 0.0f;
|
||||
g_CurrentPlayer->headpossum.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headpossum.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headpossum.f[2] = 0.0f;
|
||||
g_CurrentPlayer->headlooksum.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headlooksum.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headlooksum.f[2] = HEADSUM;
|
||||
|
||||
|
||||
g_CurrentPlayer->headlooksum[2] = HEADSUM;
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum[0] = 0.0f;
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum[1] = HEADSUM;
|
||||
|
||||
|
||||
g_CurrentPlayer->headupsum[2] = 0.0f;
|
||||
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->headbodyoffset[0] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset[1] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset[2] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset.f[0] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset.f[1] = 0.0f;
|
||||
g_CurrentPlayer->headbodyoffset.f[2] = 0.0f;
|
||||
g_CurrentPlayer->standheight = 0.0f;
|
||||
g_CurrentPlayer->standbodyoffset.x = 0.0f;
|
||||
g_CurrentPlayer->standbodyoffset.y = 0.0f;
|
||||
g_CurrentPlayer->standbodyoffset.z = 0.0f;
|
||||
g_CurrentPlayer->standfrac = 0.0f;
|
||||
g_CurrentPlayer->standlook[0][0] = 0.0f;
|
||||
g_CurrentPlayer->standlook[0][1] = 0.0f;
|
||||
g_CurrentPlayer->standlook[0][2] = 1.0f;
|
||||
g_CurrentPlayer->standlook[1][0] = 0.0f;
|
||||
g_CurrentPlayer->standlook[1][1] = 0.0f;
|
||||
g_CurrentPlayer->standlook[1][2] = 1.0f;
|
||||
g_CurrentPlayer->standup[0][0] = 0.0f;
|
||||
g_CurrentPlayer->standup[0][1] = 1.0f;
|
||||
g_CurrentPlayer->standup[0][2] = 0.0f;
|
||||
g_CurrentPlayer->standup[1][0] = 0.0f;
|
||||
g_CurrentPlayer->standup[1][1] = 1.0f;
|
||||
g_CurrentPlayer->standup[1][2] = 0.0f;
|
||||
g_CurrentPlayer->standlook[0].f[0] = 0.0f;
|
||||
g_CurrentPlayer->standlook[0].f[1] = 0.0f;
|
||||
g_CurrentPlayer->standlook[0].f[2] = 1.0f;
|
||||
g_CurrentPlayer->standlook[1].f[0] = 0.0f;
|
||||
g_CurrentPlayer->standlook[1].f[1] = 0.0f;
|
||||
g_CurrentPlayer->standlook[1].f[2] = 1.0f;
|
||||
g_CurrentPlayer->standup[0].f[0] = 0.0f;
|
||||
g_CurrentPlayer->standup[0].f[1] = 1.0f;
|
||||
g_CurrentPlayer->standup[0].f[2] = 0.0f;
|
||||
g_CurrentPlayer->standup[1].f[0] = 0.0f;
|
||||
g_CurrentPlayer->standup[1].f[1] = 1.0f;
|
||||
g_CurrentPlayer->standup[1].f[2] = 0.0f;
|
||||
g_CurrentPlayer->standcnt = 0;
|
||||
|
||||
for (i=0; i<2; i++)
|
||||
|
||||
@@ -32,10 +32,6 @@ void reset_counter_rand_body_head(void)
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
//close, ops swapped
|
||||
//34d80: addu s1,s1,v0 | 34d80: addiu s0,s0,1
|
||||
//34d84: addiu s0,s0,1 | 34d84: addu s1,s1,v0
|
||||
u32 sub_GAME_7F0001F0(void *ani,int aniid,int param_3)
|
||||
{
|
||||
short asStack8 [4];
|
||||
@@ -46,59 +42,12 @@ u32 sub_GAME_7F0001F0(void *ani,int aniid,int param_3)
|
||||
i = 0;
|
||||
while (aniid < param_3) {
|
||||
uVar1 = sub_GAME_7F06D2E4(0,0,&skeleton_guard,ani,aniid,asStack8);
|
||||
aniid=1+aniid;
|
||||
i = i + uVar1 & 0xffff;
|
||||
aniid=1+aniid;
|
||||
|
||||
}
|
||||
return i;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F0001F0
|
||||
/* 034D20 7F0001F0 27BDFFB8 */ addiu $sp, $sp, -0x48
|
||||
/* 034D24 7F0001F4 AFB30028 */ sw $s3, 0x28($sp)
|
||||
/* 034D28 7F0001F8 AFB20024 */ sw $s2, 0x24($sp)
|
||||
/* 034D2C 7F0001FC AFB10020 */ sw $s1, 0x20($sp)
|
||||
/* 034D30 7F000200 AFB0001C */ sw $s0, 0x1c($sp)
|
||||
/* 034D34 7F000204 00A6082A */ slt $at, $a1, $a2
|
||||
/* 034D38 7F000208 00A08025 */ move $s0, $a1
|
||||
/* 034D3C 7F00020C 00C09025 */ move $s2, $a2
|
||||
/* 034D40 7F000210 00809825 */ move $s3, $a0
|
||||
/* 034D44 7F000214 AFBF0034 */ sw $ra, 0x34($sp)
|
||||
/* 034D48 7F000218 AFB50030 */ sw $s5, 0x30($sp)
|
||||
/* 034D4C 7F00021C AFB4002C */ sw $s4, 0x2c($sp)
|
||||
/* 034D50 7F000220 10200011 */ beqz $at, .L7F000268
|
||||
/* 034D54 7F000224 00008825 */ move $s1, $zero
|
||||
/* 034D58 7F000228 3C148004 */ lui $s4, %hi(skeleton_guard)
|
||||
/* 034D5C 7F00022C 2694D400 */ addiu $s4, %lo(skeleton_guard) # addiu $s4, $s4, -0x2c00
|
||||
/* 034D60 7F000230 27B50040 */ addiu $s5, $sp, 0x40
|
||||
.L7F000234:
|
||||
/* 034D64 7F000234 00002025 */ move $a0, $zero
|
||||
/* 034D68 7F000238 00002825 */ move $a1, $zero
|
||||
/* 034D6C 7F00023C 02803025 */ move $a2, $s4
|
||||
/* 034D70 7F000240 02603825 */ move $a3, $s3
|
||||
/* 034D74 7F000244 AFB00010 */ sw $s0, 0x10($sp)
|
||||
/* 034D78 7F000248 0FC1B4B9 */ jal sub_GAME_7F06D2E4
|
||||
/* 034D7C 7F00024C AFB50014 */ sw $s5, 0x14($sp)
|
||||
/* 034D80 7F000250 02228821 */ addu $s1, $s1, $v0
|
||||
/* 034D84 7F000254 26100001 */ addiu $s0, $s0, 1
|
||||
/* 034D88 7F000258 322EFFFF */ andi $t6, $s1, 0xffff
|
||||
/* 034D8C 7F00025C 0212082A */ slt $at, $s0, $s2
|
||||
/* 034D90 7F000260 1420FFF4 */ bnez $at, .L7F000234
|
||||
/* 034D94 7F000264 01C08825 */ move $s1, $t6
|
||||
.L7F000268:
|
||||
/* 034D98 7F000268 8FBF0034 */ lw $ra, 0x34($sp)
|
||||
/* 034D9C 7F00026C 02201025 */ move $v0, $s1
|
||||
/* 034DA0 7F000270 8FB10020 */ lw $s1, 0x20($sp)
|
||||
/* 034DA4 7F000274 8FB0001C */ lw $s0, 0x1c($sp)
|
||||
/* 034DA8 7F000278 8FB20024 */ lw $s2, 0x24($sp)
|
||||
/* 034DAC 7F00027C 8FB30028 */ lw $s3, 0x28($sp)
|
||||
/* 034DB0 7F000280 8FB4002C */ lw $s4, 0x2c($sp)
|
||||
/* 034DB4 7F000284 8FB50030 */ lw $s5, 0x30($sp)
|
||||
/* 034DB8 7F000288 03E00008 */ jr $ra
|
||||
/* 034DBC 7F00028C 27BD0048 */ addiu $sp, $sp, 0x48
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -204,7 +204,7 @@ s32 animation_table_ptrs1[] = {
|
||||
0
|
||||
};
|
||||
|
||||
s32 animation_table_ptrs2[] = {
|
||||
struct ModelAnimation *animation_table_ptrs2[] = {
|
||||
PTR_ANIM_helicopter_cradle,
|
||||
PTR_ANIM_plane_runway,
|
||||
PTR_ANIM_helicopter_takeoff,
|
||||
|
||||
@@ -25,16 +25,16 @@ extern struct animation_table_data* ptr_animation_table;
|
||||
|
||||
/**
|
||||
* Contains offsets into ptr_animation_table for player and guard animations.
|
||||
* The index of each value corresponds to `enum ANIMATIONS`.
|
||||
* The index of each value corresponds to `enum ANIMATION`.
|
||||
* The value corresponds to (e.g. index=0) PTR_ANIM_idle (same as ANIM_DATA_idle)
|
||||
*/
|
||||
extern s32 animation_table_ptrs1[];
|
||||
|
||||
/**
|
||||
* Contains offsets into ptr_animation_table for object/vehicle animations.
|
||||
* The index of each value corresponds to `enum AIRCRAFT_ANIMATIONS`.
|
||||
* The index of each value corresponds to `enum AIRCRAFT_ANIMATION`.
|
||||
* The value corresponds to (e.g. index=0) PTR_ANIM_helicopter_cradle (same as ANIM_DATA_helicopter_cradle)
|
||||
*/
|
||||
extern s32 animation_table_ptrs2[];
|
||||
extern struct ModelAnimation * animation_table_ptrs2[];
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,8 +28,8 @@ void initGameData(void) {
|
||||
intro_character_index = 0;
|
||||
randomly_selected_intro_animation = 0;
|
||||
intro_animation_count = 0;
|
||||
objinstance = 0;
|
||||
ptrobjinstance = 0;
|
||||
cast_model = 0;
|
||||
cast_model_weapon = 0;
|
||||
full_actor_intro = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ void init_guards(void) {
|
||||
D_8002CC58 = 0;
|
||||
show_patrols_flag = 0;
|
||||
player1_guardID = 0x1388;
|
||||
ptr_guard_data = 0;
|
||||
num_guards = 0;
|
||||
g_ChrSlots = 0;
|
||||
g_NumChrSlots = 0;
|
||||
init_obj_register_difficulty_vals();
|
||||
}
|
||||
|
||||
@@ -27,18 +27,18 @@ void alloc_init_GUARDdata_entries(s32 count)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
num_guards = count + 0xA;
|
||||
g_NumChrSlots = count + 0xA;
|
||||
|
||||
ptr_guard_data = mempAllocBytesInBank(align_addr_zero(num_guards*sizeof(ChrRecord)), 4);
|
||||
for(i = 0; num_guards > i; i++)
|
||||
g_ChrSlots = mempAllocBytesInBank(align_addr_zero(g_NumChrSlots*sizeof(ChrRecord)), 4);
|
||||
for(i = 0; g_NumChrSlots > i; i++)
|
||||
{
|
||||
ptr_guard_data[i].model = 0;
|
||||
g_ChrSlots[i].model = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void set_new_rand_head_bodies(u32 stagenum)
|
||||
void bodiesReset(u32 stagenum)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
void init_guards(void);
|
||||
void set_new_rand_head_bodies(u32 stagenum);
|
||||
void bodiesReset(u32 stagenum);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -31,7 +31,7 @@ void init_menus_or_reset(void)
|
||||
menu_update = MENU_FILE_SELECT;
|
||||
}
|
||||
|
||||
ptr_logo_and_walletbond_DL = (Gfx *)mempAllocBytesInBank(0x78000, 4);
|
||||
ptr_logo_and_walletbond_DL = (u8 *)mempAllocBytesInBank(0x78000, 4);
|
||||
|
||||
#if defined(VERSION_EU)
|
||||
ptr_menu_videobuffer = mempAllocBytesInBank(0x55040, 4);
|
||||
|
||||
+26
-26
@@ -6,12 +6,12 @@
|
||||
#include "chrobjhandler.h"
|
||||
//this file may very well be a few different sub files
|
||||
|
||||
struct object_animation_controller g_InitialMonitorAnimController = {&monAnim00Bond, 0, 0xFFFF, 0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 1.0, 0.0};
|
||||
MonitorRecord g_InitialMonitorAnimController = {&monAnim00Bond, 0, 0xFFFF, 0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 1.0, 0.0};
|
||||
struct object_animation_controller g_InitialUnknownAnimController = {&monAnim34, 0, 0xFFFF, 0, 0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1.0};
|
||||
struct object_animation_controller g_InitialTaserAnimController = {&monAnim35Taser, 0, 0xFFFF, 0, 0, 1.0, 0.0, 0.0, 1.0, 1.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.5, 0.0, 0.0, 0.5, 0.5, 0.5, 0.0, 0.0, 0.5, 0.5, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1.0};
|
||||
|
||||
f32 unused_8002a3bc = 0.0f;
|
||||
f32 scale_1_0_item_related = 1.0f;
|
||||
f32 g_DoorScale = 1.0f;
|
||||
|
||||
// forward declarations
|
||||
|
||||
@@ -70,23 +70,23 @@ void alloc_lookup_buffers(void)
|
||||
s32 i;
|
||||
|
||||
ptr_list_object_lookup_indices = (s16*)mempAllocBytesInBank(PTR_LIST_OBJECT_LOOKUP_INDICES_LEN * sizeof(s16), 4);
|
||||
ptr_room_lookup_buffer_maybe = (s16*)mempAllocBytesInBank((((MaxNumRooms * 4) + 0xF) | 0xF) ^ 0xF, 4);
|
||||
dword_CODE_bss_8007161C = (s16*)mempAllocBytesInBank(BSS_8007161C_LEN * sizeof(struct unk_8007161c), 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[0] = -1;
|
||||
|
||||
for (i=0; i<MaxNumRooms; i++)
|
||||
{
|
||||
ptr_room_lookup_buffer_maybe[i] = -1;
|
||||
RoomPropListChunkIndexes[i] = -1;
|
||||
}
|
||||
|
||||
for (i=0; i<BSS_8007161C_LEN; i++)
|
||||
{
|
||||
dword_CODE_bss_8007161C[i].data[0] = -2;
|
||||
RoomPropListChunks[i].propnums[0] = -2;
|
||||
|
||||
for (j=1; j<BSS_8007161C_DATA_LEN; j++)
|
||||
{
|
||||
dword_CODE_bss_8007161C[i].data[j] = -1;
|
||||
RoomPropListChunks[i].propnums[j] = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -115,48 +115,48 @@ void reinit_between_menus(void)
|
||||
clock_drawn_flag = 1;
|
||||
clock_enable = 0;
|
||||
clock_time = 0.0f;
|
||||
D_80030AF4 = 0;
|
||||
g_RemoteMineOwnerTriggerFlag = 0;
|
||||
|
||||
for (i=0; i<PROJECTILEDATA_START_ADDRESS_LEN; i++)
|
||||
for (i = 0; i < MAX_WEAPON_SLOTS; i++)
|
||||
{
|
||||
ProjectileData_start_address[i].unk10 = 0;
|
||||
g_WeaponSlots[i].prop = NULL;
|
||||
}
|
||||
|
||||
D_80030AF8 = 0;
|
||||
g_NextWeaponSlot = 0;
|
||||
|
||||
for (i=0; i<BSS_80072E70_DATA_LEN; i++)
|
||||
for (i = 0; i < MAX_HAT_SLOTS; i++)
|
||||
{
|
||||
dword_CODE_bss_80072E70[i].unk10 = 0;
|
||||
g_HatSlots[i].prop = NULL;
|
||||
}
|
||||
|
||||
D_80030AFC = 0;
|
||||
g_NextHatSlot = 0;
|
||||
|
||||
for (i=0; i<BSS_80073370_DATA_LEN; i++)
|
||||
for (i=0; i < MAX_AMMO_CRATES; i++)
|
||||
{
|
||||
dword_CODE_bss_80073370[i].unk10 = 0;
|
||||
g_AmmoCrates[i].prop = NULL;
|
||||
}
|
||||
|
||||
for (i=0; i<BSS_80073DC0_DATA_LEN; i++)
|
||||
for (i = 0; i < PROJECTILES_ARR_MAX; i++)
|
||||
{
|
||||
dword_CODE_bss_80073DC0[i].unk00 = 0x80000000;
|
||||
dword_CODE_bss_80073DC0[i].unk98 = 0;
|
||||
dword_CODE_bss_80073DC0[i].unk9C = 0;
|
||||
g_Projectiles[i].flags = 0x80000000;
|
||||
g_Projectiles[i].sound1 = NULL;
|
||||
g_Projectiles[i].sound2 = NULL;
|
||||
}
|
||||
|
||||
for (i=0; i<BSS_80075030_DATA_LEN; i++)
|
||||
for (i = 0; i < EMBEDMENT_ARR_MAX; i++)
|
||||
{
|
||||
dword_CODE_bss_80075030[i].unk00 = 1;
|
||||
g_Embedments[i].flags = 1;
|
||||
}
|
||||
|
||||
g_LevelLoadPropSwitch = NULL;
|
||||
g_LevelLoadPropLockDoor = NULL;
|
||||
g_LevelLoadPropSafeItem = NULL;
|
||||
D_80030B0C = 0;
|
||||
D_80030B0C = NULL;
|
||||
bodypartshot = -1;
|
||||
F_80030B14 = 1.0f;
|
||||
F_80030B18 = 1.0f;
|
||||
F_80030B1C = 1.0f;
|
||||
F_80030B20 = 1.0f;
|
||||
g_AutogunPendingDamageTick = 1.0f;
|
||||
g_AutogunDamageScalar = 1.0f;
|
||||
F_80030B24 = 1.0f;
|
||||
g_SoloAmmoMultiplier = 1.0f;
|
||||
}
|
||||
@@ -199,7 +199,7 @@ void initSetLevelLoadPropSafeItem(struct ObjectRecord *arg0)
|
||||
*/
|
||||
void write_monitor_ani_control_blocks(void)
|
||||
{
|
||||
struct object_animation_controller spEC;
|
||||
MonitorRecord spEC;
|
||||
struct object_animation_controller sp78;
|
||||
struct object_animation_controller sp4;
|
||||
|
||||
|
||||
+37
-180
@@ -22,7 +22,7 @@ s32 sub_GAME_7F056850(PadRecord *arg0, StandTile *arg1, f32 arg2, PadRecord *arg
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ((arg2 > 0.0f) && (sub_GAME_7F0B18B8(arg4, arg3->pos.f[0], arg3->pos.f[2], arg2, 0x1F, 0.0f, 1.0f) >= 0))
|
||||
if ((arg2 > 0.0f) && (stanTestVolume(arg4, arg3->pos.f[0], arg3->pos.f[2], arg2, 0x1F, 0.0f, 1.0f) >= 0))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -242,7 +242,7 @@ void setupUpdateObjectRoomPosition(ObjectRecord *obj)
|
||||
PropRecord *temp_s1;
|
||||
struct coord3d sp40;
|
||||
struct coord3d sp34;
|
||||
struct modeldata_unk_pos *sp30;
|
||||
struct ModelRoData_BoundingBoxRecord *sp30;
|
||||
f32 phi_f20;
|
||||
|
||||
temp_s1 = obj->prop;
|
||||
@@ -263,7 +263,7 @@ void setupUpdateObjectRoomPosition(ObjectRecord *obj)
|
||||
}
|
||||
else
|
||||
{
|
||||
sp30 = sub_GAME_7F040078(obj);
|
||||
sp30 = chrobjGetBboxFromObjectRecord(obj);
|
||||
|
||||
if (sp30 != NULL)
|
||||
{
|
||||
@@ -386,196 +386,53 @@ struct ObjectRecord *setupCommandGetObject(s32 stageID, s32 index)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
||||
PropRecord *setupFindObjForReuse(s32 stageID, PropRecord **arg1, PropRecord **arg2, s32 arg3, s32 arg4, s32 arg5)
|
||||
ObjectRecord *setupFindObjForReuse(s32 wanttype, ObjectRecord **offscreenobjptr, ObjectRecord **anyobjptr, bool musthaveprop, bool musthavemodel, ModelFileHeader *modeldef)
|
||||
{
|
||||
PropRecord *temp_s0;
|
||||
PropRecord *temp_s0_2;
|
||||
u8 temp_v1;
|
||||
u8 temp_v1_2;
|
||||
void * temp_v0;
|
||||
u8 phi_v1;
|
||||
PropRecord *phi_s0;
|
||||
PropRecord *phi_s2;
|
||||
PropRecord *phi_s3;
|
||||
PropRecord *phi_s2_2;
|
||||
PropRecord *phi_s3_2;
|
||||
PropRecord *phi_s2_3;
|
||||
PropRecord *phi_s3_3;
|
||||
ObjectRecord *offscreenobj = NULL;
|
||||
ObjectRecord *anyobj = NULL;
|
||||
|
||||
u32 *cmd = g_CurrentSetup.propDefs;
|
||||
|
||||
temp_s0 = g_CurrentSetup.props;
|
||||
phi_s0 = temp_s0;
|
||||
phi_s2 = NULL;
|
||||
phi_s3 = NULL;
|
||||
phi_s2_2 = NULL;
|
||||
phi_s3_2 = NULL;
|
||||
if (temp_s0 != 0)
|
||||
if (cmd)
|
||||
{
|
||||
temp_v1 = temp_s0->unk3;
|
||||
phi_v1 = temp_v1;
|
||||
if (temp_v1 != 0x30)
|
||||
while ((u8)cmd[0] != PROPDEF_END)
|
||||
{
|
||||
loop_3:
|
||||
phi_s2_3 = phi_s2;
|
||||
phi_s3_3 = phi_s3;
|
||||
phi_s2_3 = phi_s2;
|
||||
if ((stageID & 0xFF) == phi_v1)
|
||||
if ((wanttype & 0xff) == (u8)cmd[0])
|
||||
{
|
||||
temp_v0 = phi_s0->pos.AsArray[2];
|
||||
if (temp_v0 == 0)
|
||||
ObjectRecord *obj = (ObjectRecord *)cmd;
|
||||
|
||||
if (obj->prop == NULL)
|
||||
{
|
||||
if ((arg3 == 0) && (arg4 == 0))
|
||||
if (!musthaveprop && !musthavemodel)
|
||||
{
|
||||
return phi_s0;
|
||||
}
|
||||
goto block_19;
|
||||
}
|
||||
if ((stageID != 8) && ((phi_s0->unk64 & 0x80) == 0) && ((phi_s0->unk2 & 4) == 0) && (temp_v0->unk1C == 0) && ((arg4 == 0) || (modelmgrCanSlotFitRwdata(phi_s0->stan, arg5) != 0)))
|
||||
{
|
||||
if ((phi_s2 == 0) && ((phi_s0->pos.AsArray[2]->unk1 & 2) == 0))
|
||||
{
|
||||
phi_s2_3 = phi_s0;
|
||||
}
|
||||
if (phi_s3 == 0)
|
||||
{
|
||||
phi_s3_3 = phi_s0;
|
||||
return obj;
|
||||
}
|
||||
}
|
||||
else if (wanttype != PROP_TYPE_SMOKE
|
||||
&& (obj->runtime_bitflags & RUNTIMEBITFLAG_DEPOSIT) == 0
|
||||
&& (obj->state & PROPSTATE_RESPAWN) == 0
|
||||
&& obj->prop->parent == NULL
|
||||
&& (!musthavemodel || modelmgrCanSlotFitRwdata(obj->model, modeldef)))
|
||||
{
|
||||
if (offscreenobj == NULL && (obj->prop->flags & PROPFLAG_ONSCREEN) == 0)
|
||||
{
|
||||
offscreenobj = obj;
|
||||
}
|
||||
|
||||
if (anyobj == NULL)
|
||||
{
|
||||
anyobj = obj;
|
||||
}
|
||||
}
|
||||
goto block_19;
|
||||
}
|
||||
block_19:
|
||||
temp_s0_2 = (sizepropdef(phi_s0) * 4) + phi_s0;
|
||||
temp_v1_2 = temp_s0_2->unk3;
|
||||
phi_v1 = temp_v1_2;
|
||||
phi_s0 = temp_s0_2;
|
||||
phi_s2 = phi_s2_3;
|
||||
phi_s3 = phi_s3_3;
|
||||
phi_s2_2 = phi_s2_3;
|
||||
phi_s3_2 = phi_s3_3;
|
||||
if (temp_v1_2 == 0x30)
|
||||
{
|
||||
goto block_20;
|
||||
}
|
||||
goto loop_3;
|
||||
|
||||
cmd = cmd + sizepropdef(cmd);
|
||||
}
|
||||
}
|
||||
block_20:
|
||||
*arg1 = phi_s2_2;
|
||||
*arg2 = phi_s3_2;
|
||||
|
||||
*offscreenobjptr = offscreenobj;
|
||||
*anyobjptr = anyobj;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel setupFindObjForReuse
|
||||
/* 08BA38 7F056F08 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 08BA3C 7F056F0C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 08BA40 7F056F10 3C108007 */ lui $s0, %hi(g_CurrentSetup+0x0c)
|
||||
/* 08BA44 7F056F14 8E105D0C */ lw $s0, %lo(g_CurrentSetup+0x0c)($s0)
|
||||
/* 08BA48 7F056F18 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* 08BA4C 7F056F1C AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* 08BA50 7F056F20 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 08BA54 7F056F24 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 08BA58 7F056F28 0080B825 */ move $s7, $a0
|
||||
/* 08BA5C 7F056F2C 00E0F025 */ move $fp, $a3
|
||||
/* 08BA60 7F056F30 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 08BA64 7F056F34 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* 08BA68 7F056F38 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* 08BA6C 7F056F3C AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 08BA70 7F056F40 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 08BA74 7F056F44 AFA50044 */ sw $a1, 0x44($sp)
|
||||
/* 08BA78 7F056F48 AFA60048 */ sw $a2, 0x48($sp)
|
||||
/* 08BA7C 7F056F4C 00009025 */ move $s2, $zero
|
||||
/* 08BA80 7F056F50 12000039 */ beqz $s0, .L7F057038
|
||||
/* 08BA84 7F056F54 00009825 */ move $s3, $zero
|
||||
/* 08BA88 7F056F58 92030003 */ lbu $v1, 3($s0)
|
||||
/* 08BA8C 7F056F5C 24010030 */ li $at, 48
|
||||
/* 08BA90 7F056F60 309400FF */ andi $s4, $a0, 0xff
|
||||
/* 08BA94 7F056F64 10610034 */ beq $v1, $at, .L7F057038
|
||||
/* 08BA98 7F056F68 24160008 */ li $s6, 8
|
||||
/* 08BA9C 7F056F6C 8FB50054 */ lw $s5, 0x54($sp)
|
||||
/* 08BAA0 7F056F70 8FB10050 */ lw $s1, 0x50($sp)
|
||||
.L7F056F74:
|
||||
/* 08BAA4 7F056F74 16830028 */ bne $s4, $v1, .L7F057018
|
||||
/* 08BAA8 7F056F78 00000000 */ nop
|
||||
/* 08BAAC 7F056F7C 8E020010 */ lw $v0, 0x10($s0)
|
||||
/* 08BAB0 7F056F80 14400007 */ bnez $v0, .L7F056FA0
|
||||
/* 08BAB4 7F056F84 00000000 */ nop
|
||||
/* 08BAB8 7F056F88 17C00023 */ bnez $fp, .L7F057018
|
||||
/* 08BABC 7F056F8C 00000000 */ nop
|
||||
/* 08BAC0 7F056F90 16200021 */ bnez $s1, .L7F057018
|
||||
/* 08BAC4 7F056F94 00000000 */ nop
|
||||
/* 08BAC8 7F056F98 1000002C */ b .L7F05704C
|
||||
/* 08BACC 7F056F9C 02001025 */ move $v0, $s0
|
||||
.L7F056FA0:
|
||||
/* 08BAD0 7F056FA0 12F6001D */ beq $s7, $s6, .L7F057018
|
||||
/* 08BAD4 7F056FA4 00000000 */ nop
|
||||
/* 08BAD8 7F056FA8 8E0E0064 */ lw $t6, 0x64($s0)
|
||||
/* 08BADC 7F056FAC 31CF0080 */ andi $t7, $t6, 0x80
|
||||
/* 08BAE0 7F056FB0 15E00019 */ bnez $t7, .L7F057018
|
||||
/* 08BAE4 7F056FB4 00000000 */ nop
|
||||
/* 08BAE8 7F056FB8 92180002 */ lbu $t8, 2($s0)
|
||||
/* 08BAEC 7F056FBC 33190004 */ andi $t9, $t8, 4
|
||||
/* 08BAF0 7F056FC0 17200015 */ bnez $t9, .L7F057018
|
||||
/* 08BAF4 7F056FC4 00000000 */ nop
|
||||
/* 08BAF8 7F056FC8 8C48001C */ lw $t0, 0x1c($v0)
|
||||
/* 08BAFC 7F056FCC 15000012 */ bnez $t0, .L7F057018
|
||||
/* 08BB00 7F056FD0 00000000 */ nop
|
||||
/* 08BB04 7F056FD4 12200005 */ beqz $s1, .L7F056FEC
|
||||
/* 08BB08 7F056FD8 02A02825 */ move $a1, $s5
|
||||
/* 08BB0C 7F056FDC 0FC1B018 */ jal modelmgrCanSlotFitRwdata
|
||||
/* 08BB10 7F056FE0 8E040014 */ lw $a0, 0x14($s0)
|
||||
/* 08BB14 7F056FE4 1040000C */ beqz $v0, .L7F057018
|
||||
/* 08BB18 7F056FE8 00000000 */ nop
|
||||
.L7F056FEC:
|
||||
/* 08BB1C 7F056FEC 16400007 */ bnez $s2, .L7F05700C
|
||||
/* 08BB20 7F056FF0 00000000 */ nop
|
||||
/* 08BB24 7F056FF4 8E090010 */ lw $t1, 0x10($s0)
|
||||
/* 08BB28 7F056FF8 912A0001 */ lbu $t2, 1($t1)
|
||||
/* 08BB2C 7F056FFC 314B0002 */ andi $t3, $t2, 2
|
||||
/* 08BB30 7F057000 15600002 */ bnez $t3, .L7F05700C
|
||||
/* 08BB34 7F057004 00000000 */ nop
|
||||
/* 08BB38 7F057008 02009025 */ move $s2, $s0
|
||||
.L7F05700C:
|
||||
/* 08BB3C 7F05700C 16600002 */ bnez $s3, .L7F057018
|
||||
/* 08BB40 7F057010 00000000 */ nop
|
||||
/* 08BB44 7F057014 02009825 */ move $s3, $s0
|
||||
.L7F057018:
|
||||
/* 08BB48 7F057018 0FC15A3D */ jal sizepropdef
|
||||
/* 08BB4C 7F05701C 02002025 */ move $a0, $s0
|
||||
/* 08BB50 7F057020 00026080 */ sll $t4, $v0, 2
|
||||
/* 08BB54 7F057024 01908021 */ addu $s0, $t4, $s0
|
||||
/* 08BB58 7F057028 92030003 */ lbu $v1, 3($s0)
|
||||
/* 08BB5C 7F05702C 24010030 */ li $at, 48
|
||||
/* 08BB60 7F057030 1461FFD0 */ bne $v1, $at, .L7F056F74
|
||||
/* 08BB64 7F057034 00000000 */ nop
|
||||
.L7F057038:
|
||||
/* 08BB68 7F057038 8FAD0044 */ lw $t5, 0x44($sp)
|
||||
/* 08BB6C 7F05703C 00001025 */ move $v0, $zero
|
||||
/* 08BB70 7F057040 ADB20000 */ sw $s2, ($t5)
|
||||
/* 08BB74 7F057044 8FAE0048 */ lw $t6, 0x48($sp)
|
||||
/* 08BB78 7F057048 ADD30000 */ sw $s3, ($t6)
|
||||
.L7F05704C:
|
||||
/* 08BB7C 7F05704C 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 08BB80 7F057050 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 08BB84 7F057054 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 08BB88 7F057058 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 08BB8C 7F05705C 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 08BB90 7F057060 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 08BB94 7F057064 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* 08BB98 7F057068 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* 08BB9C 7F05706C 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* 08BBA0 7F057070 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* 08BBA4 7F057074 03E00008 */ jr $ra
|
||||
/* 08BBA8 7F057078 27BD0040 */ addiu $sp, $sp, 0x40
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
+126
-1533
File diff suppressed because it is too large
Load Diff
+3
-8
@@ -23,11 +23,6 @@
|
||||
#define DEFAULT_007_SOLO_AMMO_MULTIPLIER DEFAULT_00_AGENT_SOLO_AMMO_MULTIPLIER
|
||||
#define DEFAULT_007_AI_REACTION_SPEED DEFAULT_00_AGENT_AI_REACTION_SPEED
|
||||
|
||||
struct ramrom_struct {
|
||||
u32 *address;
|
||||
u32 locked;
|
||||
};
|
||||
|
||||
struct LvlMpUnknown {
|
||||
u8 unk_0;
|
||||
u8 unk_1;
|
||||
@@ -48,18 +43,18 @@ extern s32 dword_CODE_bss_8008C268;
|
||||
extern s32 dword_CODE_bss_8008C26C;
|
||||
extern char ramrom_data_target[0x380];
|
||||
extern s32 record_slot_num;
|
||||
extern s32 address_demo_loaded;
|
||||
extern u8 * address_demo_loaded;
|
||||
extern s32 dword_CODE_bss_8008C5F8;
|
||||
|
||||
#if defined(BUGFIX_R1)
|
||||
extern f32 g_JP_GlobalTimerDelta;
|
||||
#endif
|
||||
|
||||
void lvInitDebugNoticeList(void);
|
||||
void lvInit(void);
|
||||
Gfx * lvlRender(Gfx *);
|
||||
void lvlSetSelectedDifficulty(DIFFICULTY arg0);
|
||||
void lvlManageMpGame(void);
|
||||
void lvlUpdateMpPlayerData(void);
|
||||
void lvlViewMoveTick(void);
|
||||
void lvlUnloadStageTextData(void);
|
||||
DIFFICULTY lvlGetSelectedDifficulty(void);
|
||||
void lvlStageLoad(s32 stage);
|
||||
|
||||
+124
-622
@@ -2,15 +2,17 @@
|
||||
#include <bondgame.h>
|
||||
#include <memp.h>
|
||||
#include "lvl_text.h"
|
||||
#include "ob.h"
|
||||
|
||||
// bss
|
||||
//CODE.bss:8008C640
|
||||
s32 ptr_text[45];
|
||||
s32 g_LangBanks[45];
|
||||
|
||||
|
||||
//CODE.bss:8008C6F4
|
||||
s32 ptr_char_data_buf;
|
||||
struct jpncharpixels* g_JpnCharCachePixels;
|
||||
//CODE.bss:8008C6F8
|
||||
s32 ptr_char_registry;
|
||||
struct jpncacheitem *g_JpnCacheCacheItems;
|
||||
|
||||
|
||||
#ifdef LANG_JP
|
||||
@@ -123,7 +125,7 @@ void *LnameX_lookuptable[45][2] = {
|
||||
{"LmiscP", "LmiscJ"}}; /* Cheat options */
|
||||
#endif
|
||||
|
||||
LEVELID get_textbank_number_for_stagenum(LEVELID level)
|
||||
LEVELID langGetLangBankIndexFromStagenum(LEVELID level)
|
||||
{
|
||||
LEVELID return_id;
|
||||
|
||||
@@ -221,646 +223,146 @@ LEVELID get_textbank_number_for_stagenum(LEVELID level)
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void init_LnameX(void)
|
||||
void langInit(void) {
|
||||
s32 i;
|
||||
|
||||
{
|
||||
undefined *puVar1;
|
||||
u8 **ppuVar2;
|
||||
int iVar3;
|
||||
|
||||
if (j_text_trigger != 0) {
|
||||
ptr_char_data_buf = mempAllocBytesInBank(0x2e80,'\x06');
|
||||
ptr_char_registry = mempAllocBytesInBank(0x100,'\x06');
|
||||
iVar3 = 0;
|
||||
do {
|
||||
ptr_char_registry[iVar3] = ptr_char_registry[iVar3] & 0x3f;
|
||||
*(ushort *)(ptr_char_registry + iVar3) = *(ushort *)(ptr_char_registry + iVar3) | 0x3fff;
|
||||
(ptr_char_registry + iVar3)[2] = (ptr_char_registry + iVar3)[2] & 0x3f;
|
||||
*(ushort *)(ptr_char_registry + iVar3 + 2) = *(ushort *)(ptr_char_registry + iVar3 + 2) | 0x3fff;
|
||||
(ptr_char_registry + iVar3)[4] = (ptr_char_registry + iVar3)[4] & 0x3f;
|
||||
*(ushort *)(ptr_char_registry + iVar3 + 4) = *(ushort *)(ptr_char_registry + iVar3 + 4) | 0x3fff;
|
||||
(ptr_char_registry + iVar3)[6] = (ptr_char_registry + iVar3)[6] & 0x3f;
|
||||
puVar1 = ptr_char_registry + iVar3;
|
||||
iVar3 += 8;
|
||||
*(ushort *)(puVar1 + 6) = *(ushort *)(puVar1 + 6) | 0x3fff;
|
||||
} while (iVar3 != 0xf8);
|
||||
}
|
||||
|
||||
ptr_text = 0;
|
||||
ppuVar2 = (u8 **)ptr_text;
|
||||
do {
|
||||
ppuVar2 = ppuVar2 + 4;
|
||||
ppuVar2[1] = NULL;
|
||||
ppuVar2[2] = NULL;
|
||||
ppuVar2[3] = NULL;
|
||||
*ppuVar2 = NULL;
|
||||
ppuVar2 = ppuVar2;
|
||||
} while (ppuVar2 != &ptr_char_data_buf);
|
||||
ptr_text[37] = _load_resource_named_to_membank((&ptr_LgunX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[38] = _load_resource_named_to_membank((&ptr_LtitleX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[39] = _load_resource_named_to_membank((&ptr_LmpmenuX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[40] = _load_resource_named_to_membank((&ptr_LpropobjX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[41] = _load_resource_named_to_membank((&ptr_LmpweaponsX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[42] = _load_resource_named_to_membank((&ptr_LoptionsX)[j_text_trigger],1,0x100,6);
|
||||
ptr_text[43] = _load_resource_named_to_membank((&ptr_LmiscX)[j_text_trigger],1,0x100,6);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel init_LnameX
|
||||
/* 0F621C 7F0C16EC 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 0F6220 7F0C16F0 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 0F6224 7F0C16F4 3C128005 */ lui $s2, %hi(j_text_trigger)
|
||||
/* 0F6228 7F0C16F8 265284D0 */ addiu $s2, %lo(j_text_trigger) # addiu $s2, $s2, -0x7b30
|
||||
/* 0F622C 7F0C16FC 8E480000 */ lw $t0, ($s2)
|
||||
/* 0F6230 7F0C1700 AFBF0024 */ sw $ra, 0x24($sp)
|
||||
/* 0F6234 7F0C1704 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 0F6238 7F0C1708 11000039 */ beqz $t0, .L7F0C17F0
|
||||
/* 0F623C 7F0C170C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 0F6240 7F0C1710 24042E80 */ li $a0, 11904
|
||||
/* 0F6244 7F0C1714 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 0F6248 7F0C1718 24050006 */ li $a1, 6
|
||||
/* 0F624C 7F0C171C 3C018009 */ lui $at, %hi(ptr_char_data_buf)
|
||||
/* 0F6250 7F0C1720 AC22C6F4 */ sw $v0, %lo(ptr_char_data_buf)($at)
|
||||
/* 0F6254 7F0C1724 24040100 */ li $a0, 256
|
||||
/* 0F6258 7F0C1728 0C0025C8 */ jal mempAllocBytesInBank
|
||||
/* 0F625C 7F0C172C 24050006 */ li $a1, 6
|
||||
/* 0F6260 7F0C1730 3C048009 */ lui $a0, %hi(ptr_char_registry)
|
||||
/* 0F6264 7F0C1734 2484C6F8 */ addiu $a0, %lo(ptr_char_registry) # addiu $a0, $a0, -0x3908
|
||||
/* 0F6268 7F0C1738 AC820000 */ sw $v0, ($a0)
|
||||
/* 0F626C 7F0C173C 00001825 */ move $v1, $zero
|
||||
/* 0F6270 7F0C1740 240500F8 */ li $a1, 248
|
||||
.L7F0C1744:
|
||||
/* 0F6274 7F0C1744 8C8E0000 */ lw $t6, ($a0)
|
||||
/* 0F6278 7F0C1748 01C31021 */ addu $v0, $t6, $v1
|
||||
/* 0F627C 7F0C174C 904F0000 */ lbu $t7, ($v0)
|
||||
/* 0F6280 7F0C1750 31F8FF3F */ andi $t8, $t7, 0xff3f
|
||||
/* 0F6284 7F0C1754 A0580000 */ sb $t8, ($v0)
|
||||
/* 0F6288 7F0C1758 8C990000 */ lw $t9, ($a0)
|
||||
/* 0F628C 7F0C175C 03231021 */ addu $v0, $t9, $v1
|
||||
/* 0F6290 7F0C1760 944A0000 */ lhu $t2, ($v0)
|
||||
/* 0F6294 7F0C1764 354B3FFF */ ori $t3, $t2, 0x3fff
|
||||
/* 0F6298 7F0C1768 A44B0000 */ sh $t3, ($v0)
|
||||
/* 0F629C 7F0C176C 8C8C0000 */ lw $t4, ($a0)
|
||||
/* 0F62A0 7F0C1770 01831021 */ addu $v0, $t4, $v1
|
||||
/* 0F62A4 7F0C1774 904D0002 */ lbu $t5, 2($v0)
|
||||
/* 0F62A8 7F0C1778 31AEFF3F */ andi $t6, $t5, 0xff3f
|
||||
/* 0F62AC 7F0C177C A04E0002 */ sb $t6, 2($v0)
|
||||
/* 0F62B0 7F0C1780 8C8F0000 */ lw $t7, ($a0)
|
||||
/* 0F62B4 7F0C1784 01E31021 */ addu $v0, $t7, $v1
|
||||
/* 0F62B8 7F0C1788 94590002 */ lhu $t9, 2($v0)
|
||||
/* 0F62BC 7F0C178C 37293FFF */ ori $t1, $t9, 0x3fff
|
||||
/* 0F62C0 7F0C1790 A4490002 */ sh $t1, 2($v0)
|
||||
/* 0F62C4 7F0C1794 8C8A0000 */ lw $t2, ($a0)
|
||||
/* 0F62C8 7F0C1798 01431021 */ addu $v0, $t2, $v1
|
||||
/* 0F62CC 7F0C179C 904B0004 */ lbu $t3, 4($v0)
|
||||
/* 0F62D0 7F0C17A0 316CFF3F */ andi $t4, $t3, 0xff3f
|
||||
/* 0F62D4 7F0C17A4 A04C0004 */ sb $t4, 4($v0)
|
||||
/* 0F62D8 7F0C17A8 8C8D0000 */ lw $t5, ($a0)
|
||||
/* 0F62DC 7F0C17AC 01A31021 */ addu $v0, $t5, $v1
|
||||
/* 0F62E0 7F0C17B0 944F0004 */ lhu $t7, 4($v0)
|
||||
/* 0F62E4 7F0C17B4 35F83FFF */ ori $t8, $t7, 0x3fff
|
||||
/* 0F62E8 7F0C17B8 A4580004 */ sh $t8, 4($v0)
|
||||
/* 0F62EC 7F0C17BC 8C990000 */ lw $t9, ($a0)
|
||||
/* 0F62F0 7F0C17C0 03231021 */ addu $v0, $t9, $v1
|
||||
/* 0F62F4 7F0C17C4 90490006 */ lbu $t1, 6($v0)
|
||||
/* 0F62F8 7F0C17C8 312AFF3F */ andi $t2, $t1, 0xff3f
|
||||
/* 0F62FC 7F0C17CC A04A0006 */ sb $t2, 6($v0)
|
||||
/* 0F6300 7F0C17D0 8C8B0000 */ lw $t3, ($a0)
|
||||
/* 0F6304 7F0C17D4 01631021 */ addu $v0, $t3, $v1
|
||||
/* 0F6308 7F0C17D8 944D0006 */ lhu $t5, 6($v0)
|
||||
/* 0F630C 7F0C17DC 24630008 */ addiu $v1, $v1, 8
|
||||
/* 0F6310 7F0C17E0 35AE3FFF */ ori $t6, $t5, 0x3fff
|
||||
/* 0F6314 7F0C17E4 1465FFD7 */ bne $v1, $a1, .L7F0C1744
|
||||
/* 0F6318 7F0C17E8 A44E0006 */ sh $t6, 6($v0)
|
||||
/* 0F631C 7F0C17EC 8E480000 */ lw $t0, ($s2)
|
||||
.L7F0C17F0:
|
||||
/* 0F6320 7F0C17F0 3C018009 */ lui $at, %hi(ptr_text)
|
||||
/* 0F6324 7F0C17F4 3C028009 */ lui $v0, %hi(ptr_text+0x4)
|
||||
/* 0F6328 7F0C17F8 3C038009 */ lui $v1, %hi(ptr_char_data_buf)
|
||||
/* 0F632C 7F0C17FC 2463C6F4 */ addiu $v1, %lo(ptr_char_data_buf) # addiu $v1, $v1, -0x390c
|
||||
/* 0F6330 7F0C1800 2442C644 */ addiu $v0, %lo(ptr_text+0x4) # addiu $v0, $v0, -0x39bc
|
||||
/* 0F6334 7F0C1804 AC20C640 */ sw $zero, %lo(ptr_text)($at)
|
||||
.L7F0C1808:
|
||||
/* 0F6338 7F0C1808 24420010 */ addiu $v0, $v0, 0x10
|
||||
/* 0F633C 7F0C180C AC40FFF4 */ sw $zero, -0xc($v0)
|
||||
/* 0F6340 7F0C1810 AC40FFF8 */ sw $zero, -8($v0)
|
||||
/* 0F6344 7F0C1814 AC40FFFC */ sw $zero, -4($v0)
|
||||
/* 0F6348 7F0C1818 1443FFFB */ bne $v0, $v1, .L7F0C1808
|
||||
/* 0F634C 7F0C181C AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
/* 0F6350 7F0C1820 3C108005 */ lui $s0, %hi(LnameX_lookuptable)
|
||||
/* 0F6354 7F0C1824 261084D4 */ addiu $s0, %lo(LnameX_lookuptable) # addiu $s0, $s0, -0x7b2c
|
||||
/* 0F6358 7F0C1828 00087880 */ sll $t7, $t0, 2
|
||||
/* 0F635C 7F0C182C 020FC021 */ addu $t8, $s0, $t7
|
||||
/* 0F6360 7F0C1830 8F040130 */ lw $a0, 0x130($t8)
|
||||
/* 0F6364 7F0C1834 24050001 */ li $a1, 1
|
||||
/* 0F6368 7F0C1838 24060100 */ li $a2, 256
|
||||
/* 0F636C 7F0C183C 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F6370 7F0C1840 24070006 */ li $a3, 6
|
||||
/* 0F6374 7F0C1844 8E590000 */ lw $t9, ($s2)
|
||||
/* 0F6378 7F0C1848 3C118009 */ lui $s1, %hi(ptr_text)
|
||||
/* 0F637C 7F0C184C 2631C640 */ addiu $s1, %lo(ptr_text) # addiu $s1, $s1, -0x39c0
|
||||
/* 0F6380 7F0C1850 00194880 */ sll $t1, $t9, 2
|
||||
/* 0F6384 7F0C1854 02095021 */ addu $t2, $s0, $t1
|
||||
/* 0F6388 7F0C1858 AE220098 */ sw $v0, 0x98($s1)
|
||||
/* 0F638C 7F0C185C 8D440138 */ lw $a0, 0x138($t2)
|
||||
/* 0F6390 7F0C1860 24050001 */ li $a1, 1
|
||||
/* 0F6394 7F0C1864 24060100 */ li $a2, 256
|
||||
/* 0F6398 7F0C1868 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F639C 7F0C186C 24070006 */ li $a3, 6
|
||||
/* 0F63A0 7F0C1870 8E4B0000 */ lw $t3, ($s2)
|
||||
/* 0F63A4 7F0C1874 AE22009C */ sw $v0, 0x9c($s1)
|
||||
/* 0F63A8 7F0C1878 24050001 */ li $a1, 1
|
||||
/* 0F63AC 7F0C187C 000B6080 */ sll $t4, $t3, 2
|
||||
/* 0F63B0 7F0C1880 020C6821 */ addu $t5, $s0, $t4
|
||||
/* 0F63B4 7F0C1884 8DA40140 */ lw $a0, 0x140($t5)
|
||||
/* 0F63B8 7F0C1888 24060100 */ li $a2, 256
|
||||
/* 0F63BC 7F0C188C 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F63C0 7F0C1890 24070006 */ li $a3, 6
|
||||
/* 0F63C4 7F0C1894 8E4E0000 */ lw $t6, ($s2)
|
||||
/* 0F63C8 7F0C1898 AE2200A0 */ sw $v0, 0xa0($s1)
|
||||
/* 0F63CC 7F0C189C 24050001 */ li $a1, 1
|
||||
/* 0F63D0 7F0C18A0 000E7880 */ sll $t7, $t6, 2
|
||||
/* 0F63D4 7F0C18A4 020FC021 */ addu $t8, $s0, $t7
|
||||
/* 0F63D8 7F0C18A8 8F040148 */ lw $a0, 0x148($t8)
|
||||
/* 0F63DC 7F0C18AC 24060100 */ li $a2, 256
|
||||
/* 0F63E0 7F0C18B0 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F63E4 7F0C18B4 24070006 */ li $a3, 6
|
||||
/* 0F63E8 7F0C18B8 8E590000 */ lw $t9, ($s2)
|
||||
/* 0F63EC 7F0C18BC AE2200A4 */ sw $v0, 0xa4($s1)
|
||||
/* 0F63F0 7F0C18C0 24050001 */ li $a1, 1
|
||||
/* 0F63F4 7F0C18C4 00194880 */ sll $t1, $t9, 2
|
||||
/* 0F63F8 7F0C18C8 02095021 */ addu $t2, $s0, $t1
|
||||
/* 0F63FC 7F0C18CC 8D440150 */ lw $a0, 0x150($t2)
|
||||
/* 0F6400 7F0C18D0 24060100 */ li $a2, 256
|
||||
/* 0F6404 7F0C18D4 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F6408 7F0C18D8 24070006 */ li $a3, 6
|
||||
/* 0F640C 7F0C18DC 8E4B0000 */ lw $t3, ($s2)
|
||||
/* 0F6410 7F0C18E0 AE2200A8 */ sw $v0, 0xa8($s1)
|
||||
/* 0F6414 7F0C18E4 24050001 */ li $a1, 1
|
||||
/* 0F6418 7F0C18E8 000B6080 */ sll $t4, $t3, 2
|
||||
/* 0F641C 7F0C18EC 020C6821 */ addu $t5, $s0, $t4
|
||||
/* 0F6420 7F0C18F0 8DA40158 */ lw $a0, 0x158($t5)
|
||||
/* 0F6424 7F0C18F4 24060100 */ li $a2, 256
|
||||
/* 0F6428 7F0C18F8 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F642C 7F0C18FC 24070006 */ li $a3, 6
|
||||
/* 0F6430 7F0C1900 8E4E0000 */ lw $t6, ($s2)
|
||||
/* 0F6434 7F0C1904 AE2200AC */ sw $v0, 0xac($s1)
|
||||
/* 0F6438 7F0C1908 24050001 */ li $a1, 1
|
||||
/* 0F643C 7F0C190C 000E7880 */ sll $t7, $t6, 2
|
||||
/* 0F6440 7F0C1910 020FC021 */ addu $t8, $s0, $t7
|
||||
/* 0F6444 7F0C1914 8F040160 */ lw $a0, 0x160($t8)
|
||||
/* 0F6448 7F0C1918 24060100 */ li $a2, 256
|
||||
/* 0F644C 7F0C191C 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0F6450 7F0C1920 24070006 */ li $a3, 6
|
||||
/* 0F6454 7F0C1924 8FBF0024 */ lw $ra, 0x24($sp)
|
||||
/* 0F6458 7F0C1928 AE2200B0 */ sw $v0, 0xb0($s1)
|
||||
/* 0F645C 7F0C192C 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 0F6460 7F0C1930 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 0F6464 7F0C1934 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 0F6468 7F0C1938 03E00008 */ jr $ra
|
||||
/* 0F646C 7F0C193C 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void something_with_LnameJ(void)
|
||||
{
|
||||
ushort uVar1;
|
||||
ushort *puVar2;
|
||||
int iVar3;
|
||||
|
||||
iVar3 = 0;
|
||||
if (j_text_trigger != 0) {
|
||||
do {
|
||||
puVar2 = (ushort *)(ptr_char_registry + iVar3);
|
||||
if (*puVar2 >> 0xe == 0) {
|
||||
uVar1 = puVar2[1];
|
||||
}
|
||||
else {
|
||||
*(byte *)puVar2 = ((byte)(*puVar2 >> 0xe) - 1) * '@' | *(byte *)puVar2 & 0x3f;
|
||||
puVar2 = (ushort *)(ptr_char_registry + iVar3);
|
||||
uVar1 = puVar2[1];
|
||||
}
|
||||
if (uVar1 >> 0xe == 0) {
|
||||
uVar1 = puVar2[2];
|
||||
}
|
||||
else {
|
||||
*(byte *)(puVar2 + 1) =
|
||||
((byte)(uVar1 >> 0xe) - 1) * '@' | *(byte *)(puVar2 + 1) & 0x3f;
|
||||
puVar2 = (ushort *)(ptr_char_registry + iVar3);
|
||||
uVar1 = puVar2[2];
|
||||
}
|
||||
if (uVar1 >> 0xe == 0) {
|
||||
uVar1 = puVar2[3];
|
||||
}
|
||||
else {
|
||||
*(byte *)(puVar2 + 2) =
|
||||
((byte)(uVar1 >> 0xe) - 1) * '@' | *(byte *)(puVar2 + 2) & 0x3f;
|
||||
puVar2 = (ushort *)(ptr_char_registry + iVar3);
|
||||
uVar1 = puVar2[3];
|
||||
}
|
||||
iVar3 += 8;
|
||||
if (uVar1 >> 0xe != 0) {
|
||||
*(byte *)(puVar2 + 3) =
|
||||
((byte)(uVar1 >> 0xe) - 1) * '@' | *(byte *)(puVar2 + 3) & 0x3f;
|
||||
}
|
||||
} while (iVar3 != 0xf8);
|
||||
}
|
||||
return;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel something_with_LnameJ
|
||||
/* 0F6470 7F0C1940 3C0E8005 */ lui $t6, %hi(j_text_trigger)
|
||||
/* 0F6474 7F0C1944 8DCE84D0 */ lw $t6, %lo(j_text_trigger)($t6)
|
||||
/* 0F6478 7F0C1948 00001825 */ move $v1, $zero
|
||||
/* 0F647C 7F0C194C 240600F8 */ li $a2, 248
|
||||
/* 0F6480 7F0C1950 11C00035 */ beqz $t6, .L7F0C1A28
|
||||
/* 0F6484 7F0C1954 3C058009 */ lui $a1, %hi(ptr_char_registry)
|
||||
/* 0F6488 7F0C1958 24A5C6F8 */ addiu $a1, %lo(ptr_char_registry) # addiu $a1, $a1, -0x3908
|
||||
/* 0F648C 7F0C195C 8CAF0000 */ lw $t7, ($a1)
|
||||
.L7F0C1960:
|
||||
/* 0F6490 7F0C1960 01E31021 */ addu $v0, $t7, $v1
|
||||
/* 0F6494 7F0C1964 94440000 */ lhu $a0, ($v0)
|
||||
/* 0F6498 7F0C1968 0004C382 */ srl $t8, $a0, 0xe
|
||||
/* 0F649C 7F0C196C 5300000A */ beql $t8, $zero, .L7F0C1998
|
||||
/* 0F64A0 7F0C1970 94440002 */ lhu $a0, 2($v0)
|
||||
/* 0F64A4 7F0C1974 904A0000 */ lbu $t2, ($v0)
|
||||
/* 0F64A8 7F0C1978 2719FFFF */ addiu $t9, $t8, -1
|
||||
/* 0F64AC 7F0C197C 00194980 */ sll $t1, $t9, 6
|
||||
/* 0F64B0 7F0C1980 314BFF3F */ andi $t3, $t2, 0xff3f
|
||||
/* 0F64B4 7F0C1984 012B6025 */ or $t4, $t1, $t3
|
||||
/* 0F64B8 7F0C1988 A04C0000 */ sb $t4, ($v0)
|
||||
/* 0F64BC 7F0C198C 8CAD0000 */ lw $t5, ($a1)
|
||||
/* 0F64C0 7F0C1990 01A31021 */ addu $v0, $t5, $v1
|
||||
/* 0F64C4 7F0C1994 94440002 */ lhu $a0, 2($v0)
|
||||
.L7F0C1998:
|
||||
/* 0F64C8 7F0C1998 00047382 */ srl $t6, $a0, 0xe
|
||||
/* 0F64CC 7F0C199C 51C0000A */ beql $t6, $zero, .L7F0C19C8
|
||||
/* 0F64D0 7F0C19A0 94440004 */ lhu $a0, 4($v0)
|
||||
/* 0F64D4 7F0C19A4 90480002 */ lbu $t0, 2($v0)
|
||||
/* 0F64D8 7F0C19A8 25CFFFFF */ addiu $t7, $t6, -1
|
||||
/* 0F64DC 7F0C19AC 000FC980 */ sll $t9, $t7, 6
|
||||
/* 0F64E0 7F0C19B0 310AFF3F */ andi $t2, $t0, 0xff3f
|
||||
/* 0F64E4 7F0C19B4 032A4825 */ or $t1, $t9, $t2
|
||||
/* 0F64E8 7F0C19B8 A0490002 */ sb $t1, 2($v0)
|
||||
/* 0F64EC 7F0C19BC 8CAB0000 */ lw $t3, ($a1)
|
||||
/* 0F64F0 7F0C19C0 01631021 */ addu $v0, $t3, $v1
|
||||
/* 0F64F4 7F0C19C4 94440004 */ lhu $a0, 4($v0)
|
||||
.L7F0C19C8:
|
||||
/* 0F64F8 7F0C19C8 00046382 */ srl $t4, $a0, 0xe
|
||||
/* 0F64FC 7F0C19CC 5180000A */ beql $t4, $zero, .L7F0C19F8
|
||||
/* 0F6500 7F0C19D0 94440006 */ lhu $a0, 6($v0)
|
||||
/* 0F6504 7F0C19D4 90580004 */ lbu $t8, 4($v0)
|
||||
/* 0F6508 7F0C19D8 258DFFFF */ addiu $t5, $t4, -1
|
||||
/* 0F650C 7F0C19DC 000D7980 */ sll $t7, $t5, 6
|
||||
/* 0F6510 7F0C19E0 3308FF3F */ andi $t0, $t8, 0xff3f
|
||||
/* 0F6514 7F0C19E4 01E8C825 */ or $t9, $t7, $t0
|
||||
/* 0F6518 7F0C19E8 A0590004 */ sb $t9, 4($v0)
|
||||
/* 0F651C 7F0C19EC 8CAA0000 */ lw $t2, ($a1)
|
||||
/* 0F6520 7F0C19F0 01431021 */ addu $v0, $t2, $v1
|
||||
/* 0F6524 7F0C19F4 94440006 */ lhu $a0, 6($v0)
|
||||
.L7F0C19F8:
|
||||
/* 0F6528 7F0C19F8 24630008 */ addiu $v1, $v1, 8
|
||||
/* 0F652C 7F0C19FC 00044B82 */ srl $t1, $a0, 0xe
|
||||
/* 0F6530 7F0C1A00 11200007 */ beqz $t1, .L7F0C1A20
|
||||
/* 0F6534 7F0C1A04 00000000 */ nop
|
||||
/* 0F6538 7F0C1A08 904E0006 */ lbu $t6, 6($v0)
|
||||
/* 0F653C 7F0C1A0C 252BFFFF */ addiu $t3, $t1, -1
|
||||
/* 0F6540 7F0C1A10 000B6980 */ sll $t5, $t3, 6
|
||||
/* 0F6544 7F0C1A14 31D8FF3F */ andi $t8, $t6, 0xff3f
|
||||
/* 0F6548 7F0C1A18 01B87825 */ or $t7, $t5, $t8
|
||||
/* 0F654C 7F0C1A1C A04F0006 */ sb $t7, 6($v0)
|
||||
.L7F0C1A20:
|
||||
/* 0F6550 7F0C1A20 5466FFCF */ bnel $v1, $a2, .L7F0C1960
|
||||
/* 0F6554 7F0C1A24 8CAF0000 */ lw $t7, ($a1)
|
||||
.L7F0C1A28:
|
||||
/* 0F6558 7F0C1A28 03E00008 */ jr $ra
|
||||
/* 0F655C 7F0C1A2C 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
int something_with_LnameX(uint param_1)
|
||||
{
|
||||
bool bVar1;
|
||||
ushort uVar3;
|
||||
u8 *puVar2;
|
||||
int iVar4;
|
||||
ushort *puVar5;
|
||||
int iVar6;
|
||||
int iVar7;
|
||||
int indexto;
|
||||
int iVar8;
|
||||
int iVar9;
|
||||
int indexfrom;
|
||||
|
||||
indexto = -1;
|
||||
bVar1 = (param_1 & 0x2000) != 0;
|
||||
iVar7 = 0;
|
||||
iVar4 = 0;
|
||||
iVar9 = -1;
|
||||
puVar5 = (ushort *)ptr_char_registry;
|
||||
do {
|
||||
indexfrom = (int)param_1 >> 1;
|
||||
if ((!bVar1) && ((longlong)indexfrom == ((ulonglong)*puVar5 & 0x3fff))) break;
|
||||
if ((bVar1) &&
|
||||
(((iVar4 + 1 < 0x7c && ((longlong)indexfrom == ((ulonglong)*puVar5 & 0x3fff))) &&
|
||||
((longlong)indexfrom == ((ulonglong)puVar5[1] & 0x3fff))))) break;
|
||||
uVar3 = *puVar5 >> 0xe;
|
||||
iVar6 = iVar4 + 1;
|
||||
if (uVar3 == 0) {
|
||||
indexto = iVar4;
|
||||
}
|
||||
iVar7 += 2;
|
||||
iVar8 = iVar9;
|
||||
if (((uVar3 == 0) && (puVar5[1] >> 0xe == 0)) && (iVar8 = iVar4, 0x7b < iVar6)) {
|
||||
iVar8 = iVar9;
|
||||
}
|
||||
puVar5 = puVar5 + 1;
|
||||
iVar4 = iVar6;
|
||||
iVar9 = iVar8;
|
||||
} while (iVar6 != 0x7c);
|
||||
if (iVar4 < 0x7c) {
|
||||
if (bVar1) {
|
||||
*(byte *)puVar5 = *(byte *)puVar5 & 0x3f | 0x80;
|
||||
(ptr_char_registry + iVar7)[2] = (ptr_char_registry + iVar7)[2] & 0x3f | 0x80;
|
||||
puVar2 = ptr_char_data_buf + iVar4 * 0x60;
|
||||
}
|
||||
else {
|
||||
*(byte *)puVar5 = *(byte *)puVar5 & 0x3f | 0x80;
|
||||
puVar2 = ptr_char_data_buf + iVar4 * 0x60;
|
||||
if (j_text_trigger) {
|
||||
g_JpnCharCachePixels = mempAllocBytesInBank(0x2E80, MEMPOOL_PERMANENT);
|
||||
g_JpnCacheCacheItems = mempAllocBytesInBank(0x100, MEMPOOL_PERMANENT);
|
||||
for(i = 0;i != 124;i++) {
|
||||
g_JpnCacheCacheItems[i].ttl =0;
|
||||
g_JpnCacheCacheItems[i].codepoint =-1;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ((bVar1) || (indexto < 0)) {
|
||||
puVar2 = ptr_char_data_buf;
|
||||
if ((bVar1) && (iVar4 = iVar9 * 2, -1 < iVar9)) {
|
||||
ptr_char_registry[iVar4] = ptr_char_registry[iVar4] & 0x3f | 0x80;
|
||||
(ptr_char_registry + iVar4)[2] = (ptr_char_registry + iVar4)[2] & 0x3f | 0x80;
|
||||
uVar3 = (ushort)indexfrom & 0x3fff;
|
||||
*(ushort *)(ptr_char_registry + iVar4) =
|
||||
uVar3 | *(ushort *)(ptr_char_registry + iVar4) & 0xc000;
|
||||
*(ushort *)(ptr_char_registry + iVar4 + 2) =
|
||||
uVar3 | *(ushort *)(ptr_char_registry + iVar4 + 2) & 0xc000;
|
||||
romCopy((char *)(ptr_char_data_buf + iVar9 * 0x60),
|
||||
(char *)(_efontchardataSegmentRomStart + ((int)(param_1 & 0x1fff) >> 1) * 0x20),
|
||||
0x80);
|
||||
puVar2 = ptr_char_data_buf + iVar9 * 0x60;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ptr_char_registry[indexto * 2] = ptr_char_registry[indexto * 2] & 0x3f | 0x80;
|
||||
*(ushort *)(ptr_char_registry + indexto * 2) =
|
||||
(ushort)indexfrom & 0x3fff | *(ushort *)(ptr_char_registry + indexto * 2) & 0xc000;
|
||||
romCopy((char *)(ptr_char_data_buf + indexto * 0x60),
|
||||
(char *)(_jfontchardataSegmentRomStart + indexfrom * 0x18),0x60);
|
||||
puVar2 = ptr_char_data_buf + indexto * 0x60;
|
||||
}
|
||||
|
||||
for (i = 0; i < 45; i++) {
|
||||
g_LangBanks[i] = 0;
|
||||
}
|
||||
g_LangBanks[LGUN] = _fileNameLoadToBank(LnameX_lookuptable[LGUN][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LTITLE] = _fileNameLoadToBank(LnameX_lookuptable[LTITLE][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LMPMENU] = _fileNameLoadToBank(LnameX_lookuptable[LMPMENU][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LPROPOBJ] = _fileNameLoadToBank(LnameX_lookuptable[LPROPOBJ][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LMPWEAPONS] = _fileNameLoadToBank(LnameX_lookuptable[LMPWEAPONS][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LOPTIONS] = _fileNameLoadToBank(LnameX_lookuptable[LOPTIONS][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
g_LangBanks[LMISC] = _fileNameLoadToBank(LnameX_lookuptable[LMISC][j_text_trigger], FILELOADMETHOD_DEFAULT, 0x100, MEMPOOL_PERMANENT);
|
||||
}
|
||||
|
||||
|
||||
|
||||
void langTick(void) {
|
||||
s32 i;
|
||||
|
||||
if (j_text_trigger) {
|
||||
for (i = 0; i < 0x7c; i++) {
|
||||
if (g_JpnCacheCacheItems[i].ttl) {
|
||||
g_JpnCacheCacheItems[i].ttl--;
|
||||
}
|
||||
}
|
||||
}
|
||||
return (int)puVar2;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel something_with_LnameX
|
||||
/* 0F6560 7F0C1A30 27BDFFC8 */ addiu $sp, $sp, -0x38
|
||||
/* 0F6564 7F0C1A34 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 0F6568 7F0C1A38 308E2000 */ andi $t6, $a0, 0x2000
|
||||
/* 0F656C 7F0C1A3C 00808025 */ move $s0, $a0
|
||||
/* 0F6570 7F0C1A40 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 0F6574 7F0C1A44 240AFFFF */ li $t2, -1
|
||||
/* 0F6578 7F0C1A48 240BFFFF */ li $t3, -1
|
||||
/* 0F657C 7F0C1A4C 11C00002 */ beqz $t6, .L7F0C1A58
|
||||
/* 0F6580 7F0C1A50 00004025 */ move $t0, $zero
|
||||
/* 0F6584 7F0C1A54 24080001 */ li $t0, 1
|
||||
.L7F0C1A58:
|
||||
/* 0F6588 7F0C1A58 3C0C8009 */ lui $t4, %hi(ptr_char_registry)
|
||||
/* 0F658C 7F0C1A5C 8D8CC6F8 */ lw $t4, %lo(ptr_char_registry)($t4)
|
||||
/* 0F6590 7F0C1A60 00002825 */ move $a1, $zero
|
||||
/* 0F6594 7F0C1A64 00003825 */ move $a3, $zero
|
||||
/* 0F6598 7F0C1A68 2409007C */ li $t1, 124
|
||||
/* 0F659C 7F0C1A6C 01802025 */ move $a0, $t4
|
||||
.L7F0C1A70:
|
||||
/* 0F65A0 7F0C1A70 15000006 */ bnez $t0, .L7F0C1A8C
|
||||
/* 0F65A4 7F0C1A74 00000000 */ nop
|
||||
/* 0F65A8 7F0C1A78 94980000 */ lhu $t8, ($a0)
|
||||
/* 0F65AC 7F0C1A7C 00107843 */ sra $t7, $s0, 1
|
||||
/* 0F65B0 7F0C1A80 33193FFF */ andi $t9, $t8, 0x3fff
|
||||
/* 0F65B4 7F0C1A84 51F9001F */ beql $t7, $t9, .L7F0C1B04
|
||||
/* 0F65B8 7F0C1A88 28A1007C */ slti $at, $a1, 0x7c
|
||||
.L7F0C1A8C:
|
||||
/* 0F65BC 7F0C1A8C 1100000B */ beqz $t0, .L7F0C1ABC
|
||||
/* 0F65C0 7F0C1A90 94830000 */ lhu $v1, ($a0)
|
||||
/* 0F65C4 7F0C1A94 24AE0001 */ addiu $t6, $a1, 1
|
||||
/* 0F65C8 7F0C1A98 29C1007C */ slti $at, $t6, 0x7c
|
||||
/* 0F65CC 7F0C1A9C 10200007 */ beqz $at, .L7F0C1ABC
|
||||
/* 0F65D0 7F0C1AA0 00101043 */ sra $v0, $s0, 1
|
||||
/* 0F65D4 7F0C1AA4 30783FFF */ andi $t8, $v1, 0x3fff
|
||||
/* 0F65D8 7F0C1AA8 54580005 */ bnel $v0, $t8, .L7F0C1AC0
|
||||
/* 0F65DC 7F0C1AAC 00031382 */ srl $v0, $v1, 0xe
|
||||
/* 0F65E0 7F0C1AB0 948F0002 */ lhu $t7, 2($a0)
|
||||
/* 0F65E4 7F0C1AB4 31F93FFF */ andi $t9, $t7, 0x3fff
|
||||
/* 0F65E8 7F0C1AB8 10590011 */ beq $v0, $t9, .L7F0C1B00
|
||||
.L7F0C1ABC:
|
||||
/* 0F65EC 7F0C1ABC 00031382 */ srl $v0, $v1, 0xe
|
||||
.L7F0C1AC0:
|
||||
/* 0F65F0 7F0C1AC0 14400002 */ bnez $v0, .L7F0C1ACC
|
||||
/* 0F65F4 7F0C1AC4 24A60001 */ addiu $a2, $a1, 1
|
||||
/* 0F65F8 7F0C1AC8 00A05025 */ move $t2, $a1
|
||||
.L7F0C1ACC:
|
||||
/* 0F65FC 7F0C1ACC 14400009 */ bnez $v0, .L7F0C1AF4
|
||||
/* 0F6600 7F0C1AD0 24E70002 */ addiu $a3, $a3, 2
|
||||
/* 0F6604 7F0C1AD4 948E0002 */ lhu $t6, 2($a0)
|
||||
/* 0F6608 7F0C1AD8 28C1007C */ slti $at, $a2, 0x7c
|
||||
/* 0F660C 7F0C1ADC 000EC382 */ srl $t8, $t6, 0xe
|
||||
/* 0F6610 7F0C1AE0 57000005 */ bnezl $t8, .L7F0C1AF8
|
||||
/* 0F6614 7F0C1AE4 00C02825 */ move $a1, $a2
|
||||
/* 0F6618 7F0C1AE8 50200003 */ beql $at, $zero, .L7F0C1AF8
|
||||
/* 0F661C 7F0C1AEC 00C02825 */ move $a1, $a2
|
||||
/* 0F6620 7F0C1AF0 00A05825 */ move $t3, $a1
|
||||
.L7F0C1AF4:
|
||||
/* 0F6624 7F0C1AF4 00C02825 */ move $a1, $a2
|
||||
.L7F0C1AF8:
|
||||
/* 0F6628 7F0C1AF8 14C9FFDD */ bne $a2, $t1, .L7F0C1A70
|
||||
/* 0F662C 7F0C1AFC 24840002 */ addiu $a0, $a0, 2
|
||||
.L7F0C1B00:
|
||||
/* 0F6630 7F0C1B00 28A1007C */ slti $at, $a1, 0x7c
|
||||
.L7F0C1B04:
|
||||
/* 0F6634 7F0C1B04 10200021 */ beqz $at, .L7F0C1B8C
|
||||
/* 0F6638 7F0C1B08 00000000 */ nop
|
||||
/* 0F663C 7F0C1B0C 1500000C */ bnez $t0, .L7F0C1B40
|
||||
/* 0F6640 7F0C1B10 240D0060 */ li $t5, 96
|
||||
/* 0F6644 7F0C1B14 00AD0019 */ multu $a1, $t5
|
||||
/* 0F6648 7F0C1B18 908F0000 */ lbu $t7, ($a0)
|
||||
/* 0F664C 7F0C1B1C 31F9FF3F */ andi $t9, $t7, 0xff3f
|
||||
/* 0F6650 7F0C1B20 372E0080 */ ori $t6, $t9, 0x80
|
||||
/* 0F6654 7F0C1B24 A08E0000 */ sb $t6, ($a0)
|
||||
/* 0F6658 7F0C1B28 3C0F8009 */ lui $t7, %hi(ptr_char_data_buf)
|
||||
/* 0F665C 7F0C1B2C 8DEFC6F4 */ lw $t7, %lo(ptr_char_data_buf)($t7)
|
||||
/* 0F6660 7F0C1B30 0000C012 */ mflo $t8
|
||||
/* 0F6664 7F0C1B34 030F1021 */ addu $v0, $t8, $t7
|
||||
/* 0F6668 7F0C1B38 1000006F */ b .L7F0C1CF8
|
||||
/* 0F666C 7F0C1B3C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L7F0C1B40:
|
||||
/* 0F6670 7F0C1B40 90990000 */ lbu $t9, ($a0)
|
||||
/* 0F6674 7F0C1B44 3C098009 */ lui $t1, %hi(ptr_char_registry)
|
||||
/* 0F6678 7F0C1B48 2529C6F8 */ addiu $t1, %lo(ptr_char_registry) # addiu $t1, $t1, -0x3908
|
||||
/* 0F667C 7F0C1B4C 332EFF3F */ andi $t6, $t9, 0xff3f
|
||||
/* 0F6680 7F0C1B50 35D80080 */ ori $t8, $t6, 0x80
|
||||
/* 0F6684 7F0C1B54 A0980000 */ sb $t8, ($a0)
|
||||
/* 0F6688 7F0C1B58 8D2F0000 */ lw $t7, ($t1)
|
||||
/* 0F668C 7F0C1B5C 240D0060 */ li $t5, 96
|
||||
/* 0F6690 7F0C1B60 00AD0019 */ multu $a1, $t5
|
||||
/* 0F6694 7F0C1B64 01E72021 */ addu $a0, $t7, $a3
|
||||
/* 0F6698 7F0C1B68 90990002 */ lbu $t9, 2($a0)
|
||||
/* 0F669C 7F0C1B6C 332EFF3F */ andi $t6, $t9, 0xff3f
|
||||
/* 0F66A0 7F0C1B70 35D80080 */ ori $t8, $t6, 0x80
|
||||
/* 0F66A4 7F0C1B74 A0980002 */ sb $t8, 2($a0)
|
||||
/* 0F66A8 7F0C1B78 3C198009 */ lui $t9, %hi(ptr_char_data_buf)
|
||||
/* 0F66AC 7F0C1B7C 8F39C6F4 */ lw $t9, %lo(ptr_char_data_buf)($t9)
|
||||
/* 0F66B0 7F0C1B80 00007812 */ mflo $t7
|
||||
/* 0F66B4 7F0C1B84 1000005B */ b .L7F0C1CF4
|
||||
/* 0F66B8 7F0C1B88 01F91021 */ addu $v0, $t7, $t9
|
||||
.L7F0C1B8C:
|
||||
/* 0F66BC 7F0C1B8C 15000025 */ bnez $t0, .L7F0C1C24
|
||||
/* 0F66C0 7F0C1B90 00000000 */ nop
|
||||
/* 0F66C4 7F0C1B94 05400023 */ bltz $t2, .L7F0C1C24
|
||||
/* 0F66C8 7F0C1B98 240D0060 */ li $t5, 96
|
||||
/* 0F66CC 7F0C1B9C 014D0019 */ multu $t2, $t5
|
||||
/* 0F66D0 7F0C1BA0 000A3840 */ sll $a3, $t2, 1
|
||||
/* 0F66D4 7F0C1BA4 01871821 */ addu $v1, $t4, $a3
|
||||
/* 0F66D8 7F0C1BA8 906E0000 */ lbu $t6, ($v1)
|
||||
/* 0F66DC 7F0C1BAC 3C098009 */ lui $t1, %hi(ptr_char_registry)
|
||||
/* 0F66E0 7F0C1BB0 2529C6F8 */ addiu $t1, %lo(ptr_char_registry) # addiu $t1, $t1, -0x3908
|
||||
/* 0F66E4 7F0C1BB4 31D8FF3F */ andi $t8, $t6, 0xff3f
|
||||
/* 0F66E8 7F0C1BB8 370F0080 */ ori $t7, $t8, 0x80
|
||||
/* 0F66EC 7F0C1BBC A06F0000 */ sb $t7, ($v1)
|
||||
/* 0F66F0 7F0C1BC0 8D390000 */ lw $t9, ($t1)
|
||||
/* 0F66F4 7F0C1BC4 00004012 */ mflo $t0
|
||||
/* 0F66F8 7F0C1BC8 00101043 */ sra $v0, $s0, 1
|
||||
/* 0F66FC 7F0C1BCC 03271821 */ addu $v1, $t9, $a3
|
||||
/* 0F6700 7F0C1BD0 004D0019 */ multu $v0, $t5
|
||||
/* 0F6704 7F0C1BD4 946F0000 */ lhu $t7, ($v1)
|
||||
/* 0F6708 7F0C1BD8 30583FFF */ andi $t8, $v0, 0x3fff
|
||||
/* 0F670C 7F0C1BDC 24060060 */ li $a2, 96
|
||||
/* 0F6710 7F0C1BE0 31F9C000 */ andi $t9, $t7, 0xc000
|
||||
/* 0F6714 7F0C1BE4 03197025 */ or $t6, $t8, $t9
|
||||
/* 0F6718 7F0C1BE8 A46E0000 */ sh $t6, ($v1)
|
||||
/* 0F671C 7F0C1BEC 3C0F8009 */ lui $t7, %hi(ptr_char_data_buf)
|
||||
/* 0F6720 7F0C1BF0 8DEFC6F4 */ lw $t7, %lo(ptr_char_data_buf)($t7)
|
||||
/* 0F6724 7F0C1BF4 3C190011 */ lui $t9, %hi(_jfontchardataSegmentRomStart) # $t9, 0x11
|
||||
/* 0F6728 7F0C1BF8 27397940 */ addiu $t9, %lo(_jfontchardataSegmentRomStart) # addiu $t9, $t9, 0x7940
|
||||
/* 0F672C 7F0C1BFC 0000C012 */ mflo $t8
|
||||
/* 0F6730 7F0C1C00 03192821 */ addu $a1, $t8, $t9
|
||||
/* 0F6734 7F0C1C04 AFA80024 */ sw $t0, 0x24($sp)
|
||||
/* 0F6738 7F0C1C08 0C001707 */ jal romCopy
|
||||
/* 0F673C 7F0C1C0C 010F2021 */ addu $a0, $t0, $t7
|
||||
/* 0F6740 7F0C1C10 3C0E8009 */ lui $t6, %hi(ptr_char_data_buf)
|
||||
/* 0F6744 7F0C1C14 8FA80024 */ lw $t0, 0x24($sp)
|
||||
/* 0F6748 7F0C1C18 8DCEC6F4 */ lw $t6, %lo(ptr_char_data_buf)($t6)
|
||||
/* 0F674C 7F0C1C1C 10000035 */ b .L7F0C1CF4
|
||||
/* 0F6750 7F0C1C20 010E1021 */ addu $v0, $t0, $t6
|
||||
.L7F0C1C24:
|
||||
/* 0F6754 7F0C1C24 11000032 */ beqz $t0, .L7F0C1CF0
|
||||
/* 0F6758 7F0C1C28 3C028009 */ lui $v0, %hi(ptr_char_data_buf)
|
||||
/* 0F675C 7F0C1C2C 05600030 */ bltz $t3, .L7F0C1CF0
|
||||
/* 0F6760 7F0C1C30 000B1840 */ sll $v1, $t3, 1
|
||||
/* 0F6764 7F0C1C34 01831021 */ addu $v0, $t4, $v1
|
||||
/* 0F6768 7F0C1C38 904F0000 */ lbu $t7, ($v0)
|
||||
/* 0F676C 7F0C1C3C 3C098009 */ lui $t1, %hi(ptr_char_registry)
|
||||
/* 0F6770 7F0C1C40 2529C6F8 */ addiu $t1, %lo(ptr_char_registry) # addiu $t1, $t1, -0x3908
|
||||
/* 0F6774 7F0C1C44 31F8FF3F */ andi $t8, $t7, 0xff3f
|
||||
/* 0F6778 7F0C1C48 37190080 */ ori $t9, $t8, 0x80
|
||||
/* 0F677C 7F0C1C4C A0590000 */ sb $t9, ($v0)
|
||||
/* 0F6780 7F0C1C50 8D2E0000 */ lw $t6, ($t1)
|
||||
/* 0F6784 7F0C1C54 240D0060 */ li $t5, 96
|
||||
/* 0F6788 7F0C1C58 016D0019 */ multu $t3, $t5
|
||||
/* 0F678C 7F0C1C5C 01C31021 */ addu $v0, $t6, $v1
|
||||
/* 0F6790 7F0C1C60 904F0002 */ lbu $t7, 2($v0)
|
||||
/* 0F6794 7F0C1C64 24060080 */ li $a2, 128
|
||||
/* 0F6798 7F0C1C68 31F8FF3F */ andi $t8, $t7, 0xff3f
|
||||
/* 0F679C 7F0C1C6C 37190080 */ ori $t9, $t8, 0x80
|
||||
/* 0F67A0 7F0C1C70 A0590002 */ sb $t9, 2($v0)
|
||||
/* 0F67A4 7F0C1C74 8D2E0000 */ lw $t6, ($t1)
|
||||
/* 0F67A8 7F0C1C78 00107843 */ sra $t7, $s0, 1
|
||||
/* 0F67AC 7F0C1C7C 31E73FFF */ andi $a3, $t7, 0x3fff
|
||||
/* 0F67B0 7F0C1C80 01C31021 */ addu $v0, $t6, $v1
|
||||
/* 0F67B4 7F0C1C84 94590000 */ lhu $t9, ($v0)
|
||||
/* 0F67B8 7F0C1C88 00004012 */ mflo $t0
|
||||
/* 0F67BC 7F0C1C8C 332EC000 */ andi $t6, $t9, 0xc000
|
||||
/* 0F67C0 7F0C1C90 00EE7825 */ or $t7, $a3, $t6
|
||||
/* 0F67C4 7F0C1C94 A44F0000 */ sh $t7, ($v0)
|
||||
/* 0F67C8 7F0C1C98 8D380000 */ lw $t8, ($t1)
|
||||
/* 0F67CC 7F0C1C9C 03031021 */ addu $v0, $t8, $v1
|
||||
/* 0F67D0 7F0C1CA0 94590002 */ lhu $t9, 2($v0)
|
||||
/* 0F67D4 7F0C1CA4 3C188009 */ lui $t8, %hi(ptr_char_data_buf)
|
||||
/* 0F67D8 7F0C1CA8 332EC000 */ andi $t6, $t9, 0xc000
|
||||
/* 0F67DC 7F0C1CAC 00EE7825 */ or $t7, $a3, $t6
|
||||
/* 0F67E0 7F0C1CB0 A44F0002 */ sh $t7, 2($v0)
|
||||
/* 0F67E4 7F0C1CB4 8F18C6F4 */ lw $t8, %lo(ptr_char_data_buf)($t8)
|
||||
/* 0F67E8 7F0C1CB8 32191FFF */ andi $t9, $s0, 0x1fff
|
||||
/* 0F67EC 7F0C1CBC 00197043 */ sra $t6, $t9, 1
|
||||
/* 0F67F0 7F0C1CC0 01182021 */ addu $a0, $t0, $t8
|
||||
/* 0F67F4 7F0C1CC4 3C180012 */ lui $t8, %hi(_efontchardataSegmentRomStart) # $t8, 0x12
|
||||
/* 0F67F8 7F0C1CC8 27183040 */ addiu $t8, %lo(_efontchardataSegmentRomStart) # addiu $t8, $t8, 0x3040
|
||||
/* 0F67FC 7F0C1CCC 000E79C0 */ sll $t7, $t6, 7
|
||||
/* 0F6800 7F0C1CD0 01F82821 */ addu $a1, $t7, $t8
|
||||
/* 0F6804 7F0C1CD4 0C001707 */ jal romCopy
|
||||
/* 0F6808 7F0C1CD8 AFA80024 */ sw $t0, 0x24($sp)
|
||||
/* 0F680C 7F0C1CDC 3C198009 */ lui $t9, %hi(ptr_char_data_buf)
|
||||
/* 0F6810 7F0C1CE0 8FA80024 */ lw $t0, 0x24($sp)
|
||||
/* 0F6814 7F0C1CE4 8F39C6F4 */ lw $t9, %lo(ptr_char_data_buf)($t9)
|
||||
/* 0F6818 7F0C1CE8 10000002 */ b .L7F0C1CF4
|
||||
/* 0F681C 7F0C1CEC 01191021 */ addu $v0, $t0, $t9
|
||||
.L7F0C1CF0:
|
||||
/* 0F6820 7F0C1CF0 8C42C6F4 */ lw $v0, %lo(ptr_char_data_buf)($v0)
|
||||
.L7F0C1CF4:
|
||||
/* 0F6824 7F0C1CF4 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L7F0C1CF8:
|
||||
/* 0F6828 7F0C1CF8 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 0F682C 7F0C1CFC 27BD0038 */ addiu $sp, $sp, 0x38
|
||||
/* 0F6830 7F0C1D00 03E00008 */ jr $ra
|
||||
/* 0F6834 7F0C1D04 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
void load_mission_text_bank(u32 id)
|
||||
extern u8 _efontchardataSegmentRomStart;
|
||||
extern u8 _jfontchardataSegmentRomStart;
|
||||
void romCopy(void *target, void *source, u32 size);
|
||||
|
||||
struct jpncharpixels *langGetJpnCharPixels(s32 codepoint)
|
||||
{
|
||||
ptr_text[id] = _load_resource_named_to_membank(LnameX_lookuptable[id][j_text_trigger],1,0x100,4);
|
||||
s32 i;
|
||||
s32 freeindexsingle = -1;
|
||||
s32 freeindexmulti = -1;
|
||||
s32 multibyte = 0;
|
||||
|
||||
|
||||
if (codepoint & 0x2000) {
|
||||
multibyte = 1;
|
||||
}
|
||||
|
||||
|
||||
#define SHIFTAMOUNT 1
|
||||
#define TMUL 8
|
||||
|
||||
for (i = 0; i < 0x7C; i++) {
|
||||
if (!multibyte && (codepoint >> SHIFTAMOUNT) == g_JpnCacheCacheItems[i].codepoint) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (multibyte && i + 1 < 0x7C
|
||||
&& (codepoint >> SHIFTAMOUNT) == g_JpnCacheCacheItems[i].codepoint
|
||||
&& (codepoint >> SHIFTAMOUNT) == g_JpnCacheCacheItems[i + 1].codepoint) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (g_JpnCacheCacheItems[i].ttl == 0) {
|
||||
freeindexsingle = i;
|
||||
}
|
||||
|
||||
if (g_JpnCacheCacheItems[i].ttl == 0 && g_JpnCacheCacheItems[i + 1].ttl == 0 && i + 1 < 0x7C) {
|
||||
freeindexmulti = i;
|
||||
}
|
||||
}
|
||||
|
||||
if (i < 0x7C) {
|
||||
if (!multibyte) {
|
||||
g_JpnCacheCacheItems[i].ttl = 2;
|
||||
|
||||
return &g_JpnCharCachePixels[i * TMUL];
|
||||
} else {
|
||||
g_JpnCacheCacheItems[i + 0].ttl = 2;
|
||||
g_JpnCacheCacheItems[i + 1].ttl = 2;
|
||||
|
||||
return &g_JpnCharCachePixels[TMUL * i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!multibyte && freeindexsingle >= 0) {
|
||||
g_JpnCacheCacheItems[freeindexsingle].ttl = 2;
|
||||
g_JpnCacheCacheItems[freeindexsingle].codepoint = codepoint >> 1;
|
||||
|
||||
romCopy(&g_JpnCharCachePixels[freeindexsingle * 8], (romptr_t) &_jfontchardataSegmentRomStart + (codepoint >> SHIFTAMOUNT) * 0x60, 0x60);
|
||||
|
||||
return &g_JpnCharCachePixels[freeindexsingle * 8];
|
||||
}
|
||||
|
||||
if (multibyte && freeindexmulti >= 0) {
|
||||
g_JpnCacheCacheItems[freeindexmulti + 0].ttl = 2;
|
||||
g_JpnCacheCacheItems[freeindexmulti + 1].ttl = 2;
|
||||
g_JpnCacheCacheItems[freeindexmulti + 0].codepoint = codepoint >> 1;
|
||||
g_JpnCacheCacheItems[freeindexmulti + 1].codepoint = codepoint >> 1;
|
||||
|
||||
romCopy(&g_JpnCharCachePixels[freeindexmulti * 8], (romptr_t) &_efontchardataSegmentRomStart + ((codepoint & 0x1fff) >> SHIFTAMOUNT) * 0x80, 0x80);
|
||||
|
||||
return &g_JpnCharCachePixels[freeindexmulti * 8];
|
||||
}
|
||||
|
||||
return &g_JpnCharCachePixels[0];
|
||||
}
|
||||
|
||||
|
||||
void load_briefing_text_bank(int lnameID,u8 *target,int size)
|
||||
void langLoadToAddr(u32 id)
|
||||
{
|
||||
ptr_text[lnameID] = _load_resource_named_to_buffer(LnameX_lookuptable[lnameID][j_text_trigger],1,target,size);
|
||||
g_LangBanks[id] = _fileNameLoadToBank(LnameX_lookuptable[id][j_text_trigger],1,0x100,MEMPOOL_STAGE);
|
||||
}
|
||||
|
||||
|
||||
void blank_text_bank(s32 textBank) {
|
||||
ptr_text[textBank] = 0;
|
||||
void langLoadToBank(int id,u8 *target,int size)
|
||||
{
|
||||
g_LangBanks[id] = _fileNameLoadToAddr(LnameX_lookuptable[id][j_text_trigger],1,target,size);
|
||||
}
|
||||
|
||||
|
||||
void langClearBank(s32 textBank) {
|
||||
g_LangBanks[textBank] = 0;
|
||||
}
|
||||
|
||||
|
||||
u8 * langGet(s32 slotID)
|
||||
{
|
||||
u32 * textbank_ptr = ptr_text[slotID >> 10]; /* get the text file bank ID index the text ptr table */
|
||||
u32 * textbank_ptr = g_LangBanks[slotID >> 10]; /* get the text file bank ID index the text ptr table */
|
||||
u32 textslot_offset = textbank_ptr[slotID & 0x03FF]; /* load the textbank ptr table then get the slot's offset */
|
||||
|
||||
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;
|
||||
return (textslot_offset != 0) ? (u8*)output_slot : NULL;
|
||||
}
|
||||
}
|
||||
+15
-1
@@ -1,11 +1,25 @@
|
||||
#ifndef _LVL_TEXT_H_
|
||||
#define _LVL_TEXT_H_
|
||||
#include <ultra64.h>
|
||||
#include "bondconstants.h"
|
||||
|
||||
struct jpncharpixels {
|
||||
/*0x00*/ u32 unk00;
|
||||
/*0x04*/ u32 unk04;
|
||||
/*0x08*/ u32 unk08;
|
||||
};
|
||||
|
||||
struct jpncacheitem {
|
||||
u16 ttl : 2;
|
||||
u16 codepoint : 14;
|
||||
};
|
||||
|
||||
|
||||
extern s32 j_text_trigger;
|
||||
|
||||
void something_with_LnameJ(void);
|
||||
void langTick(void);
|
||||
u8 * langGet(s32 slotID);
|
||||
void langLoadToBank(int id, u8 *target, int size);
|
||||
LEVELID langGetLangBankIndexFromStagenum(LEVELID level);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -28,6 +28,7 @@ u16 table_3[] = {
|
||||
0x39A, 0x31E, 0x28C, 0x1CD, 0, 0
|
||||
};
|
||||
|
||||
// PD: func0f096890
|
||||
static s32 sub_GAME_7F05AB70(s32 arg0)
|
||||
{
|
||||
s32 mask;
|
||||
|
||||
@@ -14,7 +14,7 @@ f32 acosf(f32 cosinef)
|
||||
cosines = (cosinef * 32767.0f);
|
||||
}
|
||||
|
||||
return (acos(cosines) * 3.1415927f) / 65535.0f;
|
||||
return (acos(cosines) * M_PI_F) / 65535.0f;
|
||||
}
|
||||
|
||||
f32 asinf(f32 sinef)
|
||||
@@ -29,5 +29,5 @@ f32 asinf(f32 sinef)
|
||||
sines = (sinef * 32767.0f);
|
||||
}
|
||||
|
||||
return (asin(sines) * 3.1415927f) / 65535.0f;
|
||||
return (asin(sines) * M_PI_F) / 65535.0f;
|
||||
}
|
||||
|
||||
+84
-196
@@ -20,191 +20,79 @@ f32 D_80032310[2] = {M_U16_MAX_VALUE_F, M_U16_MAX_VALUE_F};
|
||||
//#ifdef VERSION_EU
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#ifdef NONMATCHING
|
||||
void matrix_4x4_copy_homogeneous_eu(Mtxf *src,Mtxf *dst)
|
||||
void matrix_4x4_copy_homogeneous_eu(f32 src[3][3], f32 dst[3][3])
|
||||
{
|
||||
|
||||
s32 i, j;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
dst[i][j] = src[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel matrix_4x4_copy_homogeneous_eu
|
||||
/* 08ACC0 7F0582D0 00001025 */ move $v0, $zero
|
||||
/* 08ACC4 7F0582D4 00A03025 */ move $a2, $a1
|
||||
/* 08ACC8 7F0582D8 00803825 */ move $a3, $a0
|
||||
/* 08ACCC 7F0582DC 24080003 */ li $t0, 3
|
||||
.L7F0582E0:
|
||||
/* 08ACD0 7F0582E0 00001825 */ move $v1, $zero
|
||||
/* 08ACD4 7F0582E4 00C02025 */ move $a0, $a2
|
||||
/* 08ACD8 7F0582E8 00E02825 */ move $a1, $a3
|
||||
.L7F0582EC:
|
||||
/* 08ACDC 7F0582EC C4A40000 */ lwc1 $f4, ($a1)
|
||||
/* 08ACE0 7F0582F0 24630001 */ addiu $v1, $v1, 1
|
||||
/* 08ACE4 7F0582F4 24840004 */ addiu $a0, $a0, 4
|
||||
/* 08ACE8 7F0582F8 24A50004 */ addiu $a1, $a1, 4
|
||||
/* 08ACEC 7F0582FC 1468FFFB */ bne $v1, $t0, .L7F0582EC
|
||||
/* 08ACF0 7F058300 E484FFFC */ swc1 $f4, -4($a0)
|
||||
/* 08ACF4 7F058304 24420001 */ addiu $v0, $v0, 1
|
||||
/* 08ACF8 7F058308 24C6000C */ addiu $a2, $a2, 0xc
|
||||
/* 08ACFC 7F05830C 1448FFF4 */ bne $v0, $t0, .L7F0582E0
|
||||
/* 08AD00 7F058310 24E7000C */ addiu $a3, $a3, 0xc
|
||||
/* 08AD04 7F058314 03E00008 */ jr $ra
|
||||
/* 08AD08 7F058318 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#ifdef NONMATCHING
|
||||
void matrix_4x4_multiply_homogeneous_in_place_eu (f32 src[3][3], f32 dst[3][3])
|
||||
void matrix_4x4_multiply_homogeneous_in_place_eu (f32 lhs[3][3], f32 rhs[3][3])
|
||||
{
|
||||
|
||||
f32 result[3][3];
|
||||
matrix_4x4_multiply_homogeneous_eu(lhs, rhs, &result);
|
||||
matrix_4x4_copy_homogeneous_eu(&result, rhs);
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel matrix_4x4_multiply_homogeneous_in_place_eu
|
||||
/* 08AD0C 7F05831C 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 08AD10 7F058320 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 08AD14 7F058324 AFA50044 */ sw $a1, 0x44($sp)
|
||||
/* 08AD18 7F058328 0FC160D3 */ jal matrix_4x4_multiply_homogeneous_eu
|
||||
/* 08AD1C 7F05832C 27A6001C */ addiu $a2, $sp, 0x1c
|
||||
/* 08AD20 7F058330 27A4001C */ addiu $a0, $sp, 0x1c
|
||||
/* 08AD24 7F058334 0FC160B4 */ jal matrix_4x4_copy_homogeneous_eu
|
||||
/* 08AD28 7F058338 8FA50044 */ lw $a1, 0x44($sp)
|
||||
/* 08AD2C 7F05833C 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 08AD30 7F058340 27BD0040 */ addiu $sp, $sp, 0x40
|
||||
/* 08AD34 7F058344 03E00008 */ jr $ra
|
||||
/* 08AD38 7F058348 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#ifdef NONMATCHING
|
||||
void matrix_4x4_multiply_homogeneous_eu (Mtxf * lhs, Mtxf * rhs, Mtxf * result)
|
||||
void matrix_4x4_multiply_homogeneous_eu(f32 lhs[3][3], f32 rhs[3][3], f32 result[3][3])
|
||||
{
|
||||
|
||||
s32 i, j;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
result[j][i] = (lhs[0][i] * rhs[j][0]) + (lhs[1][i] * rhs[j][1]) + (lhs[2][i] * rhs[j][2]);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel matrix_4x4_multiply_homogeneous_eu
|
||||
/* 08AD3C 7F05834C 00001825 */ move $v1, $zero
|
||||
/* 08AD40 7F058350 00804025 */ move $t0, $a0
|
||||
/* 08AD44 7F058354 240A000C */ li $t2, 12
|
||||
/* 08AD48 7F058358 24090003 */ li $t1, 3
|
||||
.L7F05835C:
|
||||
/* 08AD4C 7F05835C 00001025 */ move $v0, $zero
|
||||
/* 08AD50 7F058360 00C32021 */ addu $a0, $a2, $v1
|
||||
/* 08AD54 7F058364 00A03825 */ move $a3, $a1
|
||||
.L7F058368:
|
||||
/* 08AD58 7F058368 C5120000 */ lwc1 $f18, ($t0)
|
||||
/* 08AD5C 7F05836C C4F00000 */ lwc1 $f16, ($a3)
|
||||
/* 08AD60 7F058370 C50E000C */ lwc1 $f14, 0xc($t0)
|
||||
/* 08AD64 7F058374 C4EC0004 */ lwc1 $f12, 4($a3)
|
||||
/* 08AD68 7F058378 46109402 */ mul.s $f16, $f18, $f16
|
||||
/* 08AD6C 7F05837C C4F20008 */ lwc1 $f18, 8($a3)
|
||||
/* 08AD70 7F058380 C50A0018 */ lwc1 $f10, 0x18($t0)
|
||||
/* 08AD74 7F058384 460C7302 */ mul.s $f12, $f14, $f12
|
||||
/* 08AD78 7F058388 24420001 */ addiu $v0, $v0, 1
|
||||
/* 08AD7C 7F05838C 2484000C */ addiu $a0, $a0, 0xc
|
||||
/* 08AD80 7F058390 460A9282 */ mul.s $f10, $f18, $f10
|
||||
/* 08AD84 7F058394 24E7000C */ addiu $a3, $a3, 0xc
|
||||
/* 08AD88 7F058398 460C8300 */ add.s $f12, $f16, $f12
|
||||
/* 08AD8C 7F05839C 460C5300 */ add.s $f12, $f10, $f12
|
||||
/* 08AD90 7F0583A0 1449FFF1 */ bne $v0, $t1, .L7F058368
|
||||
/* 08AD94 7F0583A4 E48CFFF4 */ swc1 $f12, -0xc($a0)
|
||||
/* 08AD98 7F0583A8 24630004 */ addiu $v1, $v1, 4
|
||||
/* 08AD9C 7F0583AC 146AFFEB */ bne $v1, $t2, .L7F05835C
|
||||
/* 08ADA0 7F0583B0 25080004 */ addiu $t0, $t0, 4
|
||||
/* 08ADA4 7F0583B4 03E00008 */ jr $ra
|
||||
/* 08ADA8 7F0583B8 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#ifdef NONMATCHING
|
||||
void matrix_4x4_copy_eu (Mtxf * src, Mtxf * dst)
|
||||
void matrix_4x4_copy_eu(f32 src[][3], f32 dst[4][4])
|
||||
{
|
||||
s32 i, j;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
dst[i][j] = src[i][j];
|
||||
}
|
||||
}
|
||||
|
||||
dst[0][3] = 0.0;
|
||||
dst[1][3] = 0.0;
|
||||
dst[2][3] = 0.0;
|
||||
dst[3][0] = 0.0;
|
||||
dst[3][1] = 0.0;
|
||||
dst[3][2] = 0.0;
|
||||
dst[3][3] = 1.0;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel matrix_4x4_copy_eu
|
||||
/* 08ADAC 7F0583BC 00001025 */ move $v0, $zero
|
||||
/* 08ADB0 7F0583C0 00A03025 */ move $a2, $a1
|
||||
/* 08ADB4 7F0583C4 00803825 */ move $a3, $a0
|
||||
/* 08ADB8 7F0583C8 24090003 */ li $t1, 3
|
||||
.L7F0583CC:
|
||||
/* 08ADBC 7F0583CC 00001825 */ move $v1, $zero
|
||||
/* 08ADC0 7F0583D0 00C02025 */ move $a0, $a2
|
||||
/* 08ADC4 7F0583D4 00E04025 */ move $t0, $a3
|
||||
.L7F0583D8:
|
||||
/* 08ADC8 7F0583D8 C5040000 */ lwc1 $f4, ($t0)
|
||||
/* 08ADCC 7F0583DC 24630001 */ addiu $v1, $v1, 1
|
||||
/* 08ADD0 7F0583E0 24840004 */ addiu $a0, $a0, 4
|
||||
/* 08ADD4 7F0583E4 25080004 */ addiu $t0, $t0, 4
|
||||
/* 08ADD8 7F0583E8 1469FFFB */ bne $v1, $t1, .L7F0583D8
|
||||
/* 08ADDC 7F0583EC E484FFFC */ swc1 $f4, -4($a0)
|
||||
/* 08ADE0 7F0583F0 24420001 */ addiu $v0, $v0, 1
|
||||
/* 08ADE4 7F0583F4 24C60010 */ addiu $a2, $a2, 0x10
|
||||
/* 08ADE8 7F0583F8 1449FFF4 */ bne $v0, $t1, .L7F0583CC
|
||||
/* 08ADEC 7F0583FC 24E7000C */ addiu $a3, $a3, 0xc
|
||||
/* 08ADF0 7F058400 44800000 */ mtc1 $zero, $f0
|
||||
/* 08ADF4 7F058404 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 08ADF8 7F058408 44813000 */ mtc1 $at, $f6
|
||||
/* 08ADFC 7F05840C E4A0000C */ swc1 $f0, 0xc($a1)
|
||||
/* 08AE00 7F058410 E4A0001C */ swc1 $f0, 0x1c($a1)
|
||||
/* 08AE04 7F058414 E4A0002C */ swc1 $f0, 0x2c($a1)
|
||||
/* 08AE08 7F058418 E4A00030 */ swc1 $f0, 0x30($a1)
|
||||
/* 08AE0C 7F05841C E4A00034 */ swc1 $f0, 0x34($a1)
|
||||
/* 08AE10 7F058420 E4A00038 */ swc1 $f0, 0x38($a1)
|
||||
/* 08AE14 7F058424 03E00008 */ jr $ra
|
||||
/* 08AE18 7F058428 E4A6003C */ swc1 $f6, 0x3c($a1)
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_EU
|
||||
#ifdef NONMATCHING
|
||||
void matrix_7f05842c_eu (Mtxf * src, f32 dst[3][3])
|
||||
void matrix_7f05842c_eu(f32 src[][4], f32 dst[3][3])
|
||||
{
|
||||
|
||||
s32 i, j;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
for (j = 0; j < 3; j++)
|
||||
{
|
||||
dst[i][j] = src[i][j];
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
void matrix_7f05842c_eu (Mtxf * src, f32 dst[3][3]);
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel matrix_7f05842c_eu
|
||||
/* 08AE1C 7F05842C 00001025 */ move $v0, $zero
|
||||
/* 08AE20 7F058430 00A03025 */ move $a2, $a1
|
||||
/* 08AE24 7F058434 00803825 */ move $a3, $a0
|
||||
/* 08AE28 7F058438 24080003 */ li $t0, 3
|
||||
.L7F05843C:
|
||||
/* 08AE2C 7F05843C 00001825 */ move $v1, $zero
|
||||
/* 08AE30 7F058440 00C02025 */ move $a0, $a2
|
||||
/* 08AE34 7F058444 00E02825 */ move $a1, $a3
|
||||
.L7F058448:
|
||||
/* 08AE38 7F058448 C4A40000 */ lwc1 $f4, ($a1)
|
||||
/* 08AE3C 7F05844C 24630001 */ addiu $v1, $v1, 1
|
||||
/* 08AE40 7F058450 24840004 */ addiu $a0, $a0, 4
|
||||
/* 08AE44 7F058454 24A50004 */ addiu $a1, $a1, 4
|
||||
/* 08AE48 7F058458 1468FFFB */ bne $v1, $t0, .L7F058448
|
||||
/* 08AE4C 7F05845C E484FFFC */ swc1 $f4, -4($a0)
|
||||
/* 08AE50 7F058460 24420001 */ addiu $v0, $v0, 1
|
||||
/* 08AE54 7F058464 24C6000C */ addiu $a2, $a2, 0xc
|
||||
/* 08AE58 7F058468 1448FFF4 */ bne $v0, $t0, .L7F05843C
|
||||
/* 08AE5C 7F05846C 24E70010 */ addiu $a3, $a3, 0x10
|
||||
/* 08AE60 7F058470 03E00008 */ jr $ra
|
||||
/* 08AE64 7F058474 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@@ -311,38 +199,38 @@ void matrix_4x4_7F058274(Mtxf *arg0, Mtxf *arg1, Mtxf *arg2)
|
||||
arg2->m[3][3] = (arg0->m[2][3] * arg1->m[3][2]);
|
||||
}
|
||||
|
||||
void matrix_4x4_rotate_vector(Mtxf *matrix, vec3 vector, vec3 result)
|
||||
void matrix_4x4_rotate_vector(Mtxf *matrix, struct coord3d *vector, struct coord3d *result)
|
||||
{
|
||||
s32 i;
|
||||
for (i = 0; i < 3; i++)
|
||||
{
|
||||
result[i] = matrix->m[0][i] * vector[0] + matrix->m[1][i] * vector[1] + matrix->m[2][i] * vector[2];
|
||||
result->f[i] = matrix->m[0][i] * vector->f[0] + matrix->m[1][i] * vector->f[1] + matrix->m[2][i] * vector->f[2];
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_4x4_rotate_vector_in_place(Mtxf *matrix, vec3 vector)
|
||||
void mtx4RotateVecInPlace(Mtxf *matrix, struct coord3d *vector)
|
||||
{
|
||||
vec3 result;
|
||||
matrix_4x4_rotate_vector(matrix, vector, result);
|
||||
vector[0] = result[0];
|
||||
vector[1] = result[1];
|
||||
vector[2] = result[2];
|
||||
struct coord3d result;
|
||||
matrix_4x4_rotate_vector(matrix, vector, &result);
|
||||
vector->f[0] = result.f[0];
|
||||
vector->f[1] = result.f[1];
|
||||
vector->f[2] = result.f[2];
|
||||
}
|
||||
|
||||
void matrix_4x4_transform_vector(Mtxf *matrix, vec3 vector, vec3 result)
|
||||
void matrix_4x4_transform_vector(Mtxf *matrix, struct coord3d *vector, struct coord3d *result)
|
||||
{
|
||||
matrix_4x4_rotate_vector(matrix, vector, result);
|
||||
result[0] += matrix->m[3][0];
|
||||
result[1] += matrix->m[3][1];
|
||||
result[2] += matrix->m[3][2];
|
||||
result->f[0] += matrix->m[3][0];
|
||||
result->f[1] += matrix->m[3][1];
|
||||
result->f[2] += matrix->m[3][2];
|
||||
}
|
||||
|
||||
void matrix_4x4_transform_vector_in_place(Mtxf *matrix, vec3 vector)
|
||||
void mtx4TransformVecInPlace(Mtxf *matrix, struct coord3d *vector)
|
||||
{
|
||||
matrix_4x4_rotate_vector_in_place(matrix, vector);
|
||||
vector[0] += matrix->m[3][0];
|
||||
vector[1] += matrix->m[3][1];
|
||||
vector[2] += matrix->m[3][2];
|
||||
mtx4RotateVecInPlace(matrix, vector);
|
||||
vector->f[0] += matrix->m[3][0];
|
||||
vector->f[1] += matrix->m[3][1];
|
||||
vector->f[2] += matrix->m[3][2];
|
||||
}
|
||||
|
||||
void matrix_4x4_set_position_and_rotation_around_y(f32 *position, f32 angle, Mtxf *matrix)
|
||||
@@ -433,14 +321,14 @@ void matrix_4x4_set_rotation_around_z(f32 angle, Mtxf *matrix)
|
||||
matrix->m[3][3] = 1.0f;
|
||||
}
|
||||
|
||||
void matrix_4x4_set_rotation_around_xyz(vec3 angles, Mtxf *matrix)
|
||||
void matrix_4x4_set_rotation_around_xyz(struct coord3d *angles, Mtxf *matrix)
|
||||
{
|
||||
f32 cos_x = cosf(angles[0]);
|
||||
f32 sin_x = sinf(angles[0]);
|
||||
f32 cos_y = cosf(angles[1]);
|
||||
f32 sin_y = sinf(angles[1]);
|
||||
f32 cos_z = cosf(angles[2]);
|
||||
f32 sin_z = sinf(angles[2]);
|
||||
f32 cos_x = cosf(angles->f[0]);
|
||||
f32 sin_x = sinf(angles->f[0]);
|
||||
f32 cos_y = cosf(angles->f[1]);
|
||||
f32 sin_y = sinf(angles->f[1]);
|
||||
f32 cos_z = cosf(angles->f[2]);
|
||||
f32 sin_z = sinf(angles->f[2]);
|
||||
f32 sin_x_sin_z = sin_x * sin_z;
|
||||
f32 cos_x_sin_z = cos_x * sin_z;
|
||||
f32 sin_x_cos_z = sin_x * cos_z;
|
||||
@@ -464,7 +352,7 @@ void matrix_4x4_set_rotation_around_xyz(vec3 angles, Mtxf *matrix)
|
||||
}
|
||||
|
||||
// https://stackoverflow.com/a/15029416
|
||||
void matrix_4x4_get_rotation_around_xyz(Mtxf *matrix, vec3 angles)
|
||||
void matrix_4x4_get_rotation_around_xyz(Mtxf *matrix, struct coord3d *angles)
|
||||
{
|
||||
f32 norm;
|
||||
f32 sin_x_cos_y = matrix->m[1][2];
|
||||
@@ -472,35 +360,35 @@ void matrix_4x4_get_rotation_around_xyz(Mtxf *matrix, vec3 angles)
|
||||
norm = sqrtf(SQR(sin_x_cos_y) + SQR(cos_x_cos_y));
|
||||
if (EPSILON < norm)
|
||||
{
|
||||
angles[0] = atan2f(matrix->m[1][2], matrix->m[2][2]);
|
||||
angles[1] = atan2f(-matrix->m[0][2], norm);
|
||||
angles[2] = atan2f(matrix->m[0][1], matrix->m[0][0]);
|
||||
angles->f[0] = atan2f(matrix->m[1][2], matrix->m[2][2]);
|
||||
angles->f[1] = atan2f(-matrix->m[0][2], norm);
|
||||
angles->f[2] = atan2f(matrix->m[0][1], matrix->m[0][0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
angles[0] = 0.0f;
|
||||
angles[1] = atan2f(-matrix->m[0][2], norm);
|
||||
angles[2] = atan2f(-matrix->m[1][0], matrix->m[1][1]);
|
||||
angles->f[0] = 0.0f;
|
||||
angles->f[1] = atan2f(-matrix->m[0][2], norm);
|
||||
angles->f[2] = atan2f(-matrix->m[1][0], matrix->m[1][1]);
|
||||
}
|
||||
}
|
||||
|
||||
void matrix_4x4_set_position_and_rotation_around_xyz(vec3 position, vec3 rotation, Mtxf *matrix)
|
||||
void matrix_4x4_set_position_and_rotation_around_xyz(struct coord3d *position, struct coord3d * rotation, Mtxf *matrix)
|
||||
{
|
||||
matrix_4x4_set_rotation_around_xyz(rotation, matrix);
|
||||
matrix_4x4_set_position(position, matrix);
|
||||
}
|
||||
|
||||
void matrix_4x4_set_identity_and_position(vec3 position, Mtxf *matrix)
|
||||
void matrix_4x4_set_identity_and_position(struct coord3d * position, Mtxf *matrix)
|
||||
{
|
||||
matrix_4x4_set_identity(matrix);
|
||||
matrix_4x4_set_position(position, matrix);
|
||||
}
|
||||
|
||||
void matrix_4x4_set_position(vec3 position, Mtxf *matrix)
|
||||
void matrix_4x4_set_position(struct coord3d *position, Mtxf *matrix)
|
||||
{
|
||||
matrix->m[3][0] = position[0];
|
||||
matrix->m[3][1] = position[1];
|
||||
matrix->m[3][2] = position[2];
|
||||
matrix->m[3][0] = position->f[0];
|
||||
matrix->m[3][1] = position->f[1];
|
||||
matrix->m[3][2] = position->f[2];
|
||||
}
|
||||
|
||||
void matrix_column_1_scalar_multiply(f32 scalar, f32 *matrix)
|
||||
|
||||
+16
-7
@@ -4,11 +4,11 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
void matrix_4x4_rotate_vector_in_place(Mtxf *matrix, vec3 vector);
|
||||
void mtx4RotateVecInPlace(Mtxf *matrix, struct coord3d *vector);
|
||||
void matrix_4x4_7F059694(Mtxf *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9);
|
||||
|
||||
void matrix_4x4_multiply(Mtxf *lhs, Mtxf *rhs, Mtxf *result);
|
||||
void matrix_4x4_set_position(vec3 position, Mtxf *matrix);
|
||||
void matrix_4x4_set_position(struct coord3d *position, Mtxf *matrix);
|
||||
void matrix_4x4_7F059424(Mtxf *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9);
|
||||
u32 sub_GAME_7F05997C(f32 arg0, f32 arg1);
|
||||
void matrix_4x4_7F05A310(Mtxf *arg0, Mtxf *arg1);
|
||||
@@ -23,7 +23,7 @@ void matrix_4x4_multiply_homogeneous(Mtxf *lhs, Mtxf *rhs, Mtxf *result);
|
||||
|
||||
void matrix_4x4_f32_to_s32(Mtxf *a, Mtxf *b);
|
||||
void matrix_4x4_multiply_homogeneous_in_place(Mtxf *lhs, Mtxf *rhs);
|
||||
void matrix_4x4_transform_vector_in_place(Mtxf *matrix, vec3 vector);
|
||||
void mtx4TransformVecInPlace(Mtxf *matrix, struct coord3d *vector);
|
||||
void matrix_4x4_set_identity(Mtxf *matrix);
|
||||
void matrix_4x4_set_rotation_around_x(f32 angle, Mtxf *matrix);
|
||||
void matrix_4x4_set_rotation_around_y(f32 angle, Mtxf *matrix);
|
||||
@@ -31,16 +31,25 @@ void matrix_scalar_multiply(f32 scalar, f32 *matrix);
|
||||
void matrix_4x4_7F059908(Mtxf *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9);
|
||||
void matrix_4x4_set_rotation_around_z(f32 angle, Mtxf *matrix);
|
||||
void matrix_4x4_multiply_in_place(Mtxf *lhs, Mtxf *rhs);
|
||||
void matrix_4x4_set_identity_and_position(vec3 position, Mtxf *matrix);
|
||||
void matrix_4x4_set_identity_and_position(struct coord3d *position, Mtxf *matrix);
|
||||
void matrix_column_3_scalar_multiply_2(f32 scalar, f32 *matrix);
|
||||
void matrix_4x4_set_position_and_rotation_around_y(f32 *position, f32 angle, Mtxf *matrix);
|
||||
void matrix_scalar_multiply_2(f32 scalar, f32 *matrix);
|
||||
void matrix_4x4_set_rotation_around_xyz(vec3 angles, Mtxf *matrix);
|
||||
void matrix_4x4_set_rotation_around_xyz(struct coord3d *angles, Mtxf *matrix);
|
||||
void matrix_4x4_7F059708(Mtxf *arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, f32 arg7, f32 arg8, f32 arg9);
|
||||
void matrix_4x4_7F059E64(Mtxf *arg0, Mtxf *arg1);
|
||||
void matrix_column_1_scalar_multiply(f32 scalar, f32 *matrix);
|
||||
void matrix_column_2_scalar_multiply(f32 scalar, f32 *matrix);
|
||||
void matrix_column_3_scalar_multiply(f32 scalar, f32 *matrix);
|
||||
void matrix_column_3_scalar_multiply_2(f32 scalar, f32 *matrix);
|
||||
void matrix_4x4_set_position_and_rotation_around_xyz(struct coord3d *position, struct coord3d * rotation, Mtxf *matrix);
|
||||
void matrix_scalar_multiply_3(f32 scalar, f32 *matrix);
|
||||
|
||||
// tenative guess
|
||||
void sub_GAME_7F058E78(Mtxf *arg0, Mtxf *arg1);
|
||||
void matrix_7f05842c_eu (Mtxf * src, f32 dst[3][3]);
|
||||
void matrix_4x4_multiply_homogeneous_in_place_eu (f32 src[3][3], f32 dst[3][3]);
|
||||
void matrix_7f05842c_eu(f32 src[][4], f32 dst[3][3]);
|
||||
void matrix_4x4_multiply_homogeneous_in_place_eu(f32 src[3][3], f32 dst[3][3]);
|
||||
void matrix_4x4_multiply_homogeneous_eu(f32 lhs[3][3], f32 rhs[3][3], f32 result[3][3]);
|
||||
|
||||
/* matrixmath_misc.h */
|
||||
|
||||
|
||||
+16
-107
@@ -2,7 +2,7 @@
|
||||
#include "matrixmath.h"
|
||||
|
||||
/**
|
||||
* x vector plus ((difference to y vector) * scaler).
|
||||
* result = x vector plus ((y - x vector) * scaler).
|
||||
*/
|
||||
void sub_GAME_7F05AE00(vec3d *x, vec3d *y, f32 scaler, vec3d *result)
|
||||
{
|
||||
@@ -39,117 +39,26 @@ f32 sub_GAME_7F05AE50(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4)
|
||||
return total;
|
||||
}
|
||||
|
||||
/**
|
||||
* Following is cleaned up mips_to_c output.
|
||||
*
|
||||
* decomp status:
|
||||
* - compiles: yes
|
||||
* - stack resize: fail
|
||||
* - identical instructions: fail
|
||||
* - identical registers: fail
|
||||
*/
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F05AEFC(vec3d *arg0, vec3d *arg1, vec3d *arg2, vec3d *arg3, f32 arg4, vec3d *result)
|
||||
void sub_GAME_7F05AEFC(coord3d *arg0, coord3d *arg1, coord3d *arg2, coord3d *arg3, f32 arg4, coord3d *arg5)
|
||||
{
|
||||
f32 square;
|
||||
f32 cube;
|
||||
f32 temp_f8;
|
||||
f32 temp_f14;
|
||||
f32 temp_f16;
|
||||
f32 temp_f18;
|
||||
f32 stack;
|
||||
f32 mult0;
|
||||
f32 mult1;
|
||||
f32 mult2;
|
||||
f32 mult3;
|
||||
|
||||
square = arg4 * arg4;
|
||||
cube = square * arg4;
|
||||
f32 squared = arg4 * arg4;
|
||||
f32 cubed = arg4 * arg4 * arg4;
|
||||
|
||||
temp_f8 = 0.5f * (cube - square);
|
||||
temp_f14 = square - ((arg4 + cube) * 0.5f);
|
||||
temp_f16 = 1.0f + (1.5f * cube) - (2.5f * square);
|
||||
temp_f18 = (-1.5f * cube) + (0.5f * arg4) + (2.0f * square);
|
||||
mult0 = squared - 0.5f * (arg4 + cubed);
|
||||
mult1 = 1.5f * cubed - 2.5f * squared + 1.0f;
|
||||
mult2 = -1.5f * cubed + 2.0f * squared + 0.5f * arg4;
|
||||
mult3 = 0.5f * (cubed - squared);
|
||||
|
||||
result->f[0] = (temp_f8 * arg3->f[0]) + ((temp_f14 * arg0->f[0]) + (temp_f16 * arg1->f[0]) + (temp_f18 * arg2->f[0]));
|
||||
result->f[1] = (temp_f8 * arg3->f[1]) + ((temp_f14 * arg0->f[1]) + (temp_f16 * arg1->f[1]) + (temp_f18 * arg2->f[1]));
|
||||
result->f[2] = (temp_f8 * arg3->f[2]) + ((temp_f14 * arg0->f[2]) + (temp_f16 * arg1->f[2]) + (temp_f18 * arg2->f[2]));
|
||||
arg5->x = mult0 * arg0->f[0] + mult1 * arg1->f[0] + mult2 * arg2->f[0] + mult3 * arg3->f[0];
|
||||
arg5->y = mult0 * arg0->f[1] + mult1 * arg1->f[1] + mult2 * arg2->f[1] + mult3 * arg3->f[1];
|
||||
arg5->z = mult0 * arg0->f[2] + mult1 * arg1->f[2] + mult2 * arg2->f[2] + mult3 * arg3->f[2];
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F05AEFC
|
||||
/* 08FA2C 7F05AEFC 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 08FA30 7F05AF00 C7AC0038 */ lwc1 $f12, 0x38($sp)
|
||||
/* 08FA34 7F05AF04 3C013F00 */ li $at, 0x3F000000 # 0.500000
|
||||
/* 08FA38 7F05AF08 44813000 */ mtc1 $at, $f6
|
||||
/* 08FA3C 7F05AF0C 460C6002 */ mul.s $f0, $f12, $f12
|
||||
/* 08FA40 7F05AF10 8FAE003C */ lw $t6, 0x3c($sp)
|
||||
/* 08FA44 7F05AF14 460C0082 */ mul.s $f2, $f0, $f12
|
||||
/* 08FA48 7F05AF18 46001101 */ sub.s $f4, $f2, $f0
|
||||
/* 08FA4C 7F05AF1C 46026280 */ add.s $f10, $f12, $f2
|
||||
/* 08FA50 7F05AF20 46062202 */ mul.s $f8, $f4, $f6
|
||||
/* 08FA54 7F05AF24 44812000 */ mtc1 $at, $f4
|
||||
/* 08FA58 7F05AF28 3C013FC0 */ li $at, 0x3FC00000 # 1.500000
|
||||
/* 08FA5C 7F05AF2C 46045182 */ mul.s $f6, $f10, $f4
|
||||
/* 08FA60 7F05AF30 44815000 */ mtc1 $at, $f10
|
||||
/* 08FA64 7F05AF34 3C014020 */ li $at, 0x40200000 # 2.500000
|
||||
/* 08FA68 7F05AF38 E7A80000 */ swc1 $f8, ($sp)
|
||||
/* 08FA6C 7F05AF3C 46025102 */ mul.s $f4, $f10, $f2
|
||||
/* 08FA70 7F05AF40 46060381 */ sub.s $f14, $f0, $f6
|
||||
/* 08FA74 7F05AF44 44813000 */ mtc1 $at, $f6
|
||||
/* 08FA78 7F05AF48 3C013F80 */ li $at, 0x3F800000 # 1.000000
|
||||
/* 08FA7C 7F05AF4C 46003282 */ mul.s $f10, $f6, $f0
|
||||
/* 08FA80 7F05AF50 460A2181 */ sub.s $f6, $f4, $f10
|
||||
/* 08FA84 7F05AF54 44812000 */ mtc1 $at, $f4
|
||||
/* 08FA88 7F05AF58 3C01BFC0 */ li $at, 0xBFC00000 # -1.500000
|
||||
/* 08FA8C 7F05AF5C 44815000 */ mtc1 $at, $f10
|
||||
/* 08FA90 7F05AF60 46043400 */ add.s $f16, $f6, $f4
|
||||
/* 08FA94 7F05AF64 3C013F00 */ li $at, 0x3F000000 # 0.500000
|
||||
/* 08FA98 7F05AF68 46025182 */ mul.s $f6, $f10, $f2
|
||||
/* 08FA9C 7F05AF6C 46000100 */ add.s $f4, $f0, $f0
|
||||
/* 08FAA0 7F05AF70 46043280 */ add.s $f10, $f6, $f4
|
||||
/* 08FAA4 7F05AF74 44813000 */ mtc1 $at, $f6
|
||||
/* 08FAA8 7F05AF78 00000000 */ nop
|
||||
/* 08FAAC 7F05AF7C 460C3102 */ mul.s $f4, $f6, $f12
|
||||
/* 08FAB0 7F05AF80 C4E60000 */ lwc1 $f6, ($a3)
|
||||
/* 08FAB4 7F05AF84 46045480 */ add.s $f18, $f10, $f4
|
||||
/* 08FAB8 7F05AF88 46083282 */ mul.s $f10, $f6, $f8
|
||||
/* 08FABC 7F05AF8C C4840000 */ lwc1 $f4, ($a0)
|
||||
/* 08FAC0 7F05AF90 46047182 */ mul.s $f6, $f14, $f4
|
||||
/* 08FAC4 7F05AF94 C4A40000 */ lwc1 $f4, ($a1)
|
||||
/* 08FAC8 7F05AF98 46048102 */ mul.s $f4, $f16, $f4
|
||||
/* 08FACC 7F05AF9C 46043180 */ add.s $f6, $f6, $f4
|
||||
/* 08FAD0 7F05AFA0 C4C40000 */ lwc1 $f4, ($a2)
|
||||
/* 08FAD4 7F05AFA4 46049102 */ mul.s $f4, $f18, $f4
|
||||
/* 08FAD8 7F05AFA8 46043180 */ add.s $f6, $f6, $f4
|
||||
/* 08FADC 7F05AFAC 46065100 */ add.s $f4, $f10, $f6
|
||||
/* 08FAE0 7F05AFB0 E5C40000 */ swc1 $f4, ($t6)
|
||||
/* 08FAE4 7F05AFB4 C4EA0004 */ lwc1 $f10, 4($a3)
|
||||
/* 08FAE8 7F05AFB8 C4840004 */ lwc1 $f4, 4($a0)
|
||||
/* 08FAEC 7F05AFBC 46085182 */ mul.s $f6, $f10, $f8
|
||||
/* 08FAF0 7F05AFC0 00000000 */ nop
|
||||
/* 08FAF4 7F05AFC4 46047282 */ mul.s $f10, $f14, $f4
|
||||
/* 08FAF8 7F05AFC8 C4A40004 */ lwc1 $f4, 4($a1)
|
||||
/* 08FAFC 7F05AFCC 46048102 */ mul.s $f4, $f16, $f4
|
||||
/* 08FB00 7F05AFD0 46045280 */ add.s $f10, $f10, $f4
|
||||
/* 08FB04 7F05AFD4 C4C40004 */ lwc1 $f4, 4($a2)
|
||||
/* 08FB08 7F05AFD8 46049102 */ mul.s $f4, $f18, $f4
|
||||
/* 08FB0C 7F05AFDC 46045280 */ add.s $f10, $f10, $f4
|
||||
/* 08FB10 7F05AFE0 460A3100 */ add.s $f4, $f6, $f10
|
||||
/* 08FB14 7F05AFE4 E5C40004 */ swc1 $f4, 4($t6)
|
||||
/* 08FB18 7F05AFE8 C4E60008 */ lwc1 $f6, 8($a3)
|
||||
/* 08FB1C 7F05AFEC C4840008 */ lwc1 $f4, 8($a0)
|
||||
/* 08FB20 7F05AFF0 46083282 */ mul.s $f10, $f6, $f8
|
||||
/* 08FB24 7F05AFF4 C4A80008 */ lwc1 $f8, 8($a1)
|
||||
/* 08FB28 7F05AFF8 46047182 */ mul.s $f6, $f14, $f4
|
||||
/* 08FB2C 7F05AFFC 00000000 */ nop
|
||||
/* 08FB30 7F05B000 46088102 */ mul.s $f4, $f16, $f8
|
||||
/* 08FB34 7F05B004 46043200 */ add.s $f8, $f6, $f4
|
||||
/* 08FB38 7F05B008 C4C60008 */ lwc1 $f6, 8($a2)
|
||||
/* 08FB3C 7F05B00C 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 08FB40 7F05B010 46069102 */ mul.s $f4, $f18, $f6
|
||||
/* 08FB44 7F05B014 46044180 */ add.s $f6, $f8, $f4
|
||||
/* 08FB48 7F05B018 46065200 */ add.s $f8, $f10, $f6
|
||||
/* 08FB4C 7F05B01C 03E00008 */ jr $ra
|
||||
/* 08FB50 7F05B020 E5C80008 */ swc1 $f8, 8($t6)
|
||||
)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Following is cleaned up mips_to_c output.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -1809,7 +1809,7 @@ void sub_GAME_7F0C11FC(s32 stagenum)
|
||||
return;
|
||||
}
|
||||
|
||||
void sub_GAME_7F0C1268(void)
|
||||
void set_missionstate_zero(void)
|
||||
{
|
||||
set_missionstate(MISSION_STATE_0);
|
||||
}
|
||||
|
||||
+537
-536
File diff suppressed because it is too large
Load Diff
@@ -28,6 +28,9 @@ struct AwardMetrics {
|
||||
s32 shortest_inning; // 0x34
|
||||
};
|
||||
|
||||
extern s32 g_stopPlayFlag;
|
||||
extern s32 g_gameOverFlag;
|
||||
|
||||
s32 mpFindMaxInt(int param_1, int param_2, int param_3, int param_4, int param_5);
|
||||
|
||||
s32 mpFindMinInt(int param_1, int param_2, int param_3, int param_4, int param_5);
|
||||
@@ -41,5 +44,6 @@ void mpCalculateAwards(int arg0);
|
||||
s32 get_points_for_mp_player(s32 arg0);
|
||||
void mpwatchSetStopPlayFlag(void);
|
||||
Gfx * mp_watch_menu_display(Gfx *arg0);
|
||||
s32 disablePlayerActionsWhenPausedOrInMpMenu(void);
|
||||
|
||||
#endif
|
||||
|
||||
+16
-16
@@ -1,7 +1,7 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondconstants.h>
|
||||
#include "mp_weapon.h"
|
||||
|
||||
#include "assets/obseg/text/LmpweaponsE.h"
|
||||
// data
|
||||
//D:80048670
|
||||
struct s_mp_weapon_set mp_weapon_set_slaps[] =
|
||||
@@ -101,7 +101,7 @@ struct s_mp_weapon_set mp_weapon_set_remote_m[] =
|
||||
INLINE_S_MP_WEAPON_SET(ITEM_WPPK, PROP_CHRWPPK, 3.0, AMMO_9MM, 0x32, 1),
|
||||
INLINE_S_MP_WEAPON_SET(ITEM_UZI, PROP_CHRUZI, 1.5, AMMO_9MM, 0x64, 1),
|
||||
INLINE_S_MP_WEAPON_SET(ITEM_UZI, PROP_CHRUZI, 1.5, AMMO_9MM, 0x64, 1),
|
||||
#ifdef VERSION_US
|
||||
#ifdef BUGFIX_R0
|
||||
INLINE_S_MP_WEAPON_SET(ITEM_M16, PROP_CHRKALASH, 1.5, AMMO_RIFLE, 0x64, 1),
|
||||
INLINE_S_MP_WEAPON_SET(ITEM_M16, PROP_CHRKALASH, 1.5, AMMO_RIFLE, 0x64, 1),
|
||||
#else
|
||||
@@ -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, 0x0), mp_weapon_set_slaps},
|
||||
{TEXT(LMPWEAPONS, 0x1), mp_weapon_set_pistols},
|
||||
{TEXT(LMPWEAPONS, 0xD), mp_weapon_set_knife},
|
||||
{TEXT(LMPWEAPONS, 0x2), mp_weapon_set_auto},
|
||||
{TEXT(LMPWEAPONS, 0x3), mp_weapon_set_power},
|
||||
{TEXT(LMPWEAPONS, 0x4), mp_weapon_set_sniper},
|
||||
{TEXT(LMPWEAPONS, 0x5), mp_weapon_set_grenade},
|
||||
{TEXT(LMPWEAPONS, 0x6), mp_weapon_set_remote_m},
|
||||
{TEXT(LMPWEAPONS, 0x7), mp_weapon_set_glaunch},
|
||||
{TEXT(LMPWEAPONS, 0x8), mp_weapon_set_timed_m},
|
||||
{TEXT(LMPWEAPONS, 0x9), mp_weapon_set_prox_m},
|
||||
{TEXT(LMPWEAPONS, 0xA), mp_weapon_set_rockets},
|
||||
{TEXT(LMPWEAPONS, 0xB), mp_weapon_set_lasers},
|
||||
{TEXT(LMPWEAPONS, 0xC), mp_weapon_set_golden}
|
||||
{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}
|
||||
};
|
||||
|
||||
s32 mp_weapon_set = 0xB;
|
||||
|
||||
+27
-68
@@ -110,14 +110,15 @@ void resource_load_from_indy(u8 *ptrdata, s32 bytes, fileentry *srcfile, resou
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void obInitDebugNoticeList(void)
|
||||
void obInit(void)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
debTryAdd(&ob_c_debug_notice_list_entry,"ob_c_debug");
|
||||
for (i = 0; i < (file_entry_max - 1); i++)
|
||||
for (i = file_entry_max-1; i > 1 ; i--)
|
||||
{
|
||||
resource_lookup_data_array[i].rom_size = (file_resource_table[i+1].hw_address - file_resource_table[i].hw_address);
|
||||
s32 size = (file_resource_table[i+1].hw_address - file_resource_table[i].hw_address);
|
||||
resource_lookup_data_array[i].rom_size = size;
|
||||
resource_lookup_data_array[i].poolRemaining = 0;
|
||||
resource_lookup_data_array[i].pc_size = 0;
|
||||
resource_lookup_data_array[i].rom_remaining = 0;
|
||||
@@ -131,7 +132,7 @@ glabel aOb_c_debug
|
||||
/*"ob_c_debug"*/
|
||||
.word 0x6F625F63, 0x5F646562, 0x75670000
|
||||
.text
|
||||
glabel obInitDebugNoticeList
|
||||
glabel obInit
|
||||
/* 0F1758 7F0BCC28 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 0F175C 7F0BCC2C AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0F1760 7F0BCC30 3C048004 */ lui $a0, %hi(ob_c_debug_notice_list_entry)
|
||||
@@ -183,7 +184,7 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
s32 index;
|
||||
fileentry *fileentry;
|
||||
|
||||
index = get_index_num_of_named_resource(bgname);
|
||||
index = fileGetIndex(bgname);
|
||||
fileentry = &file_resource_table[index];
|
||||
|
||||
if (resource_lookup_data_array[index].rom_size != 0)
|
||||
@@ -201,28 +202,28 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/* no VERSION_EU */
|
||||
void _load_rom_index_to_membank(s32 index,s32 param_2,s32 size,u8 bank)
|
||||
void *_fileIndexLoadToBank(s32 index, FILELOADMETHOD param_2, s32 size, u8 bank)
|
||||
{
|
||||
load_rom_resource_index_to_membank(index, param_2, size, bank);
|
||||
return fileIndexLoadToBank(index, param_2, size, bank);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
/* no VERSION_EU */
|
||||
void _load_resource_index_to_membank(int index,s32 param_2,u8 *ptrdata,int size)
|
||||
void *_fileIndexLoadToAddr(int index, FILELOADMETHOD param_2, u8 *ptrdata, int size)
|
||||
{
|
||||
load_resource_index_to_buffer(index, param_2, ptrdata, size);
|
||||
return fileIndexLoadToAddr(index, param_2, ptrdata, size);
|
||||
}
|
||||
#endif
|
||||
|
||||
void _load_resource_named_to_membank(char *filename, FILELOADMETHOD loadMethod, s32 size, u8 bank)
|
||||
void *_fileNameLoadToBank(char *filename, FILELOADMETHOD loadMethod, s32 size, u8 bank)
|
||||
{
|
||||
load_rom_resource_index_to_membank(get_index_num_of_named_resource(filename), loadMethod, size, bank);
|
||||
return fileIndexLoadToBank(fileGetIndex(filename), loadMethod, size, bank);
|
||||
}
|
||||
|
||||
void _load_resource_named_to_buffer(char *filename, FILELOADMETHOD loadMethod, u8 *ptrdata, s32 size)
|
||||
void * _fileNameLoadToAddr(char *filename, FILELOADMETHOD loadMethod, u8 *ptrdata, s32 size)
|
||||
{
|
||||
load_resource_index_to_buffer(get_index_num_of_named_resource(filename), loadMethod, ptrdata, size);
|
||||
return fileIndexLoadToAddr(fileGetIndex(filename), loadMethod, ptrdata, size);
|
||||
}
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
@@ -236,7 +237,7 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
s32 index;
|
||||
fileentry *fileentry;
|
||||
|
||||
index = get_index_num_of_named_resource(bgname);
|
||||
index = fileGetIndex(bgname);
|
||||
fileentry = &file_resource_table[index];
|
||||
|
||||
if (resource_lookup_data_array[index].rom_size != 0)
|
||||
@@ -256,7 +257,7 @@ void obLoadBGFileBytesAtOffset(u8 *bgname, u8 *target, s32 offset, s32 len)
|
||||
|
||||
|
||||
|
||||
void *load_rom_resource_index_to_membank(s32 index, FILELOADMETHOD loadMethod, s32 size, u8 bank) //#MATCH https://decomp.me/scratch/uqiBe
|
||||
void *fileIndexLoadToBank(s32 index, FILELOADMETHOD loadMethod, s32 size, u8 bank) //#MATCH https://decomp.me/scratch/uqiBe
|
||||
{
|
||||
resource_lookup_data_entry *info = &resource_lookup_data_array[index];
|
||||
s32 bytes;
|
||||
@@ -324,7 +325,7 @@ void *load_rom_resource_index_to_membank(s32 index, FILELOADMETHOD loadMethod, s
|
||||
|
||||
|
||||
|
||||
void *load_resource_index_to_buffer(s32 index, FILELOADMETHOD loadMethod, void *ptrdata, s32 bytes) //#match https://decomp.me/scratch/YExRh
|
||||
void *fileIndexLoadToAddr(s32 index, FILELOADMETHOD loadMethod, void *ptrdata, s32 bytes) //#match https://decomp.me/scratch/YExRh
|
||||
{
|
||||
resource_lookup_data_entry *info = &resource_lookup_data_array[index];
|
||||
|
||||
@@ -385,64 +386,22 @@ s32 get_rom_remaining_buffer_for_index(s32 index)
|
||||
}
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
//f1c74: addiu t7,t7,-0x7750 | f1c74: addiu sp,sp,-0x18 //moved
|
||||
// > f1c78: addiu t7,t7,-0x7750
|
||||
//f1c78: sll t6,t6,0x2 f1c7c: sll t6,t6,0x2
|
||||
//f1c7c: addiu sp,sp,-0x18 | f1c80: addu v0,t6,t7
|
||||
//f1c80: addu v0,t6,t7 | f1c84: sw ra,0x14(sp)
|
||||
//f1c84: sw ra,0x14(sp) r f1c88: sw a1,0x1c(sp)
|
||||
//f1c88: sw a1,0x1c(sp) r f1c8c: sw a2,0x20(sp) //extra reg save
|
||||
void sub_GAME_7F0BD138(int index, u8 *ptrdata, u32 size, u32 param_4)
|
||||
void fileSetSize(s32 filenum, u8* ptr, u32 size, s32 reallocate)
|
||||
{
|
||||
resource_lookup_data_array[index].poolRemaining = size;
|
||||
resource_lookup_data_array[index].rom_remaining = size;
|
||||
|
||||
|
||||
if (param_4 !=0 )
|
||||
resource_lookup_data_array[filenum].poolRemaining = size;
|
||||
resource_lookup_data_array[filenum].rom_remaining = size;
|
||||
if (reallocate != 0)
|
||||
{
|
||||
mempAddEntryOfSizeToBank(ptrdata, size, 4);
|
||||
mempAddEntryOfSizeToBank(ptr, resource_lookup_data_array[filenum].poolRemaining, 4U);
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F0BD138
|
||||
/* 0F1C68 7F0BD138 00047080 */ sll $t6, $a0, 2
|
||||
/* 0F1C6C 7F0BD13C 01C47021 */ addu $t6, $t6, $a0
|
||||
/* 0F1C70 7F0BD140 3C0F8009 */ lui $t7, %hi(resource_lookup_data_array)
|
||||
/* 0F1C74 7F0BD144 25EF88B0 */ addiu $t7, %lo(resource_lookup_data_array) # addiu $t7, $t7, -0x7750
|
||||
/* 0F1C78 7F0BD148 000E7080 */ sll $t6, $t6, 2
|
||||
/* 0F1C7C 7F0BD14C 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 0F1C80 7F0BD150 01CF1021 */ addu $v0, $t6, $t7
|
||||
/* 0F1C84 7F0BD154 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 0F1C88 7F0BD158 AFA5001C */ sw $a1, 0x1c($sp)
|
||||
/* 0F1C8C 7F0BD15C AC460004 */ sw $a2, 4($v0)
|
||||
/* 0F1C90 7F0BD160 10E00005 */ beqz $a3, .L7F0BD178
|
||||
/* 0F1C94 7F0BD164 AC46000C */ sw $a2, 0xc($v0)
|
||||
/* 0F1C98 7F0BD168 00A02025 */ move $a0, $a1
|
||||
/* 0F1C9C 7F0BD16C 00C02825 */ move $a1, $a2
|
||||
/* 0F1CA0 7F0BD170 0C002601 */ jal mempAddEntryOfSizeToBank
|
||||
/* 0F1CA4 7F0BD174 24060004 */ li $a2, 4
|
||||
.L7F0BD178:
|
||||
/* 0F1CA8 7F0BD178 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 0F1CAC 7F0BD17C 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 0F1CB0 7F0BD180 03E00008 */ jr $ra
|
||||
/* 0F1CB4 7F0BD184 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
s32 get_pc_buffer_remaining_value(u8 *name)
|
||||
{
|
||||
int index;
|
||||
|
||||
index = get_index_num_of_named_resource(name);
|
||||
index = fileGetIndex(name);
|
||||
return resource_lookup_data_array[index].poolRemaining;
|
||||
}
|
||||
|
||||
@@ -461,7 +420,7 @@ void obBlankResourcesLoadedInBank(u8 bank)
|
||||
}
|
||||
|
||||
void obBlankResourcesInBank5(void) {
|
||||
obBlankResourcesLoadedInBank(5);
|
||||
obBlankResourcesLoadedInBank(MEMPOOL_ME);
|
||||
}
|
||||
|
||||
|
||||
@@ -470,7 +429,7 @@ void obBlankResourcesInBank5(void) {
|
||||
|
||||
#ifdef NONMATCHING
|
||||
//needs work
|
||||
int get_index_num_of_named_resource(u8 *resname)
|
||||
int fileGetIndex(u8 *resname)
|
||||
{
|
||||
int i;
|
||||
int size;
|
||||
@@ -509,7 +468,7 @@ int get_index_num_of_named_resource(u8 *resname)
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel get_index_num_of_named_resource
|
||||
glabel fileGetIndex
|
||||
/* 0F1D84 7F0BD254 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 0F1D88 7F0BD258 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* 0F1D8C 7F0BD25C 3C128005 */ lui $s2, %hi(file_entry_max)
|
||||
@@ -598,7 +557,7 @@ glabel get_index_num_of_named_resource
|
||||
#if !defined(LEFTOVERDEBUG)
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel get_index_num_of_named_resource
|
||||
glabel fileGetIndex
|
||||
/* 0EEFFC 7F0BC60C 27BDFFC0 */ addiu $sp, $sp, -0x40
|
||||
/* 0EF000 7F0BC610 AFB2001C */ sw $s2, 0x1c($sp)
|
||||
/* 0EF004 7F0BC614 3C128004 */ lui $s2, %hi(file_entry_max) # $s2, 0x8004
|
||||
|
||||
+14
-2
@@ -29,9 +29,21 @@ typedef enum FILELOADMETHOD
|
||||
|
||||
void load_resource(u8 *ptrdata, s32 bytes, fileentry *srcfile, resource_lookup_data_entry *lookupdata);
|
||||
void resource_load_from_indy(u8 *ptrdata, s32 bytes, fileentry *srcfile, resource_lookup_data_entry *lookupdata);
|
||||
void *load_rom_resource_index_to_membank(s32 index, FILELOADMETHOD loadMethod, s32 size, u8 bank);
|
||||
void *load_resource_index_to_buffer(s32 index, FILELOADMETHOD loadMethod, void *ptrdata, s32 bytes);
|
||||
|
||||
void obBlankResourcesLoadedInBank(u8 i);
|
||||
void obBlankResourcesInBank5(void);
|
||||
|
||||
void *fileIndexLoadToBank(s32 index, FILELOADMETHOD loadMethod, s32 size, u8 bank);
|
||||
void *fileIndexLoadToAddr(s32 index, FILELOADMETHOD loadMethod, void *ptrdata, s32 bytes);
|
||||
|
||||
void *_fileNameLoadToAddr(char *filename, FILELOADMETHOD loadMethod, u8 *ptrdata, s32 size);
|
||||
void *_fileNameLoadToBank(char *filename, FILELOADMETHOD loadMethod, s32 size, u8 bank);
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
void *_fileIndexLoadToAddr(int index, FILELOADMETHOD param_2, u8 *ptrdata, int size);
|
||||
void *_fileIndexLoadToBank(s32 index, FILELOADMETHOD param_2, s32 size, u8 bank);
|
||||
#endif
|
||||
|
||||
s32 get_pc_buffer_remaining_value(u8 *name);
|
||||
|
||||
#endif
|
||||
|
||||
+28
-27
@@ -142,7 +142,7 @@ u32 D_80036248 = 0;
|
||||
//D:8003624C
|
||||
u32 D_8003624C = 0;
|
||||
//D:80036250
|
||||
u32 D_80036250 = 1;
|
||||
u32 g_ModelAnimMergingEnabled = 1;
|
||||
//D:80036254
|
||||
u32 D_80036254 = 0;
|
||||
//D:80036258
|
||||
@@ -286,15 +286,7 @@ s32 D_80036418 = 0;
|
||||
s32 D_8003641C = 0;
|
||||
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
// rodata
|
||||
//D:80054420
|
||||
const char aDrawjointlistNoGfxlist[] = "drawjointlist: no gfxlist!\n";
|
||||
//D:8005443C
|
||||
const char aDrawjointlistNoObject0xX[] = "drawjointlist: no object! (0x%X)\n";
|
||||
//D:80054460
|
||||
const char aDrawjointlistObjectNotInitialised0[] = "drawjointlist: object not initialised! (0x%X)\n";
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
*/
|
||||
@@ -533,14 +525,14 @@ glabel sub_GAME_7F06B29C
|
||||
/* 09FE34 7F06B304 02002825 */ move $a1, $s0
|
||||
/* 09FE38 7F06B308 8C470004 */ lw $a3, 4($v0)
|
||||
/* 09FE3C 7F06B30C 00003025 */ move $a2, $zero
|
||||
/* 09FE40 7F06B310 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FE40 7F06B310 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FE44 7F06B314 AFA70100 */ sw $a3, 0x100($sp)
|
||||
/* 09FE48 7F06B318 8FA70100 */ lw $a3, 0x100($sp)
|
||||
/* 09FE4C 7F06B31C 00408025 */ move $s0, $v0
|
||||
/* 09FE50 7F06B320 00003025 */ move $a2, $zero
|
||||
/* 09FE54 7F06B324 10E0000A */ beqz $a3, .L7F06B350
|
||||
/* 09FE58 7F06B328 00E02825 */ move $a1, $a3
|
||||
/* 09FE5C 7F06B32C 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FE5C 7F06B32C 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FE60 7F06B330 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FE64 7F06B334 C44A0038 */ lwc1 $f10, 0x38($v0)
|
||||
/* 09FE68 7F06B338 C6040038 */ lwc1 $f4, 0x38($s0)
|
||||
@@ -560,14 +552,14 @@ glabel sub_GAME_7F06B29C
|
||||
/* 09FE98 7F06B368 02002825 */ move $a1, $s0
|
||||
/* 09FE9C 7F06B36C 8C470014 */ lw $a3, 0x14($v0)
|
||||
/* 09FEA0 7F06B370 00003025 */ move $a2, $zero
|
||||
/* 09FEA4 7F06B374 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FEA4 7F06B374 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FEA8 7F06B378 AFA700F0 */ sw $a3, 0xf0($sp)
|
||||
/* 09FEAC 7F06B37C 8FA700F0 */ lw $a3, 0xf0($sp)
|
||||
/* 09FEB0 7F06B380 00408025 */ move $s0, $v0
|
||||
/* 09FEB4 7F06B384 00003025 */ move $a2, $zero
|
||||
/* 09FEB8 7F06B388 10E0000A */ beqz $a3, .L7F06B3B4
|
||||
/* 09FEBC 7F06B38C 00E02825 */ move $a1, $a3
|
||||
/* 09FEC0 7F06B390 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FEC0 7F06B390 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FEC4 7F06B394 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FEC8 7F06B398 C4480038 */ lwc1 $f8, 0x38($v0)
|
||||
/* 09FECC 7F06B39C C60A0038 */ lwc1 $f10, 0x38($s0)
|
||||
@@ -587,14 +579,14 @@ glabel sub_GAME_7F06B29C
|
||||
/* 09FEFC 7F06B3CC 02002825 */ move $a1, $s0
|
||||
/* 09FF00 7F06B3D0 8C470014 */ lw $a3, 0x14($v0)
|
||||
/* 09FF04 7F06B3D4 00003025 */ move $a2, $zero
|
||||
/* 09FF08 7F06B3D8 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FF08 7F06B3D8 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FF0C 7F06B3DC AFA700E0 */ sw $a3, 0xe0($sp)
|
||||
/* 09FF10 7F06B3E0 8FA700E0 */ lw $a3, 0xe0($sp)
|
||||
/* 09FF14 7F06B3E4 00408025 */ move $s0, $v0
|
||||
/* 09FF18 7F06B3E8 00003025 */ move $a2, $zero
|
||||
/* 09FF1C 7F06B3EC 10E0000A */ beqz $a3, .L7F06B418
|
||||
/* 09FF20 7F06B3F0 00E02825 */ move $a1, $a3
|
||||
/* 09FF24 7F06B3F4 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FF24 7F06B3F4 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FF28 7F06B3F8 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FF2C 7F06B3FC C4460038 */ lwc1 $f6, 0x38($v0)
|
||||
/* 09FF30 7F06B400 C6080038 */ lwc1 $f8, 0x38($s0)
|
||||
@@ -611,7 +603,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B428:
|
||||
/* 09FF58 7F06B428 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FF5C 7F06B42C 02002825 */ move $a1, $s0
|
||||
/* 09FF60 7F06B430 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FF60 7F06B430 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FF64 7F06B434 00003025 */ move $a2, $zero
|
||||
/* 09FF68 7F06B438 C4440038 */ lwc1 $f4, 0x38($v0)
|
||||
/* 09FF6C 7F06B43C 46002187 */ neg.s $f6, $f4
|
||||
@@ -620,7 +612,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B448:
|
||||
/* 09FF78 7F06B448 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FF7C 7F06B44C 02002825 */ move $a1, $s0
|
||||
/* 09FF80 7F06B450 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FF80 7F06B450 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FF84 7F06B454 00003025 */ move $a2, $zero
|
||||
/* 09FF88 7F06B458 8E030004 */ lw $v1, 4($s0)
|
||||
/* 09FF8C 7F06B45C C44A0008 */ lwc1 $f10, 8($v0)
|
||||
@@ -642,7 +634,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B49C:
|
||||
/* 09FFCC 7F06B49C 8E240000 */ lw $a0, ($s1)
|
||||
/* 09FFD0 7F06B4A0 02002825 */ move $a1, $s0
|
||||
/* 09FFD4 7F06B4A4 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 09FFD4 7F06B4A4 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 09FFD8 7F06B4A8 00003025 */ move $a2, $zero
|
||||
/* 09FFDC 7F06B4AC 8E030004 */ lw $v1, 4($s0)
|
||||
/* 09FFE0 7F06B4B0 C4420008 */ lwc1 $f2, 8($v0)
|
||||
@@ -681,7 +673,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B530:
|
||||
/* 0A0060 7F06B530 8E240000 */ lw $a0, ($s1)
|
||||
/* 0A0064 7F06B534 02002825 */ move $a1, $s0
|
||||
/* 0A0068 7F06B538 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0A0068 7F06B538 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0A006C 7F06B53C 00003025 */ move $a2, $zero
|
||||
/* 0A0070 7F06B540 8E030004 */ lw $v1, 4($s0)
|
||||
/* 0A0074 7F06B544 C4460008 */ lwc1 $f6, 8($v0)
|
||||
@@ -704,7 +696,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B588:
|
||||
/* 0A00B8 7F06B588 8E240000 */ lw $a0, ($s1)
|
||||
/* 0A00BC 7F06B58C 02002825 */ move $a1, $s0
|
||||
/* 0A00C0 7F06B590 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0A00C0 7F06B590 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0A00C4 7F06B594 00003025 */ move $a2, $zero
|
||||
/* 0A00C8 7F06B598 8E030004 */ lw $v1, 4($s0)
|
||||
/* 0A00CC 7F06B59C C4480008 */ lwc1 $f8, 8($v0)
|
||||
@@ -726,7 +718,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B5DC:
|
||||
/* 0A010C 7F06B5DC 8E240000 */ lw $a0, ($s1)
|
||||
/* 0A0110 7F06B5E0 02002825 */ move $a1, $s0
|
||||
/* 0A0114 7F06B5E4 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0A0114 7F06B5E4 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0A0118 7F06B5E8 00003025 */ move $a2, $zero
|
||||
/* 0A011C 7F06B5EC 8E030004 */ lw $v1, 4($s0)
|
||||
/* 0A0120 7F06B5F0 C4440008 */ lwc1 $f4, 8($v0)
|
||||
@@ -748,7 +740,7 @@ glabel sub_GAME_7F06B29C
|
||||
.L7F06B630:
|
||||
/* 0A0160 7F06B630 8E240000 */ lw $a0, ($s1)
|
||||
/* 0A0164 7F06B634 02002825 */ move $a1, $s0
|
||||
/* 0A0168 7F06B638 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0A0168 7F06B638 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0A016C 7F06B63C 00003025 */ move $a2, $zero
|
||||
/* 0A0170 7F06B640 8E060004 */ lw $a2, 4($s0)
|
||||
/* 0A0174 7F06B644 8E240000 */ lw $a0, ($s1)
|
||||
@@ -810,7 +802,7 @@ def_7F06B2F4:
|
||||
/* 0A0248 7F06B718 AFA00078 */ sw $zero, 0x78($sp)
|
||||
/* 0A024C 7F06B71C AFA00074 */ sw $zero, 0x74($sp)
|
||||
/* 0A0250 7F06B720 AFA70080 */ sw $a3, 0x80($sp)
|
||||
/* 0A0254 7F06B724 0FC1B198 */ jal sub_GAME_7F06C660
|
||||
/* 0A0254 7F06B724 0FC1B198 */ jal modelFindNodeMtx
|
||||
/* 0A0258 7F06B728 AFA8007C */ sw $t0, 0x7c($sp)
|
||||
/* 0A025C 7F06B72C 8FA30114 */ lw $v1, 0x114($sp)
|
||||
/* 0A0260 7F06B730 8FA70080 */ lw $a3, 0x80($sp)
|
||||
@@ -1173,6 +1165,15 @@ glabel sub_GAME_7F06BB28
|
||||
|
||||
|
||||
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
// rodata
|
||||
//D:80054420
|
||||
const char aDrawjointlistNoGfxlist[] = "drawjointlist: no gfxlist!\n";
|
||||
//D:8005443C
|
||||
const char aDrawjointlistNoObject0xX[] = "drawjointlist: no object! (0x%X)\n";
|
||||
//D:80054460
|
||||
const char aDrawjointlistObjectNotInitialised0[] = "drawjointlist: object not initialised! (0x%X)\n";
|
||||
#endif
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void drawjointlist(void) {
|
||||
@@ -1670,19 +1671,19 @@ glabel probably_damage_detail_blood_effect_related
|
||||
/* 0A0AC0 7F06BF90 00008825 */ move $s1, $zero
|
||||
.L7F06BF94:
|
||||
/* 0A0AC4 7F06BF94 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A0AC8 7F06BF98 0FC1BA5C */ jal sub_GAME_7F06E970
|
||||
/* 0A0AC8 7F06BF98 0FC1BA5C */ jal modelApplyDistanceRelations
|
||||
/* 0A0ACC 7F06BF9C 02002825 */ move $a1, $s0
|
||||
/* 0A0AD0 7F06BFA0 10000009 */ b .L7F06BFC8
|
||||
/* 0A0AD4 7F06BFA4 00000000 */ nop
|
||||
.L7F06BFA8:
|
||||
/* 0A0AD8 7F06BFA8 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A0ADC 7F06BFAC 0FC1BA6F */ jal process_12_handle_switch
|
||||
/* 0A0ADC 7F06BFAC 0FC1BA6F */ jal modelApplyToggleRelations
|
||||
/* 0A0AE0 7F06BFB0 02002825 */ move $a1, $s0
|
||||
/* 0A0AE4 7F06BFB4 10000004 */ b .L7F06BFC8
|
||||
/* 0A0AE8 7F06BFB8 00000000 */ nop
|
||||
.L7F06BFBC:
|
||||
/* 0A0AEC 7F06BFBC 8E640000 */ lw $a0, ($s3)
|
||||
/* 0A0AF0 7F06BFC0 0FC1BA82 */ jal process_17_pointer_to_head
|
||||
/* 0A0AF0 7F06BFC0 0FC1BA82 */ jal modelApplyHeadRelations
|
||||
/* 0A0AF4 7F06BFC4 02002825 */ move $a1, $s0
|
||||
def_7F06BEEC:
|
||||
.L7F06BFC8:
|
||||
|
||||
+18
-15
@@ -17,7 +17,7 @@ struct bondstruct_unk_op07_related {
|
||||
|
||||
extern s32 g_ModelDistanceDisabled;
|
||||
extern f32 g_ModelDistanceScale;
|
||||
extern u32 D_80036250;
|
||||
extern u32 g_ModelAnimMergingEnabled;
|
||||
extern s32 D_80036410;
|
||||
extern struct bondstruct_unk_animation_related* D_80036414;
|
||||
extern s32 D_80036418;
|
||||
@@ -28,17 +28,17 @@ extern struct bondstruct_unk_op07_related D_800360C4[];
|
||||
extern Vertex D_800363E0;
|
||||
|
||||
// arg0 unknown pointer
|
||||
void sub_GAME_7F070090(void *arg0, f32 arg1, f32 arg2);
|
||||
void modelSetAnimRateForDuration(Model *, f32, f32);
|
||||
void modelSetAnimFrame2(Model* model, f32 frame1, f32 frame2);
|
||||
void modelSetAnimPlaySpeed(Model *, f32, f32);
|
||||
void sub_GAME_7F06FF5C(Model *model, s32 arg1);
|
||||
void modelSetScale(Model*, f32);
|
||||
void getsuboffset(Model *, coord3d *);
|
||||
void sub_GAME_7F070AEC(Model *, s32, s32);
|
||||
void modelTickAnimQuarterSpeed(Model *, s32, s32);
|
||||
void subcalcpos(Model *);
|
||||
void modelSetAnimEndFrame(Model *model, f32 endframe);
|
||||
|
||||
void sub_GAME_7F06F780(Model *, f32);
|
||||
void sub_GAME_7F06F878(Model *, ModelAnimation *, s32, f32, f32, f32);
|
||||
void modelCopyAnimForMerge(Model *, f32);
|
||||
void modelSetAnimation2(Model *, ModelAnimation *, s32, f32, f32, f32);
|
||||
|
||||
void modelSetAnimation(Model *, ModelAnimation *, s32, f32, f32, f32 duration);
|
||||
void modelSetAnimLooping(Model *, f32, f32);
|
||||
@@ -64,7 +64,7 @@ void fileLoad(ModelFileHeader *header,char *name);
|
||||
void load_object_into_memory_unused_maybe(ModelFileHeader *header,int *recallstring,int *targetloc,int sizeleft);
|
||||
void modelCalculateRwDataLen(ModelFileHeader *objheader);
|
||||
Model *get_aircraft_obj_instance_controller(ModelFileHeader *);
|
||||
void sub_GAME_7F06C3B4(Model *, s32, ModelFileHeader *);
|
||||
void modelAttachHead(Model *, ModelNode*, ModelFileHeader *);
|
||||
Mtxf *getsubmatrix(Model *objinst);
|
||||
|
||||
// tentative signature
|
||||
@@ -77,29 +77,32 @@ void setsuboffset(Model *arg0, coord3d *arg1);
|
||||
PropRecord *chrGiveWeapon(ChrRecord *self, s32 PropID, ITEM_IDS ItemID, s32 flags);
|
||||
|
||||
// tentative signature
|
||||
Mtxf* sub_GAME_7F06C660(Model *arg0, ModelNode *arg1, s32 arg2);
|
||||
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 sub_GAME_7F073FC8(s32);
|
||||
void sub_GAME_7F0701D4(s32 arg0);
|
||||
u32 sub_GAME_7F0701E0(void);
|
||||
void modelSetAnimMergingEnabled(s32 arg0);
|
||||
u32 modelIsAnimMergingEnabled(void);
|
||||
|
||||
// arg0: unknown type. arg1: unknown type. arg5: unknown type, maybe struct.
|
||||
void sub_GAME_7F06D2E4(s32, s32, ModelSkeleton*, void* anim, s32, s16*);
|
||||
|
||||
void sub_GAME_7F075F68(struct Model *, struct ModelFileHeader *, u32 *);
|
||||
void sub_GAME_7F075FAC(struct Model *, struct ModelFileHeader *, u32 *);
|
||||
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, s32 buffer);
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, u8 *name, void *targetloc, s32 sizeleft, struct texpool * buffer);
|
||||
void* get_obj_instance_controller_for_header(struct ModelFileHeader* arg0);
|
||||
void subdraw(s32 arg0, struct Model *);
|
||||
void subdraw(struct unk_joint_list *arg0, struct Model *);
|
||||
void sub_GAME_7F06EFC4(struct Model *);
|
||||
void sub_GAME_7F076030(Model *pmodel, ModelFileHeader *pmodeldef, ModelNode *pnode, ModelFileHeader *cmodeldef);
|
||||
void modelAttachPart(Model *pmodel, ModelFileHeader *pmodeldef, ModelNode *pnode, ModelFileHeader *cmodeldef);
|
||||
void modelInitRwData(Model *model, ModelNode *startnode);
|
||||
void modelApplyDistanceRelations(Model* model, ModelNode* node);
|
||||
void modelApplyHeadRelations(Model* model, ModelNode* bodynode);
|
||||
void modelApplyToggleRelations(Model* model, ModelNode* node);
|
||||
|
||||
#ifndef VERSION_EU
|
||||
void return_null(void);
|
||||
|
||||
+15
-15
@@ -5,7 +5,7 @@
|
||||
#include "math_asinfacosf.h"
|
||||
#include "math_unk_05A9E0.h"
|
||||
#include "chrobjdata.h"
|
||||
|
||||
#include "ob.h"
|
||||
|
||||
//file split per EU
|
||||
#ifdef NONMATCHING
|
||||
@@ -32,7 +32,7 @@ glabel sub_GAME_7F0762E0
|
||||
/* 0AAE44 7F076314 8C8E0008 */ lw $t6, 8($a0)
|
||||
/* 0AAE48 7F076318 0080A825 */ move $s5, $a0
|
||||
/* 0AAE4C 7F07631C 00A02025 */ move $a0, $a1
|
||||
/* 0AAE50 7F076320 0FC2F495 */ jal get_index_num_of_named_resource
|
||||
/* 0AAE50 7F076320 0FC2F495 */ jal fileGetIndex
|
||||
/* 0AAE54 7F076324 AFAE0054 */ sw $t6, 0x54($sp)
|
||||
/* 0AAE58 7F076328 AFA20050 */ sw $v0, 0x50($sp)
|
||||
/* 0AAE5C 7F07632C 0FC2F447 */ jal get_rom_remaining_buffer_for_index
|
||||
@@ -119,7 +119,7 @@ glabel sub_GAME_7F0762E0
|
||||
/* 0AAF90 7F076460 2CEE0001 */ sltiu $t6, $a3, 1
|
||||
/* 0AAF94 7F076464 01C03825 */ move $a3, $t6
|
||||
/* 0AAF98 7F076468 01A03025 */ move $a2, $t5
|
||||
/* 0AAF9C 7F07646C 0FC2F44E */ jal sub_GAME_7F0BD138
|
||||
/* 0AAF9C 7F07646C 0FC2F44E */ jal fileSetSize
|
||||
/* 0AAFA0 7F076470 8FA40050 */ lw $a0, 0x50($sp)
|
||||
.L7F076474:
|
||||
/* 0AAFA4 7F076474 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
@@ -142,24 +142,24 @@ glabel sub_GAME_7F0762E0
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, s8 *name, s32 targetloc, s32 sizeleft, s32 buffer)
|
||||
void load_object_fill_header(struct ModelFileHeader *objheader, s8 *name, u8* dst, s32 size, struct texpool * buffer)
|
||||
{
|
||||
|
||||
struct ModelNode **phi_v0;
|
||||
struct ModelNode *filedata;
|
||||
|
||||
if (targetloc != 0)
|
||||
if (dst != 0)
|
||||
{
|
||||
phi_v0 = _load_resource_named_to_buffer(name, 0, targetloc, sizeleft);
|
||||
filedata = _fileNameLoadToAddr(name, 0, dst, size);
|
||||
}
|
||||
else
|
||||
{
|
||||
phi_v0 = _load_resource_named_to_membank(name, 0, 0x100, 4);
|
||||
filedata = _fileNameLoadToBank(name, 0, 0x100, 4);
|
||||
}
|
||||
objheader->Switches = phi_v0;
|
||||
objheader->Textures = &phi_v0[objheader->numSwitches];
|
||||
objheader->RootNode = objheader->Textures + (objheader->numtextures * 0xC);
|
||||
sub_GAME_7F075A90(objheader, 0x5000000, phi_v0);
|
||||
sub_GAME_7F0762E0(objheader, name, targetloc, buffer);
|
||||
objheader->Switches = filedata;
|
||||
objheader->Textures = &filedata[objheader->numSwitches];
|
||||
objheader->RootNode = objheader->Textures[objheader->numtextures];
|
||||
sub_GAME_7F075A90(objheader, 0x5000000, filedata);
|
||||
sub_GAME_7F0762E0(objheader, name, dst, buffer);
|
||||
}
|
||||
|
||||
#else
|
||||
@@ -174,7 +174,7 @@ glabel load_object_fill_header
|
||||
/* 0AAFE8 7F0764B8 10C00006 */ beqz $a2, .L7F0764D4
|
||||
/* 0AAFEC 7F0764BC AFA60028 */ sw $a2, 0x28($sp)
|
||||
/* 0AAFF0 7F0764C0 00A02025 */ move $a0, $a1
|
||||
/* 0AAFF4 7F0764C4 0FC2F350 */ jal _load_resource_named_to_buffer
|
||||
/* 0AAFF4 7F0764C4 0FC2F350 */ jal _fileNameLoadToAddr
|
||||
/* 0AAFF8 7F0764C8 00002825 */ move $a1, $zero
|
||||
/* 0AAFFC 7F0764CC 10000007 */ b .L7F0764EC
|
||||
/* 0AB000 7F0764D0 00403025 */ move $a2, $v0
|
||||
@@ -182,7 +182,7 @@ glabel load_object_fill_header
|
||||
/* 0AB004 7F0764D4 8FA40024 */ lw $a0, 0x24($sp)
|
||||
/* 0AB008 7F0764D8 00002825 */ move $a1, $zero
|
||||
/* 0AB00C 7F0764DC 24060100 */ li $a2, 256
|
||||
/* 0AB010 7F0764E0 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 0AB010 7F0764E0 0FC2F341 */ jal _fileNameLoadToBank
|
||||
/* 0AB014 7F0764E4 24070004 */ li $a3, 4
|
||||
/* 0AB018 7F0764E8 00403025 */ move $a2, $v0
|
||||
.L7F0764EC:
|
||||
|
||||
+25
-51
@@ -7,21 +7,22 @@
|
||||
#ifdef NONMATCHING
|
||||
|
||||
//CODE.bss:80075D30
|
||||
extern struct objective_entry *objective_ptrs[10];
|
||||
extern OBJECTIVESTATUS dword_CODE_bss_80075D58[10]; //This is an array of 10 OBJECTIVESTATUS,
|
||||
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
|
||||
extern u32 *ptr_last_enter_room_subobject_entry_type20;
|
||||
struct criteria_roomentered *ptr_last_enter_room_subobject_entry_type20;
|
||||
//CODE.bss:80075D8C
|
||||
extern u32 *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
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 num_objective_ptrs[];
|
||||
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"
|
||||
@@ -35,7 +36,7 @@ void something_with_stage_objectives() //#99% MATCH
|
||||
|
||||
if (bossGetStageNum() != LEVELID_TITLE)
|
||||
{
|
||||
num_objective_ptrs[0] = -1;
|
||||
objective_count = -1;
|
||||
//dword_CODE_bss_80075D58 = NULL;
|
||||
//dword_CODE_bss_80075D58+4 = NULL;
|
||||
//*dword_CODE_bss_80075D58+8 = *clear2;
|
||||
@@ -69,8 +70,8 @@ glabel something_with_stage_objectives
|
||||
/* 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(num_objective_ptrs)
|
||||
/* 039A10 7F004EE0 AC2E22F0 */ sw $t6, %lo(num_objective_ptrs)($at)
|
||||
/* 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)
|
||||
@@ -129,8 +130,8 @@ glabel something_with_stage_objectives
|
||||
/* 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(num_objective_ptrs) # $at, 0x8003
|
||||
/* 039A60 7F004EF0 AC2E2330 */ sw $t6, %lo(num_objective_ptrs)($at)
|
||||
/* 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
|
||||
@@ -147,8 +148,8 @@ glabel something_with_stage_objectives
|
||||
/* 039A94 7F004F24 1443FFFB */ bne $v0, $v1, .L7F004F14
|
||||
/* 039A98 7F004F28 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
.L7F004F2C:
|
||||
/* 039A9C 7F004F2C 3C018003 */ lui $at, %hi(num_objective_ptrs+4) # $at, 0x8003
|
||||
/* 039AA0 7F004F30 AC202334 */ sw $zero, %lo(num_objective_ptrs+4)($at)
|
||||
/* 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
|
||||
@@ -191,8 +192,8 @@ glabel something_with_stage_objectives
|
||||
/* 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(num_objective_ptrs) # $at, 0x8003
|
||||
/* 039A60 7F004EF0 AC2E2330 */ sw $t6, %lo(num_objective_ptrs)($at)
|
||||
/* 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
|
||||
@@ -209,8 +210,8 @@ glabel something_with_stage_objectives
|
||||
/* 039A94 7F004F24 1443FFFB */ bne $v0, $v1, .L7F004F14
|
||||
/* 039A98 7F004F28 AC40FFF0 */ sw $zero, -0x10($v0)
|
||||
.L7F004F2C:
|
||||
/* 039A9C 7F004F2C 3C018003 */ lui $at, %hi(num_objective_ptrs+4) # $at, 0x8003
|
||||
/* 039AA0 7F004F30 AC202334 */ sw $zero, %lo(num_objective_ptrs+4)($at)
|
||||
/* 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
|
||||
@@ -291,42 +292,15 @@ glabel setup_briefing_text_entry_parent
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
s32 add_ptr_to_objective(void *arg0) {
|
||||
// Node 0
|
||||
(0x80070000 + (arg0->unk4 * 4))->unk5D30 = arg0;
|
||||
if (num_objective_ptrs < arg0->unk4)
|
||||
{
|
||||
// Node 1
|
||||
num_objective_ptrs = (s32) arg0->unk4;
|
||||
return;
|
||||
// (possible return value: arg0->unk4)
|
||||
}
|
||||
// (possible return value: arg0->unk4)
|
||||
}
|
||||
void add_ptr_to_objective(struct objective_entry* objective)
|
||||
{
|
||||
objective_ptrs[objective->menu] = objective;
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel add_ptr_to_objective
|
||||
/* 039AE8 7F004FB8 8C8E0004 */ lw $t6, 4($a0)
|
||||
/* 039AEC 7F004FBC 3C018007 */ lui $at, %hi(objective_ptrs)
|
||||
/* 039AF0 7F004FC0 3C038003 */ lui $v1, %hi(num_objective_ptrs)
|
||||
/* 039AF4 7F004FC4 000E7880 */ sll $t7, $t6, 2
|
||||
/* 039AF8 7F004FC8 002F0821 */ addu $at, $at, $t7
|
||||
/* 039AFC 7F004FCC AC245D30 */ sw $a0, %lo(objective_ptrs)($at)
|
||||
/* 039B00 7F004FD0 246322F0 */ addiu $v1, %lo(num_objective_ptrs) # addiu $v1, $v1, 0x22f0
|
||||
/* 039B04 7F004FD4 8C780000 */ lw $t8, ($v1)
|
||||
/* 039B08 7F004FD8 8C820004 */ lw $v0, 4($a0)
|
||||
/* 039B0C 7F004FDC 0302082A */ slt $at, $t8, $v0
|
||||
/* 039B10 7F004FE0 10200002 */ beqz $at, .L7F004FEC
|
||||
/* 039B14 7F004FE4 00000000 */ nop
|
||||
/* 039B18 7F004FE8 AC620000 */ sw $v0, ($v1)
|
||||
.L7F004FEC:
|
||||
/* 039B1C 7F004FEC 03E00008 */ jr $ra
|
||||
/* 039B20 7F004FF0 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
if (objective_count < objective->menu)
|
||||
{
|
||||
objective_count = objective->menu;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
||||
+129
-601
@@ -2,6 +2,11 @@
|
||||
#include <bondconstants.h>
|
||||
#include <bondtypes.h>
|
||||
#include "objective_status.h"
|
||||
#include "assets/obseg/text/LmiscE.h"
|
||||
#include "lvl_text.h"
|
||||
#include "PR/os.h"
|
||||
#include "str.h"
|
||||
#include "bondview.h"
|
||||
|
||||
//Public variables - move to header
|
||||
// bss
|
||||
@@ -14,23 +19,15 @@ u32 *ptr_last_tag_entry_type16;
|
||||
//CODE.bss:80075D84
|
||||
struct watchMenuObjectiveText *ptr_last_briefing_setup_entry_type23;
|
||||
//CODE.bss:80075D88
|
||||
u32 *ptr_last_enter_room_subobject_entry_type20;
|
||||
struct criteria_roomentered *ptr_last_enter_room_subobject_entry_type20;
|
||||
//CODE.bss:80075D8C
|
||||
u32 *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
struct criteria_deposit *ptr_last_deposit_in_room_subobject_entry_type21;
|
||||
//CODE.bss:80075D90
|
||||
u32 *ptr_last_photo_obj_in_room_subobject_entry_type1E;
|
||||
|
||||
// data
|
||||
s32 num_objective_ptrs[] = {0xFFFFFFFF, 0};
|
||||
|
||||
|
||||
|
||||
// rodata
|
||||
const u32 D_80053610[] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
|
||||
//D:80053644
|
||||
const u32 aSAC[] = {0x25732080, 0x25632000};
|
||||
//D:8005364C
|
||||
const char aSC[] = "%s %c: ";
|
||||
s32 objective_count = 0xFFFFFFFF;
|
||||
s32 objective_count_related = 0;
|
||||
|
||||
|
||||
|
||||
@@ -98,15 +95,15 @@ u8 * get_ptr_text_for_watch_breifing_page(WATCH_BRIEFING_PAGE page)
|
||||
{
|
||||
if (page == 0)
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, 0x29)); //"E R R O R\n"
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_29)); //"E R R O R\n"
|
||||
}
|
||||
else if (page == 1)
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, 0x2a)); //"no briefing for this mission\n"
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_2A)); //"no briefing for this mission\n"
|
||||
}
|
||||
else
|
||||
{
|
||||
textptr = langGet(TEXT(LMISC, 0x2b)); //"\n"
|
||||
textptr = langGet(TEXT(LMISC, MISC_STR_2B)); //"\n"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,30 +115,30 @@ u8 * get_ptr_text_for_watch_breifing_page(WATCH_BRIEFING_PAGE page)
|
||||
//objectiveGetCount
|
||||
s32 objectiveGetCount(void)
|
||||
{
|
||||
return num_objective_ptrs[0]+1;
|
||||
return objective_count + 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
u8 * get_text_for_objective(int objective)
|
||||
u8 * get_text_for_objective(int objectiveIndex)
|
||||
{
|
||||
u8 *textptr;
|
||||
|
||||
if ((objective < 10) && (objective_ptrs[objective] != 0)) {
|
||||
return langGet(objective_ptrs[objective]->text);
|
||||
if ((objectiveIndex < 10) && (objective_ptrs[objectiveIndex] != 0)) {
|
||||
return langGet(objective_ptrs[objectiveIndex]->text);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
s8 get_difficulty_for_objective(s32 objective)
|
||||
s32 get_difficulty_for_objective(s32 objectiveIndex)
|
||||
{
|
||||
struct objective_entry * entry;
|
||||
|
||||
if (objective < OBJECTIVES_MAX)
|
||||
if (objectiveIndex < OBJECTIVES_MAX)
|
||||
{
|
||||
entry = objective_ptrs[objective];
|
||||
entry = objective_ptrs[objectiveIndex];
|
||||
if (entry != NULL)
|
||||
{
|
||||
return entry->difficulty;
|
||||
@@ -332,598 +329,129 @@ bool objectiveIsAllComplete(void)
|
||||
#ifdef BUGFIX_R1
|
||||
void FUN_7f057a40(void)
|
||||
{
|
||||
num_objective_ptrs[1] = 1;
|
||||
objective_count_related = 1;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
||||
void display_objective_status_text_on_status_change(void) {
|
||||
s32 i;
|
||||
s32 availableindex = 0;
|
||||
char buffer[50] = "";
|
||||
enum OBJECTIVESTATUS status;
|
||||
|
||||
}
|
||||
#else
|
||||
#ifdef BUGFIX_R1
|
||||
if (objective_count_related != 0) { return; }
|
||||
#endif
|
||||
|
||||
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 (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 (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));
|
||||
}
|
||||
#ifdef VERSION_US
|
||||
GLOBAL_ASM(
|
||||
.rdata
|
||||
/*glabel D_80053610*/
|
||||
/*.word 0,0,0,0,0,0,0,0,0,0*/
|
||||
/*glabel D_80053640*/
|
||||
/*.word 0*/
|
||||
.text
|
||||
glabel display_objective_status_text_on_status_change
|
||||
/* 08C070 7F057540 27BDFF70 */ addiu $sp, $sp, -0x90
|
||||
/* 08C074 7F057544 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* 08C078 7F057548 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 08C07C 7F05754C 3C0E8005 */ lui $t6, %hi(D_80053610)
|
||||
/* 08C080 7F057550 27B30054 */ addiu $s3, $sp, 0x54
|
||||
/* 08C084 7F057554 3C168003 */ lui $s6, %hi(num_objective_ptrs)
|
||||
/* 08C088 7F057558 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 08C08C 7F05755C 25CE3610 */ addiu $t6, %lo(D_80053610) # addiu $t6, $t6, 0x3610
|
||||
/* 08C090 7F057560 26D622F0 */ addiu $s6, %lo(num_objective_ptrs) # addiu $s6, $s6, 0x22f0
|
||||
/* 08C094 7F057564 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 08C098 7F057568 AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* 08C09C 7F05756C AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* 08C0A0 7F057570 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* 08C0A4 7F057574 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 08C0A8 7F057578 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 08C0AC 7F05757C AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 08C0B0 7F057580 0000A025 */ move $s4, $zero
|
||||
/* 08C0B4 7F057584 25D90030 */ addiu $t9, $t6, 0x30
|
||||
/* 08C0B8 7F057588 02604025 */ move $t0, $s3
|
||||
.L7F05758C:
|
||||
/* 08C0BC 7F05758C 8DC10000 */ lw $at, ($t6)
|
||||
/* 08C0C0 7F057590 25CE000C */ addiu $t6, $t6, 0xc
|
||||
/* 08C0C4 7F057594 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 08C0C8 7F057598 AD01FFF4 */ sw $at, -0xc($t0)
|
||||
/* 08C0CC 7F05759C 8DC1FFF8 */ lw $at, -8($t6)
|
||||
/* 08C0D0 7F0575A0 AD01FFF8 */ sw $at, -8($t0)
|
||||
/* 08C0D4 7F0575A4 8DC1FFFC */ lw $at, -4($t6)
|
||||
/* 08C0D8 7F0575A8 15D9FFF8 */ bne $t6, $t9, .L7F05758C
|
||||
/* 08C0DC 7F0575AC AD01FFFC */ sw $at, -4($t0)
|
||||
/* 08C0E0 7F0575B0 95C10000 */ lhu $at, ($t6)
|
||||
/* 08C0E4 7F0575B4 3C158007 */ lui $s5, %hi(dword_CODE_bss_80075D58)
|
||||
/* 08C0E8 7F0575B8 3C1E8005 */ lui $fp, %hi(aSAC)
|
||||
/* 08C0EC 7F0575BC A5010000 */ sh $at, ($t0)
|
||||
/* 08C0F0 7F0575C0 8EC90000 */ lw $t1, ($s6)
|
||||
/* 08C0F4 7F0575C4 27DE3644 */ addiu $fp, %lo(aSAC) # addiu $fp, $fp, 0x3644
|
||||
/* 08C0F8 7F0575C8 26B55D58 */ addiu $s5, %lo(dword_CODE_bss_80075D58) # addiu $s5, $s5, 0x5d58
|
||||
/* 08C0FC 7F0575CC 05200051 */ bltz $t1, .L7F057714
|
||||
/* 08C100 7F0575D0 00009025 */ move $s2, $zero
|
||||
/* 08C104 7F0575D4 3C178005 */ lui $s7, %hi(j_text_trigger)
|
||||
/* 08C108 7F0575D8 26F784D0 */ addiu $s7, %lo(j_text_trigger) # addiu $s7, $s7, -0x7b30
|
||||
.L7F0575DC:
|
||||
/* 08C10C 7F0575DC 0FC15C8E */ jal get_status_of_objective
|
||||
/* 08C110 7F0575E0 02402025 */ move $a0, $s2
|
||||
/* 08C114 7F0575E4 8EAA0000 */ lw $t2, ($s5)
|
||||
/* 08C118 7F0575E8 00408825 */ move $s1, $v0
|
||||
/* 08C11C 7F0575EC 02402025 */ move $a0, $s2
|
||||
/* 08C120 7F0575F0 104A003A */ beq $v0, $t2, .L7F0576DC
|
||||
/* 08C124 7F0575F4 00000000 */ nop
|
||||
/* 08C128 7F0575F8 0FC15C81 */ jal get_difficulty_for_objective
|
||||
/* 08C12C 7F0575FC AEA20000 */ sw $v0, ($s5)
|
||||
/* 08C130 7F057600 0FC2FF04 */ jal lvlGetSelectedDifficulty
|
||||
/* 08C134 7F057604 00408025 */ move $s0, $v0
|
||||
/* 08C138 7F057608 0050082A */ slt $at, $v0, $s0
|
||||
/* 08C13C 7F05760C 14200033 */ bnez $at, .L7F0576DC
|
||||
/* 08C140 7F057610 00000000 */ nop
|
||||
/* 08C144 7F057614 8EEB0000 */ lw $t3, ($s7)
|
||||
/* 08C148 7F057618 2690001A */ addiu $s0, $s4, 0x1a
|
||||
/* 08C14C 7F05761C 3404B02C */ li $a0, 45100
|
||||
/* 08C150 7F057620 1160000A */ beqz $t3, .L7F05764C
|
||||
/* 08C154 7F057624 00000000 */ nop
|
||||
/* 08C158 7F057628 0FC30776 */ jal langGet
|
||||
/* 08C15C 7F05762C 3404B02C */ li $a0, 45100
|
||||
/* 08C160 7F057630 02602025 */ move $a0, $s3
|
||||
/* 08C164 7F057634 03C02825 */ move $a1, $fp
|
||||
/* 08C168 7F057638 00403025 */ move $a2, $v0
|
||||
/* 08C16C 7F05763C 0C002B25 */ jal sprintf
|
||||
/* 08C170 7F057640 02003825 */ move $a3, $s0
|
||||
/* 08C174 7F057644 1000000A */ b .L7F057670
|
||||
/* 08C178 7F057648 24010001 */ li $at, 1
|
||||
.L7F05764C:
|
||||
/* 08C17C 7F05764C 0FC30776 */ jal langGet
|
||||
/* 08C180 7F057650 26900061 */ addiu $s0, $s4, 0x61
|
||||
/* 08C184 7F057654 3C058005 */ lui $a1, %hi(aSC)
|
||||
/* 08C188 7F057658 24A5364C */ addiu $a1, %lo(aSC) # addiu $a1, $a1, 0x364c
|
||||
/* 08C18C 7F05765C 02602025 */ move $a0, $s3
|
||||
/* 08C190 7F057660 00403025 */ move $a2, $v0
|
||||
/* 08C194 7F057664 0C002B25 */ jal sprintf
|
||||
/* 08C198 7F057668 02003825 */ move $a3, $s0
|
||||
/* 08C19C 7F05766C 24010001 */ li $at, 1
|
||||
.L7F057670:
|
||||
/* 08C1A0 7F057670 16210008 */ bne $s1, $at, .L7F057694
|
||||
/* 08C1A4 7F057674 00000000 */ nop
|
||||
/* 08C1A8 7F057678 0FC30776 */ jal langGet
|
||||
/* 08C1AC 7F05767C 3404B02D */ li $a0, 45101
|
||||
/* 08C1B0 7F057680 02602025 */ move $a0, $s3
|
||||
/* 08C1B4 7F057684 0C0029FF */ jal strcat
|
||||
/* 08C1B8 7F057688 00402825 */ move $a1, $v0
|
||||
/* 08C1BC 7F05768C 10000011 */ b .L7F0576D4
|
||||
/* 08C1C0 7F057690 00000000 */ nop
|
||||
.L7F057694:
|
||||
/* 08C1C4 7F057694 16200008 */ bnez $s1, .L7F0576B8
|
||||
/* 08C1C8 7F057698 24010002 */ li $at, 2
|
||||
/* 08C1CC 7F05769C 0FC30776 */ jal langGet
|
||||
/* 08C1D0 7F0576A0 3404B02E */ li $a0, 45102
|
||||
/* 08C1D4 7F0576A4 02602025 */ move $a0, $s3
|
||||
/* 08C1D8 7F0576A8 0C0029FF */ jal strcat
|
||||
/* 08C1DC 7F0576AC 00402825 */ move $a1, $v0
|
||||
/* 08C1E0 7F0576B0 10000008 */ b .L7F0576D4
|
||||
/* 08C1E4 7F0576B4 00000000 */ nop
|
||||
.L7F0576B8:
|
||||
/* 08C1E8 7F0576B8 16210006 */ bne $s1, $at, .L7F0576D4
|
||||
/* 08C1EC 7F0576BC 00000000 */ nop
|
||||
/* 08C1F0 7F0576C0 0FC30776 */ jal langGet
|
||||
/* 08C1F4 7F0576C4 3404B02F */ li $a0, 45103
|
||||
/* 08C1F8 7F0576C8 02602025 */ move $a0, $s3
|
||||
/* 08C1FC 7F0576CC 0C0029FF */ jal strcat
|
||||
/* 08C200 7F0576D0 00402825 */ move $a1, $v0
|
||||
.L7F0576D4:
|
||||
/* 08C204 7F0576D4 0FC228F2 */ jal hudmsgBottomShow
|
||||
/* 08C208 7F0576D8 02602025 */ move $a0, $s3
|
||||
.L7F0576DC:
|
||||
/* 08C20C 7F0576DC 0FC15C81 */ jal get_difficulty_for_objective
|
||||
/* 08C210 7F0576E0 02402025 */ move $a0, $s2
|
||||
/* 08C214 7F0576E4 0FC2FF04 */ jal lvlGetSelectedDifficulty
|
||||
/* 08C218 7F0576E8 00408025 */ move $s0, $v0
|
||||
/* 08C21C 7F0576EC 0050082A */ slt $at, $v0, $s0
|
||||
/* 08C220 7F0576F0 54200003 */ bnezl $at, .L7F057700
|
||||
/* 08C224 7F0576F4 8ECC0000 */ lw $t4, ($s6)
|
||||
/* 08C228 7F0576F8 26940001 */ addiu $s4, $s4, 1
|
||||
/* 08C22C 7F0576FC 8ECC0000 */ lw $t4, ($s6)
|
||||
.L7F057700:
|
||||
/* 08C230 7F057700 26520001 */ addiu $s2, $s2, 1
|
||||
/* 08C234 7F057704 26B50004 */ addiu $s5, $s5, 4
|
||||
/* 08C238 7F057708 0192082A */ slt $at, $t4, $s2
|
||||
/* 08C23C 7F05770C 1020FFB3 */ beqz $at, .L7F0575DC
|
||||
/* 08C240 7F057710 00000000 */ nop
|
||||
.L7F057714:
|
||||
/* 08C244 7F057714 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 08C248 7F057718 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 08C24C 7F05771C 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 08C250 7F057720 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 08C254 7F057724 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 08C258 7F057728 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 08C25C 7F05772C 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* 08C260 7F057730 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* 08C264 7F057734 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* 08C268 7F057738 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* 08C26C 7F05773C 03E00008 */ jr $ra
|
||||
/* 08C270 7F057740 27BD0090 */ addiu $sp, $sp, 0x90
|
||||
)
|
||||
#endif
|
||||
|
||||
#ifdef VERSION_JP
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel display_objective_status_text_on_status_change
|
||||
/* 08C5C0 7F057A50 27BDFF70 */ addiu $sp, $sp, -0x90
|
||||
/* 08C5C4 7F057A54 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 08C5C8 7F057A58 3C0E8005 */ lui $t6, %hi(D_80053610) # $t6, 0x8005
|
||||
/* 08C5CC 7F057A5C 27B30054 */ addiu $s3, $sp, 0x54
|
||||
/* 08C5D0 7F057A60 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* 08C5D4 7F057A64 25CE3640 */ addiu $t6, %lo(D_80053610) # addiu $t6, $t6, 0x3640
|
||||
/* 08C5D8 7F057A68 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 08C5DC 7F057A6C AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* 08C5E0 7F057A70 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* 08C5E4 7F057A74 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* 08C5E8 7F057A78 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 08C5EC 7F057A7C AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 08C5F0 7F057A80 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 08C5F4 7F057A84 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 08C5F8 7F057A88 0000A825 */ move $s5, $zero
|
||||
/* 08C5FC 7F057A8C 25D90030 */ addiu $t9, $t6, 0x30
|
||||
/* 08C600 7F057A90 02604025 */ move $t0, $s3
|
||||
.L7F057A94:
|
||||
/* 08C604 7F057A94 8DC10000 */ lw $at, ($t6)
|
||||
/* 08C608 7F057A98 25CE000C */ addiu $t6, $t6, 0xc
|
||||
/* 08C60C 7F057A9C 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 08C610 7F057AA0 AD01FFF4 */ sw $at, -0xc($t0)
|
||||
/* 08C614 7F057AA4 8DC1FFF8 */ lw $at, -8($t6)
|
||||
/* 08C618 7F057AA8 AD01FFF8 */ sw $at, -8($t0)
|
||||
/* 08C61C 7F057AAC 8DC1FFFC */ lw $at, -4($t6)
|
||||
/* 08C620 7F057AB0 15D9FFF8 */ bne $t6, $t9, .L7F057A94
|
||||
/* 08C624 7F057AB4 AD01FFFC */ sw $at, -4($t0)
|
||||
/* 08C628 7F057AB8 95C10000 */ lhu $at, ($t6)
|
||||
/* 08C62C 7F057ABC 3C098003 */ lui $t1, %hi(num_objective_ptrs+4) # $t1, 0x8003
|
||||
/* 08C630 7F057AC0 3C168003 */ lui $s6, %hi(num_objective_ptrs) # $s6, 0x8003
|
||||
/* 08C634 7F057AC4 A5010000 */ sh $at, ($t0)
|
||||
/* 08C638 7F057AC8 8D292334 */ lw $t1, %lo(num_objective_ptrs+4)($t1)
|
||||
/* 08C63C 7F057ACC 26D62330 */ addiu $s6, %lo(num_objective_ptrs) # addiu $s6, $s6, 0x2330
|
||||
/* 08C640 7F057AD0 55200058 */ bnezl $t1, .L7F057C34
|
||||
/* 08C644 7F057AD4 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 08C648 7F057AD8 8ECA0000 */ lw $t2, ($s6)
|
||||
/* 08C64C 7F057ADC 3C148007 */ lui $s4, %hi(dword_CODE_bss_80075D58) # $s4, 0x8007
|
||||
/* 08C650 7F057AE0 26945D98 */ addiu $s4, %lo(dword_CODE_bss_80075D58) # addiu $s4, $s4, 0x5d98
|
||||
/* 08C654 7F057AE4 05400052 */ bltz $t2, .L7F057C30
|
||||
/* 08C658 7F057AE8 00009025 */ move $s2, $zero
|
||||
/* 08C65C 7F057AEC 3C178005 */ lui $s7, %hi(j_text_trigger) # $s7, 0x8005
|
||||
/* 08C660 7F057AF0 26F78500 */ addiu $s7, %lo(j_text_trigger) # addiu $s7, $s7, -0x7b00
|
||||
/* 08C664 7F057AF4 241E0001 */ li $fp, 1
|
||||
.L7F057AF8:
|
||||
/* 08C668 7F057AF8 0FC15DCE */ jal get_status_of_objective
|
||||
/* 08C66C 7F057AFC 02402025 */ move $a0, $s2
|
||||
/* 08C670 7F057B00 8E8B0000 */ lw $t3, ($s4)
|
||||
/* 08C674 7F057B04 00408825 */ move $s1, $v0
|
||||
/* 08C678 7F057B08 02402025 */ move $a0, $s2
|
||||
/* 08C67C 7F057B0C 104B003A */ beq $v0, $t3, .L7F057BF8
|
||||
/* 08C680 7F057B10 00000000 */ nop
|
||||
/* 08C684 7F057B14 0FC15DC1 */ jal get_difficulty_for_objective
|
||||
/* 08C688 7F057B18 AE820000 */ sw $v0, ($s4)
|
||||
/* 08C68C 7F057B1C 0FC3021E */ jal lvlGetSelectedDifficulty
|
||||
/* 08C690 7F057B20 00408025 */ move $s0, $v0
|
||||
/* 08C694 7F057B24 0050082A */ slt $at, $v0, $s0
|
||||
/* 08C698 7F057B28 14200033 */ bnez $at, .L7F057BF8
|
||||
/* 08C69C 7F057B2C 00000000 */ nop
|
||||
/* 08C6A0 7F057B30 8EEC0000 */ lw $t4, ($s7)
|
||||
/* 08C6A4 7F057B34 26B0001A */ addiu $s0, $s5, 0x1a
|
||||
/* 08C6A8 7F057B38 3404B02C */ li $a0, 45100
|
||||
/* 08C6AC 7F057B3C 1180000B */ beqz $t4, .L7F057B6C
|
||||
/* 08C6B0 7F057B40 00000000 */ nop
|
||||
/* 08C6B4 7F057B44 0FC30AA2 */ jal langGet
|
||||
/* 08C6B8 7F057B48 3404B02C */ li $a0, 45100
|
||||
/* 08C6BC 7F057B4C 3C058005 */ lui $a1, %hi(aSAC) # $a1, 0x8005
|
||||
/* 08C6C0 7F057B50 24A53674 */ addiu $a1, %lo(aSAC) # addiu $a1, $a1, 0x3674
|
||||
/* 08C6C4 7F057B54 02602025 */ move $a0, $s3
|
||||
/* 08C6C8 7F057B58 00403025 */ move $a2, $v0
|
||||
/* 08C6CC 7F057B5C 0C002B29 */ jal sprintf
|
||||
/* 08C6D0 7F057B60 02003825 */ move $a3, $s0
|
||||
/* 08C6D4 7F057B64 10000009 */ b .L7F057B8C
|
||||
/* 08C6D8 7F057B68 00000000 */ nop
|
||||
.L7F057B6C:
|
||||
/* 08C6DC 7F057B6C 0FC30AA2 */ jal langGet
|
||||
/* 08C6E0 7F057B70 26B00061 */ addiu $s0, $s5, 0x61
|
||||
/* 08C6E4 7F057B74 3C058005 */ lui $a1, %hi(aSC) # $a1, 0x8005
|
||||
/* 08C6E8 7F057B78 24A5367C */ addiu $a1, %lo(aSC) # addiu $a1, $a1, 0x367c
|
||||
/* 08C6EC 7F057B7C 02602025 */ move $a0, $s3
|
||||
/* 08C6F0 7F057B80 00403025 */ move $a2, $v0
|
||||
/* 08C6F4 7F057B84 0C002B29 */ jal sprintf
|
||||
/* 08C6F8 7F057B88 02003825 */ move $a3, $s0
|
||||
.L7F057B8C:
|
||||
/* 08C6FC 7F057B8C 163E0008 */ bne $s1, $fp, .L7F057BB0
|
||||
/* 08C700 7F057B90 00000000 */ nop
|
||||
/* 08C704 7F057B94 0FC30AA2 */ jal langGet
|
||||
/* 08C708 7F057B98 3404B02D */ li $a0, 45101
|
||||
/* 08C70C 7F057B9C 02602025 */ move $a0, $s3
|
||||
/* 08C710 7F057BA0 0C002A03 */ jal strcat
|
||||
/* 08C714 7F057BA4 00402825 */ move $a1, $v0
|
||||
/* 08C718 7F057BA8 10000011 */ b .L7F057BF0
|
||||
/* 08C71C 7F057BAC 00000000 */ nop
|
||||
.L7F057BB0:
|
||||
/* 08C720 7F057BB0 16200008 */ bnez $s1, .L7F057BD4
|
||||
/* 08C724 7F057BB4 24010002 */ li $at, 2
|
||||
/* 08C728 7F057BB8 0FC30AA2 */ jal langGet
|
||||
/* 08C72C 7F057BBC 3404B02E */ li $a0, 45102
|
||||
/* 08C730 7F057BC0 02602025 */ move $a0, $s3
|
||||
/* 08C734 7F057BC4 0C002A03 */ jal strcat
|
||||
/* 08C738 7F057BC8 00402825 */ move $a1, $v0
|
||||
/* 08C73C 7F057BCC 10000008 */ b .L7F057BF0
|
||||
/* 08C740 7F057BD0 00000000 */ nop
|
||||
.L7F057BD4:
|
||||
/* 08C744 7F057BD4 16210006 */ bne $s1, $at, .L7F057BF0
|
||||
/* 08C748 7F057BD8 00000000 */ nop
|
||||
/* 08C74C 7F057BDC 0FC30AA2 */ jal langGet
|
||||
/* 08C750 7F057BE0 3404B02F */ li $a0, 45103
|
||||
/* 08C754 7F057BE4 02602025 */ move $a0, $s3
|
||||
/* 08C758 7F057BE8 0C002A03 */ jal strcat
|
||||
/* 08C75C 7F057BEC 00402825 */ move $a1, $v0
|
||||
.L7F057BF0:
|
||||
/* 08C760 7F057BF0 0FC22B10 */ jal jp_hudmsgBottomShow
|
||||
/* 08C764 7F057BF4 02602025 */ move $a0, $s3
|
||||
.L7F057BF8:
|
||||
/* 08C768 7F057BF8 0FC15DC1 */ jal get_difficulty_for_objective
|
||||
/* 08C76C 7F057BFC 02402025 */ move $a0, $s2
|
||||
/* 08C770 7F057C00 0FC3021E */ jal lvlGetSelectedDifficulty
|
||||
/* 08C774 7F057C04 00408025 */ move $s0, $v0
|
||||
/* 08C778 7F057C08 0050082A */ slt $at, $v0, $s0
|
||||
/* 08C77C 7F057C0C 54200003 */ bnezl $at, .L7F057C1C
|
||||
/* 08C780 7F057C10 8ECD0000 */ lw $t5, ($s6)
|
||||
/* 08C784 7F057C14 26B50001 */ addiu $s5, $s5, 1
|
||||
/* 08C788 7F057C18 8ECD0000 */ lw $t5, ($s6)
|
||||
.L7F057C1C:
|
||||
/* 08C78C 7F057C1C 26520001 */ addiu $s2, $s2, 1
|
||||
/* 08C790 7F057C20 26940004 */ addiu $s4, $s4, 4
|
||||
/* 08C794 7F057C24 01B2082A */ slt $at, $t5, $s2
|
||||
/* 08C798 7F057C28 1020FFB3 */ beqz $at, .L7F057AF8
|
||||
/* 08C79C 7F057C2C 00000000 */ nop
|
||||
.L7F057C30:
|
||||
/* 08C7A0 7F057C30 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L7F057C34:
|
||||
/* 08C7A4 7F057C34 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 08C7A8 7F057C38 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 08C7AC 7F057C3C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 08C7B0 7F057C40 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 08C7B4 7F057C44 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 08C7B8 7F057C48 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* 08C7BC 7F057C4C 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* 08C7C0 7F057C50 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* 08C7C4 7F057C54 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* 08C7C8 7F057C58 03E00008 */ jr $ra
|
||||
/* 08C7CC 7F057C5C 27BD0090 */ addiu $sp, $sp, 0x90
|
||||
)
|
||||
#endif
|
||||
#ifdef VERSION_EU
|
||||
GLOBAL_ASM(
|
||||
.rdata
|
||||
/*glabel D_80053610*/
|
||||
/*.word 0,0,0,0,0,0,0,0,0,0*/
|
||||
/*glabel D_80053640*/
|
||||
/*.word 0*/
|
||||
.text
|
||||
glabel display_objective_status_text_on_status_change
|
||||
/* 08A220 7F057830 27BDFF70 */ addiu $sp, $sp, -0x90
|
||||
/* 08A224 7F057834 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 08A228 7F057838 3C0E8005 */ lui $t6, %hi(D_80053610) # $t6, 0x8005
|
||||
/* 08A22C 7F05783C 27B30054 */ addiu $s3, $sp, 0x54
|
||||
/* 08A230 7F057840 AFB5002C */ sw $s5, 0x2c($sp)
|
||||
/* 08A234 7F057844 25CE9750 */ addiu $t6, %lo(D_80053610) # addiu $t6, $t6, -0x68b0
|
||||
/* 08A238 7F057848 AFBF003C */ sw $ra, 0x3c($sp)
|
||||
/* 08A23C 7F05784C AFBE0038 */ sw $fp, 0x38($sp)
|
||||
/* 08A240 7F057850 AFB70034 */ sw $s7, 0x34($sp)
|
||||
/* 08A244 7F057854 AFB60030 */ sw $s6, 0x30($sp)
|
||||
/* 08A248 7F057858 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 08A24C 7F05785C AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 08A250 7F057860 AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 08A254 7F057864 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 08A258 7F057868 0000A825 */ move $s5, $zero
|
||||
/* 08A25C 7F05786C 25D90030 */ addiu $t9, $t6, 0x30
|
||||
/* 08A260 7F057870 02604025 */ move $t0, $s3
|
||||
.L7F057874:
|
||||
/* 08A264 7F057874 8DC10000 */ lw $at, ($t6)
|
||||
/* 08A268 7F057878 25CE000C */ addiu $t6, $t6, 0xc
|
||||
/* 08A26C 7F05787C 2508000C */ addiu $t0, $t0, 0xc
|
||||
/* 08A270 7F057880 AD01FFF4 */ sw $at, -0xc($t0)
|
||||
/* 08A274 7F057884 8DC1FFF8 */ lw $at, -8($t6)
|
||||
/* 08A278 7F057888 AD01FFF8 */ sw $at, -8($t0)
|
||||
/* 08A27C 7F05788C 8DC1FFFC */ lw $at, -4($t6)
|
||||
/* 08A280 7F057890 15D9FFF8 */ bne $t6, $t9, .L7F057874
|
||||
/* 08A284 7F057894 AD01FFFC */ sw $at, -4($t0)
|
||||
/* 08A288 7F057898 95C10000 */ lhu $at, ($t6)
|
||||
/* 08A28C 7F05789C 3C098003 */ lui $t1, %hi(num_objective_ptrs+4) # $t1, 0x8003
|
||||
/* 08A290 7F0578A0 3C168003 */ lui $s6, %hi(num_objective_ptrs) # $s6, 0x8003
|
||||
/* 08A294 7F0578A4 A5010000 */ sh $at, ($t0)
|
||||
/* 08A298 7F0578A8 8D29D844 */ lw $t1, %lo(num_objective_ptrs+4)($t1)
|
||||
/* 08A29C 7F0578AC 26D6D840 */ addiu $s6, %lo(num_objective_ptrs) # addiu $s6, $s6, -0x27c0
|
||||
/* 08A2A0 7F0578B0 55200058 */ bnezl $t1, .L7F057A14
|
||||
/* 08A2A4 7F0578B4 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
/* 08A2A8 7F0578B8 8ECA0000 */ lw $t2, ($s6)
|
||||
/* 08A2AC 7F0578BC 3C148006 */ lui $s4, %hi(dword_CODE_bss_80075D58) # $s4, 0x8006
|
||||
/* 08A2B0 7F0578C0 26944C98 */ addiu $s4, %lo(dword_CODE_bss_80075D58) # addiu $s4, $s4, 0x4c98
|
||||
/* 08A2B4 7F0578C4 05400052 */ bltz $t2, .L7F057A10
|
||||
/* 08A2B8 7F0578C8 00009025 */ move $s2, $zero
|
||||
/* 08A2BC 7F0578CC 3C178004 */ lui $s7, %hi(j_text_trigger) # $s7, 0x8004
|
||||
/* 08A2C0 7F0578D0 26F71150 */ addiu $s7, %lo(j_text_trigger) # addiu $s7, $s7, 0x1150
|
||||
/* 08A2C4 7F0578D4 241E0001 */ li $fp, 1
|
||||
.L7F0578D8:
|
||||
/* 08A2C8 7F0578D8 0FC15D46 */ jal get_status_of_objective
|
||||
/* 08A2CC 7F0578DC 02402025 */ move $a0, $s2
|
||||
/* 08A2D0 7F0578E0 8E8B0000 */ lw $t3, ($s4)
|
||||
/* 08A2D4 7F0578E4 00408825 */ move $s1, $v0
|
||||
/* 08A2D8 7F0578E8 02402025 */ move $a0, $s2
|
||||
/* 08A2DC 7F0578EC 104B003A */ beq $v0, $t3, .L7F0579D8
|
||||
/* 08A2E0 7F0578F0 00000000 */ nop
|
||||
/* 08A2E4 7F0578F4 0FC15D39 */ jal get_difficulty_for_objective
|
||||
/* 08A2E8 7F0578F8 AE820000 */ sw $v0, ($s4)
|
||||
/* 08A2EC 7F0578FC 0FC2FC21 */ jal lvlGetSelectedDifficulty
|
||||
/* 08A2F0 7F057900 00408025 */ move $s0, $v0
|
||||
/* 08A2F4 7F057904 0050082A */ slt $at, $v0, $s0
|
||||
/* 08A2F8 7F057908 14200033 */ bnez $at, .L7F0579D8
|
||||
/* 08A2FC 7F05790C 00000000 */ nop
|
||||
/* 08A300 7F057910 8EEC0000 */ lw $t4, ($s7)
|
||||
/* 08A304 7F057914 26B0001A */ addiu $s0, $s5, 0x1a
|
||||
/* 08A308 7F057918 3404B02C */ li $a0, 45100
|
||||
/* 08A30C 7F05791C 1180000B */ beqz $t4, .L7F05794C
|
||||
/* 08A310 7F057920 00000000 */ nop
|
||||
/* 08A314 7F057924 0FC304AE */ jal langGet
|
||||
/* 08A318 7F057928 3404B02C */ li $a0, 45100
|
||||
/* 08A31C 7F05792C 3C058005 */ lui $a1, %hi(aSAC) # $a1, 0x8005
|
||||
/* 08A320 7F057930 24A59784 */ addiu $a1, %lo(aSAC) # addiu $a1, $a1, -0x687c
|
||||
/* 08A324 7F057934 02602025 */ move $a0, $s3
|
||||
/* 08A328 7F057938 00403025 */ move $a2, $v0
|
||||
/* 08A32C 7F05793C 0C00283D */ jal sprintf
|
||||
/* 08A330 7F057940 02003825 */ move $a3, $s0
|
||||
/* 08A334 7F057944 10000009 */ b .L7F05796C
|
||||
/* 08A338 7F057948 00000000 */ nop
|
||||
.L7F05794C:
|
||||
/* 08A33C 7F05794C 0FC304AE */ jal langGet
|
||||
/* 08A340 7F057950 26B00061 */ addiu $s0, $s5, 0x61
|
||||
/* 08A344 7F057954 3C058005 */ lui $a1, %hi(aSC) # $a1, 0x8005
|
||||
/* 08A348 7F057958 24A5978C */ addiu $a1, %lo(aSC) # addiu $a1, $a1, -0x6874
|
||||
/* 08A34C 7F05795C 02602025 */ move $a0, $s3
|
||||
/* 08A350 7F057960 00403025 */ move $a2, $v0
|
||||
/* 08A354 7F057964 0C00283D */ jal sprintf
|
||||
/* 08A358 7F057968 02003825 */ move $a3, $s0
|
||||
.L7F05796C:
|
||||
/* 08A35C 7F05796C 163E0008 */ bne $s1, $fp, .L7F057990
|
||||
/* 08A360 7F057970 00000000 */ nop
|
||||
/* 08A364 7F057974 0FC304AE */ jal langGet
|
||||
/* 08A368 7F057978 3404B02D */ li $a0, 45101
|
||||
/* 08A36C 7F05797C 02602025 */ move $a0, $s3
|
||||
/* 08A370 7F057980 0C002717 */ jal strcat
|
||||
/* 08A374 7F057984 00402825 */ move $a1, $v0
|
||||
/* 08A378 7F057988 10000011 */ b .L7F0579D0
|
||||
/* 08A37C 7F05798C 00000000 */ nop
|
||||
.L7F057990:
|
||||
/* 08A380 7F057990 16200008 */ bnez $s1, .L7F0579B4
|
||||
/* 08A384 7F057994 24010002 */ li $at, 2
|
||||
/* 08A388 7F057998 0FC304AE */ jal langGet
|
||||
/* 08A38C 7F05799C 3404B02E */ li $a0, 45102
|
||||
/* 08A390 7F0579A0 02602025 */ move $a0, $s3
|
||||
/* 08A394 7F0579A4 0C002717 */ jal strcat
|
||||
/* 08A398 7F0579A8 00402825 */ move $a1, $v0
|
||||
/* 08A39C 7F0579AC 10000008 */ b .L7F0579D0
|
||||
/* 08A3A0 7F0579B0 00000000 */ nop
|
||||
.L7F0579B4:
|
||||
/* 08A3A4 7F0579B4 16210006 */ bne $s1, $at, .L7F0579D0
|
||||
/* 08A3A8 7F0579B8 00000000 */ nop
|
||||
/* 08A3AC 7F0579BC 0FC304AE */ jal langGet
|
||||
/* 08A3B0 7F0579C0 3404B02F */ li $a0, 45103
|
||||
/* 08A3B4 7F0579C4 02602025 */ move $a0, $s3
|
||||
/* 08A3B8 7F0579C8 0C002717 */ jal strcat
|
||||
/* 08A3BC 7F0579CC 00402825 */ move $a1, $v0
|
||||
.L7F0579D0:
|
||||
/* 08A3C0 7F0579D0 0FC229B5 */ jal jp_hudmsgBottomShow
|
||||
/* 08A3C4 7F0579D4 02602025 */ move $a0, $s3
|
||||
.L7F0579D8:
|
||||
/* 08A3C8 7F0579D8 0FC15D39 */ jal get_difficulty_for_objective
|
||||
/* 08A3CC 7F0579DC 02402025 */ move $a0, $s2
|
||||
/* 08A3D0 7F0579E0 0FC2FC21 */ jal lvlGetSelectedDifficulty
|
||||
/* 08A3D4 7F0579E4 00408025 */ move $s0, $v0
|
||||
/* 08A3D8 7F0579E8 0050082A */ slt $at, $v0, $s0
|
||||
/* 08A3DC 7F0579EC 54200003 */ bnezl $at, .L7F0579FC
|
||||
/* 08A3E0 7F0579F0 8ECD0000 */ lw $t5, ($s6)
|
||||
/* 08A3E4 7F0579F4 26B50001 */ addiu $s5, $s5, 1
|
||||
/* 08A3E8 7F0579F8 8ECD0000 */ lw $t5, ($s6)
|
||||
.L7F0579FC:
|
||||
/* 08A3EC 7F0579FC 26520001 */ addiu $s2, $s2, 1
|
||||
/* 08A3F0 7F057A00 26940004 */ addiu $s4, $s4, 4
|
||||
/* 08A3F4 7F057A04 01B2082A */ slt $at, $t5, $s2
|
||||
/* 08A3F8 7F057A08 1020FFB3 */ beqz $at, .L7F0578D8
|
||||
/* 08A3FC 7F057A0C 00000000 */ nop
|
||||
.L7F057A10:
|
||||
/* 08A400 7F057A10 8FBF003C */ lw $ra, 0x3c($sp)
|
||||
.L7F057A14:
|
||||
/* 08A404 7F057A14 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 08A408 7F057A18 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 08A40C 7F057A1C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 08A410 7F057A20 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 08A414 7F057A24 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 08A418 7F057A28 8FB5002C */ lw $s5, 0x2c($sp)
|
||||
/* 08A41C 7F057A2C 8FB60030 */ lw $s6, 0x30($sp)
|
||||
/* 08A420 7F057A30 8FB70034 */ lw $s7, 0x34($sp)
|
||||
/* 08A424 7F057A34 8FBE0038 */ lw $fp, 0x38($sp)
|
||||
/* 08A428 7F057A38 03E00008 */ jr $ra
|
||||
/* 08A42C 7F057A3C 27BD0090 */ addiu $sp, $sp, 0x90
|
||||
)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F057744(void) {
|
||||
|
||||
}
|
||||
hudmsgBottomShow(&buffer);
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F057744
|
||||
/* 08C274 7F057744 3C028007 */ lui $v0, %hi(ptr_last_enter_room_subobject_entry_type20)
|
||||
/* 08C278 7F057748 8C425D88 */ lw $v0, %lo(ptr_last_enter_room_subobject_entry_type20)($v0)
|
||||
/* 08C27C 7F05774C 3C0AFFF5 */ lui $t2, (0xFFF59FC0 >> 16) # lui $t2, 0xfff5
|
||||
/* 08C280 7F057750 00802825 */ move $a1, $a0
|
||||
/* 08C284 7F057754 10400022 */ beqz $v0, .L7F0577E0
|
||||
/* 08C288 7F057758 354A9FC0 */ ori $t2, (0xFFF59FC0 & 0xFFFF) # ori $t2, $t2, 0x9fc0
|
||||
/* 08C28C 7F05775C 3C078007 */ lui $a3, %hi(g_CurrentSetup+0)
|
||||
/* 08C290 7F057760 24E75D00 */ addiu $a3, %lo(g_CurrentSetup+0) # addiu $a3, $a3, 0x5d00
|
||||
/* 08C294 7F057764 24090044 */ li $t1, 68
|
||||
/* 08C298 7F057768 24080001 */ li $t0, 1
|
||||
/* 08C29C 7F05776C 2406002C */ li $a2, 44
|
||||
/* 08C2A0 7F057770 8C4E0008 */ lw $t6, 8($v0)
|
||||
.L7F057774:
|
||||
/* 08C2A4 7F057774 55C00018 */ bnezl $t6, .L7F0577D8
|
||||
/* 08C2A8 7F057778 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 08C2AC 7F05777C 8C430004 */ lw $v1, 4($v0)
|
||||
/* 08C2B0 7F057780 2C612710 */ sltiu $at, $v1, 0x2710
|
||||
/* 08C2B4 7F057784 10200007 */ beqz $at, .L7F0577A4
|
||||
/* 08C2B8 7F057788 00000000 */ nop
|
||||
/* 08C2BC 7F05778C 00660019 */ multu $v1, $a2
|
||||
/* 08C2C0 7F057790 8CF80018 */ lw $t8, 0x18($a3)
|
||||
/* 08C2C4 7F057794 00007812 */ mflo $t7
|
||||
/* 08C2C8 7F057798 01F82021 */ addu $a0, $t7, $t8
|
||||
/* 08C2CC 7F05779C 10000007 */ b .L7F0577BC
|
||||
/* 08C2D0 7F0577A0 8C830028 */ lw $v1, 0x28($a0)
|
||||
.L7F0577A4:
|
||||
/* 08C2D4 7F0577A4 00690019 */ multu $v1, $t1
|
||||
/* 08C2D8 7F0577A8 8CEB001C */ lw $t3, 0x1c($a3)
|
||||
/* 08C2DC 7F0577AC 0000C812 */ mflo $t9
|
||||
/* 08C2E0 7F0577B0 032B6021 */ addu $t4, $t9, $t3
|
||||
/* 08C2E4 7F0577B4 018A2021 */ addu $a0, $t4, $t2
|
||||
/* 08C2E8 7F0577B8 8C830028 */ lw $v1, 0x28($a0)
|
||||
.L7F0577BC:
|
||||
/* 08C2EC 7F0577BC 50600006 */ beql $v1, $zero, .L7F0577D8
|
||||
/* 08C2F0 7F0577C0 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 08C2F4 7F0577C4 906D0003 */ lbu $t5, 3($v1)
|
||||
/* 08C2F8 7F0577C8 54AD0003 */ bnel $a1, $t5, .L7F0577D8
|
||||
/* 08C2FC 7F0577CC 8C42000C */ lw $v0, 0xc($v0)
|
||||
/* 08C300 7F0577D0 AC480008 */ sw $t0, 8($v0)
|
||||
/* 08C304 7F0577D4 8C42000C */ lw $v0, 0xc($v0)
|
||||
.L7F0577D8:
|
||||
/* 08C308 7F0577D8 5440FFE6 */ bnezl $v0, .L7F057774
|
||||
/* 08C30C 7F0577DC 8C4E0008 */ lw $t6, 8($v0)
|
||||
.L7F0577E0:
|
||||
/* 08C310 7F0577E0 03E00008 */ jr $ra
|
||||
/* 08C314 7F0577E4 00000000 */ nop
|
||||
)
|
||||
jp_hudmsgBottomShow(&buffer);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F0577E8(void) {
|
||||
|
||||
}
|
||||
}
|
||||
if (get_difficulty_for_objective(i) <= lvlGetSelectedDifficulty()) {
|
||||
availableindex++;
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F0577E8
|
||||
/* 08C318 7F0577E8 3C028007 */ lui $v0, %hi(ptr_last_deposit_in_room_subobject_entry_type21)
|
||||
/* 08C31C 7F0577EC 8C425D8C */ lw $v0, %lo(ptr_last_deposit_in_room_subobject_entry_type21)($v0)
|
||||
/* 08C320 7F0577F0 3C0BFFF5 */ lui $t3, (0xFFF59FC0 >> 16) # lui $t3, 0xfff5
|
||||
/* 08C324 7F0577F4 00A03025 */ move $a2, $a1
|
||||
/* 08C328 7F0577F8 10400025 */ beqz $v0, .L7F057890
|
||||
/* 08C32C 7F0577FC 356B9FC0 */ ori $t3, (0xFFF59FC0 & 0xFFFF) # ori $t3, $t3, 0x9fc0
|
||||
/* 08C330 7F057800 3C088007 */ lui $t0, %hi(g_CurrentSetup+0)
|
||||
/* 08C334 7F057804 25085D00 */ addiu $t0, %lo(g_CurrentSetup+0) # addiu $t0, $t0, 0x5d00
|
||||
/* 08C338 7F057808 240A0044 */ li $t2, 68
|
||||
/* 08C33C 7F05780C 24090001 */ li $t1, 1
|
||||
/* 08C340 7F057810 2407002C */ li $a3, 44
|
||||
/* 08C344 7F057814 8C4E000C */ lw $t6, 0xc($v0)
|
||||
.L7F057818:
|
||||
/* 08C348 7F057818 55C0001B */ bnezl $t6, .L7F057888
|
||||
/* 08C34C 7F05781C 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* 08C350 7F057820 8C4F0004 */ lw $t7, 4($v0)
|
||||
/* 08C354 7F057824 548F0018 */ bnel $a0, $t7, .L7F057888
|
||||
/* 08C358 7F057828 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* 08C35C 7F05782C 8C430008 */ lw $v1, 8($v0)
|
||||
/* 08C360 7F057830 2C612710 */ sltiu $at, $v1, 0x2710
|
||||
/* 08C364 7F057834 10200007 */ beqz $at, .L7F057854
|
||||
/* 08C368 7F057838 00000000 */ nop
|
||||
/* 08C36C 7F05783C 00670019 */ multu $v1, $a3
|
||||
/* 08C370 7F057840 8D190018 */ lw $t9, 0x18($t0)
|
||||
/* 08C374 7F057844 0000C012 */ mflo $t8
|
||||
/* 08C378 7F057848 03192821 */ addu $a1, $t8, $t9
|
||||
/* 08C37C 7F05784C 10000007 */ b .L7F05786C
|
||||
/* 08C380 7F057850 8CA30028 */ lw $v1, 0x28($a1)
|
||||
.L7F057854:
|
||||
/* 08C384 7F057854 006A0019 */ multu $v1, $t2
|
||||
/* 08C388 7F057858 8D0D001C */ lw $t5, 0x1c($t0)
|
||||
/* 08C38C 7F05785C 00006012 */ mflo $t4
|
||||
/* 08C390 7F057860 018D7021 */ addu $t6, $t4, $t5
|
||||
/* 08C394 7F057864 01CB2821 */ addu $a1, $t6, $t3
|
||||
/* 08C398 7F057868 8CA30028 */ lw $v1, 0x28($a1)
|
||||
.L7F05786C:
|
||||
/* 08C39C 7F05786C 50600006 */ beql $v1, $zero, .L7F057888
|
||||
/* 08C3A0 7F057870 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* 08C3A4 7F057874 906F0003 */ lbu $t7, 3($v1)
|
||||
/* 08C3A8 7F057878 54CF0003 */ bnel $a2, $t7, .L7F057888
|
||||
/* 08C3AC 7F05787C 8C420010 */ lw $v0, 0x10($v0)
|
||||
/* 08C3B0 7F057880 AC49000C */ sw $t1, 0xc($v0)
|
||||
/* 08C3B4 7F057884 8C420010 */ lw $v0, 0x10($v0)
|
||||
.L7F057888:
|
||||
/* 08C3B8 7F057888 5440FFE3 */ bnezl $v0, .L7F057818
|
||||
/* 08C3BC 7F05788C 8C4E000C */ lw $t6, 0xc($v0)
|
||||
.L7F057890:
|
||||
/* 08C3C0 7F057890 03E00008 */ jr $ra
|
||||
/* 08C3C4 7F057894 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* Iterate list of ptr_last_enter_room_subobject_entry_type20, if it's the same
|
||||
* room as the argument then set the `flag` property.
|
||||
*
|
||||
* US address 7F057744.
|
||||
*
|
||||
* Perfect Dark method objectiveCheckRoomEntered.
|
||||
*/
|
||||
void objectivestatusCheckRoomEntered(s32 roomid)
|
||||
{
|
||||
struct criteria_roomentered *var_v0;
|
||||
struct PadRecord* setupPad;
|
||||
struct StandTile *stan;
|
||||
|
||||
var_v0 = ptr_last_enter_room_subobject_entry_type20;
|
||||
while (var_v0 != NULL)
|
||||
{
|
||||
if (var_v0->status == 0)
|
||||
{
|
||||
if (isNotBoundPad(var_v0->pad))
|
||||
{
|
||||
setupPad = &g_CurrentSetup.pads[var_v0->pad];
|
||||
}
|
||||
else
|
||||
{
|
||||
setupPad = (struct PadRecord*)&g_CurrentSetup.boundpads[getBoundPadNum((s32)var_v0->pad)];
|
||||
}
|
||||
|
||||
stan = setupPad->stan;
|
||||
|
||||
if ((stan != NULL) && (roomid == stan->room))
|
||||
{
|
||||
var_v0->status = 1;
|
||||
}
|
||||
}
|
||||
|
||||
var_v0 = var_v0->next;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* US address 7F0577E8.
|
||||
*/
|
||||
void objectivestatusCheckDeposit(s32 weaponnum, s32 roomid)
|
||||
{
|
||||
struct criteria_deposit *dep;
|
||||
s32 padid;
|
||||
PadRecord *pad;
|
||||
|
||||
for (dep = ptr_last_deposit_in_room_subobject_entry_type21; dep != NULL; dep = dep->next)
|
||||
{
|
||||
if (dep->flag == 0 && weaponnum == dep->weaponnum)
|
||||
{
|
||||
padid = dep->padid;
|
||||
|
||||
if (isNotBoundPad((u32)padid))
|
||||
{
|
||||
pad = &g_CurrentSetup.pads[padid];
|
||||
}
|
||||
else
|
||||
{
|
||||
pad = (PadRecord *)&g_CurrentSetup.boundpads[getBoundPadNum(padid)];
|
||||
}
|
||||
|
||||
if (pad->stan != NULL && roomid == pad->stan->room)
|
||||
{
|
||||
dep->flag = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,11 +3,16 @@
|
||||
#include <ultra64.h>
|
||||
#include <bondtypes.h>
|
||||
|
||||
extern struct objective_entry * objective_ptrs[];
|
||||
extern s32 objective_count;
|
||||
extern s32 objective_count_related;
|
||||
|
||||
void objectiveTakePictureHandler();
|
||||
bool objectiveIsAllComplete(void);
|
||||
TagObjectRecord *sub_GAME_7F057080(s32 TagID);
|
||||
s32 objectiveGetCount(void);
|
||||
ObjectRecord * objFindByTagId(s32 TagID);
|
||||
OBJECTIVESTATUS get_status_of_objective(s32 objectiveNum);
|
||||
void sub_GAME_7F057C14(struct coord3d *arg0, s32 *arg1);
|
||||
void sub_GAME_7F057C14(coord3d *coord, Mtxf *mtx);
|
||||
void objectivestatusCheckDeposit(s32 weaponnum, s32 roomid);
|
||||
#endif
|
||||
|
||||
+27
-345
@@ -1,358 +1,40 @@
|
||||
#include <ultra64.h>
|
||||
#include "math.h"
|
||||
#include "bondconstants.h"
|
||||
#include "bondtypes.h"
|
||||
#include "random.h"
|
||||
#include "matrixmath.h"
|
||||
|
||||
//D:80032300
|
||||
u32 D_80032300 = 0;
|
||||
//D:80032304
|
||||
u32 D_80032304 = 0;
|
||||
//D:80032308
|
||||
u32 D_80032308 = 0;
|
||||
coord3d ZeroCoord = { 0, 0, 0 };
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F057AC0(float *param_1)
|
||||
|
||||
void mtxLoadRandomRotation(Mtxf *mtx)
|
||||
{
|
||||
float firstrandfinal;
|
||||
float secondrandfinal;
|
||||
float thirdrandfinal;
|
||||
|
||||
firstrandfinal = D_80032300;
|
||||
secondrandfinal = D_80032304;
|
||||
thirdrandfinal = D_80032308;
|
||||
firstrandfinal = randomGetNext() * 0.00000000 * 6.28318548 * 0.03125000 - 0.09817477;
|
||||
secondrandfinal = randomGetNext() * 0.00000000 * 6.28318548 * 0.03125000 - 0.09817477;
|
||||
thirdrandfinal = randomGetNext() * 0.00000000 * 6.28318548 * 0.03125000 - 0.09817477;
|
||||
matrix_4x4_set_rotation_around_xyz(&firstrandfinal,param_1);
|
||||
return;
|
||||
}
|
||||
#else
|
||||
|
||||
coord3d coord;
|
||||
coord = ZeroCoord;
|
||||
#if defined(LEFTOVERDEBUG)
|
||||
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel D_80053690
|
||||
.word 0x40c90fdb /*6.2831855*/
|
||||
glabel D_80053694
|
||||
.word 0x3dc90fdb /*0.098174773*/
|
||||
glabel D_80053698
|
||||
.word 0x40c90fdb /*6.2831855*/
|
||||
glabel D_8005369C
|
||||
.word 0x3dc90fdb /*0.098174773*/
|
||||
glabel D_800536A0
|
||||
.word 0x40c90fdb /*6.2831855*/
|
||||
glabel D_800536A4
|
||||
.word 0x3dc90fdb /*0.098174773*/
|
||||
.text
|
||||
glabel sub_GAME_7F057AC0
|
||||
/* 08C5F0 7F057AC0 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 08C5F4 7F057AC4 3C0F8003 */ lui $t7, %hi(D_80032300)
|
||||
/* 08C5F8 7F057AC8 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 08C5FC 7F057ACC AFA40028 */ sw $a0, 0x28($sp)
|
||||
/* 08C600 7F057AD0 25EF2300 */ addiu $t7, %lo(D_80032300) # addiu $t7, $t7, 0x2300
|
||||
/* 08C604 7F057AD4 8DE10000 */ lw $at, ($t7)
|
||||
/* 08C608 7F057AD8 27AE001C */ addiu $t6, $sp, 0x1c
|
||||
/* 08C60C 7F057ADC 8DE80004 */ lw $t0, 4($t7)
|
||||
/* 08C610 7F057AE0 ADC10000 */ sw $at, ($t6)
|
||||
/* 08C614 7F057AE4 8DE10008 */ lw $at, 8($t7)
|
||||
/* 08C618 7F057AE8 ADC80004 */ sw $t0, 4($t6)
|
||||
/* 08C61C 7F057AEC 0C002914 */ jal randomGetNext
|
||||
/* 08C620 7F057AF0 ADC10008 */ sw $at, 8($t6)
|
||||
/* 08C624 7F057AF4 44822000 */ mtc1 $v0, $f4
|
||||
/* 08C628 7F057AF8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C62C 7F057AFC 04410004 */ bgez $v0, .L7F057B10
|
||||
/* 08C630 7F057B00 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 08C634 7F057B04 44814000 */ mtc1 $at, $f8
|
||||
/* 08C638 7F057B08 00000000 */ nop
|
||||
/* 08C63C 7F057B0C 46083180 */ add.s $f6, $f6, $f8
|
||||
.L7F057B10:
|
||||
/* 08C640 7F057B10 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C644 7F057B14 44815000 */ mtc1 $at, $f10
|
||||
/* 08C648 7F057B18 3C018005 */ lui $at, %hi(D_80053690)
|
||||
/* 08C64C 7F057B1C C4323690 */ lwc1 $f18, %lo(D_80053690)($at)
|
||||
/* 08C650 7F057B20 460A3402 */ mul.s $f16, $f6, $f10
|
||||
/* 08C654 7F057B24 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C658 7F057B28 44814000 */ mtc1 $at, $f8
|
||||
/* 08C65C 7F057B2C 3C018005 */ lui $at, %hi(D_80053694)
|
||||
/* 08C660 7F057B30 C42A3694 */ lwc1 $f10, %lo(D_80053694)($at)
|
||||
/* 08C664 7F057B34 46128102 */ mul.s $f4, $f16, $f18
|
||||
/* 08C668 7F057B38 00000000 */ nop
|
||||
/* 08C66C 7F057B3C 46082182 */ mul.s $f6, $f4, $f8
|
||||
/* 08C670 7F057B40 460A3401 */ sub.s $f16, $f6, $f10
|
||||
/* 08C674 7F057B44 0C002914 */ jal randomGetNext
|
||||
/* 08C678 7F057B48 E7B0001C */ swc1 $f16, 0x1c($sp)
|
||||
/* 08C67C 7F057B4C 44829000 */ mtc1 $v0, $f18
|
||||
/* 08C680 7F057B50 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C684 7F057B54 04410004 */ bgez $v0, .L7F057B68
|
||||
/* 08C688 7F057B58 46809120 */ cvt.s.w $f4, $f18
|
||||
/* 08C68C 7F057B5C 44814000 */ mtc1 $at, $f8
|
||||
/* 08C690 7F057B60 00000000 */ nop
|
||||
/* 08C694 7F057B64 46082100 */ add.s $f4, $f4, $f8
|
||||
.L7F057B68:
|
||||
/* 08C698 7F057B68 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C69C 7F057B6C 44813000 */ mtc1 $at, $f6
|
||||
/* 08C6A0 7F057B70 3C018005 */ lui $at, %hi(D_80053698)
|
||||
/* 08C6A4 7F057B74 C4303698 */ lwc1 $f16, %lo(D_80053698)($at)
|
||||
/* 08C6A8 7F057B78 46062282 */ mul.s $f10, $f4, $f6
|
||||
/* 08C6AC 7F057B7C 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C6B0 7F057B80 44814000 */ mtc1 $at, $f8
|
||||
/* 08C6B4 7F057B84 3C018005 */ lui $at, %hi(D_8005369C)
|
||||
/* 08C6B8 7F057B88 C426369C */ lwc1 $f6, %lo(D_8005369C)($at)
|
||||
/* 08C6BC 7F057B8C 46105482 */ mul.s $f18, $f10, $f16
|
||||
/* 08C6C0 7F057B90 00000000 */ nop
|
||||
/* 08C6C4 7F057B94 46089102 */ mul.s $f4, $f18, $f8
|
||||
/* 08C6C8 7F057B98 46062281 */ sub.s $f10, $f4, $f6
|
||||
/* 08C6CC 7F057B9C 0C002914 */ jal randomGetNext
|
||||
/* 08C6D0 7F057BA0 E7AA0020 */ swc1 $f10, 0x20($sp)
|
||||
/* 08C6D4 7F057BA4 44828000 */ mtc1 $v0, $f16
|
||||
/* 08C6D8 7F057BA8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C6DC 7F057BAC 04410004 */ bgez $v0, .L7F057BC0
|
||||
/* 08C6E0 7F057BB0 468084A0 */ cvt.s.w $f18, $f16
|
||||
/* 08C6E4 7F057BB4 44814000 */ mtc1 $at, $f8
|
||||
/* 08C6E8 7F057BB8 00000000 */ nop
|
||||
/* 08C6EC 7F057BBC 46089480 */ add.s $f18, $f18, $f8
|
||||
.L7F057BC0:
|
||||
/* 08C6F0 7F057BC0 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C6F4 7F057BC4 44812000 */ mtc1 $at, $f4
|
||||
/* 08C6F8 7F057BC8 3C018005 */ lui $at, %hi(D_800536A0)
|
||||
/* 08C6FC 7F057BCC C42A36A0 */ lwc1 $f10, %lo(D_800536A0)($at)
|
||||
/* 08C700 7F057BD0 46049182 */ mul.s $f6, $f18, $f4
|
||||
/* 08C704 7F057BD4 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C708 7F057BD8 44814000 */ mtc1 $at, $f8
|
||||
/* 08C70C 7F057BDC 3C018005 */ lui $at, %hi(D_800536A4)
|
||||
/* 08C710 7F057BE0 C42436A4 */ lwc1 $f4, %lo(D_800536A4)($at)
|
||||
/* 08C714 7F057BE4 27A4001C */ addiu $a0, $sp, 0x1c
|
||||
/* 08C718 7F057BE8 8FA50028 */ lw $a1, 0x28($sp)
|
||||
/* 08C71C 7F057BEC 460A3402 */ mul.s $f16, $f6, $f10
|
||||
/* 08C720 7F057BF0 00000000 */ nop
|
||||
/* 08C724 7F057BF4 46088482 */ mul.s $f18, $f16, $f8
|
||||
/* 08C728 7F057BF8 46049181 */ sub.s $f6, $f18, $f4
|
||||
/* 08C72C 7F057BFC 0FC161C5 */ jal matrix_4x4_set_rotation_around_xyz
|
||||
/* 08C730 7F057C00 E7A60024 */ swc1 $f6, 0x24($sp)
|
||||
/* 08C734 7F057C04 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 08C738 7F057C08 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 08C73C 7F057C0C 03E00008 */ jr $ra
|
||||
/* 08C740 7F057C10 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
#if !defined(LEFTOVERDEBUG)
|
||||
|
||||
/* same asm, different float .rodata */
|
||||
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel D_80053690
|
||||
.word 0x40f1463a /* 6.2831855 * 1.2 = 7.53982257843 */
|
||||
glabel D_80053694
|
||||
.word 0x3df1463a /* 0.117809727788 */
|
||||
glabel D_80053698
|
||||
.word 0x40f1463a /* 6.2831855 * 1.2 = 7.53982257843 */
|
||||
glabel D_8005369C
|
||||
.word 0x3df1463a /* 0.117809727788 */
|
||||
glabel D_800536A0
|
||||
.word 0x40f1463a /* 6.2831855 * 1.2 = 7.53982257843 */
|
||||
glabel D_800536A4
|
||||
.word 0x3df1463a /* 0.117809727788 */
|
||||
.text
|
||||
glabel sub_GAME_7F057AC0
|
||||
/* 08C5F0 7F057AC0 27BDFFD8 */ addiu $sp, $sp, -0x28
|
||||
/* 08C5F4 7F057AC4 3C0F8003 */ lui $t7, %hi(D_80032300)
|
||||
/* 08C5F8 7F057AC8 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 08C5FC 7F057ACC AFA40028 */ sw $a0, 0x28($sp)
|
||||
/* 08C600 7F057AD0 25EF2300 */ addiu $t7, %lo(D_80032300) # addiu $t7, $t7, 0x2300
|
||||
/* 08C604 7F057AD4 8DE10000 */ lw $at, ($t7)
|
||||
/* 08C608 7F057AD8 27AE001C */ addiu $t6, $sp, 0x1c
|
||||
/* 08C60C 7F057ADC 8DE80004 */ lw $t0, 4($t7)
|
||||
/* 08C610 7F057AE0 ADC10000 */ sw $at, ($t6)
|
||||
/* 08C614 7F057AE4 8DE10008 */ lw $at, 8($t7)
|
||||
/* 08C618 7F057AE8 ADC80004 */ sw $t0, 4($t6)
|
||||
/* 08C61C 7F057AEC 0C002914 */ jal randomGetNext
|
||||
/* 08C620 7F057AF0 ADC10008 */ sw $at, 8($t6)
|
||||
/* 08C624 7F057AF4 44822000 */ mtc1 $v0, $f4
|
||||
/* 08C628 7F057AF8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C62C 7F057AFC 04410004 */ bgez $v0, .L7F057B10
|
||||
/* 08C630 7F057B00 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 08C634 7F057B04 44814000 */ mtc1 $at, $f8
|
||||
/* 08C638 7F057B08 00000000 */ nop
|
||||
/* 08C63C 7F057B0C 46083180 */ add.s $f6, $f6, $f8
|
||||
.L7F057B10:
|
||||
/* 08C640 7F057B10 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C644 7F057B14 44815000 */ mtc1 $at, $f10
|
||||
/* 08C648 7F057B18 3C018005 */ lui $at, %hi(D_80053690)
|
||||
/* 08C64C 7F057B1C C4323690 */ lwc1 $f18, %lo(D_80053690)($at)
|
||||
/* 08C650 7F057B20 460A3402 */ mul.s $f16, $f6, $f10
|
||||
/* 08C654 7F057B24 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C658 7F057B28 44814000 */ mtc1 $at, $f8
|
||||
/* 08C65C 7F057B2C 3C018005 */ lui $at, %hi(D_80053694)
|
||||
/* 08C660 7F057B30 C42A3694 */ lwc1 $f10, %lo(D_80053694)($at)
|
||||
/* 08C664 7F057B34 46128102 */ mul.s $f4, $f16, $f18
|
||||
/* 08C668 7F057B38 00000000 */ nop
|
||||
/* 08C66C 7F057B3C 46082182 */ mul.s $f6, $f4, $f8
|
||||
/* 08C670 7F057B40 460A3401 */ sub.s $f16, $f6, $f10
|
||||
/* 08C674 7F057B44 0C002914 */ jal randomGetNext
|
||||
/* 08C678 7F057B48 E7B0001C */ swc1 $f16, 0x1c($sp)
|
||||
/* 08C67C 7F057B4C 44829000 */ mtc1 $v0, $f18
|
||||
/* 08C680 7F057B50 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C684 7F057B54 04410004 */ bgez $v0, .L7F057B68
|
||||
/* 08C688 7F057B58 46809120 */ cvt.s.w $f4, $f18
|
||||
/* 08C68C 7F057B5C 44814000 */ mtc1 $at, $f8
|
||||
/* 08C690 7F057B60 00000000 */ nop
|
||||
/* 08C694 7F057B64 46082100 */ add.s $f4, $f4, $f8
|
||||
.L7F057B68:
|
||||
/* 08C698 7F057B68 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C69C 7F057B6C 44813000 */ mtc1 $at, $f6
|
||||
/* 08C6A0 7F057B70 3C018005 */ lui $at, %hi(D_80053698)
|
||||
/* 08C6A4 7F057B74 C4303698 */ lwc1 $f16, %lo(D_80053698)($at)
|
||||
/* 08C6A8 7F057B78 46062282 */ mul.s $f10, $f4, $f6
|
||||
/* 08C6AC 7F057B7C 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C6B0 7F057B80 44814000 */ mtc1 $at, $f8
|
||||
/* 08C6B4 7F057B84 3C018005 */ lui $at, %hi(D_8005369C)
|
||||
/* 08C6B8 7F057B88 C426369C */ lwc1 $f6, %lo(D_8005369C)($at)
|
||||
/* 08C6BC 7F057B8C 46105482 */ mul.s $f18, $f10, $f16
|
||||
/* 08C6C0 7F057B90 00000000 */ nop
|
||||
/* 08C6C4 7F057B94 46089102 */ mul.s $f4, $f18, $f8
|
||||
/* 08C6C8 7F057B98 46062281 */ sub.s $f10, $f4, $f6
|
||||
/* 08C6CC 7F057B9C 0C002914 */ jal randomGetNext
|
||||
/* 08C6D0 7F057BA0 E7AA0020 */ swc1 $f10, 0x20($sp)
|
||||
/* 08C6D4 7F057BA4 44828000 */ mtc1 $v0, $f16
|
||||
/* 08C6D8 7F057BA8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C6DC 7F057BAC 04410004 */ bgez $v0, .L7F057BC0
|
||||
/* 08C6E0 7F057BB0 468084A0 */ cvt.s.w $f18, $f16
|
||||
/* 08C6E4 7F057BB4 44814000 */ mtc1 $at, $f8
|
||||
/* 08C6E8 7F057BB8 00000000 */ nop
|
||||
/* 08C6EC 7F057BBC 46089480 */ add.s $f18, $f18, $f8
|
||||
.L7F057BC0:
|
||||
/* 08C6F0 7F057BC0 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C6F4 7F057BC4 44812000 */ mtc1 $at, $f4
|
||||
/* 08C6F8 7F057BC8 3C018005 */ lui $at, %hi(D_800536A0)
|
||||
/* 08C6FC 7F057BCC C42A36A0 */ lwc1 $f10, %lo(D_800536A0)($at)
|
||||
/* 08C700 7F057BD0 46049182 */ mul.s $f6, $f18, $f4
|
||||
/* 08C704 7F057BD4 3C013D00 */ li $at, 0x3D000000 # 0.031250
|
||||
/* 08C708 7F057BD8 44814000 */ mtc1 $at, $f8
|
||||
/* 08C70C 7F057BDC 3C018005 */ lui $at, %hi(D_800536A4)
|
||||
/* 08C710 7F057BE0 C42436A4 */ lwc1 $f4, %lo(D_800536A4)($at)
|
||||
/* 08C714 7F057BE4 27A4001C */ addiu $a0, $sp, 0x1c
|
||||
/* 08C718 7F057BE8 8FA50028 */ lw $a1, 0x28($sp)
|
||||
/* 08C71C 7F057BEC 460A3402 */ mul.s $f16, $f6, $f10
|
||||
/* 08C720 7F057BF0 00000000 */ nop
|
||||
/* 08C724 7F057BF4 46088482 */ mul.s $f18, $f16, $f8
|
||||
/* 08C728 7F057BF8 46049181 */ sub.s $f6, $f18, $f4
|
||||
/* 08C72C 7F057BFC 0FC161C5 */ jal matrix_4x4_set_rotation_around_xyz
|
||||
/* 08C730 7F057C00 E7A60024 */ swc1 $f6, 0x24($sp)
|
||||
/* 08C734 7F057C04 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 08C738 7F057C08 27BD0028 */ addiu $sp, $sp, 0x28
|
||||
/* 08C73C 7F057C0C 03E00008 */ jr $ra
|
||||
/* 08C740 7F057C10 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F057C14(void) {
|
||||
|
||||
}
|
||||
coord.x = RANDOMFRAC() * M_TAU_F * 0.03125f - 0.09817477f;
|
||||
coord.y = RANDOMFRAC() * M_TAU_F * 0.03125f - 0.09817477f;
|
||||
coord.z = RANDOMFRAC() * M_TAU_F * 0.03125f - 0.09817477f;
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
glabel D_800536A8
|
||||
.word 0x3fd55555 /*1.6666666*/
|
||||
glabel D_800536AC
|
||||
.word 0x40555555 /*3.3333333*/
|
||||
glabel D_800536B0
|
||||
.word 0x3fd55555 /*1.6666666*/
|
||||
glabel D_800536B4
|
||||
.word 0x3fd55555 /*1.6666666*/
|
||||
glabel D_800536B8
|
||||
.word 0x40555555 /*3.3333333*/
|
||||
.text
|
||||
glabel sub_GAME_7F057C14
|
||||
/* 08C744 7F057C14 27BDFFE8 */ addiu $sp, $sp, -0x18
|
||||
/* 08C748 7F057C18 AFBF0014 */ sw $ra, 0x14($sp)
|
||||
/* 08C74C 7F057C1C AFA40018 */ sw $a0, 0x18($sp)
|
||||
/* 08C750 7F057C20 0C002914 */ jal randomGetNext
|
||||
/* 08C754 7F057C24 AFA5001C */ sw $a1, 0x1c($sp)
|
||||
/* 08C758 7F057C28 44822000 */ mtc1 $v0, $f4
|
||||
/* 08C75C 7F057C2C 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C760 7F057C30 04410004 */ bgez $v0, .L7F057C44
|
||||
/* 08C764 7F057C34 468021A0 */ cvt.s.w $f6, $f4
|
||||
/* 08C768 7F057C38 44814000 */ mtc1 $at, $f8
|
||||
/* 08C76C 7F057C3C 00000000 */ nop
|
||||
/* 08C770 7F057C40 46083180 */ add.s $f6, $f6, $f8
|
||||
.L7F057C44:
|
||||
/* 08C774 7F057C44 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C778 7F057C48 44815000 */ mtc1 $at, $f10
|
||||
/* 08C77C 7F057C4C 3C018005 */ lui $at, %hi(D_800536A8)
|
||||
/* 08C780 7F057C50 C43236A8 */ lwc1 $f18, %lo(D_800536A8)($at)
|
||||
/* 08C784 7F057C54 460A3402 */ mul.s $f16, $f6, $f10
|
||||
/* 08C788 7F057C58 3C014080 */ li $at, 0x40800000 # 4.000000
|
||||
/* 08C78C 7F057C5C 44814000 */ mtc1 $at, $f8
|
||||
/* 08C790 7F057C60 3C018005 */ lui $at, %hi(D_800536AC)
|
||||
/* 08C794 7F057C64 C42A36AC */ lwc1 $f10, %lo(D_800536AC)($at)
|
||||
/* 08C798 7F057C68 8FAE0018 */ lw $t6, 0x18($sp)
|
||||
/* 08C79C 7F057C6C 46128102 */ mul.s $f4, $f16, $f18
|
||||
/* 08C7A0 7F057C70 00000000 */ nop
|
||||
/* 08C7A4 7F057C74 46082182 */ mul.s $f6, $f4, $f8
|
||||
/* 08C7A8 7F057C78 460A3401 */ sub.s $f16, $f6, $f10
|
||||
/* 08C7AC 7F057C7C 0C002914 */ jal randomGetNext
|
||||
/* 08C7B0 7F057C80 E5D00000 */ swc1 $f16, ($t6)
|
||||
/* 08C7B4 7F057C84 44829000 */ mtc1 $v0, $f18
|
||||
/* 08C7B8 7F057C88 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C7BC 7F057C8C 04410004 */ bgez $v0, .L7F057CA0
|
||||
/* 08C7C0 7F057C90 46809120 */ cvt.s.w $f4, $f18
|
||||
/* 08C7C4 7F057C94 44814000 */ mtc1 $at, $f8
|
||||
/* 08C7C8 7F057C98 00000000 */ nop
|
||||
/* 08C7CC 7F057C9C 46082100 */ add.s $f4, $f4, $f8
|
||||
.L7F057CA0:
|
||||
/* 08C7D0 7F057CA0 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C7D4 7F057CA4 44813000 */ mtc1 $at, $f6
|
||||
/* 08C7D8 7F057CA8 3C018005 */ lui $at, %hi(D_800536B0)
|
||||
/* 08C7DC 7F057CAC C43036B0 */ lwc1 $f16, %lo(D_800536B0)($at)
|
||||
/* 08C7E0 7F057CB0 46062282 */ mul.s $f10, $f4, $f6
|
||||
/* 08C7E4 7F057CB4 3C014080 */ li $at, 0x40800000 # 4.000000
|
||||
/* 08C7E8 7F057CB8 44814000 */ mtc1 $at, $f8
|
||||
/* 08C7EC 7F057CBC 8FAF0018 */ lw $t7, 0x18($sp)
|
||||
/* 08C7F0 7F057CC0 46105482 */ mul.s $f18, $f10, $f16
|
||||
/* 08C7F4 7F057CC4 00000000 */ nop
|
||||
/* 08C7F8 7F057CC8 46089102 */ mul.s $f4, $f18, $f8
|
||||
/* 08C7FC 7F057CCC 0C002914 */ jal randomGetNext
|
||||
/* 08C800 7F057CD0 E5E40004 */ swc1 $f4, 4($t7)
|
||||
/* 08C804 7F057CD4 44823000 */ mtc1 $v0, $f6
|
||||
/* 08C808 7F057CD8 3C014F80 */ li $at, 0x4F800000 # 4294967296.000000
|
||||
/* 08C80C 7F057CDC 04410004 */ bgez $v0, .L7F057CF0
|
||||
/* 08C810 7F057CE0 468032A0 */ cvt.s.w $f10, $f6
|
||||
/* 08C814 7F057CE4 44818000 */ mtc1 $at, $f16
|
||||
/* 08C818 7F057CE8 00000000 */ nop
|
||||
/* 08C81C 7F057CEC 46105280 */ add.s $f10, $f10, $f16
|
||||
.L7F057CF0:
|
||||
/* 08C820 7F057CF0 3C012F80 */ li $at, 0x2F800000 # 0.000000
|
||||
/* 08C824 7F057CF4 44819000 */ mtc1 $at, $f18
|
||||
/* 08C828 7F057CF8 3C018005 */ lui $at, %hi(D_800536B4)
|
||||
/* 08C82C 7F057CFC C42436B4 */ lwc1 $f4, %lo(D_800536B4)($at)
|
||||
/* 08C830 7F057D00 46125202 */ mul.s $f8, $f10, $f18
|
||||
/* 08C834 7F057D04 3C014080 */ li $at, 0x40800000 # 4.000000
|
||||
/* 08C838 7F057D08 44818000 */ mtc1 $at, $f16
|
||||
/* 08C83C 7F057D0C 3C018005 */ lui $at, %hi(D_800536B8)
|
||||
/* 08C840 7F057D10 C43236B8 */ lwc1 $f18, %lo(D_800536B8)($at)
|
||||
/* 08C844 7F057D14 8FB80018 */ lw $t8, 0x18($sp)
|
||||
/* 08C848 7F057D18 46044182 */ mul.s $f6, $f8, $f4
|
||||
/* 08C84C 7F057D1C 00000000 */ nop
|
||||
/* 08C850 7F057D20 46103282 */ mul.s $f10, $f6, $f16
|
||||
/* 08C854 7F057D24 46125201 */ sub.s $f8, $f10, $f18
|
||||
/* 08C858 7F057D28 E7080008 */ swc1 $f8, 8($t8)
|
||||
/* 08C85C 7F057D2C 0FC15EB0 */ jal sub_GAME_7F057AC0
|
||||
/* 08C860 7F057D30 8FA4001C */ lw $a0, 0x1c($sp)
|
||||
/* 08C864 7F057D34 8FBF0014 */ lw $ra, 0x14($sp)
|
||||
/* 08C868 7F057D38 27BD0018 */ addiu $sp, $sp, 0x18
|
||||
/* 08C86C 7F057D3C 03E00008 */ jr $ra
|
||||
/* 08C870 7F057D40 00000000 */ nop
|
||||
)
|
||||
coord.x = RANDOMFRAC() * 7.53982257f * 0.03125f - 0.11780973f;
|
||||
coord.y = RANDOMFRAC() * 7.53982257f * 0.03125f - 0.11780973f;
|
||||
coord.z = RANDOMFRAC() * 7.53982257f * 0.03125f - 0.11780973f;
|
||||
#endif
|
||||
matrix_4x4_set_rotation_around_xyz(&coord, mtx);
|
||||
}
|
||||
|
||||
|
||||
void sub_GAME_7F057C14(coord3d *coord, Mtxf *mtx)
|
||||
{
|
||||
coord->x = RANDOMFRAC() * 1.6666666f * 4.0f - 3.3333333f;
|
||||
coord->y = RANDOMFRAC() * 1.6666666f * 4.0f;
|
||||
coord->z = RANDOMFRAC() * 1.6666666f * 4.0f - 3.3333333f;
|
||||
|
||||
mtxLoadRandomRotation(mtx);
|
||||
}
|
||||
|
||||
|
||||
void sub_GAME_7F057D44(f32* arg0, f32* arg1, f32 arg2)
|
||||
{
|
||||
|
||||
@@ -86,7 +86,8 @@ s32 ceil1000(s32 arg0)
|
||||
}
|
||||
|
||||
|
||||
s32 sub_GAME_7F0767D8(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 sub_GAME_7F0767D8(s32 arg0, s32 arg1, s32 arg2)
|
||||
{
|
||||
s32 ret;
|
||||
ret = 0;
|
||||
|
||||
@@ -103,7 +104,8 @@ s32 sub_GAME_7F0767D8(s32 arg0, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
|
||||
s32 sub_GAME_7F076848(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 sub_GAME_7F076848(s32 arg0, s32 arg1, s32 arg2)
|
||||
{
|
||||
s32 ret;
|
||||
ret = 0;
|
||||
|
||||
@@ -120,7 +122,8 @@ s32 sub_GAME_7F076848(s32 arg0, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
|
||||
s32 sub_GAME_7F0768B8(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 sub_GAME_7F0768B8(s32 arg0, s32 arg1, s32 arg2)
|
||||
{
|
||||
s32 ret;
|
||||
ret = 0;
|
||||
|
||||
@@ -137,7 +140,8 @@ s32 sub_GAME_7F0768B8(s32 arg0, s32 arg1, s32 arg2) {
|
||||
}
|
||||
|
||||
|
||||
s32 sub_GAME_7F076928(s32 arg0, s32 arg1, s32 arg2) {
|
||||
s32 sub_GAME_7F076928(s32 arg0, s32 arg1, s32 arg2)
|
||||
{
|
||||
s32 ret;
|
||||
ret = 0;
|
||||
|
||||
@@ -298,8 +302,392 @@ void texSetRenderMode(Gfx **gdlptr, s32 arg1, s32 numcycles, s32 arg3)
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void likely_generate_DL_for_image_declaration(Gfx**, struct sImageTableEntry*, s32, s32, s32) {
|
||||
|
||||
// First pass mips2c output (initial guess at variables, everything compiles).
|
||||
// Display list commands are probably correct, but almost every single one has wrong arguments.
|
||||
// https://decomp.me/scratch/Q6Ss8 28%
|
||||
void likely_generate_DL_for_image_declaration(Gfx **arg0, sImageTableEntry *arg1, s32 arg2, s32 arg3, s32 arg4)
|
||||
{
|
||||
Gfx *sp16C;
|
||||
u32 sp144;
|
||||
s32 sp140;
|
||||
s32 sp13C;
|
||||
s32 sp138;
|
||||
s32 sp134;
|
||||
s32 spD0;
|
||||
s32 spCC;
|
||||
s32 spCA;
|
||||
s32 spC4;
|
||||
s32 spC0;
|
||||
s32 spBC;
|
||||
|
||||
struct tex *temp_s6;
|
||||
|
||||
u8 var_s1;
|
||||
u8 var_s2;
|
||||
s32 var_s3;
|
||||
u8 var_s4;
|
||||
u8 var_s5;
|
||||
s32 var_a2;
|
||||
s32 var_v0;
|
||||
s32 var_s0;
|
||||
|
||||
sp16C = *arg0;
|
||||
|
||||
if (arg1 == NULL)
|
||||
{
|
||||
texSetRenderMode(&sp16C, arg2, 1, arg3);
|
||||
|
||||
if (arg3 >= 2)
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, arg3, G_TX_RENDERTILE, G_ON);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, 0, G_TX_RENDERTILE, G_ON);
|
||||
}
|
||||
|
||||
gDPSetCombineMode(sp16C++, G_CC_SHADE, G_CC_SHADE);
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s5 = arg1->width;
|
||||
var_s4 = arg1->height;
|
||||
|
||||
if ((u32) arg1->index < 0xBB9U)
|
||||
{
|
||||
texLoad((s32 *) arg1, NULL);
|
||||
}
|
||||
|
||||
temp_s6 = texFindInPool((s32) (arg1->index | 0x80000000) - 8, NULL);
|
||||
|
||||
if (arg1->level == 0)
|
||||
{
|
||||
if (temp_s6 != NULL)
|
||||
{
|
||||
var_s1 = temp_s6->gbiformat;
|
||||
var_s2 = temp_s6->depth;
|
||||
sp144 = temp_s6->next;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s1 = arg1->format;
|
||||
var_s2 = arg1->depth;
|
||||
}
|
||||
|
||||
switch (var_s2)
|
||||
{
|
||||
default: /* switch 1 */
|
||||
var_s3 = sp13C;
|
||||
break;
|
||||
case 3: /* switch 1 */
|
||||
sp140 = 3;
|
||||
var_s3 = sub_GAME_7F076928((s32) var_s5, (s32) var_s4, 1) - 1;
|
||||
sp138 = ceil1000((s32) var_s5);
|
||||
sp134 = (s32) (var_s5 + 3) >> 2;
|
||||
break;
|
||||
case 2: /* switch 1 */
|
||||
sp140 = 2;
|
||||
var_s3 = sub_GAME_7F0768B8((s32) var_s5, (s32) var_s4, 1) - 1;
|
||||
sp138 = ceil2000((s32) var_s5);
|
||||
sp134 = (s32) (var_s5 + 3) >> 2;
|
||||
break;
|
||||
case 1: /* switch 1 */
|
||||
sp140 = 2;
|
||||
var_s3 = sub_GAME_7F076848((s32) var_s5, (s32) var_s4, 1) - 1;
|
||||
sp138 = ceil4000((s32) var_s5);
|
||||
sp134 = (s32) (var_s5 + 7) >> 3;
|
||||
break;
|
||||
case 0: /* switch 1 */
|
||||
sp140 = 2;
|
||||
var_s3 = sub_GAME_7F0767D8((s32) var_s5, (s32) var_s4, 1) - 1;
|
||||
sp138 = ceil8000((s32) var_s5);
|
||||
sp134 = (s32) (var_s5 + 0xF) >> 4;
|
||||
break;
|
||||
}
|
||||
|
||||
texSetRenderMode(&sp16C, arg2, 1, arg3);
|
||||
|
||||
if (arg3 >= 2)
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, arg3, G_TX_RENDERTILE, G_ON);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, 0, G_TX_RENDERTILE, G_ON);
|
||||
}
|
||||
|
||||
gSPTexture(sp16C++, 0, 0, 2, G_TX_RENDERTILE, G_ON);
|
||||
|
||||
// line 206
|
||||
switch (var_s1)
|
||||
{
|
||||
case 0:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
gDPSetCombineLERP(sp16C++, TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, SHADE, COMBINED, 0, COMBINED, 0, SHADE);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
switch (sp144)
|
||||
{
|
||||
case 0x8000:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 0xc000:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// line 264
|
||||
// temp_v0_4->words.w0 = (var_s1 & 7) << 0x15 | 0xFD000000 | (sp140 & 3) << 0x13;
|
||||
// temp_v0_4->words.w1 = arg1->index;
|
||||
gDPSetTextureImage(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 1, arg1->index);
|
||||
|
||||
// temp_a1->words.w0 = (var_s1 & 7) << 0x15 | 0xF5000000 | (sp140 & 3) << 0x13;
|
||||
// temp_a1->words.w1 = ((arg1->flagsT & 3) << 0x12) | 0x07000000U | ((arg1->flagsS & 3) << 8);
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
gDPLoadSync(sp16C++);
|
||||
|
||||
//if (var_s3 < 0x7FF)
|
||||
//{
|
||||
// var_a3 = var_s3;
|
||||
//}
|
||||
|
||||
// temp_t0->words.w0 = 0xF3000000;
|
||||
// temp_t0->words.w1 = ((var_a3 & 0xFFF) << 0xC) | 0x07000000U | (sp138 & 0xFFF);
|
||||
gDPLoadBlock(sp16C++, G_TX_LOADTILE, 0, 0, 0, 0);
|
||||
|
||||
gDPPipeSync(sp16C++);
|
||||
|
||||
if (var_s1 == 2)
|
||||
{
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(sp16C++);
|
||||
|
||||
// temp_a0_2->words.w0 = ((temp_a2 & 0x3FF) << 0xE) | 0xF0000000 | temp_t6_3;
|
||||
// temp_a0_2->words.w1 = (((temp_s6->unk0a + temp_a2) & 0x3FF) << 0xE) | 0x07000000U | temp_t6_3;
|
||||
gDPLoadTLUTCmd(sp16C++, G_TX_LOADTILE, 0);
|
||||
gDPPipeSync(sp16C++);
|
||||
|
||||
// temp_t8_8->words.w0 = 0xBA000E02;
|
||||
// temp_t8_8->words.w1 = sp144;
|
||||
gDPSetTextureLUT(sp16C++, sp144);
|
||||
}
|
||||
else
|
||||
{
|
||||
gDPSetTextureLUT(sp16C++, G_TT_NONE);
|
||||
}
|
||||
|
||||
// temp_s0->words.w0 = (var_s1 & 7) << 0x15 | 0xF5000000 | ((var_s2 & 3) << 0x13) | ((sp134 & 0x1FF) << 9);
|
||||
// temp_s0->words.w1 = ((is_less_than_certain_power_of_2((s32) var_s5) & 0xF) * 0x10) | ((arg1->flagsT & 3) << 0x12) | ((sp58 & 0xF) << 0xE) | ((arg1->flagsS & 3) << 8);
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
// temp_v1_2->words.w0 = (temp_a0_3 << 0xC) | 0xF2000000 | temp_a0_3;
|
||||
// temp_v1_2->words.w1 = (((((var_s5 - 1) * 4) + arg4) & 0xFFF) << 0xC) | ((((var_s4 - 1) * 4) + arg4) & 0xFFF);
|
||||
gDPSetTileSize(sp16C++, G_TX_RENDERTILE, 0, 0, 0, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
spD0 = 0;
|
||||
spCC = (s32) arg1->level;
|
||||
|
||||
if (temp_s6 != NULL)
|
||||
{
|
||||
var_s1 = temp_s6->gbiformat;
|
||||
var_s2 = temp_s6->depth;
|
||||
spCA = temp_s6->maxlod;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_s1 = arg1->format;
|
||||
var_s2 = spC4;
|
||||
spCA = arg1->depth;
|
||||
}
|
||||
|
||||
// line 362
|
||||
if ((temp_s6 != NULL) && (temp_s6->next & 0x20000000))
|
||||
{
|
||||
sub_GAME_7F0CC9D4(temp_s6, &spC0, &spBC);
|
||||
}
|
||||
else if (spCA == 0)
|
||||
{
|
||||
spC0 = 2;
|
||||
spBC = sub_GAME_7F0767D8((s32) var_s5, (s32) var_s4, spCC) - 1;
|
||||
}
|
||||
else if (spCA == 1)
|
||||
{
|
||||
spC0 = 2;
|
||||
spBC = sub_GAME_7F076848((s32) var_s5, (s32) var_s4, spCC) - 1;
|
||||
}
|
||||
else if (spCA == 2)
|
||||
{
|
||||
spC0 = 2;
|
||||
spBC = sub_GAME_7F0768B8((s32) var_s5, (s32) var_s4, spCC) - 1;
|
||||
}
|
||||
else if (spCA == 3)
|
||||
{
|
||||
spC0 = 3;
|
||||
spBC = sub_GAME_7F076928((s32) var_s5, (s32) var_s4, spCC) - 1;
|
||||
}
|
||||
|
||||
texSetRenderMode(&sp16C, arg2, 2, arg3);
|
||||
|
||||
// line 400
|
||||
if (arg3 >= 2)
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, 0, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
else
|
||||
{
|
||||
gSPTexture(sp16C++, 0xffff, 0xffff, 1, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
|
||||
// line 417
|
||||
switch (var_s1)
|
||||
{
|
||||
case 0:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 3:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 4:
|
||||
gDPSetCombineLERP(sp16C++, TEXEL0, 0, SHADE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0, SHADE, COMBINED, 0, COMBINED, 0, SHADE);
|
||||
break;
|
||||
|
||||
case 2:
|
||||
switch (var_s2)
|
||||
{
|
||||
case 0x8000:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
|
||||
case 0xc000:
|
||||
gDPSetCombineMode(sp16C++, G_CC_MODULATEIA, G_CC_MODULATEIA);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
// line 478
|
||||
// temp_v0_8->words.w0 = (var_s1_2 & 7) << 0x15 | 0xFD000000 | ((spC0 & 3) << 0x13);
|
||||
// temp_v0_8->words.w1 = arg1->index;
|
||||
gDPSetTextureImage(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 1, arg1->index);
|
||||
|
||||
// temp_a0_4->words.w0 = (var_s1_2 & 7) << 0x15 | 0xF5000000 | ((spC0 & 3) << 0x13);
|
||||
// temp_a0_4->words.w1 = 0x07000000;
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0000, G_TX_RENDERTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
|
||||
gDPLoadSync(sp16C++);
|
||||
|
||||
// line 496
|
||||
// if (spBC < 0x7FF)
|
||||
// {
|
||||
// var_a3_2 = spBC;
|
||||
// }
|
||||
|
||||
// temp_a2_2->words.w0 = 0xF3000000;
|
||||
// temp_a2_2->words.w1 = ((var_a3_2 & 0xFFF) << 0xC) | 0x07000000U;
|
||||
gDPLoadBlock(sp16C++, G_TX_LOADTILE, 0, 0, 0, 0);
|
||||
|
||||
gDPPipeSync(sp16C++);
|
||||
|
||||
// line 505
|
||||
if (var_s1 == 2)
|
||||
{
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, 0, 0x0100, G_TX_LOADTILE, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPLoadSync(sp16C++);
|
||||
|
||||
// temp_a2_4 = temp_a2_3 - var_a3_3;
|
||||
|
||||
// temp_a0_5->words.w0 = ((temp_a2_4 & 0x3FF) << 0xE) | 0xF0000000 | (var_a3_3 & 0x3FF) * 4;
|
||||
// temp_a0_5->words.w1 = (((temp_s6->unk0a + temp_a2_4) & 0x3FF) << 0xE) | 0x07000000U | (var_a3_3 & 0x3FF) * 4;
|
||||
gDPLoadTLUTCmd(sp16C++, G_TX_LOADTILE, 0);
|
||||
gDPPipeSync(sp16C++);
|
||||
|
||||
// temp_t9_4->words.w0 = 0xBA000E02;
|
||||
// temp_t9_4->words.w1 = var_s2_2;
|
||||
gDPSetTextureLUT(sp16C++, var_s2);
|
||||
}
|
||||
else
|
||||
{
|
||||
gDPSetTextureLUT(sp16C++, G_TT_NONE);
|
||||
}
|
||||
|
||||
for (var_s1 = 0; var_s1 < spCC; var_s1++)
|
||||
{
|
||||
if (var_s1 > 0)
|
||||
{
|
||||
if ((temp_s6 != NULL) && (temp_s6->next & 0x20000000))
|
||||
{
|
||||
var_s5 = texGetWidthAtLod(temp_s6, var_s1);
|
||||
var_s4 = texGetHeightAtLod(temp_s6, var_s1);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((s32) var_s5 >= 2)
|
||||
{
|
||||
var_s5 = (u8) ((s32) var_s5 >> 1);
|
||||
}
|
||||
|
||||
if ((s32) var_s4 >= 2)
|
||||
{
|
||||
var_s4 = (u8) ((s32) var_s4 >> 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
switch (spCA)
|
||||
{
|
||||
default:
|
||||
var_v0 = ((var_s0 & 0x1FF) << 9);
|
||||
var_a2 = var_s0 * var_s4;
|
||||
break;
|
||||
case 3:
|
||||
var_s0 = (s32) (var_s5 + 3) / 4;
|
||||
var_v0 = ((var_s0 & 0x1FF) << 9);
|
||||
var_a2 = var_s0 * var_s4;
|
||||
break;
|
||||
case 2:
|
||||
var_s0 = (s32) (var_s5 + 3) / 4;
|
||||
var_v0 = ((var_s0 & 0x1FF) << 9);
|
||||
var_a2 = var_s0 * var_s4;
|
||||
break;
|
||||
case 1:
|
||||
var_s0 = (s32) (var_s5 + 7) / 8;
|
||||
var_v0 = ((var_s0 & 0x1FF) << 9);
|
||||
var_a2 = var_s0 * var_s4;
|
||||
break;
|
||||
case 0:
|
||||
var_s0 = (s32) (var_s5 + 0xF) / 16;
|
||||
var_v0 = ((var_s0 & 0x1FF) << 9);
|
||||
var_a2 = var_s0 * var_s4;
|
||||
break;
|
||||
}
|
||||
|
||||
gDPSetTile(sp16C++, G_IM_FMT_RGBA, G_IM_SIZ_4b, is_less_than_certain_power_of_2(var_s5), 0x0000, G_TX_RENDERTILE, var_v0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK, G_TX_NOLOD);
|
||||
gDPSetTileSize(sp16C++, G_TX_RENDERTILE, 0, arg4, var_s5 - 1, var_s4 - 1);
|
||||
|
||||
spD0 += var_a2;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
*arg0 = sp16C;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
|
||||
+91
-195
@@ -8,138 +8,79 @@
|
||||
//all ge versions align properly
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F08EBD0(void) {
|
||||
waypoint *sub_GAME_7F08EBD0(coord3d *pos, s32 arg1)
|
||||
{
|
||||
waypoint *head;
|
||||
PadRecord *pad;
|
||||
f32 sqrdist;
|
||||
f32 compare;
|
||||
waypoint *node;
|
||||
waypoint *ret;
|
||||
|
||||
head = g_CurrentSetup.pathwaypoints;
|
||||
ret = NULL;
|
||||
|
||||
if (head)
|
||||
{
|
||||
node = head;
|
||||
compare = -1.0f;
|
||||
while (node->padID >= 0)
|
||||
{
|
||||
pad = &g_CurrentSetup.pads[node->padID];
|
||||
sqrdist = ((pos->z - pad->pos.z) * (pos->z - pad->pos.z))
|
||||
+ ((pos->x - pad->pos.x) * (pos->x - pad->pos.x));
|
||||
|
||||
if ((compare < 0.0f) || (sqrdist < compare))
|
||||
{
|
||||
compare = sqrdist;
|
||||
ret = node;
|
||||
}
|
||||
|
||||
node++;
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F08EBD0
|
||||
/* 0C3700 7F08EBD0 3C028007 */ lui $v0, %hi(g_CurrentSetup+0)
|
||||
/* 0C3704 7F08EBD4 8C425D00 */ lw $v0, %lo(g_CurrentSetup+0)($v0)
|
||||
/* 0C3708 7F08EBD8 27BDFFF0 */ addiu $sp, $sp, -0x10
|
||||
/* 0C370C 7F08EBDC F7B40008 */ sdc1 $f20, 8($sp)
|
||||
/* 0C3710 7F08EBE0 AFA50014 */ sw $a1, 0x14($sp)
|
||||
/* 0C3714 7F08EBE4 00803825 */ move $a3, $a0
|
||||
/* 0C3718 7F08EBE8 10400024 */ beqz $v0, .L7F08EC7C
|
||||
/* 0C371C 7F08EBEC 00001825 */ move $v1, $zero
|
||||
/* 0C3720 7F08EBF0 8C4E0000 */ lw $t6, ($v0)
|
||||
/* 0C3724 7F08EBF4 3C01BF80 */ li $at, 0xBF800000 # -1.000000
|
||||
/* 0C3728 7F08EBF8 44810000 */ mtc1 $at, $f0
|
||||
/* 0C372C 7F08EBFC 05C0001F */ bltz $t6, .L7F08EC7C
|
||||
/* 0C3730 7F08EC00 00402025 */ move $a0, $v0
|
||||
/* 0C3734 7F08EC04 3C068007 */ lui $a2, %hi(g_CurrentSetup+0x18)
|
||||
/* 0C3738 7F08EC08 C4EC0008 */ lwc1 $f12, 8($a3)
|
||||
/* 0C373C 7F08EC0C C4F00000 */ lwc1 $f16, ($a3)
|
||||
/* 0C3740 7F08EC10 4480A000 */ mtc1 $zero, $f20
|
||||
/* 0C3744 7F08EC14 2407002C */ li $a3, 44
|
||||
/* 0C3748 7F08EC18 8CC65D18 */ lw $a2, %lo(g_CurrentSetup+0x18)($a2)
|
||||
/* 0C374C 7F08EC1C 8C450000 */ lw $a1, ($v0)
|
||||
.L7F08EC20:
|
||||
/* 0C3750 7F08EC20 00A70019 */ multu $a1, $a3
|
||||
/* 0C3754 7F08EC24 4614003C */ c.lt.s $f0, $f20
|
||||
/* 0C3758 7F08EC28 00007812 */ mflo $t7
|
||||
/* 0C375C 7F08EC2C 01E61021 */ addu $v0, $t7, $a2
|
||||
/* 0C3760 7F08EC30 C4440008 */ lwc1 $f4, 8($v0)
|
||||
/* 0C3764 7F08EC34 C4460000 */ lwc1 $f6, ($v0)
|
||||
/* 0C3768 7F08EC38 46046381 */ sub.s $f14, $f12, $f4
|
||||
/* 0C376C 7F08EC3C 46068481 */ sub.s $f18, $f16, $f6
|
||||
/* 0C3770 7F08EC40 460E7202 */ mul.s $f8, $f14, $f14
|
||||
/* 0C3774 7F08EC44 00000000 */ nop
|
||||
/* 0C3778 7F08EC48 46129282 */ mul.s $f10, $f18, $f18
|
||||
/* 0C377C 7F08EC4C 45010005 */ bc1t .L7F08EC64
|
||||
/* 0C3780 7F08EC50 460A4080 */ add.s $f2, $f8, $f10
|
||||
/* 0C3784 7F08EC54 4600103C */ c.lt.s $f2, $f0
|
||||
/* 0C3788 7F08EC58 00000000 */ nop
|
||||
/* 0C378C 7F08EC5C 45020004 */ bc1fl .L7F08EC70
|
||||
/* 0C3790 7F08EC60 8C850010 */ lw $a1, 0x10($a0)
|
||||
.L7F08EC64:
|
||||
/* 0C3794 7F08EC64 46001006 */ mov.s $f0, $f2
|
||||
/* 0C3798 7F08EC68 00801825 */ move $v1, $a0
|
||||
/* 0C379C 7F08EC6C 8C850010 */ lw $a1, 0x10($a0)
|
||||
.L7F08EC70:
|
||||
/* 0C37A0 7F08EC70 24840010 */ addiu $a0, $a0, 0x10
|
||||
/* 0C37A4 7F08EC74 04A1FFEA */ bgez $a1, .L7F08EC20
|
||||
/* 0C37A8 7F08EC78 00000000 */ nop
|
||||
.L7F08EC7C:
|
||||
/* 0C37AC 7F08EC7C D7B40008 */ ldc1 $f20, 8($sp)
|
||||
/* 0C37B0 7F08EC80 27BD0010 */ addiu $sp, $sp, 0x10
|
||||
/* 0C37B4 7F08EC84 03E00008 */ jr $ra
|
||||
/* 0C37B8 7F08EC88 00601025 */ move $v0, $v1
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
waypoint* sub_GAME_7F08EC8C(coord3d* pos, s32 arg1, waypoint* arg2)
|
||||
{
|
||||
PadRecord* pad;
|
||||
f32 sqrdist2;
|
||||
f32 sqrdist;
|
||||
s32* neighbor;
|
||||
waypoint* node;
|
||||
waypoint* ret;
|
||||
waypoint* waypoints;
|
||||
|
||||
neighbor = arg2->neighbours;
|
||||
ret = arg2;
|
||||
|
||||
if (neighbor != NULL)
|
||||
{
|
||||
pad = &g_CurrentSetup.pads[arg2->padID];
|
||||
sqrdist = ((pos->z - pad->pos.z) * (pos->z - pad->pos.z))
|
||||
+ ((pos->x - pad->pos.x) * (pos->x - pad->pos.x));
|
||||
waypoints = g_CurrentSetup.pathwaypoints;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F08EC8C(void) {
|
||||
while (*neighbor >= 0)
|
||||
{
|
||||
node = &waypoints[*neighbor];
|
||||
pad = &g_CurrentSetup.pads[node->padID];
|
||||
sqrdist2 = ((pos->z - pad->pos.z) * (pos->z - pad->pos.z))
|
||||
+ ((pos->x - pad->pos.x) * (pos->x - pad->pos.x));
|
||||
|
||||
if (sqrdist2 < sqrdist)
|
||||
{
|
||||
sqrdist = sqrdist2;
|
||||
ret = node;
|
||||
}
|
||||
neighbor++;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F08EC8C
|
||||
/* 0C37BC 7F08EC8C AFA50004 */ sw $a1, 4($sp)
|
||||
/* 0C37C0 7F08EC90 8CC20004 */ lw $v0, 4($a2)
|
||||
/* 0C37C4 7F08EC94 00803825 */ move $a3, $a0
|
||||
/* 0C37C8 7F08EC98 00C01825 */ move $v1, $a2
|
||||
/* 0C37CC 7F08EC9C 1040002E */ beqz $v0, .L7F08ED58
|
||||
/* 0C37D0 7F08ECA0 00000000 */ nop
|
||||
/* 0C37D4 7F08ECA4 8CCE0000 */ lw $t6, ($a2)
|
||||
/* 0C37D8 7F08ECA8 240A002C */ li $t2, 44
|
||||
/* 0C37DC 7F08ECAC 3C0B8007 */ lui $t3, %hi(g_CurrentSetup+0)
|
||||
/* 0C37E0 7F08ECB0 01CA0019 */ multu $t6, $t2
|
||||
/* 0C37E4 7F08ECB4 256B5D00 */ addiu $t3, %lo(g_CurrentSetup+0) # addiu $t3, $t3, 0x5d00
|
||||
/* 0C37E8 7F08ECB8 8D650018 */ lw $a1, 0x18($t3)
|
||||
/* 0C37EC 7F08ECBC C4E20008 */ lwc1 $f2, 8($a3)
|
||||
/* 0C37F0 7F08ECC0 C4EE0000 */ lwc1 $f14, ($a3)
|
||||
/* 0C37F4 7F08ECC4 8C490000 */ lw $t1, ($v0)
|
||||
/* 0C37F8 7F08ECC8 8D680000 */ lw $t0, ($t3)
|
||||
/* 0C37FC 7F08ECCC 00007812 */ mflo $t7
|
||||
/* 0C3800 7F08ECD0 01E52021 */ addu $a0, $t7, $a1
|
||||
/* 0C3804 7F08ECD4 C4840008 */ lwc1 $f4, 8($a0)
|
||||
/* 0C3808 7F08ECD8 C4860000 */ lwc1 $f6, ($a0)
|
||||
/* 0C380C 7F08ECDC 46041301 */ sub.s $f12, $f2, $f4
|
||||
/* 0C3810 7F08ECE0 46067401 */ sub.s $f16, $f14, $f6
|
||||
/* 0C3814 7F08ECE4 460C6202 */ mul.s $f8, $f12, $f12
|
||||
/* 0C3818 7F08ECE8 00000000 */ nop
|
||||
/* 0C381C 7F08ECEC 46108282 */ mul.s $f10, $f16, $f16
|
||||
/* 0C3820 7F08ECF0 05200019 */ bltz $t1, .L7F08ED58
|
||||
/* 0C3824 7F08ECF4 460A4000 */ add.s $f0, $f8, $f10
|
||||
/* 0C3828 7F08ECF8 0009C100 */ sll $t8, $t1, 4
|
||||
.L7F08ECFC:
|
||||
/* 0C382C 7F08ECFC 03083021 */ addu $a2, $t8, $t0
|
||||
/* 0C3830 7F08ED00 8CD90000 */ lw $t9, ($a2)
|
||||
/* 0C3834 7F08ED04 032A0019 */ multu $t9, $t2
|
||||
/* 0C3838 7F08ED08 00006012 */ mflo $t4
|
||||
/* 0C383C 7F08ED0C 01852021 */ addu $a0, $t4, $a1
|
||||
/* 0C3840 7F08ED10 C4840008 */ lwc1 $f4, 8($a0)
|
||||
/* 0C3844 7F08ED14 C4860000 */ lwc1 $f6, ($a0)
|
||||
/* 0C3848 7F08ED18 46041301 */ sub.s $f12, $f2, $f4
|
||||
/* 0C384C 7F08ED1C 46067401 */ sub.s $f16, $f14, $f6
|
||||
/* 0C3850 7F08ED20 460C6202 */ mul.s $f8, $f12, $f12
|
||||
/* 0C3854 7F08ED24 00000000 */ nop
|
||||
/* 0C3858 7F08ED28 46108282 */ mul.s $f10, $f16, $f16
|
||||
/* 0C385C 7F08ED2C 460A4480 */ add.s $f18, $f8, $f10
|
||||
/* 0C3860 7F08ED30 4600903C */ c.lt.s $f18, $f0
|
||||
/* 0C3864 7F08ED34 00000000 */ nop
|
||||
/* 0C3868 7F08ED38 45000003 */ bc1f .L7F08ED48
|
||||
/* 0C386C 7F08ED3C 00000000 */ nop
|
||||
/* 0C3870 7F08ED40 46009006 */ mov.s $f0, $f18
|
||||
/* 0C3874 7F08ED44 00C01825 */ move $v1, $a2
|
||||
.L7F08ED48:
|
||||
/* 0C3878 7F08ED48 8C490004 */ lw $t1, 4($v0)
|
||||
/* 0C387C 7F08ED4C 24420004 */ addiu $v0, $v0, 4
|
||||
/* 0C3880 7F08ED50 0523FFEA */ bgezl $t1, .L7F08ECFC
|
||||
/* 0C3884 7F08ED54 0009C100 */ sll $t8, $t1, 4
|
||||
.L7F08ED58:
|
||||
/* 0C3888 7F08ED58 03E00008 */ jr $ra
|
||||
/* 0C388C 7F08ED5C 00601025 */ move $v0, $v1
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
waygroup *sub_GAME_7F08ED60(s32 *groupnums, s32 value)
|
||||
@@ -255,80 +196,35 @@ bool sub_GAME_7F08EF1C(waygroup *from, waygroup *to, waygroup *groups)
|
||||
}
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// unused and similar to waypointFindRoute
|
||||
void sub_GAME_7F08EFA0(void) {
|
||||
s32 sub_GAME_7F08EFA0(waygroup* from, waygroup* to, waygroup** arr, s32 arrlen)
|
||||
{
|
||||
waygroup **arrptr = arr;
|
||||
waygroup *curfrom;
|
||||
s32 i;
|
||||
|
||||
if (arrlen >= 2 && g_CurrentSetup.waypointgroups && sub_GAME_7F08EF1C(from, to, g_CurrentSetup.waypointgroups) != 0)
|
||||
{
|
||||
*arr = from;
|
||||
arrptr++;
|
||||
|
||||
curfrom = from;
|
||||
arrlen += 9999;
|
||||
i = 10001;
|
||||
|
||||
while (i <= to->dist && i < arrlen)
|
||||
{
|
||||
curfrom = sub_GAME_7F08ED60(curfrom->neighbours, i);
|
||||
*arrptr = curfrom;
|
||||
arrptr++;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
*arrptr = NULL;
|
||||
arrptr++;
|
||||
|
||||
return arrptr - arr;
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
glabel sub_GAME_7F08EFA0
|
||||
/* 0C3AD0 7F08EFA0 27BDFFD0 */ addiu $sp, $sp, -0x30
|
||||
/* 0C3AD4 7F08EFA4 AFB40028 */ sw $s4, 0x28($sp)
|
||||
/* 0C3AD8 7F08EFA8 AFB30024 */ sw $s3, 0x24($sp)
|
||||
/* 0C3ADC 7F08EFAC AFB1001C */ sw $s1, 0x1c($sp)
|
||||
/* 0C3AE0 7F08EFB0 28E10002 */ slti $at, $a3, 2
|
||||
/* 0C3AE4 7F08EFB4 00E09825 */ move $s3, $a3
|
||||
/* 0C3AE8 7F08EFB8 00A0A025 */ move $s4, $a1
|
||||
/* 0C3AEC 7F08EFBC AFBF002C */ sw $ra, 0x2c($sp)
|
||||
/* 0C3AF0 7F08EFC0 AFB20020 */ sw $s2, 0x20($sp)
|
||||
/* 0C3AF4 7F08EFC4 AFB00018 */ sw $s0, 0x18($sp)
|
||||
/* 0C3AF8 7F08EFC8 AFA60038 */ sw $a2, 0x38($sp)
|
||||
/* 0C3AFC 7F08EFCC 14200022 */ bnez $at, .L7F08F058
|
||||
/* 0C3B00 7F08EFD0 00C08825 */ move $s1, $a2
|
||||
/* 0C3B04 7F08EFD4 3C068007 */ lui $a2, %hi(g_CurrentSetup+4)
|
||||
/* 0C3B08 7F08EFD8 8CC65D04 */ lw $a2, %lo(g_CurrentSetup+4)($a2)
|
||||
/* 0C3B0C 7F08EFDC 50C0001F */ beql $a2, $zero, .L7F08F05C
|
||||
/* 0C3B10 7F08EFE0 AE200000 */ sw $zero, ($s1)
|
||||
/* 0C3B14 7F08EFE4 0FC23BC7 */ jal sub_GAME_7F08EF1C
|
||||
/* 0C3B18 7F08EFE8 AFA40030 */ sw $a0, 0x30($sp)
|
||||
/* 0C3B1C 7F08EFEC 1040001A */ beqz $v0, .L7F08F058
|
||||
/* 0C3B20 7F08EFF0 8FA40030 */ lw $a0, 0x30($sp)
|
||||
/* 0C3B24 7F08EFF4 8FA20038 */ lw $v0, 0x38($sp)
|
||||
/* 0C3B28 7F08EFF8 00809025 */ move $s2, $a0
|
||||
/* 0C3B2C 7F08EFFC 2673270F */ addiu $s3, $s3, 0x270f
|
||||
/* 0C3B30 7F08F000 AC440000 */ sw $a0, ($v0)
|
||||
/* 0C3B34 7F08F004 8E8E0008 */ lw $t6, 8($s4)
|
||||
/* 0C3B38 7F08F008 24102711 */ li $s0, 10001
|
||||
/* 0C3B3C 7F08F00C 24510004 */ addiu $s1, $v0, 4
|
||||
/* 0C3B40 7F08F010 29C12711 */ slti $at, $t6, 0x2711
|
||||
/* 0C3B44 7F08F014 14200010 */ bnez $at, .L7F08F058
|
||||
/* 0C3B48 7F08F018 2A612712 */ slti $at, $s3, 0x2712
|
||||
/* 0C3B4C 7F08F01C 5420000F */ bnezl $at, .L7F08F05C
|
||||
/* 0C3B50 7F08F020 AE200000 */ sw $zero, ($s1)
|
||||
/* 0C3B54 7F08F024 8E440000 */ lw $a0, ($s2)
|
||||
.L7F08F028:
|
||||
/* 0C3B58 7F08F028 0FC23B58 */ jal sub_GAME_7F08ED60
|
||||
/* 0C3B5C 7F08F02C 02002825 */ move $a1, $s0
|
||||
/* 0C3B60 7F08F030 AE220000 */ sw $v0, ($s1)
|
||||
/* 0C3B64 7F08F034 8E8F0008 */ lw $t7, 8($s4)
|
||||
/* 0C3B68 7F08F038 26100001 */ addiu $s0, $s0, 1
|
||||
/* 0C3B6C 7F08F03C 00409025 */ move $s2, $v0
|
||||
/* 0C3B70 7F08F040 01F0082A */ slt $at, $t7, $s0
|
||||
/* 0C3B74 7F08F044 14200004 */ bnez $at, .L7F08F058
|
||||
/* 0C3B78 7F08F048 26310004 */ addiu $s1, $s1, 4
|
||||
/* 0C3B7C 7F08F04C 0213082A */ slt $at, $s0, $s3
|
||||
/* 0C3B80 7F08F050 5420FFF5 */ bnezl $at, .L7F08F028
|
||||
/* 0C3B84 7F08F054 8E440000 */ lw $a0, ($s2)
|
||||
.L7F08F058:
|
||||
/* 0C3B88 7F08F058 AE200000 */ sw $zero, ($s1)
|
||||
.L7F08F05C:
|
||||
/* 0C3B8C 7F08F05C 8FB80038 */ lw $t8, 0x38($sp)
|
||||
/* 0C3B90 7F08F060 26310004 */ addiu $s1, $s1, 4
|
||||
/* 0C3B94 7F08F064 8FBF002C */ lw $ra, 0x2c($sp)
|
||||
/* 0C3B98 7F08F068 02381023 */ subu $v0, $s1, $t8
|
||||
/* 0C3B9C 7F08F06C 0002C883 */ sra $t9, $v0, 2
|
||||
/* 0C3BA0 7F08F070 8FB1001C */ lw $s1, 0x1c($sp)
|
||||
/* 0C3BA4 7F08F074 8FB40028 */ lw $s4, 0x28($sp)
|
||||
/* 0C3BA8 7F08F078 8FB30024 */ lw $s3, 0x24($sp)
|
||||
/* 0C3BAC 7F08F07C 8FB20020 */ lw $s2, 0x20($sp)
|
||||
/* 0C3BB0 7F08F080 8FB00018 */ lw $s0, 0x18($sp)
|
||||
/* 0C3BB4 7F08F084 27BD0030 */ addiu $sp, $sp, 0x30
|
||||
/* 0C3BB8 7F08F088 03E00008 */ jr $ra
|
||||
/* 0C3BBC 7F08F08C 03201025 */ move $v0, $t9
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
waypoint *findPadWithDistAndSet(s32 *pointnums, s32 arg1, s32 groupnum)
|
||||
|
||||
+3
-3
@@ -45,7 +45,7 @@ void sub_GAME_7F093880(f32 offset_x, f32 offset_y, coord3d* out) {
|
||||
screen_top = getPlayer_c_screentop();
|
||||
coords.y = fogGetCurrentEnvironmentp()->WaterConcavity + (offset_y + screen_top);
|
||||
sub_GAME_7F077EEC(&coords, out, 100.0f);
|
||||
matrix_4x4_rotate_vector_in_place(player_mtxf, out->f);
|
||||
mtx4RotateVecInPlace(player_mtxf, out->f);
|
||||
}
|
||||
|
||||
|
||||
@@ -794,7 +794,7 @@ Gfx *skyRender(Gfx *gdl)
|
||||
s32 i;
|
||||
s32 unused[3];
|
||||
|
||||
matrix_4x4_multiply(currentPlayerGetProjectionMatrixF(), currentPlayerGetMatrix10CC(), &sp3cc);
|
||||
matrix_4x4_multiply(currentPlayerGetProjectionMatrixF(), camGetWorldToScreenMtxf(), &sp3cc);
|
||||
guScaleF(dword_CODE_bss_80079E98.m, 1.0f / scale, 1.0f / scale, 1.0f / scale);
|
||||
matrix_4x4_multiply(&sp3cc, &dword_CODE_bss_80079E98, &sp38c);
|
||||
|
||||
@@ -1275,7 +1275,7 @@ Gfx *skyRender(Gfx *gdl)
|
||||
s32 i;
|
||||
s32 stack[2];
|
||||
|
||||
matrix_4x4_multiply(currentPlayerGetProjectionMatrixF(), currentPlayerGetMatrix10CC(), &sp1ec);
|
||||
matrix_4x4_multiply(currentPlayerGetProjectionMatrixF(), camGetWorldToScreenMtxf(), &sp1ec);
|
||||
guScaleF(dword_CODE_bss_80079E98.m, 1.0f / scale, 1.0f / scale, 1.0f / scale);
|
||||
matrix_4x4_multiply(&sp1ec, &dword_CODE_bss_80079E98, &sp1ac);
|
||||
|
||||
|
||||
+106
-355
@@ -14,19 +14,19 @@
|
||||
#define DEFAULT_HEADDAMP 0.9166f
|
||||
#define DEFAULT_HEADLOOKSUM_VAL 11.990406f
|
||||
#define DEFAULT_VIEWPORT_V_VAL 0x220
|
||||
#define DEFAULT_C_SCREENHEIGHT 272.0f
|
||||
#define DEFAULT_C_SCREENHEIGHT (f32)SCREEN_HEIGHT
|
||||
#define DEFAULT_C_HALFHEIGHT 136.0f
|
||||
#define DEFAULT_SCREENYMAXF 272.0f
|
||||
#define DEFAULT_ASPECT 1.1764706f
|
||||
#define DEFAULT_SCREENYMAXF (f32)SCREEN_HEIGHT
|
||||
#define DEFAULT_ASPECT ASPECT_RATIO
|
||||
#elif defined(VERSION_US) || defined(VERSION_JP)
|
||||
#define DEFAULT_FIELD_3B8_Z 9.999998f
|
||||
#define DEFAULT_HEADDAMP 0.93f
|
||||
#define DEFAULT_HEADLOOKSUM_VAL 14.285716f
|
||||
#define DEFAULT_VIEWPORT_V_VAL 0x1E0
|
||||
#define DEFAULT_C_SCREENHEIGHT 240.0f
|
||||
#define DEFAULT_C_SCREENHEIGHT (f32)SCREEN_HEIGHT
|
||||
#define DEFAULT_C_HALFHEIGHT 120.0f
|
||||
#define DEFAULT_SCREENYMAXF 240.0f
|
||||
#define DEFAULT_ASPECT 1.3333334f
|
||||
#define DEFAULT_SCREENYMAXF (f32)SCREEN_HEIGHT
|
||||
#define DEFAULT_ASPECT ASPECT_RATIO
|
||||
#endif
|
||||
|
||||
//newfile per EU
|
||||
@@ -144,12 +144,12 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->field_84 = 0.0f;
|
||||
g_playerPointers[player_num]->field_88 = 0.0f;
|
||||
g_playerPointers[player_num]->field_8C = 0;
|
||||
g_playerPointers[player_num]->field_90 = 0.0f;
|
||||
g_playerPointers[player_num]->vertical_bounce_adjust = 0.0f;
|
||||
g_playerPointers[player_num]->field_94 = 0;
|
||||
g_playerPointers[player_num]->field_98 = 0.0f;
|
||||
g_playerPointers[player_num]->swaytarget = 0.0f;
|
||||
g_playerPointers[player_num]->field_1278 = 0.0f;
|
||||
g_playerPointers[player_num]->field_127C = 0.0f;
|
||||
g_playerPointers[player_num]->swayoffset0 = 0.0f;
|
||||
g_playerPointers[player_num]->swayoffset2 = 0.0f;
|
||||
g_playerPointers[player_num]->crouchpos = 2;
|
||||
g_playerPointers[player_num]->autocrouchpos = 2;
|
||||
g_playerPointers[player_num]->ducking_height_offset = 0.0f;
|
||||
@@ -178,17 +178,20 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->insightaimmode = 0;
|
||||
g_playerPointers[player_num]->autoyaimenabled = 1;
|
||||
g_playerPointers[player_num]->autoaimy = 0.0f;
|
||||
g_playerPointers[player_num]->autoyaimtime = 0;
|
||||
g_playerPointers[player_num]->autoaim_target_y = NULL;
|
||||
g_playerPointers[player_num]->autoyaimtime60 = -1;
|
||||
g_playerPointers[player_num]->autoxaimenabled = 1;
|
||||
g_playerPointers[player_num]->autoaimx = 0.0f;
|
||||
g_playerPointers[player_num]->autoxaimtime = 0;
|
||||
g_playerPointers[player_num]->autoaim_target_x = NULL;
|
||||
g_playerPointers[player_num]->autoxaimtime60 = -1;
|
||||
g_playerPointers[player_num]->vv_theta = 0.0f;
|
||||
g_playerPointers[player_num]->speedtheta = 0.0f;
|
||||
g_playerPointers[player_num]->vv_costheta = 1.0f;
|
||||
g_playerPointers[player_num]->vv_sintheta = 0.0f;
|
||||
g_playerPointers[player_num]->vv_verta = -4.0f;
|
||||
// @bug
|
||||
// -229.1831 degrees = -4 radians
|
||||
// This doesn't matter, because bondviewApplyVertaTheta overwrites vv_verta360 with the value from vv_verta
|
||||
g_playerPointers[player_num]->vv_verta360 = -229.1831f;
|
||||
g_playerPointers[player_num]->speedverta = 0.0f;
|
||||
g_playerPointers[player_num]->vv_cosverta = 1.0f;
|
||||
@@ -232,7 +235,7 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->step_in_view_watch_animation = 0;
|
||||
g_playerPointers[player_num]->pause_animation_counter = 0.0f;
|
||||
g_playerPointers[player_num]->buttons_pressed = 0;
|
||||
g_playerPointers[player_num]->field_3B6 = 0;
|
||||
g_playerPointers[player_num]->prev_buttons_pressed = 0;
|
||||
g_playerPointers[player_num]->field_3B8.x = 0.0f;
|
||||
g_playerPointers[player_num]->field_3B8.y = 0.0f;
|
||||
g_playerPointers[player_num]->field_3B8.z = DEFAULT_FIELD_3B8_Z;
|
||||
@@ -267,44 +270,44 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->headwalkingtime60 = 0;
|
||||
g_playerPointers[player_num]->headamplitude = 1.0f;
|
||||
g_playerPointers[player_num]->sideamplitude = 1.0f;
|
||||
g_playerPointers[player_num]->headpos[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headpos[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headpos[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook[2] = 1.0f;
|
||||
g_playerPointers[player_num]->headup[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headup[1] = 1.0f;
|
||||
g_playerPointers[player_num]->headup[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum[2] = DEFAULT_HEADLOOKSUM_VAL;
|
||||
g_playerPointers[player_num]->headupsum[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headupsum[1] = DEFAULT_HEADLOOKSUM_VAL;
|
||||
g_playerPointers[player_num]->headupsum[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headpos.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headpos.f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headpos.f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook.f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headlook.f[2] = 1.0f;
|
||||
g_playerPointers[player_num]->headup.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headup.f[1] = 1.0f;
|
||||
g_playerPointers[player_num]->headup.f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum.f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headpossum.f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum.f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headlooksum.f[2] = DEFAULT_HEADLOOKSUM_VAL;
|
||||
g_playerPointers[player_num]->headupsum.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headupsum.f[1] = DEFAULT_HEADLOOKSUM_VAL;
|
||||
g_playerPointers[player_num]->headupsum.f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset.f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset.f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->headbodyoffset.f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->standheight = 0.0f;
|
||||
g_playerPointers[player_num]->standbodyoffset.x = 0.0f;
|
||||
g_playerPointers[player_num]->standbodyoffset.y = 0.0f;
|
||||
g_playerPointers[player_num]->standbodyoffset.z = 0.0f;
|
||||
g_playerPointers[player_num]->standfrac = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0][0] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0][1] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0][2] = 1.0f;
|
||||
g_playerPointers[player_num]->standlook[1][0] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[1][1] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[1][2] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[0][0] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[0][1] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[0][2] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[1][0] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[1][1] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[1][2] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0].f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0].f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[0].f[2] = 1.0f;
|
||||
g_playerPointers[player_num]->standlook[1].f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[1].f[1] = 0.0f;
|
||||
g_playerPointers[player_num]->standlook[1].f[2] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[0].f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[0].f[1] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[0].f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[1].f[0] = 0.0f;
|
||||
g_playerPointers[player_num]->standup[1].f[1] = 1.0f;
|
||||
g_playerPointers[player_num]->standup[1].f[2] = 0.0f;
|
||||
g_playerPointers[player_num]->standcnt = 0;
|
||||
|
||||
for (i = 0; i < 2; i++)
|
||||
@@ -344,12 +347,12 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->field_FD0 = 0;
|
||||
g_playerPointers[player_num]->z_trigger_timer = 0;
|
||||
g_playerPointers[player_num]->field_FD8 = 0;
|
||||
g_playerPointers[player_num]->field_FDC = 0xFF;
|
||||
g_playerPointers[player_num]->field_FDD = 0xFF;
|
||||
g_playerPointers[player_num]->field_FDE = 0xFF;
|
||||
g_playerPointers[player_num]->field_FDF = 0;
|
||||
g_playerPointers[player_num]->tileColor.rgba[0] = 0xFF;
|
||||
g_playerPointers[player_num]->tileColor.rgba[1] = 0xFF;
|
||||
g_playerPointers[player_num]->tileColor.rgba[2] = 0xFF;
|
||||
g_playerPointers[player_num]->tileColor.rgba[3] = 0;
|
||||
g_playerPointers[player_num]->resetshadecol = 1;
|
||||
g_playerPointers[player_num]->field_FE4 = 0;
|
||||
g_playerPointers[player_num]->aimtype = 0;
|
||||
g_playerPointers[player_num]->crosshair_angle.x = 0.0f;
|
||||
g_playerPointers[player_num]->crosshair_angle.y = 0.0f;
|
||||
g_playerPointers[player_num]->crosshair_x_pos = 0.0f;
|
||||
@@ -361,11 +364,11 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->gun_azimuth_turning = 0.0f;
|
||||
g_playerPointers[player_num]->gunaimdamp = 0.9f;
|
||||
g_playerPointers[player_num]->field_1010.x = 0.0f;
|
||||
g_playerPointers[player_num]->field_1010.y = -3.1415927f;
|
||||
g_playerPointers[player_num]->field_1010.y = -M_PI_F;
|
||||
g_playerPointers[player_num]->field_1010.z = 0.0f;
|
||||
g_playerPointers[player_num]->last_z_trigger_timer = 0;
|
||||
g_playerPointers[player_num]->copiedgoldeneye = 0;
|
||||
g_playerPointers[player_num]->ammodispflags = 0;
|
||||
g_playerPointers[player_num]->gunammooff = 0;
|
||||
g_playerPointers[player_num]->gunsync = 0.0f;
|
||||
g_playerPointers[player_num]->syncchange = 0.0f;
|
||||
g_playerPointers[player_num]->synccount = 0.0f;
|
||||
@@ -431,7 +434,7 @@ void initBONDdataforPlayer(s32 player_num)
|
||||
g_playerPointers[player_num]->players_cur_animation = 0;
|
||||
g_playerPointers[player_num]->field_1288 = 0.0f;
|
||||
g_playerPointers[player_num]->bondinvincible = 0;
|
||||
g_playerPointers[player_num]->field_29B8 = 7;
|
||||
g_playerPointers[player_num]->healthDamageType = 7;
|
||||
g_playerPointers[player_num]->field_29BC = 1.0f;
|
||||
g_playerPointers[player_num]->field_29C0 = 0.0f;
|
||||
g_playerPointers[player_num]->mpmenuon = 0;
|
||||
@@ -473,8 +476,7 @@ s32 get_cur_playernum(void) {
|
||||
return player_num;
|
||||
}
|
||||
|
||||
|
||||
s32 sub_GAME_7F09B15C( PropRecord* prop)
|
||||
s32 getPlayerPointerIndex(PropRecord* prop)
|
||||
{
|
||||
s32 i;
|
||||
|
||||
@@ -509,7 +511,7 @@ void set_cur_player_viewport_size(u32 ulx, u32 uly) {
|
||||
}
|
||||
|
||||
void set_cur_player_fovy(f32 fovy) {
|
||||
#ifdef XBLADEBUG
|
||||
#ifdef XBLADEBUG
|
||||
if (g_CurrentPlayer == NULL) {
|
||||
assertPrint_8291E690(".\\ported\\player.cpp",0x26a,"Assertion failed: g_CurrentPlayer");
|
||||
}
|
||||
@@ -536,314 +538,73 @@ f32 get_cur_player_fovy(void) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
|
||||
/* looks vaguely like this, couldn't quite get there */
|
||||
PROP sub_GAME_7F09B244(ITEM_IDS arg0)
|
||||
PROP getPropForHeldItem(ITEM_IDS arg0)
|
||||
{
|
||||
PROP ret = -1;
|
||||
switch (arg0)
|
||||
{
|
||||
case ITEM_KNIFE: return PROP_CHRKNIFE; /* weapon_multi_hunting_knife */
|
||||
case ITEM_WPPK: return PROP_CHRWPPK; /* weapon_multi_pp7 */
|
||||
case ITEM_SKORPION: return PROP_CHRSKORPION; /* weapon_multi_klobb */
|
||||
case ITEM_AK47: return PROP_CHRKALASH; /* weapon_multi_kf7 */
|
||||
case ITEM_UZI: return PROP_CHRUZI; /* weapon_multi_zmg */
|
||||
case ITEM_MP5K: return PROP_CHRMP5K; /* weapon_multi_d5k */
|
||||
case ITEM_SPECTRE: return PROP_CHRSPECTRE; /* weapon_multi_phantom */
|
||||
case ITEM_M16: return PROP_CHRM16; /* weapon_multi_ar33 */
|
||||
case ITEM_FNP90: return PROP_CHRFNP90; /* weapon_multi_rcp90 */
|
||||
case ITEM_SHOTGUN: return PROP_CHRSHOTGUN; /* weapon_multi_shotgun */
|
||||
case ITEM_GRENADELAUNCH: return PROP_CHRGRENADELAUNCH; /* weapon_multi_grenade_laun */
|
||||
case ITEM_GRENADE: return PROP_CHRGRENADE; /* weapon_multi_hand */
|
||||
case ITEM_REMOTEMINE: return PROP_CHRREMOTEMINE; /* weapon_multi_remote */
|
||||
case ITEM_PROXIMITYMINE: return PROP_CHRPROXIMITYMINE; /* weapon_multi_prox */
|
||||
case ITEM_TIMEDMINE: return PROP_CHRTIMEDMINE; /* weapon_multi_timed */
|
||||
case ITEM_RUGER: return PROP_CHRRUGER; /* weapon_multi_cougar */
|
||||
case ITEM_LASER: return PROP_CHRLASER; /* weapon_multi_moonraker */
|
||||
case ITEM_SNIPERRIFLE: return PROP_CHRSNIPERRIFLE; /* weapon_multi_sniper */
|
||||
case ITEM_MP5KSIL: return PROP_CHRMP5KSIL; /* weapon_multi_d5k_silent */
|
||||
case ITEM_TT33: return PROP_CHRTT33; /* weapon_multi_dd44 */
|
||||
case ITEM_WPPKSIL: return PROP_CHRWPPKSIL; /* weapon_multi_pp7_silent */
|
||||
case ITEM_THROWKNIFE: return PROP_CHRTHROWKNIFE; /* weapon_multi_throwing_knife */
|
||||
case ITEM_AUTOSHOT: return PROP_CHRAUTOSHOT; /* weapon_multi_auto_shot */
|
||||
case ITEM_ROCKETLAUNCH: return PROP_CHRROCKETLAUNCH; /* weapon_multi_rocket_launch */
|
||||
case ITEM_GOLDENGUN: return PROP_CHRGOLDEN; /* weapon_multi_goldengun */
|
||||
case ITEM_SILVERWPPK: return PROP_CHRWPPK; /* weapon_multi_pp7_special1 */
|
||||
case ITEM_GOLDWPPK: return PROP_CHRWPPK; /* weapon_multi_pp7_special2 */
|
||||
case ITEM_TOKEN: ret = PROP_FLAG;
|
||||
/* weapon_multi_none */
|
||||
case ITEM_UNARMED:
|
||||
case ITEM_FIST:
|
||||
default:
|
||||
return ret;
|
||||
case ITEM_KNIFE: ret = PROP_CHRKNIFE; break; /* weapon_multi_hunting_knife */
|
||||
case ITEM_WPPK: ret = PROP_CHRWPPK; break; /* weapon_multi_pp7 */
|
||||
case ITEM_SKORPION: ret = PROP_CHRSKORPION; break; /* weapon_multi_klobb */
|
||||
case ITEM_AK47: ret = PROP_CHRKALASH; break; /* weapon_multi_kf7 */
|
||||
case ITEM_UZI: ret = PROP_CHRUZI; break; /* weapon_multi_zmg */
|
||||
case ITEM_MP5K: ret = PROP_CHRMP5K; break; /* weapon_multi_d5k */
|
||||
case ITEM_SPECTRE: ret = PROP_CHRSPECTRE; break; /* weapon_multi_phantom */
|
||||
case ITEM_M16: ret = PROP_CHRM16; break; /* weapon_multi_ar33 */
|
||||
case ITEM_FNP90: ret = PROP_CHRFNP90; break; /* weapon_multi_rcp90 */
|
||||
case ITEM_SHOTGUN: ret = PROP_CHRSHOTGUN; break; /* weapon_multi_shotgun */
|
||||
case ITEM_GRENADELAUNCH: ret = PROP_CHRGRENADELAUNCH; break; /* weapon_multi_grenade_laun */
|
||||
case ITEM_GRENADE: ret = PROP_CHRGRENADE; break; /* weapon_multi_hand */
|
||||
case ITEM_REMOTEMINE: ret = PROP_CHRREMOTEMINE; break; /* weapon_multi_remote */
|
||||
case ITEM_PROXIMITYMINE: ret = PROP_CHRPROXIMITYMINE; break; /* weapon_multi_prox */
|
||||
case ITEM_TIMEDMINE: ret = PROP_CHRTIMEDMINE; break; /* weapon_multi_timed */
|
||||
case ITEM_RUGER: ret = PROP_CHRRUGER; break; /* weapon_multi_cougar */
|
||||
case ITEM_LASER: ret = PROP_CHRLASER; break; /* weapon_multi_moonraker */
|
||||
case ITEM_SNIPERRIFLE: ret = PROP_CHRSNIPERRIFLE; break; /* weapon_multi_sniper */
|
||||
case ITEM_MP5KSIL: ret = PROP_CHRMP5KSIL; break; /* weapon_multi_d5k_silent */
|
||||
case ITEM_TT33: ret = PROP_CHRTT33; break; /* weapon_multi_dd44 */
|
||||
case ITEM_WPPKSIL: ret = PROP_CHRWPPKSIL; break; /* weapon_multi_pp7_silent */
|
||||
case ITEM_THROWKNIFE: ret = PROP_CHRTHROWKNIFE; break; /* weapon_multi_throwing_knife */
|
||||
case ITEM_AUTOSHOT: ret = PROP_CHRAUTOSHOT; break; /* weapon_multi_auto_shot */
|
||||
case ITEM_ROCKETLAUNCH: ret = PROP_CHRROCKETLAUNCH; break; /* weapon_multi_rocket_launch */
|
||||
case ITEM_GOLDENGUN: ret = PROP_CHRGOLDEN; break; /* weapon_multi_goldengun */
|
||||
case ITEM_SILVERWPPK: ret = PROP_CHRWPPK; break; /* weapon_multi_pp7_special1 */
|
||||
case ITEM_GOLDWPPK: ret = PROP_CHRWPPK; break; /* weapon_multi_pp7_special2 */
|
||||
case ITEM_TOKEN: ret = PROP_FLAG; break;
|
||||
case ITEM_UNARMED: break;
|
||||
case ITEM_TASER: break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
/*D:8005762C*/
|
||||
glabel jpt_weapon_multi
|
||||
.word weapon_multi_none
|
||||
.word weapon_multi_none
|
||||
.word weapon_multi_hunting_knife
|
||||
.word weapon_multi_throwing_knife
|
||||
.word weapon_multi_pp7
|
||||
.word weapon_multi_pp7_silent
|
||||
.word weapon_multi_dd44
|
||||
.word weapon_multi_klobb
|
||||
.word weapon_multi_kf7
|
||||
.word weapon_multi_zmg
|
||||
.word weapon_multi_d5k
|
||||
.word weapon_multi_d5k_silent
|
||||
.word weapon_multi_phantom
|
||||
.word weapon_multi_ar33
|
||||
.word weapon_multi_rcp90
|
||||
.word weapon_multi_shotgun
|
||||
.word weapon_multi_auto_shot
|
||||
.word weapon_multi_sniper
|
||||
.word weapon_multi_cougar
|
||||
.word weapon_multi_goldengun
|
||||
.word weapon_multi_pp7_special1
|
||||
.word weapon_multi_pp7_special2
|
||||
.word weapon_multi_moonraker
|
||||
/*.word weapon_multi_none*/
|
||||
/*.word weapon_multi_grenade_laun*/
|
||||
/*.word weapon_multi_rocket_launch*/
|
||||
/*.word weapon_multi_hand*/
|
||||
/*.word weapon_multi_timed*/
|
||||
/*.word weapon_multi_prox*/
|
||||
/*.word weapon_multi_remote*/
|
||||
/*.word weapon_multi_none*/
|
||||
/*.word weapon_multi_none*/
|
||||
|
||||
.text
|
||||
glabel sub_GAME_7F09B244
|
||||
/* 0CFD74 7F09B244 28810020 */ slti $at, $a0, 0x20
|
||||
/* 0CFD78 7F09B248 14200006 */ bnez $at, .L7F09B264
|
||||
/* 0CFD7C 7F09B24C 2403FFFF */ li $v1, -1
|
||||
/* 0CFD80 7F09B250 24010058 */ li $at, 88
|
||||
/* 0CFD84 7F09B254 50810042 */ beql $a0, $at, .L7F09B360
|
||||
/* 0CFD88 7F09B258 2403014D */ li $v1, 333
|
||||
/* 0CFD8C 7F09B25C 03E00008 */ jr $ra
|
||||
/* 0CFD90 7F09B260 00601025 */ move $v0, $v1
|
||||
|
||||
.L7F09B264:
|
||||
/* 0CFD94 7F09B264 2C810020 */ sltiu $at, $a0, 0x20
|
||||
/* 0CFD98 7F09B268 1020003D */ beqz $at, .L7F09B360
|
||||
/* 0CFD9C 7F09B26C 00047080 */ sll $t6, $a0, 2
|
||||
/* 0CFDA0 7F09B270 3C018005 */ lui $at, %hi(jpt_weapon_multi)
|
||||
/* 0CFDA4 7F09B274 002E0821 */ addu $at, $at, $t6
|
||||
/* 0CFDA8 7F09B278 8C2E762C */ lw $t6, %lo(jpt_weapon_multi)($at)
|
||||
/* 0CFDAC 7F09B27C 01C00008 */ jr $t6
|
||||
/* 0CFDB0 7F09B280 00000000 */ nop
|
||||
weapon_multi_hunting_knife:
|
||||
/* 0CFDB4 7F09B284 03E00008 */ jr $ra
|
||||
/* 0CFDB8 7F09B288 240200BA */ li $v0, 186
|
||||
|
||||
weapon_multi_pp7:
|
||||
/* 0CFDBC 7F09B28C 03E00008 */ jr $ra
|
||||
/* 0CFDC0 7F09B290 240200BF */ li $v0, 191
|
||||
|
||||
weapon_multi_klobb:
|
||||
/* 0CFDC4 7F09B294 03E00008 */ jr $ra
|
||||
/* 0CFDC8 7F09B298 240200C1 */ li $v0, 193
|
||||
|
||||
weapon_multi_kf7:
|
||||
/* 0CFDCC 7F09B29C 03E00008 */ jr $ra
|
||||
/* 0CFDD0 7F09B2A0 240200B8 */ li $v0, 184
|
||||
|
||||
weapon_multi_zmg:
|
||||
/* 0CFDD4 7F09B2A4 03E00008 */ jr $ra
|
||||
/* 0CFDD8 7F09B2A8 240200C3 */ li $v0, 195
|
||||
|
||||
weapon_multi_d5k:
|
||||
/* 0CFDDC 7F09B2AC 03E00008 */ jr $ra
|
||||
/* 0CFDE0 7F09B2B0 240200BD */ li $v0, 189
|
||||
|
||||
weapon_multi_phantom:
|
||||
/* 0CFDE4 7F09B2B4 03E00008 */ jr $ra
|
||||
/* 0CFDE8 7F09B2B8 240200C2 */ li $v0, 194
|
||||
|
||||
weapon_multi_ar33:
|
||||
/* 0CFDEC 7F09B2BC 03E00008 */ jr $ra
|
||||
/* 0CFDF0 7F09B2C0 240200BC */ li $v0, 188
|
||||
|
||||
weapon_multi_rcp90:
|
||||
/* 0CFDF4 7F09B2C4 03E00008 */ jr $ra
|
||||
/* 0CFDF8 7F09B2C8 240200C5 */ li $v0, 197
|
||||
|
||||
weapon_multi_shotgun:
|
||||
/* 0CFDFC 7F09B2CC 03E00008 */ jr $ra
|
||||
/* 0CFE00 7F09B2D0 240200C0 */ li $v0, 192
|
||||
|
||||
weapon_multi_grenade_laun:
|
||||
/* 0CFE04 7F09B2D4 03E00008 */ jr $ra
|
||||
/* 0CFE08 7F09B2D8 240200B9 */ li $v0, 185
|
||||
|
||||
weapon_multi_hand:
|
||||
/* 0CFE0C 7F09B2DC 03E00008 */ jr $ra
|
||||
/* 0CFE10 7F09B2E0 240200C4 */ li $v0, 196
|
||||
|
||||
weapon_multi_remote:
|
||||
/* 0CFE14 7F09B2E4 03E00008 */ jr $ra
|
||||
/* 0CFE18 7F09B2E8 240200C7 */ li $v0, 199
|
||||
|
||||
weapon_multi_prox:
|
||||
/* 0CFE1C 7F09B2EC 03E00008 */ jr $ra
|
||||
/* 0CFE20 7F09B2F0 240200C8 */ li $v0, 200
|
||||
|
||||
weapon_multi_timed:
|
||||
/* 0CFE24 7F09B2F4 03E00008 */ jr $ra
|
||||
/* 0CFE28 7F09B2F8 240200C9 */ li $v0, 201
|
||||
|
||||
weapon_multi_cougar:
|
||||
/* 0CFE2C 7F09B2FC 03E00008 */ jr $ra
|
||||
/* 0CFE30 7F09B300 240200BE */ li $v0, 190
|
||||
|
||||
weapon_multi_moonraker:
|
||||
/* 0CFE34 7F09B304 03E00008 */ jr $ra
|
||||
/* 0CFE38 7F09B308 240200BB */ li $v0, 187
|
||||
|
||||
weapon_multi_sniper:
|
||||
/* 0CFE3C 7F09B30C 03E00008 */ jr $ra
|
||||
/* 0CFE40 7F09B310 240200D2 */ li $v0, 210
|
||||
|
||||
weapon_multi_d5k_silent:
|
||||
/* 0CFE44 7F09B314 03E00008 */ jr $ra
|
||||
/* 0CFE48 7F09B318 240200CE */ li $v0, 206
|
||||
|
||||
weapon_multi_dd44:
|
||||
/* 0CFE4C 7F09B31C 03E00008 */ jr $ra
|
||||
/* 0CFE50 7F09B320 240200CD */ li $v0, 205
|
||||
|
||||
weapon_multi_pp7_silent:
|
||||
/* 0CFE54 7F09B324 03E00008 */ jr $ra
|
||||
/* 0CFE58 7F09B328 240200CC */ li $v0, 204
|
||||
|
||||
weapon_multi_throwing_knife:
|
||||
/* 0CFE5C 7F09B32C 03E00008 */ jr $ra
|
||||
/* 0CFE60 7F09B330 240200D1 */ li $v0, 209
|
||||
|
||||
weapon_multi_auto_shot:
|
||||
/* 0CFE64 7F09B334 03E00008 */ jr $ra
|
||||
/* 0CFE68 7F09B338 240200CF */ li $v0, 207
|
||||
|
||||
weapon_multi_rocket_launch:
|
||||
/* 0CFE6C 7F09B33C 03E00008 */ jr $ra
|
||||
/* 0CFE70 7F09B340 240200D3 */ li $v0, 211
|
||||
|
||||
weapon_multi_goldengun:
|
||||
/* 0CFE74 7F09B344 03E00008 */ jr $ra
|
||||
/* 0CFE78 7F09B348 240200D0 */ li $v0, 208
|
||||
|
||||
weapon_multi_pp7_special1:
|
||||
/* 0CFE7C 7F09B34C 03E00008 */ jr $ra
|
||||
/* 0CFE80 7F09B350 240200BF */ li $v0, 191
|
||||
|
||||
weapon_multi_pp7_special2:
|
||||
/* 0CFE84 7F09B354 03E00008 */ jr $ra
|
||||
/* 0CFE88 7F09B358 240200BF */ li $v0, 191
|
||||
|
||||
/* 0CFE8C 7F09B35C 2403014D */ li $v1, 333
|
||||
weapon_multi_none:
|
||||
.L7F09B360:
|
||||
/* 0CFE90 7F09B360 03E00008 */ jr $ra
|
||||
/* 0CFE94 7F09B364 00601025 */ move $v0, $v1
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
void sub_GAME_7F09B368(enum GUNHAND hand)
|
||||
{
|
||||
chrSetWeaponFlag4(g_CurrentPlayer->prop->chr, hand);
|
||||
}
|
||||
|
||||
void sub_GAME_7F09B398(enum GUNHAND hand)
|
||||
{
|
||||
ChrRecord *chr;
|
||||
enum ITEM_IDS wepid;
|
||||
enum PROP prop;
|
||||
s32 flags;
|
||||
|
||||
#ifdef NONMATCHING
|
||||
// NOTE: i think the return value from
|
||||
// something_with_generating_object is supposed
|
||||
// to be returned here?
|
||||
void sub_GAME_7F09B398(GUNHAND hand) {
|
||||
struct ChrRecord* temp_v0;
|
||||
ITEM_IDS weaponNum;
|
||||
s32 weaponIdMaybe;
|
||||
chr = g_CurrentPlayer->prop->chr;
|
||||
|
||||
temp_v0 = g_CurrentPlayer->prop->chr;
|
||||
if (!temp_v0->handle_positiondata[hand]) {
|
||||
weaponNum = getCurrentPlayerWeaponId(hand);
|
||||
weaponIdMaybe = sub_GAME_7F09B244(weaponNum);
|
||||
if (weaponIdMaybe >= 0) {
|
||||
something_with_generating_object(temp_v0, weaponIdMaybe, weaponNum, hand == GUNRIGHT ? 0 : 0x10000000, 0, 0);
|
||||
if (chr->weapons_held[hand] == NULL)
|
||||
{
|
||||
wepid = getCurrentPlayerWeaponId(hand);
|
||||
prop = getPropForHeldItem(wepid);
|
||||
if (prop >= 0)
|
||||
{
|
||||
flags = ((hand * 4) == 0)
|
||||
? 0
|
||||
: PROPFLAG_WEAPON_LEFTHANDED;
|
||||
something_with_generating_object(chr, prop, wepid, flags, NULL, NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.late_rodata
|
||||
/*hack for jtbl*/
|
||||
.word weapon_multi_none
|
||||
.word weapon_multi_grenade_laun
|
||||
.word weapon_multi_rocket_launch
|
||||
.word weapon_multi_hand
|
||||
.word weapon_multi_timed
|
||||
.word weapon_multi_prox
|
||||
.word weapon_multi_remote
|
||||
.word weapon_multi_none
|
||||
.word weapon_multi_none
|
||||
|
||||
.text
|
||||
glabel sub_GAME_7F09B398
|
||||
/* 0CFEC8 7F09B398 3C0E8008 */ lui $t6, %hi(g_CurrentPlayer)
|
||||
/* 0CFECC 7F09B39C 8DCEA0B0 */ lw $t6, %lo(g_CurrentPlayer)($t6)
|
||||
/* 0CFED0 7F09B3A0 27BDFFC8 */ addiu $sp, $sp, -0x38
|
||||
/* 0CFED4 7F09B3A4 AFBF001C */ sw $ra, 0x1c($sp)
|
||||
/* 0CFED8 7F09B3A8 8DCF00A8 */ lw $t7, 0xa8($t6)
|
||||
/* 0CFEDC 7F09B3AC 00041880 */ sll $v1, $a0, 2
|
||||
/* 0CFEE0 7F09B3B0 8DE20004 */ lw $v0, 4($t7)
|
||||
/* 0CFEE4 7F09B3B4 0043C021 */ addu $t8, $v0, $v1
|
||||
/* 0CFEE8 7F09B3B8 8F190160 */ lw $t9, 0x160($t8)
|
||||
/* 0CFEEC 7F09B3BC 57200014 */ bnezl $t9, .L7F09B410
|
||||
/* 0CFEF0 7F09B3C0 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
/* 0CFEF4 7F09B3C4 AFA20034 */ sw $v0, 0x34($sp)
|
||||
/* 0CFEF8 7F09B3C8 0FC17674 */ jal getCurrentPlayerWeaponId
|
||||
/* 0CFEFC 7F09B3CC AFA30024 */ sw $v1, 0x24($sp)
|
||||
/* 0CFF00 7F09B3D0 AFA20030 */ sw $v0, 0x30($sp)
|
||||
/* 0CFF04 7F09B3D4 0FC26C91 */ jal sub_GAME_7F09B244
|
||||
/* 0CFF08 7F09B3D8 00402025 */ move $a0, $v0
|
||||
/* 0CFF0C 7F09B3DC 8FA30024 */ lw $v1, 0x24($sp)
|
||||
/* 0CFF10 7F09B3E0 0440000A */ bltz $v0, .L7F09B40C
|
||||
/* 0CFF14 7F09B3E4 00402825 */ move $a1, $v0
|
||||
/* 0CFF18 7F09B3E8 14600003 */ bnez $v1, .L7F09B3F8
|
||||
/* 0CFF1C 7F09B3EC 8FA40034 */ lw $a0, 0x34($sp)
|
||||
/* 0CFF20 7F09B3F0 10000002 */ b .L7F09B3FC
|
||||
/* 0CFF24 7F09B3F4 00003825 */ move $a3, $zero
|
||||
.L7F09B3F8:
|
||||
/* 0CFF28 7F09B3F8 3C071000 */ lui $a3, 0x1000
|
||||
.L7F09B3FC:
|
||||
/* 0CFF2C 7F09B3FC 8FA60030 */ lw $a2, 0x30($sp)
|
||||
/* 0CFF30 7F09B400 AFA00010 */ sw $zero, 0x10($sp)
|
||||
/* 0CFF34 7F09B404 0FC14885 */ jal something_with_generating_object
|
||||
/* 0CFF38 7F09B408 AFA00014 */ sw $zero, 0x14($sp)
|
||||
.L7F09B40C:
|
||||
/* 0CFF3C 7F09B40C 8FBF001C */ lw $ra, 0x1c($sp)
|
||||
.L7F09B410:
|
||||
/* 0CFF40 7F09B410 27BD0038 */ addiu $sp, $sp, 0x38
|
||||
/* 0CFF44 7F09B414 03E00008 */ jr $ra
|
||||
/* 0CFF48 7F09B418 00000000 */ nop
|
||||
)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void shuffle_player_ids(void) {
|
||||
s32 i;
|
||||
@@ -862,10 +623,6 @@ void shuffle_player_ids(void) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
s32 sub_GAME_7F09B4D8(s32 current_player_num) {
|
||||
s32 i;
|
||||
s32 position = 0;
|
||||
@@ -887,11 +644,6 @@ s32 sub_GAME_7F09B4D8(s32 current_player_num) {
|
||||
return position;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
s32 get_nth_player_from_shuffled(PLAYER_ID id)
|
||||
{
|
||||
s32 i;
|
||||
@@ -907,4 +659,3 @@ s32 get_nth_player_from_shuffled(PLAYER_ID id)
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@
|
||||
s32 getPlayerCount(void);
|
||||
s32 get_cur_playernum(void);
|
||||
void set_cur_player_fovy(f32 fovy);
|
||||
s32 sub_GAME_7F09B15C( PropRecord* prop);
|
||||
s32 getPlayerPointerIndex( PropRecord* prop);
|
||||
void set_cur_player_aspect(f32 aspect);
|
||||
void initBONDdataforPlayer(s32 player_num);
|
||||
s32 sub_GAME_7F09B4D8(s32 current_player_num);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <ultra64.h>
|
||||
|
||||
void sub_GAME_7F007770(void) {
|
||||
void set_favorite_weapon_for_every_player(void) {
|
||||
int right_hand;
|
||||
int left_hand;
|
||||
int player_count;
|
||||
|
||||
+537
-1915
File diff suppressed because it is too large
Load Diff
+4
-7
@@ -51,15 +51,10 @@ Gfx *display_red_blue_on_radar(Gfx *DL)
|
||||
return DL;
|
||||
}
|
||||
g_CurrentPlayer = g_CurrentPlayer;
|
||||
if (g_CurrentPlayer->mpmenuon != 0)
|
||||
if (g_CurrentPlayer->mpmenuon || g_CurrentPlayer->bonddead)
|
||||
{
|
||||
block_4:
|
||||
return DL;
|
||||
}
|
||||
if (g_CurrentPlayer->bonddead != 0)
|
||||
{
|
||||
goto block_4;
|
||||
}
|
||||
if (cheatIsActive(CHEAT_NORADAR) != 0)
|
||||
{
|
||||
return DL;
|
||||
@@ -73,6 +68,7 @@ block_4:
|
||||
phi_s5 = temp_s5;
|
||||
if ((curplayernum & 1) == 0)
|
||||
{
|
||||
// phi_s5 and temp_s5 are the same
|
||||
phi_s5 = temp_s5 + 0xF;
|
||||
}
|
||||
}
|
||||
@@ -118,6 +114,7 @@ block_4:
|
||||
if (playerCount_2 > 0)
|
||||
{
|
||||
phi_s3 = 0;
|
||||
// should be a for loop
|
||||
loop_22:
|
||||
if (phi_s3 != curplayernum)
|
||||
{
|
||||
@@ -129,7 +126,7 @@ loop_22:
|
||||
temp_f20 = temp_v0_4->position.x - temp_v1->position.x;
|
||||
temp_f22 = temp_v0_4->position.z - temp_v1->position.z;
|
||||
temp_f24 = (f32) 0x10;
|
||||
temp_f28 = ((atan2f(temp_f20, temp_f22, temp_a0_2) * 180.0f) / 3.1415927f) + g_CurrentPlayer->vv_theta + 180.0f;
|
||||
temp_f28 = ((atan2f(temp_f20, temp_f22, temp_a0_2) * 180.0f) / M_PI_F) + g_CurrentPlayer->vv_theta + 180.0f;
|
||||
temp_f2 = sqrtf((temp_f20 * temp_f20) + (temp_f22 * temp_f22)) * (16.0f / 4000.0f);
|
||||
if ((scenario == 5) || (scenario == 6) || (scenario == 7) || (scenario == 2) || (scenario == 3))
|
||||
{
|
||||
|
||||
+270
-625
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,10 @@
|
||||
|
||||
#include <ultra64.h>
|
||||
#include "file.h"
|
||||
#include "bondconstants.h"
|
||||
|
||||
#define INDY_RAMROM_DEMO_ADDRESS 0x00F00000
|
||||
#define INDY_RAMROM_DEMO_POINTER ((void*)INDY_RAMROM_DEMO_ADDRESS)
|
||||
|
||||
typedef struct ramromfilestructure {
|
||||
u64 randomseed;
|
||||
@@ -12,8 +15,8 @@ typedef struct ramromfilestructure {
|
||||
enum DIFFICULTY difficulty;
|
||||
u32 size_cmds;
|
||||
save_data savefile;
|
||||
f32 totaltime_ms;
|
||||
u32 filesize;
|
||||
s32 totaltime_ms;
|
||||
s32 filesize;
|
||||
enum GAMEMODE mode;
|
||||
u32 slotnum;
|
||||
u32 numplayers;
|
||||
@@ -28,8 +31,8 @@ typedef struct ramromfilestructure {
|
||||
u32 mp_flags[4];
|
||||
|
||||
} ramromfilestructure;
|
||||
void test_if_recording_demos_this_stage_load(s32 arg0, s32 arg1);
|
||||
s32 iterate_ramrom_entries_handle_camera_out(void);
|
||||
void test_if_recording_demos_this_stage_load(enum LEVELID arg0, enum DIFFICULTY arg1);
|
||||
void iterate_ramrom_entries_handle_camera_out(void);
|
||||
void stop_demo_playback(void);
|
||||
s32 get_is_reamrom_flag(void);
|
||||
u32 check_ramrom_flags(void);
|
||||
|
||||
+1
-1
@@ -208,7 +208,7 @@ extern long long int rspbootTextEnd[];
|
||||
extern long long int gsp3DTextStart[];
|
||||
extern long long int gsp3DDataStart[];
|
||||
|
||||
void rspInitDebugNoticeList(void)
|
||||
void rspInit(void)
|
||||
{
|
||||
debTryAdd(&g_gfxDebugEntryData, "rsp_c_debug");
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ struct GfxInfo_s {
|
||||
u32 unk5C;
|
||||
};
|
||||
|
||||
void rspInitDebugNoticeList(void);
|
||||
void rspInit(void);
|
||||
void rspAllocateBuffers(void);
|
||||
void rspGfxTaskStart(Gfx *firstGdl, Gfx *gdl, s32 arg2, OSMesg rspReplyMsg);
|
||||
|
||||
|
||||
+147
-12
@@ -101,9 +101,144 @@ u8 spec_OUT_port[] =
|
||||
|
||||
|
||||
#ifdef NONMATCHING
|
||||
void sub_GAME_7F0D28E0(void) {
|
||||
|
||||
// https://decomp.me/scratch/lXRos 89.33%
|
||||
|
||||
struct spec_struct {
|
||||
u32 D_8004EC40;
|
||||
s16 D_8004EC44[96];
|
||||
u8 D_8004ED04;
|
||||
u8 D_8004ED05;
|
||||
u8 D_8004ED06;
|
||||
u8 D_8004ED07;
|
||||
};
|
||||
|
||||
extern struct spec_struct D_8004EC40;
|
||||
|
||||
void sub_GAME_7F0D28E0(u8 *arg0, s32 arg1, s32 arg2, u8 *arg3)
|
||||
{
|
||||
s32 var_a1;
|
||||
s32 temp_t1;
|
||||
u8 *var_s0;
|
||||
u8 *var_v0;
|
||||
s32 var_v1;
|
||||
s32 var_a0;
|
||||
s32 var_t0;
|
||||
u8 temp_a3;
|
||||
s32 var_a2;
|
||||
s32 i;
|
||||
|
||||
void* pp;
|
||||
s32 temp_v1;
|
||||
|
||||
|
||||
var_v0 = &arg0[((arg2 << 5) & 0x1800) | ((arg2 << 8) & 0x700) | ((arg2 << 2) & 0xE0) | (arg1 >> 3)];
|
||||
temp_t1 = arg0[((arg2 << 2) & 0x3E0) + (arg1 >> 3) + 0x1800];
|
||||
|
||||
if(*var_v0);
|
||||
|
||||
// problem area: need copy of t1, one for each `if` branch.
|
||||
|
||||
if ((temp_t1 & 0x80) && (D_8004EC40.D_8004ED04 != 0))
|
||||
{
|
||||
var_a0 = (temp_t1 >> 3) & 7;
|
||||
var_v1 = temp_t1 & 7;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_v1 = (temp_t1 >> 3) & 7;
|
||||
var_a0 = temp_t1 & 7;
|
||||
}
|
||||
|
||||
if (!(temp_t1 & 0x40))
|
||||
{
|
||||
var_a0 = (var_a0 + 8) & 0xff;
|
||||
var_v1 = (var_v1 + 8) & 0xff;
|
||||
}
|
||||
|
||||
for (i = 0; i < 8; i++)
|
||||
{
|
||||
temp_a3 = *var_v0;
|
||||
|
||||
if (temp_a3 & 0x80)
|
||||
{
|
||||
var_a2 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a2 = var_v1;
|
||||
}
|
||||
|
||||
if (temp_a3 & 0x40)
|
||||
{
|
||||
var_t0 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_t0 = var_v1;
|
||||
}
|
||||
|
||||
arg3[0] = (s8) (var_t0 | (var_a2 * 0x10));
|
||||
|
||||
if (temp_a3 & 0x20)
|
||||
{
|
||||
var_a2 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a2 = var_v1;
|
||||
}
|
||||
if (temp_a3 & 0x10)
|
||||
{
|
||||
var_t0 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_t0 = var_v1;
|
||||
}
|
||||
arg3[1] = (s8) (var_t0 | (var_a2 * 0x10));
|
||||
|
||||
if (temp_a3 & 8)
|
||||
{
|
||||
var_a2 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a2 = var_v1;
|
||||
}
|
||||
if (temp_a3 & 4)
|
||||
{
|
||||
var_t0 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_t0 = var_v1;
|
||||
}
|
||||
arg3[2] = (s8) (var_t0 | (var_a2 * 0x10));
|
||||
|
||||
if (temp_a3 & 2)
|
||||
{
|
||||
var_a2 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_a2 = var_v1;
|
||||
}
|
||||
if (temp_a3 & 1)
|
||||
{
|
||||
var_t0 = var_a0;
|
||||
}
|
||||
else
|
||||
{
|
||||
var_t0 = var_v1;
|
||||
}
|
||||
arg3[3] = (s8) (var_t0 | (var_a2 * 0x10));
|
||||
|
||||
arg3 += 0x20;
|
||||
var_v0 += 0x100;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
GLOBAL_ASM(
|
||||
.text
|
||||
@@ -836,7 +971,7 @@ glabel init_spectrum_game
|
||||
/* 107BE8 7F0D30B8 2484C114 */ addiu $a0, %lo(aEmDataSpec_rom_seg_rz) # addiu $a0, $a0, -0x3eec
|
||||
/* 107BEC 7F0D30BC 24050001 */ li $a1, 1
|
||||
/* 107BF0 7F0D30C0 24060100 */ li $a2, 256
|
||||
/* 107BF4 7F0D30C4 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 107BF4 7F0D30C4 0FC2F341 */ jal _fileNameLoadToBank
|
||||
/* 107BF8 7F0D30C8 24070004 */ li $a3, 4
|
||||
/* 107BFC 7F0D30CC 3C038009 */ lui $v1, %hi(ptr_sectrum_monitor_data_temp_buf)
|
||||
/* 107C00 7F0D30D0 2463E320 */ addiu $v1, %lo(ptr_sectrum_monitor_data_temp_buf) # addiu $v1, $v1, -0x1ce0
|
||||
@@ -870,7 +1005,7 @@ glabel init_spectrum_game
|
||||
/* 107C68 7F0D3138 8C84ED2C */ lw $a0, %lo(romnames)($a0)
|
||||
/* 107C6C 7F0D313C 24050001 */ li $a1, 1
|
||||
/* 107C70 7F0D3140 24060100 */ li $a2, 256
|
||||
/* 107C74 7F0D3144 0FC2F341 */ jal _load_resource_named_to_membank
|
||||
/* 107C74 7F0D3144 0FC2F341 */ jal _fileNameLoadToBank
|
||||
/* 107C78 7F0D3148 24070004 */ li $a3, 4
|
||||
/* 107C7C 7F0D314C 3C038009 */ lui $v1, %hi(ptr_sectrum_game_data_temp_buf)
|
||||
/* 107C80 7F0D3150 2463E324 */ addiu $v1, %lo(ptr_sectrum_game_data_temp_buf) # addiu $v1, $v1, -0x1cdc
|
||||
@@ -1394,19 +1529,19 @@ void nullsub_50(void) {
|
||||
|
||||
u8 sub_GAME_7F0D37DC(u32 cycles, u8 specA, u8 port, u8 value)
|
||||
{
|
||||
int temp_v0;
|
||||
if (port == 0xFE)
|
||||
{
|
||||
temp_v0 = value & 7;
|
||||
if (temp_v0 != spec_OUT_port[0])
|
||||
int temp_v0;
|
||||
if (port == 0xFE)
|
||||
{
|
||||
spec_OUT_port[0] = temp_v0;
|
||||
temp_v0 = value & 7;
|
||||
if (temp_v0 != spec_OUT_port[0])
|
||||
{
|
||||
spec_OUT_port[0] = temp_v0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
+451
-941
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user