mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 05:07:43 +00:00
Lots of CMFGame integration
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
#include "CGameHintInfo.hpp"
|
||||
#include "CToken.hpp"
|
||||
#include "CMemoryCardSys.hpp"
|
||||
#include "GameGlobalObjects.hpp"
|
||||
|
||||
namespace urde
|
||||
{
|
||||
@@ -14,10 +16,10 @@ CGameHintInfo::CGameHintInfo(CInputStream& in, s32 version)
|
||||
|
||||
CGameHintInfo::CGameHint::CGameHint(CInputStream& in, s32 version)
|
||||
: x0_name(in.readString())
|
||||
, x10_(in.readFloatBig())
|
||||
, x14_fadeInTime(in.readFloatBig())
|
||||
, x10_immediateTime(in.readFloatBig())
|
||||
, x14_normalTime(in.readFloatBig())
|
||||
, x18_stringId(in.readUint32Big())
|
||||
, x1c_time(3.f * float(version <= 0 ? 1 : in.readUint32Big()))
|
||||
, x1c_continueDelayTime(3.f * float(version <= 0 ? 1 : in.readUint32Big()))
|
||||
{
|
||||
u32 locationCount = in.readUint32Big();
|
||||
x20_locations.reserve(locationCount);
|
||||
@@ -33,6 +35,18 @@ CGameHintInfo::SHintLocation::SHintLocation(CInputStream& in, s32)
|
||||
{
|
||||
}
|
||||
|
||||
int CGameHintInfo::FindHintIndex(const char* str)
|
||||
{
|
||||
int idx = 0;
|
||||
for (const CGameHintInfo::CGameHint& hint : g_MemoryCardSys->GetHints())
|
||||
{
|
||||
if (!hint.GetName().compare(str))
|
||||
return idx;
|
||||
++idx;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
CFactoryFnReturn FHintFactory(const SObjectTag&, CInputStream& in, const CVParamTransfer, CObjectReference*)
|
||||
{
|
||||
in.readUint32Big();
|
||||
|
||||
Reference in New Issue
Block a user