comparison Dandy.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
29 #include "matrix_calc.h" 29 #include "matrix_calc.h"
30 #include "Character.h" 30 #include "Character.h"
31 #include "Character_state.h" 31 #include "Character_state.h"
32 32
33 static int use_keybord = 0; 33 static int use_keybord = 0;
34 static int cdp[20] = { 16, 16, 16, 17, 18, 0 }; 34 //static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
35 static int d, i; 35 static int i;
36 36
37 static int rswait = 0; 37 static int rswait = 0;
38 static int cf = 0; 38 static int cf = 0;
39 static int cc = 0; 39 static int cc = 0;
40 40
352 } 352 }
353 353
354 Putbom(); 354 Putbom();
355 tokuten(); 355 tokuten();
356 356
357 count++; 357 //count++;
358 //PutSprite(count, 0, 960 - 96, 10); 358 //PutSprite(count, 0, 960 - 96, 10);
359 /*インフレゲージ */ 359 /*インフレゲージ */
360 count++; 360 //count++;
361 //PutSprite(count, 0, 0, 48); 361 //PutSprite(count, 0, 0, 48);
362 362
363 obj_draw(); 363 obj_draw();
364 gamef = game_pause(gamef); 364 gamef = game_pause(gamef);
365 365
378 PadfileWrite(first); 378 PadfileWrite(first);
379 PadfileClose(first); 379 PadfileClose(first);
380 } else if (runmode == 2) { 380 } else if (runmode == 2) {
381 PadfileClose(first); 381 PadfileClose(first);
382 } 382 }
383 SDL_Event usr_event;
384 usr_event.type = SDL_QUIT;
385
386 SDL_PushEvent(&usr_event);
383 387
384 //_______________________________________________ 388 //_______________________________________________
385 // SDL_mixerの後始末 389 // SDL_mixerの後始末
386 Mix_CloseAudio(); 390 Mix_CloseAudio();
387 Mix_HaltMusic(); 391 Mix_HaltMusic();
456 //PutSpriteEx(count, 8192, 8192, 0); 460 //PutSpriteEx(count, 8192, 8192, 0);
457 count++; 461 count++;
458 PutSprite(count, 640, 640, 192); 462 PutSprite(count, 640, 640, 192);
459 //PutSpriteEx(count, 8192, 8192, 0); 463 //PutSpriteEx(count, 8192, 8192, 0);
460 464
461 if (pad[0].st > 1) { 465 if ((pad[0].st > 1)||(runmode == 2)) {
462 jiki.bf = TRUE; 466 jiki.bf = TRUE;
463 467
464 //CdPlay(1,&cdp[0],0); 468 //CdPlay(1,&cdp[0],0);
465 SoundStop(); 469 SoundStop();
466 SoundPlay(0); 470 SoundPlay(0);
475 } 479 }
476 480
477 static int 481 static int
478 game_pause(int gamef) 482 game_pause(int gamef)
479 { 483 {
480 gamef = 3;
481 if (jiki.zanki != 0 && jiki.bf != FALSE) { 484 if (jiki.zanki != 0 && jiki.bf != FALSE) {
482 if (pad[0].se == 1) { 485 if (pad[0].se == 1) {
483 //Mix_Pause(BGM); 486 //Mix_Pause(BGM);
484 PauseSdlMixer(BGM); 487 PauseSdlMixer(BGM);
485 while(1){ 488 while(1){