mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-23 12:08:45 +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/CCursorHandler.h"
|
||||||
#include "../UIFramework/CGuiHandler.h"
|
#include "../UIFramework/CGuiHandler.h"
|
||||||
|
#include "../CMT.h"
|
||||||
|
|
||||||
#ifndef __GNUC__
|
#ifndef __GNUC__
|
||||||
const double M_PI = 3.14159265358979323846;
|
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;
|
CondSh<bool> CBattleInterface::animsAreDisplayed;
|
||||||
|
|
||||||
struct CMP_stack2
|
struct CMP_stack2
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
#include "UIFramework/CGuiHandler.h"
|
#include "UIFramework/CGuiHandler.h"
|
||||||
#include "UIFramework/CIntObjectClasses.h"
|
#include "UIFramework/CIntObjectClasses.h"
|
||||||
|
#include "CMT.h"
|
||||||
|
|
||||||
#undef min
|
#undef min
|
||||||
|
|
||||||
@ -38,7 +39,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
|
||||||
using namespace boost::assign;
|
using namespace boost::assign;
|
||||||
|
|
||||||
const TBonusListPtr CHeroWithMaybePickedArtifact::getAllBonuses(const CSelector &selector, const CSelector &limit, const CBonusSystemNode *root /*= NULL*/, const std::string &cachingStr /*= ""*/) const
|
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 "CPlayerInterface.h" //LOCPLINT
|
||||||
#include "UIFramework/CGuiHandler.h"
|
#include "UIFramework/CGuiHandler.h"
|
||||||
#include "UIFramework/CIntObjectClasses.h"
|
#include "UIFramework/CIntObjectClasses.h"
|
||||||
|
#include "CMT.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CKingdomInterface.cpp, part of VCMI engine
|
* CKingdomInterface.cpp, part of VCMI engine
|
||||||
@ -27,8 +28,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface *screenBuf;
|
|
||||||
|
|
||||||
InfoBox::InfoBox(Point position, InfoPos Pos, InfoSize Size, IInfoBoxData *Data):
|
InfoBox::InfoBox(Point position, InfoPos Pos, InfoSize Size, IInfoBoxData *Data):
|
||||||
size(Size),
|
size(Size),
|
||||||
infoPos(Pos),
|
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 COMPONENT_TO_SUBTITLE = 17;
|
||||||
const int BETWEEN_COMPS_ROWS = 10;
|
const int BETWEEN_COMPS_ROWS = 10;
|
||||||
const int BEFORE_COMPONENTS = 30;
|
const int BEFORE_COMPONENTS = 30;
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#include "../lib/BattleState.h"
|
#include "../lib/BattleState.h"
|
||||||
#include "../lib/GameConstants.h"
|
#include "../lib/GameConstants.h"
|
||||||
#include "UIFramework/CGuiHandler.h"
|
#include "UIFramework/CGuiHandler.h"
|
||||||
|
#include "CMT.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CSpellWindow.cpp, part of VCMI engine
|
* CSpellWindow.cpp, part of VCMI engine
|
||||||
@ -30,8 +31,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
|
||||||
|
|
||||||
SpellbookInteractiveArea::SpellbookInteractiveArea(const SDL_Rect & myRect, boost::function<void()> funcL,
|
SpellbookInteractiveArea::SpellbookInteractiveArea(const SDL_Rect & myRect, boost::function<void()> funcL,
|
||||||
const std::string & textR, boost::function<void()> funcHon, boost::function<void()> funcHoff, CPlayerInterface * _myInt)
|
const std::string & textR, boost::function<void()> funcHon, boost::function<void()> funcHoff, CPlayerInterface * _myInt)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,7 @@
|
|||||||
#include "SDL_Extensions.h"
|
#include "SDL_Extensions.h"
|
||||||
#include "../CAnimation.h"
|
#include "../CAnimation.h"
|
||||||
#include "CGuiHandler.h"
|
#include "CGuiHandler.h"
|
||||||
|
#include "../CMT.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* CCursorHandler.cpp, part of VCMI engine
|
* CCursorHandler.cpp, part of VCMI engine
|
||||||
@ -16,8 +17,6 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
|
||||||
|
|
||||||
void CCursorHandler::initCursor()
|
void CCursorHandler::initCursor()
|
||||||
{
|
{
|
||||||
xpos = ypos = 0;
|
xpos = ypos = 0;
|
||||||
|
@ -7,8 +7,8 @@
|
|||||||
#include "CCursorHandler.h"
|
#include "CCursorHandler.h"
|
||||||
#include "../../lib/CThreadHelper.h"
|
#include "../../lib/CThreadHelper.h"
|
||||||
#include "../../lib/CConfigHandler.h"
|
#include "../../lib/CConfigHandler.h"
|
||||||
|
#include "../CMT.h"
|
||||||
|
|
||||||
extern SDL_Surface * screenBuf, * screen2, * screen;
|
|
||||||
extern std::queue<SDL_Event> events;
|
extern std::queue<SDL_Event> events;
|
||||||
extern boost::mutex eventsM;
|
extern boost::mutex eventsM;
|
||||||
|
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#include "StdInc.h"
|
#include "StdInc.h"
|
||||||
#include "Geometries.h"
|
#include "Geometries.h"
|
||||||
|
#include "../CMT.h"
|
||||||
extern SDL_Surface * screen;
|
|
||||||
|
|
||||||
Rect Rect::createCentered( int w, int h )
|
Rect Rect::createCentered( int w, int h )
|
||||||
{
|
{
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
#include "../lib/CGeneralTextHandler.h"
|
#include "../lib/CGeneralTextHandler.h"
|
||||||
#include "../lib/GameConstants.h"
|
#include "../lib/GameConstants.h"
|
||||||
#include "../lib/CStopWatch.h"
|
#include "../lib/CStopWatch.h"
|
||||||
|
#include "CMT.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mapHandler.cpp, part of VCMI engine
|
* mapHandler.cpp, part of VCMI engine
|
||||||
@ -29,7 +30,6 @@
|
|||||||
const bool MARK_BLOCKED_POSITIONS = false;
|
const bool MARK_BLOCKED_POSITIONS = false;
|
||||||
const bool MARK_VISITABLE_POSITIONS = false;
|
const bool MARK_VISITABLE_POSITIONS = false;
|
||||||
|
|
||||||
extern SDL_Surface * screen;
|
|
||||||
#define ADVOPT (conf.go()->ac)
|
#define ADVOPT (conf.go()->ac)
|
||||||
|
|
||||||
std::string nameFromType (int typ)
|
std::string nameFromType (int typ)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user