[Ohrrpgce] SVN: james/8786 the cats() array is now almost always accessed via helper functions

Ralph Versteegen teeemcee at gmail.com
Wed May 31 21:27:04 PDT 2017

On 1 June 2017 at 08:12, <subversion at hamsterrepublic.com> wrote:

> james
> 2017-05-31 13:12:35 -0700 (Wed, 31 May 2017)
> 455
> the cats() array is now almost always accessed via helper functions
> herox() heroy() herox() and herodir()
> These are byref functions, so values can be assigned to them also.
> These functions take hero caterpillar rank as an argument,
> eliminating all the many places where catx(n * 5) was accessed.
> Also added herotx() and heroty() that replace all the many times
> when the x and y return values were immediately divided / 20 to get
> hero tile x and tile y
> ---
> U   wip/game.bas
> U   wip/game.bi
> U   wip/game_udts.bi
> U   wip/moresubs.rbas
> U   wip/savegame.rbas
> U   wip/scriptcommands.bas
> U   wip/walkabouts.bas
> U   wip/yetmore2.bas

Altogether, adding that bitset was quite a big project! A lot of helpful

This would be a good use for properties actually: turn
hero{x,y,z,dir,tx,ty} into properties of herow. Then we will finally have a
real hero walkabout UDT. (And can add XYpair versions, and allow assigning
to tx/ty).

Also, the tx, ty accessors are a great idea. I feel like supporting larger
tile sizes isn't going to be such a huge project.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.motherhamster.org/pipermail/ohrrpgce-motherhamster.org/attachments/20170601/33d1cb47/attachment-0001.htm>

More information about the Ohrrpgce mailing list