Commit Graph

302 Commits

Author SHA1 Message Date
helixhorned 7275152b86 Makefile: do '(very)clean' with a plain "rm -f some/obj/*.o".
Notes:
- In the 'clean' target, the "core*" arg to 'rm' was removed as I find it too
  unspecific. (Someone could have an unrelated file with that prefix lying
  around.)
- The targets 'clean' and 'veryclean' now echo the commands they are about
  to execute.

Also, in Makefile.common, resurrect sanitized Clang builds if DEBUGANYWAY=2
is passed (previously, that was triggered with RELEASE=0 DEBUGANYWAY=1).

git-svn-id: https://svn.eduke32.com/eduke32@4756 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-22 18:37:19 +00:00
terminx 999f789438 Fix a couple of Makefile errors Helixhorned noticed. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4713 1a8010ca-5511-0410-912e-c29ae57300e0
2014-11-02 05:34:49 +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 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
helixhorned 43fd10a7ac Makefile: on 'clean' target, unconditionally rm -f game Lunatic objects.
The 'clean' and 'veryclean' targets are usually run without environment options.
It is preferable if they clean out all object files that are possible with any.

git-svn-id: https://svn.eduke32.com/eduke32@4591 1a8010ca-5511-0410-912e-c29ae57300e0
2014-09-07 18:10:17 +00:00
hendricks266 9a4a4a627b Nuke rev.h.
Note to MSVC users: You can get the revision number if you run `make rev o=obj` with MinGW before you build.

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4565 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 08:59:58 +00:00
hendricks266 a7fb2721e4 Move code non-specific to Duke Nukem 3D from astub.c to a new m32common.c.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4561 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:44:37 +00:00
hendricks266 5237346f5b Move code non-specific to Duke Nukem 3D from source/common.c to a new build/src/common.c.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4559 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:43:46 +00:00
hendricks266 b48f3b44e3 Progress towards KenBuild Editor, part 1.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4558 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:43:16 +00:00
hendricks266 e8949e1c31 Elimininate some codedup between game.c and astub.c.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4557 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-28 06:42:28 +00:00
hendricks266 4f67f8f969 KenBuild.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4555 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-24 14:01:44 +00:00
hendricks266 e79a2fe828 MSVC build system consolidation.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4553 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-23 07:21:29 +00:00
hendricks266 3403670ada Re-add $(abspath ...) wrapping to libdirs to try and fix Synthesis.
git-svn-id: https://svn.eduke32.com/eduke32@4551 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-23 01:48:00 +00:00
hendricks266 61f31c36ad Three Mac patches from rhoenie:
-sdlayer: Apple and GTK are not mutually exclusive.
-Makefile.common: Specify WITHOUT_GTK?=1 by default.
-Makefile: Limit linking with the QuickTime framework to OS X 10.6 and below.
One fix from me:
-osxbuild.sh: Fix building tools.

git-svn-id: https://svn.eduke32.com/eduke32@4548 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 11:19:45 +00:00
hendricks266 68b56adbe2 Deal with a few common themes in downstream patches applied by OpenBSD, FreeBSD, Gentoo Linux, and possibly others.
-Respect CC and CXX if already set in the environment.
-Respect CFLAGS, CXXFLAGS, and LDFLAGS if set or specified.
-Give packagers the setting "PACKAGE_REPOSITORY=1" to prevent us from adding our own optimization parameters.

