Commit Graph

2186 Commits

Author SHA1 Message Date
terminx b305b31b1f Rebuild nedmalloc.dll using newest git sources
git-svn-id: https://svn.eduke32.com/eduke32@2365 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-19 04:07:14 +00:00
helixhorned 97ebb029d6 Make compiler happy: remove 'may be used uninitialized' warning in multivoc.c.
I'm not getting this warning (synthesis is) but I think it's justified because
the VOC block parsing code isn't terribly validating...

git-svn-id: https://svn.eduke32.com/eduke32@2364 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:35 +00:00
helixhorned 2d6f24a3f2 Fix a potential free() of stack memory in screenshot code. Ouch!
git-svn-id: https://svn.eduke32.com/eduke32@2363 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:19 +00:00
helixhorned 165d291a48 Comment out unused dfread and kdfwrite functions in cache1d.c.
git-svn-id: https://svn.eduke32.com/eduke32@2362 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:15:04 +00:00
helixhorned 103a6e76f9 constify various cache1d and pragmas functions, some copybuf* -> memcpy/move.
The following functions have const qualifiers attached for the 'destination'
arguments: kdfwrite, dfwrite in cache1d.c and copybuf{byte,reverse,} in the
pragmas source or headers.  A couple uses of the latter ones were replaced
with calls to standard library functions.

git-svn-id: https://svn.eduke32.com/eduke32@2361 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 22:14:45 +00:00
helixhorned b51a3d91a3 cache1d.c: debugging feature routing all allocache requests to malloc.
This is useful to debug out-of-bound violations for memory allocated
with that function.

git-svn-id: https://svn.eduke32.com/eduke32@2360 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:57:07 +00:00
helixhorned 1ad110ff6a menus.c: rename _bar to sliderbar.
git-svn-id: https://svn.eduke32.com/eduke32@2359 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:52 +00:00
helixhorned 079056df67 Menus: make aspect ratio also control r_usenewaspect.
- RENDERER SETUP is now also accessible from classic, with only 2 options:
  'aspect ratio' and 'ambient light level'
- remove the latter option from the VIDEO SETUP menu
- When compiled with OpenGL, the aspect ratio option cycles between 3 states:
  r_usenewaspect=1 (the modern way), and r_usenewaspect=0 but r_widescreen=0/1.
  In non-GL builds, there are only 2 states.
- don't display black translucent overlay in COLOR CORRECTION menu

git-svn-id: https://svn.eduke32.com/eduke32@2358 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:39 +00:00
helixhorned e14b2808ef Fix non-OpenGL build.
git-svn-id: https://svn.eduke32.com/eduke32@2357 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:26 +00:00
helixhorned 60020d2dd4 In the user map selector, sort file names case-insensitively on Unix'y systems.
This makes more sense because the game selector draws the names with uppercase
letters and the hotkeys to jump to a map starting with a particualar letter
aren't case sensitive, either.  Mapster32's selector will still display maps
starting with upper case first.

git-svn-id: https://svn.eduke32.com/eduke32@2356 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:56:13 +00:00
helixhorned b4f63547c4 Fix non-asm build, I forgot a line with the preceding change.
git-svn-id: https://svn.eduke32.com/eduke32@2355 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:55:59 +00:00
helixhorned c965d9d70a engine.c: more formatting, removing of textually duplicate code.
git-svn-id: https://svn.eduke32.com/eduke32@2354 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:55:43 +00:00
helixhorned 72cc7cebec engine.c: formatting changes
The bulk are whitespace changes; the only exception is a
"if (expr) { stmt; }" --> "if (expr) stmt;"

git-svn-id: https://svn.eduke32.com/eduke32@2353 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-18 17:55:27 +00:00
helixhorned a534cb19bd osxbuild.sh: detect whether we're keeping the source in SVN or git.
git-svn-id: https://svn.eduke32.com/eduke32@2352 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 20:29:51 +00:00
helixhorned 63b868cdde Update samples/trueror1.map with some tests of sprites lying on TROR floors.
Also, there's a "ladder" that passes through a TROR portal, and the mirror
in that map has been fixed for the classic renderer.

git-svn-id: https://svn.eduke32.com/eduke32@2351 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:25:56 +00:00
helixhorned 0ef1721955 Mapster32: Fix extended ceiling/floor picnums taking on picnum 0 in Polymer.
The reason was that drawmasks(), which was where the resetting of the fake
RoR textures happened under Polymer, can be called from polymer_displayrooms()
when mirrors are present. I was assuming that drawmasks() was only ever called
after the 'main' drawrooms and that hence the sequence of fake RoR tile tweaking
was set, reset, set, reset, ... which it was not.
Now, do the resetting explicitly after every drawmasks() in the editor.

