/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.31
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#include "SDL_wrap.h"
/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC)
#   if (__SUNPRO_CC <= 0x560)
#     define SWIGTEMPLATEDISAMBIGUATOR template
#   else
#     define SWIGTEMPLATEDISAMBIGUATOR 
#   endif
# else
#   define SWIGTEMPLATEDISAMBIGUATOR 
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

DLLPREFIX void _SDL_Init (word w[])

{
  *(INT(w[0])) = SDL_Init ((VAL_INT(w[1])));
  return;
}



    #ifdef COCOA_HELPER
    extern void SDLCocoaInit();  /* To be called before any SDL functions */
    #endif
    int  occ_SDL_Init(Uint32 flags) {
      #ifdef COCOA_HELPER
      const SDL_version *sdl_version = SDL_Linked_Version();
      if(sdl_version->major <= 1 && sdl_version->minor <= 2) {
        SDLCocoaInit();
      }
      #endif
      /* Force NOPARACHUTE - it messes with the tvm's fast timer. */
      return SDL_Init(flags | SDL_INIT_NOPARACHUTE);
    }

DLLPREFIX void _occ_SDL_Init (word w[])

{
  *(INT(w[0])) = occ_SDL_Init ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_InitSubSystem (word w[])

{
  *(INT(w[0])) = SDL_InitSubSystem ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_QuitSubSystem (word w[])

{
  SDL_QuitSubSystem ((VAL_INT(w[0])));
  return;
}


DLLPREFIX void _SDL_WasInit (word w[])

{
  *(INT(w[0])) = SDL_WasInit ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_Quit ()

{
  SDL_Quit ();
  return;
}


/*Start of SDL_Rect wrappers*/
DLLPREFIX void _create_SDL_Rect(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_Rect));
}

DLLPREFIX void _delete_SDL_Rect(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_Rect_x (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->x);
}
DLLPREFIX void _set_SDL_Rect_x (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	foo->x = (Sint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_Rect_y (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->y);
}
DLLPREFIX void _set_SDL_Rect_y (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	foo->y = (Sint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_Rect_w (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->w);
}
DLLPREFIX void _set_SDL_Rect_w (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	foo->w = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_Rect_h (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->h);
}
DLLPREFIX void _set_SDL_Rect_h (word occ_args[])
{
	SDL_Rect *foo = ((SDL_Rect *) occ_args[1]);
	foo->h = (Uint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.Rect wrappers*/

/*Start of SDL_Color wrappers*/
DLLPREFIX void _create_SDL_Color(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_Color));
}

DLLPREFIX void _delete_SDL_Color(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_Color_r (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->r);
}
DLLPREFIX void _set_SDL_Color_r (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	foo->r = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_Color_g (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->g);
}
DLLPREFIX void _set_SDL_Color_g (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	foo->g = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_Color_b (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->b);
}
DLLPREFIX void _set_SDL_Color_b (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	foo->b = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_Color_unused (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->unused);
}
DLLPREFIX void _set_SDL_Color_unused (word occ_args[])
{
	SDL_Color *foo = ((SDL_Color *) occ_args[1]);
	foo->unused = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.Color wrappers*/

/*Start of SDL_Palette wrappers*/
DLLPREFIX void _create_SDL_Palette(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_Palette));
}

DLLPREFIX void _delete_SDL_Palette(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_Palette_ncolors (word occ_args[])
{
	SDL_Palette *foo = ((SDL_Palette *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->ncolors);
}
DLLPREFIX void _set_SDL_Palette_ncolors (word occ_args[])
{
	SDL_Palette *foo = ((SDL_Palette *) occ_args[1]);
	foo->ncolors = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Palette_colors (word occ_args[])
{
	SDL_Palette *foo = ((SDL_Palette *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) foo->colors;
}
/*End of SDL.Palette wrappers*/

/*Start of SDL_PixelFormat wrappers*/
DLLPREFIX void _create_SDL_PixelFormat(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_PixelFormat));
}

DLLPREFIX void _delete_SDL_PixelFormat(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_PixelFormat_palette (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) foo->palette;
}
DLLPREFIX void _get_SDL_PixelFormat_BitsPerPixel (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->BitsPerPixel);
}
DLLPREFIX void _set_SDL_PixelFormat_BitsPerPixel (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->BitsPerPixel = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_BytesPerPixel (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->BytesPerPixel);
}
DLLPREFIX void _set_SDL_PixelFormat_BytesPerPixel (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->BytesPerPixel = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Rloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Rloss);
}
DLLPREFIX void _set_SDL_PixelFormat_Rloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Rloss = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Gloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Gloss);
}
DLLPREFIX void _set_SDL_PixelFormat_Gloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Gloss = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Bloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Bloss);
}
DLLPREFIX void _set_SDL_PixelFormat_Bloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Bloss = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Aloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Aloss);
}
DLLPREFIX void _set_SDL_PixelFormat_Aloss (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Aloss = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Rshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Rshift);
}
DLLPREFIX void _set_SDL_PixelFormat_Rshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Rshift = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Gshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Gshift);
}
DLLPREFIX void _set_SDL_PixelFormat_Gshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Gshift = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Bshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Bshift);
}
DLLPREFIX void _set_SDL_PixelFormat_Bshift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Bshift = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Ashift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->Ashift);
}
DLLPREFIX void _set_SDL_PixelFormat_Ashift (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Ashift = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Rmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->Rmask);
}
DLLPREFIX void _set_SDL_PixelFormat_Rmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Rmask = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Gmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->Gmask);
}
DLLPREFIX void _set_SDL_PixelFormat_Gmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Gmask = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Bmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->Bmask);
}
DLLPREFIX void _set_SDL_PixelFormat_Bmask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Bmask = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_Amask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->Amask);
}
DLLPREFIX void _set_SDL_PixelFormat_Amask (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->Amask = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_colorkey (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->colorkey);
}
DLLPREFIX void _set_SDL_PixelFormat_colorkey (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->colorkey = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_PixelFormat_alpha (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->alpha);
}
DLLPREFIX void _set_SDL_PixelFormat_alpha (word occ_args[])
{
	SDL_PixelFormat *foo = ((SDL_PixelFormat *) occ_args[1]);
	foo->alpha = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.PixelFormat wrappers*/

/*Start of SDL_Surface wrappers*/
DLLPREFIX void _create_SDL_Surface(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_Surface));
}

