Skip to content

Releases: johanberntsson/PunyInform

v6.5

12 Apr 17:46

Choose a tag to compare

Important to note when upgrading:

  • If your code replaces the message MSG_PARSER_NOSUCHTHING with a string, you need to change the string to code instead.

New/changed functionality:

  • New message MSG_SHOUT_NOSUCHTHING ("You can't see any such thing."), printed by the Shout action, if the player types SHOUT AT x, where x isn't recognized as a nearby actor or object.
  • Message MSG_PARSER_NOSUCHTHING ("You can't see any such thing.") has changed from being a simple message (a string) to being a complex message (code). This means you can no longer use a string to replace it - it can only be replaced by a complex message.
  • Renamed library routine ResetInputAction to _ResetInputAction, as this routine is not meant to be referenced by game authors.
  • New routine IsARoutine(value) to (quickly) decide if a value can be a routine address.
  • New routine IsAString(value) to (quickly) decide if a value can be a string address.

Optimizations:

  • Started using the new routines IsARoutine and IsAString in many places in the library.
  • Optimized the UnsignedCompare routine, one of the most used routines (called by ofclass).
  • Use the same, optimized UnsignedCompare for the library and the veneer.
  • Implemented 33% faster way to call methods in RunRoutines.
  • Optimized the search for a light source in _UpdateDarkness / _LookForLightInObj (New global last_light_source holds the last used light source, if any)
  • Optimized the FastSpaces routine, used for statusline and more. As part of this change, the array _TenSpaces was renamed _SpaceTable, and extended to 20 space characters.
  • Removed a pointless variable in cheap scenery extension.

