1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

Document SkelCurve system (#1192)

* Rename and document SkelCurve

* AVOID_UB in DemoTreLgt_OverrideLimbDraw

* Rename code_8006C510

* Objdump flags in the makefile

* Move CC_CHECK above compilation

* Review 1

* Review 2

* Review 3

* Review
Add doxygen comments to file head
use angle macro,
improve bug comment,
make arguments of SkelCurve_Draw more consistent,
Change this temp to pad in MagicWind
This commit is contained in:
EllipticEllipsis 2022-05-20 07:27:54 +01:00 committed by GitHub
parent 0584b3d288
commit 0e51a51fb1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 342 additions and 213 deletions

View file

@ -45,7 +45,7 @@ void MagicWind_Init(Actor* thisx, GlobalContext* globalCtx) {
MagicWind* this = (MagicWind*)thisx;
Player* player = GET_PLAYER(globalCtx);
if (SkelCurve_Init(globalCtx, &this->skelCurve, &sSkel, &sAnim) == 0) {
if (!SkelCurve_Init(globalCtx, &this->skelCurve, &sSkel, &sAnim)) {
// "Magic_Wind_Actor_ct (): Construct failed"
osSyncPrintf("Magic_Wind_Actor_ct():コンストラクト失敗\n");
}
@ -140,8 +140,8 @@ void MagicWind_Update(Actor* thisx, GlobalContext* globalCtx) {
this->actionFunc(this, globalCtx);
}
s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelAnimeCurve* skelCurve, s32 limbIndex, void* thisx) {
MagicWind* this = (MagicWind*)thisx;
s32 MagicWind_OverrideLimbDraw(GlobalContext* globalCtx, SkelCurve* skelCurve, s32 limbIndex, void* thisx) {
s32 pad;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_magic_wind.c", 615);
@ -173,7 +173,7 @@ void MagicWind_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (this->actionFunc != MagicWind_WaitForTimer) {
POLY_XLU_DISP = Gfx_CallSetupDL(POLY_XLU_DISP, 25);
SkelCurve_Draw(thisx, globalCtx, &this->skelCurve, MagicWind_OverrideLimbDraw, NULL, 1, NULL);
SkelCurve_Draw(&this->actor, globalCtx, &this->skelCurve, MagicWind_OverrideLimbDraw, NULL, 1, NULL);
}
CLOSE_DISPS(gfxCtx, "../z_magic_wind.c", 673);

View file

@ -10,7 +10,7 @@ typedef void (*MagicWindFunc)(struct MagicWind* this, GlobalContext* globalCtx);
typedef struct MagicWind {
/* 0x0000 */ Actor actor;
/* 0x014C */ SkelAnimeCurve skelCurve;
/* 0x014C */ SkelCurve skelCurve;
/* 0x016C */ s16 timer;
/* 0x0170 */ MagicWindFunc actionFunc;
} MagicWind; // size = 0x0174