DLLPREFIX void _delete_SDL_Surface(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_Surface_flags (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->flags);
}
DLLPREFIX void _set_SDL_Surface_flags (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->flags = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_format (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) foo->format;
}
DLLPREFIX void _get_SDL_Surface_w (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->w);
}
DLLPREFIX void _set_SDL_Surface_w (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->w = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_h (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->h);
}
DLLPREFIX void _set_SDL_Surface_h (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->h = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_pitch (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->pitch);
}
DLLPREFIX void _set_SDL_Surface_pitch (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->pitch = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_pixels (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->pixels);
}
DLLPREFIX void _set_SDL_Surface_pixels (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->pixels = (void *) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_offset (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->offset);
}
DLLPREFIX void _set_SDL_Surface_offset (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->offset = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_clip_rect (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) &foo->clip_rect;
}
DLLPREFIX void _get_SDL_Surface_unused1 (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->unused1);
}
DLLPREFIX void _set_SDL_Surface_unused1 (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->unused1 = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_locked (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->locked);
}
DLLPREFIX void _set_SDL_Surface_locked (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->locked = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_format_version (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->format_version);
}
DLLPREFIX void _set_SDL_Surface_format_version (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->format_version = (unsigned int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Surface_refcount (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->refcount);
}
DLLPREFIX void _set_SDL_Surface_refcount (word occ_args[])
{
	SDL_Surface *foo = ((SDL_Surface *) occ_args[1]);
	foo->refcount = (int) VAL_INT(occ_args[0]);
}
/*End of SDL.Surface wrappers*/


void occ_get_SDL_Surface_pixels(int pixels[], SDL_Surface *surface)
{
	/* The output array is packed INTs, but the input array can have
	   padding at the end of lines, and can be in a couple of different pixel
	   formats, so we need to convert it. */

	unsigned char *line = (unsigned char *) surface->pixels;
	const int bpp = surface->format->BytesPerPixel;
	int x, y;
	int *op = pixels;

	for (y = 0; y < surface->h; y++)
	{
		unsigned char *ip = line;
		for (x = 0; x < surface->w; x++)
		{
			switch (bpp) {
			case 3:
				*op++ = (ip[0] << 24) | (ip[1] << 16) | (ip[2] << 8) | 0xFF;
				break;
			case 4:
				*op++ = *((int *) ip);
				break;
			default:
				fprintf(stderr, "occ_get_SDL_Surface_pixels failed: invalid format with %d bpp\n", bpp);
				exit(1);
			}
			ip += bpp;
		}
		line += surface->pitch;
	}
}

DLLPREFIX void _occ_get_SDL_Surface_pixels (word w[])

{
  occ_get_SDL_Surface_pixels ((INT(w[0])), ((SDL_Surface*)(*INT(w[2]))));
  return;
}


/*Start of SDL_VideoInfo wrappers*/
DLLPREFIX void _create_SDL_VideoInfo(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_VideoInfo));
}

