This is done by always calling FX_PlayAuto3D() to play such sounds. It now
additionally takes a third argument 'loophow', permissible values being
FX_ONESHOT and FX_LOOP.
git-svn-id: https://svn.eduke32.com/eduke32@3631 1a8010ca-5511-0410-912e-c29ae57300e0
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
* 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
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
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
As a note, libvorbis' vorbis_comment_query() checks for tags case-insensitively.
(This was done to support the output of vgmstream's "test.exe -g".)
git-svn-id: https://svn.eduke32.com/eduke32@3273 1a8010ca-5511-0410-912e-c29ae57300e0
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
Loops are controlled by two tags in the Vorbis Comment, both in PCM samples.
LOOP_START holds the beginning of the loop, the position to which playback returns at the end of the loop.
LOOP_END is optional; it holds the end of the loop, after which the game seeks to LOOP_START. If undefined, the end of the OGG is the end of the loop. The primary purpose of LOOP_END is if you want to give your file a proper ending for listening outside the game.
To preview a looped OGG you have assembled, give it a ".logg" extension and play it using the vgmstream plugin for Winamp or foobar2000.
git-svn-id: https://svn.eduke32.com/eduke32@3218 1a8010ca-5511-0410-912e-c29ae57300e0
This reverts r3159..r3161.
Conflicts:
eduke32/build/include/compat.h
(Handled so that r3163's changes are kept applied.)
git-svn-id: https://svn.eduke32.com/eduke32@3165 1a8010ca-5511-0410-912e-c29ae57300e0
I think there's also a fix for the CON precache system breakage in here (lost it in my local tree when I started getting the C++ build working in MSVC, sorry!)
git-svn-id: https://svn.eduke32.com/eduke32@3159 1a8010ca-5511-0410-912e-c29ae57300e0
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
* 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
-Wwrite-strings is useful to detect code where string literals and e.g. alloc'd
strings are used side-by-side, potentially creating dangerous situations, or to
find uses of old, non-constified APIs. However, enabling it would still flood
the log with too many warnings. Also, GCC wrongly warns for initializations of
char arrays.
git-svn-id: https://svn.eduke32.com/eduke32@2796 1a8010ca-5511-0410-912e-c29ae57300e0
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
EVENT_SOUND: triggered upon playback of any sound, this allows the "hard coded" sounds to be altered in a context-aware fashion instead of having to resort to clunky hacks like replacing them with a blank sound effect. RETURN var
iable is set to the sound effect # of the sound to be played, or -1 to cancel playback.
EVENT_CHECKTOUCHDAMAGE: triggered in P_CheckTouchDamage() whenever the player collides with anything. Value of RET
URN is set to the result provided by clipmove() and so can be decoded in the same way. Value of RETURN when the event is over can also be manipulated to control some of the hard coded damage effects.
EVENT_CHECKFLOORDAMAGE: triggered in P_CheckFloorDamage(), RETURN is simply the picnum of the floor of the sector t
he player is in. Can be used to cancel hard coded floor damage effects or to make other tiles exhibit the same eff
ects
Other misc fixes and cleanups, including a possible workaround for Duke Plus SECTOREFFECTOR light issues wherein all SE49 and SE50 that have a statnum of STAT_EFFECTOR are simply changed to STAT_LIGHT during the STAT_EFFECTOR loop
now.
git-svn-id: https://svn.eduke32.com/eduke32@2652 1a8010ca-5511-0410-912e-c29ae57300e0
- 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
This part is a mixture of the original patch and my changes. It seems like
tueidj had some trouble
1) getting OGG to work, which is why it's conditionally compiled out
2) struggling with endianness with the mixing routines? This may be also
due to him missing to define two others BIGENDIAN macros (our code is
in need of cleanup there). Note the change in jaudiolib/src/mix.c!
Because I added my share to this part, I might have actually broken sound
mixing on big-endian platforms.
git-svn-id: https://svn.eduke32.com/eduke32@2630 1a8010ca-5511-0410-912e-c29ae57300e0
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
- 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
- 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
I'm not getting this warning (synthesis is) but I think it's justified because
the VOC block parsing code isn't terribly validating...
git-svn-id: https://svn.eduke32.com/eduke32@2364 1a8010ca-5511-0410-912e-c29ae57300e0
- Maintain a position relative to the start of the data. VOC doesn't
mandate an EOF marker (blocktype 0). If we go over the end, fake
that marker, so as to restart a looping sound or stop a one-shot one.
This fixes an uninitialized mem access with the corrupt SNAKRM.VOC.
- When encountering the EOF marker, don't read the 3 bytes of block size,
since they may not be there.
- Read blocksize by ORing and shifting the 3 bytes, not with *(int32_t *)...
git-svn-id: https://svn.eduke32.com/eduke32@2346 1a8010ca-5511-0410-912e-c29ae57300e0
playback functions. Without these, there would be an uninitialized access
in line 444 of multivoc.c (if the memory in question was allocated with malloc,
but still...)
git-svn-id: https://svn.eduke32.com/eduke32@2101 1a8010ca-5511-0410-912e-c29ae57300e0
and some VoiceNode struct members with a const, commit forgotten vorbis.c
changes.
git-svn-id: https://svn.eduke32.com/eduke32@2100 1a8010ca-5511-0410-912e-c29ae57300e0
This fixes a crash when loading a map afterwards.
Tweak a few debugging messages and some whitespace.
git-svn-id: https://svn.eduke32.com/eduke32@2068 1a8010ca-5511-0410-912e-c29ae57300e0