annotate carNode.cc @ 102:31b24eaf05cc

remove .o
author Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
date Thu, 02 Jun 2011 23:11:44 +0900
parents e5f2eb98b575
children ed702e49cc6c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
1 #include <stdio.h>
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
2 #include <stdlib.h>
91
cb6c6de125dc halfway
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
3 #include "libps2.h"
cb6c6de125dc halfway
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
4 #include "ps2util.h"
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
5 #include "car.h"
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
6 #include "game.h"
91
cb6c6de125dc halfway
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
7 #include "carNode.h"
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
8
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
9 /* --- car.c --- */
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
10 void car_destroy(CarPtr car);
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
11
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
12 static CarPtr car_list;
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
13
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
14 void
100
e5f2eb98b575 change cc
e085768
parents: 99
diff changeset
15 carNode_append(CarPtr newCar)
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
16 {
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
17 CarPtr p = car_list;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
18
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
19 if (!p) {
100
e5f2eb98b575 change cc
e085768
parents: 99
diff changeset
20 car_list = newCar;
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
21 } else {
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
22 while (p->next) p = p->next;
100
e5f2eb98b575 change cc
e085768
parents: 99
diff changeset
23 p->next = newCar;
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
24 }
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
25 }
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
26
91
cb6c6de125dc halfway
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
27
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
28 void
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
29 carNode_draw()
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
30 {
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
31 CarPtr p = car_list;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
32
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
33 while (p) {
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
34 ps2util_obj_Draw(p->body);
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
35 p = p->next;
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
36 }
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
37 }
91
cb6c6de125dc halfway
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 90
diff changeset
38
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
39
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
40 void
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
41 carNode_destroy()
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
42 {
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
43 CarPtr p = car_list;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
44
96
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
45 while (p) {
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
46 car_destroy(p);
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
47 p = p->next;
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
48 }
0b65ca27f113 compile on Mac OS X 2
Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
parents: 91
diff changeset
49 car_list = NULL;
0
0fae5658fb0b Initial revision
gongo
parents:
diff changeset
50 }