changeset 47:f5e112bffe26

fix old version.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Tue, 18 Jan 2011 19:35:58 +0900
parents e01948ce859a
children 6cfd912a602d
files Dandy.cc TaskDandy.cc spe/Makefile
diffstat 3 files changed, 15 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/Dandy.cc	Sat Jan 15 19:13:03 2011 +0900
+++ b/Dandy.cc	Tue Jan 18 19:35:58 2011 +0900
@@ -31,8 +31,8 @@
 #include "Character_state.h"
 
 static int use_keybord = 0;
-static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
-static int d, i;
+//static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
+static int i;
 
 static int rswait = 0;
 static int cf = 0;
@@ -380,6 +380,9 @@
     } else if (runmode == 2) {
 	PadfileClose(first);
     }
+    SDL_Event user_event;
+    user_event.type = SDL_QUIT;
+    SDL_PushEvent(&user_event);
 
     //_______________________________________________
     // SDL_mixerの後始末
@@ -458,7 +461,7 @@
     PutSprite(count, 640, 640, 192);
     //PutSpriteEx(count, 8192, 8192, 0);
 
-    if (pad[0].st > 1) {
+    if ((pad[0].st > 1)||(runmode == 2)) {
 	jiki.bf = TRUE;
 	
 	//CdPlay(1,&cdp[0],0);                                          
@@ -477,7 +480,6 @@
 static int
 game_pause(int gamef)
 {
-    gamef = 3;
     if (jiki.zanki != 0 && jiki.bf != FALSE) {
 	if (pad[0].se == 1) {
 	    //Mix_Pause(BGM);
--- a/TaskDandy.cc	Sat Jan 15 19:13:03 2011 +0900
+++ b/TaskDandy.cc	Tue Jan 18 19:35:58 2011 +0900
@@ -33,8 +33,8 @@
 #include "state_task.h"
 
 static int use_keybord = 0;
-static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
-static int d, i;
+//static int cdp[20] = { 16, 16, 16, 17, 18, 0 };
+static int i;
 
 static int rswait = 0;
 static int cf = 0;
@@ -378,6 +378,9 @@
     } else if (runmode == 2) {
 	PadfileClose(first);
     }
+    SDL_Event user_event;
+    user_event.type = SDL_QUIT;
+    SDL_PushEvent(&user_event);
 
     //_______________________________________________
     // SDL_mixerの後始末
@@ -475,7 +478,6 @@
 static int
 game_pause(int gamef)
 {
-    gamef = 3;
     if (jiki.zanki != 0 && jiki.bf != FALSE) {
 	if (pad[0].se == 1) {
 	    //Mix_Pause(BGM);
--- a/spe/Makefile	Sat Jan 15 19:13:03 2011 +0900
+++ b/spe/Makefile	Tue Jan 18 19:35:58 2011 +0900
@@ -14,13 +14,13 @@
 .SUFFIXES: .cc .o
 
 .cc.o:
-        $(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
+	$(CC) $(CFLAGS) $(INCLUDE) -c $< -o $@
 
 all: $(TARGET)
 
 $(TARGET): $(OBJS)
-        $(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
+	$(CC) -o $@ $(OBJS) $(TASK_OBJS) $(LIBS)
 
 clean:
-        rm -f $(TARGET) $(OBJS)
-        rm -f *~ \#*
\ No newline at end of file
+	rm -f $(TARGET) $(OBJS)
+	rm -f *~ \#*
\ No newline at end of file