cutscene system
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user