------------------------------------------------------------------------ r3212 | helixhorned | 2012-11-18 11:01:39 -0800 (Sun, 18 Nov 2012) | 3 lines build.lua: provide simplistic "readdefs()", use in foreachmap.lua. So that symbolic tile names can be used when searching maps. ------------------------------------------------------------------------ r3211 | helixhorned | 2012-11-18 11:01:34 -0800 (Sun, 18 Nov 2012) | 16 lines Remove many redundant (int16_t) casts and one now incorrect one. 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! ------------------------------------------------------------------------ r3210 | helixhorned | 2012-11-18 11:01:29 -0800 (Sun, 18 Nov 2012) | 8 lines Correct arithmetic comparisons of lo/hitags in actors.c. 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! ------------------------------------------------------------------------