Build 3212
SVN-
General
build.lua: provide simplistic "readdefs()", use in foreachmap.lua.
Show details
So that symbolic tile names can be used when searching maps.
-
General
Remove many redundant (int16_t) casts and one now incorrect one.
Show details
The redundant ones are in code like this: s->cstat = (int16_t)32768; Because the value is eventually converted to the type of "s->cstat", any casts to integral types having at least as many bits are no-ops, signedness being irrelevant due to (probably any two's complement arch targeting compiler's) bit-pattern preserving semantics of these conversions. The now incorrect one is: if (lotag == (int16_t) 65535), "int32_t lotag" being read from a wall or sprite struct directly earlier. Now, with these members being unsigned, and (int16_t)65535 equalling -1, the check always fails. The correction fixes normal switches having such a lotag ending the level immediately. In short: integer casts before assignments are unnecessary, those in reads highly relevant!
-
General
Correct arithmetic comparisons of lo/hitags in actors.c.
Show details
Rewriting them in the obvious way, i.e. by casting the expression to int16_t first. (That is, this commit is the reverse of r3174, but with casts applied.) This fixes at least one regression: a FIREEXT with a hitag of 0 should not be linked with same- (that is, zero-) tagged SEENINEs or OOZFILTERs. Mind the corner cases!