Mercurial > hg > old > magoroku_racing
view carNode.cc @ 115:31dd5c07f7c1
class OBJECT:SceanGraph
author | e085768 |
---|---|
date | Wed, 15 Jun 2011 23:31:59 +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; }