Commit Graph

4845 Commits

Author SHA1 Message Date
helixhorned cb606b0a11 In Lunatic build, make krand() a proper function again, called from Lua/FFI.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4759 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:24 +00:00
helixhorned b65ae1b741 a-c.c: Compile vlineasm4nlogy() only if CLASSIC_NONPOW2_YSIZE_WALLS is #defined.
Also make three file-scope variables static.

git-svn-id: https://svn.eduke32.com/eduke32@4758 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:23 +00:00
helixhorned e919dee00f engine.c: in wallscan(), fix oob of umost[] and dmost[] when x2 == xdim-1.
Analogously treat maskwallscan() and transmaskwallscan(), although I could
not get the respective accesses to be oob, too.

git-svn-id: https://svn.eduke32.com/eduke32@4757 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:21 +00:00
helixhorned 7275152b86 Makefile: do '(very)clean' with a plain "rm -f some/obj/*.o".
Notes:
- In the 'clean' target, the "core*" arg to 'rm' was removed as I find it too
  unspecific. (Someone could have an unrelated file with that prefix lying
  around.)
- The targets 'clean' and 'veryclean' now echo the commands they are about
  to execute.

Also, in Makefile.common, resurrect sanitized Clang builds if DEBUGANYWAY=2
is passed (previously, that was triggered with RELEASE=0 DEBUGANYWAY=1).

git-svn-id: https://svn.eduke32.com/eduke32@4756 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:19 +00:00
helixhorned 9907e79a0b Fix C build and build on Linux/SDL2.
- for the first point: 'struct glattribs sdlayer_gl_attributes[]' was defined
  at file scope, but 'glmultisample > 0' is not a compile-time constant.
- for the second point: r4749 changed the meaning of some conditional
  compilation (supposedly, unintentionally). I'm reverting it to pre-r4749
  but keeping the rewritten style. It's concerned with mouse thumb buttons.

git-svn-id: https://svn.eduke32.com/eduke32@4755 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:16 +00:00
terminx c77c69d488 Fix MinGW build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4754 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:44:06 +00:00
terminx 52236d79a2 Fixups to sync WIP SDL refactor up with r4738. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4753 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:34:46 +00:00
terminx d73f7f113d Minor cleanups, mostly just formatting. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4752 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:34:29 +00:00
terminx 1bbb077fca Add missing "break" to M_RunMenuInput(), revert android gltexapplyprops() menu fuckery. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4751 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:34:11 +00:00
terminx 4abc47af9e Fix _FORTIFY_SOURCE redefinition warning on Ubuntu's patched versions of GCC. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4750 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:33:57 +00:00
terminx 2330c61519 WIP refactor of SDL interface. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4749 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:33:47 +00:00
terminx cf339e8105 Clean up the sound remapping stuff... remove the bits relating to sounds we haven't actually used anywhere in the source directly. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4748 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:33:15 +00:00
terminx 99e21ffa94 Part 1 of attempting to adhere to C standard section 7.1.3. It turns out it's illegal to use identifiers that begin with _ or have __ anywhere in them. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4747 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:32:56 +00:00
terminx 0e606700d6 Get rid of -Wdeclaration-after-statement as we're only targeting C99 and C++ now. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4746 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:29:38 +00:00
terminx bf3c0de73a Mainly misc cleanups (and a fix for the C++ build), but there are a few important changes in here.
VM_OnEvent() has become VM_OnEvent(), VM_OnEventWithReturn(), VM_OnEventWithDist(), and VM_OnEventWithBoth() (the latter of which is only ever used once...). Of course, this required every call to VM_OnEvent() be changed.

memberlabel_t and vmstate_t have been changed to use the regular "int" type versus explicitly specifying int32_t as they did previously. The rationale for this change is simply that it looks cleaner, and I think we should move toward just using "int" in most cases where there's no particular reason to specify an explicit data type.

