Commit Graph

4190 Commits

Author SHA1 Message Date
hendricks266 dc664fd5c6 A stab in the dark at fixing the Synthesis problems. BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4154 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-15 05:45:22 +00:00
helixhorned 4dcd167c7a LunaCON: for gamevar-already-defined warnings/errors, show old location.
Synthesis, BUILD_LUNATIC! Got the build? Good synthesis.

git-svn-id: https://svn.eduke32.com/eduke32@4153 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-12 21:03:23 +00:00
helixhorned 25081fb459 LunaCON: In lunacon.lua, make room for a couple more locals at file scope.
Also, really reset all label-related tables in reset.labels().

git-svn-id: https://svn.eduke32.com/eduke32@4152 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-12 21:03:20 +00:00
helixhorned 82fb8a0724 LunaCON: for *-already-defined style warnings/errors, show location of old def.
git-svn-id: https://svn.eduke32.com/eduke32@4151 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-12 21:03:18 +00:00
helixhorned 987eb858d3 LunaCON: add a couple of userdefs members, fix tsprite's sectnum for writing.
git-svn-id: https://svn.eduke32.com/eduke32@4150 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-12 21:03:16 +00:00
helixhorned 78d30bee9b LunaCON: implement 'ssp' command.
git-svn-id: https://svn.eduke32.com/eduke32@4149 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-12 21:03:11 +00:00
helixhorned b1d6a97db4 Mapster32: don't produce erratic behavior w/ crash when not in 3D mode.
Also, BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4148 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-11 20:33:55 +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
helixhorned 8029aceaa4 CON: add sprite pseudo-member 'isvalid', getting 1 if the sprite is valid.
And 0 otherwise. Before accessing a sprite that is not not known to be
definitely valid (e.g. a loop over all sprites from 0 to MAXSPRITES-1),
one should check for validity before accessing it in any other fashion.

git-svn-id: https://svn.eduke32.com/eduke32@4146 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-11 16:48:17 +00:00
helixhorned 92594f09c8 Lunatic: add two names forgotten for dynsymlist.
Let's BUILD_LUNATIC to see whether it still works...

git-svn-id: https://svn.eduke32.com/eduke32@4145 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:49 +00:00
helixhorned f63510cc33 In C_SetCfgName, don't use unsafe string functions with unknown-length input.
git-svn-id: https://svn.eduke32.com/eduke32@4144 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:47 +00:00
helixhorned b67c76f814 LunaCON: implement 'setcfgname'.
Factor out a block of code into C_SetCfgName() and use that from lunacon.lua.

git-svn-id: https://svn.eduke32.com/eduke32@4143 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:45 +00:00
helixhorned f620a28d74 LunaCON: on 'starttrack' with null music, issue a 'soft' error.
That is, one that doesn't break the control flow.

git-svn-id: https://svn.eduke32.com/eduke32@4142 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:42 +00:00
helixhorned 84357152eb Lunatic: fix ported A_FurthestVisiblePoint().
git-svn-id: https://svn.eduke32.com/eduke32@4141 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:40 +00:00
helixhorned 77574e30b9 LunaCON: implement NORESET flag for gamevars.
git-svn-id: https://svn.eduke32.com/eduke32@4140 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-08 18:08:37 +00:00
helixhorned ceebc8077c OSD: on non-Windows, make textmode=0 the default, just like in Windows.
This fixes some init and update anomalies: before,
 - init would always be the graphical mode (0), but writing
   merely "osdtextmode" would switch it
 - osdtextmode would not get saved to the cfg

git-svn-id: https://svn.eduke32.com/eduke32@4139 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:12 +00:00
helixhorned e19a271a86 OSD: retire OSD_GetFmt(), OSD_GetFmtPtr() and OSD_GetTextPtr() functions.
These were too much "looking into the implementation of a module" for my
taste, hence OSD_GetShadePal() earlier.

git-svn-id: https://svn.eduke32.com/eduke32@4138 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:10 +00:00
helixhorned d4c2749b94 OSD: make plain display (osdtextmode=1) colorized, too.
git-svn-id: https://svn.eduke32.com/eduke32@4137 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:09 +00:00
helixhorned 37d8cbedcc OSD: factor out getting sh/pal using format+text buffers into OSD_GetShadePal().
git-svn-id: https://svn.eduke32.com/eduke32@4136 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:08 +00:00
helixhorned 7014e94d99 textfont.c: make TAB character display blank.
This renders tweaks like r4122 unnecessary.
Also, note a "bug" with the program generating that C code.

