mirror of
				https://github.com/vcmi/vcmi.git
				synced 2025-10-31 00:07:39 +02:00 
			
		
		
		
	Reduced SDL includes
This commit is contained in:
		| @@ -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" | ||||
|   | ||||
| @@ -56,6 +56,7 @@ | ||||
|  | ||||
| #include "mainmenu/CPrologEpilogVideo.h" | ||||
| #include <vstd/StringUtils.h> | ||||
| #include <SDL.h> | ||||
|  | ||||
| #ifdef VCMI_WINDOWS | ||||
| #include "SDL_syswm.h" | ||||
|   | ||||
| @@ -9,7 +9,7 @@ | ||||
|  */ | ||||
| #include "StdInc.h" | ||||
| #include <SDL_mixer.h> | ||||
| #include <SDL.h> | ||||
| #include <SDL_timer.h> | ||||
|  | ||||
| #include "CMusicHandler.h" | ||||
| #include "CGameInfo.h" | ||||
|   | ||||
| @@ -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" | ||||
|   | ||||
| @@ -8,7 +8,6 @@ | ||||
|  * | ||||
|  */ | ||||
| #include "StdInc.h" | ||||
| #include <SDL.h> | ||||
| #include "CVideoHandler.h" | ||||
|  | ||||
| #include "gui/CGuiHandler.h" | ||||
|   | ||||
| @@ -10,8 +10,6 @@ | ||||
| #include "StdInc.h" | ||||
| #include "Client.h" | ||||
|  | ||||
| #include <SDL.h> | ||||
|  | ||||
| #include "CMusicHandler.h" | ||||
| #include "../lib/mapping/CCampaignHandler.h" | ||||
| #include "../CCallback.h" | ||||
|   | ||||
| @@ -11,7 +11,7 @@ | ||||
| #include "CGuiHandler.h" | ||||
| #include "../lib/CondSh.h" | ||||
|  | ||||
| #include <SDL.h> | ||||
| #include <SDL_timer.h> | ||||
|  | ||||
| #include "CIntObject.h" | ||||
| #include "CursorHandler.h" | ||||
|   | ||||
| @@ -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); | ||||
|  | ||||
|   | ||||
| @@ -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) | ||||
| { | ||||
|   | ||||
| @@ -63,7 +63,7 @@ public: | ||||
|  | ||||
| 	static const SDL_Color BLACK; | ||||
|  | ||||
| 	static const SDL_Color TRANSPARENT; | ||||
| 	static const SDL_Color TRANSPARENCY; | ||||
| }; | ||||
|  | ||||
| namespace CSDL_Ext | ||||
|   | ||||
| @@ -13,7 +13,6 @@ | ||||
| #include "../lib/int3.h" | ||||
| #include "../lib/spells/ViewSpellInt.h" | ||||
| #include "../lib/Rect.h" | ||||
| #include "SDL.h" | ||||
|  | ||||
| #ifdef IN | ||||
| #undef IN | ||||
|   | ||||
| @@ -10,7 +10,7 @@ | ||||
| #include "StdInc.h" | ||||
| #include "AdventureMapClasses.h" | ||||
|  | ||||
| #include <SDL.h> | ||||
| #include <SDL_timer.h> | ||||
|  | ||||
| #include "MiscWidgets.h" | ||||
| #include "CComponent.h" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user