Mercurial > hg > old > magoroku_racing.bad
view carNode.c @ 79:376bac6b05f1
*** empty log message ***
author | gongo |
---|---|
date | Thu, 09 Nov 2006 08:28:48 +0000 |
parents | a1908b83f8fa |
children | 8edae89a3877 |
line wrap: on
line source
/* * $Id$ */ #include <stdio.h> #include <stdlib.h> #include "libps2.h" #include "ps2util.h" #include "car.h" #include "game.h" /* --- car.c --- */ extern void car_destroy(CarPtr car); static CarPtr car_list; void carNode_append(CarPtr new) { CarPtr p = car_list; if (!p) { car_list = new; } else { while (p->next) p = p->next; p->next = new; } } 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; }