mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-13 11:40:38 +02:00
replaced extern SDL_Surface* X; all over the code with single header
This commit is contained in:
parent
619a07da03
commit
f2309d70dd
@ -31,6 +31,7 @@
|
||||
|
||||
#include "../UIFramework/CCursorHandler.h"
|
||||
#include "../UIFramework/CGuiHandler.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
#ifndef __GNUC__
|
||||
const double M_PI = 3.14159265358979323846;
|
||||
@ -54,8 +55,6 @@ const time_t CBattleInterface::HOVER_ANIM_DELTA = 1;
|
||||
*
|
||||
*/
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
|
||||
CondSh<bool> CBattleInterface::animsAreDisplayed;
|
||||
|
||||
struct CMP_stack2
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
#include "UIFramework/CGuiHandler.h"
|
||||
#include "UIFramework/CIntObjectClasses.h"
|
||||
#include "CMT.h"
|
||||
|
||||
#undef min
|
||||
|
||||
@ -38,7 +39,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
using namespace boost::assign;
|
||||
|
||||
const TBonusListPtr CHeroWithMaybePickedArtifact::getAllBonuses(const CSelector &selector, const CSelector &limit, const CBonusSystemNode *root /*= NULL*/, const std::string &cachingStr /*= ""*/) const
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "CPlayerInterface.h" //LOCPLINT
|
||||
#include "UIFramework/CGuiHandler.h"
|
||||
#include "UIFramework/CIntObjectClasses.h"
|
||||
#include "CMT.h"
|
||||
|
||||
/*
|
||||
* CKingdomInterface.cpp, part of VCMI engine
|
||||
@ -27,8 +28,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern SDL_Surface *screenBuf;
|
||||
|
||||
InfoBox::InfoBox(Point position, InfoPos Pos, InfoSize Size, IInfoBoxData *Data):
|
||||
size(Size),
|
||||
infoPos(Pos),
|
||||
|
5
client/CMT.h
Normal file
5
client/CMT.h
Normal file
@ -0,0 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
extern SDL_Surface *screen; // main screen surface
|
||||
extern SDL_Surface *screen2; // and hlp surface (used to store not-active interfaces layer)
|
||||
extern SDL_Surface *screenBuf; // points to screen (if only advmapint is present) or screen2 (else) - should be used when updating controls which are not regularly redrawed
|
@ -23,8 +23,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
//extern SDL_Surface * screen;
|
||||
|
||||
const int COMPONENT_TO_SUBTITLE = 17;
|
||||
const int BETWEEN_COMPS_ROWS = 10;
|
||||
const int BEFORE_COMPONENTS = 30;
|
||||
|
@ -19,6 +19,7 @@
|
||||
#include "../lib/BattleState.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "UIFramework/CGuiHandler.h"
|
||||
#include "CMT.h"
|
||||
|
||||
/*
|
||||
* CSpellWindow.cpp, part of VCMI engine
|
||||
@ -30,8 +31,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
|
||||
SpellbookInteractiveArea::SpellbookInteractiveArea(const SDL_Rect & myRect, boost::function<void()> funcL,
|
||||
const std::string & textR, boost::function<void()> funcHon, boost::function<void()> funcHoff, CPlayerInterface * _myInt)
|
||||
{
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include "SDL_Extensions.h"
|
||||
#include "../CAnimation.h"
|
||||
#include "CGuiHandler.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
/*
|
||||
* CCursorHandler.cpp, part of VCMI engine
|
||||
@ -16,8 +17,6 @@
|
||||
*
|
||||
*/
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
|
||||
void CCursorHandler::initCursor()
|
||||
{
|
||||
xpos = ypos = 0;
|
||||
|
@ -7,8 +7,8 @@
|
||||
#include "CCursorHandler.h"
|
||||
#include "../../lib/CThreadHelper.h"
|
||||
#include "../../lib/CConfigHandler.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
extern SDL_Surface * screenBuf, * screen2, * screen;
|
||||
extern std::queue<SDL_Event> events;
|
||||
extern boost::mutex eventsM;
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
#include "StdInc.h"
|
||||
#include "Geometries.h"
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
#include "../CMT.h"
|
||||
|
||||
Rect Rect::createCentered( int w, int h )
|
||||
{
|
||||
|
@ -15,6 +15,7 @@
|
||||
#include "../lib/CGeneralTextHandler.h"
|
||||
#include "../lib/GameConstants.h"
|
||||
#include "../lib/CStopWatch.h"
|
||||
#include "CMT.h"
|
||||
|
||||
/*
|
||||
* mapHandler.cpp, part of VCMI engine
|
||||
@ -29,7 +30,6 @@
|
||||
const bool MARK_BLOCKED_POSITIONS = false;
|
||||
const bool MARK_VISITABLE_POSITIONS = false;
|
||||
|
||||
extern SDL_Surface * screen;
|
||||
#define ADVOPT (conf.go()->ac)
|
||||
|
||||
std::string nameFromType (int typ)
|
||||
|
Loading…
x
Reference in New Issue
Block a user