Bugfixes:

  • Printing numbers correctly when printing parsed pattern (thanks joelburton)
  • Improved the error message when trying GET ALL BUT X AND Y (too complex)
  • Fixed a bug in howto/talk_menu.inf (one topic tried to activate another topic using a topic ID, but that ID didn't exist).

v6.4.1

08 Mar 09:47

Choose a tag to compare

Important to note when upgrading:

  • Until now, parse_name routines were not called if the first input word wasn't in the dictionary (i.e. the word value was 0). Now parse_name is called in these instances. Make sure you don't have parse_name routines which accept 0 as a synonym. E.g. it could look in an array of synonyms, and the array may contain the value 0 at times, to make room for synonyms that will be put there at a certain point in the game.

Bugfixes:

  • Statusline code couldn't compile with certain combinations of constants defined.
  • If an input word wasn't recognized, _ParseNounPhrase would still check if it had the noun flag, i.e. it would look at adress 6 in the header, and accept it as a noun if bit 7 was set. One effect of this was that an unknown word in player input would be recognized as the direction "in" if routines started at or above address $8000.
  • The parse_name routine of the Directions object would look for an unrecognized word in user input in its arrays of direction words. This would match empty entries, e.g. the short form of 'in' (which doesn't exist, so it's set to 0).
  • If an input word was recognized, and it didn't have the noun flag, _ParseNounPhrase would conclude it can't be the name of an object. This was a mistake - a parse_name routine may still want to recognize the word as a synonym for the object. E.g. if the player names a cube "drop", the player should then be able to do "get drop". (example from Balances.inf, available at if-archive).
  • If an input word wasn't recognized, an object's name array would still be scanned for the word (which would then be 0).

v6.4

03 Mar 16:12

Choose a tag to compare

Important to note when upgrading:

  • Nothing

New/changed features:

  • Changed score/moves statusline to use ":" as a separator instead of "/", and for screens ~40 characters wide, print "Sc:0 Mv:0" rather than "Score: 0/0".
  • Changed score/moves statusline to print score + moves information as far to the right as possible, on narrow screens ( less than 67 characters wide, for a score+moves statusline).
  • Changed the threshold values for screen width when DrawStatusLine switches between different layouts, to adhere to a simple principle: Regardless of screen size, make sure room names up to 21 characters in length can always be printed on the statusline without score, moves, or time overwriting any part of the room name.

Bugfixes:

  • Fixed a time statusline display bug - if hour was between 1 and 9, the rightmost character in the statusline could show a character that was part of the room name.

v6.3.1

26 Dec 23:35

Choose a tag to compare

Important to note when upgrading:

  • If you replace the message MSG_PARSER_DONT_UNDERSTAND_WORD, you should take a look at this message in messages.h now, and update your definition accordingly. (If oops_unfixed is non-zero, you may not call _PrintUnknownWord, but must provide a generic message, not mentioning the word that wasn't understood. This only happens if the player has typed "oops ", so the player will know which word it's about anyway.)

New/changed functionality:

  • Message MSG_PARSER_DONT_UNDERSTAND_WORD has been altered, as part of a fix for the issue that when the player types "oops xxx" and 'xxx' is another unrecognized word, the parser would repeat that the original non-recognized word wasn't understood. (Issue #151)

Optimizations:

  • Made automatic assignment of reactive attribute faster, for games that don't use custom common properties for a lot of objects.
  • Optimized _ParseNounPhrase and _IsSentenceDivider routines a little.

Bugfixes:

  • Fixed so a full stop and 'then' always separate commands (unlike comma and 'and' which can be used to separate commands OR objects in a list). (Issue #157)
  • Fixed: Debug verb 'routines' didn't print anything in z5 when calling GamePreRoutine and GamePostRoutine.
  • Updated tests/runtests.rb to accept Frotz not always appending ".qzl" to save file names.
  • Changed format of routine names printed by debug verb 'routines' to match Inform 6 output (which is used for methods being called in z5 in PunyInform as well), e.g. from (small rock).before() to [ "small rock".before() ].

v6.3

05 Dec 10:45

Choose a tag to compare

Important to note when upgrading:

  • If you're defining OPTIONAL_EXTENDED_METAVERBS and not NO_PLACES, test that 'places' and 'objects' show the expected results and if not, define entry point routine IsARoom to fix it. The objects it can easily fail for are objects which aren't rooms, but sometimes lack a parent in the object tree. If they never get the attribute moved or visited (these are the same attribute, through aliasing), they won't be shown in either list.

New/changed functionality:

  • Extended meta-verb 'places' now lists one location per line, as this is faster, smaller, and more similar to the meta-verb 'objects'
  • Extended meta-verb 'objects' will now also list objects that have been removed from the game (i.e. have no parent), if they seem to be regular objects, not rooms.
  • Extended meta-verb 'objects' now relies on the entry point routine IsARoom (if provided) to decide whether a certain object is a room or not.
  • "GET ALL" won't try to take objects in a closed container.
  • "GET X FROM Y", where Y is a closed (transparent) container, now fires the action, unless X is "ALL", so before-routines can react. Unless a before-routine blocks the action, the action routine will block it. "GET ALL FROM Y" is still blocked by the parser, so the player doesn't get one message per item in the container. (Issue #147)

Optimizations:

  • Optimized WordAddress() and WordLength(), for z5.

v6.2

26 Nov 21:38

Choose a tag to compare

Important to note when upgrading:

  • If you have a DebugIsARoom entry point routine, change its name to IsARoom. If you support the 'places' verb (part of the extended meta-verbs), you want to define IsARoom regardless of whether the game is compiled in DEBUG mode, as this routine is also used by 'places'.

New/changed functionalty:

  • Entry point routine DebugIsARoom has changed name to IsARoom, and is used for debug verbs 'rooms' and 'goto' and for extended meta-verb 'places'.
  • Routine _RoomLike (Used by verbs 'goto', 'rooms' and 'places') now requires an object to provide the description property, to be seen as a possible room.
  • New script tests/compile_all.rb to check that all .inf files in the distribution compile without errors or warnings.

Bug fixes:

  • Verb 'places' (part of the extended meta-verbs) now performs a more thorough check to decide if an object is a room, and game author can control the process using an IsARoom entry point routine.
  • Updated howto/statusline_teleport.inf to work in z3 format as well.

v6.1.1

13 Nov 16:52

Choose a tag to compare

Important to note when upgrading:

  • Nothing

Optimizations:

  • Optimized 'goto' and 'rooms' debug verbs for speed.

Bug fixes:

  • Removed possible warning for unused local variable _return_code in _RoomLike routine in grammar.h

v6.1

12 Nov 22:10

Choose a tag to compare

Important to note when upgrading:

  • Nothing

New/changed functionality:

  • Debug verb 'rooms' now takes an optional substring to search for in room names, e.g. "rooms way" will show rooms like "Hallway Junction"
  • Changed debug verb 'goto' to perform matching exactly like 'rooms', ignoring any asterisks at start or end of string, e.g. "goto way" moves the player to the first room that has "way" anywhere in its name.
  • Added entry point for DEBUG mode only: DebugIsARoom(obj, verdict). Library will call it when the player uses debug verbs 'goto' or 'rooms', to decide if an object is a room. The verdict parameter is 0 if the library thinks it's not a room, 1 if it thinks it's a room. Return: 0 to accept the library's decision, 1 to say it's a room, 2 to say it's not a room.

Optimizations:

  • Optimized grammar for 'consult' verb.
  • Optimized MoveFloatingObjects

Bug fixes:

  • Fixed parser bug, where "e.n" could be parsed as "n.n"

v6.0.2

13 Sep 20:48

Choose a tag to compare

Important to note when upgrading:

  • Requires Inform compiler version 6.44

New/changed functionality:

  • Added Mini-Cluedo demonstration game as statusline_teleport.inf to howto folder.

Optimizations:

  • Optimized scope routines. (Issue #155)

Bug fixes:

  • Updated Testbench, Microphone object, to reflect that ##AskFor action is transformed to an order to ##Give by the parser.

v6.0.1

28 Aug 16:49

Choose a tag to compare

Important to note when upgrading:

  • Nothing

Optimizations:

  • Made WordValue routine faster.

Bug fixes:

  • Bugfix: Set scope_routine=0 in parser before performing action, or scope can get messed up
  • If the ##Restart action was performed, while a transcript was being output, the library forgot that it had an active transcript, and would print a warning if the player tried to enter a comment with '*'.
  • Fixed minor problems and cleaned up howto/talk_menu.inf