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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
1 #ifndef INCLUDED_VIEWER
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
2 #define INCLUDED_VIEWER
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
3
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
4 #include <SDL.h>
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
0e62e80fc039 add key
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents: 408
diff changeset
8 #include "KeyStat.h"
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
9
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
10 class Viewer {
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
11 public:
399
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
12 //Viewer(TaskManager *manager, int bpp, int width, int height, int spenum);
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
13 Viewer(int bpp, int width, int height, int spenum);
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
14
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
15 virtual ~Viewer(void) {}
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
16
421
6094dfd1f08c comment
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 417
diff changeset
17 //Application *application;
6094dfd1f08c comment
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 417
diff changeset
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
0e62e80fc039 add key
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents: 408
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
22 /* screen info */
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
23 int width;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
24 int height;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
25 int bpp;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
26
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
27 int spe_num;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
28
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
29 int rgb_size[3];
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
30 Uint32 video_flags;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
31 Uint32 *pixels;
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
34 void init();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
35
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
36 int get_ticks();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
37 bool quit_check();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
38 void quit();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
39
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
40 virtual void swap_buffers();
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
41 virtual void clean_pixels() {}
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
28f96e039c11 add Move, Draw, ChainMove
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 399
diff changeset
51
417
0e62e80fc039 add key
Hiroki NAKASONE <hiroki@cr.ie.u-ryukyu.ac.jp>
parents: 408
diff changeset
52 void getKey();
408
28f96e039c11 add Move, Draw, ChainMove
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 399
diff changeset
53 void get_send_controll();
399
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
54 private:
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
55 HTaskPtr initLoop();
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
56 void mainLoop();
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
57 void speLoop();
943174e92f22 fix viewer.cc (run_loop)
game@henri.cr.ie.u-ryukyu.ac.jp
parents: 397
diff changeset
58
109
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
59 };
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
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
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
64 #endif
028ffc9c0375 Cerium cvs version
gongo@gendarme.local
parents:
diff changeset
65