Inexor
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Macros | Functions
SDL_loading.cpp File Reference

Wrapper for the SDL API calls used to load textures. More...

#include <algorithm>
#include "SDL_blendmode.h"
#include "SDL_endian.h"
#include "SDL_image.h"
#include "SDL_pixels.h"
#include "inexor/io/legacy/stream.hpp"
#include "inexor/shared/cube_loops.hpp"
#include "inexor/shared/cube_types.hpp"
#include "inexor/shared/tools.hpp"
#include "inexor/texture/SDL_loading.hpp"

Macros

#define RGBAMASKS   0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff
 
#define RGBMASKS   0xff0000, 0x00ff00, 0x0000ff, 0
 

Functions

SDL_Surface * wrapsurface (void *data, int width, int height, int bpp)
 
SDL_Surface * creatergbsurface (SDL_Surface *os)
 
SDL_Surface * creatergbasurface (SDL_Surface *os)
 
bool checkgrayscale (SDL_Surface *s)
 
SDL_Surface * fixsurfaceformat (SDL_Surface *s)
 
bool canloadsurface (const char *name)
 
SDL_Surface * loadsurface (const char *name)
 

Detailed Description

Wrapper for the SDL API calls used to load textures.

Macro Definition Documentation

#define RGBAMASKS   0xff000000, 0x00ff0000, 0x0000ff00, 0x000000ff
#define RGBMASKS   0xff0000, 0x00ff00, 0x0000ff, 0

Function Documentation

bool canloadsurface ( const char *  name)

References f(), and openfile().

Referenced by texturedata().

bool checkgrayscale ( SDL_Surface *  s)

References loopi().

Referenced by fixsurfaceformat().

SDL_Surface* creatergbasurface ( SDL_Surface *  os)

References RGBAMASKS.

Referenced by fixsurfaceformat().

SDL_Surface* creatergbsurface ( SDL_Surface *  os)

References RGBMASKS.

Referenced by fixsurfaceformat().

SDL_Surface* fixsurfaceformat ( SDL_Surface *  s)
SDL_Surface* loadsurface ( const char *  name)

References findfile(), and fixsurfaceformat().

Referenced by loadimage(), and texturedata().

SDL_Surface* wrapsurface ( void data,
int  width,
int  height,
int  bpp 
)

References RGBAMASKS, and RGBMASKS.

Referenced by saveimage().