Mercurial > hg > Game > Cerium
annotate TaskManager/Test/test_render/viewer.h @ 421:6094dfd1f08c draft
comment
author | game@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Thu, 24 Sep 2009 12:35:32 +0900 |
parents | 0e62e80fc039 |
children | b40a9b901d71 |
rev | line source |
---|---|
109 | 1 #ifndef INCLUDED_VIEWER |
2 #define INCLUDED_VIEWER | |
3 | |
4 #include <SDL.h> | |
5 | |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
180
diff
changeset
|
6 #include "viewer_types.h" |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
7 #include "TaskManager.h" |
417 | 8 #include "KeyStat.h" |
109 | 9 |
10 class Viewer { | |
11 public: | |
399 | 12 //Viewer(TaskManager *manager, int bpp, int width, int height, int spenum); |
109 | 13 Viewer(int bpp, int width, int height, int spenum); |
14 | |
15 virtual ~Viewer(void) {} | |
16 | |
421 | 17 //Application *application; |
18 | |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
19 TaskManager *manager; |
417 | 20 key_stat *keyPtr; |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
21 |
109 | 22 /* screen info */ |
23 int width; | |
24 int height; | |
25 int bpp; | |
26 | |
27 int spe_num; | |
28 | |
29 int rgb_size[3]; | |
30 Uint32 video_flags; | |
31 Uint32 *pixels; | |
32 | |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
33 virtual void video_init(TaskManager *manager) = 0; |
109 | 34 void init(); |
35 | |
36 int get_ticks(); | |
37 bool quit_check(); | |
38 void quit(); | |
39 | |
40 virtual void swap_buffers(); | |
41 virtual void clean_pixels() {} | |
42 | |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
43 virtual void run_init(TaskManager *manager, const char *xml, int sg_number); |
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
44 virtual void run_loop(HTaskPtr task_next); |
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
45 virtual void run_draw(HTaskPtr task_next); |
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
46 virtual void run_finish(); |
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
47 virtual void run_move(HTaskPtr task_next); |
396
0b623693e6ec
don't move. separate allExecute from run_loop
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
383
diff
changeset
|
48 virtual void run_collision(); |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
49 virtual void rendering(HTaskPtr task_next); |
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
50 //virtual void exchange_sgroot(TaskManager *manager); |
408 | 51 |
417 | 52 void getKey(); |
408 | 53 void get_send_controll(); |
399 | 54 private: |
55 HTaskPtr initLoop(); | |
56 void mainLoop(); | |
57 void speLoop(); | |
58 | |
109 | 59 }; |
60 | |
383
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
180
diff
changeset
|
61 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK |
b3fb0013e6b2
fix header, MemHash in kernel
Shinji KONO <kono@ie.u-ryukyu.ac.jp>
parents:
180
diff
changeset
|
62 |
397
ce86b0186a4a
delete manager (in kernel/ppe/TaskManager.h)
game@henri.cr.ie.u-ryukyu.ac.jp
parents:
396
diff
changeset
|
63 |
109 | 64 #endif |
65 |