Commit graph

2104 commits

Author SHA1 Message Date
terminx
1d30b86db2 Nocompress and nodownsize for skyboxes
git-svn-id: https://svn.eduke32.com/eduke32@5010 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-18 01:47:00 +00:00
helixhorned
4f54c7cf88 Fix swapbufreverse(), adding precondition of count >= 4.
Also, in premap.c:G_CacheMapData(), comment out what was supposedly
intended as a debugging message ("percentage ...").

git-svn-id: https://svn.eduke32.com/eduke32@5009 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-17 16:23:04 +00:00
hendricks266
894407e58b Apple: Update Xcode project and build system. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5005 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-14 07:26:10 +00:00
terminx
139276e6fe Polymost changes to better support running under GL ES. Still need to investigate GL_LINES and GL_QUADS... neither work under either GL -> GL ES wrapper we've tried, so we must be doing something wrong.
git-svn-id: https://svn.eduke32.com/eduke32@5001 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:23:04 +00:00
terminx
40956094d5 More Android work. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5000 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:59 +00:00
terminx
27e8fcbe57 A whole bunch of mostly insignificant changes that didn't deserve separate commits. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4997 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:48 +00:00
terminx
36a3bab5fc Android SDLayer changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4992 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:29 +00:00
terminx
31b557ef61 More Android changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4989 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:19 +00:00
terminx
50c30ab790 Animation system overhaul part 1. This allows for an unlimited number of .anm/.ivf files to be defined via duke3d.def and played back at any time with the new CON commands. Syntax is currently as follows, but may change:
cutscene "somefile.anm" { delay 10 } // defines somefile.anm with a delay of 10 120Hz tics between frames. a more typical framerate method may come later, but this is how the originals worked.

Once defined, they can be played through CON with the new playback command, also called "cutscene". It works like this:

definequote 12345 somefile.anm
define ANIM_SOMEFILE 12345

...

cutscene ANIM_SOMEFILE // halts game execution and immediately plays cutscene, resuming execution when finished

...

Sounds can be played during animations (and tiles can be overlaid, etc) like this:

onevent EVENT_CUTSCENE
    ifcutscene ANIM_SOMEFILE
    {
        ifvare RETURN 12 // frame 12
            sound FLY_BY
        rotatesprite ...
    }
endevent

The value of the RETURN var at the end of EVENT_CUTSCENE determines the next frame to play. This can be used for looping, etc. Attempting to play animations backwards outright is not advised as animations only seek in one direction (so rewinding requires running it through from frame 0 again). This is will WIP and hasn't been heavily tested at all, so please try it out.

