The story: Duke3D 1.5 source had "short frags[MAXPLAYERS][MAXPLAYERS]" and
"clearbufbyte(&frags[0][0],(MAXPLAYERS*MAXPLAYERS)<<1,0L);". In r1625,
g_player[].frags[MAXPLAYERS] was changed from an array of int32_t to one of
uint8_t, but the clearing code
("clearbufbyte(&g_player[i].frags[0],MAXPLAYERS<<1,0L);") stayed. In r2201, I
rewrote clearfrags() under the assumption that it really is supposed to clear
stuff beyond .frags[].
The moral:
1. Write clean code.
2. Use sizeof.
3. Write clean code!
git-svn-id: https://svn.eduke32.com/eduke32@2878 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the code rather more readable in some places. Unlike the two
preceding commits, this one is actually purely textual replacement.
git-svn-id: https://svn.eduke32.com/eduke32@2877 1a8010ca-5511-0410-912e-c29ae57300e0
Functions affected are G_Move* in actors.c and A_Shoot in player.c.
Here, the p variable had function scope, now it's redeclared in shorter
blocks. I'm still relatively sure that no observable behavior was changed,
though not as sure as in part 1. Also, some dead assignments and the like
are eliminated.
git-svn-id: https://svn.eduke32.com/eduke32@2876 1a8010ca-5511-0410-912e-c29ae57300e0
The p variable (sometimes named differently) has short scope in all cases,
so I'm almost sure that the replacements amount to an identity transformation.
git-svn-id: https://svn.eduke32.com/eduke32@2875 1a8010ca-5511-0410-912e-c29ae57300e0
... against invalid weapon indices and arguments accessed from arrays/structs.
git-svn-id: https://svn.eduke32.com/eduke32@2873 1a8010ca-5511-0410-912e-c29ae57300e0
Also, rewrite the mapastats iterator and the LIZTROOP hitscan timing
in terms of that.
git-svn-id: https://svn.eduke32.com/eduke32@2858 1a8010ca-5511-0410-912e-c29ae57300e0
Also fix error handling path in our_require(), i.e. when loadstring fails.
git-svn-id: https://svn.eduke32.com/eduke32@2857 1a8010ca-5511-0410-912e-c29ae57300e0
The build script now has two more presets: helix and installtools
(which was previously attempted after the build; untested). Also,
- when detecting git, run commands such that the SVN repo isn't accessed
- package kextract, kgroup and arttool into tools/ in the zip
- try to exit on failure in some places, though that doesn't seem to work
git-svn-id: https://svn.eduke32.com/eduke32@2852 1a8010ca-5511-0410-912e-c29ae57300e0
The idiv instruction also signals an FPE when the resulting *signed* quotient
overflows, so we simply use div instead.
git-svn-id: https://svn.eduke32.com/eduke32@2850 1a8010ca-5511-0410-912e-c29ae57300e0
erratum in r2844 commit message:
ydim vs. bytesperline --> xdim vs. bytesperline
git-svn-id: https://svn.eduke32.com/eduke32@2849 1a8010ca-5511-0410-912e-c29ae57300e0
This was narrowed to int8_t in r1625, breaking CON code that wanted
to lock the player for a longer time than 127 game tics.
git-svn-id: https://svn.eduke32.com/eduke32@2847 1a8010ca-5511-0410-912e-c29ae57300e0
The tiles used are BIGHOLE (1141) and VIEWBORDER (3250). Ideally we'd draw the
console background using something specially-coded instead of rotatesprite if
it's fully black anyway.
git-svn-id: https://svn.eduke32.com/eduke32@2846 1a8010ca-5511-0410-912e-c29ae57300e0
These could manifest themselves as garbage lines on the bottom and
happened because of the ydim vs. bytesperline discrepancy again.
git-svn-id: https://svn.eduke32.com/eduke32@2844 1a8010ca-5511-0410-912e-c29ae57300e0
Instructions on how I built the libs are in Windows/src/minipng.dfa.
git-svn-id: https://svn.eduke32.com/eduke32@2843 1a8010ca-5511-0410-912e-c29ae57300e0