2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-21 19:39:13 +00:00

RE COutput/InputStream and friends and migrate over

This branch is probably still horribly broken, but it's a good first step to migrating away from having hecl embedded in the runtime
This commit is contained in:
2022-02-17 23:37:54 -08:00
parent c679c2e0f8
commit dad7249927
172 changed files with 3629 additions and 2780 deletions

View File

@@ -164,11 +164,11 @@ void CGuiFrame::Initialize() {
}
void CGuiFrame::LoadWidgetsInGame(CInputStream& in, CSimplePool* sp) {
u32 count = in.readUint32Big();
u32 count = in.ReadLong();
x2c_widgets.reserve(count);
for (u32 i = 0; i < count; ++i) {
DataSpec::DNAFourCC type;
type.read(in);
FourCC type;
in.Get(reinterpret_cast<u8*>(&type), 4);
std::shared_ptr<CGuiWidget> widget = CGuiSys::CreateWidgetInGame(type.toUint32(), in, this, sp);
switch (widget->GetWidgetTypeID().toUint32()) {
case SBIG('CAMR'):
@@ -263,10 +263,10 @@ void CGuiFrame::ResetMouseState() {
}
std::unique_ptr<CGuiFrame> CGuiFrame::CreateFrame(CAssetId frmeId, CGuiSys& sys, CInputStream& in, CSimplePool* sp) {
in.readInt32Big();
int a = in.readInt32Big();
int b = in.readInt32Big();
int c = in.readInt32Big();
in.ReadLong();
int a = in.ReadLong();
int b = in.ReadLong();
int c = in.ReadLong();
std::unique_ptr<CGuiFrame> ret = std::make_unique<CGuiFrame>(frmeId, sys, a, b, c, sp);
ret->LoadWidgetsInGame(in, sp);