Skip to content

Commit

Permalink
Added cvar "hud-patch-replacement"
Browse files Browse the repository at this point in the history
Configure the use of Patch Replacement for head-up displays (enabled
by default).
  • Loading branch information
danij-deng committed Jan 3, 2012
1 parent 385f156 commit 11a3208
Show file tree
Hide file tree
Showing 16 changed files with 31 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doomsday/plugins/jdoom/data/conhelp.txt
Expand Up @@ -665,6 +665,9 @@ desc = 1=Show deathmatch frags in HUD.
[hud-frags-all]
desc = Debug: HUD shows all frags of all players.

[hud-patch-replacement]
desc = Patch Replacement strings. 1=Enable external, 2=Enable built-in.

[hud-timer]
desc = Number of seconds before the hud auto-hides.

Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jdoom/include/d_config.h
Expand Up @@ -114,6 +114,8 @@ typedef struct jdoom_config_s {
int inludePatchReplaceMode;

byte confirmQuickGameSave;

int hudPatchReplaceMode;
byte hudShown[NUMHUDDISPLAYS]; // HUD data visibility.
byte hudKeysCombine; // One icon per color (e.g. if red key and red skull is owned only show red key).
float hudScale; // How to scale HUD data?
Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jdoom/src/d_main.c
Expand Up @@ -232,6 +232,7 @@ void D_PreInit(void)
cfg.echoMsg = true;
cfg.lookSpeed = 3;
cfg.turnSpeed = 1;

cfg.menuPatchReplaceMode = PRM_ALLOW_TEXT;
cfg.menuScale = .9f;
cfg.menuTextGlitter = .5f;
Expand All @@ -246,6 +247,7 @@ void D_PreInit(void)

cfg.inludePatchReplaceMode = PRM_ALLOW_TEXT;

cfg.hudPatchReplaceMode = PRM_ALLOW_TEXT;
cfg.hudKeysCombine = false;
cfg.hudShown[HUD_HEALTH] = true;
cfg.hudShown[HUD_ARMOR] = true;
Expand All @@ -271,6 +273,7 @@ void D_PreInit(void)
cfg.xhairColor[1] = 1;
cfg.xhairColor[2] = 1;
cfg.xhairColor[3] = 1;

cfg.filterStrength = .8f;
cfg.moveCheckZ = true;
cfg.jumpPower = 9;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom/src/st_stuff.c
Expand Up @@ -233,6 +233,7 @@ void ST_Register(void)
C_VAR_FLOAT2( "hud-color-b", &cfg.hudColor[2], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-color-a", &cfg.hudColor[3], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-icon-alpha", &cfg.hudIconAlpha, 0, 0, 1, unhideHUD )
C_VAR_INT( "hud-patch-replacement", &cfg.hudPatchReplaceMode, 0, PRM_FIRST, PRM_LAST )
C_VAR_FLOAT2( "hud-scale", &cfg.hudScale, 0, 0.1f, 1, unhideHUD )
C_VAR_FLOAT( "hud-timer", &cfg.hudTimer, 0, 0, 60 )

Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jdoom64/data/conhelp.txt
Expand Up @@ -664,6 +664,9 @@ desc = 1=Show deathmatch frags in HUD.
[hud-frags-all]
desc = Debug: HUD shows all frags of all players.

[hud-patch-replacement]
desc = Patch Replacement strings. 1=Enable external, 2=Enable built-in.

[hud-timer]
desc = Number of seconds before the hud auto-hides.

Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jdoom64/include/d_config.h
Expand Up @@ -116,6 +116,8 @@ typedef struct jdoom64_config_s {
int inludePatchReplaceMode;

byte confirmQuickGameSave;

int hudPatchReplaceMode;
byte hudShown[NUMHUDDISPLAYS]; // HUD data visibility.
float hudScale; // How to scale HUD data?
float hudColor[4];
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/src/d_main.c
Expand Up @@ -201,6 +201,7 @@ void D_PreInit(void)

cfg.inludePatchReplaceMode = PRM_ALLOW_TEXT;

cfg.hudPatchReplaceMode = PRM_ALLOW_TEXT;
cfg.hudShown[HUD_HEALTH] = true;
cfg.hudShown[HUD_ARMOR] = true;
cfg.hudShown[HUD_AMMO] = true;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jdoom64/src/st_stuff.c
Expand Up @@ -102,6 +102,7 @@ void ST_Register(void)
C_VAR_FLOAT2( "hud-color-b", &cfg.hudColor[2], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-color-a", &cfg.hudColor[3], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-icon-alpha", &cfg.hudIconAlpha, 0, 0, 1, unhideHUD )
C_VAR_INT( "hud-patch-replacement", &cfg.hudPatchReplaceMode, 0, PRM_FIRST, PRM_LAST )
C_VAR_FLOAT2( "hud-scale", &cfg.hudScale, 0, 0.1f, 1, unhideHUD )
C_VAR_FLOAT( "hud-timer", &cfg.hudTimer, 0, 0, 60 )

Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jheretic/data/conhelp.txt
Expand Up @@ -872,6 +872,9 @@ desc = Seconds before the inventory auto-hides.
[hud-frags-all]
desc = Debug: HUD shows all frags of all players.

[hud-patch-replacement]
desc = Patch Replacement strings. 1=Enable external, 2=Enable built-in.

[hud-timer]
desc = Number of seconds before the hud auto-hides.

Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jheretic/include/h_config.h
Expand Up @@ -115,6 +115,8 @@ typedef struct jheretic_config_s {
int inludePatchReplaceMode;

byte confirmQuickGameSave;

int hudPatchReplaceMode;
byte hudShown[6]; // HUD data visibility.
float hudScale; // How to scale HUD data?
float hudColor[4];
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/src/h_main.c
Expand Up @@ -203,6 +203,7 @@ void H_PreInit(void)

cfg.inludePatchReplaceMode = PRM_ALLOW_TEXT;

cfg.hudPatchReplaceMode = PRM_ALLOW_TEXT;
cfg.hudShown[HUD_AMMO] = true;
cfg.hudShown[HUD_ARMOR] = true;
cfg.hudShown[HUD_KEYS] = true;
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jheretic/src/st_stuff.c
Expand Up @@ -186,6 +186,7 @@ void ST_Register(void)
C_VAR_FLOAT2( "hud-color-b", &cfg.hudColor[2], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-color-a", &cfg.hudColor[3], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-icon-alpha", &cfg.hudIconAlpha, 0, 0, 1, unhideHUD )
C_VAR_INT( "hud-patch-replacement", &cfg.hudPatchReplaceMode, 0, PRM_FIRST, PRM_LAST )
C_VAR_FLOAT2( "hud-scale", &cfg.hudScale, 0, 0.1f, 1, unhideHUD )
C_VAR_FLOAT( "hud-timer", &cfg.hudTimer, 0, 0, 60 )

Expand Down
3 changes: 3 additions & 0 deletions doomsday/plugins/jhexen/data/conhelp.txt
Expand Up @@ -887,6 +887,9 @@ desc = Seconds before the inventory auto-hides.
[hud-frags-all]
desc = Debug: HUD shows all frags of all players.

[hud-patch-replacement]
desc = Patch Replacement strings. 1=Enable external, 2=Enable built-in.

[hud-timer]
desc = Number of seconds before the hud auto-hides.

Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jhexen/include/x_config.h
Expand Up @@ -69,6 +69,8 @@ typedef struct {
int useMLook, useJLook;
int screenBlocks;
int setBlocks;

int hudPatchReplaceMode;
byte hudShown[4]; // HUD data visibility.
float hudScale;
float hudColor[4];
Expand Down
2 changes: 2 additions & 0 deletions doomsday/plugins/jhexen/src/h2_main.c
Expand Up @@ -252,6 +252,8 @@ void X_PreInit(void)
cfg.menuTextFlashColor[2] = .5f;
cfg.menuTextFlashSpeed = 4;
cfg.menuCursorRotate = false;

cfg.hudPatchReplaceMode = PRM_ALLOW_TEXT;
cfg.hudScale = .7f;
cfg.hudColor[0] = defFontRGB[0];
cfg.hudColor[1] = defFontRGB[1];
Expand Down
1 change: 1 addition & 0 deletions doomsday/plugins/jhexen/src/st_stuff.c
Expand Up @@ -206,6 +206,7 @@ void ST_Register(void)
C_VAR_FLOAT2( "hud-color-b", &cfg.hudColor[2], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-color-a", &cfg.hudColor[3], 0, 0, 1, unhideHUD )
C_VAR_FLOAT2( "hud-icon-alpha", &cfg.hudIconAlpha, 0, 0, 1, unhideHUD )
C_VAR_INT( "hud-patch-replacement", &cfg.hudPatchReplaceMode, 0, PRM_FIRST, PRM_LAST )
C_VAR_FLOAT2( "hud-scale", &cfg.hudScale, 0, 0.1f, 1, unhideHUD )
C_VAR_FLOAT( "hud-timer", &cfg.hudTimer, 0, 0, 60 )

Expand Down

0 comments on commit 11a3208

Please sign in to comment.