Subversion Repositories eduke32

Compare Revisions

Ignore whitespace Rev 878 → Rev 879

/polymer/build/include/baselayer.h
130,7 → 130,7
int setpalette(int start, int num, char *dapal);
//int getpalette(int start, int num, char *dapal);
int setgamma(void);
float vid_gamma, vid_contrast, vid_brightness;
double vid_gamma, vid_contrast, vid_brightness;
 
#define DEFAULT_GAMMA 1.2
#define DEFAULT_CONTRAST 1.2
/polymer/build/src/engine.c
79,9 → 79,9
 
int curbrightness = 0, gammabrightness = 0;
 
float vid_gamma = DEFAULT_GAMMA;
float vid_contrast = DEFAULT_CONTRAST;
float vid_brightness = DEFAULT_BRIGHTNESS;
double vid_gamma = DEFAULT_GAMMA;
double vid_contrast = DEFAULT_CONTRAST;
double vid_brightness = DEFAULT_BRIGHTNESS;
 
//Textured Map variables
static char globalpolytype;
/polymer/build/src/sdlayer.c
57,7 → 57,6
char nofog=0;
static unsigned short sysgamma[3][256];
extern int curbrightness, gammabrightness;
extern float vid_gamma, vid_contrast, vid_brightness;
#ifdef USE_OPENGL
// OpenGL stuff
static char nogl=0;
/polymer/build/src/winlayer.c
62,7 → 62,6
 
static WORD sysgamma[3][256];
extern int curbrightness, gammabrightness;
extern float vid_gamma, vid_contrast, vid_brightness;
 
#if defined(USE_OPENGL) && defined(POLYMOST)
// OpenGL stuff
/polymer/eduke32/source/config.c
589,7 → 589,7
===================
*/
extern char *duke3dgrp;
extern void check_player_color(int *color,int prev_color);
extern void check_valid_color(int *color,int prev_color);
 
int32 CONFIG_ReadSetup(void)
{
714,7 → 714,7
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "DemoCams",&ud.democams);
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "ShowFPS",&ud.tickrate);
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Color",&ud.color);
check_player_color((int *)&ud.color,-1);
check_valid_color((int *)&ud.color,-1);
g_player[0].ps->palookup = g_player[0].pcolor = ud.color;
SCRIPT_GetNumber(ud.config.scripthandle, "Misc", "Team",&dummy);
ud.team = 0;
/polymer/eduke32/source/game.c
54,7 → 54,7
#include <windows.h>
#include <shellapi.h>
extern int getversionfromwebsite(char *buffer);
#define BUILDDATE 20080703
#define BUILDDATE 20080720 // this is checked against http://eduke32.com/VERSION
#define UPDATEINTERVAL 604800 // 1w
#endif
 
/polymer/eduke32/source/menus.c
533,7 → 533,7
 
int quittimer = 0;
 
void check_player_color(int *color,int prev_color)
void check_valid_color(int *color, int prev_color)
{
int i, disallowed[] = { 1, 2, 3, 4, 5, 6, 7, 8, 17, 18, 19, 20, 22 };
 
802,10 → 802,10
ud.color++;
if (ud.color > 23)
ud.color = 0;
check_player_color((int *)&ud.color,-1);
check_valid_color((int *)&ud.color,-1);
}
modval(0,23,(int *)&ud.color,1,probey==1);
check_player_color((int *)&ud.color,i);
check_valid_color((int *)&ud.color,i);
if (ud.color != i)
updateplayer();
break;
2578,14 → 2578,13
menutext(c,50+16+16,MENUHIGHLIGHT(2),0,"BRIGHTNESS");
menutext(c,50+16+16+16+8,MENUHIGHLIGHT(3),0,"RESET TO DEFAULTS");
 
Bsprintf(tempbuf,"%.2f",vid_gamma);
gametext(c+177-52,50-8,tempbuf,MENUHIGHLIGHT(0),2+8+16);
Bsprintf(tempbuf,"%.2f",vid_contrast);
gametext(c+177-52,50+16-8,tempbuf,MENUHIGHLIGHT(1),2+8+16);
Bsprintf(tempbuf,"%.2f",vid_brightness);
gametext(c+177-52,50+16+16-8,tempbuf,MENUHIGHLIGHT(2),2+8+16);
Bsprintf(tempbuf,"%s%.2f",vid_gamma>=0?" ":"",vid_gamma);
gametext(c+177-56,50-8,tempbuf,MENUHIGHLIGHT(0),2+8+16);
Bsprintf(tempbuf,"%s%.2f",vid_contrast>=0?" ":"",vid_contrast);
gametext(c+177-56,50+16-8,tempbuf,MENUHIGHLIGHT(1),2+8+16);
Bsprintf(tempbuf,"%s%.2f",vid_brightness>=0?" ":"",vid_brightness);
gametext(c+177-56,50+16+16-8,tempbuf,MENUHIGHLIGHT(2),2+8+16);
 
 
{
int b = (vid_gamma*40960.f);
_bar(0,c+177,50,&b,4096,x==0,MENUHIGHLIGHT(0),0,8192,163840);
2608,7 → 2607,7
}
 
b = (vid_brightness*40960.f);
_bar(0,c+177,50+16+16,&b,2048,x==2,MENUHIGHLIGHT(2),0,-32767,32767);
_bar(0,c+177,50+16+16,&b,2048,x==2,MENUHIGHLIGHT(2),0,-32768,32768);
 
