mirror of
https://github.com/HarbourMasters/SpaghettiKart
synced 2026-09-03 02:33:55 -04:00
Tag more items
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <memory>
|
||||
#include "objects/Object.h"
|
||||
#include "port/Game.h"
|
||||
#include "src/port/interpolation/FrameInterpolation.h"
|
||||
|
||||
#include "editor/GameObject.h"
|
||||
|
||||
@@ -238,8 +239,11 @@ ParticleEmitter* World::AddEmitter(ParticleEmitter* emitter) {
|
||||
}
|
||||
|
||||
void World::DrawObjects(s32 cameraId) {
|
||||
size_t i = 0;
|
||||
for (const auto& object : Objects) {
|
||||
FrameInterpolation_RecordOpenChild(object, TAG_OBJECT(((u32)&object << 8) + i++));
|
||||
object->Draw(cameraId);
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Bat.h"
|
||||
#include "World.h"
|
||||
#include "CoreMath.h"
|
||||
#include "src/port/interpolation/FrameInterpolation.h"
|
||||
|
||||
extern "C" {
|
||||
#include "render_objects.h"
|
||||
@@ -114,6 +115,7 @@ void OBat::Draw(s32 cameraId) {
|
||||
if ((D_8018CFB0 != 0) || (D_8018CFC8 != 0)) {
|
||||
for (var_s2 = 0; var_s2 < 40; var_s2++) {
|
||||
objectIndex = gObjectParticle2[var_s2];
|
||||
FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + var_s2));
|
||||
if (objectIndex == -1) {
|
||||
continue;
|
||||
}
|
||||
@@ -124,11 +126,13 @@ void OBat::Draw(s32 cameraId) {
|
||||
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
|
||||
(Vtx*)D_0D0062B0);
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
if ((D_8018CFE8 != 0) || (D_8018D000 != 0)) {
|
||||
for (var_s2 = 0; var_s2 < 30; var_s2++) {
|
||||
objectIndex = gObjectParticle3[var_s2];
|
||||
FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + var_s2));
|
||||
if (objectIndex == -1) {
|
||||
continue;
|
||||
}
|
||||
@@ -139,6 +143,7 @@ void OBat::Draw(s32 cameraId) {
|
||||
func_800431B0(gObjectList[objectIndex].pos, D_80183E80, gObjectList[objectIndex].sizeScaling,
|
||||
(Vtx*)D_0D0062B0);
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
gSPTexture(gDisplayListHead++, 0x0001, 0x0001, 0, G_TX_RENDERTILE, G_OFF);
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#include "Boos.h"
|
||||
#include "World.h"
|
||||
#include "CoreMath.h"
|
||||
#include "src/port/interpolation/FrameInterpolation.h"
|
||||
|
||||
extern "C" {
|
||||
#include "render_objects.h"
|
||||
@@ -83,6 +84,7 @@ void OBoos::Draw(s32 cameraId) {
|
||||
|
||||
for (size_t i = 0; i < _numBoos; i++) {
|
||||
objectIndex = _indices[i]; //indexObjectList3[i];
|
||||
FrameInterpolation_RecordOpenChild(&gObjectList[objectIndex], TAG_OBJECT((objectIndex << 8) + i));
|
||||
if (gObjectList[objectIndex].state >= 2) {
|
||||
temp_s2 = func_8008A364(objectIndex, cameraId, 0x4000U, 0x00000320);
|
||||
if (CVarGetInteger("gNoCulling", 0) == 1) {
|
||||
@@ -92,6 +94,7 @@ void OBoos::Draw(s32 cameraId) {
|
||||
func_800523B8(objectIndex, cameraId, temp_s2);
|
||||
}
|
||||
}
|
||||
FrameInterpolation_StopRecord();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2445,7 +2445,7 @@ void render_course_actors(struct UnkStruct_800DC5EC* arg0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
FrameInterpolation_RecordOpenChild(actor, i);
|
||||
FrameInterpolation_RecordOpenChild(actor, TAG_OBJECT(((u32) &actor << 8) + i));
|
||||
|
||||
switch (actor->type) {
|
||||
default: // Draw custom actor
|
||||
|
||||
@@ -3417,10 +3417,12 @@ void render_object_snowflakes_particles(void) {
|
||||
func_80044F34(D_0D0293D8, 0x10, 0x10);
|
||||
for (someIndex = 0; someIndex < NUM_SNOWFLAKES; someIndex++) {
|
||||
snowflakeIndex = gObjectParticle1[someIndex];
|
||||
FrameInterpolation_RecordOpenChild(&gObjectList[snowflakeIndex], TAG_OBJECT(snowflakeIndex << 8) + someIndex);
|
||||
if (gObjectList[snowflakeIndex].state >= 2) {
|
||||
rsp_set_matrix_gObjectList(snowflakeIndex);
|
||||
gSPDisplayList(gDisplayListHead++, D_0D006980);
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
gSPTexture(gDisplayListHead++, 1, 1, 0, G_TX_RENDERTILE, G_OFF);
|
||||
}
|
||||
@@ -3943,6 +3945,8 @@ void render_object_neon(s32 cameraId) {
|
||||
objectIndex = indexObjectList1[var_s2];
|
||||
if (D_8018E838[cameraId] == 0) {
|
||||
object = &gObjectList[objectIndex];
|
||||
FrameInterpolation_RecordOpenChild(object, TAG_OBJECT((objectIndex << 8) + var_s2));
|
||||
|
||||
if ((object->state >= 2) && (is_obj_index_flag_status_inactive(objectIndex, 0x00080000) != 0) &&
|
||||
(is_object_visible_on_camera(objectIndex, camera, 0x2AABU) != 0)) {
|
||||
Vtx* vtx = (Vtx*) LOAD_ASSET(common_vtx_hedgehog);
|
||||
@@ -3950,6 +3954,7 @@ void render_object_neon(s32 cameraId) {
|
||||
draw_2d_texture_at(object->pos, object->orientation, object->sizeScaling, (u8*) object->activeTLUT,
|
||||
object->activeTexture, vtx, 0x00000040, 0x00000040, 0x00000040, 0x00000020);
|
||||
}
|
||||
FrameInterpolation_RecordCloseChild();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user