Mercurial > hg > early-roguelike
view arogue5/mach_dep.h @ 76:ad2cb9a07aaa
arogue5: fix player's typed responses getting put at the wrong place.
Some sections of code that prompt the user for a string of input were
calling get_str() with cw (the player-visible screen containing the
map), which caused whatever the player typed to get printed starting at
cw's idea of the cursor position, which was usually the Rogue's @-sign.
This corrupted the map.
The problem has been fixed by passing msgw (the message line at the top
of the screen) to get_str(), so the player's typing appears where msgw
thinks the cursor should be, which is in the sensible place right after
the prompt. Some other get_str() invocations which used hw or stdscr
have been left unmodified.
author | John "Elwin" Edwards <elwin@sdf.org> |
---|---|
date | Sat, 08 Sep 2012 22:05:05 -0700 |
parents | d8e5c5dd9b55 |
children | dfeed24bb616 |
line wrap: on
line source
/* * machine dependicies * * Advanced Rogue * Copyright (C) 1984, 1985 Michael Morgan, Ken Dalka and AT&T * All rights reserved. * * Based on "Rogue: Exploring the Dungeons of Doom" * Copyright (C) 1980, 1981 Michael Toy, Ken Arnold and Glenn Wichman * All rights reserved. * * See the file LICENSE.TXT for full copyright and licensing information. */ /* * define that the wizard commands exist */ #undef WIZARD /*1*/ /* * define if you want to limit scores to one per class per userid */ #undef LIMITSCORE /* * where scorefile should live */ #define SCOREFILE "/var/local/games/roguelike/arogue5.scr" #define LOGFILE "/var/local/games/roguelike/arogue5.log" #define SAVEDIR "/var/local/games/roguelike/arogue5save/" /* * Variables for checking to make sure the system isn't too loaded * for people to play */ #undef MAXUSERS /*40*/ /* max number of users for this game */ #undef MAXLOAD /*40*/ /* 10 * max 15 minute load average */ #undef CHECKTIME /*15*/ /* number of minutes between load checks */ /* if not defined checks are only on startup */ #ifdef MAXLOAD #define LOADAV /* defined if rogue should provide loadav() */ #ifdef LOADAV #define NAMELIST "/unix" /* where the system namelist lives */ #endif #endif #ifdef MAXUSERS #define UCOUNT /* defined if rogue should provide ucount() */ #ifdef UCOUNT #define UTMP "/etc/utmp" /* where utmp file lives */ #endif #endif #undef AUTHOR /*212*/ /* * define the current author of the program for "special handling" */ #ifndef AUTHOR #define AUTHOR 0 /* Default to root if not specified above */ #endif