This commit is contained in:
robojumper
2025-03-15 23:20:09 +01:00
parent 8759f710e5
commit 03e3fc5cfa
8 changed files with 108 additions and 21 deletions
+27 -1
View File
@@ -1,6 +1,32 @@
#ifndef EGG_DRAW_PATH_DOF_H
#define EGG_DRAW_PATH_DOF_H
namespace EGG {} // namespace EGG
#include "egg/prim/eggBinary.h"
#include "egg/gfx/eggDrawPathBase.h"
namespace EGG {
class DrawPathDOF : public DrawPathBase, public IBinary<DrawPathDOF> {
public:
class BinData {
// TODO
};
DrawPathDOF();
virtual ~DrawPathDOF();
virtual u16 getNumStep() {
return 3;
}
virtual void internalResetForDraw() override;
virtual void internalDraw() override;
virtual void SetBinaryInner(const Bin &) override;
virtual void GetBinaryInner(Bin *) const override;
virtual void SetBinaryInner(const Bin &, const Bin &, f32) override;
private:
void *IHaveMembers;
};
} // namespace EGG
#endif
+50 -4
View File
@@ -8,6 +8,52 @@ namespace EGG {
class StateGX {
public:
struct ScopedColor
{
ScopedColor(bool x)
{
old = GXSetColorUpdate_(x);
}
~ScopedColor()
{
GXSetColorUpdate_(old);
}
bool old;
};
struct ScopedAlpha
{
ScopedAlpha(bool x)
{
old = GXSetAlphaUpdate_(x);
}
~ScopedAlpha()
{
GXSetAlphaUpdate_(old);
}
bool old;
};
struct ScopedDither
{
ScopedDither(bool x)
{
old = GXSetDither_(x);
}
~ScopedDither()
{
GXSetDither_(old);
}
bool old;
};
static void initialize(u16, u16, GXColor, GXPixelFmt);
static void frameInit();
static void textureInit(); // Guess for 804b4810
@@ -27,10 +73,10 @@ public:
static void invalidateTexAllGX();
static GXBool GXSetColorUpdate_(GXBool);
static GXBool GXSetAlphaUpdate_(GXBool);
static GXBool GXSetDither_(GXBool);
static GXBool GXSetDstAlpha_(GXBool, u8);
static bool GXSetColorUpdate_(bool);
static bool GXSetAlphaUpdate_(bool);
static bool GXSetDither_(bool);
static bool GXSetDstAlpha_(bool, u8);
static bool GXSetColorUpdate(bool);
static bool GXSetAlphaUpdate(bool);
+2
View File
@@ -42,6 +42,8 @@ protected:
/** Load the object from binary, interpolating between values */
virtual void SetBinaryInner(const Bin &, const Bin &, f32) = 0;
virtual ~IBinary() {}
/** Get a 4-bytes long ID string corresponding to this type */
static const char *GetBinaryType();
/** Get the current version of this type */