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

This commit is contained in:
terminx 2008-08-08 05:03:56 +00:00
parent 2030a42763
commit 19ac7da999
2 changed files with 17 additions and 17 deletions

View file

@ -816,22 +816,18 @@ int32 CONFIG_ReadSetup(void)
{
char *ptr = strtok(tempbuf,",");
palette_t temppal;
if (ptr != NULL)
char *palptr = (char *)&temppal;
i = 0;
while (ptr != NULL && i < 3)
{
temppal.r = atoi(ptr);
palptr[i++] = atoi(ptr);
ptr = strtok(NULL,",");
if (ptr != NULL)
{
temppal.g = atoi(ptr);
ptr = strtok(NULL,",");
if (ptr != NULL)
{
temppal.b = atoi(ptr);
ptr = strtok(NULL,",");
Bmemcpy(&crosshair_colors,&temppal,sizeof(palette_t));
default_crosshair_colors.f = 1;
}
}
}
if (i == 3)
{
Bmemcpy(&crosshair_colors,&temppal,sizeof(palette_t));
default_crosshair_colors.f = 1;
}
}
}
@ -1013,8 +1009,12 @@ void CONFIG_WriteSetup(void)
SCRIPT_PutNumber(ud.config.scripthandle, "Screen Setup", "WindowPosY", windowy, false, false);
#endif
Bsprintf(tempbuf,"%d,%d,%d",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
SCRIPT_PutString(ud.config.scripthandle, "Misc", "CrosshairColor",tempbuf);
if (crosshair_colors.r != default_crosshair_colors.r || crosshair_colors.g != default_crosshair_colors.g
|| crosshair_colors.b != default_crosshair_colors.b)
{
Bsprintf(tempbuf,"%d,%d,%d",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
SCRIPT_PutString(ud.config.scripthandle, "Misc", "CrosshairColor",tempbuf);
}
// JBF 20031211
for (dummy=0;dummy<NUMGAMEFUNCTIONS;dummy++)

View file

@ -1329,7 +1329,7 @@ static int osdcmd_crosshaircolor(const osdfuncparm_t *parm)
if (parm->numparms != 3)
{
OSD_Printf("\"crosshaircolor\" : r:%d g:%d b:%d\n",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
OSD_Printf("crosshaircolor: r:%d g:%d b:%d\n",crosshair_colors.r,crosshair_colors.g,crosshair_colors.b);
return OSDCMD_SHOWHELP;
}
r = atol(parm->parms[0]);