if (b != (vid_brightness*40960.f))
{
2638,20 → 2637,20
int io, ii, yy, d=c+160+40, enabled;
char *opts[] =
{
"Crosshair",
"Level stats",
"Show crosshair",
"Show level stats",
"-",
"Screen size",
"Status bar size",
"-",
"Run key style",
"Allow walk with autorun",
"-",
"Shadows",
"Screen tilting",
"-",
"Show opponent weapon",
"Show DM opponent weapon",
"Demo playback cameras",
"Record demo",
"Demo recording",
"-",
"-",
"-",
2704,7 → 2703,7
case 1:
if (x==io) ud.levelstats = 1-ud.levelstats;
modval(0,1,(int *)&ud.levelstats,1,probey==io);
gametextpal(d,yy, ud.levelstats ? "Shown" : "Hidden", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.levelstats ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 2:
{
2731,7 → 2730,7
{
int sbs, sbsl;
sbs = sbsl = ud.statusbarscale-37;
barsm(d+8,yy+7, &sbs,8,x==io,MENUHIGHLIGHT(io),PHX(-5));
barsm(d+8,yy+7, &sbs,4,x==io,MENUHIGHLIGHT(io),0);
if (x == io && sbs != sbsl)
{
sbs += 37;
2742,7 → 2741,7
case 4:
if (x==io) ud.runkey_mode = 1-ud.runkey_mode;
modval(0,1,(int *)&ud.runkey_mode,1,probey==io);
gametextpal(d,yy, ud.runkey_mode ? "Classic" : "Modern", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.runkey_mode ? "No" : "Yes", MENUHIGHLIGHT(io), 0);
break;
case 5:
if (x==io) ud.shadows = 1-ud.shadows;
2759,7 → 2758,7
if (x==io) ud.showweapons = 1-ud.showweapons;
modval(0,1,(int *)&ud.showweapons,1,probey==io);
ud.config.ShowOpponentWeapons = ud.showweapons;
gametextpal(d,yy, ud.config.ShowOpponentWeapons ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.config.ShowOpponentWeapons ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 8:
if (x==io) ud.democams = 1-ud.democams;
2803,17 → 2802,17
{
"Parental lock",
"-",
"Game messages",
"Item/status messages",
"HUD weapon display",
"FPS counter",
"Show framerate",
"-",
"Automatic voting",
"Send MP messages to all",
"Display other player IDs",
"Multiplayer auto voting",
"Private messages in DM",
"Show player names in DM",
"-",
"Show startup window",
#ifdef _WIN32
"Release notification",
"Auto-check for updates",
#else
"-",
"-",
2889,7 → 2888,7
case 3:
if (x==io) ud.tickrate = 1-ud.tickrate;
modval(0,1,(int *)&ud.tickrate,1,probey==io);
gametextpal(d,yy, ud.tickrate ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.tickrate ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 4:
if (x==io)
2905,17 → 2904,17
case 5:
if (x==io) ud.automsg = 1-ud.automsg;
modval(0,1,(int *)&ud.automsg,1,probey==io);
gametextpal(d,yy, ud.automsg ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.automsg ? "Off" : "On", MENUHIGHLIGHT(io), 0);
break;
case 6:
if (x==io) ud.idplayers = 1-ud.idplayers;
modval(0,1,(int *)&ud.idplayers,1,probey==io);
gametextpal(d,yy, ud.idplayers ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.idplayers ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 7:
if (x==io) ud.config.ForceSetup = 1-ud.config.ForceSetup;
modval(0,1,(int *)&ud.config.ForceSetup,1,probey==io);
gametextpal(d,yy, ud.config.ForceSetup ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.config.ForceSetup ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
#ifdef _WIN32
case 8:
2924,7 → 2923,7
modval(0,1,(int *)&ud.config.CheckForUpdates,1,probey==io);
if (ud.config.CheckForUpdates != i)
ud.config.LastUpdateCheck = 0;
gametextpal(d,yy, ud.config.CheckForUpdates ? "On" : "Off", MENUHIGHLIGHT(io), 0);
gametextpal(d,yy, ud.config.CheckForUpdates ? "Yes" : "No", MENUHIGHLIGHT(io), 0);
break;
case 9:
#else
/polymer/eduke32/source/osdcmds.c
1312,7 → 1312,7
OSD_RegisterFunction(t,Bstrdup(tempbuf),osdcmd_button);
}
 
OSD_RegisterFunction("setbrightness","setbrightness <value>: changes brightness", osdcmd_setbrightness);
OSD_RegisterFunction("setbrightness","setbrightness <value>: changes brightness (obsolete)", osdcmd_setbrightness);
OSD_RegisterFunction("give","give <all|health|weapons|ammo|armor|keys|inventory>: gives requested item", osdcmd_give);
OSD_RegisterFunction("god","god: toggles god mode", osdcmd_god);
 
/polymer/eduke32/source/osdfuncs.c
18,6 → 18,7
{
short ac;
char *ptr = OSD_GetTextPtr();
char *fmt = OSD_GetFmtPtr();
 
for (x = (x<<3)+x; len>0; len--, ch++, x++)
{
31,8 → 32,10
 
// use the format byte if the text falls within the bounds of the console buffer
if (ch > ptr && ch < (ptr + TEXTSIZE))
rotatesprite(x<<16, (y<<3)<<16, 65536l, 0, ac, (*(OSD_GetFmt(ch))&~0x1F)>>4,
*(OSD_GetFmt(ch))&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
{
rotatesprite(x<<16, (y<<3)<<16, 65536l, 0, ac, (*(ch-ptr+fmt)&~0x1F)>>4,
*(ch-ptr+fmt)&~0xE0, 8|16, 0, 0, xdim-1, ydim-1);
}
else
rotatesprite(x<<16, (y<<3)<<16, 65536l, 0, ac, shade,
pal, 8|16, 0, 0, xdim-1, ydim-1);