diff options
Diffstat (limited to 'sdl/platform.h')
-rw-r--r-- | sdl/platform.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/sdl/platform.h b/sdl/platform.h index 09028d1..dc34788 100644 --- a/sdl/platform.h +++ b/sdl/platform.h @@ -1,6 +1,38 @@ #ifndef _PLATFORM_H_ #define _PLATFORM_H_ +#include <SDL/SDL.h> +#include <SDL/SDL_image.h> +#include <GL/glew.h> +#include "glframe.h" +#include "luatools.h" + +/* platform struct */ +struct platform +{ + GLFrame camera; + + /* display lists identifiers */ + GLuint ground_list; + GLuint triangle_list; + + /* pyramid texture handle */ + GLuint textures[2]; + + GLfloat xrot; + GLfloat yrot; + + /* SDL surface, our screen */ + SDL_Surface *screen; + + SDL_TimerID timer_id; + SDL_Cursor *my_cursor; + + /* Lua */ + lua_State *L; + struct luat_table_platform config_table; +}; + extern const GLfloat fNoLight[]; extern const GLfloat fLowLight[]; extern const GLfloat fShinyLight[]; @@ -8,6 +40,9 @@ extern const GLfloat fBrightLight[]; extern const GLfloat lightPos[]; /* function prototypes */ +void platform_init(struct platform *); +void platform_destroy(struct platform *); +void load_config(struct platform *); void setup_opengl(void); SDL_Surface *setup_sdl_video(int, int, int, unsigned int); SDL_Surface *setup_sdl(void); |