Also changes CON_KILLIT to just "return" instead of "continue". DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4745 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:29:25 +00:00
terminx 9b91aac48c Inline krand() when not using KRANDDEBUG. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4744 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:52 +00:00
terminx 272ac9abe6 Add FORCE_INLINE to compat.h and apply it to a couple of things we'd strongly prefer be inlined. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4743 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:34 +00:00
terminx 953c244003 Add my _clang-format file to the repository. These options are pretty close to what most of our code already looks like, the primary difference being that it enforces spaces between operators and operands. I was initially opposed to the spaces, but I would be lying if I said they didn't increase legibility of much of our code, in addition to making it a lot easier to identify the specific intent in cases where we have a lot of expressions nested within one another. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4742 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:21 +00:00
terminx 3e7f96c32d Fix up conveyor belts. This fixes breakage of the movement in general, as well as corrects the general behavior of the effect so that a player on a moving surface is moved at a constant rate, regardless of whether the player crouches, is shrunk, etc. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4741 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:28:12 +00:00
terminx 2068d993a7 Fix Mapster32 fullscreen video modes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4740 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 12:27:57 +00:00
hendricks266 a0e4692d59 Fix minor menu bugs. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4739 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-17 08:14:33 +00:00
hendricks266 164d9ccb41 Set up mouse cursor display in menus, with idle timeout fully implemented. No functionality yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4738 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-17 07:39:12 +00:00
helixhorned e5923955ef Fix C++ build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4737 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:14 +00:00
helixhorned b3f55d014e In release builds, #define Xaligned_alloc as xaligned_malloc.
Otherwise, the out-of-memory handler is not called in case of failure.

git-svn-id: https://svn.eduke32.com/eduke32@4736 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:13 +00:00
helixhorned 205b8a7677 C-CON: fix 'readgamearray' and 'resizearray' on Windows.
We must not use Xrealloc(), since gamearrays are now allocated with
Xaligned_alloc().
NOTE: I did not check all potential problematic cases, only those to get
LNGA3 up and running.

git-svn-id: https://svn.eduke32.com/eduke32@4735 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:12 +00:00
helixhorned 108a4022fa C-CON: fix 'readgamearray' on 64-bit platforms.
Also prettify P_DisplaySpit().

git-svn-id: https://svn.eduke32.com/eduke32@4734 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:12 +00:00
helixhorned 44373a7698 a-c.c: don't USE_VECTOR_EXT with Clang, since it doesn't compile here.
git-svn-id: https://svn.eduke32.com/eduke32@4733 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:11 +00:00
helixhorned 0cc9f05b8b LunaCON: player[].loogcnt, userdef[].color, minor fixes.
git-svn-id: https://svn.eduke32.com/eduke32@4732 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:10 +00:00
helixhorned 76d60511bc LunaCON: fix tilesizx[] and tilesizy[] system gamearrays.
git-svn-id: https://svn.eduke32.com/eduke32@4731 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 22:07:07 +00:00
hendricks266 1f9c37517a Replace DOS box-drawing characters in the ASM with sane ASCII. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4730 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-07 07:53:28 +00:00
helixhorned 142b5e2d2f Lunatic: some minor doc tweaks. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4729 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:58:33 +00:00
helixhorned f1f90439cf Fix voxels in classic -- my error, confusing divscale() and mulscale() in r4576.
Optimizations are left to the reader :P. I would prefer to look for ways of
giving the compilers hints about loops to unroll instead of having to read
the resulting mess of manual unrolling, though.

git-svn-id: https://svn.eduke32.com/eduke32@4728 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:52 +00:00
helixhorned e278842ce4 gameexec.c: In VM_OnEvent_, don't form address like &sprite[-1].
The practical rationale: Clang-sanitize catches this, so this is bad.
The real rationale: I *think* it is undefined behavior to even form such a
pointer in C99. However, I would be hard pressed to provide a nice formal
argument in terms of the Standard wording right now. It looks like
6.5.3.2#4 is to blame.

git-svn-id: https://svn.eduke32.com/eduke32@4727 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:51 +00:00
helixhorned 737af0387e engine.c: prevent an oob read in drawsprite_classic() w/ floor-aligned sprites.
git-svn-id: https://svn.eduke32.com/eduke32@4726 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:50 +00:00
helixhorned 232e479380 Fix oob write with stepping 'up' in the OSD history.
git-svn-id: https://svn.eduke32.com/eduke32@4725 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:49 +00:00
helixhorned e8553b5398 baselayer.c: fix an oob write to ylookup[] intoduced in r4695.
On Linux, it started manifesting itself since r4719 as crashes whose
backtraces pointed to malloc() and were not helpful. Valgrind finally
uncovered this.

