annotate dandy.h @ 4:ccc811ee5f55

property add.
author tkaito
date Mon, 21 Jun 2010 03:23:55 +0900
parents 7b4c2cfeba45
children 661ec1e92042
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
3 #include <stdio.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
4 #include <stdlib.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
5 #include <string.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
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
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
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
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
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
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
30
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
31 static const int ENEMY_NUM = 1;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
32
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
33 static const float player_speed = 10.0f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
34 static const float player_radius = 42.0f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
35
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
36 static const float boss_radius_x = 65.4f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
37 static const float boss_radius_y = 130.8f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
38 static const float first_boss1_speed = 10.0;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
39 static const float first_boss1_depth = 500.0;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
40 static const float return_boss1_depth_speed = 10.0;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
41
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
42 static const float shot_speed = 30.0f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
43 static const float shot_radius = 42.4f;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
44
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
45 extern void title_move(SceneGraphPtr node, void *sgroot_, int w, int h);
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
46 extern void title_coll(SceneGraphPtr node, void *sgroot_, int w, int h, SceneGraphPtr tree);
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
47 extern void dandy_move(SceneGraphPtr node, void *sgroot_, int w, int h);
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
48 extern void dandy_coll(SceneGraphPtr node, void *sgroot_, int w, int h,SceneGraphPtr tree);
4
ccc811ee5f55 property add.
tkaito
parents: 3
diff changeset
49 extern void create_title(void *sgroot, int w, int h, ObjPropertyPtr charactor);
ccc811ee5f55 property add.
tkaito
parents: 3
diff changeset
50 extern void create_stage(void *sgroot, int w, int h, ObjPropertyPtr charactor);
2
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
51
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
52 typedef struct enemy_state {
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
53 const char *charano;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
54 int score;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
55 int vital;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
56
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
57 } state;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
58
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
59 #define ENEMY_STATUS_TABLE { \
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
60 ENEMY_STATUS("test00", 0, 0), \
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
61 ENEMY_STATUS("greencrab", 330, 98) \
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
62 }