Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 886 → Rev 885

/polymer/build/include/build.h
49,8 → 49,6
#define GREENPAL (MAXPALOOKUPS - 7)
#define SPECPAL (MAXPALOOKUPS - 8)
 
#define STAT_NOCULL 99
 
#define CLIPMASK0 (((1L)<<16)+1L)
#define CLIPMASK1 (((256L)<<16)+64L)
 
549,7 → 547,7
extern int r_parallaxskyclamping;
extern int r_parallaxskypanning;
extern int r_cullobstructedmodels;
extern int r_fullbrights;
extern int r_fullbright;
extern int mdtims, omdtims;
#endif
 
/polymer/build/src/polymost.c
179,7 → 179,7
#define CULL_DELAY 5
 
// fullbright cvar
int r_fullbrights = 1;
int r_fullbright = 1;
 
static float fogresult, fogcol[4];
 
582,7 → 582,7
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,glfiltermodes[gltexfiltermode].min);
if (glinfo.maxanisotropy > 1.0)
bglTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_MAX_ANISOTROPY_EXT,glanisotropy);
if (r_fullbrights && pth->flags & 16)
if (r_fullbright && pth->flags & 16)
{
bglBindTexture(GL_TEXTURE_2D,pth->ofb->glpic);
bglTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,glfiltermodes[gltexfiltermode].mag);
1817,7 → 1817,7
if (skyclamphack) method |= 4;
pth = gltexcache(globalpicnum,globalpal,method&(~3));
 
if (r_fullbrights && pth->flags & 16)
if (r_fullbright && pth->flags & 16)
if (indrawroomsandmasks)
{
if (!fullbrightdrawingpass)
4514,7 → 4514,7
if (totalclock < lastcullcheck[tspr->owner])
break;
cullmodel[tspr->owner] = 1;
if (tspr->statnum == STAT_NOCULL)
if (tspr->statnum == 99)
{ cullmodel[tspr->owner] = 0; break; }
/* if (cansee(globalposx, globalposy, sector[globalcursectnum].ceilingz, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum))
4525,9 → 4525,9
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, tspr->z,tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; }
/* if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
if (cansee(globalposx, globalposy, globalposz, globalcursectnum,
tspr->x, tspr->y, globalposz,tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } */
{ cullmodel[tspr->owner] = 0; break; }
/* if (cansee(globalposx, globalposy, sector[globalcursectnum].floorz, globalcursectnum,
tspr->x, tspr->y, tspr->z, tspr->sectnum))
{ cullmodel[tspr->owner] = 0; break; } */
4535,7 → 4535,7
if (polymost_checkcoordinates(0, 0, tspr))
{ cullmodel[tspr->owner] = 0; break; }
 
i = 256;
i = 640;
if (polymost_checkcoordinates(-i, 0, tspr))
{ cullmodel[tspr->owner] = 0; break; }
if (polymost_checkcoordinates(-i, -i, tspr))
5964,10 → 5964,10
else r_cullobstructedmodels = (val != 0);
return OSDCMD_OK;
}
else if (!Bstrcasecmp(parm->name, "r_fullbrights"))
else if (!Bstrcasecmp(parm->name, "r_fullbright"))
{
if (showval) { OSD_Printf("r_fullbrights is %d\n", r_fullbrights); }
else r_fullbrights = (val != 0);
if (showval) { OSD_Printf("r_fullbright is %d\n", r_fullbright); }
else r_fullbright = (val != 0);
return OSDCMD_OK;
}
#endif
6012,7 → 6012,7
OSD_RegisterFunction("r_curpeel","r_curpeel: allows to display one depth layer at a time (for development purposes)",osdcmd_polymostvars);
OSD_RegisterFunction("r_depthpeeling","r_depthpeeling: enable/disable order-independant transparency",osdcmd_polymostvars);
OSD_RegisterFunction("r_detailmapping","r_detailmapping: enable/disable detail mapping",osdcmd_polymostvars);
OSD_RegisterFunction("r_fullbrights","r_fullbrights: enable/disable fullbright textures",osdcmd_polymostvars);
OSD_RegisterFunction("r_fullbright","r_fullbright: enable/disable fullbright textures",osdcmd_polymostvars);
OSD_RegisterFunction("r_glowmapping","r_glowmapping: enable/disable glow mapping",osdcmd_polymostvars);
OSD_RegisterFunction("r_multisample","r_multisample: sets the number of samples used for antialiasing (0 = off)",osdcmd_polymostvars);
OSD_RegisterFunction("r_nvmultisamplehint","r_nvmultisamplehint: enable/disable Nvidia multisampling hinting",osdcmd_polymostvars);
/polymer/eduke32/source/astub.c
38,7 → 38,7
#include "scriptfile.h"
#include "crc32.h"
 
