1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-06 14:20:11 +00:00

Decompile Gameplay_Keep and fix all existing decompiled objects (#595)

* First batch of files

* Add missing folders back

* Fix missing folders again

* Finish fixing existing texture files

* Gameplay_Keep XML finished

* Most actor gameplay_keep undefined syms removed

* Only ~200 gkeep symbols remain

* All gkeep symbols that ZAP supports are fixed

* Cleanup, and make gkeep names more accurate

* Starting to figure out what some unknown blobs are, merge zeldaret in

* fix a few more things

* refactor gkeep

* Change how gitkeep is handled

* gkeep xml cleanup

* Gkeep finished, now just waiting up ZAP updates

* 100 link animations finished

* 150 link animations finished

* 200 link animations finished

* 250 link animations finished

* 350 link animations finished

* 400 link animations finished

* 450 link animations finished

* 500 link animations finished

* 550 link animations finished

* All Link animations finished

cannot build yet because ZAP doesn't have LinkAnimationHeader yet

* xml changes for new zap stuff

* finish gameplay_keep

* fixing existing objects

* ready for pr besides zap padding issue

* mostly ready for pr

* format all c files

* all conflicts fixed

* make changes that roman requested

* fix thing i didn't mean to change

* some animation symbols renamed

* fixed roman's stuff

* lifemeter hardcoded pointers removed

* fix issue with incorrect data in gameplay_keep

* removed unused asm

* fixed most of fig's comments

* fix all of fig's comments

* reformat files

* Update assets/xml/textures/icon_item_static.xml

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* Update assets/xml/textures/icon_item_static.xml

Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>

* fixed stuff

* fixed most of roman's comments

* remove leading zeroes

* should build now

* git subrepo pull --force tools/ZAPD

subrepo:
  subdir:   "tools/ZAPD"
  merged:   "f84d8337b"
upstream:
  origin:   "https://github.com/zeldaret/ZAPD.git"
  branch:   "master"
  commit:   "f84d8337b"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo.git"
  commit:   "2f68596"

* all of gkeep symbols fixed

* compiler error fixed

* format files

* final changes

Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain>
Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
Zelllll 2021-01-24 18:36:40 -06:00 committed by GitHub
parent 84195fcef6
commit 20c1f4e648
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
198 changed files with 4775 additions and 4232 deletions

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_blast.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -28,8 +29,6 @@ EffectSsInit Effect_Ss_Blast_InitVars = {
EffectSsBlast_Init,
};
extern Gfx D_0401A0B0[];
u32 EffectSsBlast_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsBlastParams* initParams = (EffectSsBlastParams*)initParamsx;
@ -37,7 +36,7 @@ u32 EffectSsBlast_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
this->pos.y += 5.0f;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
this->gfx = SEGMENTED_TO_VIRTUAL(D_0401A0B0);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffShockwaveDL);
this->life = initParams->life;
this->draw = EffectSsBlast_Draw;
this->update = EffectSsBlast_Update;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_bomb.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rTexIdx regs[1]
@ -18,15 +19,13 @@ EffectSsInit Effect_Ss_Bomb_InitVars = {
EffectSsBomb_Init,
};
extern Gfx D_0400BF80[];
u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsBombInitParams* initParams = (EffectSsBombInitParams*)initParamsx;
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
this->gfx = SEGMENTED_TO_VIRTUAL(D_0400BF80);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffBombExplosion1DL);
this->life = 20;
this->draw = EffectSsBomb_Draw;
this->update = EffectSsBomb_Update;
@ -36,11 +35,11 @@ u32 EffectSsBomb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1;
}
static void* sTextures[] = {
0x04007F80,
0x04008780,
0x04008F80,
0x04009780,
static UNK_PTR sTextures[] = {
gEffBombExplosion1Tex,
gEffBombExplosion2Tex,
gEffBombExplosion3Tex,
gEffBombExplosion4Tex,
};
void EffectSsBomb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_bomb2.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rTexIdx regs[1]
@ -33,10 +34,6 @@ static EffectSsDrawFunc sDrawFuncs[] = {
EffectSsBomb2_DrawLayered,
};
extern Gfx D_0400BF80[];
extern Gfx D_0400BFE8[];
extern Gfx D_0400C040[];
u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsBomb2InitParams* initParams = (EffectSsBomb2InitParams*)initParamsx;
@ -44,7 +41,7 @@ u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
this->gfx = SEGMENTED_TO_VIRTUAL(D_0400BF80);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffBombExplosion1DL);
this->life = 24;
this->update = EffectSsBomb2_Update;
this->draw = sDrawFuncs[initParams->drawMode];
@ -63,8 +60,9 @@ u32 EffectSsBomb2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
// unused in the original game. looks like EffectSsBomb but with color
void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static void* textures[] = {
0x04007F80, 0x04008780, 0x04008F80, 0x04009780, 0x04009F80, 0x0400A780, 0x0400AF80, 0x0400B780,
static UNK_PTR textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
};
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans;
@ -102,8 +100,9 @@ void EffectSsBomb2_DrawFade(GlobalContext* globalCtx, u32 index, EffectSs* this)
}
void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* this) {
static void* textures[] = {
0x04007F80, 0x04008780, 0x04008F80, 0x04009780, 0x04009F80, 0x0400A780, 0x0400AF80, 0x0400B780,
static UNK_PTR textures[] = {
gEffBombExplosion1Tex, gEffBombExplosion2Tex, gEffBombExplosion3Tex, gEffBombExplosion4Tex,
gEffBombExplosion5Tex, gEffBombExplosion6Tex, gEffBombExplosion7Tex, gEffBombExplosion8Tex,
};
GraphicsContext* gfxCtx = globalCtx->state.gfxCtx;
MtxF mfTrans;
@ -141,8 +140,8 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th
this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, 0);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(textures[this->rTexIdx]));
gSPDisplayList(POLY_XLU_DISP++, D_0400BFE8);
gSPDisplayList(POLY_XLU_DISP++, D_0400C040);
gSPDisplayList(POLY_XLU_DISP++, gEffBombExplosion2DL);
gSPDisplayList(POLY_XLU_DISP++, gEffBombExplosion3DL);
Matrix_MtxToMtxF(mtx2, &mtx2F);
Matrix_Put(&mtx2F);
@ -153,7 +152,7 @@ void EffectSsBomb2_DrawLayered(GlobalContext* globalCtx, u32 index, EffectSs* th
Matrix_Scale(layer2Scale, layer2Scale, layer2Scale, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_ss_bomb2.c", 448),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0400C040);
gSPDisplayList(POLY_XLU_DISP++, gEffBombExplosion3DL);
layer2Scale -= 0.15f;
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_bubble.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
@ -17,17 +18,13 @@ EffectSsInit Effect_Ss_Bubble_InitVars = {
EffectSsBubble_Init,
};
extern void* D_04055DB0;
extern void* D_04055EB0;
extern Gfx D_0401A160[];
u32 EffectSsBubble_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsBubbleInitParams* initParams = (EffectSsBubbleInitParams*)initParamsx;
// @bug Rand_ZeroOne in the macro means a random number is generated for both parts of the macro.
// In the base game this works out because both addresses are segment 4, but it may break if
// the addresses were changed to refer to different segments
this->gfx = SEGMENTED_TO_VIRTUAL(Rand_ZeroOne() < 0.5f ? &D_04055DB0 : &D_04055EB0);
this->gfx = SEGMENTED_TO_VIRTUAL(Rand_ZeroOne() < 0.5f ? &gEffBubble1Tex : &gEffBubble2Tex);
this->pos.x = ((Rand_ZeroOne() - 0.5f) * initParams->xzPosRandScale) + initParams->pos.x;
this->pos.y = (((Rand_ZeroOne() - 0.5f) * initParams->yPosRandScale) + initParams->yPosOffset) + initParams->pos.y;
this->pos.z = ((Rand_ZeroOne() - 0.5f) * initParams->xzPosRandScale) + initParams->pos.z;
@ -54,7 +51,7 @@ void EffectSsBubble_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, 255, 255, 255, 255);
gDPSetEnvColor(POLY_OPA_DISP++, 150, 150, 150, 0);
gSPSegment(POLY_OPA_DISP++, 0x08, this->gfx);
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160));
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(gEffBubbleDL));
CLOSE_DISPS(gfxCtx, "../z_eff_ss_bubble.c", 179);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_dead_db.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rTextIdx regs[1]
@ -28,15 +29,13 @@ EffectSsInit Effect_Ss_Dead_Db_InitVars = {
EffectSsDeadDb_Init,
};
extern Gfx D_04031FE0[];
u32 EffectSsDeadDb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsDeadDbInitParams* initParams = (EffectSsDeadDbInitParams*)initParamsx;
this->pos = initParams->pos;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
this->gfx = SEGMENTED_TO_VIRTUAL(D_04031FE0);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffEnemyDeathFlameDL);
this->life = initParams->unk_34;
this->flags = 4;
this->rScaleStep = initParams->scaleStep;
@ -57,9 +56,10 @@ u32 EffectSsDeadDb_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
return 1;
}
static void* sTextures[] = {
0x0402CFE0, 0x0402D7E0, 0x0402DFE0, 0x0402E7E0, 0x0402EFE0,
0x0402F7E0, 0x0402FFE0, 0x040307E0, 0x04030FE0, 0x040317E0,
static UNK_PTR sTextures[] = {
gEffEnemyDeathFlame1Tex, gEffEnemyDeathFlame2Tex, gEffEnemyDeathFlame3Tex, gEffEnemyDeathFlame4Tex,
gEffEnemyDeathFlame5Tex, gEffEnemyDeathFlame6Tex, gEffEnemyDeathFlame7Tex, gEffEnemyDeathFlame8Tex,
gEffEnemyDeathFlame9Tex, gEffEnemyDeathFlame10Tex,
};
void EffectSsDeadDb_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_dead_dd.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rPrimColorR regs[2]
@ -115,7 +116,7 @@ void EffectSsDeadDd_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gSPMatrix(POLY_XLU_DISP++, &D_01000000, G_MTX_NOPUSH | G_MTX_MUL | G_MTX_MODELVIEW);
gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0,
PRIMITIVE, 0);
gSPDisplayList(POLY_XLU_DISP++, D_04037730);
gSPDisplayList(POLY_XLU_DISP++, gEffBurnMark1DL);
}
CLOSE_DISPS(gfxCtx, "../z_eff_ss_dead_dd.c", 259);

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_dead_ds.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rTimer regs[1]
@ -25,8 +26,6 @@ EffectSsInit Effect_Ss_Dead_Ds_InitVars = {
EffectSsDeadDs_Init,
};
extern Gfx D_04037730[];
u32 EffectSsDeadDs_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsDeadDsInitParams* initParams = (EffectSsDeadDsInitParams*)initParamsx;
@ -104,7 +103,7 @@ void EffectSsDeadDs_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gDPSetCombineLERP(POLY_XLU_DISP++, 0, 0, 0, PRIMITIVE, TEXEL0, 0, PRIMITIVE, 0, 0, 0, 0, PRIMITIVE, TEXEL0, 0,
PRIMITIVE, 0);
gSPDisplayList(POLY_XLU_DISP++, D_04037730);
gSPDisplayList(POLY_XLU_DISP++, gEffBurnMark1DL);
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_eff_ss_dead_ds.c", 255);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_dt_bubble.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -30,17 +31,13 @@ EffectSsInit Effect_Ss_Dt_Bubble_InitVars = {
EffectSsDtBubble_Init,
};
extern void* D_04055DB0;
extern void* D_04055EB0;
extern Gfx D_0401A160[];
u32 EffectSsDtBubble_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsDtBubbleInitParams* initParams = (EffectSsDtBubbleInitParams*)initParamsx;
// @bug Rand_ZeroOne in the macro means a random number is generated for both parts of the macro.
// In the base game this works out because both addresses are segment 4, but it may break if
// the addresses were changed to refer to different segments
this->gfx = SEGMENTED_TO_VIRTUAL(Rand_ZeroOne() < 0.5f ? &D_04055DB0 : &D_04055EB0);
this->gfx = SEGMENTED_TO_VIRTUAL(Rand_ZeroOne() < 0.5f ? &gEffBubble1Tex : &gEffBubble2Tex);
this->pos = initParams->pos;
this->velocity = initParams->velocity;
this->accel = initParams->accel;
@ -92,7 +89,7 @@ void EffectSsDtBubble_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB,
(this->rEnvColorA * this->life) / this->rLifespan);
gSPSegment(POLY_XLU_DISP++, 0x08, this->gfx);
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160));
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffBubbleDL));
CLOSE_DISPS(gfxCtx, "../z_eff_ss_dt_bubble.c", 236);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_dust.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -35,8 +36,6 @@ static EffectSsUpdateFunc sUpdateFuncs[] = {
EffectSsBlast_UpdateFire,
};
extern Gfx D_04010050[];
u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
s32 randColorOffset;
EffectSsDustInitParams* initParams = (EffectSsDustInitParams*)initParamsx;
@ -44,7 +43,7 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
this->gfx = SEGMENTED_TO_VIRTUAL(D_04010050);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffDustDL);
this->life = initParams->life;
this->update = sUpdateFuncs[initParams->updateMode];
this->draw = EffectSsDust_Draw;
@ -78,7 +77,7 @@ u32 EffectSsDust_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
}
static UNK_PTR sTextures[] = {
0x04051DB0, 0x040521B0, 0x040525B0, 0x040529B0, 0x04052DB0, 0x040531B0, 0x040535B0, 0x040539B0,
gDust1Tex, gDust2Tex, gDust3Tex, gDust4Tex, gDust5Tex, gDust6Tex, gDust7Tex, gDust8Tex,
};
void EffectSsDust_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_en_fire.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScaleMax regs[0]
#define rScale regs[1]
@ -26,9 +27,6 @@ EffectSsInit Effect_Ss_En_Fire_InitVars = {
EffectSsEnFire_Init,
};
extern Gfx D_0404D5A0[];
extern Gfx D_0404D4E0[];
u32 EffectSsEnFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsEnFireInitParams* initParams = (EffectSsEnFireInitParams*)initParamsx;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
@ -97,9 +95,9 @@ void EffectSsEnFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
0x20, 0x80));
if (((this->rFlags & 0x7FFF) != 0) || (this->life < 18)) {
gSPDisplayList(POLY_XLU_DISP++, D_0404D5A0);
gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL);
} else {
gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0);
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
}
CLOSE_DISPS(gfxCtx, "../z_eff_en_fire.c", 213);

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_en_ice.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rLifespan regs[0]
#define rYaw regs[1]
@ -30,8 +31,6 @@ EffectSsInit Effect_Ss_En_Ice_InitVars = {
EffectSsEnIce_Init,
};
extern Gfx D_04033818[];
u32 EffectSsEnIce_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsEnIceInitParams* initParams = (EffectSsEnIceInitParams*)initParamsx;
@ -129,7 +128,7 @@ void EffectSsEnIce_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0x80, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB,
this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, (u32)alpha);
gSPDisplayList(POLY_XLU_DISP++, D_04033818);
gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment2DL);
CLOSE_DISPS(gfxCtx, "../z_eff_en_ice.c", 294);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_fcircle.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rUnused regs[3] // probably supposed to be an alpha
#define rRadius regs[8]
@ -21,8 +22,6 @@ EffectSsInit Effect_Ss_Fcircle_InitVars = {
EffectSsFcircle_Init,
};
extern Gfx D_040184B0[];
u32 EffectSsFcircle_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsFcircleInitParams* initParams = (EffectSsFcircleInitParams*)initParamsx;
@ -31,7 +30,7 @@ u32 EffectSsFcircle_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
this->vec.x = initParams->pos.x - initParams->actor->world.pos.x;
this->vec.y = initParams->pos.y - initParams->actor->world.pos.y;
this->vec.z = initParams->pos.z - initParams->actor->world.pos.z;
this->gfx = D_040184B0;
this->gfx = gEffFireCircleDL;
this->life = 20;
this->draw = EffectSsFcircle_Draw;
this->update = EffectSsFcircle_Update;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_fire_tail.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rScale regs[0]
#define rLifespan regs[1]
@ -29,9 +30,6 @@ EffectSsInit Effect_Ss_Fire_Tail_InitVars = {
EffectSsFireTail_Init,
};
extern Gfx D_0404D5A0[];
extern Gfx D_0404D4E0[];
u32 EffectSsFireTail_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsFireTailInitParams* initParams = (EffectSsFireTailInitParams*)initParamsx;
@ -129,9 +127,9 @@ void EffectSsFireTail_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
(globalCtx->state.frames * -0x14) & 0x1FF, 32, 128));
if (this->rType != 0) {
gSPDisplayList(POLY_XLU_DISP++, D_0404D5A0);
gSPDisplayList(POLY_XLU_DISP++, gEffFire2DL);
} else {
gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0);
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
}
CLOSE_DISPS(gfxCtx, "../z_eff_fire_tail.c", 273);

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_g_fire.h"
#include "objects/gameplay_keep/gameplay_keep.h"
u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
void EffectSsGFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
@ -15,8 +16,6 @@ EffectSsInit Effect_Ss_G_Fire_InitVars = {
EffectSsGFire_Init,
};
extern Gfx D_0401C220[];
u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsGFireInitParams* initParams = (EffectSsGFireInitParams*)initParamsx;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
@ -25,7 +24,7 @@ u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
this->pos = initParams->pos;
this->draw = EffectSsGFire_Draw;
this->update = EffectSsGFire_Update;
this->gfx = SEGMENTED_TO_VIRTUAL(D_0401C220);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffFireFootprintDL);
this->life = 8;
this->flags = 0;
this->rgScale = 200;
@ -44,8 +43,9 @@ u32 EffectSsGFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
}
void EffectSsGFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
void* textures[] = {
0x0401A220, 0x0401A620, 0x0401AA20, 0x0401AE20, 0x0401B220, 0x0401B620, 0x0401BA20, 0x0401BE20,
UNK_PTR textures[] = {
gEffFireFootprint1Tex, gEffFireFootprint2Tex, gEffFireFootprint3Tex, gEffFireFootprint4Tex,
gEffFireFootprint5Tex, gEffFireFootprint6Tex, gEffFireFootprint7Tex, gEffFireFootprint8Tex,
};
s16 texIdx = (this->rgTexIdx / 100) % 7;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_g_magma.h"
#include "objects/gameplay_keep/gameplay_keep.h"
u32 EffectSsGMagma_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx);
void EffectSsGMagma_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this);
@ -15,8 +16,6 @@ EffectSsInit Effect_Ss_G_Magma_InitVars = {
EffectSsGMagma_Init,
};
extern Gfx D_04024410[];
u32 EffectSsGMagma_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsGMagmaInitParams* initParams = (EffectSsGMagmaInitParams*)initParamsx;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
@ -25,7 +24,7 @@ u32 EffectSsGMagma_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
this->pos = initParams->pos;
this->draw = EffectSsGMagma_Draw;
this->update = EffectSsGMagma_Update;
this->gfx = SEGMENTED_TO_VIRTUAL(D_04024410);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffMagmaBubbleDL);
this->life = 16;
this->rgScale = (s16)(Rand_ZeroOne() * 100.0f) + 200;
this->rgTexIdx = 0;
@ -42,8 +41,10 @@ u32 EffectSsGMagma_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
return 1;
}
static void* sTextures[] = { 0x04023810, 0x04023990, 0x04023B10, 0x04023C90,
0x04023E10, 0x04023F90, 0x04024110, 0x04024290 };
static void* sTextures[] = {
gEffMagmaBubble1Tex, gEffMagmaBubble2Tex, gEffMagmaBubble3Tex, gEffMagmaBubble4Tex,
gEffMagmaBubble5Tex, gEffMagmaBubble6Tex, gEffMagmaBubble7Tex, gEffMagmaBubble8Tex,
};
void EffectSsGMagma_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
s16 texIdx = this->rgTexIdx / 100;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_g_ripple.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rWaterBoxNum regs[0]
#define rRadius regs[1]
@ -28,9 +29,6 @@ EffectSsInit Effect_Ss_G_Ripple_InitVars = {
EffectSsGRipple_Init,
};
extern Gfx D_040254B0[];
extern Gfx D_040244B0[];
u32 EffectSsGRipple_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
s32 pad;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
@ -40,7 +38,7 @@ u32 EffectSsGRipple_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
waterBox = NULL;
this->velocity = this->accel = zeroVec;
this->pos = initParams->pos;
this->gfx = SEGMENTED_TO_VIRTUAL(D_040254B0);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffWaterRippleDL);
this->life = initParams->life + 20;
this->flags = 0;
this->draw = EffectSsGRipple_Draw;
@ -105,7 +103,7 @@ void EffectSsGRipple_DrawRipple(GlobalContext* globalCtx, EffectSs* this, UNK_PT
void EffectSsGRipple_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
if (this->rLifespan == 0) {
EffectSsGRipple_DrawRipple(globalCtx, this, D_040244B0);
EffectSsGRipple_DrawRipple(globalCtx, this, gEffWaterRippleTex);
}
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_g_spk.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -28,15 +29,13 @@ EffectSsInit Effect_Ss_G_Spk_InitVars = {
EffectSsGSpk_Init,
};
extern Gfx D_04025550[];
u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsGSpkInitParams* initParams = (EffectSsGSpkInitParams*)initParamsx;
Math_Vec3f_Copy(&this->pos, &initParams->pos);
Math_Vec3f_Copy(&this->velocity, &initParams->velocity);
Math_Vec3f_Copy(&this->accel, &initParams->accel);
this->gfx = SEGMENTED_TO_VIRTUAL(D_04025550);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffSparkDL);
if (initParams->updateMode == 0) {
this->life = 10;
@ -66,11 +65,11 @@ u32 EffectSsGSpk_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void*
return 1;
}
static void* sTextures[] = {
0x04055FB0,
0x040561B0,
0x040563B0,
0x040565B0,
static UNK_PTR sTextures[] = {
gEffSpark1Tex,
gEffSpark2Tex,
gEffSpark3Tex,
gEffSpark4Tex,
};
void EffectSsGSpk_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_g_splash.h"
#include "objects/gameplay_keep/gameplay_keep.h"
//! @bug the reuse of regs[11] means that EffectSs_DrawGEffect will treat the type as an object bank index
// this ends up having no effect because the texture provided does not use segment 6
@ -19,8 +20,6 @@ EffectSsInit Effect_Ss_G_Splash_InitVars = {
EffectSsGSplash_Init,
};
extern Gfx D_04027DF0[];
u32 EffectSsGSplash_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsGSplashInitParams* initParams = (EffectSsGSplashInitParams*)initParamsx;
Vec3f zeroVec = { 0.0f, 0.0f, 0.0f };
@ -34,7 +33,7 @@ u32 EffectSsGSplash_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
initParams->scale = 600;
}
this->gfx = SEGMENTED_TO_VIRTUAL(D_04027DF0);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffWaterSplashDL);
this->life = 8;
this->rgScale = initParams->scale;
this->rgTexIdx = 0;
@ -90,8 +89,9 @@ u32 EffectSsGSplash_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
return 1;
}
static void* sTextures[] = {
0x040255F0, 0x04025AF0, 0x04025FF0, 0x040264F0, 0x040269F0, 0x04026EF0, 0x040273F0, 0x040278F0,
static UNK_PTR sTextures[] = {
gEffWaterSplash1Tex, gEffWaterSplash2Tex, gEffWaterSplash3Tex, gEffWaterSplash4Tex,
gEffWaterSplash5Tex, gEffWaterSplash6Tex, gEffWaterSplash7Tex, gEffWaterSplash8Tex,
};
void EffectSsGSplash_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_hahen.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPitch regs[0]
#define rYaw regs[1]
@ -24,9 +25,6 @@ EffectSsInit Effect_Ss_Hahen_InitVars = {
EffectSsHahen_Init,
};
extern Gfx D_0400C0D0[];
extern Gfx D_0400CD80[];
void EffectSsHahen_CheckForObject(EffectSs* this, GlobalContext* globalCtx) {
if (((this->rObjBankIdx = Object_GetIndex(&globalCtx->objectCtx, this->rObjId)) < 0) ||
!Object_IsLoaded(&globalCtx->objectCtx, this->rObjBankIdx)) {
@ -48,11 +46,11 @@ u32 EffectSsHahen_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void
this->rObjId = initParams->objId;
EffectSsHahen_CheckForObject(this, globalCtx);
} else {
this->gfx = SEGMENTED_TO_VIRTUAL(D_0400C0D0);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffFragments1DL);
this->rObjId = -1;
}
if ((this->rObjId == OBJECT_HAKA_OBJECTS) && (this->gfx == D_0400CD80)) {
if ((this->rObjId == OBJECT_HAKA_OBJECTS) && (this->gfx == gEffFragments2DL)) {
this->draw = EffectSsHahen_DrawGray;
} else {
this->draw = EffectSsHahen_Draw;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_hitmark.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rTexIdx regs[0]
#define rType regs[1]
@ -26,11 +27,13 @@ static Color_RGB8 sColors[] = {
{ 255, 255, 255 }, { 0, 255, 200 }, { 255, 255, 255 }, { 150, 0, 255 },
};
static void* sTextures[] = {
0x0401F370, 0x0401F4F0, 0x0401F670, 0x0401F7F0, 0x0401F970, 0x0401FAF0, 0x0401FC70, 0x0401FDF0,
0x0401FF70, 0x040200F0, 0x04020270, 0x040203F0, 0x04020570, 0x040206F0, 0x04020870, 0x040209F0,
0x04020B70, 0x04020CF0, 0x04020E70, 0x04020FF0, 0x04021170, 0x040212F0, 0x04021470, 0x040215F0,
0x0401F370, 0x0401F4F0, 0x0401F670, 0x0401F7F0, 0x0401F970, 0x0401FAF0, 0x0401FC70, 0x0401FDF0,
static UNK_PTR sTextures[] = {
gEffHitMark1Tex, gEffHitMark2Tex, gEffHitMark3Tex, gEffHitMark4Tex, gEffHitMark5Tex, gEffHitMark6Tex,
gEffHitMark7Tex, gEffHitMark8Tex, gEffHitMark9Tex, gEffHitMark10Tex, gEffHitMark11Tex, gEffHitMark12Tex,
gEffHitMark13Tex, gEffHitMark14Tex, gEffHitMark15Tex, gEffHitMark16Tex, gEffHitMark17Tex, gEffHitMark18Tex,
gEffHitMark19Tex, gEffHitMark20Tex, gEffHitMark21Tex, gEffHitMark22Tex, gEffHitMark23Tex, gEffHitMark24Tex,
gEffHitMark1Tex, gEffHitMark2Tex, gEffHitMark3Tex, gEffHitMark4Tex, gEffHitMark5Tex, gEffHitMark6Tex,
gEffHitMark7Tex, gEffHitMark8Tex,
};
EffectSsInit Effect_Ss_HitMark_InitVars = {
@ -42,7 +45,7 @@ u32 EffectSsHitMark_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
s32 colorIdx;
EffectSsHitMarkInitParams* initParams = (EffectSsHitMarkInitParams*)initParamsx;
this->pos = initParams->pos;
this->gfx = SEGMENTED_TO_VIRTUAL(D_04021770);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffHitMarkDL);
if (initParams->type == EFFECT_HITMARK_DUST) {
this->life = 16;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_ice_piece.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rLifespan regs[0]
#define rYaw regs[1]
@ -21,7 +22,7 @@ EffectSsInit Effect_Ss_Ice_Piece_InitVars = {
EffectSsIcePiece_Init,
};
extern Gfx D_04033720[];
extern Gfx gEffIceFragment1DL[];
u32 EffectSsIcePiece_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsIcePieceInitParams* initParams = (EffectSsIcePieceInitParams*)initParamsx;
@ -74,7 +75,7 @@ void EffectSsIcePiece_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this)
gSPSegment(POLY_XLU_DISP++, 0x08,
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, (1 * frames) % 256, 0x20, 0x10, 1, 0, (2 * frames) % 256,
0x40, 0x20));
gSPDisplayList(POLY_XLU_DISP++, D_04033720);
gSPDisplayList(POLY_XLU_DISP++, gEffIceFragment1DL);
CLOSE_DISPS(gfxCtx, "../z_eff_ice_piece.c", 209);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_k_fire.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rAlpha regs[0]
#define rScroll regs[2]
@ -22,8 +23,6 @@ EffectSsInit Effect_Ss_K_Fire_InitVars = {
EffectSsKFire_Init,
};
extern Gfx D_0404D4E0[];
u32 EffectSsKFire_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsKFireInitParams* initParams = (EffectSsKFireInitParams*)initParamsx;
@ -78,7 +77,7 @@ void EffectSsKFire_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_eff_k_fire.c", 215),
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, D_0404D4E0);
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
CLOSE_DISPS(gfxCtx, "../z_eff_k_fire.c", 220);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_kirakira.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rRotSpeed regs[0]
#define rYaw regs[1]
@ -31,8 +32,6 @@ EffectSsInit Effect_Ss_KiraKira_InitVars = {
EffectSsKiraKira_Init,
};
extern Gfx D_04037880[];
u32 EffectSsKiraKira_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsKiraKiraInitParams* initParams = (EffectSsKiraKiraInitParams*)initParamsx;
@ -42,12 +41,12 @@ u32 EffectSsKiraKira_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, v
if ((this->life = initParams->life) < 0) {
this->life = -this->life;
this->gfx = SEGMENTED_TO_VIRTUAL(D_04037880);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffFairySparklesDL);
this->update = func_809AAD6C;
this->rEnvColorA = initParams->scale;
this->rScale = 0;
} else {
this->gfx = SEGMENTED_TO_VIRTUAL(D_04037880);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffFairySparklesDL);
if (initParams->updateMode == 0) {
this->update = func_809AABF0;

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_lightning.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -28,13 +29,11 @@ EffectSsInit Effect_Ss_Lightning_InitVars = {
EffectSsLightning_Init,
};
extern Gfx D_0402CF30[];
u32 EffectSsLightning_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsLightningInitParams* initParams = (EffectSsLightningInitParams*)initParamsx;
this->pos = initParams->pos;
this->gfx = SEGMENTED_TO_VIRTUAL(D_0402CF30);
this->gfx = SEGMENTED_TO_VIRTUAL(gEffLightningDL);
this->life = initParams->life;
this->draw = EffectSsLightning_Draw;
this->update = EffectSsLightning_Update;
@ -67,8 +66,9 @@ void EffectSsLightning_NewLightning(GlobalContext* globalCtx, Vec3f* pos, s16 ya
EffectSs_Insert(globalCtx, &newLightning);
}
static void* sTextures[] = {
0x04029F30, 0x0402A530, 0x0402AB30, 0x0402B130, 0x0402B730, 0x0402BD30, 0x0402C330, 0x0402C930,
static UNK_PTR sTextures[] = {
gEffLightning1Tex, gEffLightning2Tex, gEffLightning3Tex, gEffLightning4Tex,
gEffLightning5Tex, gEffLightning6Tex, gEffLightning7Tex, gEffLightning8Tex,
};
void EffectSsLightning_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_sibuki.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -27,10 +28,6 @@ EffectSsInit Effect_Ss_Sibuki_InitVars = {
EffectSsSibuki_Init,
};
extern void* D_04055EB0;
extern void* D_04055DB0;
extern Gfx D_0401A160[];
u32 EffectSsSibuki_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsSibukiInitParams* initParams = (EffectSsSibukiInitParams*)initParamsx;
@ -39,9 +36,9 @@ u32 EffectSsSibuki_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, voi
this->accel = initParams->accel;
if (KREG(2) != 0) {
this->gfx = SEGMENTED_TO_VIRTUAL(&D_04055EB0);
this->gfx = SEGMENTED_TO_VIRTUAL(&gEffBubble2Tex);
} else {
this->gfx = SEGMENTED_TO_VIRTUAL(&D_04055DB0);
this->gfx = SEGMENTED_TO_VIRTUAL(&gEffBubble1Tex);
}
this->life = ((s16)((Rand_ZeroOne() * (500.0f + KREG(64))) * 0.01f)) + KREG(65) + 10;
@ -76,7 +73,7 @@ void EffectSsSibuki_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPSetPrimColor(POLY_OPA_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
gDPSetEnvColor(POLY_OPA_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
gSPSegment(POLY_OPA_DISP++, 0x08, this->gfx);
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(D_0401A160));
gSPDisplayList(POLY_OPA_DISP++, SEGMENTED_TO_VIRTUAL(gEffBubbleDL));
CLOSE_DISPS(gfxCtx, "../z_eff_ss_sibuki.c", 198);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_sibuki2.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rPrimColorR regs[0]
#define rPrimColorG regs[1]
@ -26,8 +27,6 @@ EffectSsInit Effect_Ss_Sibuki2_InitVars = {
EffectSsSibuki2_Init,
};
extern Gfx D_0401E2C0[];
u32 EffectSsSibuki2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsSibuki2InitParams* initParams = (EffectSsSibuki2InitParams*)initParamsx;
@ -51,8 +50,9 @@ u32 EffectSsSibuki2_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, vo
return 1;
}
static void* sTextures[] = {
0x0401C2C0, 0x0401C2C0, 0x0401C6C0, 0x0401CAC0, 0x0401CEC0, 0x0401D2C0, 0x0401D6C0, 0x0401DAC0, 0x0401DEC0,
static UNK_PTR sTextures[] = {
gEffUnusedBubbles1Tex, gEffUnusedBubbles1Tex, gEffUnusedBubbles2Tex, gEffUnusedBubbles3Tex, gEffUnusedBubbles4Tex,
gEffUnusedBubbles5Tex, gEffUnusedBubbles6Tex, gEffUnusedBubbles7Tex, gEffUnusedBubbles8Tex,
};
void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
@ -69,7 +69,7 @@ void EffectSsSibuki2_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, this->rPrimColorR, this->rPrimColorG, this->rPrimColorB, this->rPrimColorA);
gDPSetEnvColor(POLY_XLU_DISP++, this->rEnvColorR, this->rEnvColorG, this->rEnvColorB, this->rEnvColorA);
gSPSegment(POLY_XLU_DISP++, 0x08, SEGMENTED_TO_VIRTUAL(sTextures[this->rTexIdx]));
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(D_0401E2C0));
gSPDisplayList(POLY_XLU_DISP++, SEGMENTED_TO_VIRTUAL(gEffUnusedBubblesDL));
CLOSE_DISPS(gfxCtx, "../z_eff_ss_sibuki2.c", 198);
}

View file

@ -5,6 +5,7 @@
*/
#include "z_eff_ss_stone1.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#define rReg0 regs[0]
@ -24,18 +25,16 @@ typedef struct {
} EffStoneDrawInfo;
static EffStoneDrawInfo sDrawInfo[] = {
{ 0x04029A90, { 200, 0, 0, 255 }, { 0, 0, 0, 255 } },
{ 0x04029690, { 255, 100, 0, 255 }, { 100, 0, 0, 255 } },
{ 0x04029290, { 255, 200, 0, 255 }, { 200, 0, 0, 255 } },
{ 0x04028E90, { 255, 255, 0, 255 }, { 255, 0, 0, 255 } },
{ 0x04028A90, { 255, 255, 150, 255 }, { 255, 150, 0, 255 } },
{ 0x04028690, { 255, 255, 255, 255 }, { 255, 255, 0, 255 } },
{ 0x04028290, { 255, 255, 255, 255 }, { 0, 255, 0, 255 } },
{ 0x04027E90, { 255, 255, 255, 255 }, { 0, 255, 255, 255 } },
{ gUnknownEffStone8Tex, { 200, 0, 0, 255 }, { 0, 0, 0, 255 } },
{ gUnknownEffStone7Tex, { 255, 100, 0, 255 }, { 100, 0, 0, 255 } },
{ gUnknownEffStone6Tex, { 255, 200, 0, 255 }, { 200, 0, 0, 255 } },
{ gUnknownEffStone5Tex, { 255, 255, 0, 255 }, { 255, 0, 0, 255 } },
{ gUnknownEffStone4Tex, { 255, 255, 150, 255 }, { 255, 150, 0, 255 } },
{ gUnknownEffStone3Tex, { 255, 255, 255, 255 }, { 255, 255, 0, 255 } },
{ gUnknownEffStone2Tex, { 255, 255, 255, 255 }, { 0, 255, 0, 255 } },
{ gUnknownEffStone1Tex, { 255, 255, 255, 255 }, { 0, 255, 255, 255 } },
};
extern Gfx D_04029E90[];
u32 EffectSsStone1_Init(GlobalContext* globalCtx, u32 index, EffectSs* this, void* initParamsx) {
EffectSsStone1InitParams* initParams = (EffectSsStone1InitParams*)initParamsx;
Vec3f pos = initParams->pos;
@ -70,7 +69,7 @@ void EffectSsStone1_Draw(GlobalContext* globalCtx, u32 index, EffectSs* this) {
gDPSetPrimColor(POLY_XLU_DISP++, 0, 0, drawParams->primColor.r, drawParams->primColor.g, drawParams->primColor.b,
255);
gDPSetEnvColor(POLY_XLU_DISP++, drawParams->envColor.r, drawParams->envColor.g, drawParams->envColor.b, 255);
gSPDisplayList(POLY_XLU_DISP++, D_04029E90);
gSPDisplayList(POLY_XLU_DISP++, gUnknownEffStoneDL);
CLOSE_DISPS(gfxCtx, "../z_eff_ss_stone1.c", 183);
}