mirror of
https://github.com/vcmi/vcmi.git
synced 2025-12-01 23:12:49 +02:00
Removed some instances of access to screen surface
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
|
||||
#include "../render/Graphics.h"
|
||||
#include "../render/Colors.h"
|
||||
#include "../CMT.h"
|
||||
|
||||
#include <SDL_render.h>
|
||||
|
||||
@@ -97,6 +98,11 @@ void CSDL_Ext::updateRect(SDL_Surface *surface, const Rect & rect )
|
||||
|
||||
}
|
||||
|
||||
SDL_Surface * CSDL_Ext::newSurface(int w, int h)
|
||||
{
|
||||
return newSurface(w, h, screen);
|
||||
}
|
||||
|
||||
SDL_Surface * CSDL_Ext::newSurface(int w, int h, SDL_Surface * mod) //creates new surface, with flags/format same as in surface given
|
||||
{
|
||||
SDL_Surface * ret = SDL_CreateRGBSurface(0,w,h,mod->format->BitsPerPixel,mod->format->Rmask,mod->format->Gmask,mod->format->Bmask,mod->format->Amask);
|
||||
|
||||
Reference in New Issue
Block a user