Commit Graph

2291 Commits

Author SHA1 Message Date
helixhorned b044502709 When deleting sprites, insert them at the tail (instead of head) of the freelist.
The major outside-visible change is that this fixes the sound cutoff bugs that
happened because newly-spawned sprites took the place of those whose sounds
had not yet finished playing.

Besides, there are these changes:
 - remove deletesprite{sect,stat}
 - we have a new engine variable 'tailspritefree' that keeps track of the
   sprite freelist tail
 - we need to store it in savegames and mapstates, so bump the savegame
   minor version

git-svn-id: https://svn.eduke32.com/eduke32@2470 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:07:17 +00:00
helixhorned f996995fe5 Implement changesprite{sect,stat} without temp. freelist insertion/deletion.
This is simply done by using the two list helper functions defined earlier
instead of a deletespriteX/insertspriteX pair.

git-svn-id: https://svn.eduke32.com/eduke32@2469 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:06:52 +00:00
helixhorned 4e59887198 Engine tweaks, more or less trivial stuff.
git-svn-id: https://svn.eduke32.com/eduke32@2468 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:06:37 +00:00
helixhorned 2ec4d1e150 engine.c: more changesprite{sect,stat} source up to be with the others.
git-svn-id: https://svn.eduke32.com/eduke32@2467 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:06:22 +00:00
helixhorned 60d70854c8 Remix sprite list manipulation functions.
Factor out two helper functions, do_deletesprite{sect,stat}
and do_insertsprite_at_headof{sect,stat}.

git-svn-id: https://svn.eduke32.com/eduke32@2466 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:06:07 +00:00
helixhorned 846214a164 Move insertsprite() and deletesprite() into engine.c instead of being inlined.
These operations aren't executed THAT often to warrant exposing four internal
functions.  Besides, I'll be hacking on them and need everything laid out
cleanly.  Should somebody complain, they can go change them to __fastcall or
something.

git-svn-id: https://svn.eduke32.com/eduke32@2465 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:05:51 +00:00
helixhorned a673b762d0 Remove old functions from savegame.c.
git-svn-id: https://svn.eduke32.com/eduke32@2464 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:05:33 +00:00
helixhorned b359d0dce9 engine cleanup: make pow2char and pow2long const, make voxlock static.
git-svn-id: https://svn.eduke32.com/eduke32@2463 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:05:20 +00:00
helixhorned 42f5a7d9c9 Comment and format the engine's sprite list management functions; one tweak.
In changesprite{stat,sect}, don't check for deletesprite{stat,sect} failure,
because the only way it can fail was already checked for above.  So, this is
essentially dead code elimination.

git-svn-id: https://svn.eduke32.com/eduke32@2462 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:04:56 +00:00
helixhorned d5a24b38de Remove some old comments. (sprite removal code at loadboard, bug notice)
git-svn-id: https://svn.eduke32.com/eduke32@2461 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-13 20:04:39 +00:00
hendricks266 3fc35099c3 Fix another typo in osxbuild.sh.
git-svn-id: https://svn.eduke32.com/eduke32@2460 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:57:06 +00:00
hendricks266 13fe0618bc Convenience Makefile variable for building with Clang: make CLANG=1
git-svn-id: https://svn.eduke32.com/eduke32@2459 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:49:16 +00:00
hendricks266 c5519e3fe8 More Build tools improvements:
- JFBuild ports: arttool, givedepth, and mkpalette
 - All viable tools are now built when 'make utils' is invoked, not just some
 - Revert "initprintf" hack of previous commit and replace it with "compat_tools.c"
 - Move Bstrtolower from baselayer.c to compat.c
 - Makefiles: Add start and finish messages for the tools
 - Makefiles: To prevent "-Wimplicit" from being passed to the C++ compiler, create $(*CONLYFLAGS)

