eggDrawPathLightMap OK

This commit is contained in:
elijah-thomas774
2025-03-22 20:47:12 -04:00
parent b16089a834
commit f66c22cf63
15 changed files with 295 additions and 35 deletions
+3 -1
View File
@@ -2213,8 +2213,10 @@ egg/gfx/eggDrawPathDOF.cpp:
.text start:0x804A29C0 end:0x804A4BE8
.data start:0x8056EF28 end:0x8056EFA0
egg/gfx/eggDrawPathUnk2.cpp:
egg/gfx/eggDrawPathLightMap.cpp:
.text start:0x804A4BF0 end:0x804A54E8
.data start:0x8056EFA0 end:0x8056EFF0
.sdata2 start:0x8057F5F8 end:0x8057F608
egg/gfx/eggFog.cpp:
.text start:0x804A54F0 end:0x804A5A08
+13 -13
View File
@@ -9796,8 +9796,8 @@ setMaterialInternal__Q23EGG14PostEffectBaseFv = .text:0x80174920; // type:functi
fn_80174930 = .text:0x80174930; // type:function size:0x8
fn_80174940 = .text:0x80174940; // type:function size:0x14
fn_80174960 = .text:0x80174960; // type:function size:0x8
@8@scnProcDraw__Q23EGG12DrawPathBaseFUs = .text:0x80174970; // type:function size:0x8
@20@ExecCallback_CALC_VIEW__Q23EGG12DrawPathBaseFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x80174980; // type:function size:0x8
@8@scnProcDraw__Q23EGG12DrawPathBaseFUs = .text:0x80174970; // type:function size:0x8 scope:weak
@20@ExecCallback_CALC_VIEW__Q23EGG12DrawPathBaseFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x80174980; // type:function size:0x8 scope:weak
fn_80174990 = .text:0x80174990; // type:function size:0x8
fn_801749A0 = .text:0x801749A0; // type:function size:0x8
fn_801749B0 = .text:0x801749B0; // type:function size:0x8
@@ -10535,7 +10535,7 @@ fn_80197F50 = .text:0x80197F50; // type:function size:0x5C
fn_80197FB0 = .text:0x80197FB0; // type:function size:0x5C
fn_80198010 = .text:0x80198010; // type:function size:0x60
fn_80198070 = .text:0x80198070; // type:function size:0x64
EGG__DrawPathShadowVolume____dt = .text:0x801980E0; // type:function size:0x60
__dt__Q23EGG16DrawPathLightMapFv = .text:0x801980E0; // type:function size:0x60 scope:weak
fn_80198140 = .text:0x80198140; // type:function size:0x58
fn_801981A0 = .text:0x801981A0; // type:function size:0x58
fn_80198200 = .text:0x80198200; // type:function size:0x58
@@ -10646,7 +10646,7 @@ addArcnToStage = .text:0x8019BF80; // type:function size:0x17C
ArcnObjnManager__doLoad = .text:0x8019C100; // type:function size:0x64
ArcnObjnManager__checkLoaded = .text:0x8019C170; // type:function size:0x44
fn_8019C1C0 = .text:0x8019C1C0; // type:function size:0x44
fn_8019C210 = .text:0x8019C210; // type:function size:0x8
getNumStep__Q23EGG16DrawPathLightMapCFv = .text:0x8019C210; // type:function size:0x8 scope:weak
fn_8019C220 = .text:0x8019C220; // type:function size:0x4
fn_8019C230 = .text:0x8019C230; // type:function size:0x4
fn_8019C240 = .text:0x8019C240; // type:function size:0x4
@@ -26482,8 +26482,8 @@ __ct__Q23EGG12DrawPathBaseFv = .text:0x804A0C30; // type:function size:0x58
createScnProc__Q23EGG12DrawPathBaseFP12MEMAllocator = .text:0x804A0C90; // type:function size:0x1B0
ExecCallback_CALC_VIEW__Q23EGG12DrawPathBaseFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x804A0E40; // type:function size:0x20
scnProcDraw__Q23EGG12DrawPathBaseFUs = .text:0x804A0E60; // type:function size:0x20
@8@__dt__Q23EGG12DrawPathBaseFv = .text:0x804A0E80; // type:function size:0x8
@20@__dt__Q23EGG12DrawPathBaseFv = .text:0x804A0E90; // type:function size:0x8
@8@__dt__Q23EGG12DrawPathBaseFv = .text:0x804A0E80; // type:function size:0x8 scope:weak
@20@__dt__Q23EGG12DrawPathBaseFv = .text:0x804A0E90; // type:function size:0x8 scope:weak
FUN_804a0ea0 = .text:0x804A0EA0; // type:function size:0x188
__dt__Q23EGG14PostEffectMaskFv = .text:0x804A1030; // type:function size:0x40
__dt__Q23EGG14PostEffectUnk1Fv = .text:0x804A1070; // type:function size:0x40
@@ -26514,12 +26514,12 @@ SetBinaryInner__Q23EGG11DrawPathDOFFRCQ33EGG28IBinary<Q23EGG11DrawPathDOF>3BinRC
@8@__dt__Q23EGG11DrawPathDOFFv = .text:0x804A4BC0; // type:function size:0x8
@20@__dt__Q23EGG11DrawPathDOFFv = .text:0x804A4BD0; // type:function size:0x8
@24@__dt__Q23EGG11DrawPathDOFFv = .text:0x804A4BE0; // type:function size:0x8
EGG__DrawPathShadowVolume____ct = .text:0x804A4BF0; // type:function size:0x7C
FUN_804a4c70 = .text:0x804A4C70; // type:function size:0x3C
EGG__DrawPathShadowVolume__internalDraw = .text:0x804A4CB0; // type:function size:0x7B4
FUN_804a5470 = .text:0x804A5470; // type:function size:0x5C
EGG__DrawPathShadowVolume__8__dt = .text:0x804A54D0; // type:function size:0x8
EGG__DrawPathShadowVolume__20__dt = .text:0x804A54E0; // type:function size:0x8
__ct__Q23EGG16DrawPathLightMapFv = .text:0x804A4BF0; // type:function size:0x7C
internalResetForDraw__Q23EGG16DrawPathLightMapFv = .text:0x804A4C70; // type:function size:0x3C
internalDraw__Q23EGG16DrawPathLightMapFUs = .text:0x804A4CB0; // type:function size:0x7B4
freeTextureBuffers__Q23EGG16DrawPathLightMapFv = .text:0x804A5470; // type:function size:0x5C
@8@__dt__Q23EGG16DrawPathLightMapFv = .text:0x804A54D0; // type:function size:0x8 scope:weak
@20@__dt__Q23EGG16DrawPathLightMapFv = .text:0x804A54E0; // type:function size:0x8 scope:weak
GetBinaryType__Q23EGG19IBinary<Q23EGG3Fog>Fv = .text:0x804A54F0; // type:function size:0x8
GetVersion__Q23EGG19IBinary<Q23EGG3Fog>Fv = .text:0x804A5500; // type:function size:0x8
__ct__Q23EGG3FogFv = .text:0x804A5510; // type:function size:0x3C
@@ -37363,7 +37363,7 @@ jumptable_8056EE18 = .data:0x8056EE18; // type:object size:0x48 scope:local
__vt__Q23EGG12DrawPathBase = .data:0x8056EE60; // type:object size:0x50
lbl_8056EEB0 = .data:0x8056EEB0; // type:object size:0x78
__vt__Q23EGG11DrawPathDOF = .data:0x8056EF28; // type:object size:0x78
lbl_8056EFA0 = .data:0x8056EFA0; // type:object size:0x50
__vt__Q23EGG16DrawPathLightMap = .data:0x8056EFA0; // type:object size:0x50
__vt__Q23EGG3Fog = .data:0x8056EFF0; // type:object size:0x20
__vt__Q23EGG10FogManager = .data:0x8056F010; // type:object size:0x1C
__vt__Q23EGG7Frustum = .data:0x8056F030; // type:object size:0x14
+1 -1
View File
@@ -875,7 +875,7 @@ config.libs = [
Object(Matching, "egg/gfx/eggDrawPathBase.cpp"),
Object(NonMatching, "egg/gfx/eggDrawPathUnk1.cpp"),
Object(NonMatching, "egg/gfx/eggDrawPathDOF.cpp"),
Object(NonMatching, "egg/gfx/eggDrawPathUnk2.cpp"),
Object(Matching, "egg/gfx/eggDrawPathLightMap.cpp"),
Object(NonMatching, "egg/gfx/eggFog.cpp"),
Object(NonMatching, "egg/gfx/eggFogManager.cpp"),
Object(NonMatching, "egg/gfx/eggFrustum.cpp"),
+9 -2
View File
@@ -12,8 +12,8 @@ struct CopyFilter {
class CapTexture : public CpuTexture {
public:
CapTexture() {}
CapTexture(u16 width, u16 height, GXTexFmt texFmt): CpuTexture(width, height, texFmt) {}
CapTexture(const GXTexObj *pObj): CpuTexture(pObj) {}
CapTexture(u16 width, u16 height, GXTexFmt texFmt) : CpuTexture(width, height, texFmt) {}
CapTexture(const GXTexObj *pObj) : CpuTexture(pObj) {}
virtual void configure() override; // at 0xC
@@ -27,6 +27,13 @@ public:
}
}
void onCapFlag(u8 flag) {
mCapFlags |= flag;
}
void offCapFlag(u8 flag) {
mCapFlags &= ~flag;
}
void setClearColor(const GXColor &clr) {
mClearColor = clr;
}
+4 -1
View File
@@ -151,8 +151,11 @@ public:
static void SetVtxState(enum VtxType);
static void SetZMode(enum ZMode);
static void SetBlendMode(enum Blend);
static void DrawDLWorld(DL dl, const EGG::Matrix34f& mtx, GXColor color);
static void DrawDLWorld(DL dl, const EGG::Matrix34f &mtx, GXColor color);
static void DrawDL16(const nw4r::math::MTX34 &mtx, GXColor clr) {
DrawDL(DL_16, mtx, clr);
}
// TODO MORE
// not sure
+3 -3
View File
@@ -17,12 +17,12 @@ public:
protected:
virtual u16 getNumStep() const = 0; // at 0x3C
virtual void internalResetForDraw() {} // at 0x40
virtual void internalDraw() = 0; // at 0x44
virtual void internalDraw(u16) = 0; // at 0x44
virtual void ExecCallback_CALC_VIEW(
nw4r::g3d::ScnObj::Timing /* timing */, nw4r::g3d::ScnObj * /* pObj */, u32 /* param */, void * /* pInfo */
) override; // also at 0x48
virtual void scnProcDraw(u16) override; // also at 0x4C
) override; // also at 0x48
virtual void scnProcDraw(u16) override; // also at 0x4C
};
} // namespace EGG
+1 -1
View File
@@ -18,7 +18,7 @@ public:
return 3;
}
virtual void internalResetForDraw() override;
virtual void internalDraw() override;
virtual void internalDraw(u16) override;
virtual void SetBinaryInner(const Bin &) override;
virtual void GetBinaryInner(Bin *) const override;
+36
View File
@@ -0,0 +1,36 @@
#ifndef EGG_DRAW_PATH_LIGHTMAP_H
#define EGG_DRAW_PATH_LIGHTMAP_H
#include "egg/gfx/eggDrawPathBase.h"
#include "egg/gfx/eggTextureBuffer.h"
namespace EGG {
// A guess based of what is seen in ogws. Has been Updated
class DrawPathLightMap : public DrawPathBase {
public:
DrawPathLightMap();
virtual u16 getNumStep() const override {
return 3;
}
virtual void internalResetForDraw() override;
virtual void internalDraw(u16) override;
virtual ~DrawPathLightMap();
void freeTextureBuffers();
private:
/* 0x18 */ u8 field_0x18;
/* 0x19 */ u8 mAlpha;
/* 0x1C */ int field_0x1C;
/* 0x20 */ int field_0x20;
/* 0x24 */ u32 field_0x24;
/* 0x28 */ TextureBuffer *mpTextureBuffer_0x28;
/* 0x2C */ TextureBuffer *mpTextureBuffer_0x2C;
/* 0x30 */ TextureBuffer *mpTextureBuffer_0x30;
/* 0x34 */ u32 mOldDrawFlag;
};
} // namespace EGG
#endif
-6
View File
@@ -1,6 +0,0 @@
#ifndef EGG_DRAW_PATH_UNK2_H
#define EGG_DRAW_PATH_UNK2_H
namespace EGG {} // namespace EGG
#endif
+19
View File
@@ -12,6 +12,25 @@ public:
static void setDrawSettingGX(bool, bool);
static void beginDrawView(u16, nw4r::math::MTX34 const &, Screen const &);
static const Screen &getScreen() {
return *spScreen;
}
static void setScreen(const Screen &screen) {
spScreen = &screen;
}
static u32 getDrawFlag() {
return sDrawFlag;
}
static void setDrawFlag(u32 flag) {
sDrawFlag = flag;
}
static void onDrawFlag(u32 flag) {
sDrawFlag |= flag;
}
static void offDrawFlag(u32 flag) {
sDrawFlag &= ~flag;
}
private:
static u16 sCameraId;
static u32 sDrawFlag;
+9 -1
View File
@@ -8,12 +8,20 @@ namespace EGG {
class ScreenEffectBase {
protected:
u8 mFlag;
/* 0x0 */ u8 mFlag;
public:
ScreenEffectBase();
virtual ~ScreenEffectBase() {} // at 0x8
static Screen &GetScreen() {
return sScreen;
}
bool isFlag0x2() const {
return mFlag & 2;
}
protected:
static Screen sScreen;
};
+2 -2
View File
@@ -35,9 +35,9 @@ void DrawPathBase::ExecCallback_CALC_VIEW(
}
}
void DrawPathBase::scnProcDraw(u16) {
void DrawPathBase::scnProcDraw(u16 idx) {
if (mFlag & 1) {
internalDraw();
internalDraw(idx);
}
}
+1 -1
View File
@@ -6,7 +6,7 @@ DrawPathDOF::DrawPathDOF() {}
DrawPathDOF::~DrawPathDOF() {}
void DrawPathDOF::internalDraw() {}
void DrawPathDOF::internalDraw(u16) {}
void DrawPathDOF::internalResetForDraw() {}
+194
View File
@@ -0,0 +1,194 @@
#include "egg/gfx/eggDrawPathLightMap.h"
#include "common.h"
#include "egg/gfx/eggDrawGX.h"
#include "egg/gfx/eggGlobalDrawState.h"
#include "egg/gfx/eggPostEffectBase.h"
#include "egg/gfx/eggStateGX.h"
#include "rvl/GX/GXPixel.h"
#include "rvl/GX/GXTypes.h"
namespace EGG {
DrawPathLightMap::DrawPathLightMap()
: field_0x18(6),
mAlpha(0xFF),
field_0x1C(0),
field_0x20(0),
field_0x24(0),
mpTextureBuffer_0x28(nullptr),
mpTextureBuffer_0x2C(nullptr),
mpTextureBuffer_0x30(nullptr),
mOldDrawFlag(0) {}
void DrawPathLightMap::internalResetForDraw() {
freeTextureBuffers();
mpTextureBuffer_0x28 = nullptr;
mpTextureBuffer_0x2C = nullptr;
mpTextureBuffer_0x30 = nullptr;
}
void DrawPathLightMap::internalDraw(u16 idx) {
const Screen::DataEfb &efb = GlobalDrawState::getScreen().GetDataEfb();
switch (idx) {
case 0: {
if (field_0x18 & 1) {
mpTextureBuffer_0x30 = TextureBuffer::alloc(efb.vp.x2, efb.vp.y2, GX_TF_RGBA8);
mpTextureBuffer_0x30->onCapFlag(1);
mpTextureBuffer_0x30->onCapFlag(2);
mpTextureBuffer_0x30->setFilt(GX_NEAR, GX_NEAR);
mpTextureBuffer_0x30->capture(efb.vp.x1, efb.vp.y1, false, -1);
}
mOldDrawFlag = GlobalDrawState::getDrawFlag();
GlobalDrawState::onDrawFlag(0x1 | 0x2);
} break;
case 1: {
GlobalDrawState::setDrawFlag(mOldDrawFlag);
GXTexFmt fmt = GX_TF_RGBA8;
if (field_0x20 == 1) {
fmt = GX_TF_RGB5A3;
if (field_0x1C == 1) {
fmt = GX_TF_RGB565;
}
}
int capW = efb.vp.x1;
int capH = efb.vp.y1;
mpTextureBuffer_0x28 = TextureBuffer::alloc(efb.vp.x2, efb.vp.y2, fmt);
mpTextureBuffer_0x28->onCapFlag(1);
mpTextureBuffer_0x28->onCapFlag(2);
if (!(field_0x18 & 2)) {
mpTextureBuffer_0x28->onCapFlag(4);
}
mpTextureBuffer_0x28->setClearColor(StateGX::getClearEfb());
mpTextureBuffer_0x28->capture(capW, capH, false, -1);
mpTextureBuffer_0x28->setFilt(GX_NEAR, GX_NEAR);
if (mpTextureBuffer_0x30) {
nw4r::math::MTX34 forDL;
StateGX::ScopedColor _color(true);
StateGX::ScopedAlpha _alpha(true);
StateGX::ScopedDither _dither(false);
PostEffectBase::setProjection(GetScreen());
PSMTXScale(forDL, GetScreen().GetWidth(), GetScreen().GetHeight(), 1.0f);
mpTextureBuffer_0x30->load(GX_TEXMAP0);
DrawGX::BeginDrawScreen(true, true, false);
DrawGX::SetBlendMode(DrawGX::BLEND_14);
DrawGX::DrawDL16(forDL, DrawGX::WHITE);
mpTextureBuffer_0x30->free();
mpTextureBuffer_0x30 = nullptr;
}
if (field_0x18 & 2) {
mpTextureBuffer_0x2C = TextureBuffer::alloc(efb.vp.x2, efb.vp.y2, GX_TF_Z24X8);
mpTextureBuffer_0x2C->onCapFlag(4);
if (isFlag0x2()) {
mpTextureBuffer_0x2C->onCapFlag(0x10);
} else {
mpTextureBuffer_0x2C->offCapFlag(0x10);
}
mpTextureBuffer_0x2C->capture(capW, capH, false, -1);
mpTextureBuffer_0x2C->setFilt(GX_NEAR, GX_NEAR);
}
StateGX::invalidateTexAllGX();
} break;
case 2: {
if (mpTextureBuffer_0x28) {
if (mAlpha != 0) {
mpTextureBuffer_0x28->load(GX_TEXMAP0);
nw4r::math::MTX34 forDL;
PostEffectBase::setProjection(GetScreen());
PSMTXScale(forDL, GetScreen().GetWidth(), GetScreen().GetHeight(), 1.0f);
GXColor tevColor = {0xFF, 0xFF, 0xFF, mAlpha};
StateGX::ScopedColor _color(true);
StateGX::ScopedAlpha _alpha(false);
StateGX::ScopedDither _dither(true);
if (mpTextureBuffer_0x2C) {
mpTextureBuffer_0x2C->load(GX_TEXMAP1);
DrawGX::SetMat_ColorChannel(DrawGX::COLORCHAN_1);
DrawGX::SetMat_TexGen(DrawGX::TEXGEN_1);
DrawGX::SetMat_Ind();
GXSetTevKColor(GX_KCOLOR0, (GXColor){0});
GXSetTevSwapModeTable(GX_TEV_SWAP0, GX_CH_RED, GX_CH_GREEN, GX_CH_BLUE, GX_CH_ALPHA);
GXSetNumTevStages(2);
GXSetTevDirect(GX_TEVSTAGE0);
GXSetTevDirect(GX_TEVSTAGE1);
GXSetTevSwapMode(GX_TEVSTAGE0, GX_TEV_SWAP0, GX_TEV_SWAP0);
GXSetTevSwapMode(GX_TEVSTAGE1, GX_TEV_SWAP0, GX_TEV_SWAP0);
if (field_0x1C == 0) {
GXSetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A);
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_TEXC, GX_CC_RASC, GX_CC_ZERO);
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_TEXA, GX_CA_KONST, GX_CA_RASA, GX_CA_ZERO);
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_COMP_A8_GT, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
} else {
GXSetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A);
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_TEXC);
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_RASA);
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
}
GXSetTevSwapMode(GX_TEVSTAGE1, GX_TEV_SWAP0, GX_TEV_SWAP0);
GXSetTevOrder(GX_TEVSTAGE1, GX_TEXCOORD0, GX_TEXMAP1, GX_COLOR_NULL);
GXSetTevColorIn(GX_TEVSTAGE1, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO, GX_CC_CPREV);
GXSetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
GXSetTevAlphaIn(GX_TEVSTAGE1, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO, GX_CA_APREV);
GXSetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
GXSetZTexture(GZ_ZT_REPLACE, GX_TF_Z24X8, 0);
GXSetZMode(true, field_0x1C == 0 ? GX_LEQUAL : GX_LESS, field_0x18 & 0x4 ? true : false);
GXSetZCompLoc(0);
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND, GX_ALWAYS, 0);
DrawGX::SetBlendMode(DrawGX::BLEND_0);
DrawGX::SetVtxState(DrawGX::VTX_TYPE_11);
} else {
DrawGX::BeginDrawScreen(true, true, false);
GXSetTevKAlphaSel(GX_TEVSTAGE0, GX_TEV_KASEL_K0_A);
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_TEXA, GX_CA_ZERO, GX_CA_RASA, GX_CA_ZERO);
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_COMP_A8_GT, GX_TB_ZERO, GX_CS_SCALE_1, 1, GX_TEVPREV);
}
DrawGX::DrawDL16(forDL, tevColor);
GXSetZTexture(GX_ZT_DISABLE, GX_TF_Z24X8, 0);
}
freeTextureBuffers();
}
} break;
}
}
void DrawPathLightMap::freeTextureBuffers() {
if (mpTextureBuffer_0x2C) {
mpTextureBuffer_0x2C->free();
mpTextureBuffer_0x2C = nullptr;
}
if (mpTextureBuffer_0x28) {
mpTextureBuffer_0x28->free();
mpTextureBuffer_0x28 = nullptr;
}
}
} // namespace EGG
-3
View File
@@ -1,3 +0,0 @@
#include "egg/gfx/eggDrawPathUnk2.h"
namespace EGG {} // namespace EGG