Mercurial > hg > old > magoroku_racing
view 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 |
line wrap: on
line source
#include <stdio.h> #include <stdlib.h> #include "libps2.h" #include "ps2util.h" #include "car.h" #include "game.h" #include "carNode.h" /* --- car.c --- */ void car_destroy(CarPtr car); static CarPtr car_list; void carNode_append(CarPtr newCar) { CarPtr p = car_list; if (!p) { car_list = newCar; } else { while (p->next) p = p->next; p->next = newCar; } } void carNode_draw() { CarPtr p = car_list; while (p) { ps2util_obj_Draw(p->body); p = p->next; } } void carNode_destroy() { CarPtr p = car_list; while (p) { car_destroy(p); p = p->next; } car_list = NULL; }