This means that classic and the GL modes now look the same as far as e.g.
hud_bgstretch or HUD weapons are concerned.
git-svn-id: https://svn.eduke32.com/eduke32@2911 1a8010ca-5511-0410-912e-c29ae57300e0
Instead of setting and resetting the [xy]dim globals, use them as locals
in a block (shadowing the globals). Also, do some common subexpression
elimination for clarity.
git-svn-id: https://svn.eduke32.com/eduke32@2908 1a8010ca-5511-0410-912e-c29ae57300e0
When shrunk, the player position is below the floor for some weird reason.
Updatesectorz would set the sector to -1, and the view would not be drawn.
git-svn-id: https://svn.eduke32.com/eduke32@2907 1a8010ca-5511-0410-912e-c29ae57300e0
Also, change type of g_numPlayerSprites (global and mapstate) from inconsistent
uint8_t/char to int8_t.
git-svn-id: https://svn.eduke32.com/eduke32@2897 1a8010ca-5511-0410-912e-c29ae57300e0
This makes sounds like DUKE_GET (item pickup) be heard for the second player
in the splitscreen mod, too.
git-svn-id: https://svn.eduke32.com/eduke32@2890 1a8010ca-5511-0410-912e-c29ae57300e0
This includes mirrors, rooms and masks. Any value other than 0 or 1
that is returned is considered an error (reserved for future use).
git-svn-id: https://svn.eduke32.com/eduke32@2889 1a8010ca-5511-0410-912e-c29ae57300e0
Of course, it still affects the whole screen. Handles pain and lizard spit.
git-svn-id: https://svn.eduke32.com/eduke32@2886 1a8010ca-5511-0410-912e-c29ae57300e0
The sound distance is the minimum of the two. Both point sources as well
as MUSICANDSFX ambient sound is handled.
git-svn-id: https://svn.eduke32.com/eduke32@2885 1a8010ca-5511-0410-912e-c29ae57300e0
The two instances in S_PlaySound3D() and S_Update() were slightly
different as far as sequencing is concerned. However, I think making
it the same has only benefits and may fix some popping sounds when
starting to play a sound and updating it with a different distance
value on the second buffer fill.
git-svn-id: https://svn.eduke32.com/eduke32@2884 1a8010ca-5511-0410-912e-c29ae57300e0
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
If input is cleared before, it can become impossible to cancel the video
when decoding and displaying a frame takes longer than a frame.
git-svn-id: https://svn.eduke32.com/eduke32@2833 1a8010ca-5511-0410-912e-c29ae57300e0
The library was built with GCC 4.6.1 and configured like
./configure --disable-vp8-encoder --disable-multithread --disable-spatial-resampling
On the aforementioned AMD system, this reduces the mean time for decoding a frame
from 18.2 to 15.4 ms, so IMO it's worth the somewhat hefty addition of 430 Kb.
git-svn-id: https://svn.eduke32.com/eduke32@2831 1a8010ca-5511-0410-912e-c29ae57300e0
On an AMD Phenom II X4 system with generic memory modules, this brings down
the mean time for this conversion from 16.5 to 10.5 ms.
(GCC 4.6.1, optimized build)
git-svn-id: https://svn.eduke32.com/eduke32@2830 1a8010ca-5511-0410-912e-c29ae57300e0
This changes a constant inside the panning calculation from 256 to 255 (making
e.g. panning 255 and 0 the same in the "San Andreas fault" sign in E1L5) and
uses the correct reference wall for the "do panning correction?" conditional.
Now, the problematic walls should look the same as in Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@2822 1a8010ca-5511-0410-912e-c29ae57300e0
This makes the corrections conditional on where they appear in (under-, over-,
white or mask wall).
git-svn-id: https://svn.eduke32.com/eduke32@2821 1a8010ca-5511-0410-912e-c29ae57300e0
I'm willing to make this one concession to correctness in the name of backward-
compatibility. I think that one reason why this has never cause a crash is that
tiles in BUILD are allocated in Ken's big allocache buffer, so oob accesses were
dampened by that (though they hit uninitialized data).
git-svn-id: https://svn.eduke32.com/eduke32@2819 1a8010ca-5511-0410-912e-c29ae57300e0
The event is run after drawing the scene, but before the overlays. To
make a screenshot from a script, set DOSCRSHOT to non-zero. It will then
be scheduled to run once after the drawing but before the above-mentioned
event. The screenshots will be called mcapXXXX.{png,tga}.
git-svn-id: https://svn.eduke32.com/eduke32@2818 1a8010ca-5511-0410-912e-c29ae57300e0
This would only hit when polymost_printext256 erred out (mem alloc failure,
glGenTextures failure), i.e. "almost never".
Also, tweak a bound check in polymost_printext256.
git-svn-id: https://svn.eduke32.com/eduke32@2817 1a8010ca-5511-0410-912e-c29ae57300e0
The editor colors are the ones listed on page 9 of the Mapster32 built-in help.
git-svn-id: https://svn.eduke32.com/eduke32@2816 1a8010ca-5511-0410-912e-c29ae57300e0
The map iterator now has init/finish capability, making it possible to
write scripts that aggregate data over multiple map files. One such example
calculates some statistics, the other loads art metadata and looks for
red walls with non-pow2 ysize tiles.
git-svn-id: https://svn.eduke32.com/eduke32@2814 1a8010ca-5511-0410-912e-c29ae57300e0