git-svn-id: https://svn.eduke32.com/eduke32@4135 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:06 +00:00
helixhorned 794edf18ff Lunatic: add 'lua' OSD command, permitting to execute arbitrary code.
That is, everything that would be possible via scripting.

git-svn-id: https://svn.eduke32.com/eduke32@4134 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 22:56:03 +00:00
helixhorned e132073640 For demos, make savehead.savename[] carry the SVN revision number.
Also, shorten "FAILED STARTING DEMO RECORDING." message so that it fits on
the screen. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4133 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 18:21:09 +00:00
helixhorned 4cb24de24e In exprs like "Bmemcpy(&p->pos.x, &sprite[i].x, sizeof(vec3_t))", drop the ".x".
git-svn-id: https://svn.eduke32.com/eduke32@4132 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 18:21:07 +00:00
hendricks266 9286456dd1 Everybody makes mistakes.
git-svn-id: https://svn.eduke32.com/eduke32@4131 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 04:32:28 +00:00
hendricks266 851e9fc8d1 Sweeping modifications to synthesis and the package directory structure so that every potential binary is in its own package.
While we're rearranging files, ensure all SVN mime-types are set correctly.

git-svn-id: https://svn.eduke32.com/eduke32@4130 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 03:59:26 +00:00
hendricks266 d52889e5db Synthesis now outputs .7z instead of .zip and .tar.xz instead of .tar.bz2. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4129 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-04 02:35:39 +00:00
hendricks266 ccf7d2d470 Allow -g, -x, -h, -j, and for the game, -d, to take their file name after a space. This allows quotes to be used with them properly.
I updated the help windows to prefer these variants because they are superior to the -xSquished versions.
Also, factor out the command-line processing code for the above, plus con/def modules and clipmaps.

git-svn-id: https://svn.eduke32.com/eduke32@4128 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-03 04:02:23 +00:00
hendricks266 837c5c6b84 RegCloseKey when we are done with RegOpenKeyEx.
git-svn-id: https://svn.eduke32.com/eduke32@4127 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-03 04:02:01 +00:00
hendricks266 975a329fcf Update SDL2 to 2.0.1.
git-svn-id: https://svn.eduke32.com/eduke32@4126 1a8010ca-5511-0410-912e-c29ae57300e0
2013-11-02 01:41:45 +00:00
helixhorned b6475100d7 In G_SaveMapState, fix 1024-byte write beyond array bound on 64-bit platforms.
This was caused by mismatched for types mapstate_t's animateptr[] and the global
one (int32_t vs. int32_t *).

Bump BYTEVERSION.

git-svn-id: https://svn.eduke32.com/eduke32@4125 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-28 21:26:32 +00:00
helixhorned 8beb990640 m32script: when failing to load file, don't append '.m32' if already there.
So that there are no error messages like "M32 file `a.m32.m32' not found."

Also, in build.c's 'save as' code, add a bound check that would probably
always pass in practice, but looks a bit safer and may fail in very cornerly
cases.

git-svn-id: https://svn.eduke32.com/eduke32@4124 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-28 21:26:30 +00:00
helixhorned 0fdcc0a1d4 Mapster32: save r_usetileshades and r_pr_artmapping with mapster32.cfg.
git-svn-id: https://svn.eduke32.com/eduke32@4123 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-28 21:26:28 +00:00
helixhorned 491e67c1cc m32script: when printing error line, replace tabs with spaces.
git-svn-id: https://svn.eduke32.com/eduke32@4122 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-28 21:26:27 +00:00
helixhorned c2797e4b11 Mapster32: take initial map file name from ExtPreInit()->G_CheckCommandLine().
Instead of directly in build.c:app_main(). Previously, it was possible that an
argument to an option, e.g. "WGR2" with "-game_dir WGR2", would get interpreted
as the initial map to load. This in turn would attempt to execute WGR2.cfg as
sequence of OSD commands -- where that file is an EDuke32 config file instead!

Now: maps are passed without any options, e.g. "mapster32 [opts...] debug.map".
The map file name is not added to the "additional parameters" for map testing.

git-svn-id: https://svn.eduke32.com/eduke32@4121 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-28 21:26:25 +00:00
helixhorned 94e3856b76 SDL2/non-Windows: Before showing "simple message box", replace tabs with spaces.
Because the one implemented on top of X shows a special mark for tabs instead of
whitespace.
Also, in wm_msgbox(), use vsnprintf.

