Mercurial > hg > Members > kono > Cerium
comparison Renderer/Engine/viewer.h @ 728:4f77768d7a7f
add Engine/ViewerDevice , SgRootChange not work
author | aaa |
---|---|
date | Sat, 19 Dec 2009 20:32:02 +0900 |
parents | 9136cf9186b6 |
children | 50220f219341 |
comparison
equal
deleted
inserted
replaced
727:aaaa0baeab89 | 728:4f77768d7a7f |
---|---|
7 #include "TaskManager.h" | 7 #include "TaskManager.h" |
8 #include "KeyStat.h" | 8 #include "KeyStat.h" |
9 #include "MainLoop.h" | 9 #include "MainLoop.h" |
10 #include "Application.h" | 10 #include "Application.h" |
11 #include "SceneGraphRoot.h" | 11 #include "SceneGraphRoot.h" |
12 #include "ViewerDevice.h" | |
12 | 13 |
13 class SceneGraphRoot; | 14 class SceneGraphRoot; |
14 | 15 |
15 class Application; | 16 class Application; |
16 | 17 |
17 class Viewer : public MainLoop { | 18 class Viewer : public MainLoop { |
18 | 19 |
19 public: | 20 public: |
20 | 21 |
21 Viewer(int bpp, int width, int height, int spenum); | 22 Viewer(TaskManager *manager, ViewerDevice *dev, int bpp, int width, int height, int spenum); |
22 | 23 |
23 virtual ~Viewer() {} | 24 virtual ~Viewer() {} |
24 | 25 |
26 ViewerDevice *dev; | |
25 Application *app; | 27 Application *app; |
26 | 28 |
27 TaskManager *manager; | 29 TaskManager *manager; |
28 key_stat *keyPtr; | 30 key_stat *keyPtr; |
29 HTaskPtr draw_dummy; | 31 HTaskPtr draw_dummy; |
42 Uint32 video_flags; | 44 Uint32 video_flags; |
43 Uint32 *pixels; | 45 Uint32 *pixels; |
44 | 46 |
45 SceneGraphRoot *sgroot; | 47 SceneGraphRoot *sgroot; |
46 | 48 |
47 virtual void video_init(TaskManager *manager) = 0; | 49 //Uint32 *video_init(TaskManager *manager, int bpp, int width, int height); |
48 void init(); | 50 void init(); |
49 | 51 |
50 int get_ticks(); | 52 int get_ticks(); |
51 bool quit_check(); | 53 bool quit_check(); |
52 void quit(); | 54 void quit(); |
55 HTaskPtr initLoop(); | |
53 | 56 |
54 virtual void clean_pixels() {} | 57 void clean_pixels() {} |
58 | |
59 void run_init(TaskManager *manager, Application *app); | |
60 void run_loop(HTaskPtr task_next); | |
61 void run_draw(HTaskPtr task_next); | |
62 void run_finish(); | |
63 void run_move(HTaskPtr task_next); | |
64 void run_collision(); | |
65 void rendering(HTaskPtr task_next); | |
66 void common_draw(HTaskPtr task_next); | |
67 void common_rendering(HTaskPtr task_next, SceneGraphRoot *sgroot); | |
55 | 68 |
56 virtual void run_init(TaskManager *manager, Application *app); | 69 void spe_rendering(HTaskPtr task_next); |
57 virtual void run_loop(HTaskPtr task_next); | 70 void spe_draw(HTaskPtr task_next); |
58 virtual void run_draw(HTaskPtr task_next); | 71 // void exchange_sgroot(TaskManager *manager); |
59 virtual void run_finish(); | |
60 virtual void run_move(HTaskPtr task_next); | |
61 virtual void run_collision(); | |
62 virtual void rendering(HTaskPtr task_next); | |
63 virtual void common_draw(HTaskPtr task_next); | |
64 virtual void common_rendering(HTaskPtr task_next); | |
65 | |
66 virtual void spe_rendering(HTaskPtr task_next); | |
67 virtual void spe_draw(HTaskPtr task_next); | |
68 //virtual void exchange_sgroot(TaskManager *manager); | |
69 | 72 |
70 void getKey(); | 73 void getKey(); |
71 void get_send_controll(); | 74 void get_send_controll(); |
72 | 75 |
73 // void createFromXMLfile(const char *file); | 76 // void createFromXMLfile(const char *file); |
114 int getLast() | 117 int getLast() |
115 { | 118 { |
116 return sgroot->getLast(); | 119 return sgroot->getLast(); |
117 } | 120 } |
118 | 121 |
119 | |
120 | |
121 | |
122 private: | |
123 HTaskPtr initLoop(); | |
124 | |
125 }; | 122 }; |
126 | 123 |
127 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK | 124 #define default_sdl_flag SDL_INIT_TIMER | SDL_INIT_JOYSTICK |
128 | 125 |
129 | 126 |