Subversion Repositories eduke32

Rev

Show changed files | Details | Compare with Previous | Blame | RSS feed

Filtering Options

Rev Age Author Path Log message Diff
4762 2439d 14h hendricks266 /polymer/eduke32/source/sounds.c Fix some things when building on OS X. DONT_BUILD.  
4745 2441d 10h terminx /polymer/eduke32/source/sounds.c Mainly misc cleanups (and a fix for the C++ build), but there are a few important changes in here.

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.
 
4703 2465d 5h terminx /polymer/eduke32/source/sounds.c Clean up some player code a bit... make bobposx/bobposy a vec2_t, make fricxv/fricyv a per-player vec2_t (TODO: CON access), promote angvel in input_t to int16_t and allow for player angle changes that result in odd numbered angles (we were effectively artificially limiting the angle to 1024 values before), fix some HUD model ID stuff that should help with the weapons in the HRP, clean up a bunch of random functions (P_FireWeapon(), P_DisplayTip(), P_DisplayAccess(), P_DisplayWeapon(), P_GetInput(), etc). Also clean up G_SetupFilenameBasedMusic() to loop through flac/ogg/mid when searching for usermap music replacements. Some of this really needs a BYTEVERSION bump, but these commits aren't for synthesis to build so we're not doing it yet. DONT_BUILD.  
4699 2465d 5h terminx /polymer/eduke32/source/sounds.c More EDUKE32_PREDICT_FALSE, mostly in OSD_Printf(OSD_ERROR...) cases  
4659 2469d 19h terminx /polymer/eduke32/source/sounds.c Fix a couple of botched FindDistance3D calls  
4588 2517d 4h helixhorned /polymer/eduke32/source/sounds.c Get rid of EnvMusicFilename[] and use MapInfo[].musicfn for that.

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).
 
4585 2517d 4h helixhorned /polymer/eduke32/source/sounds.c Some cleanup around S_PlayMusic() and related functionality.  
4541 2566d 13h hendricks266 /polymer/eduke32/source/sounds.c Replace the funkily-formatted GNU.TXT with the FSF's official gpl-2.0.txt. Also, update the FSF's address in all source files that contain it.

DONT_BUILD.
 
4540 2576d 13h hendricks266 /polymer/eduke32/source/sounds.c Lunatic fixes:
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.
 
4520 2593d 20h hendricks266 /polymer/eduke32/source/sounds.c Allow EVENT_SOUND to return -1 to cancel a sound without printing a warning to the console and log.

NOTE: Other negative values are reserved!
 
4491 2617d 22h helixhorned /polymer/eduke32/source/sounds.c Bye, bye, B*alloc(), all hail X*alloc()! Replace large portion of the calls...

... 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.
 
4385 2686d 13h terminx /polymer/eduke32/source/sounds.c Widespread use of ARRAY_SIZE macro.  
4352 2714d 2h helixhorned /polymer/eduke32/source/sounds.c Amend r3822 ("Make deletion of an amb. sound MUSICANDSFX stop its sound again.")

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.
 
4294 2734d 6h helixhorned /polymer/eduke32/source/sounds.c sounds.c: exit S_PlayMusic() early if length of file is <4 bytes, clean up mem mgmt.  
4289 2735d 6h helixhorned /polymer/eduke32/source/sounds.c sounds.c: do S_MusicVolume() in S_SoundStartup().

This fixes this initialization issue:
http://forums.duke4.net/topic/7144-midi-volume-weirdness/
 
4249 2755d 8h hendricks266 /polymer/eduke32/source/sounds.c 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.
 
4226 2770d 5h helixhorned /polymer/eduke32/source/sounds.c Guard retrieval of player index (.yvel) from APLAYER sprite.

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.
 
4084 2852d 12h hendricks266 /polymer/eduke32/source/sounds.c 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.  
4069 2868d 8h helixhorned /polymer/eduke32/source/sounds.c 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.
 
4055 2881d 2h helixhorned /polymer/eduke32/source/sounds.c Replace literal g_sounds[].m bits with enum constants. DONT_BUILD.  

Show All