diff schedule.c @ 91:cb6c6de125dc

halfway
author Atuto SHIROMA <e095729@ie.u-ryukyu.ac.jp>
date Thu, 26 May 2011 14:44:03 +0900
parents 8edae89a3877
children b0249b856488
line wrap: on
line diff
--- a/schedule.c	Thu May 19 16:41:21 2011 +0900
+++ b/schedule.c	Thu May 26 14:44:03 2011 +0900
@@ -2,8 +2,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdbool.h>
-//#include "libps2.h"
-//#include "ps2util.h"
+#include "libps2.h"
+#include "ps2util.h"
 #include "field.h"
 #include "car.h"
 #include "gSprite.h"
@@ -11,6 +11,7 @@
 #include "game.h"
 #include "controler.h"
 #include "camera.h"
+#include "carNode.h"
 //#include "light.h"
 #include "title_scene.h"
 #include "game_time.h"
@@ -31,7 +32,6 @@
 #define SP_SEL_CAR    50
 #define SP_SEL_COURSE 80
 
-//extern Game *game;
 
 static void set_schedule(Game *game);
 static void sche_game_init(Game *game);
@@ -52,24 +52,6 @@
 
 
 
-/* --- car.c --- */
-extern void car_update(CarPtr);
-/* --- carNode.c */
-extern void carNode_append(CarPtr);
-extern void carNode_draw();
-extern void carNode_destroy();
-/* --- fielc.c */
-extern void field_update(CarPtr);
-/* --- mytype.c --- */
-extern void wait_init();
-//extern bool wait(double);
-extern void time_RaceStart();
-extern double time_RaceTime();
-/* --- linda.c --- */
-extern void linda_env_init();
-
-
-
 /* timer */
 static int start_time,time_count;
 static int RUNNIG=0;
@@ -106,7 +88,7 @@
 static void
 graphic_init()
 {
-  //    gSprite_Init(); // グラフィック関連の初期化
+    gSprite_Init(); // グラフィック関連の初期化
     gFont_Init();   // フォント関連の初期化
 }
 
@@ -144,7 +126,7 @@
 
 #ifdef LINDA
     sche_func = &sche_game_wait;
-    //set_schedule_assumption(sche_game_wait);
+    set_schedule_assumption(sche_game_wait);
 #else
     set_schedule_assumption(sche_game_opening);
 #endif
@@ -173,7 +155,7 @@
     gFont_SetString("CONNECT OK!!", 170, 300);
     if (game->play_id == 1) {
 	gFont_SetString(" PUSH START ", 170, 400);
-	//	if (pad.st != 1) { goto WAIT_READY; }
+	//if (pad.st != 1) { goto WAIT_READY; }
     }
 
     set_schedule_assumption(sche_game_opening);
@@ -342,7 +324,7 @@
      
     car_update(game->jiki);
     field_update(game->jiki);
-    //    camera_update(game->jiki->body->transfer);
+        camera_update(game,game->jiki->body->transfer);
     //    carNode_draw();
 
     gFont_SetStringInt(game->rap, 50, 100);
@@ -439,13 +421,13 @@
 
     car_update(game->jiki);
     field_update(game->jiki);
-    //    carNode_draw();
-    //    camera_update(game->jiki->body->transfer);
-    /*
-    if (pad.st == 1) {
+    carNode_draw();
+    camera_update(game,game->jiki->body->transfer);
+    
+    if (true){//pad.st == 1) {
 	set_schedule_assumption(sche_game_main_finish);
     }
-    */
+    
 }
 
 void