1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-04-11 11:31:52 +02:00

Reduced SDL includes

This commit is contained in:
Ivan Savenko 2023-01-18 16:54:53 +02:00
parent aae83af9f3
commit fc0f5a9fb3
12 changed files with 10 additions and 16 deletions

View File

@ -10,8 +10,7 @@
#include "StdInc.h"
#include "../lib/filesystem/Filesystem.h"
#include "SDL.h"
#include "SDL_image.h"
#include <SDL_image.h>
#include "CBitmapHandler.h"
#include "gui/SDL_Extensions.h"
#include "../lib/vcmi_endian.h"

View File

@ -56,6 +56,7 @@
#include "mainmenu/CPrologEpilogVideo.h"
#include <vstd/StringUtils.h>
#include <SDL.h>
#ifdef VCMI_WINDOWS
#include "SDL_syswm.h"

View File

@ -9,7 +9,7 @@
*/
#include "StdInc.h"
#include <SDL_mixer.h>
#include <SDL.h>
#include <SDL_timer.h>
#include "CMusicHandler.h"
#include "CGameInfo.h"

View File

@ -63,7 +63,7 @@
#include "../lib/CPathfinder.h"
#include "../lib/RoadHandler.h"
#include "../lib/TerrainHandler.h"
#include <SDL.h>
#include <SDL_timer.h>
#include "CServerHandler.h"
// FIXME: only needed for CGameState::mutex
#include "../lib/CGameState.h"

View File

@ -8,7 +8,6 @@
*
*/
#include "StdInc.h"
#include <SDL.h>
#include "CVideoHandler.h"
#include "gui/CGuiHandler.h"

View File

@ -10,8 +10,6 @@
#include "StdInc.h"
#include "Client.h"
#include <SDL.h>
#include "CMusicHandler.h"
#include "../lib/mapping/CCampaignHandler.h"
#include "../CCallback.h"

View File

@ -11,7 +11,7 @@
#include "CGuiHandler.h"
#include "../lib/CondSh.h"
#include <SDL.h>
#include <SDL_timer.h>
#include "CIntObject.h"
#include "CursorHandler.h"

View File

@ -11,8 +11,6 @@
#include "StdInc.h"
#include "CursorHandler.h"
#include <SDL.h>
#include "SDL_Extensions.h"
#include "CGuiHandler.h"
#include "CAnimation.h"
@ -345,7 +343,7 @@ void CursorSoftware::updateTexture()
if (!cursorSurface || Point(cursorSurface->w, cursorSurface->h) != cursorImage->dimensions())
createTexture(cursorImage->dimensions());
CSDL_Ext::fillSurface(cursorSurface, Colors::TRANSPARENT);
CSDL_Ext::fillSurface(cursorSurface, Colors::TRANSPARENCY);
cursorImage->draw(cursorSurface);
SDL_UpdateTexture(cursorTexture, NULL, cursorSurface->pixels, cursorSurface->pitch);
@ -413,7 +411,7 @@ void CursorHardware::setImage(std::shared_ptr<IImage> image, const Point & pivot
{
auto cursorSurface = CSDL_Ext::newSurface(image->dimensions().x, image->dimensions().y);
CSDL_Ext::fillSurface(cursorSurface, Colors::TRANSPARENT);
CSDL_Ext::fillSurface(cursorSurface, Colors::TRANSPARENCY);
image->draw(cursorSurface);

View File

@ -39,7 +39,7 @@ const SDL_Color Colors::DEFAULT_KEY_COLOR = {0, 255, 255, SDL_ALPHA_OPAQUE};
const SDL_Color Colors::RED = {255, 0, 0, SDL_ALPHA_OPAQUE};
const SDL_Color Colors::PURPLE = {255, 75, 125, SDL_ALPHA_OPAQUE};
const SDL_Color Colors::BLACK = {0, 0, 0, SDL_ALPHA_OPAQUE};
const SDL_Color Colors::TRANSPARENT = {0, 0, 0, SDL_ALPHA_TRANSPARENT};
const SDL_Color Colors::TRANSPARENCY = {0, 0, 0, SDL_ALPHA_TRANSPARENT};
Rect CSDL_Ext::genRect(const int & hh, const int & ww, const int & xx, const int & yy)
{

View File

@ -63,7 +63,7 @@ public:
static const SDL_Color BLACK;
static const SDL_Color TRANSPARENT;
static const SDL_Color TRANSPARENCY;
};
namespace CSDL_Ext

View File

@ -13,7 +13,6 @@
#include "../lib/int3.h"
#include "../lib/spells/ViewSpellInt.h"
#include "../lib/Rect.h"
#include "SDL.h"
#ifdef IN
#undef IN

View File

@ -10,7 +10,7 @@
#include "StdInc.h"
#include "AdventureMapClasses.h"
#include <SDL.h>
#include <SDL_timer.h>
#include "MiscWidgets.h"
#include "CComponent.h"