#define VERSION " 1.2.0devel"
#define VERSION " 1.2.0 svn"
 
static int floor_over_floor;
 
/polymer/eduke32/source/config.c
685,7 → 685,7
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling", &r_depthpeeling);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount", &r_peelscount);
 
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLFullbrights", &r_fullbrights);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLFullbrights", &r_fullbright);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLDetailMapping", &r_detailmapping);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLGlowMapping", &r_glowmapping);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "GLVertexArrays", &r_vertexarrays);
895,7 → 895,7
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLDepthPeeling",r_depthpeeling,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLPeelsCount",r_peelscount,false,false);
 
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLFullbrights", r_fullbrights,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLFullbright", r_fullbright,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLDetailMapping", r_detailmapping,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLGlowMapping", r_glowmapping,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "GLVertexArrays", r_vertexarrays,false,false);
/polymer/eduke32/source/duke3d.h
22,7 → 22,9
*/
//-------------------------------------------------------------------------
 
#define VERSION " 1.5.0devel"
#define VERSION " 1.4.0 svn"
 
#define HEAD "EDuke32"VERSION" (shareware)"
#define HEAD2 "EDuke32"VERSION
 
#ifdef __cplusplus
/polymer/eduke32/source/game.c
54,7 → 54,7
#include <windows.h>
#include <shellapi.h>
extern int getversionfromwebsite(char *buffer);
#define BUILDDATE 20080722 // this is checked against http://eduke32.com/VERSION
#define BUILDDATE 20080720 // this is checked against http://eduke32.com/VERSION
#define UPDATEINTERVAL 604800 // 1w
#endif
 
114,7 → 114,6
 
char defaultduke3dgrp[BMAX_PATH] = "duke3d.grp";
char *duke3dgrp = defaultduke3dgrp;
char *duke3dgrpstring = NULL;
static char defaultconfilename[BMAX_PATH] = {"EDUKE.CON"};
static char *confilename = defaultconfilename;
static char *duke3ddef = "duke3d.def";
6476,7 → 6475,7
}
}
 
