Mercurial > hg > old > magoroku_racing
diff schedule.cc @ 116:ed702e49cc6c
conpile
author | e085768 |
---|---|
date | Thu, 16 Jun 2011 04:05:33 +0900 |
parents | 31dd5c07f7c1 |
children | 9e4100c5d7ec |
line wrap: on
line diff
--- a/schedule.cc Wed Jun 15 23:31:59 2011 +0900 +++ b/schedule.cc Thu Jun 16 04:05:33 2011 +0900 @@ -105,8 +105,15 @@ static void play_init( Game *game ) { + printf("plya_init1()\n"); + printf("game->car_id = %d\n",game->car_id); + //printf("game->jiki->speed = %f\n",game->jiki->speed); game->jiki = car_init(game->car_id); + + printf("plya_init2()\n"); carNode_append(game->jiki); + + printf("plya_init3()\n"); field_init(game->course_id); } @@ -134,6 +141,8 @@ void sche_game_init(Game *game) { + printf("sche_game_init()\n"); + game_env_init(game); graphic_init(); camera_init(); @@ -189,6 +198,8 @@ void sche_game_opening(Game *game) { + printf("sche_game_opening\n"); + static int blink_count = 0; if (game->play_id==1){ if (blink_count < 35) { @@ -196,7 +207,8 @@ } blink_count = (blink_count > 70) ? 0 : blink_count + 1; - if (pad.st != 1) { goto OPENING; } + // if (pad.st != 1) { goto OPENING; } + if (1) { goto OPENING; } } set_schedule_assumption(sche_game_select_car); @@ -221,13 +233,15 @@ void sche_game_select_car(Game *game) { + printf("sche_game_select_car()\n"); if (i==1){ title_finish_call(); i=2; } - gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 190, 200, 1.5, 1.5); + gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 190, 200, 1.5, 1.5, 0.0); gSprite_PutSprite(24, 460, 300); gSprite_PutSprite(25, 120, 300); + gFont_SetString("SELECT CAR", 180, 50); if (pad.right == 1) { @@ -240,9 +254,9 @@ } if (game->play_id == 1) - if (pad.circle != 1) { goto SELECT_CAR; } - + if (pad.circle != 1) { goto SELECT_CAR; } + set_schedule_assumption(sche_game_select_course); SELECT_CAR: @@ -252,7 +266,8 @@ void sche_game_select_course(Game *game) { - gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 190, 200, 1.7, 1.8); + printf("sche_game_select_course()\n"); + gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 190, 200, 1.7, 1.8, 0.0); gSprite_PutSprite(24, 460, 300); gSprite_PutSprite(25, 120, 300); @@ -283,11 +298,12 @@ void sche_game_ready(Game *game) { + printf("sche_game_ready()\n"); static int blink_count = 0;// gSprite_PutSprite(27+game->play_id,265,10); - gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 50, 120, 1.5, 1.5); - gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 340, 120, 1.7, 1.8); + gSprite_PutSpriteEx(SP_SEL_CAR+game->car_id, 50, 120, 1.5, 1.5 , 0.0); + gSprite_PutSpriteEx(SP_SEL_COURSE+game->course_id, 340, 120, 1.7, 1.8 , 0.0); /* 点滅 */ if (blink_count < 35) { @@ -310,8 +326,12 @@ void sche_game_main_init(Game *game) { - if (!game->jiki) + printf("sche_game_main_init()\n"); + if (!game->jiki){ + printf("sche_game_main_init()__________\n"); play_init(game); + } + RUNNIG=0; set_schedule_assumption(sche_game_main_ready); @@ -352,7 +372,8 @@ gFont_SetStringInt(game->rap, 50, 100); /* スピードメーター */ - gSprite_DefSprite(23, 1, 1,(int)(106.0*(game->jiki->speed/game->jiki->speed_max)), 34); + // gSprite_DefSprite(23, 1, 1,(int)(106.0*(game->jiki->speed/game->jiki->speed_max)), 34); + gSprite_DefSprite(23, "name", (float)(106.0*(game->jiki->speed/game->jiki->speed_max)), 34.0, 100); gSprite_PutSprite(23, 400, 400); /* km/h */ gSprite_PutSprite(26, 470, 350); @@ -448,7 +469,7 @@ car_update(game, game->jiki); field_update(game->jiki); carNode_draw(); - camera_update(game,game->jiki->body); + camera_update(game,game->jiki->body->transfer); if (pad.st == 1) { set_schedule_assumption(sche_game_main_finish); @@ -492,6 +513,9 @@ void schedule(Game *game) { + printf("----------------------\n"); + printf("schedule()\n"); + sche_func(game); if (linda_update(change_state, game) == true){