Commit 3a468f30 authored by Fabian Greffrath's avatar Fabian Greffrath

Imported Upstream version 1.1.2

parent c93ad6f7
......@@ -46,13 +46,17 @@ Michael Karcher (lots of bug and portability fixes for the Debian package)
Fabian Greffrath (some minor improvements)
---------------------------
Notes for the 1.1.1 Release
---------------------------
----------------------------
Notes for the 1.1.x Releases
----------------------------
Version 1.1.1 is merely a bugfix release that contains all the patches that
have accumulated in Fedora and Debian during the previous year.
Version 1.1.2 is another bugfix release that contains the Debian patches from
the previous two and a half years; among them enabling the playback of demo
files. Furthermore the build system has undergone a complete overhaul.
Enabling the use of UNICODE (instead of keyboard scancodes) for the cheat codes
and names in the highscore table is considered the release goal for the next
point release. Getting network play working is considered the release goal for
......@@ -69,24 +73,21 @@ General Hints
To compile the source code under Linux, change to the rott/ directory and type:
make clean
make
make clean
make
The source code is setup to use shareware binaries. If you want to use the
registered version of ROTT, edit rott/develop.h and make the following changes:
The build system is setup to use shareware binaries. If you want to use the
registered version of ROTT, compile with:
change
#define SHAREWARE 1
#define SUPERROTT 0
to
#define SHAREWARE 0
#define SUPERROTT 1
make SHAREWARE=0
After this, save your changes and compile as normal.
You may additionally append SUPERROTT=1 or SITELICENSE=1, if you want to use
the CD version or the Site License CD version, respectively. However, make
sure to only set one of them to 1 at once. You may want to edit rott/Makefile
to make your changes persistent.
If you experience difficulty with sound, you may need to download a CVS version
of SDL_mixer. Instructions for doing this can be found at the SDL_mixer site,
linked below.
It is generally recommended to build against the most recent version of
the Simple Direct Media Layer and SDL_mixer.
------------
......
......@@ -73,13 +73,13 @@ Turn off sound reverb.
Exit program when demo is terminated.
.TP
.BR warp\ \fIlevel\fP
Warp to specific ROTT level (next paramater is level to start on).
Warp to specific ROTT level (next parameter is level to start on).
.TP
.BR timelimit\ \fItime\fP
Play ROTT in time limit mode (next paramater is time in seconds).
Play ROTT in time limit mode (next parameter is time in seconds).
.TP
.BR maxtimelimit\ \fItime\fP
Maximimum time to count down from (next paramater is time in seconds).
Maximimum time to count down from (next parameter is time in seconds).
.TP
.BR dopefish
?
......
#-----------------------------------------------------------------------------#
# ROTT makefile.
#-----------------------------------------------------------------------------#
#-----------------------------------------------------------------------------#
# If this makefile fails to detect Cygwin correctly, or you want to force
# the build process's behaviour, set it to "true" or "false" (w/o quotes).
#-----------------------------------------------------------------------------#
#cygwin := true
#cygwin := false
cygwin := autodetect
# you only need to set these for Cygwin at the moment.
SDL_INC_DIR = /cygdrive/c/SDL/include
SDL_LIB_DIR = /cygdrive/c/SDL/lib
# Don't touch anything below this line unless you know what you're doing.
ifeq ($(strip $(cygwin)),autodetect)
ifneq ($(strip $(shell gcc -v 2>&1 |grep "cygwin")),)
cygwin := true
else
cygwin := false
endif
endif
ifeq ($(strip $(cygwin)),true)
ifeq ($(strip $(SDL_INC_DIR)),please_set_me_cygwin_users)
$(error Cygwin users need to set the SDL_INC_DIR envr var.)
else
SDL_CFLAGS := -I$(SDL_INC_DIR)
endif
ifeq ($(strip $(SDL_LIB_DIR)),please_set_me_cygwin_users)
$(error Cygwin users need to set the SDL_LIB_DIR envr var.)
else
SDL_LDFLAGS := -L$(SDL_LIB_DIR) -lSDL
endif
else
SDL_CFLAGS := $(shell sdl-config --cflags)
SDL_LDFLAGS := $(shell sdl-config --libs)
EXTRACFLAGS += -DUSE_EXECINFO=1
endif
CC = gcc
CFLAGS += -g -W -Wall -Wno-unused
ALL_CFLAGS = $(SDL_CFLAGS) -DUSE_SDL=1 -DPLATFORM_UNIX=1 $(CFLAGS) $(EXTRACFLAGS)
LDFLAGS += -Wl,-E
LDLIBS = $(LDFLAGS) $(SDL_LDFLAGS) -lSDL -lSDL_mixer $(EXTRALDFLAGS)
%.o: %.c
$(CC) $(ALL_CFLAGS) -c $< -o $@
all: rott
audiolib/audiolib.a:
$(MAKE) -C audiolib CC="$(CC)" CFLAGS="$(ALL_CFLAGS)" LDLIBS="$(LDLIBS)"
rott: \
cin_actr.o \
cin_efct.o \
cin_evnt.o \
cin_glob.o \
cin_main.o \
cin_util.o \
dosutil.o \
engine.o \
isr.o \
modexlib.o \
rt_actor.o \
rt_battl.o \
rt_build.o \
rt_cfg.o \
rt_crc.o \
rt_com.o \
rt_debug.o \
rt_dmand.o \
rt_door.o \
rt_draw.o \
rt_floor.o \
rt_game.o \
rt_in.o \
rt_main.o \
rt_map.o \
rt_menu.o \
rt_msg.o \
rt_net.o \
rt_playr.o \
rt_rand.o \
rt_scale.o \
rt_sound.o \
rt_spbal.o \
rt_sqrt.o \
rt_stat.o \
rt_state.o \
rt_str.o \
rt_swift.o \
rt_ted.o \
rt_util.o \
rt_view.o \
rt_vid.o \
rt_err.o \
scriplib.o \
w_wad.o \
watcom.o \
z_zone.o \
byteordr.o \
dukemusc.o \
audiolib/audiolib.a \
winrott.o
$(CC) $^ $(LDLIBS) -o $@
clean:
$(MAKE) -C audiolib clean
rm -rf rott rott.exe *.o
distclean: clean
$(MAKE) -C audiolib distclean
rm -rf *~
# Determine which version to build
# Make sure only one of the following is set to 1 at once
# Triple 0 will build the commercial/registered version
SHAREWARE ?= 1
SUPERROTT ?= 0
SITELICENSE ?= 0
CPPFLAGS += -DSHAREWARE=$(SHAREWARE)
CPPFLAGS += -DSUPERROTT=$(SUPERROTT)
CPPFLAGS += -DSITELICENSE=$(SITELICENSE)
ROTT ?= rott
# Regular build flags and rules
CC ?= gcc
CFLAGS ?= -g -O2
CFLAGS += -Wall -Wno-unused
CFLAGS += $(shell sdl-config --cflags)
CFLAGS += $(EXTRACFLAGS)
CPPFLAGS += -DUSE_SDL=1
CPPFLAGS += -DPLATFORM_UNIX=1
CPPFLAGS += $(EXTRACPPFLAGS)
LDFLAGS += $(EXTRALDFLAGS)
LDLIBS += $(shell sdl-config --libs)
LDLIBS += -lSDL_mixer
LDLIBS += $(EXTRALDLIBS)
OBJS :=
OBJS += cin_actr.o
OBJS += cin_efct.o
OBJS += cin_evnt.o
OBJS += cin_glob.o
OBJS += cin_main.o
OBJS += cin_util.o
OBJS += dosutil.o
OBJS += engine.o
OBJS += isr.o
OBJS += modexlib.o
OBJS += rt_actor.o
OBJS += rt_battl.o
OBJS += rt_build.o
OBJS += rt_cfg.o
OBJS += rt_crc.o
OBJS += rt_com.o
OBJS += rt_debug.o
OBJS += rt_dmand.o
OBJS += rt_door.o
OBJS += rt_draw.o
OBJS += rt_floor.o
OBJS += rt_game.o
OBJS += rt_in.o
OBJS += rt_main.o
OBJS += rt_map.o
OBJS += rt_menu.o
OBJS += rt_msg.o
OBJS += rt_net.o
OBJS += rt_playr.o
OBJS += rt_rand.o
OBJS += rt_scale.o
OBJS += rt_sound.o
OBJS += rt_spbal.o
OBJS += rt_sqrt.o
OBJS += rt_stat.o
OBJS += rt_state.o
OBJS += rt_str.o
OBJS += rt_swift.o
OBJS += rt_ted.o
OBJS += rt_util.o
OBJS += rt_view.o
OBJS += rt_vid.o
OBJS += rt_err.o
OBJS += scriplib.o
OBJS += w_wad.o
OBJS += watcom.o
OBJS += z_zone.o
OBJS += byteordr.o
OBJS += dukemusc.o
OBJS += winrott.o
AUDIOLIB := audiolib/audiolib.a
all: $(ROTT)
$(ROTT): $(OBJS) $(AUDIOLIB)
$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LDLIBS) -o $@
$(OBJS): develop.h
$(AUDIOLIB):
$(MAKE) -C audiolib
tidy:
$(RM) $(OBJS) $(ROTT) $(ROTT).exe
clean: tidy
$(MAKE) -C audiolib $@
CC=gcc
AR=ar
RANLIB=ranlib
CFLAGS=-g -O2
LDLIBS=
AUDIOLIB ?= audiolib.a
AR ?= ar
CC ?= gcc
RANLIB ?= ranlib
ARFLAGS ?= rcT
CFLAGS ?= -g -O2
CFLAGS += -Wall
CFLAGS += $(shell sdl-config --cflags)
LDLIBS += $(shell sdl-config --libs)
OBJ=fx_man.o dsl.o ll_man.o multivoc.o mv_mix.o mvreverb.o nodpmi.o \
pitch.o user.o usrhooks.o
OBJS :=
OBJS += fx_man.o
OBJS += dsl.o
OBJS += ll_man.o
OBJS += multivoc.o
OBJS += mv_mix.o
OBJS += mvreverb.o
OBJS += nodpmi.o
OBJS += pitch.o
OBJS += user.o
OBJS += usrhooks.o
audiolib.a: $(OBJ)
rm -rf $@
$(AR) rc $@ $^
$(AUDIOLIB): $(OBJS)
$(RM) $@
$(AR) $(ARFLAGS) $@ $^
$(RANLIB) $@
clean:
rm -rf audiolib.a *.o
distclean: clean
rm -rf *~
$(RM) $(AUDIOLIB) $(OBJS)
......@@ -41,9 +41,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define BNACRASHPREVENT 1 //bna added
// Make sure only one of the following are on at one time
#define SHAREWARE 1
#define SUPERROTT 0
#define SITELICENSE 0
//#define SHAREWARE 1
//#define SUPERROTT 0
//#define SITELICENSE 0
// cute little dopefish thing, only works with special patch?
#define DOPEFISH 0
......
......@@ -197,7 +197,7 @@ void DisplayTextSplash(byte *text, int l)
printf ("\033[m");
}
#if (USE_EXECINFO == 1) && !defined(__MINGW32__)
#if !defined(__CYGWIN__) && !defined(__MINGW32__)
#include <execinfo.h>
void print_stack (int level)
......
......@@ -543,7 +543,7 @@ void PositionMenuBuf( int angle, int distance, boolean drawbackground )
DrawPlanePosts();
oldfont=CurrentFont;
CurrentFont = (font_t *)W_CacheLumpName ("newfnt1", PU_CACHE, Cvt_font_t, 1);
US_MeasureStr (&width, &height, titlestring);
US_MeasureStr (&width, &height, "%s", titlestring);
US_ClippedPrint ((320-width)>>1, MENUTITLEY-titleyoffset, titlestring);
CurrentFont=oldfont;
FlipPage();
......
......@@ -1225,7 +1225,7 @@ void WriteBattleConfig
SafeWriteString(file, "\n;\n"
"; These are the time in seconds of the various powerups.\n"
"; You could modify these to give you infinite Mercury mode,\n"
"; stronger vests, or to make them persistant.\n;\n" );
"; stronger vests, or to make them persistent.\n;\n" );
WriteParameter( file, "GodModeTime ", BattleSpecialsTimes.GodModeTime );
WriteParameter( file, "DogModeTime ", BattleSpecialsTimes.DogModeTime );
......
......@@ -4464,7 +4464,7 @@ fadeworld:
if (i>3)
I_Delay(50);
US_MeasureStr (&width, &height, &(EndCinematicText[i][0]));
US_MeasureStr (&width, &height, "%s", &(EndCinematicText[i][0]));
if (LastScan !=0)
break;
......@@ -4555,11 +4555,11 @@ finalfade:
if (LastScan == 0)
{
US_MeasureStr (&width, &height, NextGameString1);
US_MeasureStr (&width, &height, "%s", NextGameString1);
x=(320-width)>>1;
y=(200-height)>>1;
US_ClippedPrint (x,y-6, NextGameString1);
US_MeasureStr (&width, &height, NextGameString2);
US_MeasureStr (&width, &height, "%s", NextGameString2);
x=(320-width)>>1;
y=(200-height)>>1;
US_ClippedPrint (x,y+6, NextGameString2);
......@@ -4912,7 +4912,7 @@ void ScrollString ( int cy, char * string, byte * bkgnd, int scrolltime, int pau
int time1,time2;
LastScan=0;
US_MeasureStr (&width, &height, string);
US_MeasureStr (&width, &height, "%s", string);
x=(320-width)>>1;
y=cy-(height>>1);
......@@ -5578,7 +5578,7 @@ void DoInBetweenCinematic (int yoffset, int lump, int delay, char * string )
DrawNormalSprite(0,yoffset,lump);
CurrentFont=smallfont;
US_MeasureStr (&width, &height, string);
US_MeasureStr (&width, &height, "%s", string);
x=(320-width)>>1;
y=190-height;
US_ClippedPrint (x, y, string);
......@@ -5674,7 +5674,7 @@ void DrawPreviousCredits ( int num, CreditType * Credits )
CurrentFont=smallfont;
else
CurrentFont=tinyfont;
US_MeasureStr (&width, &height, &(Credits[i].text[0]));
US_MeasureStr (&width, &height, "%s", &(Credits[i].text[0]));
x=(320-width)>>1;
y=Credits[i].endy;
US_ClippedPrint (x, y+4, &Credits[i].text[0]);
......@@ -5706,7 +5706,7 @@ void WarpCreditString ( int time, byte * back, int num, CreditType * Credits)
CurrentFont=smallfont;
else
CurrentFont=tinyfont;
US_MeasureStr (&width, &height, &(Credits[num].text[0]));
US_MeasureStr (&width, &height, "%s", &(Credits[num].text[0]));
x=(320-width)>>1;
y=Credits[num].endy;
......
......@@ -1033,12 +1033,12 @@ void DrawPlayers
// Shorten name to fit into point count
length = strlen( codename );
US_MeasureStr( &width, &height, codename );
US_MeasureStr( &width, &height, "%s", codename );
while( width > KILLS_WIDTH )
{
codename[ length ] = 0;
length--;
US_MeasureStr( &width, &height, codename );
US_MeasureStr( &width, &height, "%s", codename );
}
// Draw name
......
......@@ -616,11 +616,11 @@ void CheckCommandLineParameters( void )
printf (" NOECHO - Turn off sound reverb\n");
printf (" DEMOEXIT - Exit program when demo is terminated\n");
printf (" WARP - Warp to specific ROTT level\n");
printf (" next paramater is level to start on\n");
printf (" next parameter is level to start on\n");
printf (" TIMELIMIT - Play ROTT in time limit mode\n");
printf (" next paramater is time in seconds\n");
printf (" next parameter is time in seconds\n");
printf (" MAXTIMELIMIT - Maximimum time to count down from\n");
printf (" next paramater is time in seconds\n");
printf (" next parameter is time in seconds\n");
printf (" DOPEFISH - ?\n");
printf (" \n");
printf ("CONTROLS\n");
......@@ -876,13 +876,13 @@ void SetupWads( void )
if (access (tempstr, 0) != 0) { //try open again
//stil no useful filename
strcat (tempstr," not found, skipping RTL file ");
printf(tempstr);
printf("%s", tempstr);
goto NoRTL;
}
}
if((f = fopen( tempstr, "r" )) == NULL ){ //try opnong file
strcat (tempstr," not could not be opened, skipping RTL file ");
printf(tempstr);
printf("%s", tempstr);
goto NoRTL;
}else{
fread(buf,3,3,f);//is the 3 first letters RTL (RTC)
......@@ -891,7 +891,7 @@ void SetupWads( void )
GameLevels.avail++;
strcpy (buf,"Adding ");
strcat (buf,tempstr);
printf(buf);
printf("%s", buf);
}
fclose(f);
}
......@@ -912,13 +912,13 @@ NoRTL:;
if (access (tempstr, 0) != 0) { //try open again
//stil no useful filename
strcat (tempstr," not found, skipping RTC file ");
printf(tempstr);
printf("%s", tempstr);
goto NoRTL;
}
}
if((f = fopen( tempstr, "r" )) == NULL ){ //try opening file
strcat (tempstr," not could not be opened, skipping RTC file ");
printf(tempstr);
printf("%s", tempstr);
goto NoRTL;
}else{
fread(buf,3,3,f);//is the 3 first letters RTL (RTC)
......@@ -927,7 +927,7 @@ NoRTL:;
BattleLevels.avail++;
strcpy (buf,"Adding ");
strcat (buf,tempstr);
printf(buf);
printf("%s", buf);
}
fclose(f);
}
......@@ -1500,7 +1500,7 @@ void GameLoop (void)
// break;
}
CurrentFont=smallfont;
US_MeasureStr (&width, &height, str);
US_MeasureStr (&width, &height, "%s", str);
US_ClippedPrint ((320-width)>>1, 180, str);
VW_UpdateScreen();
MenuFadeIn();
......
......@@ -782,14 +782,14 @@ void DrawMapInfo ( void )
PrintX = 2;
PrintY = 2;
strcpy (&temp[0], &(LevelName[0]));
US_MeasureStr (&width, &height, &temp[0]);
US_MeasureStr (&width, &height, "%s", &temp[0]);
VWB_TBar (0, 0, 320, height+4);
US_BufPrint (&temp[0]);
strcpy (&temp[0], "TAB=EXIT");
US_MeasureStr (&width, &height, &temp[0]);
US_MeasureStr (&width, &height, "%s", &temp[0]);
PrintX = 316-width;
PrintY = 2;
......@@ -797,7 +797,7 @@ void DrawMapInfo ( void )
US_BufPrint (&temp[0]);
strcpy (&temp[0], "< > CHANGE BACKGROUND COLOR");
US_MeasureStr (&width, &height, &temp[0]);
US_MeasureStr (&width, &height, "%s", &temp[0]);
PrintX = (320-width)>>1;
PrintY = 2;
......
......@@ -3077,10 +3077,10 @@ void SetupGameMaster ( void )
void GetDemoFilename (int demonumber, char * filename)
{
strcpy(filename,"demo0_0.dmo\0");
strcpy(filename,DATADIR "DEMO0_0.DMO\0");
filename[4] = (char)('0' + (byte)demonumber);
filename[6] = (char)('0' + (byte)gamestate.violence);
filename[4 + strlen(DATADIR)] = (char)('0' + (byte)demonumber);
filename[6 + strlen(DATADIR)] = (char)('0' + (byte)gamestate.violence);
FixFilePath(filename);
}
//****************************************************************************
......@@ -3091,7 +3091,7 @@ void GetDemoFilename (int demonumber, char * filename)
boolean DemoExists (int demonumber)
{
char demo[20];
char demo[20 + sizeof(DATADIR)];
GetDemoFilename (demonumber, &demo[0]);
if (access (demo, F_OK) == 0)
......@@ -3120,7 +3120,7 @@ boolean DemoExists (int demonumber)
void SaveDemo (int demonumber)
{
char demo[20];
char demo[20 + sizeof(DATADIR)];
RecordDemoCmd ();
GetDemoFilename (demonumber, &demo[0]);
......@@ -3136,7 +3136,7 @@ void SaveDemo (int demonumber)
void LoadDemo (int demonumber)
{
char demo[20];
char demo[20 + sizeof(DATADIR)];
int size;
GetDemoFilename (demonumber, demo);
......
......@@ -2002,7 +2002,7 @@ int myprintf
char *ptr;
if (MONOPRESENT==false)
{
Debug(fmt);
Debug("%s", fmt);
return 0;
}
va_start( argptr, fmt );
......
......@@ -1073,7 +1073,7 @@ void DrawPreCache( void )
else
memcpy (&buf[0], "COMM-BAT", 8);
US_MeasureStr (&width, &height, &buf[0]);
US_MeasureStr (&width, &height, "%s", &buf[0]);
VWB_TBar (PrintX-2, PrintY-2, width+4, height+4);
US_BufPrint (&buf[0]);
......@@ -1092,7 +1092,7 @@ void DrawPreCache( void )
{
itoa( gamestate.mapon + 1, &buf[ 5 ], 10 );
}
US_MeasureStr (&width, &height, &buf[0]);
US_MeasureStr (&width, &height, "%s", &buf[0]);
PrintX = (300-width);
VWB_TBar (PrintX-2, PrintY-2, width+4, height+4);
US_BufPrint (&buf[0]);
......@@ -1107,7 +1107,7 @@ void DrawPreCache( void )
else
strcpy (temp, &(LevelName[0]));
US_MeasureStr (&width, &height, &temp[0]);
US_MeasureStr (&width, &height, "%s", &temp[0]);
PrintX = (320-width) >> 1;
PrintY = PRECACHESTRINGY;
......@@ -1270,7 +1270,7 @@ DisableScreenStretch();
CurrentFont = newfont1;//smallfont;
strcpy( buf, "Press Any Key" );
US_MeasureStr (&width, &height, &buf[ 0 ] );
US_MeasureStr (&width, &height, "%s", &buf[ 0 ] );
PrintX = (iGLOBAL_SCREENWIDTH-(width)) / 2;
PrintY = WHratio*iGLOBAL_SCREENHEIGHT;//162;
//VWB_TBar (PrintX-2, PrintY-2, width+4, height+4);
......
......@@ -100,7 +100,7 @@ void W_AddFile (char *_filename)
strcpy (buf,"Error, Could not find User file '");
strcat (buf,filename);
strcat (buf,"', ignoring file");
printf(buf);
printf("%s", buf);
}
//bna section end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment