maelstrom (1.4.3-L3.0.6-8.1) scores.cpp

Summary

 scores.cpp |   30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

    
download this patch

Patch contents

--- maelstrom-1.4.3-L3.0.6.orig/scores.cpp
+++ maelstrom-1.4.3-L3.0.6/scores.cpp
@@ -15,7 +15,7 @@
 #include "load.h"
 #include "dialog.h"
 
-#define MAELSTROM_SCORES	"Maelstrom-Scores"
+#define MAELSTROM_SCORES	"/var/games/Maelstrom-Scores"
 #define NUM_SCORES		10		// Do not change this!
 
 /* Everyone can write to scores file if defined to 0 */
@@ -38,13 +38,13 @@
 		if ( NetLoadScores() == 0 )
 			return;
 		else {
-			mesg("Using local score file\n\n");
+			mesg((char *)"Using local score file\n\n");
 			gNetScores = 0;
 		}
 	}
 	memset(&hScores, 0, sizeof(hScores));
 
-	scores_src = SDL_RWFromFile(path.Path(MAELSTROM_SCORES), "rb");
+	scores_src = SDL_RWFromFile(MAELSTROM_SCORES, "rb");
 	if ( scores_src != NULL ) {
 		for ( i=0; i<NUM_SCORES; ++i ) {
 			SDL_RWread(scores_src, hScores[i].name,
@@ -72,7 +72,7 @@
 #ifdef unix
 	omask=umask(SCORES_PERMMASK);
 #endif
-	scores_src = SDL_RWFromFile(path.Path(MAELSTROM_SCORES), "wb");
+	scores_src = SDL_RWFromFile(MAELSTROM_SCORES, "wb");
 	if ( scores_src != NULL ) {
 		for ( i=0; i<NUM_SCORES; ++i ) {
 			SDL_RWwrite(scores_src, hScores[i].name,
@@ -146,11 +146,11 @@
 	dialog->Add_Image(splash, 4, 4);
 	do_clear = 0;
 	clear = new Mac_Button(99, 74, BUTTON_WIDTH, BUTTON_HEIGHT,
-				"Clear", chicago, fontserv, Clear_callback);
+				(char*)"Clear", chicago, fontserv, Clear_callback);
 	dialog->Add_Dialog(clear);
 	cancel = new Mac_DefaultButton(99+BUTTON_WIDTH+14, 74, 
 				BUTTON_WIDTH, BUTTON_HEIGHT,
-				"Cancel", chicago, fontserv, Cancel_callback);
+				(char*)"Cancel", chicago, fontserv, Cancel_callback);
 	dialog->Add_Dialog(cancel);
 
 	/* Run the dialog box */
@@ -185,17 +185,17 @@
 
 int GetStartLevel(void)
 {
-	static char    *Ltext1 = 
+	static const char    *Ltext1 = 
 			"Enter the level to start from (1-40).  This";
-	static char    *Ltext2 = 
+	static const char    *Ltext2 = 
 			"disqualifies you from a high score...";
-	static char    *Ltext3 = "Level:";
-	static char    *Ltext4 = "Lives:";
+	static const char    *Ltext3 = "Level:";
+	static const char    *Ltext4 = "Lives:";
 	MFont *chicago;
 	Maclike_Dialog *dialog;
 	SDL_Surface *splash;
 	SDL_Surface *text1, *text2, *text3, *text4;
-	static char *turbotext = "Turbofunk On";
+	static char *turbotext = (char*)"Turbofunk On";
 	int x, y, X, Y;
 	Mac_Button *doit;
 	Mac_Button *cancel;
@@ -204,8 +204,8 @@
 	int startlevel=10, startlives=5, turbofunk=0;
 
 	/* Set up all the components of the dialog box */
-	if ( (chicago = fontserv->NewFont("Chicago", 12)) == NULL ) {
-		error("Can't use Chicago font!\n");
+	if ( (chicago = fontserv->NewFont((const char*)"Chicago", 12)) == NULL ) {
+		error((const char*)"Can't use Chicago font!\n");
 		return(0);
 	}
 	if ( (splash = GetCIcon(screen, 103)) == NULL ) {
@@ -228,10 +228,10 @@
 	dialog->Add_Image(text2, x, y);
 	do_level = 0;
 	cancel = new Mac_Button(166, 96, 73, BUTTON_HEIGHT,
-				"Cancel", chicago, fontserv, Cancel2_callback);
+				(char *)"Cancel", chicago, fontserv, Cancel2_callback);
 	dialog->Add_Dialog(cancel);
 	doit = new Mac_DefaultButton(166+73+14, 96, BUTTON_WIDTH, BUTTON_HEIGHT,
-				"Do it!", chicago, fontserv, Level_callback);
+				(char *)"Do it!", chicago, fontserv, Level_callback);
 	dialog->Add_Dialog(doit);
 	numeric_entry = new Mac_NumericEntry(X, Y, chicago, fontserv);
 	numeric_entry->Add_Entry(78, 60, 3, 1, &startlevel);