git-svn-id: https://svn.eduke32.com/eduke32@2350 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:25:42 +00:00
helixhorned 30e16fe7bb When loading a map in-game, clear TROR wall members corresponding to up/down links.
I find this cleaner for two reasons.  First, lotags won't get in the way of
neartag(), so that doors and switches near constrained TROR walls can be
pushed.  Second, this removes the information leak so that CON coders aren't
tempted to read that values directly before a proper API for that comes along.
When writing out a map in-game (e.g. with dndebug), restore the respective
members so that it can be loaded in the editor again.

git-svn-id: https://svn.eduke32.com/eduke32@2349 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:25:18 +00:00
helixhorned 0538c70242 engine.c: Rewrite tslopevlin (translucent slope vline texmapping) for clarity.
git-svn-id: https://svn.eduke32.com/eduke32@2348 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:24:59 +00:00
helixhorned c900e4ef87 Fix player being not blocked by sprites lying on an extended floor.
getzrange() returns the floor rather than the sprite if their heights are
equal.  Now, make an exception for extended floors (analogously, ceilings).

git-svn-id: https://svn.eduke32.com/eduke32@2347 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:24:44 +00:00
helixhorned ebbf4d79ce Clean up VOC in-memory block type parsing.
- Maintain a position relative to the start of the data. VOC doesn't
  mandate an EOF marker (blocktype 0). If we go over the end, fake
  that marker, so as to restart a looping sound or stop a one-shot one.
  This fixes an uninitialized mem access with the corrupt SNAKRM.VOC.
- When encountering the EOF marker, don't read the 3 bytes of block size,
  since they may not be there.
- Read blocksize by ORing and shifting the 3 bytes, not with *(int32_t *)...

git-svn-id: https://svn.eduke32.com/eduke32@2346 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:24:28 +00:00
helixhorned 17ba2664f9 Mapster32: don't use lazy tile loading with r_hightile=0.
git-svn-id: https://svn.eduke32.com/eduke32@2345 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-16 19:24:09 +00:00
helixhorned b04e743236 Fix use of an uninitialized variable in P_FindWall->FindDistance2D with noclip.
git-svn-id: https://svn.eduke32.com/eduke32@2344 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:14:07 +00:00
helixhorned 967a3ec697 engine.c: replace 0xXXXXXXXX literals with INT32_MIN/MAX; whitespace changes.
git-svn-id: https://svn.eduke32.com/eduke32@2343 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:13:53 +00:00
helixhorned 53d9264f92 Fix a couple of out-of-bounds accesses when roaming around with noclip.
- guard cansee() against negative sectnums (return 0 immediately), since
  it's often called with the player sectnum as one argument
- in resetpspritevars(), don't inset APLAYER sprite if sectnum < 0, which
  can happen if a map is started in void space accidentally (e.g. from
  the editor)
- two checks before accessing sector[] with a player sectnum

git-svn-id: https://svn.eduke32.com/eduke32@2342 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:13:38 +00:00
helixhorned 5f506ec0f6 Fix sprite rendering glitches with r_usenewaspect=1 in 8-bit mode.
git-svn-id: https://svn.eduke32.com/eduke32@2341 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-14 23:13:16 +00:00
helixhorned 1e2125ce29 Make 5th mouse button functional in Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2340 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-13 21:38:16 +00:00
helixhorned f89d73504d Draw HANDHOLDINGLASER and ~ACCESS with guniqhud=200 and 201, respectively.
This fixes updateanimation picking up foreign (and thus potentially oob)
frame numbers at "3: c > n".

git-svn-id: https://svn.eduke32.com/eduke32@2339 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-13 21:38:00 +00:00
helixhorned 747cb925db Remix mdsprite.c's updateanimation() to look prettier and clearer.
Specifically,
 - rearrange conditionals
 - factor out constant expressions
 - add a couple of debugging printfs for extraordinary events (oob frames)
 - add VERIFY comments for implicit assertions I'd like to verify sometime

Also, one calloc -> malloc.

git-svn-id: https://svn.eduke32.com/eduke32@2338 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-13 21:37:46 +00:00
helixhorned 5f23cb6bcd Debugging helper disabling a.nasm calls with OpenGL renderers.
Uncomment #define DEBUG_VALGRIND_NO_SMC in duke3d.h to be able to
 valgrind --smc-check=none (or the default stack-only)
