// Example: Switch between tracks like radio stations.
getmusicposition temp
starttrackvar next_music_track
setmusicposition temp
Only implemented for Ogg Vorbis, FLAC, and XA. Consult the devs before using these commands.
git-svn-id: https://svn.eduke32.com/eduke32@4928 1a8010ca-5511-0410-912e-c29ae57300e0
This may happen if no title/end music is defined from CON.
Thanks to Zaxtor for the bug report.
git-svn-id: https://svn.eduke32.com/eduke32@4871 1a8010ca-5511-0410-912e-c29ae57300e0
VM_OnEvent() has become VM_OnEvent(), VM_OnEventWithReturn(), VM_OnEventWithDist(), and VM_OnEventWithBoth() (the latter of which is only ever used once...). Of course, this required every call to VM_OnEvent() be changed.
memberlabel_t and vmstate_t have been changed to use the regular "int" type versus explicitly specifying int32_t as they did previously. The rationale for this change is simply that it looks cleaner, and I think we should move toward just using "int" in most cases where there's no particular reason to specify an explicit data type.
Also changes CON_KILLIT to just "return" instead of "continue". DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4745 1a8010ca-5511-0410-912e-c29ae57300e0
The additional space was there all the time, so it's not understandable why
another array was necessary.
CON: for 'music', error if volume number is outside [0 .. MAXVOLUMES+1], and
in LunaCON, additionally warn if it's MAXVOLUMES+1 (0 is preferred for that).
git-svn-id: https://svn.eduke32.com/eduke32@4588 1a8010ca-5511-0410-912e-c29ae57300e0
1 compiler error.
2 compiler warnings.
1 runtime warning.
Note that at this time, CPLUSPLUS=1 LUNATIC=1 fails to build due to C++ function mangling, and Win64 Lunatic crashes.
DONT_BUILD.
git-svn-id: https://svn.eduke32.com/eduke32@4540 1a8010ca-5511-0410-912e-c29ae57300e0
... and cull code that is dead with the X*alloc() versions since they never
return NULL on requesting memory.
Use something like
git grep '[^Xx]\(m\|c\|re\)alloc *('
and
git grep '[^Xx]strdup *('
to see places where I left the B*alloc() calls intact.
BUILD_LUNATIC.
git-svn-id: https://svn.eduke32.com/eduke32@4491 1a8010ca-5511-0410-912e-c29ae57300e0
We shouldn't be using its actor[].t_data[8] because that one is used by the
sprite rotation-fixing system (which fixes STAT_FX sprites to the positions
relative to the pivot, too).
Test case source/lunatic/test/delmusicsfx.lua still passes with this
modification.
git-svn-id: https://svn.eduke32.com/eduke32@4352 1a8010ca-5511-0410-912e-c29ae57300e0
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.
git-svn-id: https://svn.eduke32.com/eduke32@4249 1a8010ca-5511-0410-912e-c29ae57300e0
It is unacceptable that yvel is on one hand modifiable without restriction from
scripting, but can be used as an array index without prior bound check in the C
code. Because that member has an overloaded meaning and is also used for
innocuous purposes such as the green color intensity of an SE light, it's
infeasible to restrict access from scripting. Consequently, we must add bound
checks on the C side. This is the first part of the effort to make .yvel safe,
adding two functions P_Get() and P_GetP(). There are a couple of other uses as
some kind of index.
git-svn-id: https://svn.eduke32.com/eduke32@4226 1a8010ca-5511-0410-912e-c29ae57300e0
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
- In S_PlaySound(), move the sound index bound check above an indexing.
- For A_CheckHitSprite(), and A_FindPlayer(), allow NULL second arg.
- In A_ShootWithZvel(), make some one-letter vars be int32_t, making
storing safeldist() results in them meaningful.
- In MaybeTrainKillEnemies(), remove two redundant checks and move another
one further up.
- Comment that SIDEBOLT1 will never be translucent as was probably intended.
- In G_MoveFX(), fix an always-true comparison.
git-svn-id: https://svn.eduke32.com/eduke32@3680 1a8010ca-5511-0410-912e-c29ae57300e0
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
This is done by introducing an additional internal bit, meaning
"play only one instance". It is set for all sounds which have bit 1
("repeat in the sound system") set at definesound time, but not those
that set bit 1 temporarily (see r3336).
git-svn-id: https://svn.eduke32.com/eduke32@3393 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
This introduces winbits.[ch] in the engine, containing layer-independent code migrated from winlayer, including nedmalloc, ebacktrace1, OS version detection, and high-resolution profiling timers.
sdlayer has been expanded to include the code from winbits under _WIN32.
All uses of RENDERTYPEWIN in the source have been examined and changed to _WIN32 (or removed) where the block in question is layer-independent.
git-svn-id: https://svn.eduke32.com/eduke32@3221 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
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
Initial determination is based purely on distance/volume, and if two qualifying sounds have the same distance/volume the one which started playback first is the one that gets the axe.
Feedback from other developers welcome.
git-svn-id: https://svn.eduke32.com/eduke32@3065 1a8010ca-5511-0410-912e-c29ae57300e0
The sound distance is the minimum of the two. Both point sources as well
as MUSICANDSFX ambient sound is handled.
git-svn-id: https://svn.eduke32.com/eduke32@2885 1a8010ca-5511-0410-912e-c29ae57300e0
The two instances in S_PlaySound3D() and S_Update() were slightly
different as far as sequencing is concerned. However, I think making
it the same has only benefits and may fix some popping sounds when
starting to play a sound and updating it with a different distance
value on the second buffer fill.
git-svn-id: https://svn.eduke32.com/eduke32@2884 1a8010ca-5511-0410-912e-c29ae57300e0