git-svn-id: https://svn.eduke32.com/eduke32@2458 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:48:42 +00:00
hendricks266 d0e0738f4f Fix compiling the Build tools by:
- Adding $(EXESUFFIX) where it belongs in the Makefile.
 - Eliminating a call to initprintf() from compat.c. This may not be ideal.

git-svn-id: https://svn.eduke32.com/eduke32@2457 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:47:49 +00:00
hendricks266 858746d081 Fix JonoF's email address.
git-svn-id: https://svn.eduke32.com/eduke32@2456 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:47:04 +00:00
hendricks266 7f213b1951 osxbuild.sh:
- Generate changelog and add to zip.
 - Increase minimum version to Leopard 10.5.
 - Fix typo in usage printout.

git-svn-id: https://svn.eduke32.com/eduke32@2455 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-12 04:45:17 +00:00
helixhorned 8f8bb68ace Rename ud.clipping to ud.noclip internally for sanity.
This might now be even more confusing for users reading both the source
and CON code (where the access is necessarily still via '.clipping'),
but at least reading the source now makes sense :P

git-svn-id: https://svn.eduke32.com/eduke32@2454 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:38:50 +00:00
helixhorned c0228fa14c After executing actor or loadactor CON code, null the instruction pointer.
This is so that in the event of a crash, no CON dump will be printed if no
(actor or loadactor) CON code was actually executing at the time of the
crash, confusing the users.  Note: doesn't apply for event code.

git-svn-id: https://svn.eduke32.com/eduke32@2453 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:38:27 +00:00
helixhorned bdc02d36d9 Explicitly call A_DeleteSprite() from game code instead of relying on macro expansion.
git-svn-id: https://svn.eduke32.com/eduke32@2452 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:38:13 +00:00
helixhorned 3917e05c1e Remove non-SAMESIZE_ACTOR_T code and remaining #defines.
We've been running with same-sized actor_t for a while without problems now.
In the unlikely event (famous last words) that an issue should pop up later,
this revision should be consulted for the differences between the two versions.

git-svn-id: https://svn.eduke32.com/eduke32@2451 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:37:50 +00:00
helixhorned af2f862c85 Remove YES and NO #defines from duke3d.h since they're giving warnings on OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2450 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:37:25 +00:00
helixhorned ba9a3f9d1b Save TROR-related information into map states and bump BYTEVERSION.
git-svn-id: https://svn.eduke32.com/eduke32@2449 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:37:08 +00:00
helixhorned 6dd048dc84 Core texture mapping functions cleanup.
- forgot a glogy --> logy in a-c.c
- comment out stretchhline and slopevlin2 in a.nasm, the former also in a-c.c
- make transmaskvline2 use a uintptr_t where appropriate

git-svn-id: https://svn.eduke32.com/eduke32@2448 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:36:49 +00:00
helixhorned ea9ecf0735 Remove a couple of redundant declarations in actors.c and gameexec.c.
git-svn-id: https://svn.eduke32.com/eduke32@2447 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:36:32 +00:00
helixhorned dccb559df6 M32Script: fix twisted pstat/nstat and psect/nsect references.
git-svn-id: https://svn.eduke32.com/eduke32@2446 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 17:36:16 +00:00
hendricks266 78b006dac4 OS X: another set of new universal x86/x86_64/PPC libraries provided by LSDNinja, this time compiled under Leopard 10.5
git-svn-id: https://svn.eduke32.com/eduke32@2445 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 07:15:44 +00:00
hendricks266 5f3000522a - Makefiles: fix handling of "-Wstrict-overflow=1" to fix Leopard 10.5/Xcode 3.1.4 compatibility
- osxbuild.sh: explicitly specify "ARCH='-arch x86_64'" for 64-bit builds

