summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcoco875 <pereira.jannin@gmail.com>2025-05-25 19:51:55 +0200
committercoco875 <pereira.jannin@gmail.com>2025-05-25 19:51:55 +0200
commit20f7601e8d1d747745c816399c8e492c8dcd2736 (patch)
tree3aa3728cc19906e5c10ddfb683c8f8465bf76c48 /src
parent5313309a0003c47f34eec2e840827a039952a712 (diff)
particle boat and train
Diffstat (limited to 'src')
-rw-r--r--src/engine/Smoke.cpp17
-rw-r--r--src/update_objects.c8
2 files changed, 11 insertions, 14 deletions
diff --git a/src/engine/Smoke.cpp b/src/engine/Smoke.cpp
index 5fb0c0c39..90052ab5d 100644
--- a/src/engine/Smoke.cpp
+++ b/src/engine/Smoke.cpp
@@ -13,6 +13,7 @@ extern "C" {
#include "update_objects.h"
#include "math_util_2.h"
#include "assets/common_data.h"
+#include <port/interpolation/FrameInterpolation.h>
}
//! @todo: This should be an Object class one day
@@ -69,7 +70,6 @@ void TrainSmokeTick() {
if (count != 0) {
boat->SmokeTimer = 100;
}
-
}
}
}
@@ -80,28 +80,31 @@ void TrainSmokeDraw(s32 cameraId) {
for (auto& actor : gWorldInstance.Actors) {
if (auto train = dynamic_cast<ATrain*>(actor)) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0);
- load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007AE0);
+ load_texture_block_i8_nomirror((uint8_t*) D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
- if ((train->SomeFlags != 0) &&
- (is_particle_on_screen(train->Locomotive.position, camera, 0x4000U) != 0)) {
+ if ((train->SomeFlags != 0) && (is_particle_on_screen(train->Locomotive.position, camera, 0x4000U) != 0)) {
for (size_t i = 0; i < 128; i++) {
+ FrameInterpolation_RecordOpenChild("TrainSmokeParticle", train->SmokeParticles[i]);
render_object_train_smoke_particle(train->SmokeParticles[i], cameraId);
+ FrameInterpolation_RecordCloseChild();
}
}
} else if (auto boat = dynamic_cast<ABoat*>(actor)) {
- gSPDisplayList(gDisplayListHead++, (Gfx*)D_0D007AE0);
+ gSPDisplayList(gDisplayListHead++, (Gfx*) D_0D007AE0);
- load_texture_block_i8_nomirror((uint8_t*)D_0D029458, 32, 32);
+ load_texture_block_i8_nomirror((uint8_t*) D_0D029458, 32, 32);
func_8004B72C(255, 255, 255, 255, 255, 255, 255);
D_80183E80[0] = 0;
D_80183E80[2] = 0x8000;
if ((boat->SomeFlags != 0) && (is_particle_on_screen(boat->Position, camera, 0x4000U) != 0)) {
for (size_t i = 0; i < gObjectParticle2_SIZE; i++) {
+ FrameInterpolation_RecordOpenChild("BoatSmokeParticle", boat->SmokeParticles[i]);
render_object_paddle_boat_smoke_particle(boat->SmokeParticles[i], cameraId);
+ FrameInterpolation_RecordCloseChild();
}
}
}
diff --git a/src/update_objects.c b/src/update_objects.c
index 0435a69d7..34e426d38 100644
--- a/src/update_objects.c
+++ b/src/update_objects.c
@@ -2090,8 +2090,6 @@ void init_smoke_particles(s32 arg0) {
}
}
-
-
void init_object_leaf_particle(s32 objectIndex, Vec3f arg1, s32 num) {
UNUSED s32 stackPadding1;
UNUSED u16 stackPadding0;
@@ -2611,7 +2609,6 @@ void func_80078C70(s32 arg0) {
}
}
-
void func_8007ABFC(s32 playerId, bool arg1) {
s32 itemWindow;
@@ -3458,7 +3455,7 @@ void func_8007BB9C(s32 arg0) {
}
void wrapper_update_boos(void) {
- //update_boos();
+ // update_boos();
}
// Updates the display status on an object based on its relative direction to the camera
@@ -3486,7 +3483,6 @@ void func_8007C420(s32 objectIndex, Player* player, Camera* camera) {
func_8007C360(objectIndex, camera);
}
-
void func_8007CE0C(s32 objectIndex) {
Object* object;
@@ -3883,8 +3879,6 @@ void func_800842C8(void) {
}
}
-
-
void func_80085BB4(s32 objectIndex) {
gObjectList[objectIndex].sizeScaling = 8.0f;
set_obj_origin_offset(objectIndex, 0.0f, 0.0f, 0.0f);