mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-11 23:50:51 +02:00
Removed RenderedFrameObjects and replaced with lastFrameRendered.
This commit is contained in:
@@ -84,10 +84,8 @@
|
||||
*/
|
||||
#include "SidebarGlyphx.h"
|
||||
|
||||
std::vector<const ObjectClass*> renderedFrameObjects;
|
||||
|
||||
bool HasRenderedObject(const ObjectClass* technoClass) {
|
||||
return std::find(renderedFrameObjects.begin(), renderedFrameObjects.end(), technoClass) != renderedFrameObjects.end();
|
||||
return technoClass->lastRenderTime == g_startFrameTime;
|
||||
}
|
||||
|
||||
/***********************************************************************************************
|
||||
@@ -1445,7 +1443,7 @@ void CellClass::Draw_It(int x, int y, bool objects)
|
||||
continue;
|
||||
}
|
||||
|
||||
renderedFrameObjects.push_back(object);
|
||||
object->lastRenderTime = g_startFrameTime;
|
||||
int xx,yy;
|
||||
if (object->IsToDisplay && (!object->Is_Techno() || ((TechnoClass *)object)->Visual_Character() == VISUAL_NORMAL) && Map.Coord_To_Pixel(object->Render_Coord(), xx, yy)) {
|
||||
{
|
||||
|
||||
@@ -55,6 +55,8 @@ class TriggerClass;
|
||||
class ObjectClass : public AbstractClass
|
||||
{
|
||||
public:
|
||||
int lastRenderTime;
|
||||
|
||||
/*
|
||||
** The object can be in one of two states -- placed down on the map, or not. If the
|
||||
** object is placed down on the map, then this flag will be true.
|
||||
|
||||
@@ -81,8 +81,6 @@ SDL_GLContext game_context;
|
||||
int OverlappedVideoBlits = 0;
|
||||
float animFrameNum = 0;
|
||||
|
||||
extern std::vector<const ObjectClass*> renderedFrameObjects;
|
||||
|
||||
bool renderConsole = false;
|
||||
|
||||
void (*Misc_Focus_Loss_Function)(void) = nullptr;
|
||||
@@ -606,9 +604,7 @@ void ImGui_NewFrame(void) {
|
||||
ImGui_ImplOpenGL3_NewFrame();
|
||||
ImGui::NewFrame(show_oldframebuffer);
|
||||
|
||||
ImGui_ImplSDL2_NewFrame(game_window);
|
||||
|
||||
renderedFrameObjects.clear();
|
||||
ImGui_ImplSDL2_NewFrame(game_window);
|
||||
}
|
||||
|
||||
void Device_Present(void) {
|
||||
|
||||
Reference in New Issue
Block a user