summaryrefslogtreecommitdiff
path: root/src/cmd4.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-02 22:30:59 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-02 22:30:59 +0200
commit944538173379ce2a055b6020cd7f76123dcbebb0 (patch)
tree2f15469a443966c79eedc79e3bd6ebb282fe9c79 /src/cmd4.c
parent6eb6d9b8aa702f333d480158265cc0c3a469a0c9 (diff)
Cleanup: Remove SUPPORT_GAMMA -- should be handled by OS.
Diffstat (limited to 'src/cmd4.c')
-rw-r--r--src/cmd4.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/cmd4.c b/src/cmd4.c
index fdce00cd..c4440428 100644
--- a/src/cmd4.c
+++ b/src/cmd4.c
@@ -2586,9 +2586,6 @@ void do_cmd_colors(void)
prt("(1) Load a user pref file", 4, 5);
prt("(2) Dump colors", 5, 5);
prt("(3) Modify colors", 6, 5);
-# ifdef SUPPORT_GAMMA
- prt("(4) Gamma correction", 7, 5);
-# endif /* SUPPORT_GAMMA */
/* Prompt */
prt("Command: ", 8, 0);
@@ -2757,73 +2754,6 @@ void do_cmd_colors(void)
}
}
-# ifdef SUPPORT_GAMMA
-
- /* Gamma correction */
- else if (i == '4')
- {
- int gamma;
-
- /* Prompt */
- prt("Command: Gamma correction", 8, 0);
-
- /* gamma_val isn't set - assume 1.0 */
- if (gamma_val == 0) gamma = 10;
-
- /* It's set - convert to usual notation (times 10) */
- else gamma = 2560 / gamma_val;
-
- /* Hack -- query until done */
- while (1)
- {
- /* Clear */
- clear_from(10);
-
- /* Exhibit the normal colors */
- for (i = 0; i < 16; i++)
- {
- /* Exhibit all colors */
- Term_putstr(i*4, 22, -1, i, format("%3d", i));
- }
-
- /* Describe the gamma */
- Term_putstr(5, 10, -1, TERM_WHITE,
- format("Gamma = %d.%d", gamma / 10, gamma % 10));
-
- /* Prompt */
- Term_putstr(0, 12, -1, TERM_WHITE, "Command (g/G): ");
-
- /* Get a command */
- i = inkey();
-
- /* All done */
- if (i == ESCAPE) break;
-
- /* Analyze */
- if (i == 'g') gamma = (byte)(gamma + 1);
- else if (i == 'G') gamma = (byte)(gamma - 1);
- else continue;
-
- /* Force limits ([1.0, 2.5]) */
- if (gamma < 10) gamma = 10;
- if (gamma > 25) gamma = 25;
-
- /* Hack - 1.0 means no correction */
- if (gamma == 10) gamma_val = 0;
-
- /* otherwise, calculate gamma_val */
- else gamma_val = 2560 / gamma;
-
- /* Hack -- react to changes */
- Term_xtra(TERM_XTRA_REACT, 0);
-
- /* Hack -- redraw */
- Term_redraw();
- }
- }
-
-# endif /* SUPPORT_GAMMA */
-
/* Unknown option */
else
{