2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 00:27:42 +00:00

Various imps and minor fixes

This commit is contained in:
2017-07-30 04:00:30 -07:00
parent c06c1e464b
commit db03927e1d
29 changed files with 364 additions and 59 deletions

View File

@@ -129,16 +129,16 @@ CGameState::GameFileStateInfo CGameState::LoadGameFileState(const u8* data)
if (origMLVL == 0x158EFE17)
itemPercent = 0;
else
itemPercent = std::ceil(playerState.CalculateItemCollectionRate() * 100.f / playerState.GetPickupTotal());
itemPercent = u32(std::ceil(playerState.CalculateItemCollectionRate() * 100.f / playerState.GetPickupTotal()));
ret.x18_itemPercent = itemPercent;
float somePercent;
float scanPercent;
if (playerState.GetTotalLogScans() == 0)
somePercent = 0.f;
scanPercent = 0.f;
else
somePercent = 100.f * playerState.GetLogScans() / float(playerState.GetTotalLogScans());
ret.x1c_scanPercent = somePercent;
scanPercent = 100.f * playerState.GetLogScans() / float(playerState.GetTotalLogScans());
ret.x1c_scanPercent = scanPercent;
return ret;
}