Skip to content

Commit

Permalink
zUI close to equivalent (#285)
Browse files Browse the repository at this point in the history
* Decomp zUI_Render

* zUI data and zUI_Render better

* Decomp remaining zUI data

* Fix zUI_PreUpdate/zUI_ScenePortalUpdate

* More closely matching zUI code

* Match zUI_PreUpdate with ternary trick
  • Loading branch information
SquareMan authored Jul 2, 2024
1 parent b64e2c5 commit 9131fee
Show file tree
Hide file tree
Showing 4 changed files with 549 additions and 476 deletions.
7 changes: 6 additions & 1 deletion src/SB/Core/x/xModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,11 @@ struct xModelInstance
} anim_coll;
};

// NOTE (Square): Theses are based on the access pattern found in zUI_Render.
// I doubt they wrote this out by hand every time, but I'm just guessing on the macro here.
#define XMODELINSTANCE_GET_SRCBLEND(inst) (((inst)->PipeFlags >> 0x8) & 0xf)
#define XMODELINSTANCE_GET_DSTBLEND(inst) (((inst)->PipeFlags >> 0xc) & 0xf)

struct xModelTag
{
xVec3 v;
Expand Down Expand Up @@ -143,4 +148,4 @@ void xModel_SceneExit(RpWorld* world);
xSphere* xModelGetLocalSBound(xModelInstance* model);
void xModelGetBoneMat(xMat4x3& mat, const xModelInstance& model, ulong32 index);

#endif
#endif
1 change: 1 addition & 0 deletions src/SB/Core/x/xScrFx.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ void xScrFxRender(RwCamera*);
void xScrFxDrawScreenSizeRectangle();
void xScrFxFade(iColor_tag* base, iColor_tag* dest, float32 seconds, void (*callback)(),
int32 hold);
int32 xScrFxIsLetterbox();
void xScrFxLetterboxReset();
int32 xScrFXGlareAdd(xVec3* pos, float32 life, float32 intensity, float32 size, float32 r,
float32 g, float32 b, float32 a, RwRaster* raster);
Expand Down
Loading

0 comments on commit 9131fee

Please sign in to comment.