don't use SDL in Load_surface() anymore

So the init phase does not depend on SDL anymore.

Signed-off-by: Thomas Bernard <miniupnp@free.fr>
This commit is contained in:
Thomas Bernard
2018-05-28 11:54:59 +02:00
parent 72fea0290f
commit a6c948b27e
9 changed files with 234 additions and 110 deletions

View File

@@ -309,7 +309,7 @@ SDL_Color Color_to_SDL_color(byte index)
}
/// Reads a pixel in a 8-bit SDL surface.
byte Get_SDL_pixel_8(SDL_Surface *bmp, int x, int y)
byte Get_SDL_pixel_8(const SDL_Surface *bmp, int x, int y)
{
return ((byte *)(bmp->pixels))[(y*bmp->pitch+x)];
}
@@ -322,7 +322,7 @@ void Set_SDL_pixel_8(SDL_Surface *bmp, int x, int y, byte color)
/// Reads a pixel in a multi-byte SDL surface.
dword Get_SDL_pixel_hicolor(SDL_Surface *bmp, int x, int y)
dword Get_SDL_pixel_hicolor(const SDL_Surface *bmp, int x, int y)
{
byte * ptr;