git-svn-id: https://svn.eduke32.com/eduke32@4987 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:22:07 +00:00
terminx
cb2dcdc99e Minor engine cleanup
git-svn-id: https://svn.eduke32.com/eduke32@4984 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:21:53 +00:00
terminx
97f04d8083 Fix program entry point on win32, allows debugging SDL builds under MSVC.
git-svn-id: https://svn.eduke32.com/eduke32@4983 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:21:50 +00:00
terminx
88e0bfd7d3 More twalltype
git-svn-id: https://svn.eduke32.com/eduke32@4981 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-11 05:21:38 +00:00
helixhorned
b9834f9832 mdsprite.c: in md3load(), allocate m->head.surfs with Xcalloc, amending r4952.
And preventing enormous corruption due to a free() called on a garbage (malloc'd)
pointer values this time. DO_BUILD_VERY_FAST_PLEASE!

git-svn-id: https://svn.eduke32.com/eduke32@4980 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-10 19:51:15 +00:00
helixhorned
d915c49935 Mapster32: in build.c, prevent oob of wall[] if joining non-adjacent sectors.
Also, some minor stylistic cleanup.

git-svn-id: https://svn.eduke32.com/eduke32@4973 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-08 18:48:30 +00:00
hendricks266
b980ca7b0b Engine: Remove some conditional disabling of spriteext features when !defined USE_OPENGL.
git-svn-id: https://svn.eduke32.com/eduke32@4971 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-08 08:04:23 +00:00
helixhorned
a7bea4f6bc Classic: fix underallocation of TILE_TILT and tilting at very small resolutions.
Since TILE_TILT is only allocated once, it must be done with the maximum
possible size.

git-svn-id: https://svn.eduke32.com/eduke32@4965 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:15 +00:00
helixhorned
1a7816065c sdlayer.c: minor stylistic simplification of sdlayer_checkversion(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4964 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:14 +00:00
helixhorned
c6b9fa52d9 osd.c: in OSD_HandleChar() for TAB, fix use of uninitialized osd->editor.buf[i].
Exposed by Valgrind. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4963 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:13 +00:00
helixhorned
952a723229 Make g_player a +1 offset pointer into 'static g_player_s[1 + MAXPLAYER]'.
This fixes the out-of-bounds read of former g_player[] in VM_EventCommon_().

git-svn-id: https://svn.eduke32.com/eduke32@4961 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:11 +00:00
helixhorned
c3ddf08fd1 Classic: on desktops, handle abs. z diff. of floor/ceiling to camera >= 1<<24.
git-svn-id: https://svn.eduke32.com/eduke32@4960 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:10 +00:00
helixhorned
d95aaa5da5 engine.c: style-cleanup owallmost() and wallmost(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4959 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-07 17:29:08 +00:00
helixhorned
c7774f9c43 In DEBUGANYWAY=2/DEBUG_MAIN_ARRAYS build, declare tsprite[] as tspritetype.
Fixing a bunch of warnings. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4958 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-05 17:17:05 +00:00
helixhorned
910716fa11 mdsprite.c: in md3free(), also free s->geometry for each surface. DONT_BUILD.
This prevents a enormous leak being reported by LeakSanitizer. Not that it
matters much, since we most frequently free models only at exit. (Sometimes one
may be freed earlier though -- if there was an error loading it, AFAICS.)

git-svn-id: https://svn.eduke32.com/eduke32@4952 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-05 16:30:09 +00:00
hendricks266
b6d625b202 Modularize .mid --> .ogg --> .flac code to apply to sounds as well, and various cleanup in music/sound filename-handling code.
git-svn-id: https://svn.eduke32.com/eduke32@4948 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-25 12:17:59 +00:00
hendricks266
6048f9d766 Simplify the macros used for distinguishing between OS X and iOS.
git-svn-id: https://svn.eduke32.com/eduke32@4942 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-25 12:16:10 +00:00
helixhorned
a50a332933 compat_tools.c: match definition of 'editstatus'to declarations in other places. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4939 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-24 19:14:39 +00:00
helixhorned
038bc1517b engine.c: in qsetmodeany(), call initsmost() after setting xdim and ydim.
This makes sure that the engine arrays have sufficient space allocated for usage
in Mapster32's 2D mode, for example from drawmapview().


git-svn-id: https://svn.eduke32.com/eduke32@4938 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-19 01:54:53 +00:00
helixhorned
038a9f8eb6 Lunatic: fix build and linking. DONT_BUILD.
- t{sector,wall}type are simply typedef'd to the non-t versions
- make FORCE_INLINE unconditional of DISABLE_INLINING (otherwise there are
  multiple definitions of these functions)
- update lunatic/doc/lpeg-lunatic.patch to apply against the LPeg 0.12 I just
  downloaded


git-svn-id: https://svn.eduke32.com/eduke32@4937 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-19 00:11:25 +00:00
helixhorned
ace6087f7b Classic: fix "windowed" modes (r_size >= 12) by reverting r4920; adapt.
In setview(), we now assert windowx2 < xdim. The only calling places where its
non-violation is non-trivial to ascertain are (1) showview from CON and
(2) draw-to-tile for look-sideways in game.c. AFAICS case 1 should be fine.
Case 2 is adapted; see comments there.


git-svn-id: https://svn.eduke32.com/eduke32@4935 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 23:16:37 +00:00
helixhorned
451dcfa073 Mapster32: remove unused key* options in mapster32.cfg and corresponding BK_* macros. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4934 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 22:11:31 +00:00
helixhorned
3a433130bb Fix bsearch() call for user G_LoadMapHack(): don't access nonexistent storage. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4933 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 20:31:37 +00:00
helixhorned
80da69f6a0 polymost.c: fix possible access of wallchanged[-1]. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4932 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 20:28:59 +00:00
helixhorned
03be585ff7 engine.c: fix memory leak. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4931 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 20:22:25 +00:00
helixhorned
a05cc6ec20 polymost.c: fix C build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4930 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-18 20:21:17 +00:00
hendricks266
86e7a97ef7 Fix a crash exposed by animating the menu back button.
git-svn-id: https://svn.eduke32.com/eduke32@4927 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-17 00:27:46 +00:00
terminx
c98555616d Fix kplib zip support
git-svn-id: https://svn.eduke32.com/eduke32@4925 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-16 06:30:51 +00:00
terminx
b3358a90b2 Fix wildmatch(), resolves errors matching things like "*.zip" with "duke3d.hrp.zip" for example.
git-svn-id: https://svn.eduke32.com/eduke32@4922 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-15 06:45:27 +00:00
terminx
0b1582185e Fix off-by-one error in setview()
git-svn-id: https://svn.eduke32.com/eduke32@4920 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-15 06:45:21 +00:00
terminx
cdaa25ef07 Implement better fade-out for quotes and for the mouse cursor in the menu.
git-svn-id: https://svn.eduke32.com/eduke32@4919 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-15 06:45:14 +00:00
terminx
f67c8fd44b Forgot this file in r4911
git-svn-id: https://svn.eduke32.com/eduke32@4912 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 09:55:12 +00:00
terminx
d70ac064b7 Make dist() and ldist() take void pointers so we can compare spritetype with tspritetype without inserting casts everywhere.
git-svn-id: https://svn.eduke32.com/eduke32@4910 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 09:28:41 +00:00
terminx
19729fc766 Fix Mapster32 sector copying
git-svn-id: https://svn.eduke32.com/eduke32@4909 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 08:44:46 +00:00
terminx
35d72c80c1 Fix compiler warnings
git-svn-id: https://svn.eduke32.com/eduke32@4908 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 01:54:50 +00:00
terminx
41a62ba96b Fix undefined behavior in Polymost
git-svn-id: https://svn.eduke32.com/eduke32@4907 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 01:54:33 +00:00
terminx
0b1433b07c Disable mouse input affecting the menu when the console is down. This code is awful, because I am an awful man.
git-svn-id: https://svn.eduke32.com/eduke32@4906 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 01:54:18 +00:00
terminx
130244a302 Crash fix
git-svn-id: https://svn.eduke32.com/eduke32@4905 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-12 01:53:55 +00:00
terminx
419ea3ed40 Polymost: fix wall and floor sprites clipping into or z-fighting with surfaces (replaces glDepthRange() hacks for sprites), add r_nofog cvar for debugging, reduce the total number of OpenGL calls by only calling glFogi() to set the fog mode when initializing the renderer or changing r_usenewshading.
git-svn-id: https://svn.eduke32.com/eduke32@4904 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:56:58 +00:00
terminx
107bb7a3fa Introduce "twalltype" for temporary uses of walltype where using wall_tracker_hook() would be invalid. This is similar to "tspritetype" and fixes a bunch of problems in the editor that cropped up when changing the tracker sanity checks to an assert that only exists in debug builds (branching upon any write to a sprite, sector or wall had an unacceptable impact on performance).
git-svn-id: https://svn.eduke32.com/eduke32@4903 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:56:38 +00:00
terminx
2928a9dfa9 Fix Mapster32 bug where pressing "O" on a sprite twice would corrupt your map due to unchecked use of hitscan results.
git-svn-id: https://svn.eduke32.com/eduke32@4901 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:55:50 +00:00
terminx
43161e1fd8 Fix distrecip calculation
git-svn-id: https://svn.eduke32.com/eduke32@4899 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:55:23 +00:00
terminx
4911b9a949 Revise C++ structure trackers for performance and introduce "tspritetype", for temporary sprites or other usages where using the trackers would be invalid or undesired. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4898 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:55:07 +00:00
terminx
04527ad08e Support r_windowpositioning in 8-bit.
git-svn-id: https://svn.eduke32.com/eduke32@4896 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:53:59 +00:00
terminx
67d30a18da Minor cleanup and formatting changes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4894 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:53:30 +00:00
terminx
4bc18d631e Make FORCE_INLINE aware of DISABLE_INLINING. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4893 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:53:16 +00:00
terminx
70cd0d2425 Detect running under Wine. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4892 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:53:01 +00:00
terminx
16b9b19e53 Identify Windows 10 in the startup window/log. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4891 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:52:45 +00:00
terminx
c591711fe8 MSVC C++ build fixes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4890 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:52:15 +00:00
terminx
16b617114c Replace hightile grayscale method (usually combined with tints to produce
replacements for the first handful of palette lookups) w8th superior
"luma" method. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4889 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-11 04:51:41 +00:00
hendricks266
e3de98e2ae Clean up autodetected game install search paths on all platforms that use them.
This should prevent Lunar Apocalypse from becoming Nuclear Winter with Megaton on Linux and Mac.

git-svn-id: https://svn.eduke32.com/eduke32@4886 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:14:47 +00:00
hendricks266
589c993c39 Implement UserMapHacks.
git-svn-id: https://svn.eduke32.com/eduke32@4884 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:14:00 +00:00
hendricks266
3f846bdde3 Reinstate MD4.
git-svn-id: https://svn.eduke32.com/eduke32@4883 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-08 15:13:28 +00:00
helixhorned
26683d5bfe engine.c: fix clipmove() against upper part of wall-aligned sprites.
git-svn-id: https://svn.eduke32.com/eduke32@4882 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-06 20:54:49 +00:00
helixhorned
5c4f9b1f14 engine.c: on non-touch devices, roughly double maximum voxel drawing distance.
By setting DISTRECIPSIZ to 131072, as far as I can see the absolute maximum
that's possible with the integer scaling convention of the voxel drawing code.

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4881 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-06 19:56:44 +00:00
helixhorned
b5bb86b8e2 Mapster32: make sprite duplication examples in m32script_ex.map work again.
- Work around a sequencing issue (assignment of searchstat) in
  M32_DrawRoomsAndMasks()
- When having sprites highlighted and changing shade, since r1943 change
  every highlighted sprite's shade if one of them is aimed at. With this
  revision, if SHIFT is pressed while doing that, only change the aimed at
  sprite's shade
- a.m32: Use 'break' from a state instead of 'return'. The former may be
  "sticky" in a way that is not intended. Needs to be debugged later.
- Update instructions in m32script_ex.map

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4880 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-06 19:56:41 +00:00
helixhorned
431941771d engine.c: prevent multiple collection of same sector in scansector().
Also for polymost_scansector(). These were likely of little consequence
because collection in scansector() is the exception than the rule (see
added comments), and because the redundant drawwalls() would find the
x range done the second and following times.

Also, add a bound check for sectorborder[] (the limit was probably rarely
hit in practice, but the check is mandatory nontheless) and add functions
printscans() and printbunches() in the DEBUGGINGAIDS=2 build.

git-svn-id: https://svn.eduke32.com/eduke32@4877 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-04 18:45:03 +00:00
helixhorned
bc35a5c8d2 engine.c: in drawmasks(), remove sorting sprites by statnum.
There were various issues with that code.
 - It does not seem to be very meaningful to do so.
 - It was carried out on the same range as the sprites sorted by z coordinate
   (those with equal x/y) just a few lines away, effectively overriding it.
   The former is very meaningful, though.
 - It led to inconsistencies between editor and game, see
   http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__214873

git-svn-id: https://svn.eduke32.com/eduke32@4876 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-04 18:45:01 +00:00
helixhorned
17fab4d8ac Cleanup of various engine functions.
- factor out calculation of player-relative and screen+clipped-player-relative
  coordinates into get_rel_coords() and get_screen_coords(), respectively
- the usual beautification stuff, especially since we're now on C99

git-svn-id: https://svn.eduke32.com/eduke32@4875 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-04 18:45:00 +00:00
helixhorned
b0c48eec25 CON: always return non-negative values from 'clipmove' and related.
Previously, the C function clipmove() returned negative values when hit a
wall (32768+wallnum) or sprite (49152+spritenum) because internally,
these values were encoded into a *signed* 16-bit integer. This made no
difference to C code using it, since it always proceeded by bit checks,
but was inconsistent with documentation on CON 'clipmove' on the wiki.

The following commands are affected too, since they use the value returned
by clipmove(): 'clipmovenoslide', 'movesprite'. Also, the value of
actor[].movflag ('htmovflag' from CON).

Also, fix 'clipmove*' in LunaCON and add lunatic/test/checknearwall.con
as an example of how to implement a being-close-to-a-wall checker as
requested in
http://forums.duke4.net/topic/7869-determining-closeness-to-a-wall/

git-svn-id: https://svn.eduke32.com/eduke32@4874 1a8010ca-5511-0410-912e-c29ae57300e0
2015-01-04 18:44:58 +00:00
helixhorned
2daa44ca6a engine.c: fix clipmove() against floor-aligned sprites.
Introduced in r3207. Oops.

git-svn-id: https://svn.eduke32.com/eduke32@4873 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-30 20:05:22 +00:00
helixhorned
5f263f1358 engine.c: prevent an oob read of spriteext[] in drawsprite_classic().
git-svn-id: https://svn.eduke32.com/eduke32@4872 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-30 20:05:20 +00:00
helixhorned
7033205fcf Menus: disable mouse pointer if CROSSHAIR is void. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4862 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-28 19:48:20 +00:00
hendricks266
598e33319c Add the necessary plumbing to sdlayer to detect mousedown, mouseup, and dragging.
git-svn-id: https://svn.eduke32.com/eduke32@4853 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 18:36:43 +00:00
hendricks266
bfb3614b92 Introduce preprocessor token EDUKE32_TOUCH_DEVICES that covers both Android and iOS, and replace selected instances of __ANDROID__ with it.
git-svn-id: https://svn.eduke32.com/eduke32@4852 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 18:36:14 +00:00
helixhorned
33addad941 Minor cleanup, mostly in engine.c:drawalls().
git-svn-id: https://svn.eduke32.com/eduke32@4846 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-27 17:17:50 +00:00
helixhorned
51fe706907 Tweak the behavior of viewscreens to what is more logical IMO.
- At a given time, at most one viewscreen may display TILE_VIEWSCR, namely
  that one which is g_curViewscreen
- sync kinds of distance to compare against VIEWSCREEN_ACTIVE_DISTANCE (was
  Manhattan vs. dist(), now both the latter)
- fix resetting to VIEWSCREEN tile when player is greater from it than that
  distance. When the player is closer to it again, it is *not* reset to
  TILE_VIEWSCR.
- more sync'd g_curViewscreen and sprite[i].yvel (for 'i' being the viewscreen
  sprite)

Note: in a multiplayer context, this needs to be thought about once more.

git-svn-id: https://svn.eduke32.com/eduke32@4843 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:30:00 +00:00
helixhorned
843894dd57 engine.c: clamp all indices for distrecip[] access, as more OOBs were observed.
git-svn-id: https://svn.eduke32.com/eduke32@4842 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:59 +00:00
helixhorned
7da543e4f0 cache1d.c: Revert changes in r4665 unrelated to unrolling, fixing oob write.
Specifically, we must make sure that dasizeof <= LZWSIZE (or so) in
c1d_{read,write}_compressed() (what the assertion in the last commit was about,
and is now redundant). This fixes saving of e.g. large gamearrays with the C-CON
build. Bump BYTEVERSION.

An alternative for setting dasizeof to 1 would be to factor it and keep dividing
as long as it's > LZWSIZE.

git-svn-id: https://svn.eduke32.com/eduke32@4838 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:55 +00:00
helixhorned
b7805868f7 cache1d.c: in (de)compr. funcs, add an bound-checking assert that fails w/ AMC TC.
Also, formatting.

git-svn-id: https://svn.eduke32.com/eduke32@4837 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:54 +00:00
helixhorned
584ed7982a Convert voxels to models only when starting or changing to Polymost.
Analogously to the way models are processed in a deferred manner for Polymer.

git-svn-id: https://svn.eduke32.com/eduke32@4836 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:53 +00:00
helixhorned
bd93fd2aab A couple of miscellaneous cleanups.
defs.c: sync some dup'd code for 'definevoxel' and 'voxel' DEF tokens.
engine.c: factor out PolymerProcessModels().

git-svn-id: https://svn.eduke32.com/eduke32@4835 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:52 +00:00
helixhorned
3a6bcdc102 engine.c: style-cleanup drawvox(). Also clean up ALL of voxmodel.c.
No deliberate semantic changes here.

git-svn-id: https://svn.eduke32.com/eduke32@4834 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-26 17:29:48 +00:00
helixhorned
a20a7878bb Polymer: include wall[].ypanning in wall invalidation logic.
Fixes bug reported here:
http://forums.duke4.net/topic/1348-mapster32-problems-and-bugs/page__view__findpost__p__213759

git-svn-id: https://svn.eduke32.com/eduke32@4833 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-21 15:51:51 +00:00
helixhorned
b4472f60d1 Polymer: don't draw masked walls with void tile. DONT_BUILD.
This prevents displaying W_FORCEFIELD+1 masks (as e.g. in front of viewscreens)
completely black with ART mapping. The old behavior, which is inconsistent with
classic, is kept for one-sided masked walls, though.

git-svn-id: https://svn.eduke32.com/eduke32@4830 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-20 13:36:40 +00:00
helixhorned
b716534104 Lunatic: sync MAXJOYAXES, add lunatic/test/sprite_addtv.con. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4829 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-20 13:08:27 +00:00
hendricks266
989f182eb4 Wii: Bump MAXJOYAXES to 9 to avoid menu corruption, and fix _functio.h, CONFIG_FunctionNameToNum, CONFIG_AnalogNameToNum, so that this does not crash.
git-svn-id: https://svn.eduke32.com/eduke32@4827 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-18 18:16:16 +00:00
hendricks266
0869194b60 Wii: Add non-interactive cases to wm_msgbox and wm_ynbox.
git-svn-id: https://svn.eduke32.com/eduke32@4825 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-18 18:15:26 +00:00
hendricks266
c397841cda Wii: Add a custom exception handler that saves the crash information to the log and directs the user to submit it to us. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4821 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:02:21 +00:00
hendricks266
8d115df01e Wii: Add a console to display startup messages to the screen instead of showing the user a black screen while the game initializes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4820 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:01:58 +00:00
hendricks266
bd813831b0 Wii: Work around a performance regression caused by r4080. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4819 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:01:13 +00:00
hendricks266
8ec58a208d Wii: Tweaks.
*Move the FPS display down from the top of the screen, as we do for quotes.
*Don't show a non-functional mouse cursor in the center of the screen.
*Don't display the "Startup window" option in Game Settings.
*Display the IR pointer crosshair in addition to the aiming crosshair, not instead of it.
*Eliminate some assumptions from wiibuild.bat.
*DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4818 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-17 13:00:54 +00:00
helixhorned
01fa7eeabc Makefile.common: in non-release builds, explicitly pass -fno-omit-frame-pointer.
So that stack traces can be gotten with optimized DEBUGANYWAY builds, e.g. for
Linux's 'perf' --> flame graphs. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4817 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-15 19:50:52 +00:00
helixhorned
d82ca91809 DEF: fix handling of 'remappal' attribute for 'makepalookup'.
git-svn-id: https://svn.eduke32.com/eduke32@4813 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:06 +00:00
helixhorned
50a5e38cb6 Pull setting g_noFloorPal[] further down, into makepalookup().
Now passed as last arg 'noFloorPal' to makepalookup(). Used as follows:
- from loadlookups(): *false*, i.e. do take over floor pal.
- from generatefogpals() [default fog pals] and fillemptylookups(): *true*,
  i.e. don't take over floor pal
- from DEF 'fogpal': true
- from DEF 'makepalookup': take over flag from pal from which we are remapping,
  or set to true if remapping from pal 0
- (CROSSHAIR_PAL: true)

This should make the issue reported in
 http://forums.duke4.net/topic/775-eduke32-20-and-polymer/page__view__findpost__p__197583
resolve in a natural manner.

git-svn-id: https://svn.eduke32.com/eduke32@4812 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:05 +00:00
helixhorned
70cbde87eb Move g_noFloorPal[] to the engine side and adapt other stuff accordingly.
- 'nofloorpalrange' DEF token: now handled for both game and editor (for the
  latter, it's effective only for "shade preview" mode, [']+[X]).
- in generatefogpals(), assign g_noFloorPal[] = 1 for every generated (default)
  fog pal; get rid of its return value / g_firstFogPal

git-svn-id: https://svn.eduke32.com/eduke32@4811 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:04 +00:00
helixhorned
c9943bcde0 engine.c: prevent an oob access of uwall[] in ceilspritescan().
git-svn-id: https://svn.eduke32.com/eduke32@4810 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:33:02 +00:00
helixhorned
be06b43347 engine.c: style tweaks (tighter var. declaration) in sprite drawing functions.
git-svn-id: https://svn.eduke32.com/eduke32@4809 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-13 22:32:57 +00:00
hendricks266
a1c0d58069 Wii: Fix build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4808 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-09 23:56:54 +00:00
hendricks266
a8455d5caf Fix building the Build Tools. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4806 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-09 22:51:41 +00:00
hendricks266
9f52fb1d21 Fix a warning with Linux/GTK2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4803 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-08 09:18:29 +00:00
hendricks266
735525758d Refine the previous commit a bit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4802 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-08 07:32:58 +00:00
hendricks266
0b91499ee0 Mac OS X: Add detection of the Steam and GOG releases of Duke 3D and the Steam release of NAM. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4801 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-08 04:31:57 +00:00
helixhorned
442a9bbfef voxmodel.c: fix Polymost rendering of voxels.
This reverts/corrects two semantic changes of r4639 as far as what is now
voxmodel.c (formerly part of mdsprite.c) is concerned. One correction ends
up having no effect (m->bscale is always 1.f for voxel models, as far as I
can see), but is the proper rewrite.

Also, in osdcmds.c:registerosdcommands(), tweak two help strings.

git-svn-id: https://svn.eduke32.com/eduke32@4800 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-06 21:05:36 +00:00
helixhorned
5e35448560 m32script: fix tilesizx[]/tilesizy[] access. Can also 'copy' from them.
git-svn-id: https://svn.eduke32.com/eduke32@4799 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-06 19:09:53 +00:00
helixhorned
74d99fe2e1 M32Script cleanup. Fixes at least one non-minor and one minor bug.
git-svn-id: https://svn.eduke32.com/eduke32@4798 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-06 19:09:50 +00:00
helixhorned
5e574436e2 engine.c: minor stylistic changes. DONT_BUILD.
Since we're targeting C99/C++ now, we can finally declare variables as close
to their use as possible.

git-svn-id: https://svn.eduke32.com/eduke32@4797 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-05 23:12:36 +00:00
helixhorned
f311631d6e a-c.c: eliminate narrowing int32_t -> uint32_t conversions. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4786 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-01 19:52:08 +00:00
helixhorned
07bf374269 Fix build on platforms not magically #defining UNREFERENCED_PARAMETER. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4785 1a8010ca-5511-0410-912e-c29ae57300e0
2014-12-01 19:21:48 +00:00
terminx
89a9010db1 Fix warnings with VS2013 update 4. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4783 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-30 23:18:57 +00:00
hendricks266
058c3727e3 Fix the crash in the ASM relating to the dynamic allocation of ylookup.
git-svn-id: https://svn.eduke32.com/eduke32@4777 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 06:30:42 +00:00
hendricks266
f2fc1a6f15 Make sure the mouse is captured when the main menu transitions into MODE_GAME. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4776 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 03:43:11 +00:00
hendricks266
c42516c579 Fix mousewheel under SDL 1.2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4775 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 03:21:56 +00:00
hendricks266
a1ec634dec Restore SDL 1.2 on Windows to a working state. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4774 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 03:07:33 +00:00
hendricks266
731e4ffa99 Fix POLYMER=0 GTK C++ build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4773 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 02:29:42 +00:00
hendricks266
dc9d552470 Restructure dynamicgtk to comply with C++ casting rules. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4772 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-29 00:32:28 +00:00
hendricks266
9d5a17c93e Eliminate -Wno-narrowing. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4771 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 23:57:21 +00:00
hendricks266
e29e5bfbcb GTK: Fix warnings and errors related to the banners. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4770 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 23:47:46 +00:00
hendricks266
32df15a254 Fix C/GTK2/SDL1.2 build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4769 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 08:30:31 +00:00
hendricks266
4e664fe878 Some minor fixes. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4768 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 08:14:00 +00:00
hendricks266
20c7bbbea6 Fix the Wii build with the refactored sdlayer. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4767 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-28 08:12:40 +00:00
hendricks266
9268b9f0b6 Make a bunch of things extern "C". This should fix C++ builds on OS X and with Lunatic. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4766 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-26 04:39:23 +00:00
hendricks266
d89caf5187 Fix Lunatic C build. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4765 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-26 04:37:22 +00:00
helixhorned
112d650843 Fix POLYMER=0 build and a couple of unused-variable warnings with it. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4764 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-25 23:46:28 +00:00
hendricks266
4e034e1331 Eliminate the printf_nowarn stuff that has long since been supplanted by TrackerCast. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4763 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-25 21:08:58 +00:00
hendricks266
f22e202d88 Fix some things when building on OS X. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4762 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-24 08:19:50 +00:00
hendricks266
2c7b31958a Fix build with x86_64-MinGW-w64. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4761 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-24 06:30:47 +00:00
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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