mirror of
https://github.com/halpz/re3.git
synced 2025-07-15 09:18:12 +00:00
Merge branch 'master' into miami
# Conflicts: # src/control/Garages.cpp # src/core/FileLoader.cpp # src/core/Streaming.cpp # src/core/Zones.cpp # src/core/Zones.h # src/render/Renderer.cpp # src/rw/VisibilityPlugins.cpp
This commit is contained in:
@ -120,7 +120,7 @@ CAnimViewer::Initialise(void) {
|
||||
if (!CFileMgr::ReadLine(fd, gString, 255))
|
||||
break;
|
||||
|
||||
sscanf(gString, "%s %s", &modelName, &animGroup);
|
||||
sscanf(gString, "%s %s", modelName, animGroup);
|
||||
int groupId;
|
||||
for (groupId = 0; groupId < NUM_ANIM_ASSOC_GROUPS; groupId++) {
|
||||
if (!strcmp(animGroup, CAnimManager::GetAnimGroupName((AssocGroupId)groupId)))
|
||||
@ -423,4 +423,4 @@ CAnimViewer::Shutdown(void)
|
||||
CTimer::Shutdown();
|
||||
CStreaming::Shutdown();
|
||||
CTxdStore::RemoveTxdSlot(animTxdSlot);
|
||||
}
|
||||
}
|
||||
|
@ -885,7 +885,7 @@ CCam::PrintMode(void)
|
||||
sprintf(buf, " ");
|
||||
sprintf(buf, " ");
|
||||
|
||||
static char *modes[] = { "None",
|
||||
static Const char *modes[] = { "None",
|
||||
"Top Down", "GTA Classic", "Behind Car", "Follow Ped",
|
||||
"Aiming", "Debug", "Sniper", "Rocket", "Model Viewer", "Bill",
|
||||
"Syphon", "Circle", "Cheesy Zoom", "Wheel", "Fixed",
|
||||
|
@ -80,6 +80,10 @@ CCamera::CCamera(void)
|
||||
Init();
|
||||
}
|
||||
|
||||
CCamera::CCamera(float)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
CCamera::Init(void)
|
||||
{
|
||||
@ -87,7 +91,12 @@ CCamera::Init(void)
|
||||
float fMouseAccelHorzntl = m_fMouseAccelHorzntl;
|
||||
float fMouseAccelVertical = m_fMouseAccelVertical;
|
||||
#endif
|
||||
#ifdef FIX_BUGS
|
||||
static const CCamera DummyCamera = CCamera(0.f);
|
||||
*this = DummyCamera;
|
||||
#else
|
||||
memset(this, 0, sizeof(CCamera)); // getting rid of vtable, eh?
|
||||
#endif
|
||||
#ifdef GTA3_1_1_PATCH
|
||||
m_fMouseAccelHorzntl = fMouseAccelHorzntl;
|
||||
m_fMouseAccelVertical = fMouseAccelVertical;
|
||||
@ -744,6 +753,7 @@ CCamera::CamControl(void)
|
||||
case VEHICLE_TYPE_BOAT:
|
||||
ReqMode = CCam::MODE_BEHINDBOAT;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
// Car zoom value
|
||||
@ -2991,7 +3001,7 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
|
||||
case 0: m_fPedZoomValueScript = 0.25f; break;
|
||||
case 1: m_fPedZoomValueScript = 1.5f; break;
|
||||
case 2: m_fPedZoomValueScript = 2.9f; break;
|
||||
default: m_fPedZoomValueScript = m_fPedZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
m_bUseScriptZoomValuePed = true;
|
||||
@ -3006,7 +3016,7 @@ CCamera::SetZoomValueCamStringScript(int16 dist)
|
||||
case 0: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3; break;
|
||||
default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
} else
|
||||
#endif
|
||||
@ -3015,7 +3025,7 @@ CCamera::SetZoomValueCamStringScript(int16 dist)
|
||||
case 0: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_1; break;
|
||||
case 1: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_2; break;
|
||||
case 2: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_3; break;
|
||||
default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ public:
|
||||
int m_BlurRed;
|
||||
int m_BlurType;
|
||||
|
||||
uint32 unknown; // some counter having to do with music
|
||||
uint32 unknown; // some counter having to do with music
|
||||
int m_iWorkOutSpeedThisNumFrames;
|
||||
int m_iNumFramesSoFar;
|
||||
|
||||
@ -549,6 +549,7 @@ uint32 unknown; // some counter having to do with music
|
||||
|
||||
// High level and misc
|
||||
CCamera(void);
|
||||
CCamera(float);
|
||||
void Init(void);
|
||||
void Process(void);
|
||||
void CamControl(void);
|
||||
|
@ -112,7 +112,7 @@ CCollision::SortOutCollisionAfterLoad(void)
|
||||
void
|
||||
CCollision::LoadCollisionScreen(eLevelName level)
|
||||
{
|
||||
static char *levelNames[4] = {
|
||||
static Const char *levelNames[4] = {
|
||||
"",
|
||||
"IND_ZON",
|
||||
"COM_ZON",
|
||||
|
@ -610,6 +610,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonDown(int32 button,
|
||||
case MOUSE:
|
||||
state = &CPad::GetPad(PAD1)->PCTempMouseState;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (pad != NULL)
|
||||
@ -1024,7 +1025,7 @@ void CControllerConfigManager::AffectControllerStateOn_ButtonUp(int32 button, eC
|
||||
case JOYSTICK:
|
||||
state = &CPad::GetPad(PAD1)->PCTempJoyState;
|
||||
break;
|
||||
|
||||
default: break;
|
||||
}
|
||||
|
||||
if (process)
|
||||
@ -1293,6 +1294,7 @@ bool CControllerConfigManager::GetIsKeyboardKeyDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetApps())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1493,6 +1495,7 @@ bool CControllerConfigManager::GetIsKeyboardKeyJustDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetAppsJustDown())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1530,6 +1533,7 @@ bool CControllerConfigManager::GetIsMouseButtonDown(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetMouseX2())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1567,6 +1571,7 @@ bool CControllerConfigManager::GetIsMouseButtonUp(RsKeyCodes keycode)
|
||||
if (CPad::GetPad(PAD1)->GetMouseX2Up())
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -1747,6 +1752,7 @@ void CControllerConfigManager::DeleteMatchingActionInitiators(e_ControllerAction
|
||||
DeleteMatchingCommonControls (action, key, type);
|
||||
DeleteMatching1rst3rdPersonControls (action, key, type);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1770,6 +1776,7 @@ bool CControllerConfigManager::GetIsKeyBlank(int32 key, eControllerType type)
|
||||
if (key != 0)
|
||||
return false;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -1836,6 +1843,7 @@ e_ControllerActionType CControllerConfigManager::GetActionType(e_ControllerActio
|
||||
case PED_SNIPER_ZOOM_OUT:
|
||||
return ACTIONTYPE_1RSTPERSON;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return ACTIONTYPE_NONE;
|
||||
@ -1861,6 +1869,7 @@ void CControllerConfigManager::ClearSettingsAssociatedWithAction(e_ControllerAct
|
||||
m_aSettings[action][type].m_Key = 0;
|
||||
m_aSettings[action][type].m_ContSetOrder = SETORDER_NONE;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
ResetSettingOrder(action);
|
||||
@ -1881,6 +1890,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextWithOrderNumber(e_Contr
|
||||
return GetControllerSettingTextMouse (action);
|
||||
case JOYSTICK:
|
||||
return GetControllerSettingTextJoystick(action);
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2224,6 +2234,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextKeyBoard(e_ControllerAc
|
||||
return TheText.Get("FEC_SFT"); // "SHIFT"
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2256,6 +2267,7 @@ wchar *CControllerConfigManager::GetControllerSettingTextMouse(e_ControllerActio
|
||||
case 7:
|
||||
return TheText.Get("FEC_MXT"); // MXB2
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
@ -2375,6 +2387,7 @@ bool CControllerConfigManager::GetIsActionAButtonCombo(e_ControllerAction action
|
||||
case PED_CYCLE_TARGET_RIGHT:
|
||||
return true;
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return false;
|
||||
@ -2395,6 +2408,7 @@ wchar *CControllerConfigManager::GetButtonComboText(e_ControllerAction action)
|
||||
case VEHICLE_LOOKBEHIND:
|
||||
return TheText.Get("FEC_LBC"); // Use Look Left With Look Right.
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@ -783,7 +783,7 @@ CFileLoader::LoadClumpObject(const char *line)
|
||||
char model[24], txd[24];
|
||||
CClumpModelInfo *mi;
|
||||
|
||||
if(sscanf(line, "%d %s %s", &id, &model, &txd) == 3){
|
||||
if(sscanf(line, "%d %s %s", &id, model, txd) == 3){
|
||||
mi = CModelInfo::AddClumpModel(id);
|
||||
mi->SetName(model);
|
||||
mi->SetTexDictionary(txd);
|
||||
|
@ -412,7 +412,7 @@ CMenuManager::ThingsToDoBeforeLeavingPage()
|
||||
// ------ Functions not in the game/inlined ends
|
||||
|
||||
void
|
||||
CMenuManager::BuildStatLine(char *text, void *stat, bool itsFloat, void *stat2)
|
||||
CMenuManager::BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2)
|
||||
{
|
||||
if (!text)
|
||||
return;
|
||||
@ -5020,6 +5020,7 @@ CMenuManager::SaveLoadFileError_SetUpErrorScreen()
|
||||
case SAVESTATUS_DELETEFAILED10:
|
||||
ChangeScreen(MENUPAGE_DELETE_FAILED, 0, true, false);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -598,7 +598,7 @@ public:
|
||||
#endif
|
||||
|
||||
public:
|
||||
static void BuildStatLine(char *text, void *stat, bool itsFloat, void *stat2);
|
||||
static void BuildStatLine(Const char *text, void *stat, bool itsFloat, void *stat2);
|
||||
static void CentreMousePointer();
|
||||
void CheckCodesForControls(int);
|
||||
bool CheckHover(int x1, int x2, int y1, int y2);
|
||||
|
@ -523,7 +523,7 @@ CMouseControllerState CMousePointerStateHelper::GetMouseSetUp()
|
||||
double xpos = 1.0f, ypos;
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
|
||||
if (xpos != NULL) {
|
||||
if (xpos != 0.f) {
|
||||
state.MMB = true;
|
||||
state.RMB = true;
|
||||
state.LMB = true;
|
||||
@ -579,7 +579,7 @@ void CPad::UpdateMouse()
|
||||
#else
|
||||
double xpos = 1.0f, ypos;
|
||||
glfwGetCursorPos(PSGLOBAL(window), &xpos, &ypos);
|
||||
if (xpos == NULL)
|
||||
if (xpos == 0.f)
|
||||
return;
|
||||
|
||||
int32 signX = 1;
|
||||
|
@ -90,7 +90,11 @@ CPools::MakeSureSlotInObjectPoolIsEmpty(int32 slot)
|
||||
// relocate to another slot??
|
||||
CObject *newObject = new CObject(object->GetModelIndex(), false);
|
||||
CWorld::Remove(object);
|
||||
#ifdef FIX_BUGS
|
||||
*newObject = *object;
|
||||
#else
|
||||
memcpy(newObject, object, ms_pObjectPool->GetMaxEntrySize());
|
||||
#endif
|
||||
CWorld::Add(newObject);
|
||||
object->m_rwObject = nil;
|
||||
delete object;
|
||||
|
@ -7,7 +7,7 @@ float CProfile::ms_afCumulativeTime[NUM_PROFILES];
|
||||
float CProfile::ms_afEndTime[NUM_PROFILES];
|
||||
float CProfile::ms_afMaxEndTime[NUM_PROFILES];
|
||||
float CProfile::ms_afMaxCumulativeTime[NUM_PROFILES];
|
||||
char *CProfile::ms_pProfileString[NUM_PROFILES];
|
||||
Const char *CProfile::ms_pProfileString[NUM_PROFILES];
|
||||
RwRGBA CProfile::ms_aBarColours[NUM_PROFILES];
|
||||
|
||||
void CProfile::Initialise()
|
||||
@ -68,4 +68,4 @@ void CProfile::ShowResults()
|
||||
ms_afMaxCumulativeTime[PROFILE_RENDERING_TIME] = Max(ms_afMaxCumulativeTime[PROFILE_RENDERING_TIME], ms_afCumulativeTime[PROFILE_RENDERING_TIME]);
|
||||
ms_afMaxCumulativeTime[PROFILE_TOTAL] = Max(ms_afMaxCumulativeTime[PROFILE_TOTAL], ms_afCumulativeTime[PROFILE_TOTAL]);
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
@ -19,10 +19,10 @@ class CProfile
|
||||
static float ms_afEndTime[NUM_PROFILES];
|
||||
static float ms_afMaxEndTime[NUM_PROFILES];
|
||||
static float ms_afMaxCumulativeTime[NUM_PROFILES];
|
||||
static char *ms_pProfileString[NUM_PROFILES];
|
||||
static Const char *ms_pProfileString[NUM_PROFILES];
|
||||
static RwRGBA ms_aBarColours[NUM_PROFILES];
|
||||
public:
|
||||
static void Initialise();
|
||||
static void SuspendProfile(eProfile profile);
|
||||
static void ShowResults();
|
||||
};
|
||||
};
|
||||
|
@ -804,6 +804,7 @@ CStreaming::RequestIslands(eLevelName level)
|
||||
if(islandLODmainland != -1)
|
||||
RequestModel(islandLODmainland, BIGBUILDINGFLAGS);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1919,7 +1920,7 @@ CStreaming::ProcessLoadingChannel(int32 ch)
|
||||
void
|
||||
CStreaming::RetryLoadFile(int32 ch)
|
||||
{
|
||||
char *key;
|
||||
Const char *key;
|
||||
|
||||
CPad::StopPadsShaking();
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
float CSurfaceTable::ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
|
||||
|
||||
void
|
||||
CSurfaceTable::Initialise(char *filename)
|
||||
CSurfaceTable::Initialise(Const char *filename)
|
||||
{
|
||||
int lineno, fieldno;
|
||||
char *line;
|
||||
|
@ -100,7 +100,7 @@ class CSurfaceTable
|
||||
{
|
||||
static float ms_aAdhesiveLimitTable[NUMADHESIVEGROUPS][NUMADHESIVEGROUPS];
|
||||
public:
|
||||
static void Initialise(char *filename);
|
||||
static void Initialise(Const char *filename);
|
||||
static int GetAdhesionGroup(uint8 surfaceType);
|
||||
static float GetWetMultiplier(uint8 surfaceType);
|
||||
static float GetAdhesiveLimit(CColPoint &colpoint);
|
||||
|
@ -2212,6 +2212,7 @@ CWorld::TriggerExplosionSectorList(CPtrList &list, const CVector &position, floa
|
||||
case ENTITY_TYPE_OBJECT:
|
||||
pObject->ObjectDamage(300.0f * fDamageMultiplier);
|
||||
break;
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -401,7 +401,7 @@ DestroySplashScreen(void)
|
||||
splashTxdId = -1;
|
||||
}
|
||||
|
||||
char*
|
||||
Const char*
|
||||
GetRandomSplashScreen(void)
|
||||
{
|
||||
int index;
|
||||
@ -424,10 +424,10 @@ GetRandomSplashScreen(void)
|
||||
return splashName;
|
||||
}
|
||||
|
||||
char*
|
||||
Const char*
|
||||
GetLevelSplashScreen(int level)
|
||||
{
|
||||
static char *splashScreens[4] = {
|
||||
static Const char *splashScreens[4] = {
|
||||
nil,
|
||||
"splash1",
|
||||
"splash2",
|
||||
@ -1281,7 +1281,7 @@ void TheGame(void)
|
||||
CGame::Initialise("DATA\\GTA3.DAT");
|
||||
#endif
|
||||
|
||||
char *splash = GetRandomSplashScreen(); // inlined here
|
||||
Const char *splash = GetRandomSplashScreen(); // inlined here
|
||||
|
||||
LoadingScreen("Starting Game", NULL, splash);
|
||||
|
||||
@ -1315,7 +1315,7 @@ void TheGame(void)
|
||||
if (FrontEndMenuManager.m_bWantToLoad)
|
||||
#endif
|
||||
{
|
||||
char *splash1 = GetLevelSplashScreen(CGame::currLevel);
|
||||
Const char *splash1 = GetLevelSplashScreen(CGame::currLevel);
|
||||
LoadSplash(splash1);
|
||||
}
|
||||
|
||||
|
@ -22,8 +22,8 @@ void LoadingScreen(const char *str1, const char *str2, const char *splashscreen)
|
||||
void LoadingIslandScreen(const char *levelName);
|
||||
CSprite2d *LoadSplash(const char *name);
|
||||
void DestroySplashScreen(void);
|
||||
char *GetLevelSplashScreen(int level);
|
||||
char *GetRandomSplashScreen(void);
|
||||
Const char *GetLevelSplashScreen(int level);
|
||||
Const char *GetRandomSplashScreen(void);
|
||||
void LittleTest(void);
|
||||
void ValidateVersion();
|
||||
void ResetLoadingScreenBar(void);
|
||||
|
Reference in New Issue
Block a user