git-svn-id: https://svn.eduke32.com/eduke32@2444 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 07:11:59 +00:00
plagman cdafeef732 polymer: fix animations that loop to frame 0
With VBOs enabled, the virtual pointer to the geometry of frame 0 of a model
is always NULL. This was confusing the polymer code responsible for deciding
whether to enable smooth animations or not, which meant that any animation
that would loop to frame 0 would do it as if animation interpolation was
disabled, which looks very choppy.

git-svn-id: https://svn.eduke32.com/eduke32@2443 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-11 06:52:41 +00:00
helixhorned 95cbdbd1be Rename SOUNDOWNER's (used in sound_t) member .i to .ow for easier grepping.
git-svn-id: https://svn.eduke32.com/eduke32@2442 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:22:44 +00:00
helixhorned a2328cd597 With dndebug, show the currently playing sounds.
The format is
 snd #<sound number>
 inst <instance of that sound>:
 voice <internal voice handle>,
 ow <owner's sprite ID/-1>  (this is the interesting part)

git-svn-id: https://svn.eduke32.com/eduke32@2441 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:22:22 +00:00
helixhorned 139b2086c1 Rename P_ActivateSwitch()'s 3rd argument from 'switchtype' to 'switchissprite'.
git-svn-id: https://svn.eduke32.com/eduke32@2440 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:22:03 +00:00
helixhorned 4659b691e6 Some sound source cleanup, no functional changes.
- make a couple variables static in sounds_mapster32.c
- KHz --> Hz in initialization text

git-svn-id: https://svn.eduke32.com/eduke32@2439 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:21:42 +00:00
helixhorned 58a8e36374 Clean up cache1d.c.
- make some variables static
- conditionally compile out some code with DEBUG_ALLOCACHE_AS_MALLOC
- exit(1) on failure (instead of exit(0))
- some formatting

git-svn-id: https://svn.eduke32.com/eduke32@2438 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 21:21:20 +00:00
hendricks266 fd62042489 Thoroughly revised osxbuild.sh, featuring:
- Conditional disabling of the build for each architecture
 - Conditional enabling of debug building
 - Detection of the OS X version, disabling incompatible builds and establishing a minimum version
 - Fail-safe assembly of fat binaries and the archive (each item is checked first)
 - Lovely factored 'for' loops and parameter expansion

git-svn-id: https://svn.eduke32.com/eduke32@2437 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 09:45:18 +00:00
hendricks266 27e68e85e5 Add file existence check for model skins.
git-svn-id: https://svn.eduke32.com/eduke32@2436 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 09:44:54 +00:00
hendricks266 96db75dc5e Add "echo" def parameter which prints a string to the console and log file.
Syntax: echo "Your text here."

git-svn-id: https://svn.eduke32.com/eduke32@2435 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-10 09:44:17 +00:00
hendricks266 7bcb4a1faf OS X: Since the posix_memalign function causes problems when running on 10.5, not just building, I am making this more "risky/daring" change because OS X guarantees 16 byte alignment so it should be safe.
git-svn-id: https://svn.eduke32.com/eduke32@2434 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-09 07:57:00 +00:00
hendricks266 40c5757e55 OS X: new universal x86/x86_64/PPC libraries provided by LSDNinja
git-svn-id: https://svn.eduke32.com/eduke32@2433 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-09 07:45:55 +00:00
hendricks266 92b49b6938 OS X: fix build under Leopard/Xcode 3.1.4
git-svn-id: https://svn.eduke32.com/eduke32@2432 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-09 07:43:49 +00:00
helixhorned 8b25714262 OS X: whitespace-cleanup Objective-C files. Also does TAB-->space.
git-svn-id: https://svn.eduke32.com/eduke32@2431 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 19:16:47 +00:00
helixhorned 3b89d3af08 OS X: fix and enable startup windows; enable PPC build in osxbuild.sh.
git-svn-id: https://svn.eduke32.com/eduke32@2430 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 19:16:30 +00:00
helixhorned 8c4151f8af OS X Objective-C files: NSApp -> nsapp as before for a PPC linkage fix
Note: I'm not really sure whether I'm initializing it in the right places.

