GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
prerequisites.h File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
Include dependency graph for prerequisites.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SDL_RWops
struct  SDL_AudioSpec

Macros

#define SDL_Error(code)
#define SDL_SetError(...)
#define SDL_calloc   calloc
#define SDL_malloc   malloc
#define SDL_free   free
#define Mix_SetError   SDL_SetError
#define DECLSPEC
#define SDLCALL
#define HAVE_STDARG_H   1
#define HAVE_STDDEF_H   1
#define HAVE_STDIO_H   1
#define HAVE_STDINT_H   1
#define SDL_OutOfMemory()
#define SDL_RWOPS_UNKNOWN   0U
#define SDL_RWOPS_STDFILE   2U
#define SDL_RWOPS_MEMORY   4U
#define SDL_RWOPS_MEMORY_RO   5U
#define RW_SEEK_SET   0
#define RW_SEEK_CUR   1
#define RW_SEEK_END   2
#define SDL_RWseek(ctx, offset, whence)
#define SDL_RWclose(ctx)
#define fseek_off_t   long
#define SDL_MIX_MAXVOLUME   (128)
#define MIX_MAX_VOLUME   SDL_MIX_MAXVOLUME

Typedefs

typedef int8_t Sint8
typedef uint8_t Uint8
typedef int16_t Sint16
typedef uint16_t Uint16
typedef int32_t Sint32
typedef uint32_t Uint32
typedef int64_t Sint64
typedef uint64_t Uint64
typedef struct SDL_RWops SDL_RWops
typedef Uint16 SDL_AudioFormat
 Audio format flags.
typedef void(SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 *stream, int len)
typedef struct SDL_AudioSpec SDL_AudioSpec
typedef struct _Mix_Music Mix_Music

Enumerations

enum  SDL_errorcode {
  SDL_ENOMEM , SDL_EFREAD , SDL_EFWRITE , SDL_EFSEEK ,
  SDL_UNSUPPORTED , SDL_LASTERROR
}
enum  SDL_bool { SDL_FALSE = 0 , SDL_TRUE = 1 }
enum  Mix_Fading { MIX_NO_FADING , MIX_FADING_OUT , MIX_FADING_IN }
enum  Mix_MusicType {
  MUS_NONE , MUS_HTML5 , MUS_CMD , MUS_WAV ,
  MUS_MOD , MUS_MID , MUS_OGG , MUS_MP3 ,
  MUS_MP3_MAD_UNUSED , MUS_FLAC , MUS_MODPLUG_UNUSED
}

Functions

DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile (const char *file, const char *mode)
DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP (FILE *fp, SDL_bool autoclose)
DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW (void)
DECLSPEC void SDLCALL SDL_FreeRW (SDL_RWops *area)

Macro Definition Documentation

◆ DECLSPEC

#define DECLSPEC

◆ fseek_off_t

#define fseek_off_t   long

◆ HAVE_STDARG_H

#define HAVE_STDARG_H   1

◆ HAVE_STDDEF_H

#define HAVE_STDDEF_H   1

◆ HAVE_STDINT_H

#define HAVE_STDINT_H   1

◆ HAVE_STDIO_H

#define HAVE_STDIO_H   1

◆ MIX_MAX_VOLUME

#define MIX_MAX_VOLUME   SDL_MIX_MAXVOLUME

◆ Mix_SetError

#define Mix_SetError   SDL_SetError

◆ RW_SEEK_CUR

#define RW_SEEK_CUR   1

Seek relative to current read point

◆ RW_SEEK_END

#define RW_SEEK_END   2

Seek relative to the end of data

◆ RW_SEEK_SET

#define RW_SEEK_SET   0

Seek from the beginning of data

◆ SDL_calloc

#define SDL_calloc   calloc

◆ SDL_Error

#define SDL_Error ( code)
Value:
fprintf(stdout, "SDL Error: %d\n", code)
std::string code
Definition test.cpp:145

◆ SDL_free

#define SDL_free   free

◆ SDL_malloc

#define SDL_malloc   malloc

◆ SDL_MIX_MAXVOLUME

#define SDL_MIX_MAXVOLUME   (128)

◆ SDL_OutOfMemory

#define SDL_OutOfMemory ( )
Value:
@ SDL_ENOMEM
Definition prerequisites.h:134
#define SDL_Error(code)
Definition prerequisites.h:44

