home · contact · privacy
plomrogue
11 years agoImproved formatting and include comments in windows.c
Christian Heller [Wed, 21 Aug 2013 19:54:14 +0000 (21:54 +0200)]
Improved formatting and include comments in windows.c

11 years agoImproved formatting and comments for yx_uint16.h
Christian Heller [Wed, 21 Aug 2013 19:33:35 +0000 (21:33 +0200)]
Improved formatting and comments for yx_uint16.h

11 years agoPass pointers to yx_uint16 structs to yx_uint16_cmp() instead of structs themselves.
Christian Heller [Wed, 21 Aug 2013 19:17:15 +0000 (21:17 +0200)]
Pass pointers to yx_uint16 structs to yx_uint16_cmp() instead of structs themselves.

11 years agoUse uint8_t for yx_uin16_cmp() return code.
Christian Heller [Wed, 21 Aug 2013 19:13:04 +0000 (21:13 +0200)]
Use uint8_t for yx_uin16_cmp() return code.

11 years agoRe-styled code.
Christian Heller [Wed, 21 Aug 2013 19:10:05 +0000 (21:10 +0200)]
Re-styled code.

11 years agoIn read_map_objects() and write_map_objects(), return error code right on error,...
Christian Heller [Wed, 21 Aug 2013 18:41:07 +0000 (20:41 +0200)]
In read_map_objects() and write_map_objects(), return error code right on error, not only after collecting further possible errors.

11 years agoMinor corrections in error message phrasings and comments.
Christian Heller [Wed, 21 Aug 2013 18:29:32 +0000 (20:29 +0200)]
Minor corrections in error message phrasings and comments.

11 years agoAt game start, check for recordfile_tmp or savegame_tmp to detected aborted/corrupted...
Christian Heller [Wed, 21 Aug 2013 18:27:18 +0000 (20:27 +0200)]
At game start, check for recordfile_tmp or savegame_tmp to detected aborted/corrupted record / game saving processes.

11 years agomain() handles file IO now safely, exits on errors; also analogously re-phrased error...
Christian Heller [Wed, 21 Aug 2013 18:15:01 +0000 (20:15 +0200)]
main() handles file IO now safely, exits on errors; also analogously re-phrased error messages in save_game(), turn_over().

11 years agoApplied new safer file saving method to record file in turn_over(), too, added error...
Christian Heller [Wed, 21 Aug 2013 17:32:56 +0000 (19:32 +0200)]
Applied new safer file saving method to record file in turn_over(), too, added error messages there and also corrected error messages in save_game().

11 years agoSmall refactoring for greater readability.
Christian Heller [Wed, 21 Aug 2013 17:23:34 +0000 (19:23 +0200)]
Small refactoring for greater readability.

11 years agoRe-factoring of save_game() for greater readability.
Christian Heller [Wed, 21 Aug 2013 17:22:39 +0000 (19:22 +0200)]
Re-factoring of save_game() for greater readability.

11 years agoCosmetic reformatting of save_game() code.
Christian Heller [Wed, 21 Aug 2013 03:52:44 +0000 (05:52 +0200)]
Cosmetic reformatting of save_game() code.

11 years agoSave game to a temp file first before overwriting old savefile.
Christian Heller [Wed, 21 Aug 2013 03:32:04 +0000 (05:32 +0200)]
Save game to a temp file first before overwriting old savefile.

11 years agoIn save_game(), error-exit on earliest of writing errors, not after cascade of them.
Christian Heller [Wed, 21 Aug 2013 03:14:20 +0000 (05:14 +0200)]
In save_game(), error-exit on earliest of writing errors, not after cascade of them.

11 years agoMore expressive error messages in save_game().
Christian Heller [Wed, 21 Aug 2013 03:03:26 +0000 (05:03 +0200)]
More expressive error messages in save_game().

11 years agoIn save_game(), check for error return code of fclose(), too.
Christian Heller [Wed, 21 Aug 2013 02:54:47 +0000 (04:54 +0200)]
In save_game(), check for error return code of fclose(), too.

11 years agoAdded newline to end of error messages.
Christian Heller [Wed, 21 Aug 2013 02:52:45 +0000 (04:52 +0200)]
Added newline to end of error messages.

11 years agoMinor refactoring of save_game().
Christian Heller [Wed, 21 Aug 2013 02:50:48 +0000 (04:50 +0200)]
Minor refactoring of save_game().

11 years agosave_game() now checks for the error return code of opening the savefile.
Christian Heller [Wed, 21 Aug 2013 02:50:07 +0000 (04:50 +0200)]
save_game() now checks for the error return code of opening the savefile.