git-svn-id: https://svn.eduke32.com/eduke32@4547 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 11:19:25 +00:00
hendricks266 b332189ae5 Ball-busting Makefile restructure.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4543 1a8010ca-5511-0410-912e-c29ae57300e0
2014-07-22 07:25:54 +00:00
hendricks266 83490ade50 Fix building ivfrate.
git-svn-id: https://svn.eduke32.com/eduke32@4522 1a8010ca-5511-0410-912e-c29ae57300e0
2014-06-23 02:24:39 +00:00
hendricks266 c24c08599f Better compile timestamp handling.
git-svn-id: https://svn.eduke32.com/eduke32@4495 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-31 12:26:13 +00:00
hendricks266 5f3921fa93 Fix ebacktrace on 64-bit. New DLLs all around.
git-svn-id: https://svn.eduke32.com/eduke32@4470 1a8010ca-5511-0410-912e-c29ae57300e0
2014-05-17 12:35:46 +00:00
hendricks266 14db3b178d Build system: Detect the SVN revision and generate rev.h directly from the Makefile, if applicable.
git-svn-id: https://svn.eduke32.com/eduke32@4343 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-22 08:02:41 +00:00
hendricks266 fd3712ab22 Windows: Full library refresh.
git-svn-id: https://svn.eduke32.com/eduke32@4319 1a8010ca-5511-0410-912e-c29ae57300e0
2014-02-10 10:58:38 +00:00
helixhorned e71df2b6e3 Lunatic/m32: make Mapster23 actually start stand-alone, oops.
git-svn-id: https://svn.eduke32.com/eduke32@4238 1a8010ca-5511-0410-912e-c29ae57300e0
2014-01-02 00:08:36 +00:00
helixhorned 49de6d79b3 Lunatic/m32: include the Lua bytecode into the binary, exit if setup failed.
git-svn-id: https://svn.eduke32.com/eduke32@4237 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:52:01 +00:00
helixhorned 13c125db02 Lunatic: add 'engine' module, currently allowing to create custom shade tables.
Available in the game and editor. Provide test/shadexfog.lua, containing a
function to creating a set of 32 shade tables corresponding to different shades
of the same fog palookup table, together with some tests and convenience
functions.

Also,
- Add gv.LUNATIC_CLIENT{,_EDUKE32,_MAPSTER32}
- Add LUNATIC_FIRST_TIME in the global env for the game
- defs_m32.lua: add reload() convenience function
- Failed attempt at recreating the base shade table. It is NOT a linear ramp
  of the base palette colors to (0,0,0). That is, it's not created by
  build/util/transpal.exe!

git-svn-id: https://svn.eduke32.com/eduke32@4236 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-31 11:52:00 +00:00
helixhorned a7ed1a6fe9 Makefile: add target 'print-compiler-options'.
May come in handy at times. BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4194 1a8010ca-5511-0410-912e-c29ae57300e0
2013-12-06 18:56:46 +00:00
helixhorned 42f66ce9ca Lunatic: add 'fs' module containing 'listpath' function, 'd' in global env.
See the updated documentation for (ATM sparse) details.

git-svn-id: https://svn.eduke32.com/eduke32@4147 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-11 16:48:23 +00:00
hendricks266 db69800fd0 Split the handling of audio based on RENDERTYPE into a new variable named MIXERTYPE, allowing Windows builds to use SDL for input and rendering (RENDERTYPE=SDL) while using DirectSound and Windows' MIDI interface (MIXERTYPE=WIN [current default]) so that EMIDI works.
git-svn-id: https://svn.eduke32.com/eduke32@4084 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:03 +00:00
hendricks266 b40f0aba04 Fix ebacktrace1 under MinGW's GCC 4.8 and binutils 2.23.2.
We keep needing more and more hacks as libbfd keeps becoming dependent on additional libraries we don't need...

git-svn-id: https://svn.eduke32.com/eduke32@4076 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:02:33 +00:00
hendricks266 612284cfea Improve SDL2 support as much as I can, for now. The game compiles, links, and starts, but all three renderers either don't display correctly or crash.
To build with SDL2: make RENDERTYPE=SDL SDL_TARGET=2

git-svn-id: https://svn.eduke32.com/eduke32@4074 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-06 07:49:53 +00:00
helixhorned 77dc57aee7 When building Lunatic from synthesis, tell LuaJIT to generate PE object files.
BUILD_LUNATIC, third attempt.

