Skip to content

Commit

Permalink
Changed All games: CCmd "conbg" now supports the paramaters "off" and…
Browse files Browse the repository at this point in the history
… (alias) "none" - remove the current background.
  • Loading branch information
danij committed Jan 18, 2009
1 parent 7549616 commit 3c30aa5
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 22 deletions.
19 changes: 13 additions & 6 deletions doomsday/plugins/jdoom/src/d_console.c
Expand Up @@ -78,11 +78,11 @@ DEFCC(CCmdConBackground);

// PUBLIC DATA DEFINITIONS -------------------------------------------------

materialnum_t consoleBG = 0;
float consoleZoom = 1;
material_t* consoleBG = 0;
float consoleZoom = 1;

// Console variables.
cvar_t gameCVars[] = {
cvar_t gameCVars[] = {
// Console
{"con-zoom", 0, CVT_FLOAT, &consoleZoom, 0.1f, 100.0f},

Expand Down Expand Up @@ -359,10 +359,17 @@ DEFCC(CCmdDoomFont)
*/
DEFCC(CCmdConBackground)
{
materialnum_t num;
material_t* mat;

if((num = R_MaterialCheckNumForName(argv[1], MG_FLATS)) != 0)
consoleBG = num;
if(!stricmp(argv[1], "off") || !stricmp(argv[1], "none"))
{
consoleBG = NULL;
return true;
}

if((mat = P_ToPtr(DMU_MATERIAL,
P_MaterialCheckNumForName(argv[1], MG_ANY))))
consoleBG = mat;

return true;
}
19 changes: 13 additions & 6 deletions doomsday/plugins/jdoom64/src/d_console.c
Expand Up @@ -81,11 +81,11 @@ DEFCC(CCmdConBackground);

// PUBLIC DATA DEFINITIONS -------------------------------------------------

materialnum_t consoleBG = 0;
float consoleZoom = 1;
material_t* consoleBG = NULL;
float consoleZoom = 1;

// Console variables.
cvar_t gameCVars[] = {
cvar_t gameCVars[] = {
// Console
{"con-zoom", 0, CVT_FLOAT, &consoleZoom, 0.1f, 100.0f},

Expand Down Expand Up @@ -366,10 +366,17 @@ DEFCC(CCmdDoom64Font)
*/
DEFCC(CCmdConBackground)
{
materialnum_t num;
material_t* mat;

if((num = R_MaterialCheckNumForName(argv[1], MG_FLATS)) != 0)
consoleBG = num;
if(!stricmp(argv[1], "off") || !stricmp(argv[1], "none"))
{
consoleBG = NULL;
return true;
}

if((mat = P_ToPtr(DMU_MATERIAL,
P_MaterialCheckNumForName(argv[1], MG_ANY))))
consoleBG = mat;

return true;
}
15 changes: 11 additions & 4 deletions doomsday/plugins/jheretic/src/h_console.c
Expand Up @@ -80,7 +80,7 @@ DEFCC(CCmdConBackground);

// PUBLIC DATA DEFINITIONS -------------------------------------------------

materialnum_t consoleBG = 0;
material_t* consoleBG = NULL;
float consoleZoom = 1;

// Console variables.
Expand Down Expand Up @@ -352,10 +352,17 @@ DEFCC(CCmdHereticFont)
*/
DEFCC(CCmdConBackground)
{
materialnum_t num;
material_t* mat;

if((num = R_MaterialCheckNumForName(argv[1], MG_FLATS)) != 0)
consoleBG = num;
if(!stricmp(argv[1], "off") || !stricmp(argv[1], "none"))
{
consoleBG = NULL;
return true;
}

if((mat = P_ToPtr(DMU_MATERIAL,
P_MaterialCheckNumForName(argv[1], MG_ANY))))
consoleBG = mat;

return true;
}
19 changes: 13 additions & 6 deletions doomsday/plugins/jhexen/src/hconsole.c
Expand Up @@ -86,11 +86,11 @@ DEFCC(CCmdConBackground);

// PUBLIC DATA DEFINITIONS -------------------------------------------------

materialnum_t consoleBG = 0;
float consoleZoom = 1;
material_t* consoleBG = NULL;
float consoleZoom = 1;

// Console variables.
cvar_t gameCVars[] = {
cvar_t gameCVars[] = {
// Console
{"con-zoom", 0, CVT_FLOAT, &consoleZoom, 0.1f, 100.0f},

Expand Down Expand Up @@ -339,10 +339,17 @@ DEFCC(CCmdHexenFont)
*/
DEFCC(CCmdConBackground)
{
materialnum_t num;
material_t* mat;

if((num = R_MaterialCheckNumForName(argv[1], MG_FLATS)) != 0)
consoleBG = num;
if(!stricmp(argv[1], "off") || !stricmp(argv[1], "none"))
{
consoleBG = NULL;
return true;
}

if((mat = P_ToPtr(DMU_MATERIAL,
P_MaterialCheckNumForName(argv[1], MG_ANY))))
consoleBG = mat;

return true;
}

0 comments on commit 3c30aa5

Please sign in to comment.