added some mapster32 config vars; fixed mapster32 crash in linux; DEBUGANYWAY for Makefiles

git-svn-id: https://svn.eduke32.com/eduke32@1296 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2009-04-07 18:56:22 +00:00
parent e9821ccb35
commit ba394b0bcf
5 changed files with 39 additions and 8 deletions

View File

@ -24,6 +24,7 @@ RANCID_NETWORKING = 1
# Debugging/Build options
RELEASE?=1
DEBUGANYWAY?=0
NOSOUND?=0
USE_OPENAL ?= 1
OPTLEVEL?=2
@ -46,6 +47,10 @@ else
debug=-ggdb -O0 -DDEBUGGINGAIDS
endif
ifneq (0,$(DEBUGANYWAY))
debug+=-ggdb
endif
CC=gcc
CXX=g++
AS=nasm
@ -261,21 +266,27 @@ eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB)
$(LINK_STATUS)
if $(CC) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifneq (0,$(DEBUGANYWAY))
strip eduke32$(EXESUFFIX)
endif
endif
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB)
$(LINK_STATUS)
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ $(LIBS) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifneq (0,$(DEBUGANYWAY))
strip mapster32$(EXESUFFIX)
endif
endif
duke3d_w32$(EXESUFFIX): $(OBJ)/wrapper.$o
$(LINK_STATUS)
if $(CC) $(CFLAGS) $(OURCFLAGS) -o $@ $^ -Wl; then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE))
ifneq (0,$(DEBUGANYWAY))
strip duke3d_w32$(EXESUFFIX)
endif
endif
include Makefile.deps

View File

@ -35,6 +35,7 @@ RANCID_NETWORKING ?= 0
# OPTLEVEL - 0..3 = GCC optimization strategy
#
RELEASE?=1
DEBUGANYWAY?=0
EFENCE?=0
OPTLEVEL ?= 2
@ -68,6 +69,10 @@ else
debug=-ggdb -O0 -DDEBUGGINGAIDS -DNOSDLPARACHUTE
endif
ifneq (0,$(DEBUGANYWAY))
debug+=-ggdb
endif
CC=gcc
CXX=gcc
AS=nasm

View File

@ -66,6 +66,8 @@ extern double msens;
extern int32_t editorgridextent;
extern int32_t showheightindicators;
extern int32_t graphicsmode;
extern int32_t AmbienceToggle;
extern int32_t ParentalLock;
/*
* SETUP.DAT
@ -232,6 +234,10 @@ int32_t loadsetup(const char *fn)
if (readconfig(fp, "graphicsmode", val, VL) > 0)
graphicsmode = min(max(Batoi(val),0),2);
if (readconfig(fp, "ambiencetoggle", val, VL) > 0) AmbienceToggle = Batoi(val);
if (readconfig(fp, "parlock", val, VL) > 0) ParentalLock = Batoi(val);
#ifdef _WIN32
{
extern char map_dik_code(int32_t);
@ -376,10 +382,13 @@ int32_t writesetup(const char *fn)
"autosavesec = %d\n"
"\n"
"; Height indicators (0:none, 1:only 2-sided&different, 2:all)\n"
"showheightindicators = %d\n\n"
"showheightindicators = %d\n"
"\n"
"; 2D mode display type (0:classic, 1:textured, 2:textured/animated)\n"
"graphicsmode = %d\n\n"
"; Ambient sounds in 3D mode (0:off, 1:on)\n"
"ambiencetoggle = %d\n"
"parlock = %d\n\n"
#if 1
"; Key Settings\n"
"; Here's a map of all the keyboard scan codes: NOTE: values are listed in hex!\n"
@ -425,6 +434,8 @@ int32_t writesetup(const char *fn)
#endif
// "; Console key scancode, in hex\n"
"keyconsole = %X\n"
"; example: make 'Q' function as CapsLock and 'N' as AltGr:\n"
"; remap = 10-3A,31-B8\n"
"remap = ",
forcesetup, fullscreen, xdim2d, ydim2d, xdimgame, ydimgame, bppgame,
@ -441,7 +452,7 @@ int32_t writesetup(const char *fn)
#endif
option[3], msens, unrealedlook, pk_uedaccel, quickmapcycling,
revertCTRL,scrollamount,pk_turnaccel,pk_turndecel,autosave,
showheightindicators,graphicsmode,
showheightindicators,graphicsmode,AmbienceToggle,ParentalLock,
#if 1
keys[0], keys[1], keys[2], keys[3], keys[4], keys[5],
keys[6], keys[7], keys[8], keys[9], keys[10], keys[11],

View File

@ -1966,6 +1966,7 @@ static int32_t dist(spritetype *s1,spritetype *s2)
extern int32_t NumVoices;
extern int32_t g_numEnvSoundsPlaying;
int32_t AmbienceToggle = 1; //SoundToggle;
int32_t ParentalLock = 0;
#define T1 (s->filler)
// adapted from actors.c
@ -4225,14 +4226,14 @@ static void Keys3d(void)
if (keystatus[KEYSC_F3])
{
mlook = 1-mlook;
mlook = !mlook;
message("Mouselook: %s",mlook?"enabled":"disabled");
keystatus[KEYSC_F3] = 0;
}
if (keystatus[KEYSC_F4])
{
AmbienceToggle = 1-AmbienceToggle;
AmbienceToggle = !AmbienceToggle;
message("Ambience sounds: %s",AmbienceToggle?"enabled":"disabled");
if (!AmbienceToggle)
{
@ -4245,7 +4246,7 @@ static void Keys3d(void)
// PK
if (keystatus[KEYSC_F5])
{
unrealedlook = 1-unrealedlook;
unrealedlook = !unrealedlook;
message("UnrealEd mouse navigation: %s",unrealedlook?"enabled":"disabled");
keystatus[KEYSC_F5] = 0;
}
@ -9092,8 +9093,8 @@ int32_t parseconsounds(scriptfile *script)
}
if (g_sounds[sndnum].filename == NULL)
g_sounds[sndnum].filename = Bcalloc(BMAX_PATH,sizeof(uint8_t));
// do other callers ever mess with g_sounds[].filename?
g_sounds[sndnum].filename = Bcalloc(slen+1,sizeof(uint8_t));
// Hopefully noone does memcpy(..., g_sounds[].filename, BMAX_PATH)
if (!g_sounds[sndnum].filename)
{
Bfree(definedname);
@ -9105,6 +9106,7 @@ int32_t parseconsounds(scriptfile *script)
if (scriptfile_getnumber(script, &pe)) goto BAD;
if (scriptfile_getnumber(script, &pr)) goto BAD;
if (scriptfile_getnumber(script, &m)) goto BAD;
if (ParentalLock && (m&8)) goto BAD;
if (scriptfile_getnumber(script, &vo)) goto BAD;
if (0)
{
@ -9124,6 +9126,8 @@ BAD:
g_sounds[sndnum].vo = vo;
g_sndnum[g_numsounds] = g_definedsndnum[g_numsounds] = sndnum;
g_numsounds++;
if (g_numsounds == MAXSOUNDS)
goto END;
break;
}
case T_EOF:

View File

@ -78,7 +78,7 @@ int32_t xoldtimerhandler, lastmessagetime=-1;
char tempbuf[1024]; //1024
int32_t numsprite[MAXSPRITES];
int32_t multisprite[MAXSPRITES];
char lo[32];
char lo[64];
char levelname[255];
int16_t curwall=0,curwallnum=0;
int16_t cursearchsprite=0,cursearchspritenum=0,cursector_lotag=0,cursectornum=0;