diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/sampman_miles.cpp | 1 | ||||
-rw-r--r-- | src/audio/sampman_null.cpp | 12 | ||||
-rw-r--r-- | src/control/Script.cpp | 14 | ||||
-rw-r--r-- | src/core/CdStreamPosix.cpp | 1 | ||||
-rw-r--r-- | src/core/Frontend.cpp | 10 | ||||
-rw-r--r-- | src/core/main.cpp | 2 | ||||
-rw-r--r-- | src/skel/crossplatform.h | 1 |
7 files changed, 16 insertions, 25 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 88eceecf..73d4406d 100644 --- a/src/audio/sampman_miles.cpp +++ b/src/audio/sampman_miles.cpp @@ -1,3 +1,4 @@ +#define WITHWINDOWS #include "common.h" #ifdef AUDIO_MSS diff --git a/src/audio/sampman_null.cpp b/src/audio/sampman_null.cpp index a5ed2889..af4c54ad 100644 --- a/src/audio/sampman_null.cpp +++ b/src/audio/sampman_null.cpp @@ -114,7 +114,7 @@ cSampleManager::SetMusicMasterVolume(uint8 nVolume) } void -cSampleManager::SetMusicMasterVolume(uint8 nVolume) +cSampleManager::SetMP3BoostVolume(uint8 nVolume) { } @@ -231,35 +231,35 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) void cSampleManager::SetChannelEmittingVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannel3DPosition(uint32 nChannel, float fX, float fY, float fZ) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannel3DDistances(uint32 nChannel, float fMax, float fMin) { - ASSERT( nChannel != CHANNEL2D ); + ASSERT( nChannel < MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannelVolume(uint32 nChannel, uint32 nVolume) { - ASSERT( nChannel == CHANNEL2D ); + ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } void cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) { - ASSERT(nChannel == CHANNEL2D); + ASSERT( nChannel >= MAXCHANNELS ); ASSERT( nChannel < MAXCHANNELS+MAX2DCHANNELS ); } diff --git a/src/control/Script.cpp b/src/control/Script.cpp index 536055fa..224f9089 100644 --- a/src/control/Script.cpp +++ b/src/control/Script.cpp @@ -2573,20 +2573,16 @@ void CTheScripts::Shutdown() int scriptToLoad = 0; const char *scriptfile = "main.scm"; -#ifdef _WIN32 -#include <Windows.h> -#endif int open_script() { - // glfwGetKey doesn't work because of CGame::Initialise is blocking -#ifdef _WIN32 - if (GetAsyncKeyState('G') & 0x8000) + // glfwGetKey doesn't work because of CGame::Initialise is blocking + CPad::UpdatePads(); + if (CPad::GetPad(0)->GetChar('G')) scriptToLoad = 0; - if (GetAsyncKeyState('R') & 0x8000) + if (CPad::GetPad(0)->GetChar('R')) scriptToLoad = 1; - if (GetAsyncKeyState('D') & 0x8000) + if (CPad::GetPad(0)->GetChar('D')) scriptToLoad = 2; -#endif switch (scriptToLoad) { case 0: scriptfile = "main.scm"; break; case 1: scriptfile = "freeroam_lcs.scm"; break; diff --git a/src/core/CdStreamPosix.cpp b/src/core/CdStreamPosix.cpp index 30fe06a0..bc9129eb 100644 --- a/src/core/CdStreamPosix.cpp +++ b/src/core/CdStreamPosix.cpp @@ -13,6 +13,7 @@ #include <fcntl.h> #include <sys/resource.h> #include <stdarg.h> +#include <limits.h> #ifdef __linux__ #include <sys/syscall.h> diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp index bbc79d4e..975cc7da 100644 --- a/src/core/Frontend.cpp +++ b/src/core/Frontend.cpp @@ -4575,19 +4575,11 @@ CMenuManager::ProcessUserInput(uint8 goDown, uint8 goUp, uint8 optionSelected, u #ifdef USE_DEBUG_SCRIPT_LOADER if (m_nCurrScreen == MENUPAGE_START_MENU || m_nCurrScreen == MENUPAGE_NEW_GAME || m_nCurrScreen == MENUPAGE_NEW_GAME_RELOAD) { -#ifdef RW_GL3 - if (glfwGetKey(PSGLOBAL(window), GLFW_KEY_R) == GLFW_PRESS) { + if (CPad::GetPad(0)->GetChar('R')) { scriptToLoad = 1; DoSettingsBeforeStartingAGame(); return; } -#elif defined _WIN32 - if (GetAsyncKeyState('R') & 0x8000) { - scriptToLoad = 1; - DoSettingsBeforeStartingAGame(); - return; - } -#endif } #endif diff --git a/src/core/main.cpp b/src/core/main.cpp index 8e53901f..4a61267d 100644 --- a/src/core/main.cpp +++ b/src/core/main.cpp @@ -387,7 +387,7 @@ DoRWStuffEndOfFrame(void) } #else if (CPad::GetPad(1)->GetLeftShockJustDown() || CPad::GetPad(0)->GetFJustDown(11)) { - sprintf(s, "screen_0%11lld.png", time(nil)); + sprintf(s, "screen_%011lld.png", time(nil)); RwGrabScreen(Scene.camera, s); } #endif diff --git a/src/skel/crossplatform.h b/src/skel/crossplatform.h index 24c3fb4d..a073f854 100644 --- a/src/skel/crossplatform.h +++ b/src/skel/crossplatform.h @@ -1,4 +1,5 @@ #include <time.h> +#include <limits.h> // This is the common include for platform/renderer specific skeletons(glfw.cpp, win.cpp etc.) and using cross platform things (like Windows directories wrapper, platform specific global arrays etc.) // Functions that's different on glfw and win but have same signature, should be located on platform.h. |