Commit Graph

97 Commits

Author SHA1 Message Date
hendricks266 fcf9beae6a Work-in-progress adjustment to the C code to compile under C++. It builds for me without errors using Win32 MinGW-GCC, but it still generates warning soup. No guarantees about MSVC or anything using SDL. Enable C++ by building with CPLUSPLUS=1. C remains the default and should compile with no change in setup.
Credit to Plagman for the idea and doing the work on the game side, which is included in this commit.

(Building as C++ will give us features with which we can make improvements and optimizations on the multiplayer code and Polymer.)

git-svn-id: https://svn.eduke32.com/eduke32@3116 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-05 02:49:08 +00:00
hendricks266 7e4e760e9c Fix harmless warnings in the Build tools.
git-svn-id: https://svn.eduke32.com/eduke32@3097 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:28:10 +00:00
hendricks266 f51bdc2faa Slight makefile reorganization and cleanup.
* Centralize optimization strategies in Makefile.common. This required moving detection of $(PLATFORM), which makes sense if we work on the paradigm that Makefile.common is for generic compiler setup and Makefile.shared works with libraries and things closer to the engine and game code itself.
* New Makefile variables OPTOPT (Optimization Options) and CUSTOMOPT (Custom Optimizations). OPTOPT by default contains -march, -mtune, etc. Setting this variable from Make invocation will blank these. CUSTOMOPT (Custom Optimizations) works the same but in an additive fashion, overwriting nothing. Technically CUSTOMOPT could stand for (Custom Options) and include any additional parameters sent to both linker and compiler.
* Factor out literal names of the main executables.
* The build process now prints assembler (if NOASM=0) and linker settings in addition to compiler settings.

git-svn-id: https://svn.eduke32.com/eduke32@3096 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-29 04:26:25 +00:00
terminx a5f479787f Remove built-in copy of nedmalloc and update nedmalloc.dll. Note that the built-in copy of nedmalloc hasn't been updated or enabled in a really long time as modern system allocators (Windows 7 and Linux 3.x at least) are no longer consistently beat by nedmalloc (but nor are they consistently faster). So, the dll remains for users of Windows XP because it may still improve performance there (while not likely degrading it on Vista/7).
git-svn-id: https://svn.eduke32.com/eduke32@3086 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-15 00:17:30 +00:00
hendricks266 6650f34105 Disable questionable lines from Makefile.common that were causing my build system to deep crash.
git-svn-id: https://svn.eduke32.com/eduke32@2972 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-27 03:48:27 +00:00
helixhorned 2a2f56f510 Add custom-built lean zlib and libpng and enable PNG screenshots on Windows.
Instructions on how I built the libs are in Windows/src/minipng.dfa.

git-svn-id: https://svn.eduke32.com/eduke32@2843 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-20 21:57:53 +00:00
helixhorned 57dbedf59d Makefile.common: add a couple of C warning flags.
Most notably, -Wdeclaration-after-statement.  This and -Wpointer-arith
give some warning on linux, but this is "harmless" as it's assumed that
we'll be always compiling with GCC or Clang there.

Also, erratum in the "Make ksqrt take uint32_t ..." commit:
 hypotenuse -> squared length of the hypotenuse

git-svn-id: https://svn.eduke32.com/eduke32@2797 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-01 22:11:35 +00:00
helixhorned b9c553624b For me (helixhorned), do SDL_WarpMouse even in debugging builds again.
This introduces a Makefile variable EDUKE32_MY_DEVELOPER_ID, which is
expected to come from the environment, so that minor disagreements/
preferences can be handled -- don't let it go overboard though! -- to keep
the working directory clean of stuff that one doesn't actually work on.

My ID is 805120924, i.e. "helix".

git-svn-id: https://svn.eduke32.com/eduke32@2718 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-01 20:09:27 +00:00
hendricks266 f303ac2f2a EDuke32 Wii: Ready for action!
git-svn-id: https://svn.eduke32.com/eduke32@2685 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-20 07:25:25 +00:00
helixhorned 1c530d4b2f With Clang, compile in GNU89 mode and fix clang detection in the Makefiles.
The default C99 mode is giving us linking errors from xdelta3.

git-svn-id: https://svn.eduke32.com/eduke32@2672 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 21:40:38 +00:00
helixhorned 4d3e668352 Makefile.common: comment out usage of llvm versions of ar and ranlib with clang.
These are for LLVM bitcode, I think.  In any case, they're giving me errors.

git-svn-id: https://svn.eduke32.com/eduke32@2544 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:03:51 +00:00
hendricks266 0122764017 - Makefiles:
- Fix typo, correctly adding SDL libs to the tools on OS X so that makesdlkeytrans builds.
  - Move all mention of $(LIBS) out of build/Makefile into build/Makefile.shared because no linking takes place in the engine itself so LIBS additions were lost. This should fix USE_LIBPNG=1 on Windows at least.
- Other assorted cleanup.

git-svn-id: https://svn.eduke32.com/eduke32@2523 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-24 08:30:28 +00:00
hendricks266 64595adfb2 Makefiles:
- Properly handle the architecture definition when BUILD32_ON_64=1
 - Add proper $(*LDFLAGS) to which LTO and ARCH are correctly passed.
 - Cleanup of compiler flag variables.

