misc bits: options, also win32 follow-up from <Someone>

(from <Someone>):
I guess that this:
      mcam += iflags.wc_scroll_amount;
should be his:
      mcam += iflags.wc_scroll_amount - 1;
In words: If scroll amount is 1, the behaviour should be as it was
before the option existed, which means: no addition to mcam.
This commit is contained in:
nethack.allison
2002-08-24 15:33:00 +00:00
parent d4cdca6c86
commit 706f95ca7d
3 changed files with 5 additions and 4 deletions
+1
View File
@@ -156,6 +156,7 @@ Some questions the Sphynx asks just *don't* have any answers.
Sometimes "mu" is the answer. Sometimes "mu" is the answer.
Sorry, no fortune this time. Better luck next cookie! Sorry, no fortune this time. Better luck next cookie!
Spare your scrolls of make-edible until it's really necessary! Spare your scrolls of make-edible until it's really necessary!
Stormbringer doesn't steal souls. People steal souls.
Suddenly, the dungeon will collapse... Suddenly, the dungeon will collapse...
Taming a mail daemon may cause a system security violation. Taming a mail daemon may cause a system security violation.
The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk. The crowd was so tough, the Stooges won't play the Dungeon anymore, nyuk nyuk.
+3 -3
View File
@@ -1,4 +1,4 @@
/* SCCS Id: @(#)options.c 3.4 2002/07/27 */ /* SCCS Id: @(#)options.c 3.4 2002/08/24 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -2520,7 +2520,7 @@ boolean setinitial,setfromfile;
} }
} }
retval = TRUE; retval = TRUE;
} if (!strcmp("runmode", optname)) { } else if (!strcmp("runmode", optname)) {
const char *mode_name; const char *mode_name;
menu_item *mode_pick = (menu_item *)0; menu_item *mode_pick = (menu_item *)0;
tmpwin = create_nhwindow(NHW_MENU); tmpwin = create_nhwindow(NHW_MENU);
@@ -2540,7 +2540,7 @@ boolean setinitial,setfromfile;
retval = TRUE; retval = TRUE;
} }
#ifdef TTY_GRAPHICS #ifdef TTY_GRAPHICS
else if (!strcmp("msg_window", optname)) { else if (!strcmp("msg_window", optname)) {
/* by Christian W. Cooper */ /* by Christian W. Cooper */
menu_item *window_pick = (menu_item *)0; menu_item *window_pick = (menu_item *)0;
tmpwin = create_nhwindow(NHW_MENU); tmpwin = create_nhwindow(NHW_MENU);
+1 -1
View File
@@ -420,7 +420,7 @@ void onMSNHCommand(HWND hWnd, WPARAM wParam, LPARAM lParam)
( msg_data->y<(data->yPos+mcam) || ( msg_data->y<(data->yPos+mcam) ||
msg_data->y>(data->yPos+data->yPageSize-mcam) ); msg_data->y>(data->yPos+data->yPageSize-mcam) );
mcam += iflags.wc_scroll_amount; mcam += iflags.wc_scroll_amount - 1;
/* get page size and center horizontally on x-position */ /* get page size and center horizontally on x-position */
if( scroll_x ) { if( scroll_x ) {
if( data->xPageSize<=2*mcam ) { if( data->xPageSize<=2*mcam ) {