11 years agoMinor comment clarification.
Christian Heller [Tue, 20 Aug 2013 18:24:30 +0000 (20:24 +0200)]
Minor comment clarification.

11 years agoCorrected unused bit number check.
Christian Heller [Tue, 20 Aug 2013 14:41:39 +0000 (16:41 +0200)]
Corrected unused bit number check.

11 years agoDecided against externing read/write_uintX_bigendian(); therefore dropped redundant...
Christian Heller [Tue, 20 Aug 2013 14:17:23 +0000 (16:17 +0200)]
Decided against externing read/write_uintX_bigendian(); therefore dropped redundant bit number check therein.

11 years agoUse "uint8_t" instead of "unsigned char".
Christian Heller [Thu, 15 Aug 2013 15:32:36 +0000 (17:32 +0200)]
Use "uint8_t" instead of "unsigned char".

11 years agoMore comments on readwrite library; some refactoring ideas included.
Christian Heller [Thu, 15 Aug 2013 15:21:07 +0000 (17:21 +0200)]
More comments on readwrite library; some refactoring ideas included.

11 years agoAdded explanatory comments to readwrite library.
Christian Heller [Thu, 15 Aug 2013 11:43:53 +0000 (13:43 +0200)]
Added explanatory comments to readwrite library.

11 years agoRenamed all "fail" variables to "err", to reduce line lengths.
Christian Heller [Thu, 15 Aug 2013 11:36:58 +0000 (13:36 +0200)]
Renamed all "fail" variables to "err", to reduce line lengths.

11 years agoBuilt error checking into file reading/writing routines and calls of them.
Christian Heller [Wed, 14 Aug 2013 10:58:48 +0000 (12:58 +0200)]
Built error checking into file reading/writing routines and calls of them.

11 years agoMove checking for error results into exit_err(), out of conditionals in the remaining...
Christian Heller [Wed, 14 Aug 2013 09:35:12 +0000 (11:35 +0200)]
Move checking for error results into exit_err(), out of conditionals in the remaining code.

11 years agoReference map only through world struct.
Christian Heller [Wed, 14 Aug 2013 01:11:36 +0000 (03:11 +0200)]
Reference map only through world struct.

11 years agoMade game exiting and cleaning up more flexible. Provided so far unused exit-on-error...
Christian Heller [Wed, 14 Aug 2013 01:04:53 +0000 (03:04 +0200)]
Made game exiting and cleaning up more flexible. Provided so far unused exit-on-error function.

11 years agoCorrected indentation / line lengths.
Christian Heller [Tue, 6 Aug 2013 04:16:37 +0000 (06:16 +0200)]
Corrected indentation / line lengths.

11 years agoSimplified interface of (build/read/write)_map_objects() by making them decide by...
Christian Heller [Tue, 6 Aug 2013 04:09:00 +0000 (06:09 +0200)]
Simplified interface of (build/read/write)_map_objects() by making them decide by themselves how to type-specifically handle each map object.

11 years agoinit_win() now takes arguments for the designated window height and width.
Christian Heller [Tue, 6 Aug 2013 02:45:23 +0000 (04:45 +0200)]
init_win() now takes arguments for the designated window height and width.

11 years agoMoved pseudo-random generator into its own library, simplified its interface and...
Christian Heller [Tue, 6 Aug 2013 02:19:06 +0000 (04:19 +0200)]
Moved pseudo-random generator into its own library, simplified its interface and internals.

11 years agoImproved TODO.
Christian Heller [Tue, 30 Jul 2013 03:10:40 +0000 (05:10 +0200)]
Improved TODO.

11 years agoMade the hierarchy between terminal screen, virtual screen, "pad", its frame etc...
Christian Heller [Tue, 30 Jul 2013 03:01:01 +0000 (05:01 +0200)]
Made the hierarchy between terminal screen, virtual screen, "pad", its frame etc. more logic by renamings and comments.

11 years agoCopied to draw_win_borderlines() and draw_wins_borderlines() from draw_wins_bordercor...
Christian Heller [Tue, 30 Jul 2013 02:20:47 +0000 (04:20 +0200)]
Copied to draw_win_borderlines() and draw_wins_borderlines() from draw_wins_bordercorners() the mechanism of passing the virtual screen pad directly instead of infering it via wgetparent().

11 years agoRadically simplified drawing of window border corners.
Christian Heller [Tue, 30 Jul 2013 02:15:07 +0000 (04:15 +0200)]
Radically simplified drawing of window border corners.