git-svn-id: https://svn.eduke32.com/eduke32@4120 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:25 +00:00
helixhorned 25edec9c0a LunaCON: very primitive gamevar handling logic for {save,load}mapstate.
git-svn-id: https://svn.eduke32.com/eduke32@4119 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:22 +00:00
helixhorned 6c88824792 LunaCON: in {save,load}mapstate, warn that saving/restoring gamevars is NYI.
git-svn-id: https://svn.eduke32.com/eduke32@4118 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:20 +00:00
helixhorned 65cdf97bfa SDL: Add SDL scancode -> ASCII value translation for the "key FIFO" for ESCAPE.
This fixes ESC in certain situations such as the editor map selection menu.

git-svn-id: https://svn.eduke32.com/eduke32@4117 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:16 +00:00
helixhorned 70f0100ac2 SDL: factor out 2x repeated code into keyascfifo_{isfull,insert}.
git-svn-id: https://svn.eduke32.com/eduke32@4116 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 21:12:13 +00:00
Plagman e3157f6c5e Use gcc 4.8 specifically for synthesis builds.
git-svn-id: https://svn.eduke32.com/eduke32@4115 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-27 18:14:25 +00:00
helixhorned ab7d3679df At end of G_RestoreMapState(), update g_player[].ps->i from STAT_PLAYER sprites.
This fixes a potential crash caused by violating the expected invariant
 sprite[g_player[player_index].ps->i].yvel == player_index
otherwise.

git-svn-id: https://svn.eduke32.com/eduke32@4114 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-25 21:57:09 +00:00
helixhorned 335957800b Lunatic doc: add Lua source code highlighting using GNU Source-highlight.
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4113 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-24 17:48:19 +00:00
helixhorned d9b94c772d LunaCON: implement NODEFAULT flag (1024) as session variables.
This is in contrast to C-CON, where the implications are not clearly obvious.
See this discussion/monologue:
http://forums.duke4.net/topic/955-eduke32-scripting/page__view__findpost__p__159613

Currently not implemented for session gamevars:
 - per-player, will be made a global one instead
 - per-actor, will be made a plain per-actor one instead

DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4112 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-20 12:35:06 +00:00
helixhorned 937958afef LunaCON: add necessary identifier-is-not-gamevar check.
git-svn-id: https://svn.eduke32.com/eduke32@4111 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-20 12:35:03 +00:00
terminx bee968a535 Set the SDL window icon when changing video mode
git-svn-id: https://svn.eduke32.com/eduke32@4110 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-19 22:35:36 +00:00
helixhorned 8248ef8446 CON: Add LOGO_FLAGS bits 4096-32768 to disable E1-E4 bonus scenes, respectively.
Each scene is disabled in its entirety, there's no way to disable only a
particular part. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4109 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-17 16:44:28 +00:00
helixhorned 3162a4cb46 SDL2: fix quote and pause keys.
- Add SDL scancode -> our key code map for SDL_SCANCODE_APOSTROPHE
- Remove duplicate map for SDL_SCANCODE_PAUSE

git-svn-id: https://svn.eduke32.com/eduke32@4108 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:07 +00:00
helixhorned 7791f94073 Lunatic: make it possible to build with LuaJIT 2.1, add -Lopts=profile there.
git-svn-id: https://svn.eduke32.com/eduke32@4107 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:06 +00:00
helixhorned 1b29ac6db7 build.lua: add read_basepal().
git-svn-id: https://svn.eduke32.com/eduke32@4106 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:03 +00:00
helixhorned 4cb9ab1d7c foreachmap.lua: remove the need for a space for certain '.' accesses.
That is, now it's not necessary to write e.g. "io. write" -- .xxx is
translated to <what>[i].xxx only if it's a matching member name.