with Polymost and Polymer renderers.

git-svn-id: https://svn.eduke32.com/eduke32@2337 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-12 13:47:33 +00:00
helixhorned 8ab0fbf7f4 Patch up out-of-bounds access (r/w) when mixing 16-bit stereo *source* data.
... by allocating two bytes more for the mixing buffers.

git-svn-id: https://svn.eduke32.com/eduke32@2336 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-12 13:47:15 +00:00
helixhorned 0843ef2e93 Fix uninitialized mem access in dorotatesprite with thin tiles (e.g. 3085).
git-svn-id: https://svn.eduke32.com/eduke32@2335 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-12 13:46:57 +00:00
helixhorned 09addc955c jmact/control.c: rewrite strange looking loop.
git-svn-id: https://svn.eduke32.com/eduke32@2334 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-11 11:52:33 +00:00
helixhorned f872d556d8 Draw translucent black background only when playing (back a demo or oneself).
git-svn-id: https://svn.eduke32.com/eduke32@2333 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-11 11:52:19 +00:00
helixhorned ca30952b21 Fix menu text not drawing when not playing (back), introduced in r2326.
git-svn-id: https://svn.eduke32.com/eduke32@2332 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-11 11:51:48 +00:00
helixhorned f5ed4014df Fix zero-size calloc when enumerating a joystick with no hats in SDL.
git-svn-id: https://svn.eduke32.com/eduke32@2331 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-11 11:51:34 +00:00
helixhorned 15532fa96a Remove a couple of redundant declarations.
git-svn-id: https://svn.eduke32.com/eduke32@2330 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:45:38 +00:00
helixhorned ebd7fc402b Lunatic: interface to events.
git-svn-id: https://svn.eduke32.com/eduke32@2329 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:45:18 +00:00
helixhorned 4a00423c89 Add some #includes to gameexec.h and sector.h so that they can be included directly
git-svn-id: https://svn.eduke32.com/eduke32@2328 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:44:45 +00:00
helixhorned aee01a4958 Use a tokenlist for the event names and add tokenlist typedef to gamedef.h.
git-svn-id: https://svn.eduke32.com/eduke32@2327 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:44:26 +00:00
helixhorned 1ada6d0529 Make r_maxfps functional in demo playback.
git-svn-id: https://svn.eduke32.com/eduke32@2326 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:44:09 +00:00
helixhorned 968a999356 Coalescle codes for dnkroz and dncgs cheats.
git-svn-id: https://svn.eduke32.com/eduke32@2325 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:43:55 +00:00
helixhorned 3f2c54d9e8 Factor out identical (except for params) pieces of code of G_CheatGetInv().
git-svn-id: https://svn.eduke32.com/eduke32@2324 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:43:40 +00:00
helixhorned dbada3c947 Fix zero-size calloc when enumerating a joystick with no hats in Windows.
git-svn-id: https://svn.eduke32.com/eduke32@2323 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:43:21 +00:00
helixhorned 75436815c3 Revert r2303 functionality ("Don't wait for pain tinting to subside...")
It was causing update issues when many tints were applied simultaneously,
like being shot and spit at by enforcers while being on rails barefeet.
Also, the GL modes were calling gltexinvalidate8() when picking up goodies
or being hurt with that change, so it needs much more thought.

git-svn-id: https://svn.eduke32.com/eduke32@2322 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:43:06 +00:00
helixhorned 34000a9ed0 Factor out two pieces of identical code in actors.c into A_HandleBeingSpitOn().
This fixes a bug in passing: 'int32_t j' was assigned to as a temporary inside
one instance of the code, but used as if it were the previous sprite index
further on.  Would only happen with projectiles that "work like" both SPIT
and RPG_IMPACT.