11 years agoRenamed borders to borderlines in function names where appropriate in windows.c
Christian Heller [Tue, 30 Jul 2013 01:55:33 +0000 (03:55 +0200)]
Renamed borders to borderlines in function names where appropriate in windows.c

11 years agoPut static functions at start instead of end of draw_wins library.
Christian Heller [Tue, 30 Jul 2013 01:51:12 +0000 (03:51 +0200)]
Put static functions at start instead of end of draw_wins library.

11 years agoMinor formatting change.
Christian Heller [Tue, 30 Jul 2013 01:49:37 +0000 (03:49 +0200)]
Minor formatting change.

11 years agoIn shift_active_win() slightly improved formatting and solved a "why is this needed...
Christian Heller [Tue, 30 Jul 2013 01:44:48 +0000 (03:44 +0200)]
In shift_active_win() slightly improved formatting and solved a "why is this needed" comment question.

11 years agoSlightly re-structured and re-styled a for-loop for greater understandability.
Christian Heller [Tue, 30 Jul 2013 01:38:35 +0000 (03:38 +0200)]
Slightly re-structured and re-styled a for-loop for greater understandability.

11 years agoFixed bug whereby the log would describe bumps of monsters of different types as...
Christian Heller [Tue, 30 Jul 2013 01:26:57 +0000 (03:26 +0200)]
Fixed bug whereby the log would describe bumps of monsters of different types as those of the same type.

11 years agoUse bit shifting instead of magic number in rrand().
Christian Heller [Tue, 30 Jul 2013 01:16:29 +0000 (03:16 +0200)]
Use bit shifting instead of magic number in rrand().

11 years agoMade unnecessarily extern functions in draw_wins module static.
Christian Heller [Tue, 30 Jul 2013 01:10:53 +0000 (03:10 +0200)]
Made unnecessarily extern functions in draw_wins module static.

11 years agoMinor formatting improvements.
Christian Heller [Tue, 30 Jul 2013 01:05:45 +0000 (03:05 +0200)]
Minor formatting improvements.

11 years agoFinished applying new code formatting and documentation rules on main module.
Christian Heller [Tue, 30 Jul 2013 01:00:51 +0000 (03:00 +0200)]
Finished applying new code formatting and documentation rules on main module.

11 years agoApplied new formatting and documentation rules to misc module.
Christian Heller [Mon, 29 Jul 2013 19:08:45 +0000 (21:08 +0200)]
Applied new formatting and documentation rules to misc module.

11 years agoApplied new formatting and documentation requirements to keybindings library.
Christian Heller [Mon, 29 Jul 2013 18:09:12 +0000 (20:09 +0200)]
Applied new formatting and documentation requirements to keybindings library.

11 years agoRemoved false descriptions and added TODOs to draw_wins library documentation.
Christian Heller [Mon, 29 Jul 2013 17:35:38 +0000 (19:35 +0200)]
Removed false descriptions and added TODOs to draw_wins library documentation.

11 years agoMinor formatting change.
Christian Heller [Mon, 29 Jul 2013 01:10:07 +0000 (03:10 +0200)]
Minor formatting change.

11 years agoAdded file new comment to draw_wins.c
Christian Heller [Mon, 29 Jul 2013 01:01:21 +0000 (03:01 +0200)]
Added file new comment to draw_wins.c

11 years agoApplied new indentation rule to draw_map_objects().
Christian Heller [Mon, 29 Jul 2013 01:00:43 +0000 (03:00 +0200)]
Applied new indentation rule to draw_map_objects().

11 years agoApplied new formatting and documentation rules to draw_wins library.
Christian Heller [Mon, 29 Jul 2013 00:58:56 +0000 (02:58 +0200)]
Applied new formatting and documentation rules to draw_wins library.

11 years agoCorrected README description of enemies' hitpoints.
Christian Heller [Fri, 26 Jul 2013 04:43:34 +0000 (06:43 +0200)]
Corrected README description of enemies' hitpoints.

11 years agoCorrected map generation algorithm description.
Christian Heller [Thu, 25 Jul 2013 23:01:15 +0000 (01:01 +0200)]
Corrected map generation algorithm description.

11 years agoImproved comment precision.
Christian Heller [Thu, 25 Jul 2013 22:01:45 +0000 (00:01 +0200)]
Improved comment precision.

11 years agoApplied new style and documentation requirements to map library; also some minor...
Christian Heller [Thu, 25 Jul 2013 21:58:48 +0000 (23:58 +0200)]
Applied new style and documentation requirements to map library; also some minor code fixes.

