2006-04-13 20:47:06 +00:00
|
|
|
// SDL interface layer
|
|
|
|
// for the Build Engine
|
2012-03-12 04:47:04 +00:00
|
|
|
// by Jonathon Fowler (jf@jonof.id.au)
|
2006-04-13 20:47:06 +00:00
|
|
|
|
|
|
|
#ifndef __build_interface_layer__
|
|
|
|
#define __build_interface_layer__ SDL
|
|
|
|
|
2012-11-05 02:49:08 +00:00
|
|
|
#include "sdl_inc.h"
|
|
|
|
#include "compat.h"
|
2006-04-13 20:47:06 +00:00
|
|
|
#include "baselayer.h"
|
|
|
|
|
|
|
|
struct sdlappicon {
|
2009-01-09 09:29:17 +00:00
|
|
|
int32_t width,height;
|
|
|
|
uint32_t *pixels;
|
2009-06-05 20:09:13 +00:00
|
|
|
uint8_t *mask;
|
2006-04-13 20:47:06 +00:00
|
|
|
};
|
|
|
|
|
2012-11-05 02:49:08 +00:00
|
|
|
static inline void idle_waitevent_timeout(uint32_t timeout)
|
|
|
|
{
|
|
|
|
SDL_WaitEventTimeout(NULL, timeout);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void idle_waitevent(void)
|
|
|
|
{
|
|
|
|
SDL_WaitEvent(NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void idle(void)
|
|
|
|
{
|
|
|
|
usleep(1000);
|
|
|
|
}
|
|
|
|
|
2006-04-13 20:47:06 +00:00
|
|
|
#else
|
|
|
|
#if (__build_interface_layer__ != SDL)
|
|
|
|
#error "Already using the " __build_interface_layer__ ". Can't now use SDL."
|
|
|
|
#endif
|
|
|
|
#endif // __build_interface_layer__
|
|
|
|
|