mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 15:04:56 +00:00
CGuiWidgetDrawParms: Make constexpr constructible
We can allow this structure to be constructed in a constexpr context. This also allows us to remove the cpp file, given it's no longer necessary.
This commit is contained in:
@@ -1,5 +0,0 @@
|
||||
#include "Runtime/GuiSys/CGuiWidgetDrawParms.hpp"
|
||||
|
||||
namespace urde {
|
||||
const CGuiWidgetDrawParms CGuiWidgetDrawParms::Default = {};
|
||||
}
|
||||
@@ -8,10 +8,11 @@ struct CGuiWidgetDrawParms {
|
||||
float x0_alphaMod = 1.f;
|
||||
zeus::CVector3f x4_cameraOffset;
|
||||
|
||||
CGuiWidgetDrawParms() = default;
|
||||
CGuiWidgetDrawParms(float alphaMod, const zeus::CVector3f& cameraOff)
|
||||
constexpr CGuiWidgetDrawParms() = default;
|
||||
constexpr CGuiWidgetDrawParms(float alphaMod, const zeus::CVector3f& cameraOff)
|
||||
: x0_alphaMod(alphaMod), x4_cameraOffset(cameraOff) {}
|
||||
static const CGuiWidgetDrawParms Default;
|
||||
|
||||
static constexpr CGuiWidgetDrawParms Default() { return {}; }
|
||||
};
|
||||
|
||||
} // namespace urde
|
||||
|
||||
@@ -324,7 +324,7 @@ void CHudDecoInterfaceScan::Update(float dt, const CStateManager& stateMgr) {
|
||||
void CHudDecoInterfaceScan::Draw() {
|
||||
x18_scanDisplay.Draw();
|
||||
if (x10_loadedScanHudFlat) {
|
||||
x10_loadedScanHudFlat->Draw(CGuiWidgetDrawParms::Default);
|
||||
x10_loadedScanHudFlat->Draw(CGuiWidgetDrawParms::Default());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ set(GUISYS_SOURCES
|
||||
CGuiTextPane.hpp CGuiTextPane.cpp
|
||||
CGuiTextSupport.hpp CGuiTextSupport.cpp
|
||||
CGuiWidget.hpp CGuiWidget.cpp
|
||||
CGuiWidgetDrawParms.hpp CGuiWidgetDrawParms.cpp
|
||||
CGuiWidgetDrawParms.hpp
|
||||
CSplashScreen.hpp CSplashScreen.cpp
|
||||
CGuiCompoundWidget.hpp CGuiCompoundWidget.cpp
|
||||
CSaveableState.hpp CSaveableState.cpp
|
||||
|
||||
Reference in New Issue
Block a user