mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Migrate objects off of Object_Original.
This commit is contained in:
+61
-79
@@ -577,82 +577,14 @@ typedef struct Object_60 {
|
||||
|
||||
struct Object;
|
||||
|
||||
typedef struct Object_Original {
|
||||
union {
|
||||
f32 unk0;
|
||||
struct {
|
||||
s8 unk0;
|
||||
s8 unk1;
|
||||
s8 unk2;
|
||||
s8 unk3;
|
||||
} unk0_b;
|
||||
} unk0_a;
|
||||
s32 unk4;
|
||||
u8 pad8[4];
|
||||
union {
|
||||
struct {
|
||||
u8 byteC;
|
||||
u8 byteD;
|
||||
} bytes;
|
||||
s16 half;
|
||||
} unkCD;
|
||||
typedef struct Object_LaserGun {
|
||||
u8 pad0[0xC];
|
||||
s16 unkC;
|
||||
u8 unkE;
|
||||
s8 unkF;
|
||||
u8 unk10;
|
||||
u8 unk11;
|
||||
u8 pad12[6];
|
||||
u8 unk18;
|
||||
u8 pad19[7];
|
||||
u32 unk20;
|
||||
u32 unk24;
|
||||
s16 unk28;
|
||||
s16 unk2A;
|
||||
s32 unk2C;
|
||||
s32 unk30;
|
||||
s16 unk34;
|
||||
s8 unk36;
|
||||
u8 pad37[0x39];
|
||||
u8 unk70;
|
||||
u8 unk71;
|
||||
u8 unk72;
|
||||
u8 unk73;
|
||||
f32 unk74;
|
||||
f32 unk78;
|
||||
f32 unk7C;
|
||||
f32 unk80;
|
||||
u8 pad84[0x30];
|
||||
/* 0xB4 */ f32 throttle;
|
||||
/* 0xB8 */ f32 brake;
|
||||
u8 padBC[0x14];
|
||||
f32 unkD0;
|
||||
u8 padD0[0x24];
|
||||
u32 unkF8;
|
||||
u8 unkFC;
|
||||
u8 padFD[0xB];
|
||||
s32 unk108;
|
||||
u8 pad10C[0xC];
|
||||
s32 unk118;
|
||||
u8 pad11C[0x44];
|
||||
s16 unk160;
|
||||
s16 unk162;
|
||||
s16 unk164;
|
||||
s16 unk166;
|
||||
u8 pad166[0x28];
|
||||
u16 unk190;
|
||||
u8 unk192;
|
||||
u8 unk193;
|
||||
u8 pad194[0x26];
|
||||
u16 unk1BA;
|
||||
u8 pad1BC[0x1A];
|
||||
s8 unk1D6;
|
||||
s8 unk1D7;
|
||||
s8 unk1D8;
|
||||
u8 pad1D9[0x19];
|
||||
u8 unk1F2;
|
||||
u8 unk1F3;
|
||||
u8 pad1F4[3];
|
||||
u8 unk1F7; // Used in func_8002A900
|
||||
} Object_Original;
|
||||
} Object_LaserGun;
|
||||
|
||||
typedef struct Object_Laser {
|
||||
s16 unk0;
|
||||
@@ -685,6 +617,11 @@ typedef struct Object_WeaponBalloon {
|
||||
s8 unk6[0x2];
|
||||
} Object_WeaponBalloon;
|
||||
|
||||
typedef struct Object_Weapon {
|
||||
u8 pad0[0x18];
|
||||
u8 unk18;
|
||||
} Object_Weapon;
|
||||
|
||||
typedef struct Object_Butterfly {
|
||||
/* 0x00 */ Triangle triangles[8];
|
||||
/* 0x80 */ Vertex vertices[12];
|
||||
@@ -870,7 +807,11 @@ typedef struct Object_Racer {
|
||||
/* 0x05C */ f32 prev_x_position;
|
||||
/* 0x060 */ f32 prev_y_position;
|
||||
/* 0x064 */ f32 prev_z_position;
|
||||
/* 0x068 */ u8 pad68[0x24];
|
||||
/* 0x068 */ u8 pad68[0x10];
|
||||
/* 0x078 */ f32 unk78;
|
||||
/* 0x07C */ f32 unk7C;
|
||||
/* 0x080 */ f32 unk80;
|
||||
/* 0x084 */ u8 pad84[0x8];
|
||||
/* 0x08C */ f32 stretch_height;
|
||||
/* 0x090 */ f32 stretch_height_cap;
|
||||
/* 0x094 */ f32 camera_zoom;
|
||||
@@ -881,7 +822,9 @@ typedef struct Object_Racer {
|
||||
/* 0x0AC */ u8 padAC[0x8];
|
||||
/* 0x0B4 */ f32 throttle;
|
||||
/* 0x0B8 */ f32 brake;
|
||||
/* 0x0BC */ u8 padBC[0x4C];
|
||||
/* 0x0BC */ u8 padBC[0x14];
|
||||
/* 0x0D0 */ f32 unkD0;
|
||||
/* 0x0D4 */ u8 padD4[0x34];
|
||||
/* 0x108 */ s32 unk108;
|
||||
/* 0x10C */ u8 pad10C[0xC];
|
||||
/* 0x118 */ s32 unk118;
|
||||
@@ -893,7 +836,12 @@ typedef struct Object_Racer {
|
||||
/* 0x14C */ struct Object *unk14C;
|
||||
/* 0x150 */ u8 pad150[0x4];
|
||||
/* 0x154 */ struct Object *unk154;
|
||||
/* 0x158 */ u8 pad158[0x1A];
|
||||
/* 0x158 */ u8 pad158[0x8];
|
||||
/* 0x160 */ s16 unk160;
|
||||
/* 0x162 */ s16 unk162;
|
||||
/* 0x164 */ s16 unk164;
|
||||
/* 0x166 */ s16 unk166;
|
||||
/* 0x168 */ u8 pad168[0xA];
|
||||
/* 0x172 */ u8 balloon_type;
|
||||
/* 0x173 */ u8 balloon_quantity;
|
||||
/* 0x174 */ u8 balloon_level;
|
||||
@@ -906,11 +854,16 @@ typedef struct Object_Racer {
|
||||
/* 0x188 */ u8 pad188[0x4];
|
||||
/* 0x18C */ s16 unk18C;
|
||||
/* 0x18E */ s16 unk18E;
|
||||
/* 0x190 */ u8 pad190[0x10];
|
||||
/* 0x190 */ u16 unk190;
|
||||
/* 0x192 */ u8 unk192;
|
||||
/* 0x193 */ u8 unk193;
|
||||
/* 0x194 */ u8 pad194[0xC];
|
||||
/* 0x1A0 */ s16 unk1A0;
|
||||
/* 0x1A2 */ s16 unk1A2;
|
||||
/* 0x1A4 */ s16 unk1A4;
|
||||
/* 0x1A6 */ u8 pad1A6[0x23];
|
||||
/* 0x1A6 */ u8 pad1A6[0x14];
|
||||
/* 0x1BA */ u16 unk1BA;
|
||||
/* 0x1BC */ u8 pad1BC[0xD];
|
||||
/* 0x1C9 */ u8 unk1C9;
|
||||
/* 0x1CA */ s8 unk1CA;
|
||||
/* 0x1CB */ u8 pad1CB[0x3];
|
||||
@@ -935,7 +888,8 @@ typedef struct Object_Racer {
|
||||
/* 0x1EF */ u8 boost_sound;
|
||||
/* 0x1F0 */ u8 pad1F0[0x2];
|
||||
/* 0x1F2 */ u8 unk1F2;
|
||||
/* 0x1F3 */ u8 pad1F3[0x2];
|
||||
/* 0x1F3 */ u8 unk1F3;
|
||||
/* 0x1F4 */ u8 pad1F4[0x1];
|
||||
/* 0x1F5 */ u8 unk1F5;
|
||||
/* 0x1F6 */ u8 pad1F6[0x1];
|
||||
/* 0x1F7 */ u8 transparency;
|
||||
@@ -1066,14 +1020,39 @@ typedef struct Object_FogChanger {
|
||||
s16 unk0;
|
||||
} Object_FogChanger;
|
||||
|
||||
typedef struct Object_Taj {
|
||||
f32 unk0;
|
||||
u8 pad4[0x9];
|
||||
u8 unkD;
|
||||
u8 padE[0x1A];
|
||||
s16 unk28;
|
||||
u8 pad2A[0x2];
|
||||
s32 unk2C;
|
||||
u8 pad30[0x4];
|
||||
s16 unk34;
|
||||
s8 unk36;
|
||||
} Object_Taj;
|
||||
|
||||
typedef struct Object_TT {
|
||||
f32 unk0;
|
||||
u8 pad4[0x9];
|
||||
u8 unkD;
|
||||
} Object_TT;
|
||||
|
||||
typedef struct Object_Bridge_WhaleRamp {
|
||||
f32 unk0;
|
||||
s32 unk4;
|
||||
} Object_Bridge_WhaleRamp;
|
||||
|
||||
typedef struct Object_64 {
|
||||
union {
|
||||
Object_Original original;
|
||||
Object_LaserGun laser_gun;
|
||||
Object_Laser laser;
|
||||
Object_TrophyCabinet trophy_cabinet;
|
||||
Object_Animator animator;
|
||||
Object_Animation animation;
|
||||
Object_WeaponBalloon weapon_balloon;
|
||||
Object_Weapon weapon;
|
||||
Object_Butterfly butterfly;
|
||||
Object_EffectBox effect_box;
|
||||
Object_EggCreator egg_creator;
|
||||
@@ -1104,6 +1083,9 @@ typedef struct Object_64 {
|
||||
Object_PosArrow pos_arrow;
|
||||
Object_Banana banana;
|
||||
Object_FogChanger fog_changer;
|
||||
Object_Taj taj;
|
||||
Object_TT tt;
|
||||
Object_Bridge_WhaleRamp bridge_whale_ramp;
|
||||
};
|
||||
} Object_64;
|
||||
|
||||
|
||||
+4
-4
@@ -269,7 +269,7 @@ void func_800A0B74(void) {
|
||||
GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0BD4.s")
|
||||
|
||||
void func_800A0DC0(s32 arg0, Object *arg1, s32 arg2) {
|
||||
Object_64 *temp = arg1->unk64;
|
||||
Object_Racer *temp = &arg1->unk64->racer;
|
||||
|
||||
func_80068508(1);
|
||||
func_800A0EB4(temp, arg2);
|
||||
@@ -285,7 +285,7 @@ void func_800A0DC0(s32 arg0, Object *arg1, s32 arg2) {
|
||||
func_800A4C44(temp, arg2);
|
||||
func_800A3884(arg1, arg2);
|
||||
|
||||
if (D_80127188 != 0 && temp->original.unk1D8 == 0) {
|
||||
if (D_80127188 != 0 && temp->unk1D8 == 0) {
|
||||
func_800A47A0(temp, arg2);
|
||||
}
|
||||
|
||||
@@ -297,8 +297,8 @@ GLOBAL_ASM("asm/non_matchings/game_ui/func_800A0EB4.s")
|
||||
GLOBAL_ASM("asm/non_matchings/game_ui/func_800A1248.s")
|
||||
|
||||
void func_800A1428(s32 arg0, Object *arg1, s32 arg2) {
|
||||
Object_64 *temp = arg1->unk64;
|
||||
if (temp->original.unk1D8 == 0) {
|
||||
Object_Racer *temp = &arg1->unk64->racer;
|
||||
if (temp->unk1D8 == 0) {
|
||||
func_80068508(1);
|
||||
func_800A3CE4(arg0, arg2);
|
||||
func_800A7520(arg1, arg2);
|
||||
|
||||
+29
-29
@@ -337,15 +337,15 @@ GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_fireball_octoweapon.s")
|
||||
#endif
|
||||
|
||||
void obj_init_lasergun(Object *obj, LevelObjectEntry_Lasergun *entry) {
|
||||
Object_64 *obj64;
|
||||
Object_LaserGun *obj64;
|
||||
obj->unk4C->unk14 = 0x22;
|
||||
obj->unk4C->unk11 = 0;
|
||||
obj64 = obj->unk64;
|
||||
obj64->original.unkE = entry->unkA;
|
||||
obj64->original.unkF = entry->unkB;
|
||||
obj64->original.unk10 = entry->unkC;
|
||||
obj64->original.unk11 = entry->unkD;
|
||||
obj64->original.unkCD.half = obj64->original.unkF;
|
||||
obj64 = &obj->unk64->laser_gun;
|
||||
obj64->unkE = entry->unkA;
|
||||
obj64->unkF = entry->unkB;
|
||||
obj64->unk10 = entry->unkC;
|
||||
obj64->unk11 = entry->unkD;
|
||||
obj64->unkC = obj64->unkF;
|
||||
obj->segment.trans.y_rotation = entry->unk8 << 4 << 4; // Not sure about the shift amounts here, but it
|
||||
obj->segment.trans.x_rotation = entry->unk9 << 4 << 4; // just needs to be 2 left shifts that add up to 8.
|
||||
}
|
||||
@@ -965,14 +965,14 @@ void obj_loop_characterflag(Object *obj, UNUSED s32 speed) {
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_032760/func_80036040.s")
|
||||
|
||||
void obj_init_stopwatchman(Object *obj, UNUSED LevelObjectEntry_StopWatchMan *entry) {
|
||||
Object_64 *temp;
|
||||
Object_TT *temp;
|
||||
obj->unk4C->unk14 = 1;
|
||||
obj->unk4C->unk11 = 0;
|
||||
obj->unk4C->unk10 = 0x1E;
|
||||
obj->unk4C->unk12 = 0;
|
||||
temp = obj->unk64;
|
||||
temp->original.unkCD.bytes.byteD = 0xFF;
|
||||
temp->original.unk0_a.unk0 = 0.0f;
|
||||
temp = &obj->unk64->tt;
|
||||
temp->unkD = 0xFF;
|
||||
temp->unk0 = 0.0f;
|
||||
D_8011D4D8 = 0;
|
||||
}
|
||||
|
||||
@@ -1593,18 +1593,18 @@ void obj_loop_dino_whale(Object *obj, s32 speed) {
|
||||
}
|
||||
|
||||
void obj_init_parkwarden(Object *obj, UNUSED LevelObjectEntry_Parkwarden *entry) {
|
||||
Object_64 *temp;
|
||||
Object_Taj *temp;
|
||||
obj->unk4C->unk14 = (u16)1;
|
||||
obj->unk4C->unk11 = (u8)0;
|
||||
obj->unk4C->unk10 = (u8)0x1E;
|
||||
obj->unk4C->unk12 = (u8)0;
|
||||
temp = obj->unk64;
|
||||
temp->original.unkCD.bytes.byteD = 0xFF;
|
||||
temp->original.unk0_a.unk0 = 0.0f;
|
||||
temp->original.unk28 = 0;
|
||||
temp->original.unk2C = 0;
|
||||
temp->original.unk34 = 0;
|
||||
temp->original.unk36 = 0;
|
||||
temp = &obj->unk64->taj;
|
||||
temp->unkD = 0xFF;
|
||||
temp->unk0 = 0.0f;
|
||||
temp->unk28 = 0;
|
||||
temp->unk2C = 0;
|
||||
temp->unk34 = 0;
|
||||
temp->unk36 = 0;
|
||||
D_8011D4D4 = 0;
|
||||
D_8011D4E2 = 0x10F;
|
||||
}
|
||||
@@ -1971,15 +1971,15 @@ void obj_init_trigger(Object *obj, LevelObjectEntry_Trigger *entry) {
|
||||
GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_trigger.s")
|
||||
|
||||
void obj_init_bridge_whaleramp(Object *obj, LevelObjectEntry_Bridge_WhaleRamp *entry) {
|
||||
Object_64 *temp = obj->unk64;
|
||||
Object_Bridge_WhaleRamp *temp = &obj->unk64->bridge_whale_ramp;
|
||||
obj->segment.unk3A = entry->unk8;
|
||||
obj->segment.trans.y_rotation = entry->unk9 << 6 << 4;
|
||||
temp->original.unk0_a.unk0 = obj->segment.trans.y_position;
|
||||
temp->unk0 = obj->segment.trans.y_position;
|
||||
obj->unk4C->unk14 = 0x21;
|
||||
obj->unk4C->unk11 = 2;
|
||||
obj->unk4C->unk10 = 0x14;
|
||||
obj->unk4C->unk12 = 0;
|
||||
temp->original.unk4 = 0;
|
||||
temp->unk4 = 0;
|
||||
if (obj->segment.unk3A >= obj->segment.header->numberOfModelIds) {
|
||||
obj->segment.unk3A = 0;
|
||||
}
|
||||
@@ -2254,8 +2254,8 @@ void obj_init_weapon(Object *obj, UNUSED LevelObjectEntry_Weapon *entry) {
|
||||
}
|
||||
|
||||
void obj_loop_weapon(Object *obj, s32 speed) {
|
||||
Object_64 *obj64 = obj->unk64;
|
||||
switch (obj64->original.unk18) {
|
||||
Object_Weapon *obj64 = &obj->unk64->weapon;
|
||||
switch (obj64->unk18) {
|
||||
case 0:
|
||||
case 1:
|
||||
func_8003E694(obj, speed);
|
||||
@@ -2706,18 +2706,18 @@ GLOBAL_ASM("asm/non_matchings/unknown_032760/obj_loop_frog.s")
|
||||
|
||||
void obj_loop_pigrocketeer(Object *obj, s32 speed) {
|
||||
Object *someObj;
|
||||
Object_64 *obj64;
|
||||
Object_Wizpig2 *obj64;
|
||||
|
||||
func_8001F460(obj, speed, obj);
|
||||
someObj = func_8000BF44(-1);
|
||||
|
||||
if (someObj != NULL) {
|
||||
obj64 = someObj->unk64;
|
||||
obj64 = &someObj->unk64->wizpig2;
|
||||
someObj->unk78 = 0;
|
||||
if (obj64 != 0) {
|
||||
obj64->original.unk72 += speed;
|
||||
obj64->original.unk70 = 2;
|
||||
obj64->original.unk74 = 1.0f;
|
||||
obj64->unk72 += speed;
|
||||
obj64->unk70 = 2;
|
||||
obj64->unk74 = 1.0f;
|
||||
func_8000B750(obj, -1, 2, 1, 1);
|
||||
}
|
||||
}
|
||||
|
||||
+22
-22
@@ -936,7 +936,7 @@ void func_80012D5C(Gfx **dlist, Mtx **mats, VertexList **verts, Object *object)
|
||||
|
||||
void func_80012E28(Object *this) {
|
||||
s32 unused1;
|
||||
Object_64 *sp_20;
|
||||
Object_Racer *sp_20;
|
||||
f32 tmp_f2;
|
||||
f32 sp_1c;
|
||||
f32 tmp_f0;
|
||||
@@ -944,20 +944,20 @@ void func_80012E28(Object *this) {
|
||||
|
||||
if (this->behaviorId == 1) {
|
||||
|
||||
sp_20 = this->unk64;
|
||||
this->segment.trans.y_rotation += sp_20->original.unk160;
|
||||
this->segment.trans.x_rotation += sp_20->original.unk162;
|
||||
this->segment.trans.z_rotation += sp_20->original.unk164;
|
||||
sp_20 = &this->unk64->racer;
|
||||
this->segment.trans.y_rotation += sp_20->unk160;
|
||||
this->segment.trans.x_rotation += sp_20->unk162;
|
||||
this->segment.trans.z_rotation += sp_20->unk164;
|
||||
sp_1c = 0.0f;
|
||||
if (sp_20->original.unk1D7 < 5) {
|
||||
if (sp_20->unk1D7 < 5) {
|
||||
|
||||
sp_1c = func_800707F8(sp_20->original.unk164);
|
||||
sp_1c = func_800707F8(sp_20->unk164);
|
||||
tmp_f2 = sp_1c;
|
||||
tmp_f0 = func_800707F8(sp_20->original.unk162 - sp_20->original.unk166) * tmp_f2;
|
||||
tmp_f0 = func_800707F8(sp_20->unk162 - sp_20->unk166) * tmp_f2;
|
||||
|
||||
tmp_f0 = (tmp_f0 < 0.0f) ? 0.0f : tmp_f0 * tmp_f0;
|
||||
|
||||
temp = (1.0f - tmp_f0) * 24.0f + sp_20->original.unkD0;
|
||||
temp = (1.0f - tmp_f0) * 24.0f + sp_20->unkD0;
|
||||
if(0){}
|
||||
sp_1c = temp;
|
||||
}
|
||||
@@ -968,10 +968,10 @@ void func_80012E28(Object *this) {
|
||||
|
||||
void func_80012F30(Object *arg0) {
|
||||
if (arg0->behaviorId == 1) {
|
||||
Object_64 *object_64 = arg0->unk64;
|
||||
arg0->segment.trans.y_rotation -= object_64->original.unk160;
|
||||
arg0->segment.trans.x_rotation -= object_64->original.unk162;
|
||||
arg0->segment.trans.z_rotation -= object_64->original.unk164;
|
||||
Object_Racer *object_64 = &arg0->unk64->racer;
|
||||
arg0->segment.trans.y_rotation -= object_64->unk160;
|
||||
arg0->segment.trans.x_rotation -= object_64->unk162;
|
||||
arg0->segment.trans.z_rotation -= object_64->unk164;
|
||||
arg0->segment.trans.y_position -= D_8011ADD0;
|
||||
}
|
||||
}
|
||||
@@ -995,9 +995,9 @@ void render_object(Object *this) {
|
||||
|
||||
void func_80013548(Object *arg0) {
|
||||
if ((arg0->segment.trans.unk6 & 0x8000) == 0 && arg0->segment.header->behaviorId == 1) {
|
||||
arg0->segment.trans.x_position -= arg0->unk64->original.unk78;
|
||||
arg0->segment.trans.y_position -= arg0->unk64->original.unk7C;
|
||||
arg0->segment.trans.z_position -= arg0->unk64->original.unk80;
|
||||
arg0->segment.trans.x_position -= arg0->unk64->racer.unk78;
|
||||
arg0->segment.trans.y_position -= arg0->unk64->racer.unk7C;
|
||||
arg0->segment.trans.z_position -= arg0->unk64->racer.unk80;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1432,14 +1432,14 @@ UNUSED void func_800228DC(UNUSED s32 arg0, UNUSED s32 arg1, UNUSED s32 arg2) {
|
||||
}
|
||||
|
||||
void func_800228EC(s32 arg0) {
|
||||
Object_64 *object_64;
|
||||
Object_Racer *object_64;
|
||||
|
||||
D_8011AEF7 = 3;
|
||||
object_64 = get_object_struct(0)->unk64;
|
||||
object_64->original.unk190 = 0;
|
||||
object_64->original.unk192 = 0;
|
||||
object_64->original.unk193 = 0;
|
||||
object_64->original.unk1BA = 0;
|
||||
object_64 = &get_object_struct(0)->unk64->racer;
|
||||
object_64->unk190 = 0;
|
||||
object_64->unk192 = 0;
|
||||
object_64->unk193 = 0;
|
||||
object_64->unk1BA = 0;
|
||||
func_80017E74(arg0);
|
||||
func_8006F388(10);
|
||||
}
|
||||
|
||||
+21
-21
@@ -490,12 +490,12 @@ void func_8005234C(unk8005234C *arg0) {
|
||||
GLOBAL_ASM("asm/non_matchings/racer/func_80052388.s")
|
||||
GLOBAL_ASM("asm/non_matchings/racer/func_8005250C.s")
|
||||
|
||||
void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
|
||||
void func_80052988(Object *arg0, Object_Racer *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7) {
|
||||
arg5 *= arg7;
|
||||
|
||||
if ((D_8011D55C == -1) && (arg2 >= 3)) {
|
||||
arg0->segment.unk3B = 0;
|
||||
arg1->original.unk1F2 = 0;
|
||||
arg1->unk1F2 = 0;
|
||||
} else if (arg0->segment.unk3B == 0) {
|
||||
if (arg6 & 1) {
|
||||
if (arg0->segment.unk18 >= 0x29) {
|
||||
@@ -514,24 +514,24 @@ void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4,
|
||||
} else {
|
||||
arg0->segment.unk3B = arg2;
|
||||
arg0->segment.unk18 = arg3;
|
||||
arg1->original.unk1F3 &= ~0x80;
|
||||
arg1->unk1F3 &= ~0x80;
|
||||
}
|
||||
} else if (arg0->segment.unk3B == arg2) {
|
||||
if (arg6 & 2) {
|
||||
if (arg1->original.unk1F3 & 0x80) {
|
||||
if (arg1->unk1F3 & 0x80) {
|
||||
arg0->segment.unk18 -= arg5;
|
||||
if (arg0->segment.unk18 <= 0) {
|
||||
arg0->segment.unk3B = 0;
|
||||
arg1->original.unk1F2 = 0;
|
||||
arg1->unk1F2 = 0;
|
||||
arg0->segment.unk18 = 0x28;
|
||||
arg1->original.unk1F3 = 0;
|
||||
arg1->unk1F3 = 0;
|
||||
}
|
||||
} else {
|
||||
arg0->segment.unk18 += arg5;
|
||||
if (arg0->segment.unk18 >= arg4) {
|
||||
arg0->segment.unk18 = arg4 - 1;
|
||||
if ((arg6 & 4) == 0) {
|
||||
arg1->original.unk1F3 |= 0x80;
|
||||
arg1->unk1F3 |= 0x80;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -539,9 +539,9 @@ void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4,
|
||||
arg0->segment.unk18 += arg5;
|
||||
if (arg0->segment.unk18 >= arg4) {
|
||||
arg0->segment.unk3B = 0;
|
||||
arg1->original.unk1F2 = 0;
|
||||
arg1->unk1F2 = 0;
|
||||
arg0->segment.unk18 = 0x28;
|
||||
arg1->original.unk1F3 = 0;
|
||||
arg1->unk1F3 = 0;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -593,23 +593,23 @@ void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1) {
|
||||
guMtxXFMF(mf, 0.0f, -1.0f, 0.0f, &arg1->ox, &arg1->oy, &arg1->oz);
|
||||
}
|
||||
|
||||
void func_80053664(Object_64 *arg0) {
|
||||
if (arg0->original.throttle > 0.0) {
|
||||
arg0->original.throttle -= 0.1;
|
||||
void func_80053664(Object_Racer *arg0) {
|
||||
if (arg0->throttle > 0.0) {
|
||||
arg0->throttle -= 0.1;
|
||||
}
|
||||
|
||||
if (D_8011D528 & 0x8000) {
|
||||
arg0->original.throttle = 1.0f;
|
||||
arg0->throttle = 1.0f;
|
||||
}
|
||||
|
||||
if (D_8011D528 & 0x4000) {
|
||||
if (arg0->original.brake < 1.0) {
|
||||
arg0->original.brake += 0.2;
|
||||
if (arg0->brake < 1.0) {
|
||||
arg0->brake += 0.2;
|
||||
}
|
||||
} else {
|
||||
//! @bug Will cause a negative brake value resulting in higher velocity
|
||||
if (arg0->original.brake > 0.05) {
|
||||
arg0->original.brake -= 0.1;
|
||||
if (arg0->brake > 0.05) {
|
||||
arg0->brake -= 0.1;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -622,13 +622,13 @@ GLOBAL_ASM("asm/non_matchings/racer/func_80054FD0.s")
|
||||
GLOBAL_ASM("asm/non_matchings/racer/func_80055A84.s")
|
||||
GLOBAL_ASM("asm/non_matchings/racer/func_80055EC0.s")
|
||||
|
||||
void play_char_horn_sound(Object *obj, Object_64 *obj64) {
|
||||
void play_char_horn_sound(Object *obj, Object_Racer *obj64) {
|
||||
if (get_filtered_cheats() & CHEAT_HORN_CHEAT) {
|
||||
// Play character voice instead of horn.
|
||||
func_800570B8(obj, 0x162, 8, 0x82);
|
||||
} else {
|
||||
// Play character's horn sound
|
||||
func_80057048(obj, obj64->original.unk0_a.unk0_b.unk3 + 0x156);
|
||||
func_80057048(obj, obj64->characterId + 0x156);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -636,8 +636,8 @@ GLOBAL_ASM("asm/non_matchings/racer/func_8005698C.s")
|
||||
GLOBAL_ASM("asm/non_matchings/racer/func_80056E2C.s")
|
||||
|
||||
void func_80057048(Object *obj, s32 arg1) {
|
||||
Object_64 *obj64 = obj->unk64;
|
||||
if (D_8011D55C != -1 && obj64->original.unk108 == 0) {
|
||||
Object_Racer *obj64 = &obj->unk64->racer;
|
||||
if (D_8011D55C != -1 && obj64->unk108 == 0) {
|
||||
func_80001EA8(arg1, obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -129,11 +129,11 @@ void func_8004F77C(unk8004F77C *arg0);
|
||||
s32 func_80052188(void);
|
||||
void func_800521B8(s32 arg0);
|
||||
void func_8005234C(unk8005234C *arg0);
|
||||
void func_80052988(Object *arg0, Object_64 *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7);
|
||||
void func_80052988(Object *arg0, Object_Racer *arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5, s32 arg6, s32 arg7);
|
||||
void func_80053478(Object_Racer *obj);
|
||||
void func_800535C4(unk800535C4 *arg0, unk800535C4_2 *arg1);
|
||||
void func_80053664(Object_64 *arg0);
|
||||
void play_char_horn_sound(Object *obj, Object_64 *obj64);
|
||||
void func_80053664(Object_Racer *arg0);
|
||||
void play_char_horn_sound(Object *obj, Object_Racer *obj64);
|
||||
void func_80057048(Object *obj, s32 arg1);
|
||||
void func_800570A4(Object *obj, s32 arg1, s32 arg2);
|
||||
void func_800575EC(Object *obj, Object_Racer *obj64);
|
||||
|
||||
Reference in New Issue
Block a user