/* ** Command & Conquer Generals(tm) ** Copyright 2025 Electronic Arts Inc. ** ** This program is free software: you can redistribute it and/or modify ** it under the terms of the GNU General Public License as published by ** the Free Software Foundation, either version 3 of the License, or ** (at your option) any later version. ** ** This program is distributed in the hope that it will be useful, ** but WITHOUT ANY WARRANTY; without even the implied warranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** ** You should have received a copy of the GNU General Public License ** along with this program. If not, see . */ //////////////////////////////////////////////////////////////////////////////// // // // (c) 2001-2003 Electronic Arts Inc. // // // //////////////////////////////////////////////////////////////////////////////// // FILE: GlobalData.h ///////////////////////////////////////////////////////////////////////////// // Global data used by both the client and logic // Author: trolfs, Michae Booth, Colin Day, April 2001 /////////////////////////////////////////////////////////////////////////////////////////////////// #pragma once #ifndef _GLOBALDATA_H_ #define _GLOBALDATA_H_ #include "Common/GameCommon.h" // ensure we get DUMP_PERF_STATS, or not #include "Common/AsciiString.h" #include "Common/GameType.h" #include "Common/GameMemory.h" #include "Common/SubsystemInterface.h" #include "GameClient/Color.h" #include "Common/STLTypedefs.h" // FORWARD DECLARATIONS /////////////////////////////////////////////////////////////////////////// struct FieldParse; typedef enum _TerrainLOD; class GlobalData; class INI; class WeaponBonusSet; enum BodyDamageType; enum AIDebugOptions; // PUBLIC ///////////////////////////////////////////////////////////////////////////////////////// const Int MAX_GLOBAL_LIGHTS = 3; //------------------------------------------------------------------------------------------------- /** Global data container class * Defines all global game data used by the system * @todo Change this entire system. Otherwise this will end up a huge class containing tons of variables, * and will cause re-compilation dependancies throughout the codebase. */ //------------------------------------------------------------------------------------------------- class GlobalData : public SubsystemInterface { public: GlobalData(); virtual ~GlobalData(); void init(); void reset(); void update() { } Bool setTimeOfDay( TimeOfDay tod ); ///< Use this function to set the Time of day; static void parseGameDataDefinition( INI* ini ); //----------------------------------------------------------------------------------------------- struct TerrainLighting { RGBColor ambient; RGBColor diffuse; Coord3D lightPos; }; //----------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------- //----------------------------------------------------------------------------------------------- AsciiString m_mapName; ///< hack for now, this whole this is going away AsciiString m_moveHintName; Bool m_useTrees; Bool m_useTreeSway; Bool m_useDrawModuleLOD; Bool m_useFpsLimit; Bool m_dumpAssetUsage; Int m_framesPerSecondLimit; Int m_chipSetType; /// m_standardPublicBones; Real m_standardMinefieldDensity; Real m_standardMinefieldDistance; Bool m_showMetrics; ///< whether or not to show the metrics. Int m_defaultStartingCash; ///< The amount of cash a player starts with by default. Bool m_debugShowGraphicalFramerate; ///< Whether or not to show the graphical framerate bar. Int m_powerBarBase; ///< Logrithmic base for the power bar scale Real m_powerBarIntervals; ///< how many logrithmic intervals the width will be divided into Int m_powerBarYellowRange; ///< Red if consumption exceeds production, yellow if consumption this close but under, green if further under Real m_displayGamma; ///