if (t->statnum == STAT_NOCULL) continue;
if (t->statnum == 99) continue;
if (s->statnum != 1 && s->picnum == APLAYER && g_player[s->yvel].ps->newowner == -1 && s->owner >= 0)
{
t->x -= mulscale16(65536-smoothratio,g_player[s->yvel].ps->posx-g_player[s->yvel].ps->oposx);
6667,7 → 6666,7
{
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
 
tsprite[spritesortcnt].statnum = STAT_NOCULL;
tsprite[spritesortcnt].statnum = 99;
 
/* tsprite[spritesortcnt].yrepeat = (t->yrepeat>>3);
if (t->yrepeat < 4) t->yrepeat = 4; */
6699,7 → 6698,7
{
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
 
tsprite[spritesortcnt].statnum = STAT_NOCULL;
tsprite[spritesortcnt].statnum = 99;
 
tsprite[spritesortcnt].yrepeat = (t->yrepeat>>3);
if (t->yrepeat < 4) t->yrepeat = 4;
6940,7 → 6939,7
{
memcpy((spritetype *)&tsprite[spritesortcnt],(spritetype *)t,sizeof(spritetype));
 
tsprite[spritesortcnt].statnum = STAT_NOCULL;
tsprite[spritesortcnt].statnum = 99;
 
tsprite[spritesortcnt].yrepeat = (t->yrepeat>>3);
if (t->yrepeat < 4) t->yrepeat = 4;
7108,7 → 7107,7
}
for (j=0;j < spritesortcnt; j++)
{
if (display_mirror) tsprite[j].statnum = STAT_NOCULL;
if (display_mirror) tsprite[j].statnum = 99;
if (tsprite[j].owner > 0 && tsprite[j].owner < MAXSPRITES && spriteext[tsprite[j].owner].flags & SPREXT_TSPRACCESS)
{
OnEvent(EVENT_ANIMATESPRITES,tsprite[j].owner, myconnectindex, -1);
9395,8 → 9394,8
flushperms();
nextpage();
 
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
wm_setapptitle(tempbuf);
if (VOLUMEALL) wm_setapptitle(HEAD2);
else wm_setapptitle(HEAD);
 
MUSIC_StopSong();
FX_StopAllSounds(); // JBF 20031228
10140,8 → 10139,8
g_player[myconnectindex].ps->gm = MODE_MENU;
cmenu(0);
KB_FlushKeyboardQueue();
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
wm_setapptitle(tempbuf);
if (VOLUMEALL) wm_setapptitle(HEAD2);
else wm_setapptitle(HEAD);
}
 
#ifdef RENDERTYPEWIN
10342,7 → 10341,6
if (!Bstrcasecmp(fg->name, defaultduke3dgrp))
{
g_GameType = grpfiles[i].game;
duke3dgrpstring = (char *)grpfiles[i].name;
break;
}
}
10350,7 → 10348,6
{
Bstrcpy(defaultduke3dgrp, first->name);
g_GameType = first->game;
duke3dgrpstring = (char *)grpfiles[0].name;
}
}
 
10448,10 → 10445,9
 
// gotta set the proper title after we compile the CONs if this is the full version
 
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
wm_setapptitle(tempbuf);
if (VOLUMEALL) wm_setapptitle(HEAD2);
else wm_setapptitle(HEAD);
 
 
// initprintf("\n");
 
if (g_ScriptDebug)
11978,8 → 11974,8
350, 380,VICTORY1+8,86,59
};
 
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
wm_setapptitle(tempbuf);
if (VOLUMEALL) wm_setapptitle(HEAD2);
else wm_setapptitle(HEAD);
 
if (ud.volume_number == 0 && ud.last_level == 8 && boardfilename[0])
{
/polymer/eduke32/source/gamedef.c
91,8 → 91,6
char *textptr;
int error,warning;
 
extern char *duke3dgrpstring;
 
enum labeltypes
{
LABEL_ANY = -1,
463,7 → 461,6
"loadmapstate", // 327
"clearmapstate", // 328
"scriptsize", // 329
"definegamename", // 330
"<null>"
};
 
4451,33 → 4448,6
skill_names[j][i] = '\0';
return 0;
 
case CON_DEFINEGAMENAME:
{
char gamename[32];
scriptptr--;
while (*textptr == ' ' || *textptr == '\t') textptr++;
 
i = 0;
 
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0)
{
gamename[i] = *textptr;
textptr++,i++;
if (i >= (signed)sizeof(gamename)-1)
{
initprintf("%s:%d: error: game name exceeds limit of %d characters.\n",compilefile,line_number,sizeof(gamename)-1);
error++;
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0) textptr++;
break;
}
}
gamename[i] = '\0';
duke3dgrpstring = Bstrdup(gamename);
Bsprintf(tempbuf,HEAD2 " - %s",duke3dgrpstring);
wm_setapptitle(tempbuf);
}
return 0;
 