DLLPREFIX void _delete_SDL_VideoInfo(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_VideoInfo_hw_available (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->hw_available);
}
DLLPREFIX void _set_SDL_VideoInfo_hw_available (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->hw_available = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_wm_available (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->wm_available);
}
DLLPREFIX void _set_SDL_VideoInfo_wm_available (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->wm_available = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_UnusedBits1 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->UnusedBits1);
}
DLLPREFIX void _set_SDL_VideoInfo_UnusedBits1 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->UnusedBits1 = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_UnusedBits2 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->UnusedBits2);
}
DLLPREFIX void _set_SDL_VideoInfo_UnusedBits2 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->UnusedBits2 = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_hw (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_hw);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_hw (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_hw = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_hw_CC (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_hw_CC);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_hw_CC (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_hw_CC = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_hw_A (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_hw_A);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_hw_A (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_hw_A = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_sw (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_sw);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_sw (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_sw = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_sw_CC (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_sw_CC);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_sw_CC (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_sw_CC = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_sw_A (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_sw_A);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_sw_A (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_sw_A = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_blit_fill (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->blit_fill);
}
DLLPREFIX void _set_SDL_VideoInfo_blit_fill (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->blit_fill = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_UnusedBits3 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->UnusedBits3);
}
DLLPREFIX void _set_SDL_VideoInfo_UnusedBits3 (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->UnusedBits3 = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_video_mem (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->video_mem);
}
DLLPREFIX void _set_SDL_VideoInfo_video_mem (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	foo->video_mem = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_VideoInfo_vfmt (word occ_args[])
{
	SDL_VideoInfo *foo = ((SDL_VideoInfo *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) foo->vfmt;
}
/*End of SDL.VideoInfo wrappers*/

/*Start of SDL_Overlay wrappers*/
DLLPREFIX void _create_SDL_Overlay(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_Overlay));
}

DLLPREFIX void _delete_SDL_Overlay(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_Overlay_format (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->format);
}
DLLPREFIX void _set_SDL_Overlay_format (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->format = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_w (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->w);
}
DLLPREFIX void _set_SDL_Overlay_w (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->w = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_h (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->h);
}
DLLPREFIX void _set_SDL_Overlay_h (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->h = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_planes (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->planes);
}
DLLPREFIX void _set_SDL_Overlay_planes (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->planes = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_pitches (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->pitches);
}
DLLPREFIX void _set_SDL_Overlay_pitches (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->pitches = (Uint16 *) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_pixels (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->pixels);
}
DLLPREFIX void _set_SDL_Overlay_pixels (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->pixels = (Uint8 **) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_hw_overlay (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->hw_overlay);
}
DLLPREFIX void _set_SDL_Overlay_hw_overlay (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->hw_overlay = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_Overlay_UnusedBits (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->UnusedBits);
}
DLLPREFIX void _set_SDL_Overlay_UnusedBits (word occ_args[])
{
	SDL_Overlay *foo = ((SDL_Overlay *) occ_args[1]);
	foo->UnusedBits = (Uint32) VAL_INT(occ_args[0]);
}
/*End of SDL.Overlay wrappers*/

DLLPREFIX void _SDL_VideoInit (word w[])

{
  *(INT(w[0])) = SDL_VideoInit ((BYTE(w[1])), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_VideoQuit ()

{
  SDL_VideoQuit ();
  return;
}


DLLPREFIX void _SDL_VideoDriverName (word w[])

{
  *(BYTE(w[0])) = SDL_VideoDriverName ((BYTE(w[1])), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_GetVideoSurface (word w[])

{
  (*INT(w[0])) = (int) SDL_GetVideoSurface ();
  return;
}


DLLPREFIX void _SDL_GetVideoInfo (word w[])

{
  (*INT(w[0])) = (int) SDL_GetVideoInfo ();
  return;
}


DLLPREFIX void _SDL_VideoModeOK (word w[])

{
  *(INT(w[0])) = SDL_VideoModeOK ((VAL_INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])));
  return;
}


DLLPREFIX void _SDL_ListModes (word w[])

{
  (*INT(w[0])) = (int) SDL_ListModes (((SDL_PixelFormat*)(*INT(w[1]))), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_SetVideoMode (word w[])

{
  (*INT(w[0])) = (int) SDL_SetVideoMode ((VAL_INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])));
  return;
}


DLLPREFIX void _SDL_UpdateRects (word w[])

{
  SDL_UpdateRects (((SDL_Surface*)(*INT(w[0]))), (VAL_INT(w[1])), ((SDL_Rect*)(*INT(w[2]))));
  return;
}


DLLPREFIX void _SDL_UpdateRect (word w[])

{
  SDL_UpdateRect (((SDL_Surface*)(*INT(w[0]))), (VAL_INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])));
  return;
}


DLLPREFIX void _SDL_Flip (word w[])

{
  *(INT(w[0])) = SDL_Flip (((SDL_Surface*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_SetGamma (word w[])

{
  *(INT(w[0])) = SDL_SetGamma ((VAL_REAL32(w[1])), (VAL_REAL32(w[2])), (VAL_REAL32(w[3])));
  return;
}


DLLPREFIX void _SDL_SetGammaRamp (word w[])

{
  *(INT(w[0])) = SDL_SetGammaRamp ((INT16(w[1])), (INT16(w[2])), (INT16(w[3])));
  return;
}


DLLPREFIX void _SDL_GetGammaRamp (word w[])

{
  *(INT(w[0])) = SDL_GetGammaRamp ((INT16(w[1])), (INT16(w[2])), (INT16(w[3])));
  return;
}


DLLPREFIX void _SDL_SetColors (word w[])

{
  *(INT(w[0])) = SDL_SetColors (((SDL_Surface*)(*INT(w[1]))), ((SDL_Color*)(*INT(w[2]))), (VAL_INT(w[3])), (VAL_INT(w[4])));
  return;
}


DLLPREFIX void _SDL_SetPalette (word w[])

{
  *(INT(w[0])) = SDL_SetPalette (((SDL_Surface*)(*INT(w[1]))), (VAL_INT(w[2])), ((SDL_Color*)(*INT(w[3]))), (VAL_INT(w[4])), (VAL_INT(w[5])));
  return;
}


DLLPREFIX void _SDL_MapRGB (word w[])

{
  *(INT(w[0])) = SDL_MapRGB (((SDL_PixelFormat*)(*INT(w[1]))), (VAL_BYTE(w[2])), (VAL_BYTE(w[3])), (VAL_BYTE(w[4])));
  return;
}


DLLPREFIX void _SDL_MapRGBA (word w[])

{
  *(INT(w[0])) = SDL_MapRGBA (((SDL_PixelFormat*)(*INT(w[1]))), (VAL_BYTE(w[2])), (VAL_BYTE(w[3])), (VAL_BYTE(w[4])), (VAL_BYTE(w[5])));
  return;
}


DLLPREFIX void _SDL_GetRGB (word w[])

{
  SDL_GetRGB ((VAL_INT(w[0])), ((SDL_PixelFormat*)(*INT(w[1]))), (BYTE(w[2])), (BYTE(w[3])), (BYTE(w[4])));
  return;
}


DLLPREFIX void _SDL_GetRGBA (word w[])

{
  SDL_GetRGBA ((VAL_INT(w[0])), ((SDL_PixelFormat*)(*INT(w[1]))), (BYTE(w[2])), (BYTE(w[3])), (BYTE(w[4])), (BYTE(w[5])));
  return;
}


DLLPREFIX void _SDL_CreateRGBSurface (word w[])

{
  (*INT(w[0])) = (int) SDL_CreateRGBSurface ((VAL_INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])), (VAL_INT(w[5])), (VAL_INT(w[6])), (VAL_INT(w[7])), (VAL_INT(w[8])));
  return;
}


DLLPREFIX void _SDL_CreateRGBSurfaceFrom (word w[])

{
  (*INT(w[0])) = (int) SDL_CreateRGBSurfaceFrom ((INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])), (VAL_INT(w[5])), (VAL_INT(w[6])), (VAL_INT(w[7])), (VAL_INT(w[8])), (VAL_INT(w[9])));
  return;
}


DLLPREFIX void _SDL_FreeSurface (word w[])

{
  SDL_FreeSurface (((SDL_Surface*)(*INT(w[0]))));
  return;
}


DLLPREFIX void _SDL_LockSurface (word w[])

{
  *(INT(w[0])) = SDL_LockSurface (((SDL_Surface*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_UnlockSurface (word w[])

{
  SDL_UnlockSurface (((SDL_Surface*)(*INT(w[0]))));
  return;
}



/* Convenience macro -- load a surface from a file */
SDL_Surface *  occ_SDL_LoadBMP(char file[])	
{
	return SDL_LoadBMP_RW(SDL_RWFromFile(file, "rb"), 1);
}
/* Convenience macro -- save a surface to a file */
SDL_Surface * occ_SDL_SaveBMP(SDL_Surface *surface, char file[])
{
	return SDL_SaveBMP_RW(surface, SDL_RWFromFile(file, "wb"), 1);
}

DLLPREFIX void _occ_SDL_LoadBMP (word w[])

{
  (*INT(w[0])) = (int) occ_SDL_LoadBMP ((BYTE(w[1])));
  return;
}


DLLPREFIX void _occ_SDL_SaveBMP (word w[])

{
  (*INT(w[0])) = (int) occ_SDL_SaveBMP (((SDL_Surface*)(*INT(w[1]))), (BYTE(w[2])));
  return;
}


DLLPREFIX void _SDL_SetColorKey (word w[])

{
  *(INT(w[0])) = SDL_SetColorKey (((SDL_Surface*)(*INT(w[1]))), (VAL_INT(w[2])), (VAL_INT(w[3])));
  return;
}


DLLPREFIX void _SDL_SetAlpha (word w[])

{
  *(INT(w[0])) = SDL_SetAlpha (((SDL_Surface*)(*INT(w[1]))), (VAL_INT(w[2])), (VAL_BYTE(w[3])));
  return;
}


DLLPREFIX void _SDL_SetClipRect (word w[])

{
  (*INT(w[0])) = (int) SDL_SetClipRect (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))));
  return;
}


DLLPREFIX void _SDL_GetClipRect (word w[])

{
  SDL_GetClipRect (((SDL_Surface*)(*INT(w[0]))), ((SDL_Rect*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_ConvertSurface (word w[])

{
  (*INT(w[0])) = (int) SDL_ConvertSurface (((SDL_Surface*)(*INT(w[1]))), ((SDL_PixelFormat*)(*INT(w[2]))), (VAL_INT(w[3])));
  return;
}


DLLPREFIX void _SDL_BlitSurface (word w[])

{
  *(INT(w[0])) = SDL_BlitSurface (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))), ((SDL_Surface*)(*INT(w[3]))), ((SDL_Rect*)(*INT(w[4]))));
  return;
}


DLLPREFIX void _SDL_UpperBlit (word w[])

{
  *(INT(w[0])) = SDL_UpperBlit (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))), ((SDL_Surface*)(*INT(w[3]))), ((SDL_Rect*)(*INT(w[4]))));
  return;
}


DLLPREFIX void _SDL_LowerBlit (word w[])

{
  *(INT(w[0])) = SDL_LowerBlit (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))), ((SDL_Surface*)(*INT(w[3]))), ((SDL_Rect*)(*INT(w[4]))));
  return;
}


