annotate Renderer/Test/boss1_action.h @ 0:04e28d8d3c6f

first commit
author Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
date Mon, 08 Nov 2010 01:23:25 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef BOSS1_ACCTION_H
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define BOSS1_ACCTION_H
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #include <math.h>
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #include "SceneGraphRoot.h"
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #include "Application.h"
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
7 #include "MainLoop.h"
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
8
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
9
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 class boss1_action : public Application {
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 MainLoopPtr init(Viewer *viewer, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 };
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
14
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
15 static const float player_speed = 10.0f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 static const float player_radius = 42.0f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
17
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 static const float boss_radius_x = 65.4f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 static const float boss_radius_y = 130.8f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 static const float first_boss1_speed = 10.0;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 static const float first_boss1_depth = 500.0;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 static const float return_boss1_depth_speed = 10.0;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
23
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 static const float shot_speed = 30.0f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 static const float shot_radius = 42.4f;
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
27
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 /*
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 null_move(SceneGraphPtr node, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
31 */
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
32
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 null_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 SceneGraphPtr tree);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
36
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
38 boss1_move_right(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
39
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 boss1_move_left(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
42
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 /*
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 boss1_move_return(SceneGraphPtr node, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 */
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 /*
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 boss1_first_move(SceneGraphPtr node, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
51 */
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
52
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 player_move(SceneGraphPtr node, void *sgroot_, int screen_2, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
55
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 /*
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 player_move_left(SceneGraphPtr node,int screen_2, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 */
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
60
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
61 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 player_collision(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h,
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 SceneGraphPtr tree);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 shot_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
66
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
68 shot_collision(SceneGraphPtr node, void *sgroot_, int screen_2, int screen_h,
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 SceneGraphPtr tree);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 static void
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 blast_move(SceneGraphPtr node, void *sgroot_, int screen_w, int screen_h);
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
04e28d8d3c6f first commit
Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 #endif