mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-11 15:41:47 +00:00
GuiSys Progress
This commit is contained in:
@@ -254,6 +254,7 @@ cflags_retro = [
|
||||
"-inline deferred,noauto",
|
||||
"-common on",
|
||||
"-i extern/musyx/include",
|
||||
#"-sym on",
|
||||
"-DMUSY_TARGET=MUSY_TARGET_DOLPHIN",
|
||||
]
|
||||
|
||||
@@ -446,7 +447,7 @@ config.libs = [
|
||||
Object(NonMatching, "MetroidPrime/Enemies/CPatterned.cpp"),
|
||||
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptDoor.cpp"),
|
||||
Object(NonMatching, "MetroidPrime/Enemies/CStateMachine.cpp"),
|
||||
Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CMapArea.cpp"),
|
||||
Object(Equivalent, "MetroidPrime/CMapArea.cpp"),
|
||||
Object(NonMatching, "MetroidPrime/Cameras/CBallCamera.cpp"),
|
||||
Object(NonMatching, "MetroidPrime/ScriptObjects/CScriptEffect.cpp"),
|
||||
Object(NonMatching, "MetroidPrime/Weapons/CBomb.cpp"),
|
||||
|
||||
@@ -44,6 +44,8 @@ public:
|
||||
CGuiObject* ChildObject();
|
||||
const CGuiObject* GetNextSibling() const;
|
||||
CGuiObject* NextSibling();
|
||||
|
||||
|
||||
private:
|
||||
CTransform4f x4_localXF;
|
||||
CTransform4f x34_worldXF;
|
||||
|
||||
@@ -44,16 +44,16 @@ public:
|
||||
|
||||
CGuiWidget(const CGuiWidgetParms& parms);
|
||||
~CGuiWidget();
|
||||
void Update(float dt);
|
||||
void Draw(const CGuiWidgetDrawParms& drawParms) const;
|
||||
void Initialize();
|
||||
void Update(float dt) override;
|
||||
void Draw(const CGuiWidgetDrawParms& drawParms) const override;
|
||||
void Initialize() override {}
|
||||
virtual void ProcessUserInput(const CFinalInput& input);
|
||||
virtual void Touch() const;
|
||||
virtual void Touch() const {}
|
||||
virtual bool GetIsVisible() const;
|
||||
virtual bool GetIsActive() const;
|
||||
virtual FourCC GetWidgetTypeID() const { return 'BWIG'; }
|
||||
virtual bool AddWorkerWidget(CGuiWidget* worker);
|
||||
virtual bool GetIsFinishedLoadingWidgetSpecific() const;
|
||||
virtual bool GetIsFinishedLoadingWidgetSpecific() const { return true; };
|
||||
virtual void OnVisible();
|
||||
virtual void OnActivate();
|
||||
short GetWorkerId() const { return xb4_workerId; }
|
||||
@@ -69,6 +69,7 @@ public:
|
||||
CGuiFrame* GetFrame() { return xb0_frame; }
|
||||
|
||||
static const short InvalidWidgetId() { return gkInvalidWidgetId; }
|
||||
|
||||
private:
|
||||
static const short gkInvalidWidgetId;
|
||||
short x70_selfId;
|
||||
|
||||
@@ -59,10 +59,11 @@ void CAuiMeter::UpdateMeterWorkers() {
|
||||
int etankCap;
|
||||
int etankFill;
|
||||
int workerCount = xd4_workers.size();
|
||||
if (xc4_noRoundUp)
|
||||
if (xc4_noRoundUp) {
|
||||
etankCap = scale * xcc_capacity;
|
||||
else
|
||||
} else {
|
||||
etankCap = 0.5f + (scale * xcc_capacity);
|
||||
}
|
||||
|
||||
if (xc4_noRoundUp)
|
||||
etankFill = scale * xd0_value;
|
||||
@@ -74,24 +75,25 @@ void CAuiMeter::UpdateMeterWorkers() {
|
||||
if (!worker)
|
||||
continue;
|
||||
|
||||
CGuiWidget* fullTank = worker->GetWorkerWidget(0);
|
||||
CGuiWidget* emptyTank = worker->GetWorkerWidget(1);
|
||||
CGuiWidget* tanks[2];
|
||||
tanks[0] = worker->GetWorkerWidget(0);
|
||||
tanks[1] = worker->GetWorkerWidget(1);
|
||||
|
||||
if (i < etankFill) {
|
||||
if (fullTank)
|
||||
fullTank->SetIsVisible(true);
|
||||
if (emptyTank)
|
||||
emptyTank->SetIsVisible(false);
|
||||
if (tanks[0])
|
||||
tanks[0]->SetIsVisible(true);
|
||||
if (tanks[1])
|
||||
tanks[1]->SetIsVisible(false);
|
||||
} else if (i < etankCap) {
|
||||
if (fullTank)
|
||||
fullTank->SetIsVisible(false);
|
||||
if (emptyTank)
|
||||
emptyTank->SetIsVisible(true);
|
||||
if (tanks[0])
|
||||
tanks[0]->SetIsVisible(false);
|
||||
if (tanks[1])
|
||||
tanks[1]->SetIsVisible(true);
|
||||
} else {
|
||||
if (fullTank)
|
||||
fullTank->SetIsVisible(false);
|
||||
if (emptyTank)
|
||||
emptyTank->SetIsVisible(false);
|
||||
if (tanks[0])
|
||||
tanks[0]->SetIsVisible(false);
|
||||
if (tanks[1])
|
||||
tanks[1]->SetIsVisible(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user