One of the beta testers asked if the win32 scrolling

offset could be configured.  This allows it to be
set from the config file using:
	win32_map_cliparound_margin.
This commit is contained in:
nethack.allison
2002-01-27 04:36:39 +00:00
parent 35edad47ab
commit 359957ddbc
5 changed files with 37 additions and 12 deletions
+9 -1
View File
@@ -61,6 +61,7 @@ int APIENTRY WinMain(HINSTANCE hInstance,
_nethack_app.mapDisplayMode = NHMAP_VIEW_TILES;
_nethack_app.winStatusAlign = NHWND_ALIGN_BOTTOM;
_nethack_app.winMessageAlign = NHWND_ALIGN_TOP;
_nethack_app.mapCliparoundMargin = DEF_CLIPAROUND_MARGIN;
// init controls
ZeroMemory(&InitCtrls, sizeof(InitCtrls));
@@ -190,6 +191,13 @@ int set_win32_option( const char * name, const char * val)
}
}
return 0;
} else if( _stricmp(name, "win32_map_cliparound_margin")==0 ) {
int tmp = atoi(val);
/* Alex, this range should be revisited and groundtruthed */
if( tmp >= DEF_CLIPAROUND_MARGIN && tmp < COLNO/2) {
GetNHApp()->mapCliparoundMargin = tmp;
return 1;
}
}
return 0;
}
}