DLLPREFIX void _SDL_FillRect (word w[])

{
  *(INT(w[0])) = SDL_FillRect (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))), (VAL_INT(w[3])));
  return;
}


DLLPREFIX void _SDL_DisplayFormat (word w[])

{
  (*INT(w[0])) = (int) SDL_DisplayFormat (((SDL_Surface*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_DisplayFormatAlpha (word w[])

{
  (*INT(w[0])) = (int) SDL_DisplayFormatAlpha (((SDL_Surface*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_CreateYUVOverlay (word w[])

{
  (*INT(w[0])) = (int) SDL_CreateYUVOverlay ((VAL_INT(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])), ((SDL_Surface*)(*INT(w[4]))));
  return;
}


DLLPREFIX void _SDL_LockYUVOverlay (word w[])

{
  *(INT(w[0])) = SDL_LockYUVOverlay (((SDL_Overlay*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_UnlockYUVOverlay (word w[])

{
  SDL_UnlockYUVOverlay (((SDL_Overlay*)(*INT(w[0]))));
  return;
}


DLLPREFIX void _SDL_DisplayYUVOverlay (word w[])

{
  *(INT(w[0])) = SDL_DisplayYUVOverlay (((SDL_Overlay*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))));
  return;
}


DLLPREFIX void _SDL_FreeYUVOverlay (word w[])

{
  SDL_FreeYUVOverlay (((SDL_Overlay*)(*INT(w[0]))));
  return;
}


DLLPREFIX void _SDL_GL_LoadLibrary (word w[])

{
  *(INT(w[0])) = SDL_GL_LoadLibrary ((BYTE(w[1])));
  return;
}


DLLPREFIX void _SDL_GL_GetProcAddress (word w[])

{
  SDL_GL_GetProcAddress ((BYTE(w[0])));
  return;
}


DLLPREFIX void _SDL_GL_SetAttribute (word w[])

{
  *(INT(w[0])) = SDL_GL_SetAttribute ((VAL_INT(w[1])), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_GL_GetAttribute (word w[])

{
  *(INT(w[0])) = SDL_GL_GetAttribute ((VAL_INT(w[1])), (INT(w[2])));
  return;
}


DLLPREFIX void _SDL_GL_SwapBuffers ()

{
  SDL_GL_SwapBuffers ();
  return;
}


DLLPREFIX void _SDL_GL_UpdateRects (word w[])

{
  SDL_GL_UpdateRects ((VAL_INT(w[0])), ((SDL_Rect*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_GL_Lock ()

{
  SDL_GL_Lock ();
  return;
}


DLLPREFIX void _SDL_GL_Unlock ()

{
  SDL_GL_Unlock ();
  return;
}


DLLPREFIX void _SDL_WM_SetCaption (word w[])

{
  SDL_WM_SetCaption ((BYTE(w[0])), (BYTE(w[2])));
  return;
}


DLLPREFIX void _SDL_WM_GetCaption (word w[])

{
  SDL_WM_GetCaption ((BYTE(w[0])), (BYTE(w[1])));
  return;
}


DLLPREFIX void _SDL_WM_SetIcon (word w[])

{
  SDL_WM_SetIcon (((SDL_Surface*)(*INT(w[0]))), (BYTE(w[1])));
  return;
}


DLLPREFIX void _SDL_WM_IconifyWindow (word w[])

{
  *(INT(w[0])) = SDL_WM_IconifyWindow ();
  return;
}


DLLPREFIX void _SDL_WM_ToggleFullScreen (word w[])

{
  *(INT(w[0])) = SDL_WM_ToggleFullScreen (((SDL_Surface*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_WM_GrabInput (word w[])

{
  (*INT(w[0])) = (int) SDL_WM_GrabInput ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_SoftStretch (word w[])

{
  *(INT(w[0])) = SDL_SoftStretch (((SDL_Surface*)(*INT(w[1]))), ((SDL_Rect*)(*INT(w[2]))), ((SDL_Surface*)(*INT(w[3]))), ((SDL_Rect*)(*INT(w[4]))));
  return;
}


/*Start of SDL_keysym wrappers*/
DLLPREFIX void _create_SDL_keysym(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_keysym));
}

DLLPREFIX void _delete_SDL_keysym(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_keysym_scancode (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->scancode);
}
DLLPREFIX void _set_SDL_keysym_scancode (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	foo->scancode = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_keysym_sym (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->sym);
}
DLLPREFIX void _set_SDL_keysym_sym (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	foo->sym = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_keysym_mod (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->mod);
}
DLLPREFIX void _set_SDL_keysym_mod (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	foo->mod = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_keysym_unicode (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->unicode);
}
DLLPREFIX void _set_SDL_keysym_unicode (word occ_args[])
{
	SDL_keysym *foo = ((SDL_keysym *) occ_args[1]);
	foo->unicode = (Uint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.keysym wrappers*/

DLLPREFIX void _SDL_EnableUNICODE (word w[])

{
  *(INT(w[0])) = SDL_EnableUNICODE ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_EnableKeyRepeat (word w[])

{
  *(INT(w[0])) = SDL_EnableKeyRepeat ((VAL_INT(w[1])), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_GetKeyState (word w[])

{
  *(BYTE(w[0])) = SDL_GetKeyState ((INT(w[1])));
  return;
}


DLLPREFIX void _SDL_GetModState (word w[])

{
  (*INT(w[0])) = (int) SDL_GetModState ();
  return;
}


DLLPREFIX void _SDL_SetModState (word w[])

{
  SDL_SetModState ((VAL_INT(w[0])));
  return;
}


DLLPREFIX void _SDL_GetKeyName (word w[])

{
  *(BYTE(w[0])) = SDL_GetKeyName ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_NumJoysticks (word w[])

{
  *(INT(w[0])) = SDL_NumJoysticks ();
  return;
}


DLLPREFIX void _SDL_JoystickName (word w[])

{
  *(BYTE(w[0])) = SDL_JoystickName ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_JoystickOpen (word w[])

{
  (*INT(w[0])) = (int) SDL_JoystickOpen ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_JoystickOpened (word w[])

{
  *(INT(w[0])) = SDL_JoystickOpened ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_JoystickIndex (word w[])

{
  *(INT(w[0])) = SDL_JoystickIndex (((SDL_Joystick*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_JoystickNumAxes (word w[])

{
  *(INT(w[0])) = SDL_JoystickNumAxes (((SDL_Joystick*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_JoystickNumBalls (word w[])

{
  *(INT(w[0])) = SDL_JoystickNumBalls (((SDL_Joystick*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_JoystickNumHats (word w[])

{
  *(INT(w[0])) = SDL_JoystickNumHats (((SDL_Joystick*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_JoystickNumButtons (word w[])

{
  *(INT(w[0])) = SDL_JoystickNumButtons (((SDL_Joystick*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_JoystickUpdate ()

{
  SDL_JoystickUpdate ();
  return;
}


DLLPREFIX void _SDL_JoystickEventState (word w[])

{
  *(INT(w[0])) = SDL_JoystickEventState ((VAL_INT(w[1])));
  return;
}


DLLPREFIX void _SDL_JoystickGetAxis (word w[])

{
  *(INT16(w[0])) = SDL_JoystickGetAxis (((SDL_Joystick*)(*INT(w[1]))), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_JoystickGetHat (word w[])

{
  *(BYTE(w[0])) = SDL_JoystickGetHat (((SDL_Joystick*)(*INT(w[1]))), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_JoystickGetBall (word w[])

{
  *(INT(w[0])) = SDL_JoystickGetBall (((SDL_Joystick*)(*INT(w[1]))), (VAL_INT(w[2])), (INT(w[3])), (INT(w[4])));
  return;
}


DLLPREFIX void _SDL_JoystickGetButton (word w[])

{
  *(BYTE(w[0])) = SDL_JoystickGetButton (((SDL_Joystick*)(*INT(w[1]))), (VAL_INT(w[2])));
  return;
}


DLLPREFIX void _SDL_JoystickClose (word w[])

{
  SDL_JoystickClose (((SDL_Joystick*)(*INT(w[0]))));
  return;
}


/*Start of SDL_AudioSpec wrappers*/
DLLPREFIX void _create_SDL_AudioSpec(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_AudioSpec));
}

DLLPREFIX void _delete_SDL_AudioSpec(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_AudioSpec_freq (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->freq);
}
DLLPREFIX void _set_SDL_AudioSpec_freq (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->freq = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_format (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->format);
}
DLLPREFIX void _set_SDL_AudioSpec_format (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->format = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_channels (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->channels);
}
DLLPREFIX void _set_SDL_AudioSpec_channels (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->channels = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_silence (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->silence);
}
DLLPREFIX void _set_SDL_AudioSpec_silence (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->silence = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_samples (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->samples);
}
DLLPREFIX void _set_SDL_AudioSpec_samples (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->samples = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_padding (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->padding);
}
DLLPREFIX void _set_SDL_AudioSpec_padding (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->padding = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_size (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->size);
}
DLLPREFIX void _set_SDL_AudioSpec_size (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->size = (Uint32) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_callback (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->callback);
}
DLLPREFIX void _set_SDL_AudioSpec_callback (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->callback = (void (*)(void *,Uint8 *,int)) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioSpec_userdata (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->userdata);
}
DLLPREFIX void _set_SDL_AudioSpec_userdata (word occ_args[])
{
	SDL_AudioSpec *foo = ((SDL_AudioSpec *) occ_args[1]);
	foo->userdata = (void *) VAL_INT(occ_args[0]);
}
/*End of SDL.AudioSpec wrappers*/

/*Start of SDL_AudioCVT wrappers*/
DLLPREFIX void _create_SDL_AudioCVT(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_AudioCVT));
}

DLLPREFIX void _delete_SDL_AudioCVT(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_AudioCVT_needed (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->needed);
}
DLLPREFIX void _set_SDL_AudioCVT_needed (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->needed = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_src_format (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->src_format);
}
DLLPREFIX void _set_SDL_AudioCVT_src_format (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->src_format = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_dst_format (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->dst_format);
}
DLLPREFIX void _set_SDL_AudioCVT_dst_format (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->dst_format = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_rate_incr (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(REAL64(occ_args[0])) = CAST_REAL64(foo->rate_incr);
}
DLLPREFIX void _set_SDL_AudioCVT_rate_incr (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->rate_incr = (double) VAL_REAL64(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_buf (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->buf);
}
DLLPREFIX void _set_SDL_AudioCVT_buf (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->buf = (Uint8 *) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_len (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->len);
}
DLLPREFIX void _set_SDL_AudioCVT_len (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->len = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_len_cvt (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->len_cvt);
}
DLLPREFIX void _set_SDL_AudioCVT_len_cvt (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->len_cvt = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_len_mult (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->len_mult);
}
DLLPREFIX void _set_SDL_AudioCVT_len_mult (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->len_mult = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_len_ratio (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(REAL64(occ_args[0])) = CAST_REAL64(foo->len_ratio);
}
DLLPREFIX void _set_SDL_AudioCVT_len_ratio (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->len_ratio = (double) VAL_REAL64(occ_args[0]);
}
DLLPREFIX void _get_SDL_AudioCVT_filter_index (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->filter_index);
}
DLLPREFIX void _set_SDL_AudioCVT_filter_index (word occ_args[])
{
	SDL_AudioCVT *foo = ((SDL_AudioCVT *) occ_args[1]);
	foo->filter_index = (int) VAL_INT(occ_args[0]);
}
/*End of SDL.AudioCVT wrappers*/

DLLPREFIX void _SDL_AudioDriverName (word w[])

{
  *(BYTE(w[0])) = SDL_AudioDriverName ((BYTE(w[1])), (VAL_INT(w[3])));
  return;
}


DLLPREFIX void _SDL_OpenAudio (word w[])

{
  *(INT(w[0])) = SDL_OpenAudio (((SDL_AudioSpec*)(*INT(w[1]))), ((SDL_AudioSpec*)(*INT(w[2]))));
  return;
}


DLLPREFIX void _SDL_GetAudioStatus (word w[])

{
  (*INT(w[0])) = (int) SDL_GetAudioStatus ();
  return;
}


DLLPREFIX void _SDL_PauseAudio (word w[])

{
  SDL_PauseAudio ((VAL_INT(w[0])));
  return;
}



SDL_AudioSpec * occ_SDL_LoadWAV(char file[], SDL_AudioSpec *spec, Uint8 audio_buf[], Uint32 audio_len[]) {
	return SDL_LoadWAV_RW(SDL_RWFromFile(file, "rb"),1, spec,audio_buf,audio_len);
}

DLLPREFIX void _occ_SDL_LoadWAV (word w[])

{
  (*INT(w[0])) = (int) occ_SDL_LoadWAV ((BYTE(w[1])), ((SDL_AudioSpec*)(*INT(w[3]))), (BYTE(w[4])), (INT(w[6])));
  return;
}


DLLPREFIX void _SDL_FreeWAV (word w[])

{
  SDL_FreeWAV ((BYTE(w[0])));
  return;
}


DLLPREFIX void _SDL_BuildAudioCVT (word w[])

{
  *(INT(w[0])) = SDL_BuildAudioCVT (((SDL_AudioCVT*)(*INT(w[1]))), (VAL_INT16(w[2])), (VAL_BYTE(w[3])), (VAL_INT(w[4])), (VAL_INT16(w[5])), (VAL_BYTE(w[6])), (VAL_INT(w[7])));
  return;
}


DLLPREFIX void _SDL_ConvertAudio (word w[])

{
  *(INT(w[0])) = SDL_ConvertAudio (((SDL_AudioCVT*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_MixAudio (word w[])

{
  SDL_MixAudio ((BYTE(w[0])), (BYTE(w[1])), (VAL_INT(w[2])), (VAL_INT(w[3])));
  return;
}


DLLPREFIX void _SDL_LockAudio ()

{
  SDL_LockAudio ();
  return;
}


DLLPREFIX void _SDL_UnlockAudio ()

{
  SDL_UnlockAudio ();
  return;
}


DLLPREFIX void _SDL_CloseAudio ()

{
  SDL_CloseAudio ();
  return;
}


/*Start of SDL_ActiveEvent wrappers*/
DLLPREFIX void _create_SDL_ActiveEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_ActiveEvent));
}

DLLPREFIX void _delete_SDL_ActiveEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_ActiveEvent_type (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_ActiveEvent_type (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_ActiveEvent_gain (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->gain);
}
DLLPREFIX void _set_SDL_ActiveEvent_gain (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	foo->gain = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_ActiveEvent_state (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->state);
}
DLLPREFIX void _set_SDL_ActiveEvent_state (word occ_args[])
{
	SDL_ActiveEvent *foo = ((SDL_ActiveEvent *) occ_args[1]);
	foo->state = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.ActiveEvent wrappers*/

/*Start of SDL_KeyboardEvent wrappers*/
DLLPREFIX void _create_SDL_KeyboardEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_KeyboardEvent));
}

DLLPREFIX void _delete_SDL_KeyboardEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_KeyboardEvent_type (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_KeyboardEvent_type (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_KeyboardEvent_which (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_KeyboardEvent_which (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_KeyboardEvent_state (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->state);
}
DLLPREFIX void _set_SDL_KeyboardEvent_state (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	foo->state = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_KeyboardEvent_keysym (word occ_args[])
{
	SDL_KeyboardEvent *foo = ((SDL_KeyboardEvent *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) &foo->keysym;
}
/*End of SDL.KeyboardEvent wrappers*/

/*Start of SDL_MouseMotionEvent wrappers*/
DLLPREFIX void _create_SDL_MouseMotionEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_MouseMotionEvent));
}

DLLPREFIX void _delete_SDL_MouseMotionEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_MouseMotionEvent_type (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_type (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_which (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_which (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_state (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->state);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_state (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->state = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_x (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->x);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_x (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->x = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_y (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->y);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_y (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->y = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_xrel (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->xrel);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_xrel (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->xrel = (Sint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseMotionEvent_yrel (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->yrel);
}
DLLPREFIX void _set_SDL_MouseMotionEvent_yrel (word occ_args[])
{
	SDL_MouseMotionEvent *foo = ((SDL_MouseMotionEvent *) occ_args[1]);
	foo->yrel = (Sint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.MouseMotionEvent wrappers*/

/*Start of SDL_MouseButtonEvent wrappers*/
DLLPREFIX void _create_SDL_MouseButtonEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_MouseButtonEvent));
}

DLLPREFIX void _delete_SDL_MouseButtonEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_MouseButtonEvent_type (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_type (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseButtonEvent_which (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_which (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseButtonEvent_button (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->button);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_button (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->button = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseButtonEvent_state (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->state);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_state (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->state = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseButtonEvent_x (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->x);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_x (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->x = (Uint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_MouseButtonEvent_y (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->y);
}
DLLPREFIX void _set_SDL_MouseButtonEvent_y (word occ_args[])
{
	SDL_MouseButtonEvent *foo = ((SDL_MouseButtonEvent *) occ_args[1]);
	foo->y = (Uint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.MouseButtonEvent wrappers*/

/*Start of SDL_JoyAxisEvent wrappers*/
DLLPREFIX void _create_SDL_JoyAxisEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_JoyAxisEvent));
}

DLLPREFIX void _delete_SDL_JoyAxisEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_JoyAxisEvent_type (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_JoyAxisEvent_type (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyAxisEvent_which (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_JoyAxisEvent_which (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyAxisEvent_axis (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->axis);
}
DLLPREFIX void _set_SDL_JoyAxisEvent_axis (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	foo->axis = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyAxisEvent_value (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->value);
}
DLLPREFIX void _set_SDL_JoyAxisEvent_value (word occ_args[])
{
	SDL_JoyAxisEvent *foo = ((SDL_JoyAxisEvent *) occ_args[1]);
	foo->value = (Sint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.JoyAxisEvent wrappers*/

/*Start of SDL_JoyBallEvent wrappers*/
DLLPREFIX void _create_SDL_JoyBallEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_JoyBallEvent));
}

DLLPREFIX void _delete_SDL_JoyBallEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_JoyBallEvent_type (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_JoyBallEvent_type (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyBallEvent_which (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_JoyBallEvent_which (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyBallEvent_ball (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->ball);
}
DLLPREFIX void _set_SDL_JoyBallEvent_ball (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	foo->ball = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyBallEvent_xrel (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->xrel);
}
DLLPREFIX void _set_SDL_JoyBallEvent_xrel (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	foo->xrel = (Sint16) VAL_INT16(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyBallEvent_yrel (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	*(INT16(occ_args[0])) = CAST_INT16(foo->yrel);
}
DLLPREFIX void _set_SDL_JoyBallEvent_yrel (word occ_args[])
{
	SDL_JoyBallEvent *foo = ((SDL_JoyBallEvent *) occ_args[1]);
	foo->yrel = (Sint16) VAL_INT16(occ_args[0]);
}
/*End of SDL.JoyBallEvent wrappers*/

/*Start of SDL_JoyHatEvent wrappers*/
DLLPREFIX void _create_SDL_JoyHatEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_JoyHatEvent));
}

DLLPREFIX void _delete_SDL_JoyHatEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_JoyHatEvent_type (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_JoyHatEvent_type (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyHatEvent_which (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_JoyHatEvent_which (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyHatEvent_hat (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->hat);
}
DLLPREFIX void _set_SDL_JoyHatEvent_hat (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	foo->hat = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyHatEvent_value (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->value);
}
DLLPREFIX void _set_SDL_JoyHatEvent_value (word occ_args[])
{
	SDL_JoyHatEvent *foo = ((SDL_JoyHatEvent *) occ_args[1]);
	foo->value = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.JoyHatEvent wrappers*/

/*Start of SDL_JoyButtonEvent wrappers*/
DLLPREFIX void _create_SDL_JoyButtonEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_JoyButtonEvent));
}

DLLPREFIX void _delete_SDL_JoyButtonEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_JoyButtonEvent_type (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_JoyButtonEvent_type (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyButtonEvent_which (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->which);
}
DLLPREFIX void _set_SDL_JoyButtonEvent_which (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	foo->which = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyButtonEvent_button (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->button);
}
DLLPREFIX void _set_SDL_JoyButtonEvent_button (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	foo->button = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_JoyButtonEvent_state (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->state);
}
DLLPREFIX void _set_SDL_JoyButtonEvent_state (word occ_args[])
{
	SDL_JoyButtonEvent *foo = ((SDL_JoyButtonEvent *) occ_args[1]);
	foo->state = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.JoyButtonEvent wrappers*/

/*Start of SDL_ResizeEvent wrappers*/
DLLPREFIX void _create_SDL_ResizeEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_ResizeEvent));
}

DLLPREFIX void _delete_SDL_ResizeEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_ResizeEvent_type (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_ResizeEvent_type (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_ResizeEvent_w (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->w);
}
DLLPREFIX void _set_SDL_ResizeEvent_w (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	foo->w = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_ResizeEvent_h (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->h);
}
DLLPREFIX void _set_SDL_ResizeEvent_h (word occ_args[])
{
	SDL_ResizeEvent *foo = ((SDL_ResizeEvent *) occ_args[1]);
	foo->h = (int) VAL_INT(occ_args[0]);
}
/*End of SDL.ResizeEvent wrappers*/

/*Start of SDL_ExposeEvent wrappers*/
DLLPREFIX void _create_SDL_ExposeEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_ExposeEvent));
}

DLLPREFIX void _delete_SDL_ExposeEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_ExposeEvent_type (word occ_args[])
{
	SDL_ExposeEvent *foo = ((SDL_ExposeEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_ExposeEvent_type (word occ_args[])
{
	SDL_ExposeEvent *foo = ((SDL_ExposeEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.ExposeEvent wrappers*/

/*Start of SDL_QuitEvent wrappers*/
DLLPREFIX void _create_SDL_QuitEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_QuitEvent));
}

DLLPREFIX void _delete_SDL_QuitEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_QuitEvent_type (word occ_args[])
{
	SDL_QuitEvent *foo = ((SDL_QuitEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_QuitEvent_type (word occ_args[])
{
	SDL_QuitEvent *foo = ((SDL_QuitEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
/*End of SDL.QuitEvent wrappers*/

/*Start of SDL_UserEvent wrappers*/
DLLPREFIX void _create_SDL_UserEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_UserEvent));
}

DLLPREFIX void _delete_SDL_UserEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_UserEvent_type (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_UserEvent_type (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_UserEvent_code (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->code);
}
DLLPREFIX void _set_SDL_UserEvent_code (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	foo->code = (int) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_UserEvent_data1 (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->data1);
}
DLLPREFIX void _set_SDL_UserEvent_data1 (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	foo->data1 = (void *) VAL_INT(occ_args[0]);
}
DLLPREFIX void _get_SDL_UserEvent_data2 (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	*(INT(occ_args[0])) = CAST_INT(foo->data2);
}
DLLPREFIX void _set_SDL_UserEvent_data2 (word occ_args[])
{
	SDL_UserEvent *foo = ((SDL_UserEvent *) occ_args[1]);
	foo->data2 = (void *) VAL_INT(occ_args[0]);
}
/*End of SDL.UserEvent wrappers*/

/*Start of SDL_SysWMEvent wrappers*/
DLLPREFIX void _create_SDL_SysWMEvent(word occ_args[])
{
	*((void **) occ_args[0]) = (void *) malloc(sizeof(SDL_SysWMEvent));
}

DLLPREFIX void _delete_SDL_SysWMEvent(word occ_args[])
{
	free(*((void **) occ_args[0]));
}

DLLPREFIX void _get_SDL_SysWMEvent_type (word occ_args[])
{
	SDL_SysWMEvent *foo = ((SDL_SysWMEvent *) occ_args[1]);
	*(BYTE(occ_args[0])) = CAST_BYTE(foo->type);
}
DLLPREFIX void _set_SDL_SysWMEvent_type (word occ_args[])
{
	SDL_SysWMEvent *foo = ((SDL_SysWMEvent *) occ_args[1]);
	foo->type = (Uint8) VAL_BYTE(occ_args[0]);
}
DLLPREFIX void _get_SDL_SysWMEvent_msg (word occ_args[])
{
	SDL_SysWMEvent *foo = ((SDL_SysWMEvent *) occ_args[1]);
	*((void **) occ_args[0]) = (void *) foo->msg;
}
/*End of SDL.SysWMEvent wrappers*/

DLLPREFIX void _create_SDL_Event(word w[])
{
	*((void **) w[0]) = (void *) malloc(sizeof(SDL_Event));
}

DLLPREFIX void _delete_SDL_Event(word w[])
{
	free(((void *) w[0]));
}


  /*Added in from SWIG wrapper SDL_event.i*/
	Uint8 get_SDL_Event_type(SDL_Event *event ) {
		return event->type;
	}

DLLPREFIX void _get_SDL_Event_type (word w[])

{
  *(BYTE(w[0])) = get_SDL_Event_type (((SDL_Event*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_PumpEvents ()

{
  SDL_PumpEvents ();
  return;
}


DLLPREFIX void _SDL_PeepEvents (word w[])

{
  *(INT(w[0])) = SDL_PeepEvents (((SDL_Event*)(*INT(w[1]))), (VAL_INT(w[2])), (VAL_INT(w[3])), (VAL_INT(w[4])));
  return;
}


DLLPREFIX void _SDL_PollEvent (word w[])

{
  *(INT(w[0])) = SDL_PollEvent (((SDL_Event*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_WaitEvent (word w[])

{
  *(INT(w[0])) = SDL_WaitEvent (((SDL_Event*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_PushEvent (word w[])

{
  *(INT(w[0])) = SDL_PushEvent (((SDL_Event*)(*INT(w[1]))));
  return;
}


DLLPREFIX void _SDL_EventState (word w[])

{
  *(BYTE(w[0])) = SDL_EventState ((VAL_BYTE(w[1])), (VAL_INT(w[2])));
  return;
}



	inline static void occ_SDL_GetError(char err_str[], int err_str_len, int *str_len)
	{
  	char *err = SDL_GetError();

  	*str_len = 0;

  	while(*str_len < err_str_len && err[*str_len] != '\0')
    	err_str[*str_len] = err[(*str_len)++];
		return;
	}

DLLPREFIX void _occ_SDL_GetError (word w[])

{
  occ_SDL_GetError ((BYTE(w[0])), (VAL_INT(w[2])), (INT(w[3])));
  return;
}


DLLPREFIX void _SDL_ClearError ()

{
  SDL_ClearError ();
  return;
}


