mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@879 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
e4fcc3108a
commit
4a69a33e36
9 changed files with 43 additions and 43 deletions
|
@ -130,7 +130,7 @@ void showframe(int);
|
|||
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
|
||||
|
|
|
@ -79,9 +79,9 @@ static int oxdimen = -1, oviewingrange = -1, oxyaspect = -1;
|
|||
|
||||
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;
|
||||
|
|
|
@ -57,7 +57,6 @@ char videomodereset = 0;
|
|||
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;
|
||||
|
|
|
@ -62,7 +62,6 @@ int is_vista = 0;
|
|||
|
||||
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
|
||||
|
|
|
@ -589,7 +589,7 @@ void CONFIG_SetupJoystick(void)
|
|||
===================
|
||||
*/
|
||||
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 @@ int32 CONFIG_ReadSetup(void)
|
|||
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;
|
||||
|
|
|
@ -54,7 +54,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
#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
|
||||
|
||||
|
|
|
@ -533,7 +533,7 @@ static int getfilenames(const char *path, char kind[])
|
|||
|
||||
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 @@ void menus(void)
|
|||
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,13 +2578,12 @@ cheat_for_port_credits:
|
|||
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);
|
||||
|
@ -2608,7 +2607,7 @@ cheat_for_port_credits:
|
|||
}
|
||||
|
||||
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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
{
|
||||
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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
{
|
||||
"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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
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 @@ cheat_for_port_credits:
|
|||
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
|
||||
|
|
|
@ -1312,7 +1312,7 @@ int registerosdcommands(void)
|
|||
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);
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
|||
{
|
||||
short ac;
|
||||
char *ptr = OSD_GetTextPtr();
|
||||
char *fmt = OSD_GetFmtPtr();
|
||||
|
||||
for (x = (x<<3)+x; len>0; len--, ch++, x++)
|
||||
{
|
||||
|
@ -31,8 +32,10 @@ void GAME_drawosdstr(int x, int y, char *ch, int len, int shade, int pal)
|
|||
|
||||
// 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);
|
||||
|
|
Loading…
Reference in a new issue