Utodev / ngPAWS

ngPAWS interactive fiction (text adventure game) authoring system. Genarates HTML/javascript games runable in any browser.
http://www.ngpaws.com
31 stars 17 forks source link

PICTURE resno ignores grf numbers #19

Closed cibersheep closed 7 years ago

cibersheep commented 7 years ago

If project is set up as:

#define grf enanomalauva.png 200
_ _
 PICTURE 200

No image will be sown

Utodev commented 7 years ago

To avoid colission between pic and grf definitions, both defining an image/picture, txtpaws adds 256 (by default) to every "#define grf", so your 200 actually becomes resource number 456. You can change the value added by calling txtpaws with MAXNUMLOCS parameter. If you really need to call a picture by number after making a definition (I assume you have a good reason for noy using "PICTURE enanomaluva.png" instead of "PICTURE 200") you will have to add 256 too.

This is somehow related with ngPAWS ancestor Superglus, and the Blorb specification required for Glulx packages, but that is a long story :-)

cibersheep commented 7 years ago

Nice! Thanks again for taking the time to explain all the bits and pieces. Let's try to remember that long story for when you have more time off.