Mercurial > hg > Members > tkaito > task_dandy
annotate dandy.h @ 4:ccc811ee5f55
property add.
author | tkaito |
---|---|
date | Mon, 21 Jun 2010 03:23:55 +0900 |
parents | 7b4c2cfeba45 |
children | 661ec1e92042 |
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; | |
32 | |
33 static const float player_speed = 10.0f; | |
34 static const float player_radius = 42.0f; | |
35 | |
36 static const float boss_radius_x = 65.4f; | |
37 static const float boss_radius_y = 130.8f; | |
38 static const float first_boss1_speed = 10.0; | |
39 static const float first_boss1_depth = 500.0; | |
40 static const float return_boss1_depth_speed = 10.0; | |
41 | |
42 static const float shot_speed = 30.0f; | |
43 static const float shot_radius = 42.4f; | |
44 | |
45 extern void title_move(SceneGraphPtr node, void *sgroot_, int w, int h); | |
46 extern void title_coll(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree); | |
47 extern void dandy_move(SceneGraphPtr node, void *sgroot_, int w, int h); | |
48 extern void dandy_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree); | |
4 | 49 extern void create_title(void *sgroot, int w, int h, ObjPropertyPtr charactor); |
50 extern void create_stage(void *sgroot, int w, int h, ObjPropertyPtr charactor); | |
2 | 51 |
52 typedef struct enemy_state { | |
53 const char *charano; | |
54 int score; | |
55 int vital; | |
56 | |
57 } state; | |
58 | |
59 #define ENEMY_STATUS_TABLE { \ | |
60 ENEMY_STATUS("test00", 0, 0), \ | |
61 ENEMY_STATUS("greencrab", 330, 98) \ | |
62 } |