This should fix to some degree building of the Build tools on OS X, and it may possibly fix the crashing of the OS X x86 32-bit build.

git-svn-id: https://svn.eduke32.com/eduke32@2520 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-23 20:22:10 +00:00
hendricks266 5e19a48754 osxbuild.sh: new "tools" parameter builds the Build tools in addition to the full binaries
Makefiles: new features to facilitate above:
 - buildtools: "make printutils" is a phony which simply lists all the tools
 - $(EXESUFFIX_OVERRIDE)

git-svn-id: https://svn.eduke32.com/eduke32@2476 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-14 06:27:45 +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 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
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
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 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
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 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 a57b566c0b Add Makefile option to use the DMALLOC (debug malloc) library.
I didn't have much success in finding bugs using it, but it works
out-of-the-box on my setup, so it may be useful in the future.

git-svn-id: https://svn.eduke32.com/eduke32@2254 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-12 20:49:34 +00:00
helixhorned 3e103e435a Makefile.common: oops, -DNEBUG was in the debug build, not the release one
git-svn-id: https://svn.eduke32.com/eduke32@2239 1a8010ca-5511-0410-912e-c29ae57300e0
2012-01-07 20:37:48 +00:00
helixhorned b3474c75b2 Rewrite the savegame format in terms of the generic saving/loading system.
This makes savegames practically the same as the initial snapshot of a demo.
Saves are now named 'dukesavX.esv' (demos: 'edemoX.edm').
Additionally, many changes that couldn't/needn't be cleanly separated are added
with this commit:
 - make spriteext_t have the same size across 32/64 bit platforms (actor_t partially)
 - prevent saving/loading in MP games (it certainly didn't work and still doesn't)
 - it's time we start using assertions! Define NDEBUG for releasse builds.
 - reset savegame major and minor versions (we have a new magic string, so no conflict)

git-svn-id: https://svn.eduke32.com/eduke32@2207 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-25 15:34:06 +00:00
helixhorned 8f92cb024d Tweaks to compile the release build with clang. Now if it only would not
generate curious code like this one (Ubuntu 11.10's clang 2.9 on i386):

   0x080a57ea <+538>:   xor    %al,%al
   0x080a57ec <+540>:   test   %al,%al
   0x080a57ee <+542>:   jnz    0x80a57f2 <initgroupfile+546>
=> 0x080a57f0 <+544>:   jmp    0x80a57f0 <initgroupfile+544>
   0x080a57f2 <+546>:   shl    $0x4,%edi

git-svn-id: https://svn.eduke32.com/eduke32@2182 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-15 22:43:01 +00:00
helixhorned d806bc9fea When compiling debugging builds with clang, enable -fcatch-undefined-behavior.
git-svn-id: https://svn.eduke32.com/eduke32@2160 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-09 19:09:00 +00:00
helixhorned 6dc17eec1b Makefiles: disable a few warning categories and other switches when compiling
with clang to prevent spamming the output.

git-svn-id: https://svn.eduke32.com/eduke32@2159 1a8010ca-5511-0410-912e-c29ae57300e0
2011-12-09 19:08:47 +00:00
helixhorned a67af55153 On Windows, add command-line switch -nopause, disabling the pause key.
Hopefully this fixes the periodic pausing/unpausing that a few people
have been experiencing.
Also fix build with GCC 3.

git-svn-id: https://svn.eduke32.com/eduke32@2108 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-10 21:47:26 +00:00
helixhorned 63805a025b Fix building with both LTO and VPX support enabled. Specifically, don't use
the 'optimize' function attribute if LTO is enabled.

git-svn-id: https://svn.eduke32.com/eduke32@2107 1a8010ca-5511-0410-912e-c29ae57300e0
2011-11-10 21:47:03 +00:00
helixhorned d540f18ef4 OSX build: don't include startup window (where the hell is the nib file?); makefile bits for libpng from maxports (dynamically linked, not enabled); update osxbuild.sh so that the 64-bit build links (statically) to libvpx
git-svn-id: https://svn.eduke32.com/eduke32@2076 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-11 16:53:52 +00:00
hendricks266 05cf720c4d move Electric Fence (EFENCE) handling from build/Makefile to Makefile.common
git-svn-id: https://svn.eduke32.com/eduke32@2059 1a8010ca-5511-0410-912e-c29ae57300e0
2011-10-02 07:16:57 +00:00
helixhorned 86345f2b00 backtrace.c: add flags to open() so that the log file is opened user-r/w.
This way, crashlogs will really be appended. Additionally, print a time
 at the end of each backtrace.

winlayer.c: load ebacktrace1.dll instead of the old one
Makefile.common: when building with DEBUGANYWAY=1, don't omit frame pointers
 This will let us get a stack trace for crashes with the release build code.

git-svn-id: https://svn.eduke32.com/eduke32@2040 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-22 16:52:55 +00:00
helixhorned 4dc5d792ae enable VPX support for Windows
git-svn-id: https://svn.eduke32.com/eduke32@2038 1a8010ca-5511-0410-912e-c29ae57300e0
2011-09-21 22:38:37 +00:00
helixhorned 563d42856e Build fix for OSX/PowerPC
git-svn-id: https://svn.eduke32.com/eduke32@1935 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-20 23:04:20 +00:00
helixhorned 8b6857b360 VP8 video playback as (side-by-side) replacement of ANM moving pictures.
Usage: For an ANM file <somefile>.anm/ANM, EDuke32 looks for <somefile>.ivf, which is the VP8 stream transported by an IVF container. It can be extracted from a WebM file with e.g.

  mkvextract tracks <filename>.webm 1:<filename>.ivf
  (part of Mkvtoolnix, the Matroska toolset)

Libvpx is required, and the 'YUV'-->RGB conversion is implemented using a fragment shader, so it's for OpenGL modes only. Also, this commit doesn't enable the code.

Unfinished: sound, aspect correction for fullscreen w/ non-square pixels, ... ?
---

Make MAXNODESPERLINE in engine_priv.h actually a macro that depends on MAXYSAVES and MAXDIM instead of using the obsolete precomputed value. I think this might have been the cause for the latest patched-up overhead view crash.


git-svn-id: https://svn.eduke32.com/eduke32@1933 1a8010ca-5511-0410-912e-c29ae57300e0
2011-07-18 19:06:29 +00:00
helixhorned fdcfd8db0f also fix eduke32 on x86 and include a script for compiling all four versions, packing each into a fat binary and zipping the whole pack.
git-svn-id: https://svn.eduke32.com/eduke32@1907 1a8010ca-5511-0410-912e-c29ae57300e0
2011-06-17 13:11:19 +00:00
helixhorned 958c207622 editor and makefile tweaks
git-svn-id: https://svn.eduke32.com/eduke32@1856 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-25 11:42:07 +00:00
helixhorned a01f69c8e3 remove my mudflap related code in makefile.common
git-svn-id: https://svn.eduke32.com/eduke32@1853 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-19 18:16:41 +00:00
helixhorned 06afc4dcc5 * Comment out some practically dead code (rendmode 1 and 2, pcx screenshots), cutting some 8k from the release binary.
* Refactor two nearly identical chunks in polymost.c into one function in the hope of getting some more, but interestingly that did nothing at all. At least it's more readable this way...
* Commit, but don't enable, code for writing PNG screenshots (I'm tired of converting them every time). Requires libpng which in turn requires zlib.

