1
0
mirror of https://git.zap.org.au/git/trader.git synced 2024-12-04 14:46:45 -05:00
Commit Graph

16 Commits

Author SHA1 Message Date
John Zaitseff
961e989bd7 Replace the WCENTER(x) macro with WCENTER; refactor newtxwin() to suit 2011-07-23 10:16:03 +10:00
John Zaitseff
fc60a9fef1 Rework the handling of character renditions
Rather than querying use_color each and every time a rendition is used,
do it once in init_screen(), assigning the renditions to global
variables.
2011-07-23 09:47:13 +10:00
John Zaitseff
65a9dacbfc Change the "--no-encrypt" command line option to "--dont-encrypt"
Some versions of getopt_long() show ALL options if an ambiguous
abbreviation was supplied (such as "--no"), and we don't really want
players to discover this option by accident, do we? :-)
2011-07-22 12:20:58 +10:00
John Zaitseff
9ef1181c05 Revert a previous change: we know how large is the window we opened! 2011-07-22 10:08:43 +10:00
John Zaitseff
78cac96e4a Change handling of setlocale(LC_NUMERIC) in load_game() and save_game()
Changing just the LC_NUMERIC part of the locale DOES work, if you read
the manual page carefully!  In particular, TWO calls need to be made, the
first with parameter NULL to get the current locale.  In addition, the
result MUST be copied to a new string, as it may be (and is!) overwritten
by the next call to setlocale().
2011-07-21 22:44:45 +10:00
John Zaitseff
71486357c1 Bug fix: restore locale settings correctly
For some reason, changing the locale to "C" for LC_NUMERIC, then
restoring just that part of the locale to the old user-supplied
one does not work.  Simply reinstating the whole locale using
setlocale(LC_ALL, ""), however, DOES work, so do that.
2011-07-21 22:22:50 +10:00
John Zaitseff
c5500e1bb3 Document and clean up fileio.c: functions load_game() and save_game() 2011-07-21 22:18:14 +10:00
John Zaitseff
9f02f8e77f Rename character renditions (attributes) to something more regular 2011-07-20 17:01:25 +10:00
John Zaitseff
46c7a55203 Remove LINE_OFFSET and COL_OFFSET; rename COL_CENTER to WCENTER 2011-07-20 15:53:53 +10:00
John Zaitseff
c6007be5aa Move background setting and box drawing into newtxwin()
Setting the background and drawing a box is almost always the first thing
done after window creation.
2011-07-20 11:41:46 +10:00
John Zaitseff
e56247b1b4 Bug fix: company share prices CAN be zero, if company does not exist 2011-07-19 23:31:20 +10:00
John Zaitseff
ee37b4d210 Add the --no-encrypt command-line option 2011-07-19 23:24:17 +10:00
John Zaitseff
ccbe7405f8 Replace "out of memory" errors with calls to err_exit_nomem() 2011-07-19 19:16:34 +10:00
John Zaitseff
ef83258e2b Make file saving and loading locale-independent for numbers 2011-07-19 14:47:18 +10:00
John Zaitseff
e2dbe549b2 Implement the "Save game" player choice; start coding process_move() 2011-07-16 13:34:13 +10:00
John Zaitseff
dd40b94301 Move game_load() and game_save() functions to their own source file 2011-07-16 09:58:53 +10:00