git-svn-id: https://svn.eduke32.com/eduke32@2429 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 19:16:06 +00:00
helixhorned 91c13a4ee6 cleanup: remove now unused B_ATTRIBUTE_USED macro.
git-svn-id: https://svn.eduke32.com/eduke32@2428 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 19:15:18 +00:00
helixhorned 07426ccc2a Polymost: fix mirror-related oob access analogous to r1872's fix for classic.
When drawing from inside the mirror, there may be no 'bunches' (BUILD lingo,
not TROR ones) collected, but following code used the first one unconditionally.

git-svn-id: https://svn.eduke32.com/eduke32@2427 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 19:15:03 +00:00
hendricks266 9f78a773f1 Add "OSX_STARTUPWINDOW" Makefile variable to toggle the OS X startup window. Off by default.
git-svn-id: https://svn.eduke32.com/eduke32@2426 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 06:07:10 +00:00
hendricks266 93be45cb1a Fix OSX-related typos in Makefile and osxbuild.sh.
git-svn-id: https://svn.eduke32.com/eduke32@2425 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-08 06:06:00 +00:00
helixhorned dca9d1357c Optimizations and tweaks for C replacements of mhline and thline.
Hlines for masked and translucent masked ceiling/floor (sprites).

- apply the --> 'do { ... } while (--cnt)' transformation, making these
  functions iterate cnt+1 times like the asm version.  This also fixes an
  off-by-one issue where sprites or masked ceilings/floors had a one-pixel
  non-drawn line to the right.
- This time, only declare-as-local two 'extern' globals (asm1 and asm2).
  It seems that I was too eager with "localing" all file-scoped vars earlier.
  GCC is able to remove the loads from memory inside the loop by itself, whereas
  clang is not. This is not trivial, since it has to prove that the 'screen'
  pointer passed to the functions will never alias these globals.

git-svn-id: https://svn.eduke32.com/eduke32@2424 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-07 19:42:37 +00:00
helixhorned aa89dc6725 Optimize 'rainbow' background drawing in the editor with 8-bit renderer.
git-svn-id: https://svn.eduke32.com/eduke32@2423 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-07 19:42:20 +00:00
hendricks266 b1dbd58913 Fix building ebacktrace1.dll with versions of binutils/libbfd after 2.20.51-1. This removes the need to link and depend on libintl (for now).
git-svn-id: https://svn.eduke32.com/eduke32@2422 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:25:55 +00:00
hendricks266 35937454ad Fix -Wformat-security and -Wformat-extra-args warnings under clang.
git-svn-id: https://svn.eduke32.com/eduke32@2421 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:25:24 +00:00
hendricks266 3fdb7ee8fc Rewrite code for the "-rts" command line parameter to remove an unnecessary int32_t, prevent needless string copying, factor out duplicate math, centralize the default RTS name, and prevent clobbering of the RTSName CFG setting.
git-svn-id: https://svn.eduke32.com/eduke32@2420 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:24:34 +00:00
hendricks266 1c2ea1e96e Add "echo" CON command which allows the user to print a quote only to the console and log file, for debugging or informational purposes. EVENT_INIT can finally be put to use!
git-svn-id: https://svn.eduke32.com/eduke32@2419 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:24:04 +00:00
hendricks266 5b76b7dbba Remove ATTRIBUTE((used)) from gotpic[] because it only served to generate warnings when using LTO.
git-svn-id: https://svn.eduke32.com/eduke32@2418 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:23:34 +00:00
hendricks266 6e295f958b osxbuild.sh: zip -y -x "*.svn*" "*.git*"
git-svn-id: https://svn.eduke32.com/eduke32@2417 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-05 07:23:02 +00:00
helixhorned d4577fccb5 Formatting; remove 'loop has empty body' warnings with clang.
I have to admit, I like its grumbling.

