From 6044a12cfaa03cd970b6c46c6f9c2661df5f6562 Mon Sep 17 00:00:00 2001 From: Jesse Smith Date: Sun, 30 May 2010 21:01:05 -0400 Subject: [PATCH] v1.7.2 Cleaned up some compile errors from gcc 4.4.1 on Ubuntu. Added -g command line option. -g and a number, such as -g2 will start the game on difficulty level 2. Normally the game starts at zero. [This has been modified as part of the 2022 Git conversion to squash the Id and Log CVS tags] --- ChangeLog | 8 ++++++++ NEWS | 7 +++++++ TODO | 1 + configure.in | 2 +- src/swinit.c | 10 +++++++++- src/swmain.h | 3 ++- src/swsound.c | 3 ++- src/vid_vga.c | 2 ++ 8 files changed, 32 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6890f3c..489eeb6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +v1.7.2 + +Cleaned up some compile errors from gcc 4.4.1 on Ubuntu. +Added -g command line option. -g and a number, such as -g2 +will start the game on difficulty level 2. Normally the +game starts at zero. + + v1.7.1 Fix some compilation errors due to an error in swinit.c diff --git a/NEWS b/NEWS index 6890f3c..d6f3247 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +v1.7.2 + +Cleaned up some compile errors from gcc 4.4.1 on Ubuntu. +Added -g command line option. -g and a number, such as -g2 +will start the game on difficulty level 2. Normally the +game starts at zero. + v1.7.1 Fix some compilation errors due to an error in swinit.c diff --git a/TODO b/TODO index 4c5630c..ca53355 100644 --- a/TODO +++ b/TODO @@ -33,4 +33,5 @@ Custom levels DOS Port? probably wouldnt be too hard infact Hi score table? Reconfigurable keys +Safe base diff --git a/configure.in b/configure.in index 8437ecf..6d23116 100644 --- a/configure.in +++ b/configure.in @@ -1,7 +1,7 @@ AC_INIT(src/swmain.c) AC_CONFIG_AUX_DIR(autotools) -VERSION=1.7.1 +VERSION=1.7.2 AC_SUBST(VERSION) AC_CANONICAL_SYSTEM diff --git a/src/swinit.c b/src/swinit.c index 24d50ee..21b84d3 100644 --- a/src/swinit.c +++ b/src/swinit.c @@ -53,6 +53,7 @@ static int savescore; /* save players score on restart */ static BOOL ghost; /* ghost display flag */ +static starting_level = 0; static char helptxt[] = "\n" @@ -67,6 +68,7 @@ static char helptxt[] = " -c : single player against computer\n" " -x : enable missiles\n" " -q : begin game with sound off\n" +" -g#: start at level #\n" "\n" "Video:\n" " -f : fullscreen\n" @@ -1034,7 +1036,8 @@ void swrestart() ++gamenum; savescore = ob->ob_score; } else { - gamenum = 0; + // gamenum = 0; + gamenum = starting_level; savescore = 0; // sh 28/10/2001: go back to the title screen @@ -1108,6 +1111,11 @@ void swinit(int argc, char *argv[]) c = 1; else if (!strcasecmp(argv[i], "-f")) vid_fullscreen = 1; + else if (!strncasecmp(argv[i], "-g", 2)) + { + sscanf(& (argv[i][2]), "%d", &starting_level); + gamenum = starting_level; + } else if (!strcasecmp(argv[i], "-2")) vid_double_size = 1; else if (!strcasecmp(argv[i], "-q")) diff --git a/src/swmain.h b/src/swmain.h index 46f4113..8ea48ea 100644 --- a/src/swmain.h +++ b/src/swmain.h @@ -46,7 +46,8 @@ extern int gmaxspeed, gminspeed; extern int targrnge; extern BOOL hires; extern BOOL disppos; -extern BOOL titleflg; +// extern BOOL titleflg; +static BOOL titleflg; extern int dispdbg; extern BOOL soundflg; extern BOOL repflag; diff --git a/src/swsound.c b/src/swsound.c index 9a16ad1..0a5e306 100644 --- a/src/swsound.c +++ b/src/swsound.c @@ -79,7 +79,8 @@ static char *expltune[7] = { }; #endif -static BOOL titleflg; /* Playing title tune */ +// static BOOL titleflg; /* Playing title tune */ +extern BOOL titleflg; static int titlplace; /* Place in title tune; */ static int titlline; /* Line in title tune */ static unsigned titltone; /* Current title tone */ diff --git a/src/vid_vga.c b/src/vid_vga.c index f8ec0cb..2cfd934 100644 --- a/src/vid_vga.c +++ b/src/vid_vga.c @@ -22,6 +22,8 @@ // //--------------------------------------------------------------------------- +#include + #include "video.h" #include "sw.h"