annotate dandy.h @ 27:34fde39c0a31

commit test.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 10 Dec 2010 02:57:29 +0900
parents 6bea374ee604 a131729d6e4d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
1 #ifndef INCLUDE_DANDY_H
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
2 #define INCLUDE_DANDY_H
6bea374ee604 global alloc test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
3
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
4 #include <math.h>
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
5 #include <stdlib.h>
3
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
6 #include <stdio.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
7 #include <stdlib.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
8 #include <string.h>
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
9 #include "TaskManager.h"
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
10 #include "SceneGraph.h"
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
11 #include "Application.h"
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
12 #include "MainLoop.h"
3
7b4c2cfeba45 task not move 2%
tkaito
parents: 2
diff changeset
13 #include "Func.h"
27
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
14 #include "character_id.h"
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
15
21
fd9deaa67de9 debug done.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
16 class Dandy : public Application {
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
17 MainLoopPtr init(Viewer *viewer, int w, int h);
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
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
20 typedef struct {
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
21 int chara_id;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
22 const char *name;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
23 float x, y;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
24 float width, height;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
25 float mid_w, mid_h;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
26 float vx, vy;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
27 int vital;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
28 int score;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
29 int frame;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
30 void *parent;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
31 void *root;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
32 int flag;
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
diff changeset
33 } *ObjPropertyPtr, ObjProperty;
2
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
34
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
35 typedef struct enemy_state {
27
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
36 const int charano;
2
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
37 int score;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
38 int vital;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
39
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
40 } state;
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
41
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
42 extern ObjPropertyPtr charactor;
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
43
27
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
44 //キャラクターの総数
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
45 static const int ENEMY_NUM = 1;
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
46
34fde39c0a31 commit test.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 26 24
diff changeset
47 extern void create_title_back(Viewer *sgroot, int w, int h);
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
48 extern void init_game(Viewer *sgroot, int w, int h);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
49 extern void schedule(SceneGraphPtr node, void *sgroot_, int w, int h);
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
50
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
51 #define ENEMY_STATUS_TABLE { \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
52 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
53 ENEMY_STATUS(ENEMY_GREENCRAB, 330, 98), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
54 ENEMY_STATUS(ENEMY_PLANE, 470, 37), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
55 ENEMY_STATUS(ENEMY_REDBULLET, 30, 16), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
56 ENEMY_STATUS(BOSS1_ORGAN, 25000, 10000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
57 ENEMY_STATUS(BOSS1_ORGAN, 10000, 10000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
58 ENEMY_STATUS(ENEMY_BLUEBULLET, 40, 39), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
59 ENEMY_STATUS(ENEMY_LASER, 100, 100000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
60 ENEMY_STATUS(ENEMY_LIGHTNING, 100, 100000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
61 ENEMY_STATUS(ASTEROID, 170, 500), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
62 ENEMY_STATUS(BOSS2_BODY, 100, 500), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
63 ENEMY_STATUS(BOSS2_LEFTSHOULDER, 10000, 12000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
64 ENEMY_STATUS(BOSS2_RIGHTSHOULDER, 10000, 12000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
65 ENEMY_STATUS(BOSS2_RIGHTARM, 5000, 15000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
66 ENEMY_STATUS(BOSS2_LEFTARM, 5000, 15000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
67 ENEMY_STATUS(BOSS2_BATTERY, 10000, 5000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
68 ENEMY_STATUS(BOSS2_OPENBATTERY, 10000, 5000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
69 ENEMY_STATUS(BOSS2_BROKENHATCH, 100, 500), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
70 ENEMY_STATUS(BOSS2_DUMMY, 50000, 15000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
71 ENEMY_STATUS(BOSS2_RIGHTSHOULDERUP, 10000, 20000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
72 ENEMY_STATUS(BOSS2_LEFTSHOULDERUP, 10000, 15000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
73 ENEMY_STATUS(BOSS2_LEFTSHOULDERGIRD, 100, 20000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
74 ENEMY_STATUS(BOSS2_RIGHTARMBATTERY, 100, 500), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
75 ENEMY_STATUS(BOSS2_LEFTARMBATTERY, 100, 500), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
76 ENEMY_STATUS(ORBITMACHINE, 20, 1000000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
77 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
78 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
79 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
80 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
81 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
82 ENEMY_STATUS(BLACKHOLE, 200000, 30000), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
83 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
84 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
85 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
86 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
87 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
88 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
89 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
90 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
91 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
92 ENEMY_STATUS(GUNBATTERY, 540, 137), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
93 ENEMY_STATUS(PURPLECORE, 840, 287), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
94 ENEMY_STATUS(SPACEFISH, 370, 137), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
95 ENEMY_STATUS(MISSILE, 210, 24), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
96 ENEMY_STATUS(BOSS3_BODY, 100000, 9600), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
97 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
98 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
99 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
100 ENEMY_STATUS(0, 0, 0), \
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
101 ENEMY_STATUS(BODD4_BODY, 300000, 20400) \
2
6e1afe1016dc Task is not yet.
tkaito
parents: 1
diff changeset
102 }
24
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
103
a131729d6e4d not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 23
diff changeset
104 #endif