cutscene system

This commit is contained in:
Jan Racek
2026-03-24 15:51:04 +01:00
parent e51c06b012
commit 60a7063a17
12 changed files with 651 additions and 11 deletions

View File

@@ -270,6 +270,7 @@ void psxsplash::Renderer::Render(eastl::vector<GameObject*>& objects) {
psyqo::Vec3 cameraPosition = computeCameraViewPos();
int32_t fogFarSZ = m_fog.fogFarSZ;
for (auto& obj : objects) {
if (!obj->isActive()) continue;
setupObjectTransform(obj, cameraPosition);
for (int i = 0; i < obj->polyCount; i++)
processTriangle(obj->polygons[i], fogFarSZ, ot, balloc);
@@ -298,6 +299,7 @@ void psxsplash::Renderer::RenderWithBVH(eastl::vector<GameObject*>& objects, con
const TriangleRef& ref = m_visibleRefs[i];
if (ref.objectIndex >= objects.size()) continue;
GameObject* obj = objects[ref.objectIndex];
if (!obj->isActive()) continue;
if (ref.triangleIndex >= obj->polyCount) continue;
if (ref.objectIndex != lastObjectIndex) {
lastObjectIndex = ref.objectIndex;
@@ -528,6 +530,7 @@ void psxsplash::Renderer::RenderWithRooms(eastl::vector<GameObject*>& objects,
const TriangleRef& ref = roomTriRefs[rm.firstTriRef + ti];
if (ref.objectIndex >= objects.size()) continue;
GameObject* obj = objects[ref.objectIndex];
if (!obj->isActive()) continue;
if (ref.triangleIndex >= obj->polyCount) continue;
if (ref.objectIndex != lastObj) { lastObj = ref.objectIndex; setupObjectTransform(obj, cameraPosition); }
processTriangle(obj->polygons[ref.triangleIndex], fogFarSZ, ot, balloc);