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

This commit is contained in:
terminx 2008-07-20 00:39:06 +00:00
parent e8c0abf7da
commit 6d9579ed07
6 changed files with 72 additions and 55 deletions

View file

@ -213,9 +213,9 @@ int main(int argc, char *argv[])
int initsystem(void) int initsystem(void)
{ {
/* /*
#ifdef DEBUGGINGAIDS #ifdef DEBUGGINGAIDS
const SDL_VideoInfo *vid; const SDL_VideoInfo *vid;
#endif #endif
*/ */
const SDL_version *linked = SDL_Linked_Version(); const SDL_version *linked = SDL_Linked_Version();
SDL_version compiled; SDL_version compiled;
@ -276,7 +276,7 @@ int initsystem(void)
/* /*
// dump a quick summary of the graphics hardware // dump a quick summary of the graphics hardware
#ifdef DEBUGGINGAIDS #ifdef DEBUGGINGAIDS
vid = SDL_GetVideoInfo(); vid = SDL_GetVideoInfo();
initprintf("Video device information:\n"); initprintf("Video device information:\n");
initprintf(" Can create hardware surfaces? %s\n", (vid->hw_available)?"Yes":"No"); initprintf(" Can create hardware surfaces? %s\n", (vid->hw_available)?"Yes":"No");
@ -289,8 +289,8 @@ int initsystem(void)
initprintf(" Accelerated software alpha blits? %s\n", (vid->blit_sw_A)?"Yes":"No"); initprintf(" Accelerated software alpha blits? %s\n", (vid->blit_sw_A)?"Yes":"No");
initprintf(" Accelerated colour fills? %s\n", (vid->blit_fill)?"Yes":"No"); initprintf(" Accelerated colour fills? %s\n", (vid->blit_fill)?"Yes":"No");
initprintf(" Total video memory: %dKB\n", vid->video_mem); initprintf(" Total video memory: %dKB\n", vid->video_mem);
#endif #endif
*/ */
return 0; return 0;
} }

View file

@ -653,6 +653,16 @@ int32 CONFIG_ReadSetup(void)
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness); SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenGamma",&ud.brightness);
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size); SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenSize",&ud.screen_size);
tempbuf[0] = 0;
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup", "VidGamma",&tempbuf[0]);
if (tempbuf[0]) vid_gamma = atof(tempbuf);
tempbuf[0] = 0;
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup", "VidBrightness",&tempbuf[0]);
if (tempbuf[0]) vid_brightness = atof(tempbuf);
tempbuf[0] = 0;
SCRIPT_GetString(ud.config.scripthandle, "Screen Setup", "VidContrast",&tempbuf[0]);
if (tempbuf[0]) vid_contrast = atof(tempbuf);
#if defined(POLYMOST) && defined(USE_OPENGL) #if defined(POLYMOST) && defined(USE_OPENGL)
SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenBPP", &ud.config.ScreenBPP); SCRIPT_GetNumber(ud.config.scripthandle, "Screen Setup", "ScreenBPP", &ud.config.ScreenBPP);
if (ud.config.ScreenBPP < 8) ud.config.ScreenBPP = 32; if (ud.config.ScreenBPP < 8) ud.config.ScreenBPP = 32;
@ -801,15 +811,15 @@ void CONFIG_WriteBinds(void) // save binds and aliases to disk
fprintf(fp,"// this file automatically generated by EDuke32\n// do not modify if you lack common sense\n"); fprintf(fp,"// this file automatically generated by EDuke32\n// do not modify if you lack common sense\n");
for (i=0;i<MAXBOUNDKEYS;i++) for (i=0;i<MAXBOUNDKEYS;i++)
if (boundkeys[i].cmd[0] && boundkeys[i].key) if (boundkeys[i].cmd[0] && boundkeys[i].key)
fprintf(fp,"bind %s%s \"%s\"\n",boundkeys[i].key,boundkeys[i].repeat?"":" norepeat",boundkeys[i].cmd); fprintf(fp,"bind \"%s\"%s \"%s\"\n",boundkeys[i].key,boundkeys[i].repeat?"":" norepeat",boundkeys[i].cmd);
for (i=0;i<MAXMOUSEBUTTONS;i++) for (i=0;i<MAXMOUSEBUTTONS;i++)
if (mousebind[i].cmd[0]) if (mousebind[i].cmd[0])
fprintf(fp,"bind %s%s \"%s\"\n",mousebind[i].key,mousebind[i].repeat?"":" norepeat",mousebind[i].cmd); fprintf(fp,"bind \"%s\"%s \"%s\"\n",mousebind[i].key,mousebind[i].repeat?"":" norepeat",mousebind[i].cmd);
for (symb=symbols; symb!=NULL; symb=symb->next) for (symb=symbols; symb!=NULL; symb=symb->next)
if (symb->func == (void *)OSD_ALIAS) if (symb->func == (void *)OSD_ALIAS)
fprintf(fp,"alias %s \"%s\"\n", symb->name, symb->help); fprintf(fp,"alias \"%s\" \"%s\"\n", symb->name, symb->help);
/* for (i = 0; i < sizeof(cvar)/sizeof(cvarmappings); i++) /* for (i = 0; i < sizeof(cvar)/sizeof(cvarmappings); i++)
if (!(cvar[i].type&CVAR_NOSAVE)) if (!(cvar[i].type&CVAR_NOSAVE))
@ -926,6 +936,13 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "SoundToggle",ud.config.SoundToggle,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "SoundToggle",ud.config.SoundToggle,false,false);
SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "VoiceToggle",ud.config.VoiceToggle,false,false); SCRIPT_PutNumber(ud.config.scripthandle, "Sound Setup", "VoiceToggle",ud.config.VoiceToggle,false,false);
Bsprintf(tempbuf,"%.2f",vid_gamma);
SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "VidGamma",tempbuf);
Bsprintf(tempbuf,"%.2f",vid_brightness);
SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "VidBrightness",tempbuf);
Bsprintf(tempbuf,"%.2f",vid_contrast);
SCRIPT_PutString(ud.config.scripthandle, "Screen Setup", "VidContrast",tempbuf);
#ifdef _WIN32 #ifdef _WIN32
SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", ud.config.CheckForUpdates, false, false); SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "CheckForUpdates", ud.config.CheckForUpdates, false, false);
SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", ud.config.LastUpdateCheck, false, false); SCRIPT_PutNumber(ud.config.scripthandle, "Updates", "LastUpdateCheck", ud.config.LastUpdateCheck, false, false);

View file

@ -1379,7 +1379,7 @@ static void resetpspritevars(char g)
if (numplayersprites == MAXPLAYERS) if (numplayersprites == MAXPLAYERS)
gameexit("\nToo many player sprites (max 16.)"); gameexit("\nToo many player sprites (max 16.)");
/* if (numplayersprites == 0) /* if (numplayersprites == 0)
{ {
firstx = g_player[0].ps->posx; firstx = g_player[0].ps->posx;
firsty = g_player[0].ps->posy; firsty = g_player[0].ps->posy;