mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
Clean up particles a bit (#391)
* Update object_functions.c * step 1 * stage 2 * stage 3 * Update particles.h * stage 3 * Update particles.h * Update particles.h * gave preliminary names to things that have obvious looking properties * rename camera strusct cars * last minute changes
This commit is contained in:
+38
-25
@@ -1515,40 +1515,41 @@ typedef struct ParticleBehavior {
|
||||
f32 unk3C;
|
||||
s16 unk40;
|
||||
s16 unk42;
|
||||
s16 unk44;
|
||||
s16 unk46;
|
||||
s16 unk48;
|
||||
// These names are pretty bad, but they're better than nothing.
|
||||
s16 angleVelY;
|
||||
s16 angleVelX;
|
||||
s16 angleVelZ;
|
||||
s16 unk4A;
|
||||
s16 unk4C;
|
||||
s16 unk4E;
|
||||
f32 unk50;
|
||||
f32 unk54;
|
||||
f32 unk58;
|
||||
f32 forwardVel;
|
||||
s32 unk5C;
|
||||
s32 unk60;
|
||||
s16 unk64;
|
||||
s16 unk66;
|
||||
s16 unk68;
|
||||
s16 unk6A;
|
||||
s16 unk6C;
|
||||
s16 unk6E;
|
||||
s32 unk70;
|
||||
s32 unk74;
|
||||
s32 unk78;
|
||||
s32 unk7C;
|
||||
s16 unk80;
|
||||
s16 unk82;
|
||||
s16 unk84;
|
||||
s32 gravityRange1;
|
||||
s16 angleRangeY1;
|
||||
s16 angleRangeX1;
|
||||
s16 angleRangeZ1;
|
||||
s16 angleRangeY2;
|
||||
s16 angleRangeX2;
|
||||
s16 angleRangeZ2;
|
||||
s32 gravityRange2;
|
||||
s32 velocityRangeX1;
|
||||
s32 velocityRangeY1;
|
||||
s32 velocityRangeZ1;
|
||||
s16 angleRangeY3;
|
||||
s16 angleRangeX3;
|
||||
s16 angleRangeZ3;
|
||||
s16 unk86;
|
||||
s16 unk88;
|
||||
s16 unk8A;
|
||||
s32 unk8C;
|
||||
s32 unk90;
|
||||
s32 unk94;
|
||||
u8 unk98;
|
||||
u8 unk99;
|
||||
u8 unk9A;
|
||||
u8 unk9B;
|
||||
s32 unk8C; // Something to do with scale
|
||||
s32 unk90; // Something to do with scale
|
||||
s32 velocityRange;
|
||||
u8 colourRangeR;
|
||||
u8 colourRangeG;
|
||||
u8 colourRangeB;
|
||||
u8 colourRangeA;
|
||||
s32 *unk9C;
|
||||
} ParticleBehavior;
|
||||
|
||||
@@ -1607,6 +1608,16 @@ typedef struct SegmentPropertiesObject {
|
||||
/* 0x003B */ s8 animationID;
|
||||
} SegmentPropertiesObject;
|
||||
|
||||
typedef struct SegmentPropertiesParticle {
|
||||
/* 0x002C */ s16 unk2C;
|
||||
/* 0x002E */ s16 unk2E;
|
||||
/* 0x0030 */ f32 unk30;
|
||||
/* 0x0034 */ f32 unk34;
|
||||
/* 0x0038 */ u8 unk38;
|
||||
/* 0x0039 */ u8 unk39;
|
||||
/* 0x003A */ s16 unk3A;
|
||||
} SegmentPropertiesParticle;
|
||||
|
||||
typedef struct SegmentPropertiesCamera {
|
||||
/* 0x002C */ f32 unk2C;
|
||||
/* 0x0030 */ f32 distanceToCamera;
|
||||
@@ -1626,6 +1637,7 @@ typedef struct ObjectSegment {
|
||||
/* 0x0028 */ f32 unk28;
|
||||
union {
|
||||
SegmentPropertiesObject object;
|
||||
SegmentPropertiesParticle particle;
|
||||
SegmentPropertiesCamera camera;
|
||||
};
|
||||
/* 0x003C */ LevelObjectEntry* level_entry;
|
||||
@@ -1641,6 +1653,7 @@ typedef struct unk800B0698_44 {
|
||||
union {
|
||||
unk800B0698_44_0 *unk0Ptr;
|
||||
s16 unk0;
|
||||
struct unk800B0698_44_0 unk0struct;
|
||||
};
|
||||
} unk800B0698_44;
|
||||
|
||||
|
||||
@@ -2538,7 +2538,7 @@ void obj_loop_parkwarden(Object *obj, s32 updateRate) {
|
||||
if (obj->segment.object.opacity < (255 - var_a2)) {
|
||||
obj->segment.object.opacity += var_a2;
|
||||
} else {
|
||||
obj->segment.object.opacity = 0xFF;
|
||||
obj->segment.object.opacity = 255;
|
||||
obj->properties.npc.action = TAJ_MODE_APPROACH_PLAYER;
|
||||
}
|
||||
break;
|
||||
@@ -2606,17 +2606,17 @@ void obj_loop_parkwarden(Object *obj, s32 updateRate) {
|
||||
taj->animFrameF = 0.0f;
|
||||
}
|
||||
var_a2 = updateRate * 4;
|
||||
if (obj->segment.object.opacity < (0xFF - var_a2)) {
|
||||
if (obj->segment.object.opacity < (255 - var_a2)) {
|
||||
obj->segment.object.opacity += var_a2;
|
||||
} else {
|
||||
obj->segment.object.opacity = 0xFF;
|
||||
obj->segment.object.opacity = 255;
|
||||
obj->properties.npc.action = TAJ_MODE_ROAM;
|
||||
}
|
||||
break;
|
||||
case TAJ_MODE_RACE:
|
||||
obj->interactObj->flags = INTERACT_FLAGS_NONE;
|
||||
obj->segment.object.animationID = 6;
|
||||
obj->segment.object.opacity = 0xFF;
|
||||
obj->segment.object.opacity = 255;
|
||||
taj->animFrameF += updateRateF * 1.0;
|
||||
break;
|
||||
default:
|
||||
@@ -5195,7 +5195,7 @@ void obj_loop_levelname(Object *obj, s32 updateRate) {
|
||||
}
|
||||
assign_dialogue_box_id(4);
|
||||
set_current_dialogue_box_coords(4, x1, y1, x2, y2);
|
||||
set_current_dialogue_background_colour(4, 128, 64, 128, (properties->opacity * SCREEN_WIDTH_HALF) >> 8);
|
||||
set_current_dialogue_background_colour(4, 128, 64, 128, (properties->opacity * 160) >> 8);
|
||||
set_current_text_background_colour(4, 0, 0, 0, 0);
|
||||
set_dialogue_font(4, FONT_COLOURFUL);
|
||||
set_current_text_colour(4, 255, 255, 255, 0, (properties->opacity * 255) >> 8);
|
||||
|
||||
+3
-3
@@ -1051,8 +1051,8 @@ void func_80010994(s32 updateRate) {
|
||||
for (i = D_8011AE60; i < tempVal; i++) {
|
||||
obj = gObjPtrList[i];
|
||||
if (obj->segment.trans.flags & 0x8000) {
|
||||
//Why is this object being treated as a Particle2?
|
||||
func_800B22FC((Particle2 *) obj, updateRate);
|
||||
//Why is this object being treated as a Particle?
|
||||
func_800B22FC((Particle *) obj, updateRate);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1961,7 +1961,7 @@ GLOBAL_ASM("asm/non_matchings/objects/func_80012F94.s")
|
||||
void render_object(Object *this) {
|
||||
func_80012F94(this);
|
||||
if (this->segment.trans.flags & OBJ_FLAGS_DEACTIVATED) {
|
||||
func_800B3740(this, &gObjectCurrDisplayList, &gObjectCurrMatrix, &gObjectCurrVertexList, 0x8000);
|
||||
func_800B3740((Particle *) this, &gObjectCurrDisplayList, &gObjectCurrMatrix, &gObjectCurrVertexList, 0x8000);
|
||||
} else {
|
||||
if (this->segment.header->modelType == OBJECT_MODEL_TYPE_3D_MODEL)
|
||||
render_3d_model(this);
|
||||
|
||||
+369
-369
File diff suppressed because it is too large
Load Diff
+65
-198
@@ -16,11 +16,8 @@ typedef struct unk800E2CF0 {
|
||||
u8 unkC;
|
||||
u8 unkD;
|
||||
s16 unkE;
|
||||
f32 unk10;
|
||||
u8 unk14;
|
||||
u8 unk15;
|
||||
u8 unk16;
|
||||
u8 unk17;
|
||||
f32 scale;
|
||||
ColourRGBA colour;
|
||||
} unk800E2CF0;
|
||||
|
||||
/* Size: 0x10 bytes */
|
||||
@@ -40,19 +37,6 @@ typedef struct XYStruct {
|
||||
s16 x, y;
|
||||
} XYStruct;
|
||||
|
||||
typedef struct unk800B03C0_arg2 {
|
||||
u8 pad0[0xC];
|
||||
s16 y_rotation;
|
||||
s16 x_rotation;
|
||||
s16 z_rotation;
|
||||
s16 unk12;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
s16 unk1C;
|
||||
} unk800B03C0_arg2;
|
||||
|
||||
typedef struct unk800B2260_C_44 {
|
||||
TextureHeader *texture;
|
||||
} unk800B2260_C_44;
|
||||
@@ -67,54 +51,6 @@ typedef struct unk800B1CB8_44 {
|
||||
unk800B1CB8_44_8 **unk8;
|
||||
} unk800B1CB8_44;
|
||||
|
||||
typedef struct unk800B1CB8 {
|
||||
s16 unk0;
|
||||
s16 unk2;
|
||||
s16 unk4;
|
||||
s16 unk6;
|
||||
f32 unk8;
|
||||
u8 padC[0xC];
|
||||
s16 unk18;
|
||||
s16 unk1A;
|
||||
f32 unk1C;
|
||||
f32 unk20;
|
||||
f32 unk24;
|
||||
f32 unk28;
|
||||
s16 unk2C;
|
||||
s16 unk2E;
|
||||
u8 pad30[0x4];
|
||||
f32 unk34;
|
||||
u8 unk38;
|
||||
u8 unk39;
|
||||
s16 unk3A;
|
||||
struct unk800B1CB8 *unk3C;
|
||||
s32 unk40;
|
||||
struct unk800B1CB8_44 *unk44;
|
||||
s16 unk48;
|
||||
s16 unk4A;
|
||||
u8 pad4C[0x8];
|
||||
f32 *unk54;
|
||||
f32 unk58;
|
||||
s16 unk5C;
|
||||
s16 unk5E;
|
||||
s16 unk60;
|
||||
s16 unk62;
|
||||
s16 unk64;
|
||||
s16 unk66;
|
||||
f32 unk68;
|
||||
ColourRGBA unk6C;
|
||||
} unk800B1CB8;
|
||||
|
||||
/* Size: 0x78 bytes */
|
||||
typedef struct unk800E2CD8 {
|
||||
unk800B1CB8 unk0;
|
||||
struct Particle *unk70;
|
||||
u8 pad74;
|
||||
u8 unk75;
|
||||
u8 unk76;
|
||||
u8 unk77;
|
||||
} unk800E2CD8;
|
||||
|
||||
typedef struct unk800B1130_8 {
|
||||
u8 pad0[6];
|
||||
s16 unk6;
|
||||
@@ -135,7 +71,16 @@ typedef struct unk800B1130_SP28 {
|
||||
u8 a;
|
||||
} unk800B1130_SP28;
|
||||
|
||||
typedef struct Particle {
|
||||
typedef struct ParticleAngle {
|
||||
s16 y_rotation;
|
||||
s16 x_rotation;
|
||||
s16 z_rotation;
|
||||
s16 unk12;
|
||||
s16 unk14;
|
||||
s16 unk16;
|
||||
} ParticleAngle;
|
||||
|
||||
typedef struct ParticleData {
|
||||
union {
|
||||
/* 0x0000 */ ParticleBehavior *behaviour;
|
||||
/* 0x0000 */ s32 unk0;
|
||||
@@ -147,76 +92,21 @@ typedef struct Particle {
|
||||
/* 0x000A */ s16 unkA;
|
||||
union {
|
||||
/* 0x000C */ Vec3f pos;
|
||||
/* 0x000C */ ParticleAngle angle;
|
||||
/* 0x000C */ unk800AF29C_C unkC;
|
||||
/* 0x000C */ struct Particle2 **unkC_60;
|
||||
/* 0x000C */ struct Particle **unkC_60;
|
||||
/* 0x000C */ unk800AF29C_C_400 unkC_400;
|
||||
};
|
||||
/* 0x0018 */ s16 unk18;
|
||||
/* 0x0018 */ s16 unk1A;
|
||||
/* 0x001C */ s16 unk1C;
|
||||
/* 0x001E */ s16 unk1E;
|
||||
/* 0x0020 */ s16 unk20;
|
||||
/* 0x0022 */ s16 unk22;
|
||||
/* 0x0024 */ s16 unk24;
|
||||
/* 0x0026 */ s16 unk26;
|
||||
/* 0x0028 */ s16 unk28;
|
||||
/* 0x002A */ s16 unk2A;
|
||||
/* 0x0020 */ s32 unk20;
|
||||
/* 0x0024 */ s32 unk24;
|
||||
/* 0x0028 */ s32 unk28;
|
||||
/* 0x002C */ s16 unk2C;
|
||||
/* 0x002E */ s16 unk2E;
|
||||
/* 0x0030 */ f32 unk30;
|
||||
/* 0x0034 */ f32 unk34;
|
||||
union {
|
||||
struct {
|
||||
/* 0x0038 */ u8 unk38;
|
||||
/* 0x0039 */ u8 unk39;
|
||||
/* 0x003A */ s8 unk3A;
|
||||
/* 0x003B */ s8 unk3B;
|
||||
} byte;
|
||||
struct {
|
||||
/* 0x0038 */ s16 unk38;
|
||||
/* 0x003A */ s16 unk3A;
|
||||
} half;
|
||||
f32 unk38_f32;
|
||||
} unk38;
|
||||
/* 0x003C */ f32 unk3C;
|
||||
/* 0x0040 */ s32 unk40;
|
||||
|
||||
union {
|
||||
/* 0x0044 */ unk800B0698_44 *unk44;
|
||||
/* 0x0044 */ TextureHeader *unk44_0;
|
||||
};
|
||||
/* 0x0048 */ s16 behaviorId;
|
||||
/* 0x004A */ s16 unk4A;
|
||||
/* 0x004C */ f32 unk4C_f32;
|
||||
/* 0x0050 */ f32 unk50_f32;
|
||||
/* 0x0054 */ f32 unk54_f32;
|
||||
/* 0x0058 */ f32 unk58_f32;
|
||||
union {
|
||||
struct {
|
||||
/* 0x005C */ s16 unk5C;
|
||||
/* 0x005E */ s16 unk5E;
|
||||
} unk5C_halfs;
|
||||
/* 0x005C */ s32 unk5C_s32;
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
/* 0x0060 */ s16 unk60;
|
||||
/* 0x0062 */ s16 unk62;
|
||||
} unk60_halfs;
|
||||
/* 0x0060 */ s32 unk60_s32;
|
||||
};
|
||||
/* 0x0064 */ s16 unk64;
|
||||
/* 0x0066 */ s16 unk66;
|
||||
union {
|
||||
/* 0x0068 */ Object_68 **gfxData;
|
||||
struct {
|
||||
/* 0x0068 */ s16 unk68;
|
||||
/* 0x006A */ s16 unk6A;
|
||||
} unk68_halfs;
|
||||
};
|
||||
/* 0x006C */ s16 unk6C;
|
||||
/* 0x006E */ s16 unk6E;
|
||||
} Particle;
|
||||
} ParticleData;
|
||||
|
||||
typedef struct ParticleSegment {
|
||||
/* 0x0000 */ ObjectTransform trans;
|
||||
@@ -226,82 +116,59 @@ typedef struct ParticleSegment {
|
||||
/* 0x0020 */ f32 y_velocity;
|
||||
/* 0x0024 */ f32 z_velocity;
|
||||
/* 0x0028 */ f32 unk28;
|
||||
/* 0x002C */ s16 unk2C;
|
||||
/* 0x002E */ s16 unk2E;
|
||||
/* 0x0030 */ f32 unk30;
|
||||
|
||||
union {
|
||||
/* 0x0034 */ f32 unk34;
|
||||
struct {
|
||||
/* 0x0034 */ s16 levelSegmentIndex;
|
||||
/* 0x0036 */ s16 unk36;
|
||||
};
|
||||
} unk34_a;
|
||||
|
||||
union {
|
||||
struct {
|
||||
/* 0x0038 */ u8 unk38;
|
||||
/* 0x0039 */ u8 unk39;
|
||||
/* 0x003A */ s8 unk3A; // Index value for unk68 array
|
||||
/* 0x003B */ s8 unk3B;
|
||||
} byte;
|
||||
struct {
|
||||
/* 0x0038 */ s16 unk38;
|
||||
/* 0x003A */ s16 unk3A;
|
||||
} half;
|
||||
} unk38;
|
||||
|
||||
union {
|
||||
/* 0x003C */ void *unk3C_ptr;
|
||||
/* 0x003C */ f32 unk3C_f;
|
||||
} unk3C_a;
|
||||
SegmentPropertiesObject object;
|
||||
SegmentPropertiesParticle particle;
|
||||
SegmentPropertiesCamera camera;
|
||||
};
|
||||
/* 0x003C */ void *unk3C;
|
||||
/* 0x0040 */ s32 unk40;
|
||||
} ParticleSegment;
|
||||
|
||||
typedef struct Particle2 {
|
||||
typedef struct Particle {
|
||||
union {
|
||||
/* 0x0000 */ ParticleSegment segment;
|
||||
/* 0x0000 */ ParticleData data;
|
||||
};
|
||||
union {
|
||||
/* 0x0044 */ unk800B0698_44 *unk44;
|
||||
/* 0x0044 */ TextureHeader *unk44_0;
|
||||
/* 0x0044 */ unk800B2260_C_44 *unk44_1;
|
||||
/* 0x0044 */ struct unk800B1CB8_44 *unk44_2;
|
||||
};
|
||||
/* 0x0048 */ s16 behaviorId;
|
||||
/* 0x004A */ s16 unk4A;
|
||||
/* 0x004C */ f32 unk4C_f32;
|
||||
/* 0x0050 */ f32 unk50_f32;
|
||||
/* 0x0054 */ f32 unk54_f32;
|
||||
/* 0x0058 */ f32 unk58_f32;
|
||||
/* 0x004C */ f32 somePosX;
|
||||
/* 0x0050 */ f32 somePosY;
|
||||
union {
|
||||
struct {
|
||||
/* 0x0054 */ f32 somePosZ;
|
||||
/* 0x0054 */ f32 *unk54_ptr;
|
||||
};
|
||||
/* 0x0058 */ f32 forwardVel;
|
||||
/* 0x005C */ s16 unk5C;
|
||||
/* 0x005E */ s16 unk5E;
|
||||
} unk5C_halfs;
|
||||
/* 0x005C */ s32 unk5C_s32;
|
||||
};
|
||||
union {
|
||||
struct {
|
||||
/* 0x0060 */ s16 unk60;
|
||||
/* 0x0062 */ s16 unk62;
|
||||
} unk60_halfs;
|
||||
/* 0x0060 */ s32 unk60_s32;
|
||||
};
|
||||
/* 0x0064 */ s16 unk64;
|
||||
/* 0x0066 */ s16 unk66;
|
||||
union {
|
||||
/* 0x0068 */ Object_68 **gfxData;
|
||||
struct {
|
||||
/* 0x0068 */ s16 unk68;
|
||||
/* 0x006A */ s16 unk6A;
|
||||
} unk68_halfs;
|
||||
/* 0x0068 */ u8 unk68b;
|
||||
/* 0x0068 */ f32 unk68f;
|
||||
};
|
||||
/* 0x006C */ s16 unk6C;
|
||||
/* 0x006E */ s16 unk6E;
|
||||
/* 0x006C */ ColourRGBA colour;
|
||||
/* 0x0070 */ struct Particle *unk70;
|
||||
/* 0x0074 */ u8 unk74;
|
||||
/* 0x0075 */ u8 unk75;
|
||||
/* 0x0076 */ u8 unk76;
|
||||
/* 0x0077 */ u8 unk77;
|
||||
} Particle2;
|
||||
/* 0x0077 */ s8 unk77;
|
||||
} Particle;
|
||||
|
||||
// Almost an identical copy of Particle, but a few bytes shorter. Exists to make sure func_800B1CB8 matches.
|
||||
typedef struct ParticleType {
|
||||
u8 pad[0x2C];
|
||||
s16 unk2C;
|
||||
u8 pad2[0x42];
|
||||
} ParticleType;
|
||||
|
||||
void func_800AE270(void);
|
||||
void func_800AE2A0(void);
|
||||
@@ -313,23 +180,23 @@ void func_800AEE14(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2);
|
||||
void func_800AEEB8(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2);
|
||||
void func_800AEF88(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2);
|
||||
void func_800AF024(unk800AF024 *arg0, Vertex **arg1, Triangle **arg2);
|
||||
void func_800AF0A4(Object *obj);
|
||||
void func_800AF0F0(Object *obj);
|
||||
void func_800AF0A4(Particle *particle);
|
||||
void func_800AF0F0(Particle *particle);
|
||||
void partInitTrigger(Particle *arg0, s32 arg1, s32 arg2);
|
||||
void func_800AF29C(Particle *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s16 arg5);
|
||||
void func_800AF6E4(Object *obj, s32 arg1);
|
||||
void func_800B2260(Particle *arg0);
|
||||
void func_800B263C(Particle2 *arg0);
|
||||
void func_800B263C(Particle *arg0);
|
||||
void init_particle_assets(void);
|
||||
void func_800B2FBC(Particle2 *arg0);
|
||||
void func_800B03C0(Particle2 *arg0, ObjectTransform *arg1, unk800B03C0_arg2 *arg2, ParticleBehavior *arg3);
|
||||
void func_800B2040(Particle2 *arg0);
|
||||
void func_800B22FC(Particle2 *arg0, s32 arg1);
|
||||
void func_800B0010(Particle2 *arg0, Particle2 *arg1, unk800B03C0_arg2 *arg2, ParticleBehavior *arg3);
|
||||
Particle2 *func_800B0698(unk800B1CB8 *arg0, Particle *arg1);
|
||||
unk800B1CB8 *func_800B1CB8(s32 arg0);
|
||||
void func_800AFE5C(unk800B1CB8 *arg0, Particle *arg1);
|
||||
Particle2 *func_800B1130(unk800B1CB8 *arg0, Particle *arg1);
|
||||
void func_800B2FBC(Particle *arg0);
|
||||
void func_800B03C0(Particle *arg0, Particle *arg1, Particle *arg2, ParticleBehavior *arg3);
|
||||
void func_800B2040(Particle *arg0);
|
||||
void func_800B22FC(Particle *arg0, s32 arg1);
|
||||
void func_800B0010(Particle *arg0, Particle *arg1, Particle *arg2, ParticleBehavior *arg3);
|
||||
Particle *func_800B0698(Particle *arg0, Particle *arg1);
|
||||
Particle *func_800B1CB8(s32 arg0);
|
||||
void func_800AFE5C(Particle *arg0, Particle *arg1);
|
||||
Particle *func_800B1130(Particle *arg0, Particle *arg1);
|
||||
void func_800AF52C(Object *obj, s32 arg1);
|
||||
void func_800AF134(Particle *arg0, s32 arg1, s32 arg2, s16 arg3, s16 arg4, s16 arg5);
|
||||
|
||||
@@ -337,14 +204,14 @@ void func_800AF404(s32 arg0); // Non Matching
|
||||
void func_800AFC3C(Object *, s32); // Non Matching
|
||||
void func_800AE728(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5); // Non Matching
|
||||
void func_800AF714(Object*, s32); // Non matching
|
||||
Object *func_800B0BAC();
|
||||
Particle *func_800B0BAC();
|
||||
void func_800B26E0();
|
||||
void func_800B3140(Particle2 *);
|
||||
void func_800B3240(Particle2 *);
|
||||
void func_800B3358(Particle2 *);
|
||||
void func_800B34B0(Particle2 *);
|
||||
void func_800B3564(Particle2 *);
|
||||
void func_800B3740(Object *, Gfx **, MatrixS **, Vertex **, s32); // Non Matching
|
||||
void func_800B3140(Particle *);
|
||||
void func_800B3240(Particle *);
|
||||
void func_800B3358(Particle *);
|
||||
void func_800B34B0(Particle *);
|
||||
void func_800B3564(Particle *);
|
||||
void func_800B3740(Particle *, Gfx **, MatrixS **, Vertex **, s32); // Non Matching
|
||||
void func_800B4668(Object*, s32, s32, s32);
|
||||
void func_800B46BC(Object*, s32, s32, s32);
|
||||
|
||||
|
||||
+15
-15
@@ -2039,9 +2039,9 @@ void update_camera_loop(f32 updateRateF, Object *obj, Object_Racer *racer) {
|
||||
gCameraObject->segmentIndex = segmentIndex;
|
||||
}
|
||||
racer->unk196 = gCameraObject->trans.y_rotation;
|
||||
gCameraObject->trans.x_position += gCameraObject->x_velocity;
|
||||
gCameraObject->trans.y_position += gCameraObject->y_velocity;
|
||||
gCameraObject->trans.z_position += gCameraObject->z_velocity;
|
||||
gCameraObject->trans.x_position += gCameraObject->offsetX;
|
||||
gCameraObject->trans.y_position += gCameraObject->offsetY;
|
||||
gCameraObject->trans.z_position += gCameraObject->offsetZ;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -5022,17 +5022,17 @@ void update_player_camera(Object *obj, Object_Racer *racer, f32 updateRateF) {
|
||||
break;
|
||||
}
|
||||
dialogueAngle = gDialogueCameraAngle / 10240.0f; // Goes between 0-1
|
||||
gCameraObject->x_velocity = (((obj->segment.trans.x_position + (91.75 * racer->ox1) + (90.0 * racer->ox3)) - gCameraObject->trans.x_position) * dialogueAngle);
|
||||
gCameraObject->z_velocity = (((obj->segment.trans.z_position + (91.75 * racer->oz1) + (90.0 * racer->oz3)) - gCameraObject->trans.z_position) * dialogueAngle);
|
||||
gCameraObject->y_velocity = (((get_npc_pos_y() + 48.5) - gCameraObject->trans.y_position) * dialogueAngle);
|
||||
gCameraObject->offsetX = (((obj->segment.trans.x_position + (91.75 * racer->ox1) + (90.0 * racer->ox3)) - gCameraObject->trans.x_position) * dialogueAngle);
|
||||
gCameraObject->offsetZ = (((obj->segment.trans.z_position + (91.75 * racer->oz1) + (90.0 * racer->oz3)) - gCameraObject->trans.z_position) * dialogueAngle);
|
||||
gCameraObject->offsetY = (((get_npc_pos_y() + 48.5) - gCameraObject->trans.y_position) * dialogueAngle);
|
||||
gCameraObject->unk38 = -gCameraObject->trans.x_rotation * dialogueAngle;
|
||||
gCameraObject->trans.x_position += gCameraObject->x_velocity;
|
||||
gCameraObject->trans.y_position += gCameraObject->y_velocity + gCameraObject->unk30;
|
||||
gCameraObject->trans.z_position += gCameraObject->z_velocity;
|
||||
gCameraObject->trans.x_position += gCameraObject->offsetX;
|
||||
gCameraObject->trans.y_position += gCameraObject->offsetY + gCameraObject->unk30;
|
||||
gCameraObject->trans.z_position += gCameraObject->offsetZ;
|
||||
if (!gRaceStartTimer && !gDialogueCameraAngle) {
|
||||
gCameraObject->x_velocity = gCameraObject->x_velocity * 0.95;
|
||||
gCameraObject->y_velocity = gCameraObject->y_velocity * 0.95;
|
||||
gCameraObject->z_velocity = gCameraObject->z_velocity * 0.95;
|
||||
gCameraObject->offsetX *= 0.95;
|
||||
gCameraObject->offsetY *= 0.95;
|
||||
gCameraObject->offsetZ *= 0.95;
|
||||
}
|
||||
angle = gDialogueCameraAngle;
|
||||
if (angle > 0x1400) {
|
||||
@@ -5077,9 +5077,9 @@ void second_racer_camera_update(Object *obj, Object_Racer *racer, s32 mode, f32
|
||||
gCameraObject->mode = mode;
|
||||
update_player_camera(obj, racer, updateRateF);
|
||||
if (gRaceStartTimer == 0 && D_8011D582 == 0) {
|
||||
gCameraObject->x_velocity = xPos - gCameraObject->trans.x_position;
|
||||
gCameraObject->y_velocity = yPos - (gCameraObject->trans.y_position + gCameraObject->unk30);
|
||||
gCameraObject->z_velocity = zPos - gCameraObject->trans.z_position;
|
||||
gCameraObject->offsetX = xPos - gCameraObject->trans.x_position;
|
||||
gCameraObject->offsetY = yPos - (gCameraObject->trans.y_position + gCameraObject->unk30);
|
||||
gCameraObject->offsetZ = zPos - gCameraObject->trans.z_position;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -107,9 +107,9 @@ typedef struct ObjectCamera {
|
||||
/* 0x0018 */ f32 unk18;
|
||||
/* 0x001C */ f32 unk1C;
|
||||
/* 0x0020 */ f32 unk20;
|
||||
/* 0x0024 */ f32 x_velocity;
|
||||
/* 0x0028 */ f32 y_velocity;
|
||||
/* 0x002C */ f32 z_velocity;
|
||||
/* 0x0024 */ f32 offsetX;
|
||||
/* 0x0028 */ f32 offsetY;
|
||||
/* 0x002C */ f32 offsetZ;
|
||||
/* 0x0030 */ f32 unk30;
|
||||
/* 0x0034 */ s16 segmentIndex;
|
||||
/* 0x0036 */ s16 mode;
|
||||
|
||||
Reference in New Issue
Block a user