git-svn-id: https://svn.eduke32.com/eduke32@4105 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:43:01 +00:00
helixhorned 78e8f476e1 build.lua: add "artfile" class, allowing to open and get pics from an ART file.
git-svn-id: https://svn.eduke32.com/eduke32@4104 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-16 19:42:59 +00:00
hendricks266 fddc700cd6 Wii: Fix wiibuild.bat so that revision numbers have the "r" prefix like they are supposed to.
git-svn-id: https://svn.eduke32.com/eduke32@4103 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 09:16:25 +00:00
hendricks266 401a73862a Wii: Fix build and add custom headers and libs to SVN. (It's helpful to set up a build system from scratch.)
DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4102 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 09:08:31 +00:00
hendricks266 9af453bb92 r4087, attempt #2: Fix "warning: iteration 1461 invokes undefined behavior [-Waggressive-loop-optimizations]" in initkpeg().
git-svn-id: https://svn.eduke32.com/eduke32@4101 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 06:17:41 +00:00
hendricks266 2cabe1ec54 Change the default SDL version to SDL2 and the default Windows RENDERTYPE to SDL.
git-svn-id: https://svn.eduke32.com/eduke32@4100 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 06:17:27 +00:00
hendricks266 1ac4c9b585 Windows: Add SDL2 headers and libraries to the repo for quick-and-easy building and static linking. (SDL2 uses the zlib license so we are in the clear.)
git-svn-id: https://svn.eduke32.com/eduke32@4099 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 06:17:07 +00:00
hendricks266 3c614fcafa Update synthesis to build and package 64-bit executables next to the 32-bit ones.
git-svn-id: https://svn.eduke32.com/eduke32@4098 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 06:16:27 +00:00
Plagman 17226ad870 Make synthesis use i686-w64-mingw32-gcc-dw2-4.8.0-linux64 + native NASM.
If you see any weird behavior in synthesis builds after this change, please
let Plagman know!

git-svn-id: https://svn.eduke32.com/eduke32@4097 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-13 03:13:53 +00:00
helixhorned b427a5f941 Fix OpenGL texture cache "leak" and slightly tweak hash string construction.
The leak happened because a struct was hashed that had uninitialized
bytes in padding inserted by the compiler. The hash string in now constructed
as concatenation of three CRC32s as 8-byte hex strings, i.e. the individual
CRC32s are padded with leading zeros.

Note to users: because of the hash change, it's sensible to delete the
'textures' and 'textures.cache' files.

git-svn-id: https://svn.eduke32.com/eduke32@4096 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 22:20:46 +00:00
helixhorned 66064a33f3 Fix mouse grabbing in SDL debugging builds.
git-svn-id: https://svn.eduke32.com/eduke32@4095 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 22:20:45 +00:00
helixhorned 4d71ed75d2 Polymer: fix ANM playback.
References:
 - r3742
 - r4038 (fixing savegame screenshots, but introducing the now fixed bug)

git-svn-id: https://svn.eduke32.com/eduke32@4094 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 22:20:43 +00:00
helixhorned 1181121729 Revert "Move CONTROL_ProcessBinds() to CONTROL_GetInput()." [r3981]
That change confounded character-based input with e.g. HUD control
under certain circumstances, see
http://forums.duke4.net/topic/6845-eduke32-savegame-annoyances/

Also, BUILD_LUNATIC ... just for the hit.sect -> hit.sector change.

git-svn-id: https://svn.eduke32.com/eduke32@4093 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 13:43:39 +00:00
helixhorned f9d597f237 Lunatic: add forgotten g_argv to dynsymlist_m32.
git-svn-id: https://svn.eduke32.com/eduke32@4092 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-11 13:43:37 +00:00
hendricks266 2ab39f2cca Clean up some GUI/WM minutiae. Should fix linking Mapster32 on *nix with HAVE_GTK=0.
git-svn-id: https://svn.eduke32.com/eduke32@4091 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-08 10:00:44 +00:00
hendricks266 d738fb7ad5 Fix the vsync menu option so that it actually works.
Variables at global scope which share a name tend to actually be the same variable. Not good when you pass such a variable to function that immediately returns if the passed parameter (the variable) equals said variable (itself).

git-svn-id: https://svn.eduke32.com/eduke32@4090 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-08 10:00:25 +00:00
hendricks266 4bc5f5cbc7 Merge a patch and suggestions from NY00123 improving SDL2 support. This fixes the flickering in OpenGL in SDL2 on Windows. It also provides a proper list of resolutions.
git-svn-id: https://svn.eduke32.com/eduke32@4089 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-08 09:59:59 +00:00
hendricks266 7b551ba4fb Fix OpenGL under SDL && Windows. (Almost. SDL 1.2 works fine, but SDL2 has an unresolved problem where OpenGL screen updates flicker over a black background.)
git-svn-id: https://svn.eduke32.com/eduke32@4088 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:06:09 +00:00
hendricks266 75b6e81a2a Fix "warning: iteration 1461 invokes undefined behavior [-Waggressive-loop-optimizations]" in initkpeg() by promoting the variables in question to int64_t.
NOTE TO TEAM MEMBERS: Please review this, as I am not sure what is actually intended here.

git-svn-id: https://svn.eduke32.com/eduke32@4087 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:54 +00:00
hendricks266 6bf0bd0c60 Windows startup window tweaks:
- Don't print osd.szCSDVersion when it is empty, preventing an extra space between the OS name and version number. (An example of what this field holds is "Service Pack 1".)
- Under SDL, allow the "console" edit field to repaint after "OK" is clicked. Important when a long def file is loading.

git-svn-id: https://svn.eduke32.com/eduke32@4086 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:41 +00:00
hendricks266 333e0f26e2 Allow wm_msgbox() to use SDL_ShowSimpleMessageBox() under SDL2.
Unfortunately, SDL2 does not (yet?) provide a Yes/No box for wm_ynbox().

git-svn-id: https://svn.eduke32.com/eduke32@4085 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:05:24 +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 d781c4ad94 Fix the RETURN and KP_ENTER keys under SDL2.
git-svn-id: https://svn.eduke32.com/eduke32@4083 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:04:16 +00:00
hendricks266 22490587f0 Fix the Classic renderer under SDL2.
git-svn-id: https://svn.eduke32.com/eduke32@4082 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:04:02 +00:00
hendricks266 4f2bc62dc2 Fix USE_OPENGL=0 build.
git-svn-id: https://svn.eduke32.com/eduke32@4081 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:03:49 +00:00
hendricks266 92b441cb11 Merge a patch from NY00123 that draws the screen to a temporary surface under the selected bit depth then blits it to a surface at the system desktop bit depth, under SDL. This allows 8-bit classic to run in fullscreen under certain *nix configurations and Windows 8.
git-svn-id: https://svn.eduke32.com/eduke32@4080 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:03:37 +00:00
hendricks266 c1bbf25700 Fix the long-standing trivial warnings in net.c.
Cognitively, so much time has passed that these unused variables would offer little help indicating the roadmap for networking. In any case, I have taken care only to comment rather than remove anything that is more than just a throwaway loop counter.

If this commit inconveniences anyone in any way, please contact me personally and I will make it right.

git-svn-id: https://svn.eduke32.com/eduke32@4079 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:03:23 +00:00
hendricks266 e7c9a0be5d Iron out all errors and warnings when compiling with MinGW-w64, targeting either 32-bit or 64-bit.
git-svn-id: https://svn.eduke32.com/eduke32@4078 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:03:11 +00:00
hendricks266 37528be6fd Update prebuilt ebacktrace1 dlls. This allows r3625 to take effect. Rejoice as the 32-bit dll built by i686-MinGW-w64 works, resulting in a 1.0 MB file instead of MinGW32's 5 MB dll.
git-svn-id: https://svn.eduke32.com/eduke32@4077 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-07 10:02:50 +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 535394abde Build tools: Fix all compiler warnings and errors with MinGW/GCC 4.8 || SDL2.
git-svn-id: https://svn.eduke32.com/eduke32@4075 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-06 07:50:16 +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
hendricks266 84e61d03bf Work around a bug in MinGW 4.8 / mingwrt-4.0 where a function named main() in misc/src/libcrt/gdtoa/qnan.c takes precedence over the proper one in src/libcrt/crt/main.c.
git-svn-id: https://svn.eduke32.com/eduke32@4073 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-06 07:49:26 +00:00
hendricks266 a831f408e4 Fix building of astub.c with MinGW 4.8.
We have to work around namespace pollution in <sys/stat.h>.

git-svn-id: https://svn.eduke32.com/eduke32@4072 1a8010ca-5511-0410-912e-c29ae57300e0
2013-10-06 07:49:10 +00:00
helixhorned b2503da051 Lunatic: rename hitdata_t member 'sect' to 'sector' for consistency. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4071 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-22 12:42:06 +00:00
helixhorned 9d21cff5d3 Lunatic: document xmath.kangvec() and hitscan().
git-svn-id: https://svn.eduke32.com/eduke32@4070 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-22 12:42:00 +00:00
helixhorned f30cc01a7a In C++ build, fix "narrowing conversion inside { } is ill-formed" warning.
This also exposes an actual issue. The sound definitions may be dynamically
remapped, in which case they are not necessarily <=255 any more.

BUILD_LUNATIC.

git-svn-id: https://svn.eduke32.com/eduke32@4069 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-21 13:38:56 +00:00
helixhorned 514a3bfd64 Prevent calling function pointers cast to an incompatible type.
Most often, this had happened when casting comparison functions for qsort()
like these: "int yax_cmpbunches(const int16_t *b1, const int16_t *b2)"
to a function pointer type expecting "const void *". Alas, this is undefined
behavior: see
http://blog.frama-c.com/index.php?post/2013/08/24/Function-pointers-in-C
and posts linked from it.

At least two cases have not been fixed:
- The savegame system maintains pointers which are either to data or a function in
  the generic "void *". This ought to be made into a union.
- Probably also:
  #define OSD_ALIAS     (int32_t (*)(const osdfuncparm_t*))0x1337

git-svn-id: https://svn.eduke32.com/eduke32@4068 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-21 13:38:44 +00:00
helixhorned d2cd8af510 Minor changes for Lunatic utils, replace missed sound flag literals with macros.
git-svn-id: https://svn.eduke32.com/eduke32@4067 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-21 13:38:07 +00:00
helixhorned eac9dd04bf Add WIP x86_64 assembly texture mapping routines.
- Currently: only tvlineasm1 and tvlineasm2, but incomplete (no reverse
  translucency, nonpow2 textures will crash)
- For System V AMD64 calling conventions; requires YASM

git-svn-id: https://svn.eduke32.com/eduke32@4066 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-21 13:37:31 +00:00
terminx d5b6496ddb Additional fix for the shareware version
git-svn-id: https://svn.eduke32.com/eduke32@4065 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-15 17:59:21 +00:00
terminx 95cf4ec90b Fix shareware version breakage introduced in r3913
git-svn-id: https://svn.eduke32.com/eduke32@4064 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-15 16:00:55 +00:00
terminx b16c929170 Clear GL depth buffer before drawing a frame in Polymost. This should fix the issue with skies in the Duke64 TC.
git-svn-id: https://svn.eduke32.com/eduke32@4063 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-14 17:59:01 +00:00
terminx 37265689cf Add support for "orig_sizex" and "orig_sizey" parameters to "texture" block in def files. This is the same as using "dummytile" before defining a texture. Needed for compatibility with the .def files from Megaton, not because I like arbitrarily adding extranneous shit. :p
git-svn-id: https://svn.eduke32.com/eduke32@4062 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-14 17:58:46 +00:00
helixhorned c7f8dc6efd Revert "Prettify the DEF progress meter by relocating '\n' en masse."
This reverts commit c7e51147f1869d42fc8365f748bb8f6bd4c6fc2f. [r3835]

Conflicts:
	eduke32/build/src/defs.c
[Dunno what caused this, but I cleaned this out. Also, the change from
build.c was not reverted.]

git-svn-id: https://svn.eduke32.com/eduke32@4061 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-13 20:23:59 +00:00
helixhorned 161217a59a Polymer: in model preprocessing, implement cos/sin by table lookup.
This reduces the proportion of time the trig calculations take of the whole
preprocessing from 50% to about 13%.

git-svn-id: https://svn.eduke32.com/eduke32@4060 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-13 20:23:56 +00:00
helixhorned e94fa7f70f Lunatic: make hitscan accept ray as vector, add xmath.kangvec.
Also, add hitscan test to test.lua -- a crosshair-like sprite is spawned
and continuously updated to the position of where the player aims at.

git-svn-id: https://svn.eduke32.com/eduke32@4059 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-13 20:23:54 +00:00
helixhorned 694975b2f5 Polymost: make spriteext[].{x,y,z}off independent of xdimen/viewingrange/aspect.
The offsets (that will translate the axes for .pitch/.roll rotation) were
calculated improperly with screen sizes other than 1280 x 1024 and were
dependent on other related variables. The fix proceeded empirically, i.e. mostly
trial, error, and some educated guesswork. (It's telling that the magic constant
1280 is needed.)  A test for Lunatic is added to test.lua that will rotate
SEENINES.
Bug pointed out by Mblackwell.

git-svn-id: https://svn.eduke32.com/eduke32@4058 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-13 20:23:45 +00:00
terminx 1baf9fa275 Add -usecwd parameter on Windows, to disable searching for Megaton Edition or GOG.com game data
git-svn-id: https://svn.eduke32.com/eduke32@4057 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-10 22:41:19 +00:00
helixhorned f64fdf3384 Add foreachmap.lua module 'colenemy', allow passing module name to findmaps.sh.
The 'colenemy' module searches for colored enemies in maps, excluding pal-21
liztroops. DONT_BUILD.

git-svn-id: https://svn.eduke32.com/eduke32@4056 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-10 19:17:06 +00:00
helixhorned 14467dec24 Replace literal g_sounds[].m bits with enum constants. DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4055 1a8010ca-5511-0410-912e-c29ae57300e0
2013-09-08 20:18:56 +00:00