|
SDLGameEngine
|
Main include file, the only one you should include directly. Defines a few macros and includes the other required files, see below for details. More...
#include <SDL.h>#include <SDL_image.h>#include <SDL_mixer.h>#include <SDL_audio.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <sys/types.h>#include <sys/stat.h>#include <unistd.h>#include <fcntl.h>#include <time.h>#include <math.h>#include <sgedefines.h>#include <sgestring.h>#include <sgeinit.h>#include <sgegp2x.h>#include <sgemisc.h>#include <sgelist.h>#include <sgearray.h>#include <sgescreen.h>#include <sgecontrol.h>#include <sgegfx.h>#include <sgeresource.h>#include <sgeevent.h>#include <sgesound.h>#include <sgespriteimage.h>#include <sgesprite.h>#include <sgespritegroup.h>#include <sgestage.h>#include <sgegamestate.h>#include <sgefont.h>#include <sgepathfinder.h>#include <sgeparticles.h>#include <sgefadefx.h>#include <../thirdparty/md5/md5.h>#include <../thirdparty/sha1-c/sha1.h>Go to the source code of this file.
Defines | |
| #define | sgeLock(surface) |
| Lock a surface. | |
| #define | sgeUnlock(surface) |
| Unlock a surface. | |
| #define | sgeBailOut(format, args...) |
| Hard exit. | |
| #define | sgeMalloc(target, type, amount) |
| Allocate ram, fill with 0. | |
| #define | sgeMallocNoInit(target, type, amount) |
| Allocate ram, uninitialized. | |
| #define | sgeRealloc(target, type, amount) |
| Resize allocated ram. | |
| #define | sgeNew(target, type) sgeMalloc(target,type,1); |
| Create one object (aka struct) | |
| #define | sgeFree(target) |
| Free the object. | |
| #define | sgeRandom(from, range) (from + (int) ((float)(range+1) * (rand() / (RAND_MAX + (float)from)))) |
| Get a random integer. | |
| #define | sgeRandomFloat(from, range) (float) ((float)from + ((float)(range+1) * (rand() / (RAND_MAX + (float)from)))) |
| Get a random float. | |
| #define | sgeByteSwap16(val) (val) |
| swap byteorder on big endian, otherwise do nothing | |
| #define | sgeByteSwap32(val) (val) |
| swap byteorder on big endian, otherwise do nothing | |
| #define | sgeRound(val) round(val) |
| round a integer value, if there is no c lib function available | |
| #define | MAX(x, y) ((x) > (y) ? (x) : (y)) |
| define MAX if not already there | |
| #define | MIN(x, y) ((x) < (y) ? (x) : (y)) |
| define MIN if not already there | |
| #define | MINMAX(value, lower, upper) MIN(MAX((value), (lower)), (upper)) |
| keep a number in a certain range | |
Main include file, the only one you should include directly. Defines a few macros and includes the other required files, see below for details.
Definition in file sge.h.