case CON_DEFINEGAMETYPE:
scriptptr--; //remove opcode from compiled code
transnum(LABEL_DEFINE); //translate number
/polymer/eduke32/source/gamedef.h
838,5 → 838,4
CON_LOADMAPSTATE, // 327
CON_CLEARMAPSTATE, // 328
CON_SCRIPTSIZE, // 329
CON_DEFINEGAMENAME, // 330
};
/polymer/eduke32/source/grpscan.c
15,7 → 15,7
{ "Duke Nukem 3D: Atomic Edition", 0xFD3DCFF1, 44356548, GAMEDUKE, NULL },
{ "Duke Nukem 3D Shareware", 0x983AD923, 11035779, GAMEDUKE, NULL },
{ "Duke Nukem 3D Mac Shareware", 0xC5F71561, 10444391, GAMEDUKE, NULL },
// { "Duke Nukem 3D Mac", 0x00000000, 0, GAMEDUKE, NULL },
{ "Duke Nukem 3D Mac", 0x00000000, 0, GAMEDUKE, NULL },
{ "NAM", 0x75C1F07B, 43448927, GAMENAM, NULL },
{ "Napalm", 0x3DE1589A, 44365728, GAMENAM, NULL },
{ "WW2GI", 0x907B82BF, 77939508, GAMEWW2, NULL },
/polymer/eduke32/source/grpscan.h
2,7 → 2,7
#define __grpscan_h__
 