git-svn-id: https://svn.eduke32.com/eduke32@4023 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-18 21:14:37 +00:00
helixhorned e947f1fe87 Lunatic: prepare Makefiles for synthesis build.
- libs and headers are expected in platform/Windows/* (not there yet)
- prefix Lua #includes with luajit-2.0/
- build bytecode objects with absolute path name (used for debug info)

git-svn-id: https://svn.eduke32.com/eduke32@4000 1a8010ca-5511-0410-912e-c29ae57300e0
2013-08-11 15:28:42 +00:00
helixhorned 5e41c1604c LunaCON: handle system gamearrays for some array commands.
- 'copy' may have them as source, 'getarraysize' works fine
- 'setarray' and 'resizearray' are obviously forbidden
- 'readarrayfromfile' and 'writearrayfromfile' is not implemented for them
  (use case?)

Also, in the Makefile: don't use realpath on directories. It may give an empty
string.

git-svn-id: https://svn.eduke32.com/eduke32@3940 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-09 18:23:43 +00:00
helixhorned 750fbb0a0e Lunatic: slight Makefile tweak for Windows preparation.
Add doc/how_to_build_lunatic.txt and doc/lpeg-lunatic.patch.

git-svn-id: https://svn.eduke32.com/eduke32@3938 1a8010ca-5511-0410-912e-c29ae57300e0
2013-07-07 20:59:14 +00:00
helixhorned 885036a6a3 Lunatic: retire 'geom' module, putting vector types into xmath.
git-svn-id: https://svn.eduke32.com/eduke32@3909 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-28 14:07:41 +00:00
hendricks266 4297507c8f Dynamicsoundremap.
git-svn-id: https://svn.eduke32.com/eduke32@3834 1a8010ca-5511-0410-912e-c29ae57300e0
2013-06-01 06:55:30 +00:00
helixhorned 4781eecdb4 LunaCON: partially sync with r3803, link with lpeg.a (update to LPeg 0.12).
For pre-1.3 CONs, determining the older script version with gamestartup and/or
definelevelname is not implemented.

git-svn-id: https://svn.eduke32.com/eduke32@3806 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-24 13:54:29 +00:00
helixhorned 0d79372216 Lunatic: prototypical gamevar serialization, currently very CON-centric.
git-svn-id: https://svn.eduke32.com/eduke32@3796 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-20 19:31:42 +00:00
helixhorned 3b65dc3a78 Lunatic: first prototype of map-text saving.
git-svn-id: https://svn.eduke32.com/eduke32@3733 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-06 19:43:34 +00:00
helixhorned 0193d7b0e5 Makefiles: do not pass $(STDCPPLIB) to final eduke32/mapster32 linking step.
git-svn-id: https://svn.eduke32.com/eduke32@3720 1a8010ca-5511-0410-912e-c29ae57300e0
2013-05-01 17:42:03 +00:00
helixhorned c298c56652 Lunatic/OS X: generate bytecode in object files from LuaJIT.
git-svn-id: https://svn.eduke32.com/eduke32@3693 1a8010ca-5511-0410-912e-c29ae57300e0
2013-04-17 20:34:59 +00:00
helixhorned 57416c541a Lunatic: add LuaJIT's 'dump' module, printing traced bytecode, IR and mcode.
git-svn-id: https://svn.eduke32.com/eduke32@3600 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-24 18:54:14 +00:00
hendricks266 ec1923b417 Wii: Fix Mapster32. It runs now.
git-svn-id: https://svn.eduke32.com/eduke32@3582 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-21 09:49:12 +00:00
terminx 3e4ea93b20 Directory cleanup. Move the "Apple", "Windows", and "Wii" directories to a new "platform" dir, move the contents of "psd" to "rsrc/source", move eobj* and obj* directories so that they're under the "source" dir.
git-svn-id: https://svn.eduke32.com/eduke32@3551 1a8010ca-5511-0410-912e-c29ae57300e0
2013-03-04 04:14:19 +00:00
helixhorned 1606c17a77 Lunatic: fixups and debugging helpers.
- add LuaJIT's 'v' module printing trace info
- translator: fix game function name definitions
- revert math.fmod -> math.modf, they are different!
- disable JIT compilation for a function we're getting strange crashes with
- Make some of DukePlayer_t's members 'bool' on the Lua side. It's way
  too easy to write something like "ps.jetpack_on" where "ps.jetpack_on~=0"
  was meant. [Background: Kyle873 observed that Duke was always floating.]
- Error out if looping in our_module(). I find this behavior more logical
  than returning true.
- fix a couple of missed FORBID variables

git-svn-id: https://svn.eduke32.com/eduke32@3530 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-28 17:30:04 +00:00
helixhorned 1685228ab7 Lunatic: compile defs.ilua as bytecode and load it from the executable.
git-svn-id: https://svn.eduke32.com/eduke32@3517 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-24 16:05:31 +00:00
hendricks266 75e5cebfff Wii: Fix build.
git-svn-id: https://svn.eduke32.com/eduke32@3494 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-18 08:48:18 +00:00
helixhorned a3b3804a08 Lunatic: more commands, timing test for xmath's sine functions.
git-svn-id: https://svn.eduke32.com/eduke32@3489 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-16 18:53:15 +00:00
helixhorned 627c0625ae Lunatic: Centralize all bound-checking in bcheck.lua.
git-svn-id: https://svn.eduke32.com/eduke32@3445 1a8010ca-5511-0410-912e-c29ae57300e0
2013-02-01 13:04:56 +00:00
helixhorned ba8c6e487d Lunatic: use bcarray types to guard accesses to arrays inside structs.
git-svn-id: https://svn.eduke32.com/eduke32@3435 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-26 17:07:44 +00:00
helixhorned f10a0fb086 Makefiles: fix wrongly stripping debug binaries...
... when 'make' is invoked like "make ... STRIP=some_strip".

git-svn-id: https://svn.eduke32.com/eduke32@3423 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-21 21:18:10 +00:00
helixhorned 17d62458f4 Makefiles: simplify how to determine whether the final binary is stripped.
Whenever it should be not, STRIP is set to the empty string.
This fixes the Lunatic RELEASE=1 build.

git-svn-id: https://svn.eduke32.com/eduke32@3422 1a8010ca-5511-0410-912e-c29ae57300e0
2013-01-20 21:17:36 +00:00
hendricks266 3933471e4b All kneel, king FLAC is here.
FLAC source from git commit 0920bc1ffb07f038b317e7e8056509fe0e4b680e, patched by me.

Windows libFLAC.a built using i686-MinGW-w64 and x86_64-MinGW-w64.

HUGE thanks to rhoenie for building the Mac fat library (ppc, i686, x86_86).

git-svn-id: https://svn.eduke32.com/eduke32@3335 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:57:24 +00:00
hendricks266 95dd57154e Clean up some file and directory structure.
* Renamed source/jaudiolib/third-party/mingw32 to source/jaudiolib/third-party/Windows.
* Moved source/jaudiolib/third-party/Windows/include to source/jaudiolib/third-party/common/include to use both on Windows and Apple.
* Deleted Apple/lib/include/{ogg,vorbis}/, see previous point.
* Deleted Apple/lib/libvorbisenc.a, 6MB saved.
* Moved Apple/lib/lib{ogg,vorbis,vorbisfile}.a to source/jaudiolib/third-party/Apple/lib, where they belong.
* Moved source files in Apple/ to source/, where they belong. (SDLMain.[mh] stay.)
* Deleted source/jaudiolib/third-party/{ogg,vorbis}.framework, not used any more.
* Renamed "StartupWinController*" to "startosx*".

git-svn-id: https://svn.eduke32.com/eduke32@3334 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-29 10:54:35 +00:00
hendricks266 0f690797f5 ebacktrace1 updates:
- Updated to use StackWalk64 function call, requiring some addition of headers from MinGW-w64 to compile with MinGW.
- Code added to support 64-bit executables: functionality added and one warning fixed.
- New DLL binaries compiled using i686-MinGW-w64 and x86_64-MinGW-w64. (Oddly, the DLL built with MinGW is 5 MB while MinGW-w64's is 1 MB.)

git-svn-id: https://svn.eduke32.com/eduke32@3299 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 05:45:29 +00:00
terminx af4ca16ddd Remove a few old references to the duke3d_w32.exe wrapper we once shipped
to facilitate compatibility with stuff like Dukester X years ago

git-svn-id: https://svn.eduke32.com/eduke32@3297 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-16 04:04:16 +00:00
hendricks266 dac94ce284 Win64 support! (Meaning it works, not that we recommend it for everyday use.)
This includes a complete Windows header and library refresh, including the addition of 64-bit compiled libs:
*libogg 1.3.0
*libvorbis 1.3.3
*zlib 1.2.7
*libpng 1.5.13
*libvpx 9a3de881c0e681ba1a79a166a86308bbc84b4acd
*SDL_mixer 1.2.12 (for RENDERTYPE=SDL)
*DirectX import libraries: dsound and dxguid (now included)

To build in 64-bit, you essentially need MinGW's MSYS (but not MinGW itself) and MinGW-w64 at the top of your PATH. The target is automatically detected using `$(CC) -dumpmachine`. The EDukeWiki will get detailed instrucitons.

All compiler and linker warnings when building in 64-bit mode have been fixed.

Remaining 64-bit to-do:
 - The ebacktrace dll does not build under 64-bit. It uses code specific to the format of 32-bit executables and will have to be ported to work with 64-bit executables. A future 64-bit version will be named ebacktrace1-64.dll.
 - RENDERTYPE=SDL crashes in SDL_mixer's Mix_Linked_Version().
 - DirectInput gives an error and does not function. This only affects joysticks, and the error never happens without any plugged in.
 - Port the classic renderer ASM to 64-bit. (Just kidding, this is way out of my league.)

This commit includes a fair bit of Makefile development spanning all platforms, including simplifying the SDLCONFIG code, fixing build on Mac OS X (thanks rhoenie!), globally factoring Apple brew/port inclusion, enforcing that all -L come before all -l, and ensuring that $(shell ) is always :='d.

In addition, I have resurrected the old GCC_MAJOR and GCC_MINOR detection using `$(CC) -dumpversion`, but I have made it failsafe in case the command fails or the version is manually specified. I have applied this new fine-grained detection where applicable, including allowing LTO, and restraining -W's to versions that support them.

git-svn-id: https://svn.eduke32.com/eduke32@3278 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:37:20 +00:00
hendricks266 9fcba228b1 Build tweaks:
Set up the use of {Windows,Apple}/{include,lib} regardless of feature toggles in Makefile.common using $(abspath ) in reference to the directory Makefile.common is in.
Add the three DirectX headers that are actually used to the repo. (from: http://alleg.sourceforge.net/files/dx9mgw.zip)
Since current MinGW versions include DirectX libs (for dynamic linking), remove "-L$(DXROOT)/lib".
The DirectX headers are no longer a separate dependency for building.
Add $(SDLROOT_OVERRIDE). $(SDLROOT) only functions for Windows and Mac OS X.
Factor handling of $(DXROOT_OVERRIDE) and $(SDLROOT_OVERRIDE) into Makefile.shared using $(abspath ).

git-svn-id: https://svn.eduke32.com/eduke32@3275 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:34:30 +00:00
hendricks266 ae59db2390 Makefiles: Replace all "ifeq ($(PLATFORM),LINUX)" with "ifeq ($(SUBPLATFORM),LINUX)" and set SUBPLATFORM=LINUX when PLATFORM equals LINUX, DINGOO, GCW, or CAANOO.
git-svn-id: https://svn.eduke32.com/eduke32@3272 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-13 02:32:59 +00:00
helixhorned fc048658dc Experimental NETCODE Makefile variable, enabled by default.
Disabling netcode compilation can be interesting on memory-constrained
systems, or those that have no means of accessing the network anyway.
Note: I'm OK with maintaining this myself, i.e. it's fine if netcode dev
breaks compilation with NETCODE=0.

git-svn-id: https://svn.eduke32.com/eduke32@3260 1a8010ca-5511-0410-912e-c29ae57300e0
2012-12-09 13:24:44 +00:00
helixhorned b850d04f8d Lunatic: Makefile tweaks, protect sprite[].picnum.
git-svn-id: https://svn.eduke32.com/eduke32@3248 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-30 18:57:50 +00:00
hendricks266 b304360c87 Remove ebacktrace1.dll from 'make all' and include a prebuilt one in package/. Build it with 'make ebacktrace'.
synthesis.sh updated.

git-svn-id: https://svn.eduke32.com/eduke32@3236 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-26 08:24:54 +00:00
hendricks266 be899ba3af For novelty, add support for RENDERTYPE=SDL under Windows.
This needs improvements to bring it up to par with winlayer, but it is functional. In particular, a good amount of code from winlayer could be used for both layers, including the profiling timers, the version printing code, and the hInstance and hModule sharing.

Known problems: the mouse cursor is not trapped, and the game starts before the startup window shows options.

git-svn-id: https://svn.eduke32.com/eduke32@3219 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-24 09:13:29 +00:00
terminx 2ab811cd9b Remove xdelta3 since it doesn't fit in with our current networking plans anymore
git-svn-id: https://svn.eduke32.com/eduke32@3193 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-16 15:40:28 +00:00
hendricks266 a418bec8c2 Tools updates:
- Eliminate use of the C++ standard library from arttool. I improved some of the program's workings but it continues to corrupt my art files in certain circumstances. (Note: Not a regression; it happens with previous revisions.)
- Construct "make utils" for the game side following the pattern of the engine.
- Move ivfrate to this new distinction.
- Minor Makefile cleanup and tweaks, mainly to facilitate CLANG=1 and to formalize text output in special cases.

git-svn-id: https://svn.eduke32.com/eduke32@3163 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-15 06:42:37 +00:00
helixhorned 3bcdc5acb8 Lunatic reorganization part 2: split into engine and editor/game parts.
On the engine side (functions starting with L_), there are now the basic
parts like state creation and running code from strings and files.
The game and editor can add to that by e.g. loading whatever they please
into the state. Their functions start with El_ and Em_, respectively.
The Lua scripts still reside in source/lunatic, even for the common ones.
This is because they will be embedded into the binaries as bytecode or
compressed source eventually, so their location on disk will be irrelevant.

git-svn-id: https://svn.eduke32.com/eduke32@3148 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-10 20:59:00 +00:00
Plagman abc3fa4e8d Fix the C++ build on Linux with LTO.
git-svn-id: https://svn.eduke32.com/eduke32@3137 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 18:05:21 +00:00
Plagman 7e62f10728 Fix synthesis fallout after ivfrate addition.
git-svn-id: https://svn.eduke32.com/eduke32@3135 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-09 16:00:37 +00:00
helixhorned 61f79336d6 Make ivfrate build standalone, Makefile tweaks.
git-svn-id: https://svn.eduke32.com/eduke32@3132 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 21:54:17 +00:00
helixhorned b2162f554d New utility ivfrate(.exe) and a couple of small VP8 changes.
The command-line utility can query and set the frame rate of IVF files, since
apparently encoders don't care too much about setting proper values in the IVF
header.  Also, add the utility to the synthesis build.

On the playback side in EDuke32, get rid of the 1/(2*fps) "correction" if the
FPS numerator is <1000 (presumably used in older encoders) and properly print
the frame rate's fractional part.

git-svn-id: https://svn.eduke32.com/eduke32@3131 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 20:17:23 +00:00
helixhorned 17bac8cb55 Lunatic: "fix" building.
git-svn-id: https://svn.eduke32.com/eduke32@3130 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-08 20:17:19 +00:00
hendricks266 a0c6fb9805 Fix linking with CLANG=1 by separating $(INVOCATION) into $(COMPILER) and $(LINKER) and removing "-x" from clang as a linker in Makefile.common. Additionally, the Build tools are now affected by CPLUSPLUS=1, for which small corrections have been made.
git-svn-id: https://svn.eduke32.com/eduke32@3122 1a8010ca-5511-0410-912e-c29ae57300e0
2012-11-06 07:49:44 +00:00
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 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
helixhorned f9e61ce37e Lunatic: fix up Makefiles, split dynsymlists.
The Makefile now has separate {GAME,EDITOR}LDFLAGS, so the correct
dynamic symbol list can be specified.

git-svn-id: https://svn.eduke32.com/eduke32@3057 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:58 +00:00
helixhorned 851c6b081d Lunatic: prototypical editor binding.
git-svn-id: https://svn.eduke32.com/eduke32@3056 1a8010ca-5511-0410-912e-c29ae57300e0
2012-10-07 15:25:52 +00:00
helixhorned 761c2d1c84 Lunatic: reflect the preceding rename in the sources.
git-svn-id: https://svn.eduke32.com/eduke32@2871 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-08 19:32:45 +00:00
helixhorned f3970f9ac7 Lunatic: clean up handing of ac/mv internally, add control module.
git-svn-id: https://svn.eduke32.com/eduke32@2864 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-06 20:00:29 +00:00
helixhorned f4c7e3f77e Lunatic: 'bitar': rewrite ops for colon syntax, serialization, set ops.
git-svn-id: https://svn.eduke32.com/eduke32@2862 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:44 +00:00
helixhorned b7cfd2fe2c Lunatic: fix build on OS X, pass LUNATIC define to build/ sources.
git-svn-id: https://svn.eduke32.com/eduke32@2860 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:38 +00:00
helixhorned 86a3603edd Lunatic: fix hex literal parsing on Windows, add two comments.
git-svn-id: https://svn.eduke32.com/eduke32@2859 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:35 +00:00
helixhorned a00f411b3b Lunatic: add 'stat' module for running statistics.
Also, rewrite the mapastats iterator and the LIZTROOP hitscan timing
in terms of that.

git-svn-id: https://svn.eduke32.com/eduke32@2858 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:32 +00:00
helixhorned fdfcca557b Lunatic: add 'randgen' module, implementing an encapsulated JKISS PRNG.
Also fix error handling path in our_require(), i.e. when loadstring fails.

git-svn-id: https://svn.eduke32.com/eduke32@2857 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:28 +00:00
helixhorned 69365f2a0b Lunatic: add 'geom' module, sporting a vec2 type and a general 'intersect' func.
git-svn-id: https://svn.eduke32.com/eduke32@2855 1a8010ca-5511-0410-912e-c29ae57300e0
2012-08-02 10:52:21 +00:00
terminx 9a69b481cf Fix for "undefined reference to `clock_gettime'" linking error on some Linux systems
git-svn-id: https://svn.eduke32.com/eduke32@2801 1a8010ca-5511-0410-912e-c29ae57300e0
2012-07-05 17:43:58 +00:00
helixhorned ed5e5b5881 Add prototypical SDL 2.X support.
Doesn't work: indexed-color modes, gamma (at least for X11), mouse wheel,
special keys like ENTER or BACKSPACE in the OSD, probably more...

In build/Makefile.shared, we now have logic to autodetect an SDL2 installed
in /usr/local, however OS X and Wii builds follow other Makefile code paths,
it seems.  Note that the matching SDL2_mixer must be used then, too.
In source/jaudiolib/src/driver_sdl.c, change the #includes from <SDL/SDL_xxx.h>
to "SDL_xxx.h".  SDL wiki says this is the most portable way, hopefully this
doesn't break builds for anyone.

git-svn-id: https://svn.eduke32.com/eduke32@2777 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-22 21:39:53 +00:00
hendricks266 d3a3c74112 Massive menu input control revamp/cleanup/factor. (added: input.[ch])
New Wii control defaults for the Wii Remote + Nunchuk and the Classic Controller. This includes new code added just so that the Home key brings up the menu in-game, reducing the need for a USB keyboard.

On the technical side, raw joystick access (comparable to what is available for keyboard and mouse) is now present in jmact, on the game side. (added: joystick.[ch])

Using this new raw joystick access, I replaced tueidj's hack to map A and B to LMB/RMB and D-Pad Up/Down to the scrollwheel.

I made the menus more friendly to mouse and joystick browsing by adding and unifying checks and clears for various buttons and gamefuncs. In fact, the majority of the time spent on this commit was tracking down problems that appeared with the factoring and trying to understand the menu system and the way input checks are precariously executed.

In addition, "Press any key or button to continue" now truly means what it says.

As a result of incorporating proper raw access into control.c instead of it directly accessing the implementaiton, the program *may* no longer be affected by joystick input when it is out of focus. This follows the pattern set by the mouse, and I think this is a positive change.

A small bonus: In the classic/old keyboard preset, the key for Show_Console has been changed from '`' to 'C' because '`' is taken by Quick_Kick.

git-svn-id: https://svn.eduke32.com/eduke32@2728 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 16:11:22 +00:00
helixhorned ae15643a73 Rename LUNATIC_ENABLE macro to just LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@2721 1a8010ca-5511-0410-912e-c29ae57300e0
2012-06-03 15:45:59 +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
terminx 83aa5d2c18 Fix building xdelta3.o
git-svn-id: https://svn.eduke32.com/eduke32@2666 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-18 02:49:03 +00:00
terminx 1c1da97378 WIP multiplayer changes, still completely broken.
git-svn-id: https://svn.eduke32.com/eduke32@2664 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-17 23:54:43 +00:00
helixhorned 88ca3a913a Lunatic: embed lpeg and the translator into the binary
git-svn-id: https://svn.eduke32.com/eduke32@2650 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-13 16:05:16 +00:00
helixhorned 008121cffd Some leftover stuff from the Wii patch.
- in actors.c, make a static array const (the original patch removed the
  staticness)
- remove one comment and change some compiled-out code
- remove commented out pre-Makefile.common stuff

Some changes were not adopted from tueidj's patch:
- whitespace cleanup
- ud.config.UseJoystick = 1 in config.c
- Makefile.common, as mentioned before
- proper read-in of g_numRealPalettes, because it was done with r2503

git-svn-id: https://svn.eduke32.com/eduke32@2632 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:41:35 +00:00
helixhorned bd8559f6c3 Patch adding Wii support by tueidj, part 2: Makefile changes
I didn't add Makefile.common, because it needs to be made conditional.

git-svn-id: https://svn.eduke32.com/eduke32@2622 1a8010ca-5511-0410-912e-c29ae57300e0
2012-05-01 12:37:53 +00:00
helixhorned ee5dd2cf32 Add common.[ch] which should be used for common non-engine types/functions/data.
As inauguration, move G_AddGroup, G_AddPath and struct strllist there.
The header is located in build/include, because in the future, code that resides
closer to (but is not strictly part of) the engine might need to be factored
into here.  The source file, however, is in the source/ directory.

git-svn-id: https://svn.eduke32.com/eduke32@2542 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 22:03:20 +00:00
hendricks266 3929d60744 OS X: Fix more warnings.
git-svn-id: https://svn.eduke32.com/eduke32@2537 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-26 05:04:21 +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 a35dc578e0 Makefiles: Add $(STATICSTDCPP) variable which the user can set to 0 or 1 to explicitly set C++ standard library linking to static or shared respectively. By default it is transparently left blank.
An effect is only really seen in the buildtools written in C++, currently just arttool.
This is mainly of interest to distributors of the buildtools to avoid missing DLL errors.

git-svn-id: https://svn.eduke32.com/eduke32@2507 1a8010ca-5511-0410-912e-c29ae57300e0
2012-03-20 19:29:11 +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