Mercurial > hg > old > magoroku_racing.bad
changeset 43:a1908b83f8fa
*** empty log message ***
author | gongo |
---|---|
date | Mon, 06 Nov 2006 06:13:36 +0000 |
parents | a3b96859edd3 |
children | 3b71b39411b1 |
files | car.c car.h carNode.c controler.c controler.h field.c field.h gSprite.c game.c linda.c schedule.c |
diffstat | 11 files changed, 18 insertions(+), 69 deletions(-) [+] |
line wrap: on
line diff
--- a/car.c Mon Nov 06 04:14:30 2006 +0000 +++ b/car.c Mon Nov 06 06:13:36 2006 +0000 @@ -5,7 +5,6 @@ #include <stdlib.h> #include "libps2.h" #include "ps2util.h" -#include "col.h" #include "field.h" #include "car.h" #include "mytype.h"
--- a/car.h Mon Nov 06 04:14:30 2006 +0000 +++ b/car.h Mon Nov 06 06:13:36 2006 +0000 @@ -15,3 +15,7 @@ struct car *next; OBJECT* body; } Car, *CarPtr; + +extern CarPtr car_init(int id); +extern void car_accelerate(CarPtr, int); +extern void car_swerve(CarPtr, int);
--- a/carNode.c Mon Nov 06 04:14:30 2006 +0000 +++ b/carNode.c Mon Nov 06 06:13:36 2006 +0000 @@ -8,8 +8,6 @@ #include "car.h" #include "game.h" -extern Game game; - /* --- car.c --- */ extern void car_destroy(CarPtr car);
--- a/controler.c Mon Nov 06 04:14:30 2006 +0000 +++ b/controler.c Mon Nov 06 06:13:36 2006 +0000 @@ -1,15 +1,9 @@ /* * $Id$ */ -#include <stdio.h> -#include <stdlib.h> #include "libps2.h" #include "ps2util.h" -#include "col.h" -#include "field.h" -#include "car.h" #include "controler.h" -#include "game.h" SGO_PAD pad;
--- a/controler.h Mon Nov 06 04:14:30 2006 +0000 +++ b/controler.h Mon Nov 06 06:13:36 2006 +0000 @@ -24,3 +24,5 @@ short triangle; short square; } SGO_PAD; + +extern SGO_PAD pad;
--- a/field.c Mon Nov 06 04:14:30 2006 +0000 +++ b/field.c Mon Nov 06 06:13:36 2006 +0000 @@ -6,7 +6,6 @@ #include "libps2.h" #include "ps2util.h" #include "mytype.h" -#include "col.h" #include "field.h" #include "car.h" #include "quotanion.h"
--- a/field.h Mon Nov 06 04:14:30 2006 +0000 +++ b/field.h Mon Nov 06 06:13:36 2006 +0000 @@ -1,6 +1,8 @@ /* * $Id$ */ +#include "col.h" + typedef struct field { struct field *next; struct field *prev; @@ -10,3 +12,6 @@ FVECTOR location; ColFaceHd colface; } Field, *FieldPtr; + +extern void field_init(int id); +extern void field_destroy();
--- a/gSprite.c Mon Nov 06 04:14:30 2006 +0000 +++ b/gSprite.c Mon Nov 06 06:13:36 2006 +0000 @@ -5,10 +5,6 @@ #include <stdlib.h> #include "libps2.h" #include "ps2util.h" -#include "col.h" -#include "field.h" -#include "car.h" -#include "game.h" #include "gSprite.h" #define DEFOBJ 100 @@ -23,8 +19,6 @@ static TEXTURE *sprite_tex; -extern CarPtr car; - void gSprite_DefSprite(int number, int tx, int ty, int tw, int th) {
--- a/game.c Mon Nov 06 04:14:30 2006 +0000 +++ b/game.c Mon Nov 06 06:13:36 2006 +0000 @@ -6,16 +6,10 @@ #include <stdlib.h> #include "libps2.h" #include "ps2util.h" - -#include "camera.h" #include "controler.h" #include "lindaapi.h" -#include "col.h" -#include "field.h" #include "car.h" #include "game.h" -#include "gSprite.h" -#include "gFont.h" /* schedule.c */ extern void schedule();
--- a/linda.c Mon Nov 06 04:14:30 2006 +0000 +++ b/linda.c Mon Nov 06 06:13:36 2006 +0000 @@ -19,22 +19,11 @@ extern void gFont_SetString(char *, int, int); extern void gFont_SetStringInt(int, int, int); extern void carNode_append(CarPtr); -extern Game game; extern FILE *main_fp; -static GAME_STATE common_state = GAME_WAIT; -static int my_id; - -typedef struct car_info { - GAME_STATE state; - FMATRIX position; - int car_id; - int course_id; - int create_flg; -} CarInfo, *CarInfoPtr; +static int my_id; static CarPtr linda_carlist[CLIENT_MAX+1]; -static CarInfo jiki; static int linda_seq[CLIENT_MAX+1]; static void @@ -241,29 +230,14 @@ } void -linda_jikiInfo_init() +linda_env_init() { - int i, j; - - jiki.car_id = 1; - jiki.course_id = 1; - jiki.create_flg = 0; - jiki.state = game.state; - - // malloc16で生成してないからBus errorに - // ps2_vu0_unit_matrix(jiki.position); - for (i=0; i<4; i++) { - for (j=0; j<4; j++) { - if (i==j) - jiki.position[i][j] = 1; - else - jiki.position[i][j] = 0; - } - } + int i; for (i=0; i<CLIENT_MAX+1; i++) { linda_carlist[i] = NULL; } + } @@ -271,7 +245,6 @@ int linda_init() { - int i; start_linda(LINDA_HOST);
--- a/schedule.c Mon Nov 06 04:14:30 2006 +0000 +++ b/schedule.c Mon Nov 06 06:13:36 2006 +0000 @@ -6,7 +6,6 @@ #include <string.h> #include "libps2.h" #include "ps2util.h" -#include "col.h" #include "field.h" #include "car.h" #include "gSprite.h" @@ -14,7 +13,6 @@ #include "game.h" #include "controler.h" #include "camera.h" -#include "mytype.h" #include "light.h" #include "title_scene.h" #include "game_time.h" @@ -26,32 +24,21 @@ #define SP_SEL_CAR 50 #define SP_SEL_COURSE 80 -extern int car_check(); -/* --- controler.c --- */ -extern SGO_PAD pad; /* --- car.c --- */ -extern CarPtr car_init(int); -extern void car_accelerate(CarPtr, int); -extern void car_swerve(CarPtr, int); extern void car_update(CarPtr); /* --- carNode.c */ extern void carNode_append(CarPtr); extern void carNode_draw(); extern void carNode_destroy(); -/* --- field.c --- */ -extern void field_init(int); +/* --- fielc.c */ extern void field_update(CarPtr); -extern void field_destroy(); /* --- mytype.c --- */ extern void wait_init(); extern Bool wait(double); extern void time_RaceStart(); extern double time_RaceTime(); -/* --- demo.c --- */ -extern void demo_openFp(int); -extern void demo_closeFp(); /* --- linda.c --- */ -extern void linda_jikiInfo_init(); +extern void linda_env_init(); /* timer */ static int start_time,time_count; @@ -108,7 +95,7 @@ ranking = 0; wait_init(); - linda_jikiInfo_init(); + linda_env_init(); }