◆ SDL_RWclose

#define SDL_RWclose ( ctx)
Value:
(ctx)->close(ctx)

◆ SDL_RWOPS_MEMORY

#define SDL_RWOPS_MEMORY   4U

Memory stream

◆ SDL_RWOPS_MEMORY_RO

#define SDL_RWOPS_MEMORY_RO   5U

Read-Only memory stream

◆ SDL_RWOPS_STDFILE

#define SDL_RWOPS_STDFILE   2U

Stdio file

◆ SDL_RWOPS_UNKNOWN

#define SDL_RWOPS_UNKNOWN   0U

Unknown stream type

◆ SDL_RWseek

#define SDL_RWseek ( ctx,
offset,
whence )
Value:
(ctx)->seek(ctx, offset, whence)

Seek to offset relative to whence, one of stdio's whence values: RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END

Returns
the final offset in the data stream, or -1 on error.

◆ SDL_SetError

#define SDL_SetError ( ...)
Value:
{fprintf(stdout, __VA_ARGS__); fprintf(stdout, "\n");}

◆ SDLCALL

#define SDLCALL

Typedef Documentation

◆ Mix_Music

typedef struct _Mix_Music Mix_Music

◆ SDL_AudioCallback

typedef void(SDLCALL * SDL_AudioCallback) (void *userdata, Uint8 *stream, int len)

This function is called when the audio device needs more data.

Parameters
userdataAn application-specific parameter saved in the SDL_AudioSpec structure
streamA pointer to the audio data buffer.
lenThe length of that buffer in bytes.

Once the callback returns, the buffer will no longer be valid. Stereo samples are stored in a LRLRLR ordering.

You can choose to avoid callbacks and use SDL_QueueAudio() instead, if you like. Just open your audio device with a NULL callback.

◆ SDL_AudioFormat

Audio format flags.

These are what the 16 bits in SDL_AudioFormat currently mean... (Unspecified bits are always zero).

++-----------------------sample is signed if set
||
||       ++-----------sample is bigendian if set
||       ||
||       ||          ++---sample is float if set
||       ||          ||
||       ||          || +---sample bit size---+
||       ||          || |                     |
15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00

There are macros in SDL 2.0 and later to query these bits.

◆ SDL_AudioSpec

typedef struct SDL_AudioSpec SDL_AudioSpec

◆ SDL_RWops

typedef struct SDL_RWops SDL_RWops

◆ Sint16

typedef int16_t Sint16

◆ Sint32

typedef int32_t Sint32

◆ Sint64

typedef int64_t Sint64

◆ Sint8

typedef int8_t Sint8

◆ Uint16

typedef uint16_t Uint16

◆ Uint32

typedef uint32_t Uint32

◆ Uint64

typedef uint64_t Uint64

◆ Uint8

typedef uint8_t Uint8

Enumeration Type Documentation

◆ Mix_Fading

enum Mix_Fading
Enumerator
MIX_NO_FADING 
MIX_FADING_OUT 
MIX_FADING_IN 

◆ Mix_MusicType

Enumerator
MUS_NONE 
MUS_HTML5 
MUS_CMD 
MUS_WAV 
MUS_MOD 
MUS_MID 
MUS_OGG 
MUS_MP3 
MUS_MP3_MAD_UNUSED 
MUS_FLAC 
MUS_MODPLUG_UNUSED 

◆ SDL_bool

enum SDL_bool
Enumerator
SDL_FALSE 
SDL_TRUE 

◆ SDL_errorcode

Enumerator
SDL_ENOMEM 
SDL_EFREAD 
SDL_EFWRITE 
SDL_EFSEEK 
SDL_UNSUPPORTED 
SDL_LASTERROR 

Function Documentation

◆ SDL_AllocRW()

DECLSPEC SDL_RWops *SDLCALL SDL_AllocRW ( void )
extern

◆ SDL_FreeRW()

DECLSPEC void SDLCALL SDL_FreeRW ( SDL_RWops * area)
extern

◆ SDL_RWFromFile()

DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFile ( const char * file,
const char * mode )
extern
Here is the caller graph for this function:

◆ SDL_RWFromFP()

DECLSPEC SDL_RWops *SDLCALL SDL_RWFromFP ( FILE * fp,
SDL_bool autoclose )
extern