1
1
forked from 0ad/0ad

In preparation of renaming and grouping main.cpp shutdown variables:

Declare the g_GameRestarted hack from 12f0720f31 in main.cpp, because it
is main.cpp and Game.cpp who provide it's value.
Move the comment so that the connotation becomes clear when reading
main.cpp.

Remove the extern declaration introduced to the Renderer in fb035d08e3
that became obsolete with ed7c66eb82.

This was SVN commit r21816.
This commit is contained in:
elexis 2018-05-08 09:24:16 +00:00
parent 16fbe90342
commit 4c73614955
5 changed files with 8 additions and 6 deletions

View File

@ -48,7 +48,7 @@
#include "simulation2/components/ICmpMinimap.h"
#include "simulation2/system/ParamNode.h"
bool g_GameRestarted = false;
extern bool g_GameRestarted;
// Set max drawn entities to UINT16_MAX for now, which is more than enough
// TODO: we should be cleverer about drawing them to reduce clutter

View File

@ -89,11 +89,13 @@ that of Atlas depending on commandline parameters.
#define getpid _getpid // Use the non-deprecated function name
#endif
extern bool g_GameRestarted;
extern CStrW g_UniqueLogPostfix;
void kill_mainloop();
// Marks terrain as modified so the minimap can repaint (is there a cleaner way of handling this?)
bool g_GameRestarted = false;
// to avoid redundant and/or recursive resizing, we save the new
// size after VIDEORESIZE messages and only update the video mode
// once per frame.

View File

@ -333,7 +333,6 @@ PSRETURN CGame::ReallyStartGame()
if (CProfileManager::IsInitialised())
g_Profiler.StructuralReset();
// Mark terrain as modified so the minimap can repaint (is there a cleaner way of handling this?)
g_GameRestarted = true;
return 0;

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2014 Wildfire Games.
/* Copyright (C) 2018 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -19,6 +19,9 @@
// usually defined by main.cpp, used by engine's scripting/ScriptFunctions.cpp,
// must be included here to placate linker.
bool g_GameRestarted;
void kill_mainloop()
{
}

View File

@ -75,8 +75,6 @@
#include "renderer/WaterManager.h"
#include "scriptinterface/ScriptInterface.h"
extern bool g_GameRestarted;
struct SScreenRect
{
GLint x1, y1, x2, y2;