mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 03:00:46 +00:00
Resolve merge issues
# Conflicts: # GNUmakefile # platform/Windows/eduke32.sln # platform/Windows/props/build_common.props # source/audiolib/include/music.h # source/blood/src/blood.cpp # source/blood/src/gui.cpp # source/blood/src/mapedit.cpp # source/blood/src/sound.cpp # source/build/include/vfs.h # source/build/src/vfs.cpp
This commit is contained in:
parent
4ca1af72c3
commit
e6f53f7c30
24 changed files with 162 additions and 58 deletions
|
@ -99,9 +99,9 @@ int MV_GetReverbDelay(void);
|
|||
void MV_SetReverbDelay(int delay);
|
||||
|
||||
int MV_PlayVOC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance,
|
||||
int priority, float volume, uint32_t callbackval);
|
||||
int priority, float volume, intptr_t callbackval);
|
||||
int MV_PlayVOC(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, uint32_t callbackval);
|
||||
int left, int right, int priority, float volume, intptr_t callbackval);
|
||||
|
||||
decltype(MV_PlayVOC3D) MV_PlayWAV3D;
|
||||
decltype(MV_PlayVOC) MV_PlayWAV;
|
||||
|
@ -114,12 +114,15 @@ decltype(MV_PlayVOC) MV_PlayXA;
|
|||
decltype(MV_PlayVOC3D) MV_PlayXMP3D;
|
||||
decltype(MV_PlayVOC) MV_PlayXMP;
|
||||
|
||||
int MV_PlayRAW(char *ptr, uint32_t length, int rate, char *loopstart, char *loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, intptr_t callbackval);
|
||||
|
||||
int MV_IdentifyXMP(char const *ptr, uint32_t length);
|
||||
int MV_GetPosition(int handle, int *position);
|
||||
int MV_SetPosition(int handle, int position);
|
||||
void MV_SetVolume(int volume);
|
||||
int MV_GetVolume(void);
|
||||
void MV_SetCallBack(void (*function)(uint32_t));
|
||||
void MV_SetCallBack(void (*function)(intptr_t));
|
||||
void MV_SetReverseStereo(int setting);
|
||||
int MV_GetReverseStereo(void);
|
||||
int MV_Init(int soundcard, int MixRate, int Voices, int numchannels, void *initdata);
|
||||
|
|
|
@ -53,7 +53,6 @@ typedef struct
|
|||
uint32_t tick;
|
||||
} songposition;
|
||||
|
||||
|
||||
#define MUSIC_LoopSong ( 1 == 1 )
|
||||
#define MUSIC_PlayOnce ( !MUSIC_LoopSong )
|
||||
|
||||
|
|
|
@ -380,7 +380,7 @@ Begin playback of sound data at specified angle and distance
|
|||
from listener.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayFLAC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayFLAC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int left;
|
||||
int right;
|
||||
|
@ -419,7 +419,7 @@ Begin playback of sound data with the given sound levels and
|
|||
priority.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayFLAC(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayFLAC(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
flac_data *fd = 0;
|
||||
|
@ -658,7 +658,7 @@ void MV_ReleaseFLACVoice(VoiceNode *voice)
|
|||
#include "_multivc.h"
|
||||
|
||||
int MV_PlayFLAC(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitchoffset,
|
||||
int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -677,7 +677,7 @@ int MV_PlayFLAC(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int p
|
|||
}
|
||||
|
||||
int MV_PlayFLAC3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int angle,
|
||||
int distance, int priority, float volume, uint32_t callbackval)
|
||||
int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -301,8 +301,31 @@ end_of_data:
|
|||
return NoMoreData;
|
||||
}
|
||||
|
||||
static playbackstatus MV_GetNextRAWBlock(VoiceNode *voice)
|
||||
{
|
||||
if (voice->BlockLength == 0)
|
||||
{
|
||||
if (voice->LoopStart == NULL)
|
||||
return NoMoreData;
|
||||
|
||||
voice->BlockLength = voice->LoopSize;
|
||||
voice->NextBlock = voice->LoopStart;
|
||||
voice->length = 0;
|
||||
voice->position = 0;
|
||||
}
|
||||
|
||||
voice->sound = voice->NextBlock;
|
||||
voice->position -= voice->length;
|
||||
voice->length = min(voice->BlockLength, 0x8000u);
|
||||
voice->NextBlock += voice->length * (voice->channels * voice->bits / 8);
|
||||
voice->BlockLength -= voice->length;
|
||||
voice->length <<= 16;
|
||||
|
||||
return KeepPlaying;
|
||||
}
|
||||
|
||||
int MV_PlayWAV3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance,
|
||||
int priority, float volume, uint32_t callbackval)
|
||||
int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -323,7 +346,7 @@ int MV_PlayWAV3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int a
|
|||
}
|
||||
|
||||
int MV_PlayWAV(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -404,7 +427,7 @@ int MV_PlayWAV(char *ptr, uint32_t length, int loopstart, int loopend, int pitch
|
|||
}
|
||||
|
||||
int MV_PlayVOC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle,
|
||||
int distance, int priority, float volume, uint32_t callbackval)
|
||||
int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -425,7 +448,7 @@ int MV_PlayVOC3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int a
|
|||
}
|
||||
|
||||
int MV_PlayVOC(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
@ -468,3 +491,47 @@ int MV_PlayVOC(char *ptr, uint32_t length, int loopstart, int loopend, int pitch
|
|||
return voice->handle;
|
||||
}
|
||||
|
||||
int MV_PlayRAW(char *ptr, uint32_t length, int rate, char *loopstart, char *loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_Error;
|
||||
|
||||
// Request a voice from the voice pool
|
||||
VoiceNode *voice = MV_AllocVoice(priority);
|
||||
|
||||
if (voice == NULL)
|
||||
{
|
||||
MV_SetErrorCode(MV_NoVoices);
|
||||
return MV_Error;
|
||||
}
|
||||
|
||||
voice->rawdataptr = (uint8_t *)ptr;
|
||||
voice->ptrlength = length;
|
||||
voice->Paused = FALSE;
|
||||
voice->wavetype = FMT_RAW;
|
||||
voice->bits = 8;
|
||||
voice->channels = 1;
|
||||
voice->GetSound = MV_GetNextRAWBlock;
|
||||
voice->NextBlock = ptr;
|
||||
voice->LoopCount = 0;
|
||||
voice->position = 0;
|
||||
voice->BlockLength = length;
|
||||
voice->PitchScale = PITCH_GetScale(pitchoffset);
|
||||
voice->length = 0;
|
||||
voice->next = NULL;
|
||||
voice->prev = NULL;
|
||||
voice->priority = priority;
|
||||
voice->callbackval = callbackval;
|
||||
voice->LoopStart = loopstart;
|
||||
voice->LoopEnd = loopend;
|
||||
voice->LoopSize = loopend - loopstart + 1;
|
||||
|
||||
voice->volume = volume;
|
||||
|
||||
MV_SetVoicePitch(voice, rate, pitchoffset);
|
||||
MV_SetVoiceVolume(voice, vol, left, right, volume);
|
||||
MV_PlayVoice(voice);
|
||||
|
||||
return voice->handle;
|
||||
}
|
||||
|
|
|
@ -185,7 +185,7 @@ static wavefmt_t FX_DetectFormat(char const * const ptr, uint32_t length)
|
|||
}
|
||||
|
||||
int FX_Play(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitchoffset,
|
||||
int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
static constexpr decltype(MV_PlayVOC) *func[] =
|
||||
{ nullptr, nullptr, MV_PlayVOC, MV_PlayWAV, MV_PlayVorbis, MV_PlayFLAC, MV_PlayXA, MV_PlayXMP };
|
||||
|
@ -207,7 +207,7 @@ int FX_Play(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitch
|
|||
}
|
||||
|
||||
int FX_Play3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int angle, int distance,
|
||||
int priority, float volume, uint32_t callbackval)
|
||||
int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
static constexpr decltype(MV_PlayVOC3D) *func[] =
|
||||
{ nullptr, nullptr, MV_PlayVOC3D, MV_PlayWAV3D, MV_PlayVorbis3D, MV_PlayFLAC3D, MV_PlayXA3D, MV_PlayXMP3D };
|
||||
|
@ -228,6 +228,34 @@ int FX_Play3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int a
|
|||
return handle;
|
||||
}
|
||||
|
||||
int FX_PlayRaw(char *ptr, uint32_t ptrlength, int rate, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int handle = MV_PlayRAW(ptr, ptrlength, rate, NULL, NULL, pitchoffset, vol, left, right, priority, volume, callbackval);
|
||||
|
||||
if (handle <= MV_Ok)
|
||||
{
|
||||
FX_SetErrorCode(FX_MultiVocError);
|
||||
handle = FX_Warning;
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int FX_PlayLoopedRaw(char *ptr, uint32_t ptrlength, char *loopstart, char *loopend, int rate,
|
||||
int pitchoffset, int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int handle = MV_PlayRAW(ptr, ptrlength, rate, loopstart, loopend, pitchoffset, vol, left, right, priority, volume, callbackval);
|
||||
|
||||
if (handle <= MV_Ok)
|
||||
{
|
||||
FX_SetErrorCode(FX_MultiVocError);
|
||||
handle = FX_Warning;
|
||||
}
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int FX_SetPrintf(void (*function)(const char *, ...))
|
||||
{
|
||||
MV_SetPrintf(function);
|
||||
|
|
|
@ -79,7 +79,7 @@ static VoiceNode VoicePool;
|
|||
static int MV_MixPage;
|
||||
|
||||
void (*MV_Printf)(const char *fmt, ...) = initprintf;
|
||||
static void (*MV_CallBackFunc)(uint32_t);
|
||||
static void (*MV_CallBackFunc)(intptr_t);
|
||||
|
||||
char *MV_MixDestination;
|
||||
int MV_SampleSize = 1;
|
||||
|
@ -775,7 +775,7 @@ void MV_SetVolume(int volume)
|
|||
|
||||
int MV_GetVolume(void) { return MV_TotalVolume; }
|
||||
|
||||
void MV_SetCallBack(void (*function)(uint32_t)) { MV_CallBackFunc = function; }
|
||||
void MV_SetCallBack(void (*function)(intptr_t)) { MV_CallBackFunc = function; }
|
||||
|
||||
void MV_SetReverseStereo(int setting) { MV_ReverseStereo = setting; }
|
||||
|
||||
|
|
|
@ -324,7 +324,7 @@ Begin playback of sound data at specified angle and distance
|
|||
from listener.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayVorbis3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayVorbis3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
if (!MV_Installed)
|
||||
return MV_SetErrorCode(MV_NotInstalled);
|
||||
|
@ -352,7 +352,7 @@ Begin playback of sound data with the given sound levels and
|
|||
priority.
|
||||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayVorbis(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayVorbis(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(loopend);
|
||||
|
||||
|
@ -458,7 +458,7 @@ void MV_ReleaseVorbisVoice( VoiceNode * voice )
|
|||
#include "_multivc.h"
|
||||
|
||||
int MV_PlayVorbis(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitchoffset,
|
||||
int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -477,7 +477,7 @@ int MV_PlayVorbis(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int
|
|||
}
|
||||
|
||||
int MV_PlayVorbis3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int angle,
|
||||
int distance, int priority, float volume, uint32_t callbackval)
|
||||
int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -370,7 +370,7 @@ from listener.
|
|||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayXA3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume,
|
||||
uint32_t callbackval)
|
||||
intptr_t callbackval)
|
||||
{
|
||||
int left;
|
||||
int right;
|
||||
|
@ -410,7 +410,7 @@ priority.
|
|||
---------------------------------------------------------------------*/
|
||||
|
||||
int MV_PlayXA(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right,
|
||||
int priority, float volume, uint32_t callbackval)
|
||||
int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
xa_data * xad = 0;
|
||||
|
|
|
@ -64,7 +64,7 @@ static playbackstatus MV_GetNextXMPBlock(VoiceNode *voice)
|
|||
return KeepPlaying;
|
||||
}
|
||||
|
||||
int MV_PlayXMP3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayXMP3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int angle, int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
int left;
|
||||
int right;
|
||||
|
@ -95,7 +95,7 @@ int MV_PlayXMP3D(char *ptr, uint32_t length, int loophow, int pitchoffset, int a
|
|||
return status;
|
||||
}
|
||||
|
||||
int MV_PlayXMP(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int MV_PlayXMP(char *ptr, uint32_t length, int loopstart, int loopend, int pitchoffset, int vol, int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
VoiceNode *voice;
|
||||
xmp_data * xmpd = 0;
|
||||
|
@ -200,7 +200,7 @@ void MV_ReleaseXMPVoice(VoiceNode * voice)
|
|||
static char const NoXMP[] = "MV_PlayXMP: libxmp-lite support not included in this binary.\n";
|
||||
|
||||
int MV_PlayXMP(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pitchoffset, int vol,
|
||||
int left, int right, int priority, float volume, uint32_t callbackval)
|
||||
int left, int right, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
@ -219,7 +219,7 @@ int MV_PlayXMP(char *ptr, uint32_t ptrlength, int loopstart, int loopend, int pi
|
|||
}
|
||||
|
||||
int MV_PlayXMP3D(char *ptr, uint32_t ptrlength, int loophow, int pitchoffset, int angle,
|
||||
int distance, int priority, float volume, uint32_t callbackval)
|
||||
int distance, int priority, float volume, intptr_t callbackval)
|
||||
{
|
||||
UNREFERENCED_PARAMETER(ptr);
|
||||
UNREFERENCED_PARAMETER(ptrlength);
|
||||
|
|
|
@ -27,6 +27,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "mmulti.h"
|
||||
#include "compat.h"
|
||||
#include "renderlayer.h"
|
||||
#include "vfs.h"
|
||||
#include "fx_man.h"
|
||||
#include "common.h"
|
||||
#include "common_game.h"
|
||||
|
@ -387,7 +388,7 @@ void PreloadTiles(void)
|
|||
for (int i = 1; i < gSkyCount; i++)
|
||||
tilePrecacheTile(skyTile+i, 0);
|
||||
}
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
}
|
||||
|
||||
|
||||
|
@ -422,7 +423,7 @@ void PreloadCache(void)
|
|||
MUSIC_Update();
|
||||
|
||||
if ((++cnt & 7) == 0)
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
|
||||
if (videoGetRenderMode() != REND_CLASSIC && totalclock - clock > (kTicRate>>2))
|
||||
{
|
||||
|
@ -431,10 +432,10 @@ void PreloadCache(void)
|
|||
// this just prevents the loading screen percentage bar from making large jumps
|
||||
while (percentDisplayed < percentComplete)
|
||||
{
|
||||
gameHandleEvents();
|
||||
Bsprintf(tempbuf, "Loaded %d%% (%d/%d textures)\n", percentDisplayed, cnt, nPrecacheCount);
|
||||
viewLoadingScreenUpdate(tempbuf, percentDisplayed);
|
||||
videoNextPage();
|
||||
timerUpdate();
|
||||
|
||||
if (totalclock - clock >= 1)
|
||||
{
|
||||
|
@ -1054,7 +1055,7 @@ void ProcessFrame(void)
|
|||
{
|
||||
while (gNetFifoMasterTail < gNetFifoTail)
|
||||
{
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
netMasterUpdate();
|
||||
}
|
||||
}
|
||||
|
@ -1492,6 +1493,7 @@ int app_main(int argc, char const * const * argv)
|
|||
margc = argc;
|
||||
margv = argv;
|
||||
#ifdef _WIN32
|
||||
#endif
|
||||
|
||||
G_ExtPreInit(argc, argv);
|
||||
|
||||
|
@ -1740,7 +1742,7 @@ RESTART:
|
|||
{
|
||||
char gameUpdate = false;
|
||||
double const gameUpdateStartTime = timerGetHiTicks();
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
while (gPredictTail < gNetFifoHead[myconnectindex] && !gPaused)
|
||||
{
|
||||
viewUpdatePrediction(&gFifoInput[gPredictTail&255][myconnectindex]);
|
||||
|
@ -1761,10 +1763,10 @@ RESTART:
|
|||
break;
|
||||
faketimerhandler();
|
||||
ProcessFrame();
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
gameUpdate = true;
|
||||
}
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
}
|
||||
if (gameUpdate)
|
||||
{
|
||||
|
@ -1794,7 +1796,7 @@ RESTART:
|
|||
videoClearScreen(0);
|
||||
rotatesprite(160<<16,100<<16,65536,0,2518,0,0,0x4a,0,0,xdim-1,ydim-1);
|
||||
}
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
if (gQuitRequest && !gQuitGame)
|
||||
netBroadcastMyLogoff(gQuitRequest == 2);
|
||||
}
|
||||
|
@ -1849,7 +1851,7 @@ RESTART:
|
|||
while (gGameMenuMgr.m_bActive)
|
||||
{
|
||||
gGameMenuMgr.Process();
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
if (G_FPSLimit())
|
||||
{
|
||||
videoClearScreen(0);
|
||||
|
@ -2512,7 +2514,7 @@ bool AddINIFile(const char *pzFile, bool bForce = false)
|
|||
void ScanINIFiles(void)
|
||||
{
|
||||
nINICount = 0;
|
||||
CACHE1D_FIND_REC *pINIList = klistpath("/", "*.ini", CACHE1D_FIND_FILE);
|
||||
BUILDVFS_FIND_REC *pINIList = klistpath("/", "*.ini", BUILDVFS_FIND_FILE);
|
||||
pINIChain = NULL;
|
||||
|
||||
if (bINIOverride || !pINIList)
|
||||
|
|
|
@ -643,7 +643,7 @@ void G_LoadGroupsInDir(const char *dirname)
|
|||
|
||||
for (auto & extension : extensions)
|
||||
{
|
||||
CACHE1D_FIND_REC *rec;
|
||||
BUILDVFS_FIND_REC *rec;
|
||||
|
||||
fnlist_getnames(&fnlist, dirname, extension, -1, 0);
|
||||
|
||||
|
|
|
@ -532,10 +532,10 @@ extern void G_SetupGlobalPsky(void);
|
|||
#define G_ModDirSnprintfLite(buf, size, basename) \
|
||||
((g_modDir[0] != '/') ? Bsnprintf(buf, size, "%s/%s", g_modDir, basename) : Bsnprintf(buf, size, "%s", basename))
|
||||
|
||||
static inline void G_HandleAsync(void)
|
||||
static inline int gameHandleEvents(void)
|
||||
{
|
||||
handleevents();
|
||||
netGetPackets();
|
||||
return handleevents();
|
||||
}
|
||||
|
||||
# define FORMAT_UPGRADE_ELIGIBLE
|
||||
|
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "function.h"
|
||||
#include "control.h"
|
||||
#include "_control.h"
|
||||
#include "gamedefs.h"
|
||||
#include "hash.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ char Wait(int nTicks)
|
|||
totalclock = 0;
|
||||
while (totalclock < nTicks)
|
||||
{
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
char key = keyGetScan();
|
||||
if (key)
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ char DoFade(char r, char g, char b, int nTicks)
|
|||
totalclock = gFrameClock = 0;
|
||||
do
|
||||
{
|
||||
while (totalclock < gFrameClock) { timerUpdate();};
|
||||
while (totalclock < gFrameClock) { timerUpdateClock();};
|
||||
gFrameClock += 2;
|
||||
scrNextPage();
|
||||
scrFadeAmount(divscale16(ClipHigh((int)totalclock, nTicks), nTicks));
|
||||
|
@ -86,7 +86,7 @@ char DoUnFade(int nTicks)
|
|||
totalclock = gFrameClock = 0;
|
||||
do
|
||||
{
|
||||
while (totalclock < gFrameClock) { timerUpdate(); };
|
||||
while (totalclock < gFrameClock) { timerUpdateClock(); };
|
||||
scrNextPage();
|
||||
scrFadeAmount(0x10000-divscale16(ClipHigh((int)totalclock, nTicks), nTicks));
|
||||
if (keyGetScan())
|
||||
|
@ -250,7 +250,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
|
||||
UpdateDacs(0, true);
|
||||
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
ClockTicks nStartTime = totalclock;
|
||||
|
||||
ctrlClearAllInput();
|
||||
|
@ -258,7 +258,7 @@ void credPlaySmk(const char *_pzSMK, const char *_pzWAV, int nWav)
|
|||
int nFrame = 0;
|
||||
do
|
||||
{
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
if (scale((int)(totalclock-nStartTime), nFrameRate, kTicRate) < nFrame)
|
||||
continue;
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ void CDemo::LoadDemoInfo(void)
|
|||
pathsearchmode = 0;
|
||||
char zFN[BMAX_PATH];
|
||||
Bsnprintf(zFN, BMAX_PATH, "%s*.dem", BloodIniPre);
|
||||
auto pList = klistpath("/", zFN, CACHE1D_FIND_FILE);
|
||||
auto pList = klistpath("/", zFN, BUILDVFS_FIND_FILE);
|
||||
auto pIterator = pList;
|
||||
while (pIterator != NULL)
|
||||
{
|
||||
|
|
|
@ -424,7 +424,7 @@ void MyLoadSave::Save(void)
|
|||
|
||||
void LoadSavedInfo(void)
|
||||
{
|
||||
auto pList = klistpath("./", "game*.sav", CACHE1D_FIND_FILE);
|
||||
auto pList = klistpath("./", "game*.sav", BUILDVFS_FIND_FILE);
|
||||
int nCount = 0;
|
||||
for (auto pIterator = pList; pIterator != NULL && nCount < 10; pIterator = pIterator->next, nCount++)
|
||||
{
|
||||
|
|
|
@ -639,7 +639,7 @@ void netWaitForEveryone(char a1)
|
|||
{
|
||||
if (keystatus[sc_Escape] && a1)
|
||||
exit(0);
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
faketimerhandler();
|
||||
for (p = connecthead; p >= 0; p = connectpoint2[p])
|
||||
if (gPlayerReady[p] < gPlayerReady[myconnectindex])
|
||||
|
@ -1375,7 +1375,7 @@ void netUpdate(void)
|
|||
|
||||
void faketimerhandler(void)
|
||||
{
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
#ifndef NETCODE_DISABLE
|
||||
if (gNetMode != NETWORK_NONE && gNetENetInit)
|
||||
netUpdate();
|
||||
|
|
|
@ -110,7 +110,7 @@ static int osdcmd_map(osdcmdptr_t parm)
|
|||
|
||||
if (parm->numparms != 1 || wildcardp)
|
||||
{
|
||||
CACHE1D_FIND_REC *r;
|
||||
BUILDVFS_FIND_REC *r;
|
||||
fnlist_t fnlist = FNLIST_INITIALIZER;
|
||||
int32_t maxwidth = 0;
|
||||
|
||||
|
|
|
@ -895,7 +895,7 @@ void Resource::FNAddFiles(fnlist_t * fnlist, const char *pattern)
|
|||
sprintf(filename, "%s.%s", pNode->name, pNode->type);
|
||||
if (!Bwildmatch(filename, pattern))
|
||||
continue;
|
||||
switch (klistaddentry(&fnlist->findfiles, filename, CACHE1D_FIND_FILE, CACHE1D_SOURCE_GRP))
|
||||
switch (klistaddentry(&fnlist->findfiles, filename, BUILDVFS_FIND_FILE, BUILDVFS_SOURCE_GRP))
|
||||
{
|
||||
case -1:
|
||||
return;
|
||||
|
@ -932,7 +932,7 @@ void Resource::PrecacheSounds(void)
|
|||
if ((!strcmp(pNode->type, "RAW") || !strcmp(pNode->type, "SFX")) && !pNode->ptr)
|
||||
{
|
||||
Load(pNode);
|
||||
G_HandleAsync();
|
||||
gameHandleEvents();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -437,13 +437,16 @@ void DeinitSoundDevice(void)
|
|||
|
||||
void InitMusicDevice(void)
|
||||
{
|
||||
int nStatus = MUSIC_Init(1/*MusicDevice*/, 0);
|
||||
int nStatus = MUSIC_Init(MusicDevice);
|
||||
if (nStatus != 0)
|
||||
{
|
||||
initprintf("InitMusicDevice: %s\n", MUSIC_ErrorString(nStatus));
|
||||
return;
|
||||
}
|
||||
MUSIC_SetVolume(mus_volume);
|
||||
DICTNODE *hTmb = gSoundRes.Lookup("GMTIMBRE", "TMB");
|
||||
if (hTmb)
|
||||
AL_RegisterTimbreBank((unsigned char*)gSoundRes.Load(hTmb));
|
||||
MUSIC_SetVolume(MusicVolume);
|
||||
}
|
||||
|
||||
void DeinitMusicDevice(void)
|
||||
|
|
|
@ -75,7 +75,7 @@ static HWND pages[3];
|
|||
static int done = -1;
|
||||
static int mode = TAB_CONFIG;
|
||||
|
||||
static CACHE1D_FIND_REC *finddirs;
|
||||
static BUILDVFS_FIND_REC *finddirs;
|
||||
|
||||
static inline void clearfilenames(void)
|
||||
{
|
||||
|
@ -86,7 +86,7 @@ static inline void clearfilenames(void)
|
|||
static inline void getfilenames(char const *path)
|
||||
{
|
||||
clearfilenames();
|
||||
finddirs = klistpath(path,"*",CACHE1D_FIND_DIR);
|
||||
finddirs = klistpath(path,"*",BUILDVFS_FIND_DIR);
|
||||
}
|
||||
|
||||
#define POPULATE_VIDEO 1
|
||||
|
@ -249,7 +249,7 @@ static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L
|
|||
settings.gamedir = NULL;
|
||||
else
|
||||
{
|
||||
CACHE1D_FIND_REC *dir = finddirs;
|
||||
BUILDVFS_FIND_REC *dir = finddirs;
|
||||
for (int j = 1; dir != NULL; dir = dir->next, j++)
|
||||
{
|
||||
if (j == i)
|
||||
|
|
|
@ -3024,7 +3024,7 @@ void viewDrawScreen(void)
|
|||
polymostcenterhoriz = defaultHoriz;
|
||||
#endif
|
||||
|
||||
timerUpdate();
|
||||
timerUpdateClock();
|
||||
ClockTicks delta = totalclock - lastUpdate;
|
||||
if (delta < 0)
|
||||
delta = 0;
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
#define EDUKE32_COMMON_H_
|
||||
|
||||
#include "cache1d.h"
|
||||
#include "vfs.h"
|
||||
#include "compat.h"
|
||||
#include "pragmas.h" // klabs
|
||||
#include "scriptfile.h"
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define _SmackerFileStream_h_
|
||||
|
||||
#include <string>
|
||||
#include "cache1d.h"
|
||||
#include "vfs.h"
|
||||
#include "compat.h"
|
||||
#include <stdint.h>
|
||||
|
||||
|
|
Loading…
Reference in a new issue