Browse Source

SDL1 wipe, part 3. Untested.

AlexVinS 10 years ago
parent
commit
8c236e30bb

+ 0 - 3
client/CVideoHandler.h

@@ -47,9 +47,6 @@ public:
 
 #include <SDL.h>
 #include <SDL_video.h>
-#if SDL_VERSION_ATLEAST(1,3,0) && !SDL_VERSION_ATLEAST(2,0,0)
-#include <SDL_compat.h>
-#endif
 
 extern "C" {
 #include <libavformat/avformat.h>

+ 0 - 3
client/gui/CGuiHandler.cpp

@@ -398,13 +398,10 @@ void CGuiHandler::renderFrame()
 		// draw the mouse cursor and update the screen
 		CCS->curh->render();
 
-		#ifndef	VCMI_SDL1
 		if(0 != SDL_RenderCopy(mainRenderer, screenTexture, nullptr, nullptr))
 			logGlobal->errorStream() << __FUNCTION__ << " SDL_RenderCopy " << SDL_GetError();
 
 		SDL_RenderPresent(mainRenderer);				
-		#endif		
-		
 	};
 	
 	if(curInt)

+ 0 - 6
client/gui/SDL_Compat.h

@@ -13,7 +13,6 @@
 #include <SDL_version.h>
 
 #if (SDL_MAJOR_VERSION == 2)
-#define VCMI_SDL2
 
 #include <SDL_keycode.h>
 typedef int SDLX_Coord;
@@ -25,11 +24,6 @@ typedef SDL_Keycode SDLKey;
 
 #define SDL_FULLSCREEN SDL_WINDOW_FULLSCREEN
 
-#elif (SDL_MAJOR_VERSION == 1) 
-#define VCMI_SDL1
-//SDL 1.x
-typedef Sint16 SDLX_Coord;
-typedef Uint16 SDLX_Size;
 #else
 #error "unknown or unsupported SDL version"
 #endif

+ 0 - 2
client/gui/SDL_Extensions.cpp

@@ -14,7 +14,6 @@ const SDL_Color Colors::METALLIC_GOLD = { 173, 142, 66, 0 };
 const SDL_Color Colors::GREEN = { 0, 255, 0, 0 };
 const SDL_Color Colors::DEFAULT_KEY_COLOR = {0, 255, 255, 0};
 
-#if (SDL_MAJOR_VERSION == 2)
 void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h)
 {
 	Rect rect(x,y,w,h);
@@ -27,7 +26,6 @@ void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h)
 	SDL_RenderPresent(mainRenderer);	
 	
 }
-#endif // VCMI_SDL1
 
 SDL_Surface * CSDL_Ext::newSurface(int w, int h, SDL_Surface * mod) //creates new surface, with flags/format same as in surface given
 {

+ 0 - 8
client/gui/SDL_Extensions.h

@@ -27,13 +27,6 @@
 	#define STRONG_INLINE inline
 #endif
 
-#if SDL_VERSION_ATLEAST(1,3,0)
-#define SDL_GetKeyState SDL_GetKeyboardState
-#endif
-
-//SDL2 support
-#if (SDL_MAJOR_VERSION == 2)
-
 extern SDL_Window * mainWindow;
 extern SDL_Renderer * mainRenderer;
 extern SDL_Texture * screenTexture;
@@ -49,7 +42,6 @@ inline void SDL_WarpMouse(int x, int y)
 }
 
 void SDL_UpdateRect(SDL_Surface *surface, int x, int y, int w, int h);
-#endif
 
 inline bool isCtrlKeyDown()
 {