11 years agoMinor stylistic consistency correction.
Christian Heller [Thu, 25 Jul 2013 20:36:19 +0000 (22:36 +0200)]
Minor stylistic consistency correction.

11 years agoEnforced new indentation rules.
Christian Heller [Thu, 25 Jul 2013 20:33:47 +0000 (22:33 +0200)]
Enforced new indentation rules.

11 years agoEnforced three empty lines between functions / large meaningful blocks.
Christian Heller [Thu, 25 Jul 2013 20:29:55 +0000 (22:29 +0200)]
Enforced three empty lines between functions / large meaningful blocks.

11 years agoEnforced width limit on a comment.
Christian Heller [Thu, 25 Jul 2013 20:27:44 +0000 (22:27 +0200)]
Enforced width limit on a comment.

11 years agoApplied new style and documentation rules to the "windows" library, also performing...
Christian Heller [Thu, 25 Jul 2013 20:19:49 +0000 (22:19 +0200)]
Applied new style and documentation rules to the "windows" library, also performing some extremly minor code fixing / re-structuring on the way.

11 years agoMore documentation and re-styling of code.
Christian Heller [Tue, 23 Jul 2013 03:37:21 +0000 (05:37 +0200)]
More documentation and re-styling of code.

11 years agoMore documentation and re-styling of code according to new rules.
Christian Heller [Tue, 23 Jul 2013 03:04:27 +0000 (05:04 +0200)]
More documentation and re-styling of code according to new rules.

11 years agoMore code re-styling and documentation.
Christian Heller [Mon, 22 Jul 2013 14:00:53 +0000 (16:00 +0200)]
More code re-styling and documentation.

11 years agoMinor code-stylistic adjustment.
Christian Heller [Sun, 21 Jul 2013 04:02:46 +0000 (06:02 +0200)]
Minor code-stylistic adjustment.

11 years agoRemoved unneeded AND operation.
Christian Heller [Sun, 21 Jul 2013 04:00:32 +0000 (06:00 +0200)]
Removed unneeded AND operation.

11 years agoMinor stylistic alignment adjustment.
Christian Heller [Sun, 21 Jul 2013 03:57:29 +0000 (05:57 +0200)]
Minor stylistic alignment adjustment.

11 years agoUse bit-shifting instead of bizarre arithmetics on UCHAR_MAX for readwrite library...
Christian Heller [Sun, 21 Jul 2013 03:54:42 +0000 (05:54 +0200)]
Use bit-shifting instead of bizarre arithmetics on UCHAR_MAX for readwrite library. Also apply new code style idea.

11 years agoForced new documentation style on readwrite library.
Christian Heller [Sun, 21 Jul 2013 01:42:49 +0000 (03:42 +0200)]
Forced new documentation style on readwrite library.

11 years agoMoved game exiting into its own function.
Christian Heller [Sat, 20 Jul 2013 03:54:50 +0000 (05:54 +0200)]
Moved game exiting into its own function.

11 years agoUse standard-conformant exit.
Christian Heller [Sat, 20 Jul 2013 03:43:33 +0000 (05:43 +0200)]
Use standard-conformant exit.

11 years agoUse enum instead of define for directions in yx_uint16 library.
Christian Heller [Sat, 20 Jul 2013 03:20:57 +0000 (05:20 +0200)]
Use enum instead of define for directions in yx_uint16 library.

11 years agoMore intuitive keybindings.
Christian Heller [Fri, 19 Jul 2013 23:48:30 +0000 (01:48 +0200)]
More intuitive keybindings.

11 years agoReplaced dummy function by just passing NULL and checking for it.
Christian Heller [Fri, 19 Jul 2013 23:39:05 +0000 (01:39 +0200)]
Replaced dummy function by just passing NULL and checking for it.

11 years agoMoved initialization of map object definitions from defs file into map_objects library.
Christian Heller [Fri, 19 Jul 2013 23:35:14 +0000 (01:35 +0200)]
Moved initialization of map object definitions from defs file into map_objects library.

11 years agoRead monster / item definitions from file "defs". File-reading repeats some code...
Christian Heller [Fri, 19 Jul 2013 23:21:56 +0000 (01:21 +0200)]
Read monster / item definitions from file "defs". File-reading repeats some code from keybindings.c/init_keybindings() so refactored that into misc.c/textfile_sizes.c.