git-svn-id: https://svn.eduke32.com/eduke32@4724 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-06 23:43:47 +00:00
terminx 502f5dac64 Useless change I forgot. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4723 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:44:27 +00:00
terminx 764f77d1cd Sometimes I wonder why MSVC neglects to provide useful warnings. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4722 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:38:57 +00:00
terminx 4186c89aed Minor tweaks to VM_OnEvent_(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4721 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:36:53 +00:00
terminx 239d419d53 Remove references to nonexistent enet_mmulti.h from Visual Studio project. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4720 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:36:41 +00:00
terminx 9c001e6e2e Fix a handful of crash bugs I caused with the 32-bit ASM version of the classic renderer. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4719 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:36:28 +00:00
terminx 3c8034609f Fix a crash I caused with MSVC in OSD_SetLogFile(). Apparently, the behavior of setvbuf() when passed a NULL ptr for a buffer is actually left up to the implementation regarding what it does with the size parameter... DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4718 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:36:05 +00:00
terminx fca06dc31c Clean up classic renderer header (a.h) a bit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4717 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:50 +00:00
terminx e516fb0c8a A couple of additional compat.h formatting changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4716 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:36 +00:00
terminx 2badda6ec4 clang-format a couple of pragma headers. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4715 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:22 +00:00
terminx e677923165 LUT for slope recip calculations in classic. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4714 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:35:06 +00:00
terminx 999f789438 Fix a couple of Makefile errors Helixhorned noticed. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4713 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:34:49 +00:00
helixhorned f24ccdecc0 menus.c: prevent using a null pointer as arg to "%s" format for sprintf().
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4712 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-01 18:01:28 +00:00
helixhorned ce6176757b Add forgotten events_defs.h, oops. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4711 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-31 21:09:26 +00:00
helixhorned 96541f3521 Lunatic: fix building and startup up to tilesizx[] failure. DONT_BUILD.
- Needed to rip out enum GameEvent_t into own header file to prevent what
  would be a circular #include otherwise
- Added some forgotten #ifdef LUNATIC
- updated structure and function declarations on the Lua FFI side

git-svn-id: https://svn.eduke32.com/eduke32@4710 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-30 21:44:22 +00:00
helixhorned ae63745eb3 C-CON: fix possible crash when a CON error is raised due to access of invalid sprite.
For example, in
    CON_ERRPRINTF("invalid target sprite (%d) %d %d\n", iActor, vm.g_i, TrackerCast(vm.g_sp->picnum));
vm.g_i can be -1 and vm.g_sp can be NULL then. (Not anymore.)

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4709 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-30 21:44:21 +00:00
helixhorned 8605285f7f compat.h: pedantic whitespace formatting. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4708 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-30 04:59:23 +00:00
terminx 7f232bcbd1 Alter weapon switching to cycle through GROW_WEAPON when using next/previous weapon keys. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4707 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:08:03 +00:00
terminx 633cb8764b Default map zoom to something a bit more useful on Android. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4706 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:47 +00:00
terminx 9c1a32c790 CPLUSPLUS mode build fix. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4705 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:35 +00:00
terminx 0dcca1f305 CPLUSPLUS mode by default in Makefile.common, C99 otherwise. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4704 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:21 +00:00
terminx ce210a9fd7 Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4703 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:07:11 +00:00
terminx 43a759ec07 Try out __restrict in the classic renderer. #define'd for easy removal in case it causes problems or is useless.
git-svn-id: https://svn.eduke32.com/eduke32@4702 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:06:43 +00:00
terminx 9601554320 Fix MSVC warning in Polymer
git-svn-id: https://svn.eduke32.com/eduke32@4701 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:06:20 +00:00
terminx 91e2556ad2 Inline yax_getbunches with old map format. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4700 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:06:05 +00:00
terminx 183b34f48e More EDUKE32_PREDICT_FALSE, mostly in OSD_Printf(OSD_ERROR...) cases
git-svn-id: https://svn.eduke32.com/eduke32@4699 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:05:46 +00:00
terminx 6f5726e015 Aligned gamevar/gamearray allocation
git-svn-id: https://svn.eduke32.com/eduke32@4698 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:05:29 +00:00
terminx 384aec522a Fix a couple of clang warnings. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4697 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:05:15 +00:00
terminx eed56532a8 Unify spritesx/spritesy/spritez into a single vec3_t spritesxyz. It still has a stupid name like "spritesxyz" because I wanted references to it to remain easy to find in case of problems.
git-svn-id: https://svn.eduke32.com/eduke32@4696 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:04:43 +00:00
terminx 021d1241eb Get rid of all the static arrays with sizes based on MAXXDIM and MAXYDIM
git-svn-id: https://svn.eduke32.com/eduke32@4695 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:04:28 +00:00
terminx 80b8e08eb7 Remove -DNO_GCC_BUILTINS, set _FORTIFY_SOURCE to 0.
git-svn-id: https://svn.eduke32.com/eduke32@4694 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:04:03 +00:00
terminx ec83998c89 Android updates from Emile. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4693 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:03:50 +00:00
terminx ca3dc4d629 Minor additional pragma cleanup
git-svn-id: https://svn.eduke32.com/eduke32@4692 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:03:29 +00:00
terminx 59278b5398 Add missing "inline" to const TrackedType()
git-svn-id: https://svn.eduke32.com/eduke32@4691 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:03:06 +00:00
terminx aa7e3e0c25 Fix a couple warnings, and something I fucked up after reading a loop wrong. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4690 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-29 17:02:50 +00:00
hendricks266 3d43f1c346 Fix the menu animations so that they are what I actually intended. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4689 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-28 20:46:14 +00:00
hendricks266 5bbb4afd76 Menu transition animations. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4688 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-27 10:14:50 +00:00
hendricks266 5dd1abd647 Two files forgotten in the previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4687 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-27 07:24:37 +00:00
hendricks266 1ed4df36f1 Update the menu code so that everything drawn to the screen is relative to an origin point, which for now remains zero.
The three things using windowx/y hackery to crop tiles (user map menu background, color correction panels, automatic scrolling indicators) have been rewritten not to, so that the origin point would work properly with them. All three are slightly different now.

The changes are more extensive than you might predict, because I had to modify every rotatesprite/*text call to add its coordinates (shifted left by 16 if they weren't already) to the origin point.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4686 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-27 07:09:41 +00:00
hendricks266 b4ef2d43e8 Improve fine-grained GCC and clang version detection, fixing recently introduced build issues. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4685 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 10:17:35 +00:00
hendricks266 eb8645b6ea Update Makefile.common to work with devkitPPC r27. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4684 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 10:17:15 +00:00
hendricks266 0f62db298c Remove Wii-specific ASM for scale(). Libdivide is likely faster; tests on a real Wii pending. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4683 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 10:17:04 +00:00
hendricks266 5241070ab3 Fix a few lingering issues with recent menu changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4682 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 10:16:49 +00:00
terminx e087ffabfc Re-apply part of r4647. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4681 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:36:50 +00:00
terminx 8934226bb2 Another 5000 lines of pain and tears. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4680 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:36:34 +00:00
terminx 1c68e84e5a Hi-res security viewscreens
git-svn-id: https://svn.eduke32.com/eduke32@4679 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:35:21 +00:00
terminx de1d236366 Minor OSD_Exec() tweaks that got lost when chopping up a larger set of changes
git-svn-id: https://svn.eduke32.com/eduke32@4678 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:35:05 +00:00
terminx 1e2fdef0e2 Forgot this in a previous commit, just removes a function prototype I moved elsewhere
git-svn-id: https://svn.eduke32.com/eduke32@4677 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:34:50 +00:00
terminx 57fd527308 Fix in-game sound menu (F4)
git-svn-id: https://svn.eduke32.com/eduke32@4676 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:34:38 +00:00
terminx 0e78bf1eb5 Minor engine optimizations, worth a couple fps
git-svn-id: https://svn.eduke32.com/eduke32@4675 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:34:25 +00:00
terminx ea929c7e43 Fix warning in dxtfilter
git-svn-id: https://svn.eduke32.com/eduke32@4674 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:34:08 +00:00
terminx 62f13fad76 Rename VM_OnEvent to VM_OnEvent_ and add move the checks for whether the event is actually defined or not to a wrapper declared static inline
git-svn-id: https://svn.eduke32.com/eduke32@4673 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:33:53 +00:00
terminx f15a25a144 Adjust default security camera refresh times
git-svn-id: https://svn.eduke32.com/eduke32@4672 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:33:38 +00:00
terminx 9ca0e4ccc4 vec2f_t drawpoly()
git-svn-id: https://svn.eduke32.com/eduke32@4671 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:33:26 +00:00
terminx 0393b0b015 kplib warning fix. I admit to not testing this, because fuck .gif files.
git-svn-id: https://svn.eduke32.com/eduke32@4670 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:33:11 +00:00
terminx ecb11010ef Fix warnings in texcache
git-svn-id: https://svn.eduke32.com/eduke32@4669 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:57 +00:00
terminx 088808eb3e Mapster32 build fix
git-svn-id: https://svn.eduke32.com/eduke32@4668 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:42 +00:00
terminx c8ea7baf72 set_globalpos(), updates both integer (globalposx/y/z) and float (fglobalposx/y/z) representations of the current camera view position. Storing the float representation pre-converted saves us from the delay incurred on ARM when converting an integer and transferring it to the FPU, though this delay is mostly negated already by using the hardfp ABI.
git-svn-id: https://svn.eduke32.com/eduke32@4667 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:26 +00:00
terminx 5897c844d2 Minor texcache cleanup. Nukes the hilarious MAXTILES<<1 sized array of pointers in the global texcache struct.
git-svn-id: https://svn.eduke32.com/eduke32@4666 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:32:01 +00:00
terminx 0cf527914f Minor optimizations (loop unrolling) to LZW functions in cache1d, improves throughput ~20% on my i7
git-svn-id: https://svn.eduke32.com/eduke32@4665 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:31:41 +00:00
terminx d74a6a7e5d Fix some dumbass warnings I caused
git-svn-id: https://svn.eduke32.com/eduke32@4664 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:31:27 +00:00
terminx 683a4fb728 Nuke unused lzwnew.c/h
git-svn-id: https://svn.eduke32.com/eduke32@4663 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:31:12 +00:00
terminx 36e2aa01cd if 0 the input check at the beginning of animation playback as it seems to cause some cutscenes to be skipped.
git-svn-id: https://svn.eduke32.com/eduke32@4662 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:30:51 +00:00
terminx cbe91be9ff Additional engine cleanups and optimizations. About as generic as it sounds. Also changes internal dummytile/tilefromtexture behavior so that the LZ4 compressed version of a texture is kept and the cache1d entries associated with the tiles can expire, like any other tile.
git-svn-id: https://svn.eduke32.com/eduke32@4661 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:30:38 +00:00
terminx 019315dd59 Rewrite OSD_Exec() to allow executing a .cfg that lives in a .grp or .zip. Use _IOLBF instead of _IONBF for the log in release builds.
git-svn-id: https://svn.eduke32.com/eduke32@4660 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:53 +00:00
terminx 508595cac8 Fix a couple of botched FindDistance3D calls
git-svn-id: https://svn.eduke32.com/eduke32@4659 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:38 +00:00
terminx 6c6b68d534 Various additional optimizations: add CLASSIC_SLICE_BY_4 mode to unroll some of the loops in a-c, replace integer divisions by a divisor unknown at compile time with usage of libdivide, clean up pragmas further by removing more old stuff that wasn't used anywhere. This is another one of those nasty commits that make people cry. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4658 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:29:21 +00:00
terminx 6f332e645d Fix r4643, NUM_HARDCODED_ANIMS was increased for a reason. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4657 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:50 +00:00
terminx 020dc85fd0 Additional Polymost cleanup, attempt to fix enemy shadows (they are still not right)
git-svn-id: https://svn.eduke32.com/eduke32@4656 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:35 +00:00
terminx 06a0350af0 Fix a bug where if you had a savegame with an active viewscreen, the tile in the world wouldn't update until totalclock > what totalclock was when the game was saved.
git-svn-id: https://svn.eduke32.com/eduke32@4655 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:13 +00:00
terminx b7b0b2c7ba Fix up some incorrect PWEAPON macro usage
git-svn-id: https://svn.eduke32.com/eduke32@4654 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:27:01 +00:00
terminx 3a60abfb94 Nuke MFLAGS_NOCONV, hoist a few conditions out of loops in Polymost model drawing
git-svn-id: https://svn.eduke32.com/eduke32@4653 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:26:46 +00:00
terminx 73ecabaff9 Fix z fighting issues with wall and floor sprites. This isn't perfect, and somebody like Plgman or Helixhorned who better understands how the depth buffer positions are calculated will be able to do a much better determination of how much to offset the glDepthRange values based on distance to the sprite.
git-svn-id: https://svn.eduke32.com/eduke32@4652 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:26:31 +00:00
terminx dedadcb76e That's one hell of a typo
git-svn-id: https://svn.eduke32.com/eduke32@4651 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:26:13 +00:00
terminx 3eaf78da8b Tie a few random things previously hardcoded to p->curr_weapon == KNEE_WEAPON to curr_weapon being a weapon with a workslike of KNEE_WEAPON instead, and do the same with stuff hard coded for HANDREMOTE_WEAPON
git-svn-id: https://svn.eduke32.com/eduke32@4650 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:25:57 +00:00
terminx 57cc3fe82a Clean up GL background tinting a little bit. Remove access to glRectd in favor of glRecti.
git-svn-id: https://svn.eduke32.com/eduke32@4649 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-25 03:25:35 +00:00
hendricks266 62b37ddb68 Further work on the Xcode project.
git-svn-id: https://svn.eduke32.com/eduke32@4648 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-20 07:37:29 +00:00
hendricks266 8771614f87 Fix the Wii build and clean up remaining warnings. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4647 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-19 00:44:23 +00:00
hendricks266 6ff363a049 OS X: Add a preliminary Xcode project. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4646 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-18 04:50:47 +00:00
hendricks266 f46d901fe2 Fix warnings in menus.c. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4645 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-16 22:21:00 +00:00
hendricks266 295cf82323 Clean up warnings and build issues when building under OS X 10.9. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4644 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-16 21:03:24 +00:00
helixhorned ff7d664d1e Fix an oob access in parsedefinitions_game(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4643 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-05 18:32:59 +00:00
terminx 706aec5527 Rename crc32() to Bcrc32() to avoid conflicts with the crc32() function in libpng/libz. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4642 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-01 17:09:54 +00:00
terminx 81e9761e50 Set SDL_GL_ACCELERATED_VISUAL to 1
git-svn-id: https://svn.eduke32.com/eduke32@4641 1a8010ca-5511-0410-912e-c29ae57300e0
2014-10-01 17:09:24 +00:00
terminx 9a04065b5e I'm retarded. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4640 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 18:18:15 +00:00
terminx 4263626f97 Misc additional optimizations, mostly to polymost/mdsprite. Also separate voxmodel into its own source file and object. This commit is pretty large because I was hitting the limit of what could realistically be carved up into smaller patches. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4639 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:18:43 +00:00
terminx 2631da8822 Fix usage of uninitialized value
git-svn-id: https://svn.eduke32.com/eduke32@4638 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:18:07 +00:00
terminx cb02cdc571 Re-use temporary buffer for tilefromtexture true color -> paletted conversion and free when finished with the .def instead of freeing and re-allocating for every tile
git-svn-id: https://svn.eduke32.com/eduke32@4637 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:53 +00:00
terminx ff74aa613e polymost_invsqrt(), reorganize pthtyp for better member alignment
git-svn-id: https://svn.eduke32.com/eduke32@4636 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:37 +00:00
terminx 0f5be25a68 Faster C versions of ksgn() and klabs()
git-svn-id: https://svn.eduke32.com/eduke32@4635 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:22 +00:00
terminx 2d0c76e1a9 kplib optimizations and cleanup; faster versions of some functions, #ifdef out support for a couple of useless formats
git-svn-id: https://svn.eduke32.com/eduke32@4634 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:17:06 +00:00
terminx a46994a668 I thought I was clever, MinGW thought I should eat shit.
git-svn-id: https://svn.eduke32.com/eduke32@4633 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:16:47 +00:00
terminx 7c79d2ce80 Blrintf
git-svn-id: https://svn.eduke32.com/eduke32@4632 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:16:35 +00:00
terminx 71bb5e5c8e Gamevar cleanup: drop "register" qualifiers, shuffle a few things around.
git-svn-id: https://svn.eduke32.com/eduke32@4631 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:16:21 +00:00
terminx c2517d0d99 Suppress tile and sound remapping debug output in debug builds when not using -condebug
git-svn-id: https://svn.eduke32.com/eduke32@4630 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:16:06 +00:00
terminx f553d6ad10 Add assertion for memory error handler in debug builds, add .def load time information to log, call Gv_ResetSystemDefaults() at startup to populate fake tilesizx/tilesizy arrays for CON
git-svn-id: https://svn.eduke32.com/eduke32@4629 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:53 +00:00
terminx 8e98cbe083 Free h_labels table when done compiling CONs
git-svn-id: https://svn.eduke32.com/eduke32@4628 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:41 +00:00
terminx 10474ad635 CON VM: get rid of extra VM_Execute() calls on CON_LEFTBRACE and get rid of returns on CON_RIGHTBRACE
git-svn-id: https://svn.eduke32.com/eduke32@4627 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:29 +00:00
terminx 9839802457 Optimize .anm playback; update frames on screen at the .anm's framerate instead of blindly looping as fast as possible
git-svn-id: https://svn.eduke32.com/eduke32@4626 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:17 +00:00
terminx 423b87a707 Faster CRC32 implementation (slicing-by-4 for 32-bit platforms and slicing-by-8 for 64-bit)
git-svn-id: https://svn.eduke32.com/eduke32@4625 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:15:04 +00:00
terminx 31d2f15b24 Use option name for menubar title for options that display as a separate menu page with a scrolling list
git-svn-id: https://svn.eduke32.com/eduke32@4624 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:14:35 +00:00
terminx 144a4798ce More Polymost cleanup, also consolidate tilesizx and tilesizy into a single tilesiz vec2_t to ensure both x and y are always in the same cache line. I may add a new vec2_16t later. Still need to take care of emulating the old flat array for the sake of CON access.
git-svn-id: https://svn.eduke32.com/eduke32@4623 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:14:21 +00:00
terminx e20f297774 r_showfps 2, displaying min and max fps
git-svn-id: https://svn.eduke32.com/eduke32@4622 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:13:14 +00:00
terminx 5d1475b26c Remove some #if 0'd functions from audiolib
git-svn-id: https://svn.eduke32.com/eduke32@4621 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:12:57 +00:00
terminx deb196f8a6 Fix build error
git-svn-id: https://svn.eduke32.com/eduke32@4620 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:12:41 +00:00
terminx 3623645815 Clean up the "X" variants of malloc and friends to avoid unncessary function calls and parameter passing
git-svn-id: https://svn.eduke32.com/eduke32@4619 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:12:27 +00:00
terminx 53ed4c619c Make glColor3f() available as bglColor3f()
git-svn-id: https://svn.eduke32.com/eduke32@4618 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:12:09 +00:00
terminx c5835ef741 Remove "volatile" qualifier from mouse related variables, no longer required after the long ago removal of the hack that polled mouse input in a separate thread
git-svn-id: https://svn.eduke32.com/eduke32@4617 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:11:50 +00:00
terminx f8b340de02 Next time I'll test with sound enabled when attempting to fix a warning in audiolib ;)
git-svn-id: https://svn.eduke32.com/eduke32@4616 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:09:03 +00:00
terminx ed703142af Add new headers to VS project
git-svn-id: https://svn.eduke32.com/eduke32@4615 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:47 +00:00
terminx 3681d5e553 Respect ud.bgstretch when displaying the title screen during netplay
git-svn-id: https://svn.eduke32.com/eduke32@4614 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:35 +00:00
terminx 0a62ba1a21 On Android, remove the counter that automatically proceeds from the startup screen to the main menu and require a button press instead.
git-svn-id: https://svn.eduke32.com/eduke32@4613 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:23 +00:00
terminx f4a8cdfa28 Don't display QUOTE_F1HELP on Android when starting a new game with the shareware version.
git-svn-id: https://svn.eduke32.com/eduke32@4612 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:08:10 +00:00
terminx c97d01111a Change vid_brightness/contrast/gamma cvars to float vs double and do the same for OSD text scaling
git-svn-id: https://svn.eduke32.com/eduke32@4611 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:07:57 +00:00
terminx ee82c62afc Allow loading the header from savegames with a different version. This is needed to allow starting a new game on the episode/level/skill saved in an incompatible savegame.
git-svn-id: https://svn.eduke32.com/eduke32@4610 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-30 04:07:41 +00:00