Encountered with Scent.map. Since the SE21 are deleted after they have
been used, the search for them in the ST28 code in sector.c may come up
empty, in which case sector[-1] would be accessed.
git-svn-id: https://svn.eduke32.com/eduke32@2377 1a8010ca-5511-0410-912e-c29ae57300e0
That is, everyplace a user input is to be converted. The only remaining
instance of atoi() is now atoi(s_buildDate).
git-svn-id: https://svn.eduke32.com/eduke32@2374 1a8010ca-5511-0410-912e-c29ae57300e0
Internally, the last argument to neartag is now a pointer to a function
int32_t (*blacklist_sprite_func)(int32_t i),
which is supposed to return 1 if sprite[i] should NOT be considered for hitting.
This is now used in the hard-coded neartag() calls in sector.c, but not in any
way in CON (there's neither a C blacklist function provided, nor is there a
possibility to define one in CON). There, all sprites with picnums >=1 and <=10
(i.e. the effectors) will be blacklisted. This remedies problems where such
sprites would get in the way of switches.
Note that a whitelist approach (only consider a predefined set, namely those
picnums which will be checked afterwards) has back-compatibility implications
since people may have used e.g. lotagged window sprites to cover a switch.
Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used),
since anyone redefining effector picnums is clearly out of their mind.
git-svn-id: https://svn.eduke32.com/eduke32@2373 1a8010ca-5511-0410-912e-c29ae57300e0
I'm not getting this warning (synthesis is) but I think it's justified because
the VOC block parsing code isn't terribly validating...
git-svn-id: https://svn.eduke32.com/eduke32@2364 1a8010ca-5511-0410-912e-c29ae57300e0
The following functions have const qualifiers attached for the 'destination'
arguments: kdfwrite, dfwrite in cache1d.c and copybuf{byte,reverse,} in the
pragmas source or headers. A couple uses of the latter ones were replaced
with calls to standard library functions.
git-svn-id: https://svn.eduke32.com/eduke32@2361 1a8010ca-5511-0410-912e-c29ae57300e0
- RENDERER SETUP is now also accessible from classic, with only 2 options:
'aspect ratio' and 'ambient light level'
- remove the latter option from the VIDEO SETUP menu
- When compiled with OpenGL, the aspect ratio option cycles between 3 states:
r_usenewaspect=1 (the modern way), and r_usenewaspect=0 but r_widescreen=0/1.
In non-GL builds, there are only 2 states.
- don't display black translucent overlay in COLOR CORRECTION menu
git-svn-id: https://svn.eduke32.com/eduke32@2358 1a8010ca-5511-0410-912e-c29ae57300e0
The reason was that drawmasks(), which was where the resetting of the fake
RoR textures happened under Polymer, can be called from polymer_displayrooms()
when mirrors are present. I was assuming that drawmasks() was only ever called
after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking
was set, reset, set, reset, ... which it was not.
Now, do the resetting explicitly after every drawmasks() in the editor.
git-svn-id: https://svn.eduke32.com/eduke32@2350 1a8010ca-5511-0410-912e-c29ae57300e0
- Maintain a position relative to the start of the data. VOC doesn't
mandate an EOF marker (blocktype 0). If we go over the end, fake
that marker, so as to restart a looping sound or stop a one-shot one.
This fixes an uninitialized mem access with the corrupt SNAKRM.VOC.
- When encountering the EOF marker, don't read the 3 bytes of block size,
since they may not be there.
- Read blocksize by ORing and shifting the 3 bytes, not with *(int32_t *)...
git-svn-id: https://svn.eduke32.com/eduke32@2346 1a8010ca-5511-0410-912e-c29ae57300e0
- guard cansee() against negative sectnums (return 0 immediately), since
it's often called with the player sectnum as one argument
- in resetpspritevars(), don't inset APLAYER sprite if sectnum < 0, which
can happen if a map is started in void space accidentally (e.g. from
the editor)
- two checks before accessing sector[] with a player sectnum
git-svn-id: https://svn.eduke32.com/eduke32@2342 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes updateanimation picking up foreign (and thus potentially oob)
frame numbers at "3: c > n".
git-svn-id: https://svn.eduke32.com/eduke32@2339 1a8010ca-5511-0410-912e-c29ae57300e0
Uncomment #define DEBUG_VALGRIND_NO_SMC in duke3d.h to be able to
valgrind --smc-check=none (or the default stack-only)
with Polymost and Polymer renderers.
git-svn-id: https://svn.eduke32.com/eduke32@2337 1a8010ca-5511-0410-912e-c29ae57300e0
It was causing update issues when many tints were applied simultaneously,
like being shot and spit at by enforcers while being on rails barefeet.
Also, the GL modes were calling gltexinvalidate8() when picking up goodies
or being hurt with that change, so it needs much more thought.
git-svn-id: https://svn.eduke32.com/eduke32@2322 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes a bug in passing: 'int32_t j' was assigned to as a temporary inside
one instance of the code, but used as if it were the previous sprite index
further on. Would only happen with projectiles that "work like" both SPIT
and RPG_IMPACT.
git-svn-id: https://svn.eduke32.com/eduke32@2321 1a8010ca-5511-0410-912e-c29ae57300e0
- make PGUP/PGDN and HOME/END behave as expected across all menus
- in keyboard/mouse button mapping menu, draw function names that have been given
custom names via CON with pal 8 for easier recognition
- fix tinting of function names in mouse button mapping menu
git-svn-id: https://svn.eduke32.com/eduke32@2313 1a8010ca-5511-0410-912e-c29ae57300e0
Internally, there's a new function fade_screen_black() that implements the
fading more efficiently than calling rotatesprite for classic, and uses
tile 0 (assumed to have at least 64x32 size) in the GL modes.
The black background of the user map selector is still done with rotatesprite
and tile BLANK in every renderer.
git-svn-id: https://svn.eduke32.com/eduke32@2312 1a8010ca-5511-0410-912e-c29ae57300e0
So that the game won't exit if you write 'vidmode 4' when intending
'setrendermode 4'.
git-svn-id: https://svn.eduke32.com/eduke32@2311 1a8010ca-5511-0410-912e-c29ae57300e0
The problems still remains that rotatesprite behaves differently in classic and
OpenGL modes with clipping boundaries specified (and maybe in some other cases)
git-svn-id: https://svn.eduke32.com/eduke32@2304 1a8010ca-5511-0410-912e-c29ae57300e0
This means that when e.g. emerging from water hurt will change the
palette instantly, but because bit 16 is added to the P_SetGamePalette
call, the tinting is retained.
git-svn-id: https://svn.eduke32.com/eduke32@2303 1a8010ca-5511-0410-912e-c29ae57300e0
Of course, only when the mod/TC in question doesn't use that feature.
git-svn-id: https://svn.eduke32.com/eduke32@2301 1a8010ca-5511-0410-912e-c29ae57300e0
led out or not. Removing features that certain mods may depend on to operate correctly without throwing any kind of
error or warning at startup other than a logged message is bad.
git-svn-id: https://svn.eduke32.com/eduke32@2300 1a8010ca-5511-0410-912e-c29ae57300e0