git » fp-git.git » commit 19db566

+ structured end loop

author ecalot
2004-07-21 23:38:28 UTC
committer ecalot
2004-07-21 23:38:28 UTC
parent c1554c0177e9bb3339d49bfb2a6aacf86c9489ce

+ structured end loop
+ changed exit/return to return sQuit

FP/src/ker/titles.c +7 -8

diff --git a/FP/src/ker/titles.c b/FP/src/ker/titles.c
index a0fa51f..44c3b2a 100644
--- a/FP/src/ker/titles.c
+++ b/FP/src/ker/titles.c
@@ -79,7 +79,7 @@ tMenuOption showTitles() {
 	main_title = resLoad(RES_IMG_MAIN_BACKGROUND);
 	if (! main_title) {
 		printf("The resource couldn't be loaded!\n");
-		return 1;
+		return sQuit;
 	}
 	outputClearScreen();
 	inputInitTimer();
@@ -116,7 +116,7 @@ tMenuOption showTitles() {
 	main_text = resLoad(RES_IMG_TEXT_BACKGROUND);
 	if (! main_text) {
 		printf("The resource couldn't be loaded!\n");
-		exit(1);
+		return sQuit;
 	}
 	*/
 	/* The presents */
@@ -125,12 +125,11 @@ tMenuOption showTitles() {
 	outputDrawBitmap(main_text->pFrames[1], 0, 0);
 	outputUpdateScreen();
 	*/
-	while (1) {
+	do {
 		result=sleep(1000);
-		if (result!=sNone) return result;
-	}
-	/*inputStopTimer();
-	return sStart;
-	*/
+	} while (result==sNone);
+	
+	inputStopTimer();
+	return result;
 }