git-svn-id: https://svn.eduke32.com/eduke32@2416 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:15:22 +00:00
helixhorned cd8836227f Polymost: with r_parallaxskypanning=1, clamp the sky at a constant horizon.
See E4L1 for what this means.

git-svn-id: https://svn.eduke32.com/eduke32@2415 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:15:04 +00:00
helixhorned 50375fcff2 Fix apparent horizon not being independent of viewingrange (classic/Polymost).
The apparent horizon (in units proportional to pixels by a constant factor)
was being calculated without normalizing to viewingrange, resulting a
discrepancy between the drawn and actual up/down angle with non-default
viewingranges (e.g. with r_usenewaspect=1, or when setting it from setaspect).
This also means that the center-of-aim will now be the same regardless of
the aspect.

This fixes many derived bugs:
 * inconsistency w/ crosshair when shooting a gun and aiming up/down (obviously)
 * bugs resulting from being able to look up/down too far (garbage non-slope
   texture-mapping and viewing BIGORBIT skies above the borders in classic).

Note: mods that had workaround logic for this bug will have to remove it...

git-svn-id: https://svn.eduke32.com/eduke32@2414 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:14:48 +00:00
helixhorned f12b09b512 Tweak 'dncoords' display.
added: sector extra; viewingrange and yxaspect before the main drawrooms call
removed: randomseed

git-svn-id: https://svn.eduke32.com/eduke32@2413 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:14:32 +00:00
helixhorned 9eae2b485a ATTRIBUTE((pure)) for Ptile2tile(), add a forgotten comment.
git-svn-id: https://svn.eduke32.com/eduke32@2412 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:14:18 +00:00
helixhorned fbbefc0df9 sector.c: fix a possible oob access of a local array.
git-svn-id: https://svn.eduke32.com/eduke32@2411 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:14:01 +00:00
helixhorned 5791d5e068 Clamp ud.camerahoriz after EVENT_DISPLAYROOMS (instead of before).
git-svn-id: https://svn.eduke32.com/eduke32@2410 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:13:47 +00:00
helixhorned 2dca87b80a Make 'double ghoriz' static in polymost.c.
git-svn-id: https://svn.eduke32.com/eduke32@2409 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:13:34 +00:00
helixhorned 6065fbd38c Apply transformations to nonpow2_mhline and nonpow2_thline.
This has no measureable difference. Oh well, maybe it benefits weaker
machines, since the generated loop code should definitely be prettier.

git-svn-id: https://svn.eduke32.com/eduke32@2408 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:13:16 +00:00
helixhorned bb5f118985 Optimize fade_screen_black(). 49 --> 54 fps for test scene.
git-svn-id: https://svn.eduke32.com/eduke32@2407 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:13:01 +00:00
helixhorned 823d37fb51 Apply the transformations of the previous commit to tslopevlin().
This doesn't give much, maybe 0.5 fps more, probably because the
loop body is pretty long.

git-svn-id: https://svn.eduke32.com/eduke32@2406 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:12:46 +00:00
helixhorned 792ac2fdf0 Optimization of C replacements of basic texture mapping functions, part 1
Affected functions: hlineasm4, vlineasm1, mvlineasm1, tvlineasm1.

Optimizations:
 - declare all used variables as possibly const-qualified locals in each
   function. This removes unnecessary loads from memory in the loops.
 - rewrite "for (; cnt>=0; cnt--) {...}" to "cnt++; do {...} while (--cnt);"
   in the three last ones (yes, these function iterate cnt+1 times). This
   makes them functionally equivalent to the asm versions (madness ensues for
   cnt < 0) and allows the compiler to remove one 'test' instruction at the
   end of each loop.
 - in the translucence function, replace addition by ORing

Observations (system: Core2 Duo Linux x86_64):
 With a 1680x1050 window fully covered by the respective type of wall (simple,
 masked, trans. masked), fps increases by 3-4 from the baseline of approx. 60.

