mirror of https://github.com/AxioDL/metaforce.git
Merge branch 'master' of https://github.com/AxioDL/urde
This commit is contained in:
commit
c806f4a612
|
@ -20,13 +20,10 @@ bool MLVL::Extract(const SpecBase& dataSpec, PAKEntryReadStream& rs, const hecl:
|
|||
MLVL mlvl;
|
||||
mlvl.read(rs);
|
||||
const nod::Node* node;
|
||||
const typename PAKRouter<PAKBridge>::EntryType* texEntry = pakRouter.lookupEntry(mlvl.saveWorldId, &node);
|
||||
hecl::ProjectPath savwPath = pakRouter.getWorking(texEntry);
|
||||
const typename PAKRouter<PAKBridge>::EntryType* savwEntry = pakRouter.lookupEntry(mlvl.saveWorldId, &node);
|
||||
SAVW savw;
|
||||
if (!savwPath.isNone())
|
||||
{
|
||||
savwPath.makeDirChain(false);
|
||||
PAKEntryReadStream rs = texEntry->beginReadStream(*node);
|
||||
PAKEntryReadStream rs = savwEntry->beginReadStream(*node);
|
||||
savw.read(rs);
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,12 @@ bool CMemoryCardSys::InitializePump()
|
|||
}
|
||||
|
||||
if (done)
|
||||
{
|
||||
std::sort(x20_scanStates.begin(), x20_scanStates.end(), [&](const auto& a, const auto& b) ->bool{
|
||||
return g_ResFactory->TranslateNewToOriginal(a.first) < g_ResFactory->TranslateNewToOriginal(b.first);
|
||||
});
|
||||
x1c_worldInter = std::experimental::nullopt;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -203,8 +203,8 @@ CPlayerState::EPlayerSuit CPlayerState::GetCurrentSuit() const
|
|||
|
||||
bool CPlayerState::CanVisorSeeFog(const CStateManager& stateMgr) const
|
||||
{
|
||||
u32 activeVisor = u32(GetActiveVisor(stateMgr));
|
||||
if (activeVisor == 0 || activeVisor == 2)
|
||||
EPlayerVisor activeVisor = GetActiveVisor(stateMgr);
|
||||
if (activeVisor == EPlayerVisor::Combat || activeVisor == EPlayerVisor::Scan)
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
@ -222,9 +222,26 @@ void CPlayerState::UpdateStaticInterference(CStateManager& stateMgr, const float
|
|||
x188_staticIntf.Update(stateMgr, dt);
|
||||
}
|
||||
|
||||
void CPlayerState::IncreaseScanTime(u32 time, float val)
|
||||
void CPlayerState::SetScanTime(ResId res, float time)
|
||||
{
|
||||
auto it = std::find_if(x170_scanTimes.begin(), x170_scanTimes.end(), [&](const auto& test) -> bool{
|
||||
return test.first == res;
|
||||
});
|
||||
|
||||
if (it != x170_scanTimes.end())
|
||||
it->second = time;
|
||||
}
|
||||
|
||||
float CPlayerState::GetScanTime(ResId res) const
|
||||
{
|
||||
const auto it = std::find_if(x170_scanTimes.cbegin(), x170_scanTimes.cend(), [&](const auto& test) -> bool{
|
||||
return test.first == res;
|
||||
});
|
||||
|
||||
if (it == x170_scanTimes.end())
|
||||
return 0.f;
|
||||
|
||||
return it->second;
|
||||
}
|
||||
|
||||
bool CPlayerState::GetIsVisorTransitioning() const
|
||||
|
|
|
@ -145,8 +145,8 @@ public:
|
|||
EPlayerVisor GetActiveVisor(const CStateManager& stateMgr) const;
|
||||
void UpdateStaticInterference(CStateManager& stateMgr, const float& dt);
|
||||
void IncreaseScanTime(u32 time, float val);
|
||||
void SetScanTime(u32 time, float val);
|
||||
float GetScanTime(u32 time, float val);
|
||||
void SetScanTime(ResId time, float val);
|
||||
float GetScanTime(ResId time) const;
|
||||
bool GetIsVisorTransitioning() const;
|
||||
float GetVisorTransitionFactor() const;
|
||||
void UpdateVisorTransition(float dt);
|
||||
|
|
|
@ -31,7 +31,7 @@ CRasterFont::CRasterFont(urde::CInputStream& in, urde::IObjectStore& store)
|
|||
u32 tmp3 = in.readUint32Big();
|
||||
u32 tmp4 = in.readUint32Big();
|
||||
std::string name= in.readString();
|
||||
u32 txtrId = in.readUint32Big();
|
||||
u32 txtrId = (version == 5 ? in.readUint64Big() : in.readUint32Big());
|
||||
x30_fontInfo = CFontInfo(tmp1, tmp2, tmp3, tmp4, name.c_str());
|
||||
x80_texture = store.GetObj({FOURCC('TXTR'), txtrId});
|
||||
x2c_mode = EColorType(in.readUint32Big());
|
||||
|
@ -46,15 +46,31 @@ CRasterFont::CRasterFont(urde::CInputStream& in, urde::IObjectStore& store)
|
|||
float startV = in.readFloatBig();
|
||||
float endU = in.readFloatBig();
|
||||
float endV = in.readFloatBig();
|
||||
s32 a = in.readInt32Big();
|
||||
s32 b = in.readInt32Big();
|
||||
s32 c = in.readInt32Big();
|
||||
s32 cellWidth = in.readInt32Big();
|
||||
s32 cellHeight = in.readInt32Big();
|
||||
s32 baseline = in.readInt32Big();
|
||||
s32 kernStart = in.readInt32Big();
|
||||
s32 layer = 0;
|
||||
s32 a, b, c, cellWidth, cellHeight, baseline, kernStart;
|
||||
if (version < 4)
|
||||
{
|
||||
a = in.readInt32Big();
|
||||
b = in.readInt32Big();
|
||||
c = in.readInt32Big();
|
||||
cellWidth = in.readInt32Big();
|
||||
cellHeight = in.readInt32Big();
|
||||
baseline = in.readInt32Big();
|
||||
kernStart = in.readInt32Big();
|
||||
}
|
||||
else
|
||||
{
|
||||
layer = in.readByte();
|
||||
a = in.readByte();
|
||||
b = in.readByte();
|
||||
c = in.readByte();
|
||||
cellWidth = in.readByte();
|
||||
cellHeight = in.readByte();
|
||||
baseline = in.readByte();
|
||||
kernStart = in.readInt16Big();
|
||||
}
|
||||
xc_glyphs.push_back(std::make_pair(chr, CGlyph(a, b, c, startU, startV, endU, endV,
|
||||
cellWidth, cellHeight, baseline, kernStart)));
|
||||
cellWidth, cellHeight, baseline, kernStart, layer)));
|
||||
}
|
||||
|
||||
std::sort(xc_glyphs.begin(), xc_glyphs.end(), [=](auto& a, auto& b) -> bool{
|
||||
|
|
|
@ -523,6 +523,7 @@ void CFrontEndUI::SNewFileSelectFrame::SetupFrameContents()
|
|||
{
|
||||
auto pt = std::div(data->x0_playTime, 3600);
|
||||
str = hecl::Char16Format(L"%02d:%02d", pt.quot, pt.rem / 60);
|
||||
break;
|
||||
}
|
||||
str = g_MainStringTable->GetString(52);
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue