Fox, on 08 July 2013 - 07:24 AM, said:
Yeah, there is tilesizx[] and tilesizy[] which work like gamevars. But it seems they may be replaced by something else in some time because Lua CON doesn't handle it well.
LunaCON handles it just fine, but some operations were simply not implemented for system gamearrays prior to r3940. Now, the only thing that remains is that one can't
writearraytofile the contents of a system array, but it's unlikely to have any practical relevance.
Hendricks266, on 08 July 2013 - 08:01 AM, said:
Thinking out loud to Helix here: Would we replace these with something like gettile[tilenum].sizx? That would make life easy to add the picanm animation structures.
That would probably have been the preferred syntax from the start, but there ought to be a reason why you went the array route, no? In m32script, light access is kind of mixed with tsprite, so I guess it has something to do with requiring to duplicate/specialize a good bunch of code for a new pseudo-structure? In LunaCON, adding it would be easy, but I don't know (and don't care, except that the two should stay reasonably in sync) about C-CON.
Fox, on 08 July 2013 - 08:52 AM, said:
Tile structure members seems interesting, but I think that a series of regular commands could do the job, Like gettilesizx <tilenum> <gamevar>.
I'm very reluctant of adding new commands because they change the language by introducing a new keyword. Most programming languages, and CON is no exception, forbid keywords as identifiers, even though they're lexically valid names otherwise.
Edit: you might counter "but
gettile would be a keyword, too". Yes, but at least it would subsume multiple items, so one feels a little more at ease with adding it.