changeset 75:89ede83e7959

*** empty log message ***
author gongo
date Thu, 09 Nov 2006 05:06:10 +0000
parents ec6563ccd5f4
children cd3457b7e098
files linda.c linda.h schedule.c
diffstat 3 files changed, 5 insertions(+), 66 deletions(-) [+]
line wrap: on
line diff
--- a/linda.c	Thu Nov 09 04:53:04 2006 +0000
+++ b/linda.c	Thu Nov 09 05:06:10 2006 +0000
@@ -448,10 +448,10 @@
     FMATRIX po;
     CarPtr mycar = game.jiki;
     CarPtr enemy = NULL;
-    get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, (char*)po);
 
     for (i=1; i<=CLIENT_MAX; i++) {
 	ps2_vu0_unit_matrix(po);
+	get_packet(i, NULL, &mode, NULL, NULL, (char*)po);
 
 	if (i == id) {
 	    ps2_vu0_copy_matrix(po, mycar->body->transfer);
@@ -464,9 +464,9 @@
 	    get_packet(i, NULL, &mode, NULL, NULL, (char*)po);	    
 	    if (mode == MODE_MAIN) {
 		ps2_vu0_copy_matrix(enemy->body->transfer, po);
-		enemy->body->transfer[3][0] -= game.jiki->location[0];
-		enemy->body->transfer[3][1] -= game.jiki->location[1];
-		enemy->body->transfer[3][2] -= game.jiki->location[2];
+		enemy->body->transfer[3][0] -= mycar->location[0];
+		enemy->body->transfer[3][1] -= mycar->location[1];
+		enemy->body->transfer[3][2] -= mycar->location[2];
 		enemy->body->transfer[3][3] = 1;
 	    }
 	}
@@ -474,42 +474,6 @@
 	return FALSE;
 }
 
-static Bool
-linda_sche_main0(int p)
-{
-    FMATRIX data;
-
-    ps2_vu0_unit_matrix(data);
-    ps2_vu0_copy_matrix(data, game.jiki->body->transfer);
-    ps2_vu0_copy_vector(data[3], game.jiki->location);
-	
-    linda_seq[game.play_id] = psx_in(game.play_id);
-    send_packet(game.play_id, MODE_MAIN, 0, 0, (char*)data);
-
-   return FALSE;
-}
-
-static Bool
-linda_sche_main1(int p)
-{
-    int mode;
-    FMATRIX po;
-    CarPtr enemy = linda_carlist[PLAYER_1P];
-    ps2_vu0_unit_matrix(po);
-    
-    get_packet(PLAYER_1P, NULL, &mode, NULL, NULL, (char*)po);
-
-    if (mode == MODE_MAIN) {
-	ps2_vu0_copy_matrix(enemy->body->transfer, po);
-	enemy->body->transfer[3][0] -= game.jiki->location[0];
-	enemy->body->transfer[3][1] -= game.jiki->location[1];
-	enemy->body->transfer[3][2] -= game.jiki->location[2];
-	enemy->body->transfer[3][3] = 1;
-    }    
-
-    return FALSE;
-}
-
 Bool
 linda_update(int p)
 {
@@ -517,30 +481,6 @@
 }
 
 #if 0
-static void
-linda_enemy_update(int id, CarPtr enemy, CarInfoPtr tpl)
-{
-    int i,j;
-
-    if (id == 1 || tpl->state == GAME_GOAL) {
-	common_state = tpl->state;
-	game.course_id = tpl->course_id;
-    }
-
-    if (enemy && (common_state == GAME_MAIN || common_state == GAME_GOAL)) {
-	for (i=0; i<4; i++) {
-	    for (j=0; j<4; j++) {
-		enemy->body->transfer[i][j] = tpl->position[i][j];
-	    }
-	}
-
-	/* 敵は相対位置で */
-	enemy->body->transfer[3][0] -= game.jiki->location[0];
-	enemy->body->transfer[3][1] -= game.jiki->location[1];
-	enemy->body->transfer[3][2] -= game.jiki->location[2];
-	enemy->body->transfer[3][3] = 1;
-    }
-}
 
 /*
  * 位置が同じなら1を返す。
--- a/linda.h	Thu Nov 09 04:53:04 2006 +0000
+++ b/linda.h	Thu Nov 09 05:06:10 2006 +0000
@@ -59,5 +59,3 @@
 static Bool linda_sche_main_ready0(int);
 static Bool linda_sche_main_ready1(int);
 static Bool linda_sche_main(int);
-static Bool linda_sche_main0(int);
-static Bool linda_sche_main1(int);
--- a/schedule.c	Thu Nov 09 04:53:04 2006 +0000
+++ b/schedule.c	Thu Nov 09 05:06:10 2006 +0000
@@ -292,6 +292,7 @@
 static void
 sche_game_main_ready()
 {
+    gFont_SetString("Loading....", 180, 100);
     set_schedule_assumption(sche_game_main);
 }