11 years agoHad forgotten to actually add the new library.
Christian Heller [Thu, 18 Jul 2013 02:12:29 +0000 (04:12 +0200)]
Had forgotten to actually add the new library.

11 years agoEmptied map_objects library of stuff that fits better elsewhere, like a new map_objec...
Christian Heller [Thu, 18 Jul 2013 02:11:42 +0000 (04:11 +0200)]
Emptied map_objects library of stuff that fits better elsewhere, like a new map_object_actions library.

11 years agoUpdated README to reflect recent changes.
Christian Heller [Thu, 18 Jul 2013 01:46:06 +0000 (03:46 +0200)]
Updated README to reflect recent changes.

11 years agoSupport different kinds of monsters and items defined in map object definition struct...
Christian Heller [Thu, 18 Jul 2013 01:44:23 +0000 (03:44 +0200)]
Support different kinds of monsters and items defined in map object definition structs. To support this, large parts of the map object system were rewritten.

11 years agoRenamed include guard constants to better reflect the respective library names.
Christian Heller [Wed, 10 Jul 2013 22:57:45 +0000 (00:57 +0200)]
Renamed include guard constants to better reflect the respective library names.

11 years agoRenamed "objects_on_map" library to "map_objects".
Christian Heller [Wed, 10 Jul 2013 22:56:32 +0000 (00:56 +0200)]
Renamed "objects_on_map" library to "map_objects".

11 years agoAdded some externs.
Christian Heller [Wed, 10 Jul 2013 22:46:58 +0000 (00:46 +0200)]
Added some externs.

11 years agoSplit roguelike.(c|h) into main.(c|h) and misc.(c|h).
Christian Heller [Wed, 10 Jul 2013 22:44:02 +0000 (00:44 +0200)]
Split roguelike.(c|h) into main.(c|h) and misc.(c|h).

11 years agoActually save player's hitpoints to savefile (instead of, bug, resetting them on...
Christian Heller [Wed, 10 Jul 2013 22:24:06 +0000 (00:24 +0200)]
Actually save player's hitpoints to savefile (instead of, bug, resetting them on each game load).

11 years agoAddendum to previous commit: Added files mentioned but forgotten.
Christian Heller [Wed, 10 Jul 2013 22:18:17 +0000 (00:18 +0200)]
Addendum to previous commit: Added files mentioned but forgotten.

11 years agoMoved map-specific functions into map.h / map.c library.
Christian Heller [Wed, 10 Jul 2013 22:17:39 +0000 (00:17 +0200)]
Moved map-specific functions into map.h / map.c library.

11 years agoMade draw_info_win() use new center_offset () for scrolling.
Christian Heller [Wed, 10 Jul 2013 11:41:42 +0000 (13:41 +0200)]
Made draw_info_win() use new center_offset () for scrolling.

11 years agoFixed map centering bug, refactored center offseting.
Christian Heller [Wed, 10 Jul 2013 11:32:06 +0000 (13:32 +0200)]
Fixed map centering bug, refactored center offseting.

11 years agoAdded command to focus map on player.
Christian Heller [Wed, 10 Jul 2013 03:09:01 +0000 (05:09 +0200)]
Added command to focus map on player.

11 years agoMap scrolling is only possible within map size now.
Christian Heller [Wed, 10 Jul 2013 02:32:41 +0000 (04:32 +0200)]
Map scrolling is only possible within map size now.

11 years agoAdded hitpoints and death for player.
Christian Heller [Wed, 10 Jul 2013 02:16:43 +0000 (04:16 +0200)]
Added hitpoints and death for player.

11 years agoSome minor refactoring.
Christian Heller [Tue, 9 Jul 2013 02:57:58 +0000 (04:57 +0200)]
Some minor refactoring.

11 years agoMoved building/reading/writing of map objects into obejcts_on_map library. Fixed...
Christian Heller [Tue, 9 Jul 2013 02:32:53 +0000 (04:32 +0200)]
Moved building/reading/writing of map objects into obejcts_on_map library. Fixed a bug whereby non-existence of an object type would not be properly marked by a zero value to the world.[object] element.

11 years agoImproved map generation algorithm.
Christian Heller [Tue, 9 Jul 2013 00:39:02 +0000 (02:39 +0200)]
Improved map generation algorithm.

11 years agoRestructured chained objects on map via new ChainMapObject struct, allowing for great...
Christian Heller [Thu, 4 Jul 2013 23:26:55 +0000 (01:26 +0200)]
Restructured chained objects on map via new ChainMapObject struct, allowing for great refactoring of / duplication elimination on lots of code.