Commit Graph

1963 Commits

Author SHA1 Message Date
hendricks266 9079be2e27 Fix a compiler warning with USE_OPENGL=0.
git-svn-id: https://svn.eduke32.com/eduke32@5040 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-08 07:56:29 +00:00
hendricks266 7984d8d6b5 Amend previous commit. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5038 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-02 08:15:28 +00:00
hendricks266 17906349b4 BSD: Build system fixes/improvements. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5037 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-02 07:54:24 +00:00
helixhorned 3ecc8a6962 engine.c: style-cleanup getzrange(). DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@5035 1a8010ca-5511-0410-912e-c29ae57300e0
2015-03-01 14:15:36 +00:00
helixhorned b1347517ee Classic/Polymost: factor out update of starting sectnum, use updatesectorbreadth().
The latter means that running perpendicular thin sector is handled better
if there are e.g. TROR sectors in the same x/y space.

git-svn-id: https://svn.eduke32.com/eduke32@5024 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-22 12:43:02 +00:00
helixhorned 850206ef62 Stick update of 'totalclocklock' at beginning of G_DrawRooms() instead of drawrooms().
This fixes engine-side sprite animation in the following scenario: CON code
wants to draw a scene from EVENT_DISPLAYREST, but since it covers the whole
screen, disables the drawing of the 3D scene beforehand (RETURN set to 1 from
EVENT_DISPLAYROOMS). DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5020 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-19 22:19:05 +00:00
helixhorned a1a79b001e Under conditions of CLASSIC_Z_DIFF_64 (r4960), make some drawvox() vars 64-bit.
- In drawvox(), make view-relative x and y high-precision on desktops. To a
  large extent (but not completely), this fixes "stray" fake floor shadow
  sprites for voxels.
- In the mouse picking code for voxels, fix a possible integer overflow.
  A new engine.c-private function mulscale_triple30() is added.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@5017 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-19 17:41:53 +00:00
terminx 5e0bed4c39 MSVC build fix.
git-svn-id: https://svn.eduke32.com/eduke32@5013 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-18 01:47:12 +00:00
terminx f3e8ffa714 Fix Polymer when switching from Polymost
git-svn-id: https://svn.eduke32.com/eduke32@5011 1a8010ca-5511-0410-912e-c29ae57300e0
2015-02-18 01:47:06 +00:00
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