comparison TaskDandy.cc @ 49:f4140672ef9f

fix.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 21 Jan 2011 22:18:28 +0900
parents e01948ce859a
children 2e123c4bf5ca
comparison
equal deleted inserted replaced
45:e01948ce859a 49:f4140672ef9f
31 #include "Character_state.h" 31 #include "Character_state.h"
32 #include "property.h" 32 #include "property.h"
33 #include "state_task.h" 33 #include "state_task.h"
34 34
35 static int use_keybord = 0; 35 static int use_keybord = 0;
36 static int cdp[20] = { 16, 16, 16, 17, 18, 0 }; 36 //static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
37 static int d, i; 37 static int i;
38 38
39 static int rswait = 0; 39 static int rswait = 0;
40 static int cf = 0; 40 static int cf = 0;
41 static int cc = 0; 41 static int cc = 0;
42 42
353 state_update(); 353 state_update();
354 collision_detect(); 354 collision_detect();
355 //charpatern(); 355 //charpatern();
356 //bosguage(); 356 //bosguage();
357 357
358 count++; 358 //count++;
359 //PutSprite(count, 0, 960 - 96, 10); 359 //PutSprite(count, 0, 960 - 96, 10);
360 /*インフレゲージ */ 360 /*インフレゲージ */
361 count++; 361 //count++;
362 //PutSprite(count, 0, 0, 48); 362 //PutSprite(count, 0, 0, 48);
363 363
364 obj_draw(); 364 obj_draw();
365 gamef = game_pause(gamef); 365 gamef = game_pause(gamef);
366
367 filpcount++;
368 count = 0;
366 369
367 KeyAssign(runmode, t_buff, joy, pad); 370 KeyAssign(runmode, t_buff, joy, pad);
368 371
369 return gamef; 372 return gamef;
370 } 373 }
376 PadfileWrite(first); 379 PadfileWrite(first);
377 PadfileClose(first); 380 PadfileClose(first);
378 } else if (runmode == 2) { 381 } else if (runmode == 2) {
379 PadfileClose(first); 382 PadfileClose(first);
380 } 383 }
384 SDL_Event usr_event;
385 usr_event.type = SDL_QUIT;
386
387 SDL_PushEvent(&usr_event);
381 388
382 //_______________________________________________ 389 //_______________________________________________
383 // SDL_mixerの後始末 390 // SDL_mixerの後始末
384 Mix_CloseAudio(); 391 Mix_CloseAudio();
385 Mix_HaltMusic(); 392 Mix_HaltMusic();
444 451
445 PutSprite(count, 700, 480, 53); // put `push start' string on screen. 452 PutSprite(count, 700, 480, 53); // put `push start' string on screen.
446 count++; 453 count++;
447 PutSprite(count, 224, 776, 119); // put `super dandy' 454 PutSprite(count, 224, 776, 119); // put `super dandy'
448 count++; 455 count++;
449 // PutSprite(count, 200, 64, 190); 456 //PutSprite(count, 200, 64, 190);
450 // PutSpriteEx(count, 8192, 8192, 0); 457 //PutSpriteEx(count, 8192, 8192, 0);
451 PutSpriteEx(190, 800, 264, 2, 2, 5); 458 PutSpriteEx(190, 800, 264, 2, 2, 5);
452 count++; 459 count++;
453 PutSprite(count, 396, 432, 191); 460 PutSprite(count, 396, 432, 191);
454 //PutSpriteEx(count, 8192, 8192, 0); 461 //PutSpriteEx(count, 8192, 8192, 0);
455 count++; 462 count++;
456 PutSprite(count, 640, 640, 192); 463 PutSprite(count, 640, 640, 192);
457 //PutSpriteEx(count, 8192, 8192, 0); 464 //PutSpriteEx(count, 8192, 8192, 0);
458 465
459 if (pad[0].st > 1) { 466 if ((pad[0].st > 1)||(runmode == 2)) {
460 jiki.bf = TRUE; 467 jiki.bf = TRUE;
461 468
462 //CdPlay(1,&cdp[0],0); 469 //CdPlay(1,&cdp[0],0);
463 SoundStop(); 470 SoundStop();
464 SoundPlay(0); 471 SoundPlay(0);
473 } 480 }
474 481
475 static int 482 static int
476 game_pause(int gamef) 483 game_pause(int gamef)
477 { 484 {
478 gamef = 3;
479 if (jiki.zanki != 0 && jiki.bf != FALSE) { 485 if (jiki.zanki != 0 && jiki.bf != FALSE) {
480 if (pad[0].se == 1) { 486 if (pad[0].se == 1) {
481 //Mix_Pause(BGM); 487 //Mix_Pause(BGM);
482 PauseSdlMixer(BGM); 488 PauseSdlMixer(BGM);
483 while(1){ 489 while(1){
529 cf = 3; 535 cf = 3;
530 break; 536 break;
531 } 537 }
532 SDL_Delay(100); 538 SDL_Delay(100);
533 PutSprite(1, 640, 640, 29 - cc / 60); 539 PutSprite(1, 640, 640, 29 - cc / 60);
534 // PutSpriteEx(1, 409 * ((cc % 60) + 1), 409 * ((cc % 60) + 1), 0); 540 //PutSpriteEx(1, 409 * ((cc % 60) + 1), 409 * ((cc % 60) + 1), 0);
535 541
536 Pad(joy); 542 Pad(joy);
537 flip(); // this is not correct 543 flip(); // this is not correct
538 } 544 }
539 } 545 }