Releases: johanberntsson/PunyInform
Releases · johanberntsson/PunyInform
v5.11
Important to note when upgrading:
- Nothing
Changes in functionality:
- cheap_scenery: If you want to set the default message to be used for interactions with cheap scenery items (CS_DEFAULT_MSG), it can now be set to a routine (Until now, it could only be a string).
- talk_menu: A TM_MAYBE_ADD_LIST line can now specify a flag instead of an array to decide if the sub-array should be included.
- Documented cheap_scenery routines CSHasNoun, CSHasAdjective and CSHasWord, so users will know that they're there, and how to use them.
Bugfixes:
- Fixed that parser_all_found wasn't always reset when parsing a new command, which gave confusing error messages.
- Fixed: _InitObjects was called too late in main() in puny.h, resulting in games using PlayerTo() in Initialise not getting any floating objects in location, including the cheap scenery object.
- Fixed: Orders to NPCs should only be single objects
- Fixed: tkers submitted a pull request to improve the consult grammar rule
- Fixed bugs in cheap_scenery routines CSHasNoun, CSHasAdjective and CSHasWord, which were introduced in v4.5, but have never worked properly.
v5.10
Important to note when upgrading:
- ext_talk_menu: Procedure TMPrintLine has changed. If you redefine it in your own source, you need to make a new copy of the procedure from ext_talk_menu.h and modify it to suit your needs.
- ext_talk_menu: A relative topic reference could previously be a number between 1 and 29. From now on it can be in the range 1-20.
Changes in functionality:
- Added option in ext_talk_menu to conditionally add sub-arrays of topics. Updated howto/talk_menu.inf to use this.
- talk_menu now uses pagination of topics even in z3 format.
Bugfixes:
- Bugfix: PlayerTo(obj, 2) used to always print a long description, while it should print a short description if the game was in superbrief mode or the game was in brief mode and the player had already visited the location. Fixed now.
- Bugfix: Arrays which_object and multiple_objects in globals.h were one word too small, leading to buffer overruns when the parser handles multiple objects.
- Fixed a buffer overrun error when wrong value given to parser_two for _ParseNounPhrase
- Added a buffer overrun check when copying data into multiple_objects
- Bugfix: Parser will no longer confuse an out_to property value with a parse_name routine, if the value isn't a valid routine address. (This is mainly useful in DEBUG mode)
- Bugfix: howto/adjectives.inf had a bug which broke matching for AdjObject objects which didn't have an adj_name property.
v5.9
Important to note when upgrading:
- Nothing
Changes in functionality:
- New debug verb: "GOTO name" or "GOTO number". Name must be the exact name of a room. Number must be the number of a room.
- New debug verb: ROOMS. Shows all object in the game that appear to be rooms.
- New debug verb: FOREST. Shows all object trees in the game, i.e. all object which lack a parent, and (indented) all objects within them.
- Debug verb TREE can now also take a number as an argument, e.g. "tree 10"
- Format of output of debug verb TREE has been updated.
- Added runtime error message when buffer is overrun (can only happen when performing "GOTO name" in debug mode, and there are objects in the game with an object name longer than 80 characters.)
Bugfixes:
- Debug verb GONEAR will now stop the player from going to an object without parent.
v5.8
Important to note when upgrading:
- Nothing
Changes in functionality:
- Flags extension: A negative flag ID now performs the opposite modification or check, e.g. SetFlag(F1,-F2) sets F1 and clears F2. FlagIsClear(-F1,F2) returns true if F1 is set and F2 is clear.
- The open/closed status of a transparent container is now always printed by PrintContents.
- PrintContents will now merge open/closed status and contents, e.g. "(which is open) (which contains a ball)" becomes "(which is open and contains a ball)".
Bugfixes:
- Fixed: PrintOrRun() would read a property value before checking if the property holds an array. This would give an error in strict mode, if the property held an array.
- Fixed: An empty, closed, transparent container would get the following text in a list: "(which is closed) (which is open but empty)"
v5.7
Important to note when upgrading:
- Nothing
Changes in functionality:
- The parser can now handle a specified number of similar objects in inputs such as "take two coins", "drop 1 coin". See howto/indistinguishable.inf for an example game where it's useful.
- Added support for GPR_NOUN, GPR_HELD, GPR_MULTI* and GPR_CREATURE return values from ParseToken, see test-gprheld.inf
Optimizations:
- Made code for printing the full score shorter.
- Optimization in PrintOrRun routine (Issue #130).
Bugfixes:
- Improved responses for plurals matching the held parse token.
v5.6
Important to note when upgrading:
- The actions ##Remove, ##Transfer and ##Empty will now cause before-routines and after-routines to run with action set to ##Take. This is a bug fix, as the player could previously circumvent rules blocking a Take action. If the player needs to use any of these actions in your game, test the game to see that they still work as expected.
- action_to_be used to be set to the basic action the player caused, all through the move, even if implicit actions were fired etc. Now, action_to_be is set to -1 once it fires the action. Instead, there is a new set of variables holding the action the player caused: input_action, input_noun, input_second and input_direction. You may want to read up on these in the manual.
Changes in functionality:
- New public routines: DoorDir(door_object) and DoorTo(door_object), returning the effective values of these properties, even for simple doors.
- New globals to say what the action input by the player was: input_action, input_noun, input_second, input_direction.
- Changed so action_to_be is set to NULL (-1) before action is performed.
- New library message: MSG_EMPTY_NOT_CONTAINER, e.g. "The ball can't contain things."
- Rearranged and cleaned up parts of the manual.
- The text "(which is open)" is no longer displayed in tall inventory for permanently open, non-empty containers (e.g. a bucket). (Issue #127)
- The text "(which is empty)" in an inventory listing has been changed to "(which is open but empty)", and is now only displayed for openable containers.
- New test file for input_action.
Optimizations:
- Removed superfluous code in DropSub.
Bugfixes:
- Dropping an item in darkness now forces a scope update, so the item isn't still in scope.
- Changed TryToTakeNoun routine to fire before and after routines for Take action, unless called from TakeSub. (Issue #128)
- Changed TransferSub to add before and after stage for ##Take when applicable, and fire after stage for ##Transfer when action managed to move the noun to second.
v5.5.2
Important to note when upgrading:
- Nothing
Changes in functionality:
- runtest.rb now supports an optional compiler path argument
Optimizations:
- Saved some bytes in parser.h and puny.h.
- Removed unnecessary initialization of task_done array.
- Saved 18 bytes in messages.h (Issue #122)
Bugfixes:
- Fixed a bug where UnknownVerb wasn't called for dictionary words that didn't have the verb flag. Only non-dictionary words were called.
- Rewrote pronoun/pronouns grammar to work the same for both v3 and v5, and to work with new compiler versions.
- Made cheap scenery extension compatible with the standard library again (this was accidentally lost when making cheap scenery distinguish between singular and plural nouns).
- Stopped AfterLife from running after Quit (Issue #124).
v5.5.1
Important to note when upgrading:
- Nothing
Optimizations:
- Saved 96-144 bytes in z3 by printing verbs smarter in VerbName.
- Saved 130 bytes in parser.h
- Made scope calculation slightly faster
Bugfixes:
- The following verbs were truncated (all in z3, some also in z5+) when using the VerbName print rule: consult, discard, disrobe, noscript, objects, purchase, squeeze, superbrief, swallow, transcript, transfer, uncover, unscript, verbose, version.
v5.5
Important to note when upgrading:
- Nothing
Changes in functionality:
- The z5+ statusline routine (DrawStatusline) has been changed to print a full line of reverse spaces before printing the actual text on the statusline. This means that the statusline text flashes briefly every move (only visible on slow platforms), and it means the statusline is slightly slower (~0.10 s vs 0.09 s, on a C64). This change has been made to increase compatibility with older interpreters, as some of them don't support the get_cursor opcode, which is required for the old statusline routine. The most important interpreters that don't support it are MaxZip on classic MacOS and Infocom's Amiga-interpreter.
- There is a new constant OPTIONAL_NON_FLASHING_STATUSLINE. Define it in z5+ games if you want to use the old, non-flashing statusline routine.
Optimizations:
- The code for automatic setting of the reactive attribute is now shorter and 20% faster (total time for a full-size z3 game is typically 1.5 s)
- Finding floating objects at game start is faster and shorter
- Optimized the z3 versions of _CopyInputArray and _CopyParseArray routines in parser.
Bugfixes:
- The Flags extension would define the symbol TM_NOT_PUNY if the extension was used without the PunyInform library. This was the wrong name, and wasn't used for anything, so it's been removed.
v5.4
Important to note when upgrading:
- Nothing
Changes in functionality:
- Made talk_menu adapt better to narrow screens for z5 by providing alternate, shorter, customizable messages to end conversation and to show next page of topics.
Optimizations:
- Made talk menu not include message to show next page of topics when built for z3.
Bugfixes:
- Added DisallowTakeAnimate support for GET ALL.
- Ruby program to run test suite adapts better to environment