git-svn-id: https://svn.eduke32.com/eduke32@2405 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:12:30 +00:00
helixhorned 5119b135d1 More utils tweaks.
- remove the objects too on 'clean'
- fix warning with 'transpal' on x64
  (generates translucency and shade tables)

git-svn-id: https://svn.eduke32.com/eduke32@2404 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:12:15 +00:00
helixhorned 147a41d296 Makefile tweaks for the utilities.
- print compilation status for building the final executable
- add 'cleanutils' target in build/Makefile
- don't link against pthread, seems unnecessary
- don't build nedmalloc.o when not requested in Makefile.common

git-svn-id: https://svn.eduke32.com/eduke32@2403 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 20:11:49 +00:00
hendricks266 60a27d6bb0 synthesis.sh:
- Exclude "Apple/lib" rather than "Apple" so that required files are not left out of the tarball.
 - Add one to $lastrevision before generating the ChangeLog so that it only includes what is new to an update.
osxbuild.sh:
 - Add stronger detection of the SVN revision by adding support for 1.7 (no longer relying on an ".svn" directory) and having a specific fallback in case the build location is neither svn nor git.
 - Echo the SVN revision to source/rev.h before the build processes and revert it afterwards.

git-svn-id: https://svn.eduke32.com/eduke32@2402 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:33:23 +00:00
hendricks266 d1a780bd40 Under Mac OS X, look for libvpx in /usr/local to add support for Homebrew in addition to MacPorts.
git-svn-id: https://svn.eduke32.com/eduke32@2401 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:57 +00:00
hendricks266 0d4e066e12 Under Mac OS X, override libsupc++ with libstdc++.
git-svn-id: https://svn.eduke32.com/eduke32@2400 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:33 +00:00
hendricks266 2eb11cc2e6 Add an explicit declaration so that Mac OS X binaries look for the Frameworks inside the app bundle before anywhere else.
git-svn-id: https://svn.eduke32.com/eduke32@2399 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:32:06 +00:00
hendricks266 56c002d3a1 Add APPLE_FRAMEWORKS Makefile variable which can be passed to the make invocation.
ex: make APPLE_FRAMEWORKS=~/Library/Frameworks

git-svn-id: https://svn.eduke32.com/eduke32@2398 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:31:37 +00:00
hendricks266 1927df852d Remove four self-assignments in backtrace.c that were added to avoid an unused parameter warning and add ATTRIBUTE((unused)) to the implicated parameters so they will not trigger the warning because they could not be removed.
git-svn-id: https://svn.eduke32.com/eduke32@2397 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:31:02 +00:00
hendricks266 27b279a1ce JFDuke3D port: OS X Startup Window, copied almost verbatim
It needs to have the sound quality box removed and the Game directory box added, possibly among other things.

git-svn-id: https://svn.eduke32.com/eduke32@2396 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:30:27 +00:00
hendricks266 56b40e233e JFDuke3D port: Display DUKETEAM.ANM at the end of episode 3 under v1.3D.
Fix for end-of-game sequence with 1.3D data, by Turrican.

git-svn-id: https://svn.eduke32.com/eduke32@2395 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-04 09:29:05 +00:00
helixhorned ef02682c94 Define strtoll to _strtoi64 on MSVC.
Usage of a search machine by Hendricks.

git-svn-id: https://svn.eduke32.com/eduke32@2394 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-01 23:36:11 +00:00
helixhorned e5a133db8b When failing to open a savegame file for writing, print the reason to the log.
git-svn-id: https://svn.eduke32.com/eduke32@2393 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-01 23:35:53 +00:00
helixhorned edb110b692 More rebust (and "correct"/expected) decimal number parsing in CON.
The replacement of atoi with strtol in r2374 had the side-effect that numbers
out of the range of a 32-bit integer were being returned as LONG_MAX/LONG_MIN
instead of being converted by taking the bits and re-interpreting them (note
that it was a coincidence that atoi behaved that way; to be strict, the
behavior was undefined and there is no regression).

