git-svn-id: https://svn.eduke32.com/eduke32@1138 1a8010ca-5511-0410-912e-c29ae57300e0

This commit is contained in:
terminx 2008-11-16 00:48:02 +00:00
parent a8533b9468
commit 467a72226a
6 changed files with 38 additions and 9 deletions

View file

@ -242,6 +242,8 @@ void wm_setapptitle(char *name)
startwin_settitle(apptitle); startwin_settitle(apptitle);
} }
static int setgammaramp(WORD gt[3][256]);
// //
// SignalHandler() -- called when we've sprung a leak // SignalHandler() -- called when we've sprung a leak
// //
@ -251,6 +253,9 @@ static void SignalHandler(int signum)
{ {
case SIGSEGV: case SIGSEGV:
printOSD("Fatal Signal caught: SIGSEGV. Bailing out.\n"); printOSD("Fatal Signal caught: SIGSEGV. Bailing out.\n");
if (gammabrightness)
setgammaramp(sysgamma);
gammabrightness = 0;
app_crashhandler(); app_crashhandler();
uninitsystem(); uninitsystem();
if (stdout) fclose(stdout); if (stdout) fclose(stdout);
@ -3654,7 +3659,7 @@ static BOOL CreateAppWindow(int modenum)
#endif #endif
{ {
// set exclusive cooperative level // set exclusive cooperative level
result = IDirectDraw_SetCooperativeLevel(lpDD, hWindow, DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN); result = IDirectDraw_SetCooperativeLevel(lpDD, hWindow, DDSCL_ALLOWMODEX|DDSCL_EXCLUSIVE|DDSCL_FULLSCREEN);
if (result != DD_OK) if (result != DD_OK)
{ {
ShowDDrawErrorBox("Error setting cooperative level", result); ShowDDrawErrorBox("Error setting cooperative level", result);

View file

@ -542,8 +542,16 @@ inline int ssp(int i,unsigned int cliptype) //The set sprite function
} }
#undef deletesprite #undef deletesprite
int block_deletesprite = 0;
void deletesprite_(int s) void deletesprite_(int s)
{ {
if (block_deletesprite)
{
OSD_Printf(OSD_ERROR "deletesprite_(): tried to remove sprite %d in EVENT_EGS\n",s);
return;
}
if (apScriptGameEvent[EVENT_KILLIT]) if (apScriptGameEvent[EVENT_KILLIT])
{ {
static int p, pl; static int p, pl;

View file

@ -44,7 +44,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <shellapi.h> #include <shellapi.h>
#endif #endif
#define BUILDDATE " 20081114" #define BUILDDATE " 20081115"
#define VERSION " 1.2.0devel" #define VERSION " 1.2.0devel"
static int floor_over_floor; static int floor_over_floor;

View file

@ -4169,9 +4169,10 @@ void drawbackground(void)
if (g_player[myconnectindex].ps->gm & MODE_GAME || ud.recstat == 2) if (g_player[myconnectindex].ps->gm & MODE_GAME || ud.recstat == 2)
//if (ud.recstat == 0 || ud.recstat == 1 || (ud.recstat == 2 && ud.reccnt > 0)) // JBF 20040717 //if (ud.recstat == 0 || ud.recstat == 1 || (ud.recstat == 2 && ud.reccnt > 0)) // JBF 20040717
{ {
if (ud.screen_size == 8 && ud.statusbarmode == 0) // if (ud.screen_size == 8 && ud.statusbarmode == 0)
y1 = scale(ydim,200-scale(tilesizy[BOTTOMSTATUSBAR],ud.statusbarscale,100),200); // y1 = scale(ydim,200-scale(tilesizy[BOTTOMSTATUSBAR],ud.statusbarscale,100),200);
else if (gametype_flags[ud.coop] & GAMETYPE_FLAG_FRAGBAR) //else
if (gametype_flags[ud.coop] & GAMETYPE_FLAG_FRAGBAR)
{ {
if (ud.multimode > 1) y1 += scale(ydim,8,200); if (ud.multimode > 1) y1 += scale(ydim,8,200);
if (ud.multimode > 4) y1 += scale(ydim,8,200); if (ud.multimode > 4) y1 += scale(ydim,8,200);
@ -4220,6 +4221,7 @@ void drawbackground(void)
// draw in the bits to the left and right of the non-fullsize status bar // draw in the bits to the left and right of the non-fullsize status bar
if (ud.statusbarscale < 100 && ud.screen_size >= 8 && ud.statusbarmode == 0) if (ud.statusbarscale < 100 && ud.screen_size >= 8 && ud.statusbarmode == 0)
{ {
/*
y1 = y2; y1 = y2;
x2 = (xdim - scale(xdim,ud.statusbarscale,100)) >> 1; x2 = (xdim - scale(xdim,ud.statusbarscale,100)) >> 1;
x1 = xdim-x2; x1 = xdim-x2;
@ -4230,6 +4232,16 @@ void drawbackground(void)
rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,0,y1,x2-1,ydim-1); rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,0,y1,x2-1,ydim-1);
rotatesprite((x+x1)<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,xdim-x2,y1,xdim-1,ydim-1); rotatesprite((x+x1)<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,xdim-x2,y1,xdim-1,ydim-1);
} }
*/
// when not rendering a game, fullscreen wipe
x2 = (xdim - scale(xdim,ud.statusbarscale,100)) >> 1;
for (y=y2-y2%tilesizy[dapicnum];y<ydim;y+=tilesizy[dapicnum])
for (x=0;x<xdim>>1;x+=tilesizx[dapicnum])
{
rotatesprite(x<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,0,y2,x2,ydim-1);
rotatesprite((xdim-x)<<16,y<<16,65536L,0,dapicnum,8,0,8+16+64,xdim-x2-1,y2,xdim-1,ydim-1);
}
} }
if (ud.screen_size > 8) if (ud.screen_size > 8)
@ -4880,8 +4892,12 @@ int EGS(int whatsect,int s_x,int s_y,int s_z,int s_pn,int s_s,int s_xr,int s_yr,
if (apScriptGameEvent[EVENT_EGS]) if (apScriptGameEvent[EVENT_EGS])
{ {
extern int block_deletesprite;
int pl=findplayer(&sprite[i],&p); int pl=findplayer(&sprite[i],&p);
block_deletesprite++;
OnEvent(EVENT_EGS,i, pl, p); OnEvent(EVENT_EGS,i, pl, p);
block_deletesprite--;
} }
return(i); return(i);

View file

@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
#include "duke3d.h" #include "duke3d.h"
char *s_builddate = "20081114"; char *s_builddate = "20081115";
char *MusicPtr = NULL; char *MusicPtr = NULL;
int Musicsize; int Musicsize;

View file

@ -285,9 +285,9 @@ static int getsound(unsigned int num)
if (num >= MAXSOUNDS || ud.config.SoundToggle == 0) return 0; if (num >= MAXSOUNDS || ud.config.SoundToggle == 0) return 0;
if (ud.config.FXDevice < 0) return 0; if (ud.config.FXDevice < 0) return 0;
if (!g_sounds[num].filename) return 0; if (!g_sounds[num].filename && !g_sounds[num].filename1) return 0;
if (g_sounds[num].filename1)fp = kopen4loadfrommod(g_sounds[num].filename1,loadfromgrouponly); if (g_sounds[num].filename1) fp = kopen4loadfrommod(g_sounds[num].filename1,loadfromgrouponly);
if (fp == -1)fp = kopen4loadfrommod(g_sounds[num].filename,loadfromgrouponly); if (fp == -1) fp = kopen4loadfrommod(g_sounds[num].filename,loadfromgrouponly);
if (fp == -1) if (fp == -1)
{ {
initprintf("Sound '%s' not found\n",g_sounds[num].filename); initprintf("Sound '%s' not found\n",g_sounds[num].filename);