Skip to content

Commit

Permalink
v1.7.2
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
slicer69 authored and fragglet committed Apr 12, 2022
1 parent 066b330 commit 6044a12
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 4 deletions.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions TODO
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ Custom levels
DOS Port? probably wouldnt be too hard infact
Hi score table?
Reconfigurable keys
Safe base

2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
@@ -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
Expand Down
10 changes: 9 additions & 1 deletion src/swinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"))
Expand Down
3 changes: 2 additions & 1 deletion src/swmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/swsound.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 2 additions & 0 deletions src/vid_vga.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
//
//---------------------------------------------------------------------------

#include <string.h>

#include "video.h"

#include "sw.h"
Expand Down

0 comments on commit 6044a12

Please sign in to comment.