EDuke32 Changelog Archivio non ufficiale

Build 3212

18 novembre 2012 · 3 commit di 1 autore · SVN

Build per mese 318 build

  1. gen

  2. feb

  3. mar

  4. apr

  5. mag

  6. giu

  7. lug

  8. ago

  9. set

  10. ott

  11. nov

  12. dic

File di log originale · 20121118-3212.txt
------------------------------------------------------------------------
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!
------------------------------------------------------------------------

build.lua: provide simplistic "readdefs()", use in foreachmap.lua.

Philipp Kutin (Helixhorned) 18 nov 2012, 11:01 UTC−8 r3212

So that symbolic tile names can be used when searching maps.

FixEngine

Remove many redundant (int16_t) casts and one now incorrect one.

Philipp Kutin (Helixhorned) 18 nov 2012, 11:01 UTC−8 r3211

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!

Fix

Correct arithmetic comparisons of lo/hitags in actors.c.

Philipp Kutin (Helixhorned) 18 nov 2012, 11:01 UTC−8 r3210

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!