Skip to content

Commit

Permalink
more liars TUs, -ipa file is a godsend (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
ieee802dot11ac authored May 30, 2024
1 parent 9ddd5dd commit f0268d9
Show file tree
Hide file tree
Showing 13 changed files with 100 additions and 30 deletions.
13 changes: 9 additions & 4 deletions config/SZBE69_B8/objects.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"mw_version": "Wii/1.3",
"cflags": "band3",
"objects": {
"band3/bandtrack/GemSmasher.cpp": "NonMatching",
"band3/bandtrack/GemSmasher.cpp": "LinkIssues",
"band3/bandtrack/GraphicsUtl.cpp": "Matching",

"band3/game/BandUser.cpp": "NonMatching",
Expand Down Expand Up @@ -53,6 +53,11 @@
"network/Core/CacheManager.cpp": "Matching",
"network/Core/JobQueue.cpp": "Matching",


"network/ddl/AdapterDeclaration.cpp": "Matching",
"network/ddl/NameSpace.cpp": "Matching",
"network/ddl/ParseTree.cpp": "Matching",

"network/net/JsonUtils.cpp": "NonMatching",

"network/Plugins/ZLibPlugin.cpp": "Matching",
Expand Down Expand Up @@ -397,7 +402,7 @@
"system/synth/StreamReceiver.cpp": "NonMatching",
"system/synth/Synth.cpp": "NonMatching",

"system/track/Track.cpp": "LinkIssues",
"system/track/Track.cpp": {"status": "Matching", "extra_cflags": ["-ipa file"]},
"system/track/TrackDir.cpp": "NonMatching",
"system/track/TrackTest.cpp": "Matching",
"system/track/TrackWidget.cpp": "NonMatching",
Expand All @@ -406,7 +411,7 @@
"system/ui/PanelDir.cpp": "NonMatching",
"system/ui/Screenshot.cpp": "NonMatching",
"system/ui/ScrollSelect.cpp": "NonMatching",
"system/ui/UIButton.cpp": "LinkIssues",
"system/ui/UIButton.cpp": {"status": "Matching", "extra_cflags": ["-ipa file"]},
"system/ui/UIColor.cpp": "Matching",
"system/ui/UIComponent.cpp": "NonMatching",
"system/ui/UIFontImporter.cpp": "NonMatching",
Expand All @@ -420,7 +425,7 @@
"system/ui/UIPicture.cpp": "NonMatching",
"system/ui/UIProxy.cpp": "NonMatching",
"system/ui/UIResource.cpp": "NonMatching",
"system/ui/UIScreen.cpp": "NonMatching",
"system/ui/UIScreen.cpp": "Equivalent",
"system/ui/UITransitionHandler.cpp": "Matching",

"system/utl/BeatMap.cpp": "NonMatching",
Expand Down
Empty file.
Empty file added src/network/ddl/NameSpace.cpp
Empty file.
Empty file added src/network/ddl/ParseTree.cpp
Empty file.
2 changes: 1 addition & 1 deletion src/system/obj/PropSync_p.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ template <class T> inline bool PropSync(T*& obj, DataNode& node, DataArray* prop
else {
MILO_ASSERT(i == prop->Size() && op <= kPropInsert, 0x58);
if(op == kPropGet) node = DataNode(obj);
else obj = node.GetObj(0);
else obj = node.Obj<T>(0);
return true;
}
}
Expand Down
5 changes: 5 additions & 0 deletions src/system/rndobj/Rnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include "obj/Object.h"
#include "rndobj/Console.h"
#include "rndobj/Draw.h"
#include "rndobj/Mat.h"
#include "rndobj/Overlay.h"

class Rnd : public Hmx::Object, public RndOverlay::Callback { // there's some multiple inheritance bs goin on here and i don't like it
Expand All @@ -23,6 +24,8 @@ class Rnd : public Hmx::Object, public RndOverlay::Callback { // there's some mu
virtual void PreInit(), Init(), ReInit(), Terminate();
virtual void SetClearColor(const Hmx::Color& c) { mColor = c; }
virtual void ForceColorClear() {}
virtual void ScreenDump(const char*), ScreenDumpUnique(const char*);
virtual void DrawRect(const Hmx::Rect&, const Hmx::Color&, RndMat*, const Hmx::Color*, const Hmx::Color*);

virtual void BeginDrawing(), EndDrawing();

Expand All @@ -36,6 +39,7 @@ class Rnd : public Hmx::Object, public RndOverlay::Callback { // there's some mu
RndConsole* mConsole; // 0x80

int mAspectRatio; // 0xE0
int unk_0xE4;

bool mShrinkToSafe; // 0xEA
bool ShrinkToSafeArea() { return mShrinkToSafe; }
Expand All @@ -49,6 +53,7 @@ class Rnd : public Hmx::Object, public RndOverlay::Callback { // there's some mu
void UpdateRate(); void UpdateHeap();
float DrawTimers(float);
float YRatio();
void Modal(bool&, char*, bool);

DataNode OnScreenDump(const DataArray*);
DataNode OnScreenDumpUnique(const DataArray*);
Expand Down
7 changes: 3 additions & 4 deletions src/system/rndwii/Rnd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,14 @@ void OnDrawSync(u16 s) {

WiiRnd::WiiRnd() : unk_0x2B0(false), unk_0x2B1(false), unk_0x2B2(false), unk_0x2B3(false), unk_0x2BC(false),
mFramesBuffered(2) {
unk_0x20 = 0;
unk_0x24 = 0;
unk_0x28 = 0;
unk_0x2C = 0;
mColor.Set(0, 0, 0, 0);
unk_0x2B4.reserve(0x20);
}

WiiRnd::~WiiRnd() {}

void WiiModal(bool& rb, char* c, bool b) { TheWiiRnd.Modal(rb, c, b); }

void WiiRnd::WiiPreInit() {
Rnd::PreInit();
Hmx::Object::RegisterFactory(WiiTex::StaticClassName(), WiiTex::NewObject);
Expand Down
2 changes: 1 addition & 1 deletion src/system/track/Track.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
void TrackInit() {
Hmx::Object::RegisterFactory(TrackDir::StaticClassName(), TrackDir::NewObject);
Hmx::Object::RegisterFactory(TrackWidget::StaticClassName(), TrackWidget::NewObject);
}
}
55 changes: 52 additions & 3 deletions src/system/ui/PanelDir.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,60 @@
#include "ui/PanelDir.h"
#include "obj/ObjMacros.h"
#include "obj/ObjPtr_p.h"
#include "obj/Object.h"
#include "obj/ObjVersion.h"
#include "ui/UIComponent.h"
#include "ui/UIPanel.h"
#include "rndobj/Cam.h"
#include "utl/Symbols.h"

PanelDir::PanelDir() : mFocusComponent(0), mPanel(0), mCam(this, 0), mCanEndWorld(1), mUseSpecifiedCam(0), mShowEditModePanels(0), mShowFocusComponent(1) {
INIT_REVS(PanelDir)

PanelDir::PanelDir() : mFocusComponent(0), mOwnerPanel(0), mCam(this, 0), mCanEndWorld(1), mUseSpecifiedCam(0), mShowEditModePanels(0), mShowFocusComponent(1) {
if(TheLoadMgr.EditMode()) mShowEditModePanels = true;
}

PanelDir::~PanelDir(){
PanelDir::~PanelDir() {
for (std::vector<class PanelDir*>::iterator it = mBackPanels.begin(); it != mBackPanels.end(); it++) {
delete (*it);
*it = NULL;
}
for (std::vector<class PanelDir*>::iterator it = mFrontPanels.begin(); it != mFrontPanels.end(); it++) {
delete (*it);
*it = NULL;
}
}

SAVE_OBJ(PanelDir, 57)

void PanelDir::PreLoad(BinStream& bs) {
LOAD_REVS(bs)
ASSERT_REVS(8, 0)
PushRev(gAltRev << 16 | gRev, this);

}
RndDir::PreLoad(bs);
}

BEGIN_COPYS(PanelDir)
COPY_SUPERCLASS(RndDir)
GET_COPY(PanelDir)
BEGIN_COPY_CHECKED
COPY_MEMBER(mCam)
COPY_MEMBER(mCanEndWorld)
COPY_MEMBER(mBackFilenames)
COPY_MEMBER(mFrontFilenames)
COPY_MEMBER(mShowEditModePanels)
COPY_MEMBER(mUseSpecifiedCam)
SyncEditModePanels();
END_COPY_CHECKED
END_COPYS

BEGIN_PROPSYNCS(PanelDir)
SYNC_PROP(cam, mCam)
SYNC_PROP(postprocs_before_draw, mCanEndWorld)
SYNC_PROP(use_specified_cam, mUseSpecifiedCam)
SYNC_PROP(focus_component, mFocusComponent) // ????
SYNC_PROP(owner_panel, mOwnerPanel)

SYNC_SUPERCLASS(RndDir)
END_PROPSYNCS
27 changes: 16 additions & 11 deletions src/system/ui/PanelDir.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#ifndef UI_PANELDIR_H
#define UI_PANELDIR_H
#include "obj/Object.h"
#include "rndobj/Dir.h"
#include "obj/ObjPtr_p.h"
#include <list>
Expand Down Expand Up @@ -33,19 +34,23 @@ class PanelDir : public RndDir {
virtual UIComponent* FindComponent(const char*);
virtual void SetFocusComponent(UIComponent*, Symbol);

void SyncEditModePanels();

UIComponent* mFocusComponent;
class UIPanel* mPanel;
class UIPanel* mOwnerPanel;
ObjPtr<RndCam, ObjectDir> mCam;
std::list<int> mTriggers;
std::list<int> mComponents;
bool mCanEndWorld;
bool mUseSpecifiedCam;
std::vector<int> mBackPanels;
std::vector<int> mBackFilenames;
std::vector<int> mFrontPanels;
std::vector<int> mFrontFilenames;
bool mShowEditModePanels;
bool mShowFocusComponent;
std::list<void*> mTriggers;
std::list<void*> mComponents;
bool mCanEndWorld; // 0x1b0
bool mUseSpecifiedCam; // 0x1b1
std::vector<PanelDir*> mBackPanels; // 0x1b4
std::vector<FilePath> mBackFilenames; // 0x1bc
std::vector<PanelDir*> mFrontPanels; // 0x1c4
std::vector<FilePath> mFrontFilenames; // 0x1cc
bool mShowEditModePanels; // 0x1d4
bool mShowFocusComponent; // 0x1d5

DECLARE_REVS
};

#endif
10 changes: 9 additions & 1 deletion src/system/ui/Screenshot.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#include "ui/Screenshot.h"
#include "rndobj/Tex.h"
#include "math/Color.h"
#include "rndobj/Mat.h"
#include "rndobj/Rnd.h"
#include "rndobj/Tex.h"
#include "obj/PropSync_p.h"
#include "utl/Symbols.h"
#include "utl/Loader.h"
Expand Down Expand Up @@ -43,6 +45,12 @@ void Screenshot::Sync(){
}
}

void Screenshot::DrawShowing() {
if (!TheRnd->unk_0xE4 && TheLoadMgr.EditMode() && mMat) {
TheRnd->DrawRect(Hmx::Rect(0, 0, TheRnd->mWidth, TheRnd->mHeight), Hmx::Color(0, 0, 0), mMat, 0, 0);
}
}

Screenshot::~Screenshot(){
delete mTex;
delete mMat;
Expand Down
3 changes: 1 addition & 2 deletions src/system/ui/Screenshot.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ class Screenshot : public RndDrawable {

void Sync();

static unsigned short gRev;
static unsigned short gAltRev;
DECLARE_REVS

FilePath mTexPath;
RndTex* mTex;
Expand Down
6 changes: 3 additions & 3 deletions src/system/ui/UIPanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ void UIPanel::CheckUnload(){
void UIPanel::SetLoadedDir(class PanelDir* dir, bool b) {
MILO_ASSERT(!mLoader, 106);
MILO_ASSERT(dir, 107);
if (mDir) { mDir->mPanel = NULL; }
if (mDir) { mDir->mOwnerPanel = NULL; }
mDir = dir;
mLoaded = b;
mDir->mPanel = this;
mDir->mOwnerPanel = this;
}

void UIPanel::UnsetLoadedDir() {
MILO_ASSERT(!mLoader, 120);
if (mDir) { mDir->mPanel = NULL; }
if (mDir) { mDir->mOwnerPanel = NULL; }
mDir = NULL;
mLoaded = false;
}
Expand Down

0 comments on commit f0268d9

Please sign in to comment.