johanberntsson / PunyInform

A fast and compact library for writing text adventure games for the Z-machine running on 8-bit computers as well as other platforms.
MIT License
176 stars 17 forks source link

Additional newline after tall inventory output #111

Closed c64-adventures closed 2 years ago

c64-adventures commented 2 years ago

Just updated to the latest build, and It looks like an extra newline is being added after the player's inventory list, when displayed using tall inventory_style. Everything still looks fine when using the wide style.

fredrikr commented 2 years ago

It looks correct to me. Image shows testbench.inf.

Can you show an example of how it goes wrong?

As we have reworked PrintContents a lot, it's not at all unlikely there are issues regarding inventory.

image

c64-adventures commented 2 years ago

That makes sense now I've gone back to look at my code.

I've got a LibraryMessages routine that's overriding the default MSG_INVENTORY_DEFAULT behavior. In this recent commit messages.h has been updated so that the newline is only displayed if inventory_stage is wide, whereas before it would show in both cases.

I've now reflected that change in my LibraryMessages code and it's displaying fine again in tall mode.

Thanks!

fredrikr commented 2 years ago

It's true that there is a difference, which affects authors who have replaced the inventory message. We should note this in the release notes.