Some small classes

This commit is contained in:
robojumper
2025-03-15 17:33:48 +01:00
parent 35b4e24039
commit 9b7889f034
23 changed files with 576 additions and 54 deletions
+35 -1
View File
@@ -1,3 +1,37 @@
#include "egg/gfx/eggGlobalDrawState.h"
namespace EGG {} // namespace EGG
#include "common.h"
#include "egg/gfx/eggStateEfb.h"
#include "egg/gfx/eggStateGX.h"
#include "rvl/MTX/mtx.h"
namespace EGG {
Screen const *GlobalDrawState::spScreen;
u16 GlobalDrawState::sCameraId;
u32 GlobalDrawState::sDrawFlag;
// unknown
nw4r::math::MTX34 GlobalDrawState::sMtx;
GlobalDrawState sState;
void GlobalDrawState::beginDrawView(u16 cameraId, const nw4r::math::MTX34 &mtx, const Screen &screen) {
spScreen = &screen;
sCameraId = cameraId;
PSMTXCopy(mtx, sMtx);
StateEfb::Clean();
}
void GlobalDrawState::setDrawSettingGX(bool b1, bool b2) {
StateGX::GXSetColorUpdate_(sDrawFlag & 1);
StateGX::GXSetAlphaUpdate_(sDrawFlag & 2);
StateGX::GXSetDither_(sDrawFlag & 4);
StateGX::GXSetDstAlpha_(false, 0);
if (b2 && spScreen != nullptr) {
spScreen->SetProjectionGX();
}
}
} // namespace EGG