git-svn-id: https://svn.eduke32.com/eduke32@2321 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-09 22:42:51 +00:00
helixhorned 5846d73d30 Probably fix crash when reaching light count limit in G_MoveEffectors SE50 code.
git-svn-id: https://svn.eduke32.com/eduke32@2320 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-08 11:01:03 +00:00
helixhorned 997375bd20 Lunatic: use enum constants
git-svn-id: https://svn.eduke32.com/eduke32@2319 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-08 11:00:48 +00:00
helixhorned 103ee7a40b rotatesprite(..., windowx1,windowy1,windowx2,windowy2) --> rotatesprite_win
git-svn-id: https://svn.eduke32.com/eduke32@2318 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:35:00 +00:00
helixhorned 43c5fc2f34 Lunatic: a bit rearrangement, getbunch.
git-svn-id: https://svn.eduke32.com/eduke32@2317 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:34:39 +00:00
helixhorned 00b4dadd98 game.c: trivial tweaks to reduce code duplication (which is hard on the eyes)
git-svn-id: https://svn.eduke32.com/eduke32@2316 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:34:22 +00:00
helixhorned b8c2d13f23 Mapster32: fix crash with 'vidmode <bpp>' introduced in r2311.
git-svn-id: https://svn.eduke32.com/eduke32@2315 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:34:08 +00:00
helixhorned 1d0cb07167 Factor out four instances of identical code into M32_DrawRoomsAndMasks().
git-svn-id: https://svn.eduke32.com/eduke32@2314 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 21:33:52 +00:00
helixhorned a04e15082b EDuke32: Various menu tweaks and one fix.
- make PGUP/PGDN and HOME/END behave as expected across all menus
- in keyboard/mouse button mapping menu, draw function names that have been given
  custom names via CON with pal 8 for easier recognition
- fix tinting of function names in mouse button mapping menu

git-svn-id: https://svn.eduke32.com/eduke32@2313 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 14:30:54 +00:00
helixhorned 00b852fe37 EDuke32: When in menus, always draw a black (33%) translucent background.
Internally, there's a new function fade_screen_black() that implements the
fading more efficiently than calling rotatesprite for classic, and uses
tile 0 (assumed to have at least 64x32 size) in the GL modes.

The black background of the user map selector is still done with rotatesprite
and tile BLANK in every renderer.

git-svn-id: https://svn.eduke32.com/eduke32@2312 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 14:30:39 +00:00
helixhorned 7b09accdce Check 'bpp' parameter to vidmode OSD command in EDuke32.
So that the game won't exit if you write 'vidmode 4' when intending
'setrendermode 4'.

git-svn-id: https://svn.eduke32.com/eduke32@2311 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 14:30:17 +00:00
helixhorned e59e7f0f3c Lunatic: fix interface when compiled with 'pointered' main arrays. Argh!
git-svn-id: https://svn.eduke32.com/eduke32@2310 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 14:29:59 +00:00
helixhorned 6ca24a0543 Fix not-initialized variable warning in 'soundanims' CON token parser.
git-svn-id: https://svn.eduke32.com/eduke32@2309 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-04 14:29:41 +00:00
helixhorned 99e08bf441 legibility improvements: rotatesprite(..., 0,0,xdim-1,ydim-1) -> rotatesprite_fs
git-svn-id: https://svn.eduke32.com/eduke32@2308 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-02 17:35:05 +00:00
helixhorned 55699e1240 Fix an update issue with the recent screen tint retaining on palette change.
git-svn-id: https://svn.eduke32.com/eduke32@2307 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-02 17:34:30 +00:00
helixhorned 15c7460059 When loading a map and in a few other places, reset screen tinting.
git-svn-id: https://svn.eduke32.com/eduke32@2306 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-02 17:34:16 +00:00
helixhorned 20741efd3b Fix a sector[-1] access when starting to draw a wall in an empty map.
git-svn-id: https://svn.eduke32.com/eduke32@2305 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-01 21:51:26 +00:00
helixhorned 39509680b6 Fix demo progress bar in OpenGL modes by adding bit 1024 to rotatesprite calls.
The problems still remains that rotatesprite behaves differently in classic and
OpenGL modes with clipping boundaries specified (and maybe in some other cases)

git-svn-id: https://svn.eduke32.com/eduke32@2304 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-30 21:19:13 +00:00
helixhorned 04e19dd942 Don't wait for pain tinting to subside when changing a base palette.
This means that when e.g. emerging from water hurt will change the
palette instantly, but because bit 16 is added to the P_SetGamePalette
call, the tinting is retained.

git-svn-id: https://svn.eduke32.com/eduke32@2303 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-30 21:18:59 +00:00
helixhorned 021126045f Mapster32: tweak dragging a single sprite so that they can be dragged 'uphill'.
The implementation uses the recently introduced updatesector_onlynextwall when
setspritez fails.

git-svn-id: https://svn.eduke32.com/eduke32@2302 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-30 18:25:13 +00:00
helixhorned e0163fcbcd Make savegames between dynamicremap-enabled and -disabled builds compatible.
Of course, only when the mod/TC in question doesn't use that feature.

