annotate ppe/task_object.h @ 28:813f5461daab

collision bug fix.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Tue, 28 Dec 2010 15:50:04 +0900
parents ee4c488d48a3
children ccb8d9956a1e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 #ifndef INCLUDE_OBJECT
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
2 #define INCLUDE_OBJECT
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
3
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
4 #define TAMALV1P 14
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 #define TAMALV2P 50
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
6 #define TAMALV3P 24
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
7
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
8 #define LASERLV1P 17
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
9 #define LASERLV2P 154
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
10 #define LASERLV3P 51
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
11
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
12 #define TRUE 1
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
13 #define FALSE 0
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
14 #define BOOL char
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
15
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
16 typedef struct player {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
17 int x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
18 int y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
19 int ch;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
20 int point;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
21 BOOL bf;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
22 int muteki;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
23 int zanki;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
24 int ccount;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
25 } player;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
26
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
27 typedef struct tama {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
28 int x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
29 int y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
30 } tama;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
31
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
32 typedef struct tama1 {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
33 int x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
34 int y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
35 int r;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
36 int l;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
37 } tama1;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
38
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
39 typedef struct tama2 {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
40 int x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
41 int y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
42 int rr;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
43 int sr;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
44 int sl;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
45 int ll;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
46 } tama2;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
47
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
48 typedef struct stge {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
49 int stg;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
50 } stge;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
51
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
52 typedef struct laser {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
53 float x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
54 float y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
55 float sx;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
56 float sy;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
57 int r;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
58 int enemyno;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
59 float s;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
60 } laser;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
61
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
62 typedef struct bomchar {
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
63 int x;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
64 int y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
65 int f;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
66 int no;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
67 } bomchar;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
68
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
69 typedef struct CHARACTER{
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
70 float x; //position
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
71 float y;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
72
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
73 float vx; //velocity
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
74 float vy;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
75
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
76 float vit; //vitality
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
77 int score;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
78 int dt1;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
79 int dt2;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
80 int charano; //sprite_number
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
81 BOOL tama; //bullet identifier
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
82 BOOL f; //apiarance idenfifier
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
83 float s;
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
84 int task;
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
85
1
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
86 struct CHARACTER * (*state)(struct CHARACTER *p);
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
87 struct CHARACTER * (*collision)(struct CHARACTER *p);
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
88 struct CHARACTER *next;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
89 struct CHARACTER *prev;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
90
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
91 } CHARACTER;
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
92
2
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
93 typedef struct CollisionProperty {
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
94 int bomend;
2
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
95 int enemycount;
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
96 int infg_level;
2
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
97
28
813f5461daab collision bug fix.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 25
diff changeset
98 player jiki;
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
99 stge lg;
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
100 stge infg;
2
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
101
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
102 tama1 tama_lv1[20];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
103 tama2 tama_lv2[20];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
104 tama1 tlv3;
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
105 laser laser_lv1[20];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
106 laser laser_lv2[20];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
107 laser laser_lv3[128];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
108 bomchar bchar[100];
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
109
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
110 } CollisionProperty, *CollisionPropertyPtr;
6382d8f6a973 not working.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 1
diff changeset
111
25
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
112 typedef struct TamaContainer {
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
113 bool flag;
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
114
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
115 int type;
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
116 float x, y;
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
117 } TamaContainer, *TamaContainerPtr;
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
118
1
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
119 CHARACTER * noaction(CHARACTER *p);
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
120 CHARACTER * delete_chara(CHARACTER *p);
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
121 void Bom(int x, int y, int *bomend, bomchar *bchar);
25
ee4c488d48a3 add Puttama func.
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 19
diff changeset
122 void Puttama(int type, float x, float y, TamaContainerPtr tama);
19
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents: 7
diff changeset
123 void Putenemy(int charano, float x, float y, float vx, float vy, int task);
1
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
124
b4c797eee72a task dandy base
koba <koba@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
125 #endif