mirror of https://github.com/AxioDL/metaforce.git
Merge pull request #108 from lioncash/case
CAutoMapper: Collapse case statements in ProcessMapZoomInput()
This commit is contained in:
commit
76f90569ca
|
@ -615,31 +615,25 @@ void CAutoMapper::ProcessMapZoomInput(const CFinalInput& input, const CStateMana
|
|||
}
|
||||
}
|
||||
|
||||
EZoomState nextZoomState = EZoomState::None;
|
||||
const EZoomState nextZoomState = [this, in, out] {
|
||||
switch (x324_zoomState) {
|
||||
case EZoomState::None:
|
||||
if (in)
|
||||
nextZoomState = EZoomState::In;
|
||||
else if (out)
|
||||
nextZoomState = EZoomState::Out;
|
||||
break;
|
||||
case EZoomState::In:
|
||||
if (in)
|
||||
nextZoomState = EZoomState::In;
|
||||
else if (out)
|
||||
nextZoomState = EZoomState::Out;
|
||||
break;
|
||||
case EZoomState::Out:
|
||||
if (in)
|
||||
nextZoomState = EZoomState::In;
|
||||
else if (out)
|
||||
nextZoomState = EZoomState::Out;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
if (in) {
|
||||
return EZoomState::In;
|
||||
}
|
||||
if (out) {
|
||||
return EZoomState::Out;
|
||||
}
|
||||
return EZoomState::None;
|
||||
|
||||
default:
|
||||
return EZoomState::None;
|
||||
}
|
||||
}();
|
||||
x324_zoomState = nextZoomState;
|
||||
|
||||
float delta = input.DeltaTime() * 60.f * (x1bc_state == EAutoMapperState::MapScreen ? 1.f : 4.f) *
|
||||
g_tweakAutoMapper->GetCamZoomUnitsPerFrame() * zoomSpeed;
|
||||
float oldDist = xa8_renderStates[0].x18_camDist;
|
||||
|
|
Loading…
Reference in New Issue