git-svn-id: https://svn.eduke32.com/eduke32@2301 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-29 21:46:44 +00:00
terminx 5bc595ab89 Dynamic tile remapping shouldn't actually be disabled in synthesis builds, whether the source allows it to be compi
led out or not. Removing features that certain mods may depend on to operate correctly without throwing any kind of
 error or warning at startup other than a logged message is bad.


git-svn-id: https://svn.eduke32.com/eduke32@2300 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 15:16:14 +00:00
helixhorned 75538bc8e1 add one line forgotten with dynamictileremap disabling
git-svn-id: https://svn.eduke32.com/eduke32@2299 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:38:54 +00:00
helixhorned d3c67a8192 Lunatic: sectorsofbunch iterator, error(..., 2), temp 'ud' access
git-svn-id: https://svn.eduke32.com/eduke32@2298 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:38:41 +00:00
helixhorned 283e8d053f Conditionally compile out the dynamic-to-static tile remapping feature.
git-svn-id: https://svn.eduke32.com/eduke32@2297 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:38:23 +00:00
helixhorned 99f1fcb6c2 Move inithashnames() and freehashnames() declarations into namesdyn.h.
git-svn-id: https://svn.eduke32.com/eduke32@2296 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:37:56 +00:00
helixhorned d2ffed7b6b Fix and clean up dynamic-to-static tile remapping source.
git-svn-id: https://svn.eduke32.com/eduke32@2295 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:37:39 +00:00
helixhorned 289476e7bd Lunatic: prohibit initial assigns creating new globals, add some must-fail tests
git-svn-id: https://svn.eduke32.com/eduke32@2294 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:37:24 +00:00
helixhorned a32872276d kplib.c without asm: I see an uninitialized access here, valgrind does not?
git-svn-id: https://svn.eduke32.com/eduke32@2293 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:37:08 +00:00
helixhorned 0f36ef92ee A couple of Makefile tweaks for clang 3.1 from SVN, and a workaround
for an assertion failure with clang. Really ought to file a bug report instead.

git-svn-id: https://svn.eduke32.com/eduke32@2292 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:36:52 +00:00
helixhorned 3a0734a7b0 Lunatic: fix for running with static main engine arrays.
git-svn-id: https://svn.eduke32.com/eduke32@2291 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-28 14:36:34 +00:00
helixhorned 48ec616480 Remove a couple of nested externs and #include some headers directly
... instead of relying on indirect inclusion via duke3d.h.

git-svn-id: https://svn.eduke32.com/eduke32@2290 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:03:55 +00:00
helixhorned 95e5d1e29d In Mapster32, register the 'vidmode' OSD command in non-GL builds.
git-svn-id: https://svn.eduke32.com/eduke32@2289 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:03:34 +00:00
helixhorned 2c2adee5e9 Two tweaks for USE_OPENGL=0 builds.
- Always parse 'animsounds' defs
- don't print "ignored frame/animation definition" warnings

git-svn-id: https://svn.eduke32.com/eduke32@2288 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:03:18 +00:00
helixhorned de2cbbfb47 Fix USE_OPENGL=0 build; squelch one warning.
git-svn-id: https://svn.eduke32.com/eduke32@2287 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:03:02 +00:00
helixhorned a6158ac3f6 Fix building with GCC 4.6 link-time optimization.
It looks like GCC doesn't honor the 'used' attribute with LTO. This is
"fixed" by declaring the variables in question with external linkage
(i.e. removing the 'static').  I consider such behavior a GCC bug, though.

git-svn-id: https://svn.eduke32.com/eduke32@2286 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:02:45 +00:00
helixhorned 6c405100ac Make sdlayer.c's timerticspersec an 'int32_t' to match the declaration.
git-svn-id: https://svn.eduke32.com/eduke32@2285 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-27 15:02:25 +00:00
helixhorned d6530a862f Route the 5th mouse button to the game; bump savegame version.
The "double-click button4" had to make way for MOUSE5 in the button binds menu,
but I don't think anyone cares.  Savegame compatibility was actually silently
broken with the MAXTILES update earlier, but I forgot updating the version...