Now, we implement parsing decimal integers using strtoll (with assuming
"long long" being the same as int64_t) and check in which range the number
falls.  If it's in the range (INT32_MAX <= x <= UINT32_MAX), issue a warning;
if it's not in (INT32_MIN <= x <= UINT32_MAX), warn too (though this better
ought to be an error?).  In each case, the bit representation is converted to
the CON number type (int32 to assume maximum portability) by re-interpreting
the bits [this is the same as an int/int cast, with GCC at least; more
generally, it's implementation-defined per C99].

git-svn-id: https://svn.eduke32.com/eduke32@2392 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-29 15:27:40 +00:00
helixhorned fc9609928f Make 'dommxoverlay' and 'beforedrawrooms' static in engine.c.
git-svn-id: https://svn.eduke32.com/eduke32@2391 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-27 19:40:28 +00:00
helixhorned 95324450fa Significantly speed up non-power-of-two floor sprite texture mapping functions.
(Classic renderer). We don't need 64-bit integers; also use the nice
asm version of divscale32() if possible.

git-svn-id: https://svn.eduke32.com/eduke32@2390 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-27 19:40:01 +00:00
helixhorned 4f4ca00231 osxbuild: zip -r
git-svn-id: https://svn.eduke32.com/eduke32@2389 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-26 17:38:17 +00:00
helixhorned 75ea167ce2 Fix osxbuild.sh on my setup.
git-svn-id: https://svn.eduke32.com/eduke32@2388 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-26 17:32:53 +00:00
helixhorned 925b27e3cd Try to find another mirror wall if the assigned one breaks.
This fixes mirrors consisting of more than one walls not drawing when the
first assigned mirror wall breaks. It still does not let you have more
than one mirror (i.e. mirror sectors) showing up at the same time in
the scene.  Affects classic and Polymost only.

git-svn-id: https://svn.eduke32.com/eduke32@2387 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 15:59:44 +00:00
hendricks266 f524f8f98c Update "osxbuild.sh" to reflect implementation of .app bundles on Mac OS X.
git-svn-id: https://svn.eduke32.com/eduke32@2386 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 03:31:20 +00:00
hendricks266 c24049fe2a The Mac OS X build process will now automatically copy the .app bundles to "./" and move the binaries into them.
git-svn-id: https://svn.eduke32.com/eduke32@2385 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:59:51 +00:00
hendricks266 35f18cb39b add Mac OS X .app bundles to repository
git-svn-id: https://svn.eduke32.com/eduke32@2384 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:59:13 +00:00
hendricks266 cdd1da39a8 Add the source .psd files for the EDuke32 logo and program icon to the repository. Though they are .psd, they are effectively vector because they utilize paths.
git-svn-id: https://svn.eduke32.com/eduke32@2383 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:57:59 +00:00
hendricks266 e786700212 cosmetic:
* update Windows icons to include 64x64, 128x128, and 256x256 sizes
* add "orange_icon.ico" (unused; classic orange color of logo)
* remove unused 32x32 "build_icon.bmp" file

git-svn-id: https://svn.eduke32.com/eduke32@2382 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-25 02:57:25 +00:00
helixhorned 0175562e1f Do bound check for "quick" sector/wall accesses from CON, i.e. in getvarvar.
This was causing oob sector accesses with code like this:
    getwall[hitwall].nextsector temp
    ifvarvare sector[temp].floorz sector[temp].ceilingz setvar tempb 1
(from DT's HYPERCORE).

Also validate quote indices passed to CON's quote and userquote commands at
runtime.

git-svn-id: https://svn.eduke32.com/eduke32@2381 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-24 19:51:54 +00:00
helixhorned 668774c12e Fix user quotes colored with a 2-digit number being wrongly x-aligned.
Such game text was shown starting from about the center of the screen.
The reason for the bug was this code:
  t += 1 + isdigit(*(t+2));
The sequence points here are at the beginning and end of this assignment
expression, and the updating of t may happen anywhere between these (C99
6.5.16 #3).  Please don't write such code.  When in doubt, and assignment
and reference to the same object should be split!

git-svn-id: https://svn.eduke32.com/eduke32@2380 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-24 19:51:37 +00:00
helixhorned 0919c186ba Pull the 'for (' ... ')' out of the TRAVERSE_{CONNECT,SPRITE_*} macros.
This plays more nicely with automatic formatters.  Also indent accordingly.

git-svn-id: https://svn.eduke32.com/eduke32@2379 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:33 +00:00
helixhorned 0309ba3141 QUOTE_NVG_OFF-p->heat_on --> QUOTE_NVG_OFF-!!p->heat_on in sector.c.
Because: 1) It used to be like this; 2) guard against bad CON input.

git-svn-id: https://svn.eduke32.com/eduke32@2378 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:33:09 +00:00
helixhorned 0f933a8522 Fix potential (certain?) oob access with ST28/SE21.
Encountered with Scent.map.  Since the SE21 are deleted after they have
been used, the search for them in the ST28 code in sector.c may come up
empty, in which case sector[-1] would be accessed.

git-svn-id: https://svn.eduke32.com/eduke32@2377 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 19:32:55 +00:00
helixhorned e18063beb8 Fix sprites with picnums >= MAXSPRITES not drawing in classic.
This was discovered because viewscreens (TILE_VIEWSCR) ceased being drawn
with the MAXTILES increase (reported by Hank, who also did the bisect).

git-svn-id: https://svn.eduke32.com/eduke32@2376 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-21 18:24:36 +00:00
helixhorned cf9e0490a2 Uncomment "CrosshairColor" parsing code in config.c.
Untested, but LeoD says it works.

git-svn-id: https://svn.eduke32.com/eduke32@2375 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 21:18:57 +00:00
helixhorned 8b7a4dab9b Define Batoi/Batol to strtol(...) in compat.h and use these when necessary.
That is, everyplace a user input is to be converted.  The only remaining
instance of atoi() is now atoi(s_buildDate).

git-svn-id: https://svn.eduke32.com/eduke32@2374 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 21:17:39 +00:00
helixhorned 80bd1bb4e4 engine: make neartag accept a sprite-blacklist function and use it in sector.c.
Internally, the last argument to neartag is now a pointer to a function
  int32_t (*blacklist_sprite_func)(int32_t i),
which is supposed to return 1 if sprite[i] should NOT be considered for hitting.

This is now used in the hard-coded neartag() calls in sector.c, but not in any
way in CON (there's neither a C blacklist function provided, nor is there a
possibility to define one in CON).  There, all sprites with picnums >=1 and <=10
(i.e. the effectors) will be blacklisted.  This remedies problems where such
sprites would get in the way of switches.

Note that a whitelist approach (only consider a predefined set, namely those
picnums which will be checked afterwards) has back-compatibility implications
since people may have used e.g. lotagged window sprites to cover a switch.

Also, the >=1 to <=10 range is [sic] (the static, not dynamic values are used),
since anyone redefining effector picnums is clearly out of their mind.

git-svn-id: https://svn.eduke32.com/eduke32@2373 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:54:24 +00:00
helixhorned 1ec1e3e45c Make neartag() return void instead of always 0.
git-svn-id: https://svn.eduke32.com/eduke32@2372 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:53:42 +00:00
helixhorned 1ebdcf6443 polymost.c: More informative failure message for gloadtile_cached().
git-svn-id: https://svn.eduke32.com/eduke32@2371 1a8010ca-5511-0410-912e-c29ae57300e0
2012-02-20 19:53:23 +00:00