mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
fixed almost all types in particles.c
This commit is contained in:
+1
-12
@@ -1722,17 +1722,6 @@ typedef struct Object_68 {
|
||||
/* 0x50 */ s16 unk50;
|
||||
} Object_68;
|
||||
|
||||
/* Size: 0x20 bytes */
|
||||
typedef struct ParticleEmitter {
|
||||
/* 0x00 */ struct ParticleBehavior *behaviour;
|
||||
/* 0x04 */ s16 unk4;
|
||||
/* 0x06 */ u8 unk6;
|
||||
/* 0x07 */ u8 unk7;
|
||||
/* 0x08 */ s16 unk8;
|
||||
/* 0x0A */ s16 unkA;
|
||||
/* 0x0C */ u8 padC[0x14];
|
||||
} ParticleEmitter;
|
||||
|
||||
/* Size: 0xA0 bytes */
|
||||
typedef struct ParticleBehavior {
|
||||
s32 flags;
|
||||
@@ -1921,7 +1910,7 @@ typedef struct Object {
|
||||
/* 0x0060 */ Object_60 *unk60; //player + 0x340
|
||||
/* 0x0064 */ Object_64 *unk64; //player + 0x98
|
||||
/* 0x0068 */ Object_68 **unk68; //player + 0x80
|
||||
/* 0x006C */ ParticleEmitter *particleEmitter; //player + 0x370
|
||||
/* 0x006C */ struct ParticleEmitter *particleEmitter; //player + 0x370
|
||||
/* 0x0070 */ Object_LightData **lightData;
|
||||
/* 0x0074 */ u32 particleEmitFlags;
|
||||
/* 0x0078 */ ObjProperties properties;
|
||||
|
||||
+22
-22
@@ -162,7 +162,7 @@ void obj_loop_scenery(Object *obj, s32 updateRate) {
|
||||
} else {
|
||||
particleFlagShift = get_random_number_from_range(0, obj->segment.header->particleCount - 1);
|
||||
}
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1 << particleFlagShift;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1 << particleFlagShift;
|
||||
obj_spawn_particle(obj, LOGIC_30FPS);
|
||||
}
|
||||
}
|
||||
@@ -277,7 +277,7 @@ void obj_loop_fireball_octoweapon(Object *obj, s32 updateRate) {
|
||||
}
|
||||
}
|
||||
if (obj->behaviorId == BHV_FIREBALL_OCTOWEAPON) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
obj->properties.fireball.timer -= updateRate;
|
||||
if (obj->properties.fireball.timer < 0) {
|
||||
@@ -1907,7 +1907,7 @@ void obj_loop_wizpigship(Object *wizShipObj, s32 updateRate) {
|
||||
wizShipObj->properties.fireball.timer = 0;
|
||||
}
|
||||
if ((wizShipObj->unk60 != NULL) && (wizShipObj->properties.fireball.timer == 0)) {
|
||||
if (wizShipObj->particleEmitFlags & OBJ_EMIT_PARTICLE_1) {
|
||||
if (wizShipObj->particleEmitFlags & OBJ_EMIT_1) {
|
||||
wizShipObj->properties.fireball.timer = 20;
|
||||
object_transform_to_matrix(shipMtx, &wizShipObj->segment.trans);
|
||||
trans.x_position = 0.0f;
|
||||
@@ -2055,7 +2055,7 @@ void obj_loop_char_select(Object *charSelectObj, s32 updateRate) {
|
||||
var_s0 = 0;
|
||||
func_8001F460(charSelectObj, updateRate, NULL);
|
||||
charSelect = &charSelectObj->unk64->characterSelect;
|
||||
charSelectObj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
charSelectObj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (charSelect != NULL) {
|
||||
gfxData = charSelectObj->unk68[charSelectObj->segment.object.modelIndex];
|
||||
if (gfxData != NULL) {
|
||||
@@ -2101,7 +2101,7 @@ void obj_loop_char_select(Object *charSelectObj, s32 updateRate) {
|
||||
status = charselect_status();
|
||||
for (i2 = 0; i2 < sp4F; i2++) {
|
||||
if (status[sp50[i2]] == 1) {
|
||||
charSelectObj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
charSelectObj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(charSelectObj, LOGIC_30FPS);
|
||||
}
|
||||
}
|
||||
@@ -2286,7 +2286,7 @@ void obj_init_bombexplosion(Object *obj, LevelObjectEntry_BombExplosion *entry)
|
||||
if (entry->unk8) {
|
||||
obj->properties.bombExplosion.unk4 |= (entry2->unk8 << 8) & 0xFF00;
|
||||
}
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
}
|
||||
|
||||
void obj_loop_bombexplosion(Object *obj, s32 updateRate) {
|
||||
@@ -2312,7 +2312,7 @@ void obj_loop_bombexplosion(Object *obj, s32 updateRate) {
|
||||
if (obj->particleEmitFlags) {
|
||||
if (get_number_of_active_players() < THREE_PLAYERS) {
|
||||
obj_spawn_particle(obj, LOGIC_30FPS);
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2572,7 +2572,7 @@ void obj_loop_parkwarden(Object *obj, s32 updateRate) {
|
||||
}
|
||||
taj = (Object_NPC *) obj->unk64;
|
||||
levelHeader = get_current_level_header();
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (obj->segment.animFrame == 0 && taj->animFrameF > 1.0) {
|
||||
taj->animFrameF = 0.0f;
|
||||
}
|
||||
@@ -2811,10 +2811,10 @@ void obj_loop_parkwarden(Object *obj, s32 updateRate) {
|
||||
racer_set_dialogue_camera();
|
||||
taj->animFrameF += updateRateF * 2.0;
|
||||
if (taj->animFrameF > 25.0) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1 | OBJ_EMIT_PARTICLE_2 | OBJ_EMIT_PARTICLE_4;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1 | OBJ_EMIT_2 | OBJ_EMIT_4;
|
||||
}
|
||||
if (taj->animFrameF > 50.0) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
}
|
||||
if (taj->animFrameF > 60.0) {
|
||||
taj->animFrameF = 60.0f;
|
||||
@@ -3420,7 +3420,7 @@ void obj_loop_goldenballoon(Object *obj, s32 updateRate) {
|
||||
flag = 0x10000 << levelEntry->goldenBalloon.balloonID;
|
||||
if (settings->courseFlagsPtr[settings->courseId] & flag) {
|
||||
if (obj->properties.npc.timer > 0) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_2;
|
||||
obj->particleEmitFlags = OBJ_EMIT_2;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
obj->properties.npc.timer -= updateRate;
|
||||
} else {
|
||||
@@ -3452,7 +3452,7 @@ void obj_loop_goldenballoon(Object *obj, s32 updateRate) {
|
||||
sound_play_spatial(SOUND_COLLECT_BALLOON, obj->segment.trans.x_position,
|
||||
obj->segment.trans.y_position, obj->segment.trans.z_position, NULL);
|
||||
obj->properties.npc.timer = 16;
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_2;
|
||||
obj->particleEmitFlags = OBJ_EMIT_2;
|
||||
obj->segment.trans.flags |= OBJ_FLAGS_INVISIBLE;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
}
|
||||
@@ -4352,7 +4352,7 @@ void obj_loop_banana(Object *obj, s32 updateRate) {
|
||||
if (properties->status == BANANA_COLLECTED) {
|
||||
obj->segment.trans.flags |= OBJ_FLAGS_INVISIBLE;
|
||||
properties->destroyTimer -= updateRate;
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
if (properties->destroyTimer <= 0) {
|
||||
free_object(obj);
|
||||
@@ -4451,7 +4451,7 @@ void obj_loop_banana(Object *obj, s32 updateRate) {
|
||||
free_object(obj);
|
||||
} else {
|
||||
properties->status = BANANA_COLLECTED;
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
}
|
||||
}
|
||||
@@ -4545,7 +4545,7 @@ void obj_loop_silvercoin(Object *obj, s32 updateRate) {
|
||||
}
|
||||
if (obj->properties.npc.timer > 0) {
|
||||
obj->properties.npc.timer -= updateRate;
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
}
|
||||
}
|
||||
@@ -4687,7 +4687,7 @@ void obj_loop_weaponballoon(Object *weaponBalloonObj, s32 updateRate) {
|
||||
weaponBalloonObj->segment.trans.flags &= ~OBJ_FLAGS_INVISIBLE;
|
||||
}
|
||||
if (weaponBalloonObj->properties.weaponBalloon.particleTimer > 0) {
|
||||
weaponBalloonObj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
weaponBalloonObj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(weaponBalloonObj, updateRate);
|
||||
weaponBalloonObj->properties.weaponBalloon.particleTimer -= updateRate;
|
||||
}
|
||||
@@ -4766,7 +4766,7 @@ void obj_loop_weaponballoon(Object *weaponBalloonObj, s32 updateRate) {
|
||||
sound_play(SOUND_COLLECT_ITEM + racer->balloon_level, NULL);
|
||||
}
|
||||
}
|
||||
weaponBalloonObj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
weaponBalloonObj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(weaponBalloonObj, updateRate);
|
||||
weaponBalloon->respawnTime = 90;
|
||||
}
|
||||
@@ -5081,7 +5081,7 @@ void homing_rocket_prevent_overshoot(Object *obj, s32 updateRate, Object_Weapon
|
||||
}
|
||||
play_rocket_trailing_sound(obj, rocket, SOUND_HOMING_ROCKET);
|
||||
if (get_number_of_active_players() < 3) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_1;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
}
|
||||
}
|
||||
@@ -5264,7 +5264,7 @@ void weapon_trap(Object *weaponObj, s32 updateRate) {
|
||||
}
|
||||
}
|
||||
if (weaponProperties->status == WEAPON_DESTROY) {
|
||||
weaponObj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
weaponObj->particleEmitFlags = OBJ_EMIT_1;
|
||||
obj_spawn_particle(weaponObj, updateRate);
|
||||
weaponObj->segment.trans.flags |= OBJ_FLAGS_INVISIBLE;
|
||||
weaponProperties->scale -= updateRate;
|
||||
@@ -6289,9 +6289,9 @@ void obj_init_bubbler(Object *obj, LevelObjectEntry_Bubbler *entry) {
|
||||
*/
|
||||
void obj_loop_bubbler(Object *obj, s32 updateRate) {
|
||||
if (obj->properties.common.unk0 >= get_random_number_from_range(0, 1024)) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_PARTICLE_1;
|
||||
obj->particleEmitFlags = OBJ_EMIT_1;
|
||||
} else {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
}
|
||||
if (get_number_of_active_players() < 2) {
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
@@ -6330,7 +6330,7 @@ void obj_loop_rangetrigger(Object *obj, s32 updateRate) {
|
||||
if (obj_dist_racer(obj->segment.trans.x_position, 0, obj->segment.trans.z_position, entry->radius, 1, objs) > 0) {
|
||||
obj->particleEmitFlags = entry->particleFlags;
|
||||
} else {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
}
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
}
|
||||
|
||||
+2
-2
@@ -2063,10 +2063,10 @@ s32 obj_init_emitter(Object *obj, ParticleEmitter *emitter) {
|
||||
particleDataEntry = obj->segment.header->objectParticles;
|
||||
for (i = 0; i < obj->segment.header->particleCount; i++) {
|
||||
if ((particleDataEntry[i].upper & 0xFFFF0000) == 0xFFFF0000) {
|
||||
partInitTrigger((Particle *) &obj->particleEmitter[i], (particleDataEntry[i].upper >> 8) & 0xFF,
|
||||
partInitTrigger(&obj->particleEmitter[i], (particleDataEntry[i].upper >> 8) & 0xFF,
|
||||
particleDataEntry[i].upper & 0xFF);
|
||||
} else {
|
||||
func_800AF29C((Particle *) &obj->particleEmitter[i], (particleDataEntry[i].upper >> 0x18) & 0xFF,
|
||||
func_800AF29C(&obj->particleEmitter[i], (particleDataEntry[i].upper >> 0x18) & 0xFF,
|
||||
(particleDataEntry[i].upper >> 0x10) & 0xFF, particleDataEntry[i].upper & 0xFFFF,
|
||||
(particleDataEntry[i].lower >> 0x10) & 0xFFFF, particleDataEntry[i].lower & 0xFFFF);
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "libc/math.h"
|
||||
#include "camera.h"
|
||||
#include "lights.h"
|
||||
#include "particles.h"
|
||||
|
||||
|
||||
#define NEW_OBJECT_ENTRY(entryVar, entryId, entrySize, xPos, yPos, zPos) { \
|
||||
|
||||
+233
-236
File diff suppressed because it is too large
Load Diff
+45
-60
@@ -5,24 +5,25 @@
|
||||
#include "structs.h"
|
||||
#include <ultra64.h>
|
||||
|
||||
// Flags representing which particle emitters are active for a game object
|
||||
enum ObjectEmitterFlags {
|
||||
OBJ_EMIT_OFF,
|
||||
OBJ_EMIT_PARTICLE_1 = (1 << 0),
|
||||
OBJ_EMIT_PARTICLE_2 = (1 << 1),
|
||||
OBJ_EMIT_PARTICLE_3 = (1 << 2),
|
||||
OBJ_EMIT_PARTICLE_4 = (1 << 3),
|
||||
OBJ_EMIT_UNK_10 = (1 << 4),
|
||||
OBJ_EMIT_UNK_20 = (1 << 5),
|
||||
OBJ_EMIT_UNK_40 = (1 << 6),
|
||||
OBJ_EMIT_UNK_80 = (1 << 7),
|
||||
OBJ_EMIT_UNK_100 = (1 << 8),
|
||||
OBJ_EMIT_UNK_200 = (1 << 9),
|
||||
OBJ_EMIT_UNK_400 = (1 << 10),
|
||||
OBJ_EMIT_UNK_800 = (1 << 11),
|
||||
OBJ_EMIT_UNK_1000 = (1 << 12),
|
||||
OBJ_EMIT_UNK_2000 = (1 << 13),
|
||||
OBJ_EMIT_UNK_4000 = (1 << 14),
|
||||
OBJ_EMIT_UNK_8000 = (1 << 15),
|
||||
OBJ_EMIT_NONE,
|
||||
OBJ_EMIT_1 = (1 << 0),
|
||||
OBJ_EMIT_2 = (1 << 1),
|
||||
OBJ_EMIT_3 = (1 << 2),
|
||||
OBJ_EMIT_4 = (1 << 3),
|
||||
OBJ_EMIT_5 = (1 << 4),
|
||||
OBJ_EMIT_6 = (1 << 5),
|
||||
OBJ_EMIT_7 = (1 << 6),
|
||||
OBJ_EMIT_8 = (1 << 7),
|
||||
OBJ_EMIT_9 = (1 << 8),
|
||||
OBJ_EMIT_10 = (1 << 9),
|
||||
OBJ_EMIT_11 = (1 << 10),
|
||||
OBJ_EMIT_12 = (1 << 11),
|
||||
OBJ_EMIT_13 = (1 << 12),
|
||||
OBJ_EMIT_14 = (1 << 13),
|
||||
OBJ_EMIT_15 = (1 << 14),
|
||||
OBJ_EMIT_16 = (1 << 15),
|
||||
};
|
||||
|
||||
enum ParticleFlags {
|
||||
@@ -163,32 +164,25 @@ typedef struct ParticleAngle {
|
||||
Vec3s direction;
|
||||
} ParticleAngle;
|
||||
|
||||
typedef struct ParticleData {
|
||||
/* Size: 0x20 bytes */
|
||||
typedef struct ParticleEmitter {
|
||||
/* 0x00 */ ParticleBehavior *behaviour;
|
||||
/* 0x04 */ s16 flags;
|
||||
/* 0x06 */ u8 unk6;
|
||||
/* 0x07 */ u8 lifeTime;
|
||||
/* 0x08 */ s16 propertyID;
|
||||
/* 0x0A */ s16 opacity;
|
||||
union {
|
||||
/* 0x0000 */ ParticleBehavior *behaviour;
|
||||
/* 0x0000 */ s32 unk0;
|
||||
/* 0x000C */ Vec3f pos;
|
||||
/* 0x000C */ ParticleAngle angle;
|
||||
/* 0x000C */ struct Particle **unkC_60;
|
||||
/* 0x000C */ unk800AF29C_C_400 unkC_400;
|
||||
};
|
||||
/* 0x0004 */ s16 flags;
|
||||
/* 0x0006 */ u8 unk6;
|
||||
/* 0x0007 */ u8 lifeTime;
|
||||
/* 0x0008 */ s16 propertyID;
|
||||
/* 0x000A */ s16 opacity;
|
||||
union {
|
||||
/* 0x000C */ Vec3f pos;
|
||||
/* 0x000C */ ParticleAngle angle;
|
||||
/* 0x000C */ struct Particle **unkC_60;
|
||||
/* 0x000C */ unk800AF29C_C_400 unkC_400;
|
||||
};
|
||||
/* 0x0018 */ s16 baseVelX;
|
||||
/* 0x0018 */ s16 baseVelY;
|
||||
/* 0x001C */ s16 baseVelZ;
|
||||
/* 0x001E */ s16 unk1E;
|
||||
/* 0x0020 */ s32 unk20;
|
||||
/* 0x0024 */ s32 unk24;
|
||||
/* 0x0028 */ s32 unk28;
|
||||
/* 0x002C */ s16 unk2C;
|
||||
/* 0x002E */ s16 unk2E;
|
||||
} ParticleData;
|
||||
/* 0x0018 */ s16 baseVelX;
|
||||
/* 0x001A */ s16 baseVelY;
|
||||
/* 0x001C */ s16 baseVelZ;
|
||||
/* 0x001E */ s16 unk1E;
|
||||
} ParticleEmitter;
|
||||
|
||||
typedef struct ParticleSegment {
|
||||
/* 0x0000 */ ObjectTransform trans;
|
||||
@@ -204,13 +198,7 @@ typedef struct ParticleSegment {
|
||||
SegmentPropertiesCamera camera;
|
||||
};
|
||||
/* 0x003C */ void *unk3C;
|
||||
union {
|
||||
struct {
|
||||
/* 0x0040 */ s16 unk40_s16;
|
||||
/* 0x0042 */ s16 unk42;
|
||||
};
|
||||
s32 unk40;
|
||||
};
|
||||
/* 0x003C */ s32 unk40;
|
||||
} ParticleSegment;
|
||||
|
||||
typedef struct ParticleModel {
|
||||
@@ -230,10 +218,7 @@ typedef struct ParticleOtherSomething {
|
||||
} ParticleOtherSomething;
|
||||
|
||||
typedef struct Particle {
|
||||
union {
|
||||
/* 0x0000 */ ParticleSegment segment;
|
||||
/* 0x0000 */ ParticleData data;
|
||||
};
|
||||
union {
|
||||
/* 0x0044 */ ParticleModel *modelData;
|
||||
/* 0x0044 */ ParticleOtherSomething *unk44_1;
|
||||
@@ -298,21 +283,21 @@ void generate_particle_shape_line(ParticleModel *model, Vertex **vtx, Triangle *
|
||||
void generate_particle_shape_sprite(ParticleModel *model, Vertex **vtx, Triangle **triangles);
|
||||
void func_800AF0A4(Particle *particle);
|
||||
void func_800AF0F0(Particle *particle);
|
||||
void partInitTrigger(Particle *particle, s32 behaviourID, s32 propertyID);
|
||||
void func_800AF29C(Particle *arg0, s32 behaviourID, s32 propertyID, s16 velX, s16 velY, s16 velZ);
|
||||
void partInitTrigger(ParticleEmitter *emitter, s32 behaviourID, s32 propertyID);
|
||||
void func_800AF29C(ParticleEmitter *arg0, s32 behaviourID, s32 propertyID, s16 velX, s16 velY, s16 velZ);
|
||||
void func_800AF6E4(Object *obj, s32 arg1);
|
||||
void func_800B2260(Particle *arg0);
|
||||
void func_800B2260(ParticleEmitter *emitter);
|
||||
void func_800B263C(SpriteParticle *arg0);
|
||||
void init_particle_assets(void);
|
||||
void set_particle_texture_frame(Particle *particle);
|
||||
void func_800B03C0(Particle *particle, Particle *arg1, Particle *arg2, ParticleBehavior *behaviour);
|
||||
void func_800B03C0(Particle *particle, Object *arg1, ParticleEmitter *arg2, ParticleBehavior *behaviour);
|
||||
void func_800B2040(Particle *arg0);
|
||||
void handle_particle_movement(Particle *particle, s32 updateRate);
|
||||
void func_800B0010(Particle *arg0, Particle *arg1, Particle *arg2, ParticleBehavior *arg3);
|
||||
SpriteParticle *func_800B0698(Particle *arg0, Particle *arg1);
|
||||
void func_800B0010(Particle *arg0, Object *arg1, ParticleEmitter *arg2, ParticleBehavior *arg3);
|
||||
SpriteParticle *func_800B0698(Object *arg0, ParticleEmitter *arg1);
|
||||
Particle *func_800B1CB8(s32 arg0);
|
||||
void func_800AFE5C(Particle *arg0, Particle *arg1);
|
||||
Particle *func_800B1130(Particle *arg0, Particle *arg1);
|
||||
void func_800AFE5C(Object *arg0, ParticleEmitter *arg1);
|
||||
Particle *func_800B1130(Object *arg0, ParticleEmitter *arg1);
|
||||
void func_800AF52C(Object *obj, s32 arg1);
|
||||
void func_800AF134(ParticleEmitter *emitter, s32 behaviourID, s32 propertyID, s16 velX, s16 velY, s16 velZ);
|
||||
void render_particle(Particle *particle, Gfx **dList, MatrixS **mtx, Vertex **vtx, s32 flags);
|
||||
@@ -322,7 +307,7 @@ void obj_spawn_particle(Object *obj, s32 updateRate);
|
||||
void func_800B3E64(Object *obj);
|
||||
void func_800B26E0(Particle *particle);
|
||||
void func_800AF714(Object *racerObj, s32 updateRate);
|
||||
Particle* func_800B0BAC(Object* arg0, Particle* arg1);
|
||||
Particle* func_800B0BAC(Object* arg0, ParticleEmitter* arg1);
|
||||
|
||||
void func_800AF404(s32 updateRate); // Non Matching
|
||||
void init_particle_buffers(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4, s32 arg5); // Non Matching
|
||||
|
||||
+14
-14
@@ -937,7 +937,7 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
}
|
||||
playerObjectHasMoved = FALSE;
|
||||
if (racer->playerIndex >= PLAYER_ONE && gNumViewports < 2) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_UNK_100;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_9;
|
||||
}
|
||||
D_8011D550 = 0;
|
||||
gCurrentCarSteerVel = 0;
|
||||
@@ -1208,7 +1208,7 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
}
|
||||
} else if (racer->approachTarget == NULL) {
|
||||
racer_play_sound(obj, SOUND_UNK_AF);
|
||||
obj->particleEmitFlags |= OBJ_EMIT_UNK_10 | OBJ_EMIT_UNK_20;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_5 | OBJ_EMIT_6;
|
||||
}
|
||||
var_f2 = racer->trickType;
|
||||
var_f2 -= 5.0f;
|
||||
@@ -1499,13 +1499,13 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
(obj->segment.z_velocity * obj->segment.z_velocity);
|
||||
if (var_f2 > 16.0f) {
|
||||
if (var_f2 < 80.0f) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_3 | OBJ_EMIT_PARTICLE_4;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_3 | OBJ_EMIT_4;
|
||||
}
|
||||
if (var_f2 > 28.0f) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_1 | OBJ_EMIT_PARTICLE_2;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_1 | OBJ_EMIT_2;
|
||||
}
|
||||
if (gNumViewports == 1 && var_f2 > 10.25f) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_UNK_40;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_7;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -1515,7 +1515,7 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
var_f2 = racer->velocity;
|
||||
}
|
||||
if (var_f2 > 4.0f) {
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_3 | OBJ_EMIT_PARTICLE_4;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_3 | OBJ_EMIT_4;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1534,7 +1534,7 @@ void func_80046524(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
}
|
||||
}
|
||||
if (racer->unk201 == 0) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
} else {
|
||||
obj->segment.y_velocity += updateRate * gCurrentRacerWeightStat;
|
||||
func_800AF714(obj, updateRate);
|
||||
@@ -2450,7 +2450,7 @@ void update_player_racer(Object *obj, s32 updateRate) {
|
||||
if (tempRacer->unk1F6 < 0) {
|
||||
tempRacer->unk1F6 = 0;
|
||||
}
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (tempRacer->unk201 > 0) {
|
||||
tempRacer->unk201 -= updateRate;
|
||||
} else {
|
||||
@@ -4243,7 +4243,7 @@ void update_car_velocity_offground(Object *obj, Object_Racer *racer, s32 updateR
|
||||
canSteer = TRUE;
|
||||
}
|
||||
if (canSteer) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
racer->drift_direction = 0;
|
||||
racer->unk10C -= (racer->unk10C * updateRate) >> 4;
|
||||
gCurrentCarSteerVel = 0;
|
||||
@@ -4277,7 +4277,7 @@ void update_car_velocity_offground(Object *obj, Object_Racer *racer, s32 updateR
|
||||
}
|
||||
racer->trickType = steerAngle;
|
||||
}
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -4444,7 +4444,7 @@ void func_80053750(Object *objRacer, Object_Racer *racer, f32 updateRateF) {
|
||||
}
|
||||
}
|
||||
}
|
||||
objRacer->particleEmitFlags |= OBJ_EMIT_UNK_400 | OBJ_EMIT_UNK_800;
|
||||
objRacer->particleEmitFlags |= OBJ_EMIT_11 | OBJ_EMIT_12;
|
||||
}
|
||||
temp_f0 = someObj->segment.trans.y_position; // Fake
|
||||
for (i = 0; i < 4; i++) {
|
||||
@@ -4662,7 +4662,7 @@ void update_onscreen_AI_racer(Object *obj, Object_Racer *racer, s32 updateRate,
|
||||
func_80054FD0(obj, racer, updateRate);
|
||||
}
|
||||
if (!racer->unk201) {
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
} else if (racer->vehicleID < VEHICLE_BOSSES) {
|
||||
func_800AF714(obj, updateRate);
|
||||
}
|
||||
@@ -6797,7 +6797,7 @@ s32 set_ghost_position_and_rotation(Object *obj) {
|
||||
}
|
||||
obj->segment.trans.rotation.z_rotation = rot + (s32) (rotDiff * catmullX);
|
||||
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
obj->segment.object.segmentID = get_level_segment_index_from_position(
|
||||
obj->segment.trans.x_position, obj->segment.trans.y_position, obj->segment.trans.z_position);
|
||||
if (ghostNodeCount == (commonUnk0s32 + 3)) {
|
||||
@@ -7489,7 +7489,7 @@ void func_8005B818(Object *obj, Object_Racer *racer, s32 updateRate, f32 updateR
|
||||
racer->unkFC.x = obj->segment.trans.x_position;
|
||||
racer->unkFC.y = obj->segment.trans.y_position;
|
||||
racer->unkFC.z = obj->segment.trans.z_position;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
func_800AF714(obj, updateRate);
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -168,10 +168,10 @@ void update_bluey(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *ra
|
||||
}
|
||||
animFrame = obj->segment.animFrame;
|
||||
obj->segment.animFrame = racer->animationSpeed;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (obj->segment.object.animationID == ANIM_BLUEY_RUN) {
|
||||
play_footstep_sounds(obj, 2, animFrame, SOUND_STOMP2, SOUND_STOMP3);
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_1 | OBJ_EMIT_PARTICLE_2;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_1 | OBJ_EMIT_2;
|
||||
}
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
fade_when_near_camera(obj, racer, 40);
|
||||
|
||||
@@ -139,7 +139,7 @@ void update_bubbler(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *
|
||||
spawn_boss_hazard(obj, racer, 0.0f, objectID, SOUND_VOICE_BUBBLER_HOHO2);
|
||||
}
|
||||
}
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
fade_when_near_camera(obj, racer, 40);
|
||||
switch (obj->segment.object.animationID) {
|
||||
|
||||
@@ -85,7 +85,7 @@ void update_rocket(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
func_80049794(updateRate, updateRateF, obj, racer);
|
||||
racer->vehicleID = racer->vehicleIDPrev;
|
||||
*startTimer = tempStartTimer;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
racer->headAngle = tempHeadAngle;
|
||||
obj->segment.object.animationID = animID;
|
||||
obj->segment.animFrame = animFrame;
|
||||
@@ -128,7 +128,7 @@ void update_rocket(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
racer->animationSpeed = 0.0f;
|
||||
}
|
||||
obj->segment.animFrame = racer->animationSpeed;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
func_800AF714(obj, updateRate);
|
||||
fade_when_near_camera(obj, racer, 40);
|
||||
if (*startTimer != 100) {
|
||||
|
||||
@@ -100,7 +100,7 @@ void update_smokey(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
func_80049794(updateRate, updateRateF, obj, racer);
|
||||
racer->vehicleID = racer->vehicleIDPrev;
|
||||
*startTimer = headAngleRange;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
racer->headAngle = tempHeadAngle;
|
||||
obj->segment.object.animationID = animID;
|
||||
obj->segment.animFrame = animFrame;
|
||||
@@ -219,7 +219,7 @@ void update_smokey(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
animFrame = obj->segment.animFrame;
|
||||
obj->segment.animFrame = racer->animationSpeed;
|
||||
stepFrame = obj->segment.animFrame >> 4;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (obj->segment.object.animationID != ANIM_SMOKEY_RUN && obj->segment.object.animationID != 2) {
|
||||
animFrame >>= 4;
|
||||
stepFrame = 1;
|
||||
|
||||
@@ -160,10 +160,10 @@ void update_tricky(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
}
|
||||
animFrame = obj->segment.animFrame;
|
||||
obj->segment.animFrame = racer->animationSpeed;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (obj->segment.object.animationID == ANIM_TRICKY_RUN) {
|
||||
play_footstep_sounds(obj, 2, animFrame, SOUND_STOMP2, SOUND_STOMP3);
|
||||
obj->particleEmitFlags |= OBJ_EMIT_PARTICLE_1 | OBJ_EMIT_PARTICLE_2;
|
||||
obj->particleEmitFlags |= OBJ_EMIT_1 | OBJ_EMIT_2;
|
||||
}
|
||||
obj_spawn_particle(obj, updateRate);
|
||||
fade_when_near_camera(obj, racer, 120);
|
||||
|
||||
@@ -91,7 +91,7 @@ void update_wizpig(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
func_80049794(updateRate, updateRateF, obj, racer);
|
||||
racer->vehicleID = racer->vehicleIDPrev;
|
||||
*startTimer = tempStartTimer;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
racer->headAngle = tempHeadAngle;
|
||||
obj->segment.object.animationID = animID;
|
||||
obj->segment.animFrame = animFrame;
|
||||
@@ -218,7 +218,7 @@ void update_wizpig(s32 updateRate, f32 updateRateF, Object *obj, Object_Racer *r
|
||||
}
|
||||
animFrame = obj->segment.animFrame;
|
||||
obj->segment.animFrame = racer->animationSpeed;
|
||||
obj->particleEmitFlags = OBJ_EMIT_OFF;
|
||||
obj->particleEmitFlags = OBJ_EMIT_NONE;
|
||||
if (obj->segment.object.animationID == ANIM_WIZPIG_RUN) {
|
||||
play_footstep_sounds(obj, 2, animFrame, SOUND_STOMP2, SOUND_STOMP3);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user