Mercurial > hg > Game > Cerium
comparison Renderer/test_render/viewer.h @ 283:15bfacccde99 draft
fix test_render
author | e065746@localhost.localdomain |
---|---|
date | Fri, 05 Jun 2009 16:49:12 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
282:ef6b225f6f40 | 283:15bfacccde99 |
---|---|
1 #ifndef INCLUDED_VIEWER | |
2 #define INCLUDED_VIEWER | |
3 | |
4 #include <SDL.h> | |
5 | |
6 #ifndef INCLUDED_VIEWER_TYPES | |
7 # include "viewer_types.h" | |
8 #endif | |
9 | |
10 class Viewer { | |
11 public: | |
12 Viewer(int bpp, int width, int height, int spenum); | |
13 | |
14 virtual ~Viewer(void) {} | |
15 | |
16 /* screen info */ | |
17 int width; | |
18 int height; | |
19 int bpp; | |
20 | |
21 int spe_num; | |
22 | |
23 int rgb_size[3]; | |
24 Uint32 video_flags; | |
25 Uint32 *pixels; | |
26 | |
27 virtual void video_init(void) = 0; | |
28 void init(); | |
29 | |
30 int get_ticks(); | |
31 bool quit_check(); | |
32 void quit(); | |
33 | |
34 virtual void swap_buffers(); | |
35 virtual void clean_pixels() {} | |
36 | |
37 virtual void run_init(const char *xml, int sg_number); | |
38 virtual void run_loop(void); | |
39 virtual void run_draw(void); | |
40 virtual void run_finish(void); | |
41 }; | |
42 | |
43 #endif | |
44 | |
45 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK |