CAutoMapper: Add names to function prototypes

This commit is contained in:
Lioncash 2020-03-25 03:02:00 -04:00
parent 7ee2a3b912
commit 90d61ae7ed
2 changed files with 42 additions and 40 deletions

View File

@ -407,8 +407,8 @@ void CAutoMapper::CompleteMapperStateTransition(const CStateManager& mgr) {
x1bc_state = x1c0_nextState;
}
void CAutoMapper::ResetInterpolationTimer(float t) {
x1c4_interpDur = t;
void CAutoMapper::ResetInterpolationTimer(float duration) {
x1c4_interpDur = duration;
x1c8_interpTime = 0.f;
}
@ -754,8 +754,8 @@ void CAutoMapper::ProcessMapPanInput(const CFinalInput& input, const CStateManag
}
}
void CAutoMapper::SetShouldPanningSoundBePlaying(bool b) {
if (b) {
void CAutoMapper::SetShouldPanningSoundBePlaying(bool shouldBePlaying) {
if (shouldBePlaying) {
if (!x1cc_panningSfx)
x1cc_panningSfx = CSfxManager::SfxStart(SFXui_map_pan, 1.f, 0.f, false, 0x7f, true, kInvalidAreaId);
} else {
@ -764,8 +764,8 @@ void CAutoMapper::SetShouldPanningSoundBePlaying(bool b) {
}
}
void CAutoMapper::SetShouldZoomingSoundBePlaying(bool b) {
if (b) {
void CAutoMapper::SetShouldZoomingSoundBePlaying(bool shouldBePlaying) {
if (shouldBePlaying) {
if (!x1d4_zoomingSfx)
x1d4_zoomingSfx = CSfxManager::SfxStart(SFXui_map_zoom, 1.f, 0.f, false, 0x7f, true, kInvalidAreaId);
} else {
@ -774,8 +774,8 @@ void CAutoMapper::SetShouldZoomingSoundBePlaying(bool b) {
}
}
void CAutoMapper::SetShouldRotatingSoundBePlaying(bool b) {
if (b) {
void CAutoMapper::SetShouldRotatingSoundBePlaying(bool shouldBePlaying) {
if (shouldBePlaying) {
if (!x1d0_rotatingSfx)
x1d0_rotatingSfx = CSfxManager::SfxStart(SFXui_map_rotate, 1.f, 0.f, false, 0x7f, true, kInvalidAreaId);
} else {
@ -968,10 +968,11 @@ float CAutoMapper::GetDesiredMiniMapCameraDistance(const CStateManager& mgr) con
std::tan(M_PIF / 2.f - 0.5f * 2.f * M_PIF * (xa8_renderStates[0].x1c_camAngle / 360.f));
}
float CAutoMapper::GetClampedMapScreenCameraDistance(float v) const {
if (x1bc_state == EAutoMapperState::MapScreenUniverse)
return zeus::clamp(g_tweakAutoMapper->GetMinUniverseCamDist(), v, g_tweakAutoMapper->GetMaxUniverseCamDist());
return zeus::clamp(g_tweakAutoMapper->GetMinCamDist(), v, g_tweakAutoMapper->GetMaxCamDist());
float CAutoMapper::GetClampedMapScreenCameraDistance(float value) const {
if (x1bc_state == EAutoMapperState::MapScreenUniverse) {
return zeus::clamp(g_tweakAutoMapper->GetMinUniverseCamDist(), value, g_tweakAutoMapper->GetMaxUniverseCamDist());
}
return zeus::clamp(g_tweakAutoMapper->GetMinCamDist(), value, g_tweakAutoMapper->GetMaxCamDist());
}
void CAutoMapper::MuteAllLoopedSounds() {

View File

@ -202,21 +202,21 @@ private:
static zeus::CVector2i GetMiniMapViewportSize();
static zeus::CVector2i GetMapScreenViewportSize();
static float GetMapAreaMiniMapDrawDepth() { return 2.f; }
float GetMapAreaMaxDrawDepth(const CStateManager&, TAreaId) const;
static float GetMapAreaMiniMapDrawAlphaSurfaceVisited(const CStateManager&);
static float GetMapAreaMiniMapDrawAlphaOutlineVisited(const CStateManager&);
static float GetMapAreaMiniMapDrawAlphaSurfaceUnvisited(const CStateManager&);
static float GetMapAreaMiniMapDrawAlphaOutlineUnvisited(const CStateManager&);
float GetDesiredMiniMapCameraDistance(const CStateManager&) const;
float GetMapAreaMaxDrawDepth(const CStateManager& mgr, TAreaId aid) const;
static float GetMapAreaMiniMapDrawAlphaSurfaceVisited(const CStateManager& mgr);
static float GetMapAreaMiniMapDrawAlphaOutlineVisited(const CStateManager& mgr);
static float GetMapAreaMiniMapDrawAlphaSurfaceUnvisited(const CStateManager& mgr);
static float GetMapAreaMiniMapDrawAlphaOutlineUnvisited(const CStateManager& mgr);
float GetDesiredMiniMapCameraDistance(const CStateManager& mgr) const;
static float GetBaseMapScreenCameraMoveSpeed();
float GetClampedMapScreenCameraDistance(float) const;
float GetClampedMapScreenCameraDistance(float value) const;
float GetFinalMapScreenCameraMoveSpeed() const;
void ProcessMapRotateInput(const CFinalInput& input, const CStateManager& mgr);
void ProcessMapZoomInput(const CFinalInput& input, const CStateManager& mgr);
void ProcessMapPanInput(const CFinalInput& input, const CStateManager& mgr);
void SetShouldPanningSoundBePlaying(bool);
void SetShouldZoomingSoundBePlaying(bool);
void SetShouldRotatingSoundBePlaying(bool);
void SetShouldPanningSoundBePlaying(bool shouldBePlaying);
void SetShouldZoomingSoundBePlaying(bool shouldBePlaying);
void SetShouldRotatingSoundBePlaying(bool shouldBePlaying);
void TransformRenderStatesWorldToUniverse();
void TransformRenderStatesUniverseToWorld();
void TransformRenderStateWorldToUniverse(SAutoMapperRenderState&);
@ -226,7 +226,7 @@ private:
public:
CAutoMapper(CStateManager& stateMgr);
bool CheckLoadComplete();
bool CanLeaveMapScreen(const CStateManager&) const;
bool CanLeaveMapScreen(const CStateManager& mgr) const;
float GetMapRotationX() const { return xa8_renderStates[0].x1c_camAngle; }
float GetMapRotationZ() const { return xa8_renderStates[0].x8_camOrientation.yaw(); }
TAreaId GetFocusAreaIndex() const { return xa0_curAreaId; }
@ -234,29 +234,30 @@ public:
void SetCurWorldAssetId(CAssetId mlvlId);
void MuteAllLoopedSounds();
void UnmuteAllLoopedSounds();
void ProcessControllerInput(const CFinalInput&, CStateManager&);
void ProcessControllerInput(const CFinalInput& input, CStateManager& mgr);
bool IsInPlayerControlState() const {
return IsInMapperState(EAutoMapperState::MapScreen) || IsInMapperState(EAutoMapperState::MapScreenUniverse);
}
void Update(float dt, const CStateManager& mgr);
void Draw(const CStateManager&, const zeus::CTransform&, float) const;
void Draw(const CStateManager& mgr, const zeus::CTransform& xf, float alpha) const;
float GetTimeIntoInterpolation() const { return x1c8_interpTime; }
void BeginMapperStateTransition(EAutoMapperState, CStateManager&);
void CompleteMapperStateTransition(const CStateManager&);
void ResetInterpolationTimer(float);
SAutoMapperRenderState BuildMiniMapWorldRenderState(const CStateManager&, const zeus::CQuaternion&, TAreaId) const;
SAutoMapperRenderState BuildMapScreenWorldRenderState(const CStateManager&, const zeus::CQuaternion&, TAreaId,
bool) const;
SAutoMapperRenderState BuildMapScreenUniverseRenderState(const CStateManager&, const zeus::CQuaternion&,
TAreaId) const;
void BeginMapperStateTransition(EAutoMapperState state, CStateManager& mgr);
void CompleteMapperStateTransition(const CStateManager& mgr);
void ResetInterpolationTimer(float duration);
SAutoMapperRenderState BuildMiniMapWorldRenderState(const CStateManager& stateMgr, const zeus::CQuaternion& rot,
TAreaId area) const;
SAutoMapperRenderState BuildMapScreenWorldRenderState(const CStateManager& mgr, const zeus::CQuaternion& rot,
TAreaId area, bool doingHint) const;
SAutoMapperRenderState BuildMapScreenUniverseRenderState(const CStateManager& mgr, const zeus::CQuaternion& rot,
TAreaId area) const;
void LeaveMapScreenState();
void ProcessMapScreenInput(const CFinalInput& input, CStateManager& mgr);
zeus::CQuaternion GetMiniMapCameraOrientation(const CStateManager&) const;
zeus::CVector3f GetAreaPointOfInterest(const CStateManager&, TAreaId) const;
TAreaId FindClosestVisibleArea(const zeus::CVector3f&, const zeus::CUnitVector3f&, const CStateManager&,
const IWorld&, const CMapWorldInfo&) const;
std::pair<int, int> FindClosestVisibleWorld(const zeus::CVector3f&, const zeus::CUnitVector3f&,
const CStateManager&) const;
zeus::CQuaternion GetMiniMapCameraOrientation(const CStateManager& stateMgr) const;
zeus::CVector3f GetAreaPointOfInterest(const CStateManager& mgr, TAreaId aid) const;
TAreaId FindClosestVisibleArea(const zeus::CVector3f& point, const zeus::CUnitVector3f& camDir,
const CStateManager& mgr, const IWorld& wld, const CMapWorldInfo& mwInfo) const;
std::pair<int, int> FindClosestVisibleWorld(const zeus::CVector3f& point, const zeus::CUnitVector3f& camDir,
const CStateManager& mgr) const;
EAutoMapperState GetNextState() const { return x1c0_nextState; }
bool IsInMapperState(EAutoMapperState state) const { return state == x1bc_state && state == x1c0_nextState; }
@ -267,7 +268,7 @@ public:
bool IsFullyOutOfMiniMapState() const {
return x1bc_state != EAutoMapperState::MiniMap && x1c0_nextState != EAutoMapperState::MiniMap;
}
void OnNewInGameGuiState(EInGameGuiState, CStateManager&);
void OnNewInGameGuiState(EInGameGuiState state, CStateManager& mgr);
float GetInterp() const {
if (x1c4_interpDur > 0.f)
return x1c8_interpTime / x1c4_interpDur;