hendricks266
3598e79dc7
Fix OOB access in clipmove
...
git-svn-id: https://svn.eduke32.com/eduke32@7685 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:14:35 +02:00
hendricks266
849b095b26
Audiolib: Fix use-after-frees in Vorbis, FLAC, XA decoding
...
git-svn-id: https://svn.eduke32.com/eduke32@7684 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:14:33 +02:00
hendricks266
19a5e86a35
Audiolib: Clean up samples handling
...
git-svn-id: https://svn.eduke32.com/eduke32@7683 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:14:30 +02:00
pogokeen
f92ec7bb89
polymost.cpp: fix issue where GL_ALPHA_TEST could be enabled in certain instances when executing polymost_drawrooms() and better handle when we are drawing without a texture in polymost_drawpoly()
...
git-svn-id: https://svn.eduke32.com/eduke32@7682 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
2019-09-20 10:14:28 +02:00
pogokeen
9b621c0ef2
Add GL debugging event annotations for Polymost functions
...
git-svn-id: https://svn.eduke32.com/eduke32@7681 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/include/polymost.h
# source/build/src/mdsprite.cpp
# source/build/src/polymost.cpp
2019-09-20 10:14:12 +02:00
hendricks266
5cd7f18dab
!
...
git-svn-id: https://svn.eduke32.com/eduke32@7680 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:37 +02:00
hendricks266
d2609f07a9
Restore file loading
...
git-svn-id: https://svn.eduke32.com/eduke32@7679 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:34 +02:00
hendricks266
dd5f1338c5
Revert "Improve file loading"
...
This reverts commit bfc6b7589e
.
git-svn-id: https://svn.eduke32.com/eduke32@7678 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:31 +02:00
hendricks266
a9e0c9afe1
Allow CON-specified actions to override hardcoded tsprpicnum behavior of PLAYERONWATER, CAMERA1, and RAT
...
git-svn-id: https://svn.eduke32.com/eduke32@7677 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:29 +02:00
terminx
a4b30b5b90
Move S_Update() out of game loop and into Net_GetPackets()
...
This improves, but doesn't fix, the issue with sound popping when the player angle changes.
git-svn-id: https://svn.eduke32.com/eduke32@7676 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:05:26 +02:00
terminx
91b9a605fa
"horizon offset should not be affected by projection hack"
...
git-svn-id: https://svn.eduke32.com/eduke32@7675 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
2019-09-20 10:05:22 +02:00
terminx
9df490434d
Gamevar system maintenance
...
This removes some of the error handling for gamevar reads and writes and trades it for simpler code and a small-but-benchmarkable performance increase.
git-svn-id: https://svn.eduke32.com/eduke32@7674 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:04:27 +02:00
terminx
b0a4b6a1ee
Convert loops using unsigned integers as iterators to use regular signed ints instead
...
https://kristerw.blogspot.com/2016/02/how-undefined-signed-overflow-enables.html
Doing this as cleanly as possible involved demoting several function parameters concerning object sizes and counts from size_t to int--I'm fine with this change as the functions in question are not actually capable of handling input with sizes larger than what can be stored in a signed 32-bit integer, making the use of size_t here misleading at best.
git-svn-id: https://svn.eduke32.com/eduke32@7673 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
# source/build/src/texcache.cpp
# source/build/src/tilepacker.cpp
2019-09-20 10:04:24 +02:00
terminx
79752ee168
Move call to S_Update() to after G_MoveLoop()
...
git-svn-id: https://svn.eduke32.com/eduke32@7672 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:53 +02:00
terminx
6678ce3fd1
Enable a couple of additional useful -W flags for newer versions of GCC
...
git-svn-id: https://svn.eduke32.com/eduke32@7671 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:51 +02:00
terminx
605d88bb41
Better stupid names for stupid macros in stupid function
...
git-svn-id: https://svn.eduke32.com/eduke32@7670 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:48 +02:00
terminx
c3f7c26708
Sanitize A_GetFurthestAngle() return value
...
git-svn-id: https://svn.eduke32.com/eduke32@7669 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:46 +02:00
terminx
f62d6c919c
Patch from Fox to access the player's subweapon member as a bitfield
...
"Add 'bsubweapon' player structure. Same as 'subweapon', except that it writes a bit for each weapon. For example, 'ife player[].bsubweapon GROW_WEAPON 1' has the same result as 'ifand player[].subweapon 2048'."
git-svn-id: https://svn.eduke32.com/eduke32@7668 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:44 +02:00
terminx
509febe25a
Fix actor z position update bug
...
git-svn-id: https://svn.eduke32.com/eduke32@7667 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:42 +02:00
terminx
549ef41eb7
EDUKE32_STANDALONE stuff
...
git-svn-id: https://svn.eduke32.com/eduke32@7666 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:40 +02:00
terminx
90cf239650
Add GAMEVAR_RAWQ16PTR, functioning the same as GAMEVAR_INT32PTR
...
git-svn-id: https://svn.eduke32.com/eduke32@7665 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:37 +02:00
terminx
22759d8a5e
Make CLIPMASK0 and CLIPMASK1 regular defined tokens instead of read-only gamevars
...
I don't remember if there was any particular reason they were added as gamevars in the first place.
git-svn-id: https://svn.eduke32.com/eduke32@7664 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:35 +02:00
terminx
bf6730d8a3
Minor optimization to avoid read-after-write in Gv_DivVar()
...
git-svn-id: https://svn.eduke32.com/eduke32@7663 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:33 +02:00
terminx
9aa1030a09
Promote display_mirror
from char to int32_t and remove GAMEVAR_UINT8PTR handling since nothing else was using it
...
git-svn-id: https://svn.eduke32.com/eduke32@7662 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:31 +02:00
terminx
0becd69e91
Tweak EDUKE32_PRE_XALLOC thing used when DEBUGGINGAIDS is defined
...
git-svn-id: https://svn.eduke32.com/eduke32@7661 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:29 +02:00
terminx
badf4eab6d
Add EDUKE32_PREDICT_TRUE to our *alloc macros and flip the condition around so the true branch is first
...
git-svn-id: https://svn.eduke32.com/eduke32@7660 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:27 +02:00
terminx
6395909290
Add preprocessor check for __OPTIMIZE__ to EDUKE32_PREDICT_TRUE and EDUKE32_PREDICT_FALSE
...
git-svn-id: https://svn.eduke32.com/eduke32@7659 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:24 +02:00
terminx
efa3022d07
CON VM maintenance
...
git-svn-id: https://svn.eduke32.com/eduke32@7658 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:22 +02:00
terminx
7659e816fa
CON_USE_COMPUTED_GOTO eval macro micro-optimization
...
This is almost as fast as ditching the bounds check here entirely.
git-svn-id: https://svn.eduke32.com/eduke32@7657 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 10:01:19 +02:00
Christoph Oelckers
61d2e31610
- fixed another bad merge
2019-09-20 09:44:58 +02:00
terminx
5e470e8a5b
Neat Polymost y-shearing patch from Nuke.YKT
...
git-svn-id: https://svn.eduke32.com/eduke32@7656 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
2019-09-20 09:43:17 +02:00
terminx
9ba2a3b719
Fix old issue with VM_CONDITIONAL macro
...
git-svn-id: https://svn.eduke32.com/eduke32@7655 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:38:46 +02:00
terminx
e69fb3934e
Rename Gv_GetArrayCountFromFile() to Gv_GetArrayCountForAllocSize()
...
git-svn-id: https://svn.eduke32.com/eduke32@7654 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:38:43 +02:00
terminx
52dde4ef32
Rename Gv_SetVarX() to Gv_SetVar() (overloaded)
...
git-svn-id: https://svn.eduke32.com/eduke32@7653 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:38:41 +02:00
terminx
0ff1188b59
Rename Gv_GetVarX() to Gv_GetVar() (overloaded)
...
git-svn-id: https://svn.eduke32.com/eduke32@7652 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:38:38 +02:00
terminx
a1556e9da7
Fix a bunch of boolean cvars that weren't flagged as CVAR_BOOL, preventing them from working with the "toggle" console command
...
git-svn-id: https://svn.eduke32.com/eduke32@7651 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
2019-09-20 09:38:14 +02:00
Christoph Oelckers
dcc3e2b94e
- removed code duplication from last cherry-pick
2019-09-20 09:35:09 +02:00
terminx
410da8a085
Polymost shade table interpolation patch from Nuke.YKT
...
git-svn-id: https://svn.eduke32.com/eduke32@7650 1a8010ca-5511-0410-912e-c29ae57300e0
# Conflicts:
# source/build/src/polymost.cpp
2019-09-20 09:32:22 +02:00
terminx
6db4ac3b01
const correctness that I didn't have another commit to squash into
...
git-svn-id: https://svn.eduke32.com/eduke32@7648 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:27:31 +02:00
terminx
0cbb1df2d1
Rename "loopcnt" to "vm_execution_depth" and CON_DIRECT_THREADING_DISPATCH to CON_USE_COMPUTED_GOTO
...
Also removes a redundant "break" statement in builds not using CON_USE_COMPUTED_GOTO.
git-svn-id: https://svn.eduke32.com/eduke32@7647 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:27:29 +02:00
terminx
058c1a8060
Simplify the beginning of VM_Execute()
...
This also moves the loop control stuff into #ifndef CON_DIRECT_THREADING_DISPATCH blocks, since we don't actually need a loop anymore when using the computed goto stuff.
git-svn-id: https://svn.eduke32.com/eduke32@7646 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:27:26 +02:00
terminx
db8bcba93a
Minor changes similar to the VM_Execute() maintenance commit
...
No user-facing changes.
git-svn-id: https://svn.eduke32.com/eduke32@7645 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:27:24 +02:00
terminx
b854ddff41
Fix a potentially funny bug in the CON parser
...
I don't think anyone actually ran into this.
git-svn-id: https://svn.eduke32.com/eduke32@7644 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:27:21 +02:00
terminx
9ac1ce04d6
Simplify CON_FINDNEARACTOR family of functions and restore the original behavior of returning the nearest sprite instead of any sprite that satisfies the condition
...
git-svn-id: https://svn.eduke32.com/eduke32@7641 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:48 +02:00
terminx
271cdeaf5d
Fix errant "continue" found remaining in the CON_FINDNEARACTOR family of functions
...
git-svn-id: https://svn.eduke32.com/eduke32@7640 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:46 +02:00
terminx
6a458273a0
Replace a handful of accesses to sprite[vm.spriteNum] with accesses to vm.pSprite
...
It looks like these were simply missed when vm.pSprite was initially added.
git-svn-id: https://svn.eduke32.com/eduke32@7639 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:44 +02:00
terminx
d1af530b01
Add VM_ASSERT() macro for handling VM error conditions
...
This is for errors that simply check a condition (surrounded with EDUKE32_PREDICT_FALSE) and bail out with CON_ERRPRINTF() and abort_after_error(). Not everything that fits this description has been transitioned to use the new macro yet.
git-svn-id: https://svn.eduke32.com/eduke32@7638 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:41 +02:00
terminx
f8fba45117
Tweak inlined VM_OnEvent() internals, biggest change being the removal of two instances of EDUKE32_PREDICT_FALSE
...
git-svn-id: https://svn.eduke32.com/eduke32@7637 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:39 +02:00
terminx
562e6f419c
Use function overloading to clean up some of the CON event execution function names
...
git-svn-id: https://svn.eduke32.com/eduke32@7636 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:37 +02:00
terminx
078ef9b871
Optimize A_Execute() control flow
...
git-svn-id: https://svn.eduke32.com/eduke32@7635 1a8010ca-5511-0410-912e-c29ae57300e0
2019-09-20 09:21:35 +02:00