git-svn-id: https://svn.eduke32.com/eduke32@2284 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-26 21:58:55 +00:00
helixhorned da218f7e65 small correction of a memory-clearing line in namesdyn.c
git-svn-id: https://svn.eduke32.com/eduke32@2283 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-26 21:58:39 +00:00
helixhorned 98ffd6f00c Rearrange 'struct hicreplc_t' members so that no padding is inserted on x64.
git-svn-id: https://svn.eduke32.com/eduke32@2282 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-26 21:58:25 +00:00
helixhorned 143ec24cb4 engine.c cleanup, making some variables static mostly
git-svn-id: https://svn.eduke32.com/eduke32@2281 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-26 21:58:08 +00:00
helixhorned c657588658 Fix a potential sector[-1] access when drawing a masked wall in Polymost.
git-svn-id: https://svn.eduke32.com/eduke32@2280 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-26 21:57:51 +00:00
helixhorned f96cc343a2 Fix the insert cicle wall-points bug reported by Norvak.
git-svn-id: https://svn.eduke32.com/eduke32@2279 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-24 18:07:36 +00:00
helixhorned 5f12ab7f53 Fix sprite[-1] access when aborting playing a sound in Mapster's Sound Index.
Also a couple of other cleanup lines... might need more though, I'm not sure
it's all good there.

git-svn-id: https://svn.eduke32.com/eduke32@2278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-23 19:13:00 +00:00
helixhorned d95511ed1d Fix sprite[] access with indices > MAXSPRITES in Polymer model drawing code.
Internally, updateanimation() now takes a third parameter 'lpal'.

git-svn-id: https://svn.eduke32.com/eduke32@2277 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-22 17:18:49 +00:00
helixhorned 775eff0344 Mapster32: make sector flipping (X/Y) work properly with TROR.
git-svn-id: https://svn.eduke32.com/eduke32@2276 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 22:12:11 +00:00
helixhorned 7a4c9253c5 astub.c: remove some tabs in the code
git-svn-id: https://svn.eduke32.com/eduke32@2275 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 22:11:55 +00:00
helixhorned 661e85155b Mapster32: always show highlighted sprites in 2D mode, even in a gray sector.
git-svn-id: https://svn.eduke32.com/eduke32@2274 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 22:11:40 +00:00
helixhorned bb1070b795 Fix a potential wall[-1] access in Mapster32.
git-svn-id: https://svn.eduke32.com/eduke32@2273 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 15:48:03 +00:00
helixhorned 7a893b8ec4 minor engine cleanup.
- enclose glbuild.h in #idndef ... sentinels
- engine.c: remove unused variable 'pageoffset', make 'lastx' static
- formatting

git-svn-id: https://svn.eduke32.com/eduke32@2272 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 13:24:15 +00:00
helixhorned db94366657 Use ATTRIBUTE((used)) for symbols used only in inline asm.
This may fix compilation for optimized builds with GCC or clang where
the compiler would otherwise decide that those symbols are unused.

git-svn-id: https://svn.eduke32.com/eduke32@2271 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-20 13:23:53 +00:00
helixhorned d0acd40ff8 Inreased debugging level for catching oob accesses to 'main' arrays.
If enabled, this makes the following arrays be allocated statically:
spriteext, spritesmooth, sector, wall, sprite, tsprite, while
necessarily disabling the clipshape feature (because it relies on
setting sector/wall to different malloc'd block temporarily).

To compile, pass DEBUGANYWAY=1 in addition to RELEASE=0 to 'make',
and it's really only useful with CC=clang, of course.

git-svn-id: https://svn.eduke32.com/eduke32@2270 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 23:17:34 +00:00
helixhorned ba25d9a678 Fix a problem in G_DrawRooms where an sectnum updated to -1 may be used as index.
git-svn-id: https://svn.eduke32.com/eduke32@2269 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 23:17:03 +00:00
helixhorned ca2d612976 Fix oob accesses when e.g. shooting tile -1. (can propagate via WEAPONx_SHOOTS)
Ideally, we would also warn when setting WEAPONx_SHOOTS to negative values, but
we'd have to intercept CON's setvar's and it wouldn't be pretty.

git-svn-id: https://svn.eduke32.com/eduke32@2268 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 21:58:23 +00:00
helixhorned a61052f807 Double MAXTILES to 30720, reduce EXTRATILES (models w/ custom pal skin) to 3840
I'm decreasing EXTRATILES because I feel that it's way overcommitted. It's the
max number of model-tiles that have their own skin for a certain palette,
like the slimer egg in the HRP.

git-svn-id: https://svn.eduke32.com/eduke32@2267 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 21:58:06 +00:00
helixhorned cd89fce9aa less trivial stuff
- fix one bound-checking line
- rewrite two lines in astub.c to potentially not overflow an int16
- make tiletovox[] an array of int16's

git-svn-id: https://svn.eduke32.com/eduke32@2266 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-19 21:57:46 +00:00