Build 4327
SVN-
Set up support for SDL2. DONT_BUILD.
-
General
Fix 32-bit MSVC builds. DONT_BUILD.
SVN handles and Git names are merged into one person.
Set up support for SDL2. DONT_BUILD.
Fix 32-bit MSVC builds. DONT_BUILD.
Networking updates.
- Added preprocessor value NETVERSION, to be incremented in the source whenever changes are made to the network protocol. - Implemented proper server-side version verification of all clients upon connection. - Implemented connection refusal when we reach MAXPLAYERS. (Should be expanded to implement server player caps.) - Protected against OOB array accesses if an invalid player id is received. - Renamed all "Recieve" to "Receive".
Fix warnings when building in C++11 mode, i.e. with CPLUSPLUS=1 CUSTOMOPT="--std=gnu++11".
Add support for x64 building and all synthesis libs (libpng/zlib, libvpx, libFLAC).
External ogg/vorbis are no longer required.
Full library refresh.
Don't crash if for some reason your CONs don't define actors like SHOTSPARK1, which has its strength value used in hardcoded behavior.
Update commented SDL2 key debug log output.
Print "32-bit"/"64-bit" along with the version number in the log.
Remove "-fpermissive" from C++ builds because we don't need it.
gltexinvalidatetype(INVALIDATE_ART) so that loading or unloading an ART set will take effect when using the OpenGL renderers.
Don't use SDL_Renderer if it is a software fallback, because that would only waste memory and speed.
Eliminate a memory leak when changing resolutions with SDL_Renderer 8-bit mode.
Introduce support for PlayStation CD-XA audio, a simple ADPCM format.
It's functional, but due to the odd 37.8 KHz nature of the format, I will need to add a resampler to the audiolib to prevent the aliasing artifacts that occur at present. I also hear clicks/pops every so often, but I do not know if a resampler would fix these as well or if they are a separate problem. Note that you cannot directly use the four XA files on the Total Meltdown disc because they each contain eight songs. They would need to be split using a utility I wrote that is outside the scope of this SVN.
Fix a harmless C++ warning. (malloc casting, for those interested)
EDuke32 has me so accustomed to straight C... using a template and pass-by-reference makes my day.
Fix the startup window freeze under SDL2+Windows when a Yes/No box was supposed to be displayed.
Reintroduce SDL_Renderer for the classic renderer so that the Steam Overlay can function with it.
Fix a case where the bonus screen would immediately end with an input press because all code between iterations of the bonus screen would execute in less than 1/120th of a second, not leaving any time for totalclock to increment.
EDuke32. Where our code runs so fast, it breaks old code.
Fix the display of the multiplayer results screen.
Run Net_SendClientInfo() after game state creation to properly set up the player's user_name.
Block off hacks for the primitive splitscreen CON mod with SPLITSCREEN_MOD_HACKS so they are no longer compiled.
These hacks could no longer be allowed to co-opt the fake multiplayer mode, used for local testing and mod development. I have half a mind to remove the hacks outright because they could be likened to drilling bolts directly into your car engine just so you could mount a bowling ball as a hood ornament. However, I don't want to take away the splitscreen hack mod from anyone who uses it, and the work done on these hacks should be useful if proper splitscreen were implemented internally using per-player input and multiple renderer/audio passes.
Add Ken's "todo list from the Build days" alongside his other documentation.
For DISABLEINLINING=1, apply __fastcall to make up for the lack of inlining.
Always run tsprites with statnum TSPR_TEMP though EVENT_ANIMATESPRITES, such as the "show opponent's weapon" in multiplayer.
SDK/Samples: Add "startpos.m32", a helper script for spawn points.
You can: -Cycle your position through all DM or coop spawn points. -Jump to the primary spawn point. -Dump full spawn point information to the log file.
Rewrite and unify the handling of the scrollwheel between layers, fixing it in the editor's 2D mode and tile selector under SDL.
The scrollwheel is unique among PC input because it has no innate "hold length". Previously, the layers gave the mousewheel a fake hold length to allow the not-necessarily-synchronous game/editor code to pick up the input before the layers marked it as "no longer pressed". This passed under Windows, but it didn't slide under SDL. Besides the two problems listed above, it also potentially limited the rate of weapon selection, where scrolling too fast would not register every clicks. [Unrelatedly, this is still the case when you scroll faster than the game's own tickrate, but addressing that would require rewriting input handling to go through a list of "events" for each tic instead of looking at overall pressed/unpressed states.]
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.
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.
RegCloseKey when we are done with RegOpenKeyEx.
Update SDL2 to 2.0.1.
Fix wiibuild.bat so that revision numbers have the "r" prefix like they are supposed to.
Fix build and add custom headers and libs to SVN. (It's helpful to set up a build system from scratch.)
DONT_BUILD.
r4087, attempt #2: Fix "warning: iteration 1461 invokes undefined behavior [-Waggressive-loop-optimizations]" in initkpeg().
Change the default SDL version to SDL2 and the default Windows RENDERTYPE to SDL.
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.)
Clean up some GUI/WM minutiae. Should fix linking Mapster32 on *nix with HAVE_GTK=0.
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).
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.
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.)
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.
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.
Allow wm_msgbox() to use SDL_ShowSimpleMessageBox() under SDL2.
Unfortunately, SDL2 does not (yet?) provide a Yes/No box for wm_ynbox().
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.
Fix the RETURN and KP_ENTER keys under SDL2.
Fix the Classic renderer under SDL2.
Fix USE_OPENGL=0 build.
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.
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.
Build tools: Fix all compiler warnings and errors with MinGW/GCC 4.8 || SDL2.
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
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.
Fix building of astub.c with MinGW 4.8.
We have to work around namespace pollution in <sys/stat.h>.
Updates to the processing of the tilefromtexture def command:
- Allow xoffset and yoffset to modified independently of a tile definition, much like texhitscan and nofullbright. (Both still default to zero when a tile is specified, to keep current behavior, and because it makes sense.) - Add actual detection of the "nofullbright" keyword, which appears to have been overlooked in r3230. - Internal: Eliminate the need for one int32_t by condensing two variables into "flags".
Patch from johnnyonflame to fix the GCW and Dingoo build process.
Force orientation bit 2 for screentext in addition to qstrdim, to match all other screen drawing commands.