git-svn-id: https://svn.eduke32.com/eduke32@1852 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-19 18:07:12 +00:00
terminx 9b0cd02e8a angry nerd rage
git-svn-id: https://svn.eduke32.com/eduke32@1850 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-19 17:59:09 +00:00
terminx 323008432a Consolidate POLYMOST preprocessor define into USE_OPENGL, remove SUPERBUILD preprocessor define, add additional mode to neartag() to skip sprite searches and speed up processing (and enable for CON_OPERATE), fix issue with nearby single instance sounds not playing due to out of range sounds blocking their playback, fix issue with settings.cfg being reset to default bindings when running a mod that specifies its own cfg base name, improve CON structure member interface read/write performance, fix a bug with CON "move" pointer validation
git-svn-id: https://svn.eduke32.com/eduke32@1820 1a8010ca-5511-0410-912e-c29ae57300e0
2011-03-04 08:50:58 +00:00
helixhorned 86eaeaa727 temporarily bump the additional space after wall[] to 1024 walltypes in the editor; display map corruption status in upper left corner in the corrupt case.
git-svn-id: https://svn.eduke32.com/eduke32@1792 1a8010ca-5511-0410-912e-c29ae57300e0
2011-02-13 15:15:37 +00:00
helixhorned 2428b11152 More OSX build fixery and printf/scanf cleanup for 64-bit systems
git-svn-id: https://svn.eduke32.com/eduke32@1791 1a8010ca-5511-0410-912e-c29ae57300e0
2011-02-12 13:25:24 +00:00
plagman 7812be9b67 Define OV_EXCLUDE_STATIC_CALLBACKS before including vorbisfile.h to avoid having some unused global structures (and warnings) around.
git-svn-id: https://svn.eduke32.com/eduke32@1770 1a8010ca-5511-0410-912e-c29ae57300e0
2011-01-16 07:19:29 +00:00
plagman 15c94e6fa2 Fix all the remaining warnings (except the warn_unused_result stuff, pass -Wno-unused-result).
git-svn-id: https://svn.eduke32.com/eduke32@1766 1a8010ca-5511-0410-912e-c29ae57300e0
2011-01-16 03:53:27 +00:00
helixhorned 00fbd8267e Strip out most duplicated Makefile stuff into Makefile.common -- this should make configuration and maintenance much less troublesome. Attention to everyone who builds their own Edukes: you may have to re-set some paths like the one to the DirectX SDK.
git-svn-id: https://svn.eduke32.com/eduke32@1739 1a8010ca-5511-0410-912e-c29ae57300e0
2010-12-19 22:29:01 +00:00