Mercurial > hg > Members > tkaito > task_dandy
annotate dandy.h @ 3:7b4c2cfeba45
task not move 2%
author | tkaito |
---|---|
date | Thu, 17 Jun 2010 06:31:01 +0900 |
parents | 6e1afe1016dc |
children | ccc811ee5f55 |
rev | line source |
---|---|
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
1 #include <math.h> |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
2 #include <stdlib.h> |
3 | 3 #include <stdio.h> |
4 #include <stdlib.h> | |
5 #include <string.h> | |
6 #include "TaskManager.h" | |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
7 #include "SceneGraph.h" |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
8 #include "Application.h" |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
9 #include "MainLoop.h" |
3 | 10 #include "Func.h" |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
11 |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
12 class dandy : public Application { |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
13 MainLoopPtr init(Viewer *viewer, int w, int h); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
14 }; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
15 |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
16 typedef void (*move)(SceneGraphPtr node, void *sgroot_, int w, int h); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
17 typedef void (*coll)(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
18 |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
19 typedef struct { |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
20 double x, y; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
21 double vx, vy; |
3 | 22 int frame; |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
23 const char *chara; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
24 int vital; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
25 int score; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
26 void *parent; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
27 void *root; |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
28 |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff
changeset
|
29 } *ObjPropertyPtr, ObjProperty; |
2 | 30 |
31 static const int ENEMY_NUM = 1; | |
3 | 32 extern ObjPropertyPtr charactor; |
2 | 33 |
34 static const float player_speed = 10.0f; | |
35 static const float player_radius = 42.0f; | |
36 | |
37 static const float boss_radius_x = 65.4f; | |
38 static const float boss_radius_y = 130.8f; | |
39 static const float first_boss1_speed = 10.0; | |
40 static const float first_boss1_depth = 500.0; | |
41 static const float return_boss1_depth_speed = 10.0; | |
42 | |
43 static const float shot_speed = 30.0f; | |
44 static const float shot_radius = 42.4f; | |
45 | |
46 extern void title_move(SceneGraphPtr node, void *sgroot_, int w, int h); | |
47 extern void title_coll(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree); | |
48 extern void dandy_move(SceneGraphPtr node, void *sgroot_, int w, int h); | |
49 extern void dandy_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree); | |
50 extern void create_title(void *sgroot, int w, int h); | |
51 extern void create_stage(void *sgroot, int w, int h); | |
52 | |
53 typedef struct enemy_state { | |
54 const char *charano; | |
55 int score; | |
56 int vital; | |
57 | |
58 } state; | |
59 | |
60 #define ENEMY_STATUS_TABLE { \ | |
61 ENEMY_STATUS("test00", 0, 0), \ | |
62 ENEMY_STATUS("greencrab", 330, 98) \ | |
63 } |