// List of internally-known GRP files
#define numgrpfiles 8
#define numgrpfiles 9
struct grpfile {
const char *name;
int crcval;
/polymer/eduke32/source/menus.c
2426,7 → 2426,7
int io, ii, yy, d=c+160+40, enabled;
char *opts[] =
{
"Use widescreen hack",
"Widescreen",
"-",
"Anisotropic filtering",
"-",
2439,9 → 2439,9
"Use glow textures",
"-",
"Use models",
"Blend model animations",
"-",
"-",
"-",
NULL
};
 
2481,7 → 2481,7
case 0:
if (x==io) glwidescreen = 1-glwidescreen;
modval(0,1,(int *)&glwidescreen,1,probey==io);
gametextpal(d,yy, glwidescreen ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, glwidescreen ? "On" : "Off", MENUHIGHLIGHT(io), 0);
break;
case 1:
{
2517,13 → 2517,13
gametextpal(d,yy, glusetexcompr && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
break;
case 5:
enabled = (glusetexcompr && usehightile);
enabled = (glusetexcompr && usehightile && ud.config.useprecache);
if (enabled && x==io) glusetexcache = !glusetexcache;
if (enabled) modval(0,1,(int *)&glusetexcache,1,probey==io);
gametextpal(d,yy, glusetexcache && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
break;
case 6:
enabled = (glusetexcompr && usehightile && glusetexcache);
enabled = (glusetexcompr && usehightile && ud.config.useprecache && glusetexcache);
if (enabled && x==io) glusetexcachecompression = !glusetexcachecompression;
if (enabled) modval(0,1,(int *)&glusetexcachecompression,1,probey==io);
gametextpal(d,yy, glusetexcachecompression && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
2545,12 → 2545,6
modval(0,1,(int *)&usemodels,1,probey==io);
gametextpal(d,yy, usemodels ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 10:
enabled = usemodels;
if (enabled && x==io) r_animsmoothing = !r_animsmoothing;
if (enabled) modval(0,1,(int *)&r_animsmoothing,1,probey==io);
gametextpal(d,yy, r_animsmoothing && enabled ? "On" : "Off", enabled?MENUHIGHLIGHT(io):DISABLEDMENUSHADE, 0);
break;
default:
break;
}
/polymer/eduke32/source/premap.c
40,8 → 40,6
static char precachehightile[2][MAXTILES>>3];
static int precachecount;
 
extern char *duke3dgrpstring;
 
static void tloadtile(int tilenume, int type)
{
if ((picanm[tilenume]&63) < 1)
1673,11 → 1671,14
if (boardfilename[0] != 0 && ud.m_level_number == 7 && ud.m_volume_number == 0)
{
Bstrcpy(levname, boardfilename);
Bsprintf(apptitle,HEAD2 " - %s - %s",levname,duke3dgrpstring);
Bsprintf(apptitle," - %s",levname);
}
else Bsprintf(apptitle,HEAD2 " - %s - %s",map[(ud.volume_number*MAXLEVELS)+ud.level_number].name,duke3dgrpstring);
else Bsprintf(apptitle," - %s",map[(ud.volume_number*MAXLEVELS)+ud.level_number].name);
 
Bstrcpy(tempbuf,apptitle);
if (VOLUMEALL) Bsprintf(tempbuf,HEAD2);
else Bsprintf(tempbuf,HEAD);
 
Bstrcat(tempbuf,apptitle);
wm_setapptitle(tempbuf);
 
if (!VOLUMEONE)
/polymer/eduke32/source/startgtk.game.c
31,7 → 31,6
int usemouse, usejoy;
char selectedgrp[BMAX_PATH+1];
int game;
int crcval;
} settings;
 
extern int gtkenabled;
225,7 → 224,6
gtk_tree_model_get(model, &iter, 2, (gpointer)&fg, -1);
strcpy(settings.selectedgrp, fg->name);
settings.game = fg->game;
settings.crcval = fg->crcval;
}
}
 
743,7 → 741,7
return 0;
}
 
extern char *duke3dgrp, *duke3dgrpstring;
extern char *duke3dgrp;
 
int startwin_run(void)
{
768,8 → 766,6
SetPage(TAB_MESSAGES);
if (retval)
{
int i;
 
ud.config.ScreenMode = settings.fullscreen;
ud.config.ScreenWidth = settings.xdim3d;
ud.config.ScreenHeight = settings.ydim3d;
779,10 → 775,6
ud.config.UseJoystick = settings.usejoy;
duke3dgrp = settings.selectedgrp;
g_GameType = settings.game;
 
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles)
duke3dgrpstring = (char *)grpfiles[i].name;
}
 
return retval;
/polymer/eduke32/source/startwin.game.c
34,7 → 34,6
int usemouse, usejoy;
char selectedgrp[BMAX_PATH+1];
int game;
int crcval; // for finding the grp in the list again
}
settings;
 
212,7 → 211,6
{
strcpy(settings.selectedgrp, ((struct grpfile*)i)->name);
settings.game = ((struct grpfile*)i)->game;
settings.crcval = ((struct grpfile*)i)->crcval;
}
return TRUE;
}
566,7 → 564,7
return 0;
}
 
extern char *duke3dgrp, *duke3dgrpstring;
extern char *duke3dgrp;
 
int startwin_run(void)
{
589,7 → 587,6
settings.usemouse = ud.config.UseMouse;
settings.usejoy = ud.config.UseJoystick;
settings.game = g_GameType;
// settings.crcval = 0;
strncpy(settings.selectedgrp, duke3dgrp, BMAX_PATH);
PopulateForm(-1);
 
614,8 → 611,6
EnableConfig(0);
if (done)
{
int i;
 
ud.config.ScreenMode = settings.fullscreen;
ud.config.ScreenWidth = settings.xdim;
ud.config.ScreenHeight = settings.ydim;
625,10 → 620,6
ud.config.UseJoystick = settings.usejoy;
duke3dgrp = settings.selectedgrp;
g_GameType = settings.game;
 
for (i = 0; i<numgrpfiles; i++) if (settings.crcval == grpfiles[i].crcval) break;
if (i != numgrpfiles)
duke3dgrpstring = (char *)grpfiles[i].name;
}
 
if (wavedevs)