mirror of https://github.com/zeldaret/mm.git
Item cleanup: Item drops, rupees, signs (#1048)
* item cleanup * pr suggestions Co-authored-by: Anghelo Carvajal <angheloalf95@gmail.com>
This commit is contained in:
parent
6d6304d1a0
commit
00bf71460f
|
|
@ -1218,37 +1218,44 @@
|
|||
<Collision Name="gameplay_keep_Colheader_05A270" Offset="0x5A270" />
|
||||
<DList Name="gameplay_keep_DL_05A430" Offset="0x5A430" />
|
||||
<DList Name="gameplay_keep_DL_05A600" Offset="0x5A600" />
|
||||
<Texture Name="gameplay_keep_Tex_05A6B0" OutName="tex_05A6B0" Format="i8" Width="16" Height="16" Offset="0x5A6B0" />
|
||||
<DList Name="gameplay_keep_DL_05AAB0" Offset="0x5AAB0" />
|
||||
<DList Name="gameplay_keep_DL_05AED0" Offset="0x5AED0" />
|
||||
<DList Name="gameplay_keep_DL_05B430" Offset="0x5B430" />
|
||||
<Texture Name="gameplay_keep_Tex_05B6F0" OutName="tex_05B6F0" Format="rgba16" Width="32" Height="32" Offset="0x5B6F0" />
|
||||
<Texture Name="gameplay_keep_Tex_05BEF0" OutName="tex_05BEF0" Format="rgba16" Width="32" Height="32" Offset="0x5BEF0" />
|
||||
<Texture Name="gameplay_keep_Tex_05C6F0" OutName="tex_05C6F0" Format="rgba16" Width="32" Height="32" Offset="0x5C6F0" />
|
||||
<Texture Name="gameplay_keep_Tex_05CEF0" OutName="tex_05CEF0" Format="rgba16" Width="32" Height="32" Offset="0x5CEF0" />
|
||||
<Texture Name="gameplay_keep_Tex_05D6F0" OutName="tex_05D6F0" Format="rgba16" Width="32" Height="32" Offset="0x5D6F0" />
|
||||
<Texture Name="gameplay_keep_Tex_05DEF0" OutName="tex_05DEF0" Format="rgba16" Width="32" Height="32" Offset="0x5DEF0" />
|
||||
<Texture Name="gameplay_keep_Tex_05E6F0" OutName="tex_05E6F0" Format="rgba16" Width="32" Height="32" Offset="0x5E6F0" />
|
||||
<Texture Name="gameplay_keep_Tex_05EEF0" OutName="tex_05EEF0" Format="rgba16" Width="32" Height="32" Offset="0x5EEF0" />
|
||||
<DList Name="gameplay_keep_DL_05F6F0" Offset="0x5F6F0" />
|
||||
<Texture Name="gameplay_keep_Tex_05F7C0" OutName="tex_05F7C0" Format="rgba16" Width="32" Height="32" Offset="0x5F7C0" />
|
||||
<Texture Name="gameplay_keep_Tex_05FFC0" OutName="tex_05FFC0" Format="rgba16" Width="32" Height="32" Offset="0x5FFC0" />
|
||||
<Texture Name="gameplay_keep_Tex_0607C0" OutName="tex_0607C0" Format="rgba16" Width="32" Height="32" Offset="0x607C0" />
|
||||
<Texture Name="gameplay_keep_Tex_060FC0" OutName="tex_060FC0" Format="rgba16" Width="32" Height="32" Offset="0x60FC0" />
|
||||
<Texture Name="gameplay_keep_Tex_0617C0" OutName="tex_0617C0" Format="rgba16" Width="32" Height="32" Offset="0x617C0" />
|
||||
<Texture Name="gameplay_keep_Tex_061FC0" OutName="tex_061FC0" Format="rgba16" Width="4" Height="4" Offset="0x61FC0" />
|
||||
<Texture Name="gameplay_keep_Tex_061FE0" OutName="tex_061FE0" Format="rgba16" Width="4" Height="4" Offset="0x61FE0" />
|
||||
<Texture Name="gameplay_keep_Tex_062000" OutName="tex_062000" Format="rgba16" Width="4" Height="4" Offset="0x62000" />
|
||||
<Texture Name="gameplay_keep_Tex_062020" OutName="tex_062020" Format="rgba16" Width="4" Height="4" Offset="0x62020" />
|
||||
<Texture Name="gameplay_keep_Tex_062040" OutName="tex_062040" Format="rgba16" Width="4" Height="4" Offset="0x62040" />
|
||||
<Texture Name="gameplay_keep_Tex_062060" OutName="tex_062060" Format="rgba16" Width="4" Height="4" Offset="0x62060" />
|
||||
<DList Name="gameplay_keep_DL_0622C0" Offset="0x622C0" />
|
||||
<Texture Name="gameplay_keep_Tex_062390" OutName="tex_062390" Format="rgba16" Width="32" Height="32" Offset="0x62390" />
|
||||
<Texture Name="gameplay_keep_Tex_062B90" OutName="tex_062B90" Format="rgba16" Width="32" Height="32" Offset="0x62B90" />
|
||||
<Texture Name="gameplay_keep_Tex_063390" OutName="tex_063390" Format="rgba16" Width="32" Height="32" Offset="0x63390" />
|
||||
<Texture Name="gameplay_keep_Tex_063B90" OutName="tex_063B90" Format="rgba16" Width="4" Height="4" Offset="0x63B90" />
|
||||
<Texture Name="gameplay_keep_Tex_063BB0" OutName="tex_063BB0" Format="rgba16" Width="4" Height="4" Offset="0x63BB0" />
|
||||
<Texture Name="gameplay_keep_Tex_063BD0" OutName="tex_063BD0" Format="rgba16" Width="32" Height="32" Offset="0x63BD0" />
|
||||
|
||||
<Texture Name="gHeartShapeTex" OutName="heart_shape" Format="i8" Width="16" Height="16" Offset="0x5A6B0" />
|
||||
<DList Name="gHeartPieceInteriorDL" Offset="0x5AAB0" />
|
||||
<DList Name="gSignRectangularDL" Offset="0x5AED0" />
|
||||
<DList Name="gSignDirectionalDL" Offset="0x5B430" />
|
||||
|
||||
<!-- Item Drops -->
|
||||
<Texture Name="gDropArrows2Tex" OutName="drop_arrows_2" Format="rgba16" Width="32" Height="32" Offset="0x5B6F0" />
|
||||
<Texture Name="gDropArrows1Tex" OutName="drop_arrows_1" Format="rgba16" Width="32" Height="32" Offset="0x5BEF0" />
|
||||
<Texture Name="gDropArrows3Tex" OutName="drop_arrows_3" Format="rgba16" Width="32" Height="32" Offset="0x5C6F0" />
|
||||
<Texture Name="gDropBombTex" OutName="drop_bomb" Format="rgba16" Width="32" Height="32" Offset="0x5CEF0" />
|
||||
<Texture Name="gDropBombchuTex" OutName="drop_bombchu" Format="rgba16" Width="32" Height="32" Offset="0x5D6F0" />
|
||||
<Texture Name="gDropUnknownPouch" OutName="drop_unknown_pouch" Format="rgba16" Width="32" Height="32" Offset="0x5DEF0" />
|
||||
<Texture Name="gDropRecoveryHeartTex" OutName="drop_recovery_heart" Format="rgba16" Width="32" Height="32" Offset="0x5E6F0" />
|
||||
<Texture Name="gDropHeartPieceTex" OutName="drop_heart_piece" Format="rgba16" Width="32" Height="32" Offset="0x5EEF0" />
|
||||
<DList Name="gItemDropDL" Offset="0x5F6F0" />
|
||||
<Texture Name="gDropKeySmallTex" OutName="drop_key_small" Format="rgba16" Width="32" Height="32" Offset="0x5F7C0" />
|
||||
<Texture Name="gDropMagicSmallTex" OutName="drop_magic_small" Format="rgba16" Width="32" Height="32" Offset="0x5FFC0" />
|
||||
<Texture Name="gDropDekuNutTex" OutName="drop_deku_nut" Format="rgba16" Width="32" Height="32" Offset="0x607C0" />
|
||||
<Texture Name="gDropDekuStickTex" OutName="drop_deku_stick" Format="rgba16" Width="32" Height="32" Offset="0x60FC0" />
|
||||
<Texture Name="gDropMagicLargeTex" OutName="drop_magic_large" Format="rgba16" Width="32" Height="32" Offset="0x617C0" />
|
||||
|
||||
<!-- Rupees -->
|
||||
<Texture Name="gRupeeGreenTex" OutName="rupee_green" Format="rgba16" Width="4" Height="4" Offset="0x61FC0" />
|
||||
<Texture Name="gRupeeBlueTex" OutName="rupee_blue" Format="rgba16" Width="4" Height="4" Offset="0x61FE0" />
|
||||
<Texture Name="gRupeeRedTex" OutName="rupee_red" Format="rgba16" Width="4" Height="4" Offset="0x62000" />
|
||||
<Texture Name="gRupeePurpleTex" OutName="rupee_purple" Format="rgba16" Width="4" Height="4" Offset="0x62020" />
|
||||
<Texture Name="gRupeeOrangeTex" OutName="rupee_orange" Format="rgba16" Width="4" Height="4" Offset="0x62040" />
|
||||
<Texture Name="gRupeeSilverTex" OutName="rupee_silver" Format="rgba16" Width="4" Height="4" Offset="0x62060" />
|
||||
<DList Name="gRupeeDL" Offset="0x622C0" />
|
||||
|
||||
<Texture Name="gRecoveryHeartTex" OutName="recovery_heart" Format="rgba16" Width="32" Height="32" Offset="0x62390" />
|
||||
<Texture Name="gBombTex" OutName="bomb_tex" Format="rgba16" Width="32" Height="32" Offset="0x62B90" />
|
||||
<Texture Name="gArrowTex" OutName="arrow_tex" Format="rgba16" Width="32" Height="32" Offset="0x63390" />
|
||||
<Texture Name="gRupeeLightRedTex" OutName="rupee_light_red" Format="rgba16" Width="4" Height="4" Offset="0x63B90" />
|
||||
<Texture Name="gRupeeLightBlueTex" OutName="rupee_light_blue" Format="rgba16" Width="4" Height="4" Offset="0x63BB0" />
|
||||
<Texture Name="gHeartContainerTex" OutName="heart_container" Format="rgba16" Width="32" Height="32" Offset="0x63BD0" />
|
||||
|
||||
<Texture Name="gameplay_keep_Tex_0643D0" OutName="tex_0643D0" Format="rgba16" Width="32" Height="32" Offset="0x643D0" />
|
||||
<Texture Name="gameplay_keep_Tex_064BD0" OutName="tex_064BD0" Format="rgba16" Width="32" Height="32" Offset="0x64BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_0653D0" OutName="tex_0653D0" Format="rgba16" Width="32" Height="32" Offset="0x653D0" />
|
||||
|
|
@ -1257,10 +1264,12 @@
|
|||
<Texture Name="gameplay_keep_Tex_066BD0" OutName="tex_066BD0" Format="rgba16" Width="64" Height="32" Offset="0x66BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_067BD0" OutName="tex_067BD0" Format="rgba16" Width="32" Height="32" Offset="0x67BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_0683D0" OutName="tex_0683D0" Format="rgba16" Width="32" Height="32" Offset="0x683D0" />
|
||||
<Texture Name="gameplay_keep_Tex_068BD0" OutName="tex_068BD0" Format="rgba16" Width="32" Height="16" Offset="0x68BD0" />
|
||||
<Texture Name="gameplay_keep_Tex_068FD0" OutName="tex_068FD0" Format="rgba16" Width="32" Height="16" Offset="0x68FD0" />
|
||||
<Texture Name="gameplay_keep_Tex_0693D0" OutName="tex_0693D0" Format="rgba16" Width="64" Height="8" Offset="0x693D0" />
|
||||
<Texture Name="gameplay_keep_Tex_0697D0" OutName="tex_0697D0" Format="rgba16" Width="64" Height="32" Offset="0x697D0" />
|
||||
|
||||
<Texture Name="gSignRectangularSideTex" OutName="sign_rectangular_side" Format="rgba16" Width="32" Height="16" Offset="0x68BD0" />
|
||||
<Texture Name="gSignRectangularFrontTex" OutName="sign_rectangular_front" Format="rgba16" Width="32" Height="16" Offset="0x68FD0" />
|
||||
<Texture Name="gSignPostWoodTex" OutName="sign_post_wood" Format="rgba16" Width="64" Height="8" Offset="0x693D0" />
|
||||
<Texture Name="gSignLetteringTex" OutName="sign_lettering" Format="rgba16" Width="64" Height="32" Offset="0x697D0" />
|
||||
|
||||
<DList Name="gameplay_keep_DL_06A800" Offset="0x6A800" />
|
||||
<Texture Name="gameplay_keep_Tex_06A880" OutName="tex_06A880" Format="i8" Width="16" Height="16" Offset="0x6A880" />
|
||||
<DList Name="gameplay_keep_DL_06AB30" Offset="0x6AB30" />
|
||||
|
|
|
|||
|
|
@ -362,8 +362,6 @@ extern ActorInit En_A_Obj_InitVars;
|
|||
extern ColliderCylinderInit enAObjCylinderInit;
|
||||
extern InitChainEntry enAObjInitVar;
|
||||
extern Gfx* enAObjDisplayLists[2];
|
||||
extern UNK_PTR D_801ADF30[5];
|
||||
extern UNK_PTR D_801ADF44[12];
|
||||
extern u8 sDropTable[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern u8 sDropTableAmounts[DROP_TABLE_SIZE * DROP_TABLE_NUMBER];
|
||||
extern s32 D_801AE194[32];
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ void func_800A6650(EnItem00* this, PlayState* play);
|
|||
void func_800A6780(EnItem00* this, PlayState* play);
|
||||
void func_800A6A40(EnItem00* this, PlayState* play);
|
||||
|
||||
void EnItem00_DrawRupee(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawSprite(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play);
|
||||
|
||||
const ActorInit En_Item00_InitVars = {
|
||||
ACTOR_EN_ITEM00,
|
||||
ACTORCAT_MISC,
|
||||
|
|
@ -102,12 +107,14 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk154 = 0.015f;
|
||||
shadowOffset = 750.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_SMALL_KEY:
|
||||
this->unk150 = 0;
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->unk154 = 0.03f;
|
||||
shadowOffset = 350.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_HEART_PIECE:
|
||||
case ITEM00_HEART_CONTAINER:
|
||||
this->unk150 = 0;
|
||||
|
|
@ -118,12 +125,14 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
sp30 = -1;
|
||||
}
|
||||
break;
|
||||
|
||||
case ITEM00_RECOVERY_HEART:
|
||||
this->actor.home.rot.z = randPlusMinusPoint5Scaled(65535.0f);
|
||||
this->actor.home.rot.z = randPlusMinusPoint5Scaled(0xFFFF);
|
||||
shadowOffset = 430.0f;
|
||||
Actor_SetScale(&this->actor, 0.02f);
|
||||
this->unk154 = 0.02f;
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_10:
|
||||
case ITEM00_ARROWS_30:
|
||||
case ITEM00_ARROWS_40:
|
||||
|
|
@ -132,6 +141,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk154 = 0.035f;
|
||||
shadowOffset = 250.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_BOMBS_A:
|
||||
case ITEM00_BOMBS_B:
|
||||
case ITEM00_NUTS_1:
|
||||
|
|
@ -143,39 +153,47 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk154 = 0.03f;
|
||||
shadowOffset = 320.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
Actor_SetScale(&this->actor, 0.044999998f);
|
||||
this->unk154 = 0.044999998f;
|
||||
Actor_SetScale(&this->actor, 4.5f * 0.01f);
|
||||
this->unk154 = 4.5f * 0.01f;
|
||||
shadowOffset = 320.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_HUGE:
|
||||
Actor_SetScale(&this->actor, 0.044999998f);
|
||||
this->unk154 = 0.044999998f;
|
||||
Actor_SetScale(&this->actor, 4.5f * 0.01f);
|
||||
this->unk154 = 4.5f * 0.01f;
|
||||
shadowOffset = 750.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
Actor_SetScale(&this->actor, 0.03f);
|
||||
this->unk154 = 0.03f;
|
||||
shadowOffset = 750.0f;
|
||||
break;
|
||||
|
||||
case ITEM00_FLEXIBLE:
|
||||
case ITEM00_BIG_FAIRY:
|
||||
shadowOffset = 500.0f;
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->unk154 = 0.01f;
|
||||
break;
|
||||
|
||||
case ITEM00_SHIELD_HERO:
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_SHIELD_2);
|
||||
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
|
||||
break;
|
||||
|
||||
case ITEM00_MAP:
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_MAP);
|
||||
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
|
||||
break;
|
||||
|
||||
case ITEM00_COMPASS:
|
||||
this->actor.objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_COMPASS);
|
||||
EnItem00_SetObject(this, play, &shadowOffset, &shadowScale);
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -191,6 +209,7 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
this->unk152 = -1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (sp30 == 0) {
|
||||
this->actionFunc = func_800A640C;
|
||||
this->unk152 = -1;
|
||||
|
|
@ -208,61 +227,78 @@ void EnItem00_Init(Actor* thisx, PlayState* play) {
|
|||
case ITEM00_RUPEE_GREEN:
|
||||
Item_Give(play, ITEM_RUPEE_GREEN);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
Item_Give(play, ITEM_RUPEE_BLUE);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_RED:
|
||||
Item_Give(play, ITEM_RUPEE_RED);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
Item_Give(play, ITEM_RUPEE_PURPLE);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_HUGE:
|
||||
Item_Give(play, ITEM_RUPEE_HUGE);
|
||||
break;
|
||||
|
||||
case ITEM00_RECOVERY_HEART:
|
||||
Item_Give(play, ITEM_RECOVERY_HEART);
|
||||
break;
|
||||
|
||||
case ITEM00_FLEXIBLE:
|
||||
case ITEM00_BIG_FAIRY:
|
||||
Health_ChangeBy(play, 0x70);
|
||||
break;
|
||||
|
||||
case ITEM00_BOMBS_A:
|
||||
case ITEM00_BOMBS_B:
|
||||
Item_Give(play, ITEM_BOMBS_5);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_10:
|
||||
Item_Give(play, ITEM_ARROWS_10);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_30:
|
||||
Item_Give(play, ITEM_ARROWS_30);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_40:
|
||||
Item_Give(play, ITEM_ARROWS_40);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_50:
|
||||
Item_Give(play, ITEM_ARROWS_50);
|
||||
break;
|
||||
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
Item_Give(play, ITEM_MAGIC_LARGE);
|
||||
break;
|
||||
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
Item_Give(play, ITEM_MAGIC_SMALL);
|
||||
break;
|
||||
|
||||
case ITEM00_SMALL_KEY:
|
||||
Item_Give(play, ITEM_KEY_SMALL);
|
||||
break;
|
||||
|
||||
case ITEM00_NUTS_1:
|
||||
getItemId = GI_NUTS_1;
|
||||
break;
|
||||
|
||||
case ITEM00_NUTS_10:
|
||||
getItemId = GI_NUTS_10;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
if ((getItemId != GI_NONE) && (Actor_HasParent(&this->actor, play) == 0)) {
|
||||
if ((getItemId != GI_NONE) && !Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, getItemId, 50.0f, 20.0f);
|
||||
}
|
||||
|
||||
|
|
@ -277,11 +313,10 @@ void EnItem00_Destroy(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
|
||||
void EnItem00_WaitForHeartObject(EnItem00* this, PlayState* play) {
|
||||
s32 sp1C;
|
||||
s32 objBankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_HEARTS);
|
||||
|
||||
sp1C = Object_GetIndex(&play->objectCtx, OBJECT_GI_HEARTS);
|
||||
if (Object_IsLoaded(&play->objectCtx, sp1C)) {
|
||||
this->actor.objBankIndex = sp1C;
|
||||
if (Object_IsLoaded(&play->objectCtx, objBankIndex)) {
|
||||
this->actor.objBankIndex = objBankIndex;
|
||||
this->actionFunc = func_800A640C;
|
||||
}
|
||||
}
|
||||
|
|
@ -327,15 +362,15 @@ void func_800A640C(EnItem00* this, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
if ((this->actor.gravity != 0.0f) && ((this->actor.bgCheckFlags & 1) == 0)) {
|
||||
if ((this->actor.gravity != 0.0f) && !(this->actor.bgCheckFlags & 1)) {
|
||||
this->actionFunc = func_800A6650;
|
||||
}
|
||||
}
|
||||
|
||||
static Color_RGBA8 D_801ADF10 = { 255, 255, 127, 0 };
|
||||
static Color_RGBA8 D_801ADF14 = { 255, 255, 255, 0 };
|
||||
static Vec3f D_801ADF18 = { 0.0f, 0.1f, 0.0f };
|
||||
static Vec3f D_801ADF24 = { 0.0f, 0.01f, 0.0f };
|
||||
static Color_RGBA8 sEffectPrimColor = { 255, 255, 127, 0 };
|
||||
static Color_RGBA8 sEffectEnvColor = { 255, 255, 255, 0 };
|
||||
static Vec3f sEffectVelocity = { 0.0f, 0.1f, 0.0f };
|
||||
static Vec3f sEffectAccel = { 0.0f, 0.01f, 0.0f };
|
||||
|
||||
void func_800A6650(EnItem00* this, PlayState* play) {
|
||||
u32 pad;
|
||||
|
|
@ -344,20 +379,21 @@ void func_800A6650(EnItem00* this, PlayState* play) {
|
|||
if (this->actor.params <= ITEM00_RUPEE_RED) {
|
||||
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
|
||||
}
|
||||
|
||||
if ((play->gameplayFrames & 1) != 0) {
|
||||
pos.x = this->actor.world.pos.x + randPlusMinusPoint5Scaled(10.0f);
|
||||
pos.y = this->actor.world.pos.y + randPlusMinusPoint5Scaled(10.0f);
|
||||
pos.z = this->actor.world.pos.z + randPlusMinusPoint5Scaled(10.0f);
|
||||
EffectSsKirakira_SpawnSmall(play, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
EffectSsKirakira_SpawnSmall(play, &pos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor, &sEffectEnvColor);
|
||||
}
|
||||
if ((this->actor.bgCheckFlags & 3) != 0) {
|
||||
|
||||
if (this->actor.bgCheckFlags & 3) {
|
||||
if (this->actor.velocity.y > -2.0f) {
|
||||
this->actionFunc = func_800A640C;
|
||||
return;
|
||||
} else {
|
||||
this->actor.velocity.y = this->actor.velocity.y * -0.8f;
|
||||
this->actor.bgCheckFlags &= ~1;
|
||||
}
|
||||
|
||||
this->actor.velocity.y = this->actor.velocity.y * -0.8f;
|
||||
this->actor.bgCheckFlags = this->actor.bgCheckFlags & 0xFFFE;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -384,18 +420,18 @@ void func_800A6780(EnItem00* this, PlayState* play) {
|
|||
}
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED) {
|
||||
this->actor.shape.rot.y += 960;
|
||||
this->actor.shape.rot.y += 0x3C0;
|
||||
} else if ((this->actor.params >= ITEM00_SHIELD_HERO) && (this->actor.params != ITEM00_NUTS_10) &&
|
||||
(this->actor.params != ITEM00_BOMBS_0)) {
|
||||
this->actor.world.rot.x -= 700;
|
||||
this->actor.shape.rot.y += 400;
|
||||
this->actor.world.rot.x -= 0x2BC;
|
||||
this->actor.shape.rot.y += 0x190;
|
||||
this->actor.shape.rot.x = this->actor.world.rot.x - 0x4000;
|
||||
}
|
||||
|
||||
if (this->actor.velocity.y <= 2.0f) {
|
||||
var1 = (u16)this->actor.shape.rot.z + 10000;
|
||||
if (var1 < 65535) {
|
||||
this->actor.shape.rot.z += 10000;
|
||||
var1 = (u16)this->actor.shape.rot.z + 0x2710;
|
||||
if (var1 < 0xFFFF) {
|
||||
this->actor.shape.rot.z += 0x2710;
|
||||
} else {
|
||||
this->actor.shape.rot.z = -1;
|
||||
}
|
||||
|
|
@ -405,10 +441,10 @@ void func_800A6780(EnItem00* this, PlayState* play) {
|
|||
pos.x = this->actor.world.pos.x + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
pos.y = this->actor.world.pos.y + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
pos.z = this->actor.world.pos.z + ((Rand_ZeroOne() - 0.5f) * 10.0f);
|
||||
EffectSsKirakira_SpawnSmall(play, &pos, &D_801ADF18, &D_801ADF24, &D_801ADF10, &D_801ADF14);
|
||||
EffectSsKirakira_SpawnSmall(play, &pos, &sEffectVelocity, &sEffectAccel, &sEffectPrimColor, &sEffectEnvColor);
|
||||
}
|
||||
|
||||
if (this->actor.bgCheckFlags & 0x0003) {
|
||||
if (this->actor.bgCheckFlags & 3) {
|
||||
this->actionFunc = func_800A640C;
|
||||
this->actor.shape.rot.z = 0;
|
||||
this->actor.speedXZ = 0.0f;
|
||||
|
|
@ -419,7 +455,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) {
|
|||
Player* player = GET_PLAYER(play);
|
||||
|
||||
if (this->getItemId != GI_NONE) {
|
||||
if (Actor_HasParent(&this->actor, play) == 0) {
|
||||
if (!Actor_HasParent(&this->actor, play)) {
|
||||
Actor_PickUp(&this->actor, play, this->getItemId, 50.0f, 80.0f);
|
||||
this->unk152++;
|
||||
} else {
|
||||
|
|
@ -435,7 +471,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) {
|
|||
this->actor.world.pos = player->actor.world.pos;
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED) {
|
||||
this->actor.shape.rot.y = this->actor.shape.rot.y + 960;
|
||||
this->actor.shape.rot.y += 0x3C0;
|
||||
} else if (this->actor.params == ITEM00_RECOVERY_HEART) {
|
||||
this->actor.shape.rot.y = 0;
|
||||
}
|
||||
|
|
@ -443,7 +479,7 @@ void func_800A6A40(EnItem00* this, PlayState* play) {
|
|||
this->actor.world.pos.y += (40.0f + (Math_SinS(this->unk152 * 15000) * (this->unk152 * 0.3f)));
|
||||
|
||||
if (LINK_IS_ADULT) {
|
||||
this->actor.world.pos.y = this->actor.world.pos.y + 20.0f;
|
||||
this->actor.world.pos.y += 20.0f;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -509,78 +545,101 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
this->unk1A4 = 1;
|
||||
Item_Give(play, ITEM_RUPEE_GREEN);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_BLUE:
|
||||
this->unk1A4 = 1;
|
||||
Item_Give(play, ITEM_RUPEE_BLUE);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_RED:
|
||||
this->unk1A4 = 1;
|
||||
Item_Give(play, ITEM_RUPEE_RED);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_PURPLE:
|
||||
this->unk1A4 = 1;
|
||||
Item_Give(play, ITEM_RUPEE_PURPLE);
|
||||
break;
|
||||
|
||||
case ITEM00_RUPEE_HUGE:
|
||||
this->unk1A4 = 1;
|
||||
Item_Give(play, ITEM_RUPEE_HUGE);
|
||||
break;
|
||||
|
||||
case ITEM00_STICK:
|
||||
getItemId = GI_STICKS_1;
|
||||
break;
|
||||
|
||||
case ITEM00_NUTS_1:
|
||||
getItemId = GI_NUTS_1;
|
||||
break;
|
||||
|
||||
case ITEM00_NUTS_10:
|
||||
getItemId = GI_NUTS_10;
|
||||
break;
|
||||
|
||||
case ITEM00_RECOVERY_HEART:
|
||||
Item_Give(play, ITEM_RECOVERY_HEART);
|
||||
break;
|
||||
|
||||
case ITEM00_FLEXIBLE:
|
||||
case ITEM00_BIG_FAIRY:
|
||||
Health_ChangeBy(play, 0x70);
|
||||
break;
|
||||
|
||||
case ITEM00_BOMBS_A:
|
||||
case ITEM00_BOMBS_B:
|
||||
Item_Give(play, ITEM_BOMBS_5);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_10:
|
||||
Item_Give(play, ITEM_ARROWS_10);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_30:
|
||||
Item_Give(play, ITEM_ARROWS_30);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_40:
|
||||
Item_Give(play, ITEM_ARROWS_40);
|
||||
break;
|
||||
|
||||
case ITEM00_ARROWS_50:
|
||||
Item_Give(play, ITEM_ARROWS_50);
|
||||
break;
|
||||
|
||||
case ITEM00_SMALL_KEY:
|
||||
getItemId = GI_KEY_SMALL;
|
||||
break;
|
||||
|
||||
case ITEM00_HEART_PIECE:
|
||||
getItemId = GI_HEART_PIECE;
|
||||
break;
|
||||
|
||||
case ITEM00_HEART_CONTAINER:
|
||||
getItemId = GI_HEART_CONTAINER;
|
||||
break;
|
||||
|
||||
case ITEM00_MAGIC_LARGE:
|
||||
Item_Give(play, ITEM_MAGIC_LARGE);
|
||||
break;
|
||||
|
||||
case ITEM00_MAGIC_SMALL:
|
||||
Item_Give(play, ITEM_MAGIC_SMALL);
|
||||
break;
|
||||
|
||||
case ITEM00_SHIELD_HERO:
|
||||
getItemId = GI_SHIELD_HERO;
|
||||
break;
|
||||
|
||||
case ITEM00_MAP:
|
||||
getItemId = GI_MAP;
|
||||
break;
|
||||
|
||||
case ITEM00_COMPASS:
|
||||
getItemId = GI_COMPASS;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -603,6 +662,7 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
return;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -634,11 +694,6 @@ void EnItem00_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc = func_800A6A40;
|
||||
}
|
||||
|
||||
void EnItem00_DrawRupee(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawSprite(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawHeartContainer(EnItem00* this, PlayState* play);
|
||||
void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play);
|
||||
|
||||
void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
||||
s32 pad;
|
||||
EnItem00* this = THIS;
|
||||
|
|
@ -652,16 +707,20 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
case ITEM00_RUPEE_PURPLE:
|
||||
EnItem00_DrawRupee(this, play);
|
||||
break;
|
||||
|
||||
case ITEM00_HEART_PIECE:
|
||||
EnItem00_DrawHeartPiece(this, play);
|
||||
break;
|
||||
|
||||
case ITEM00_HEART_CONTAINER:
|
||||
EnItem00_DrawHeartContainer(this, play);
|
||||
break;
|
||||
|
||||
case ITEM00_RECOVERY_HEART:
|
||||
if (this->unk152 < 0) {
|
||||
if (this->unk152 == -1) {
|
||||
s8 bankIndex = Object_GetIndex(&play->objectCtx, OBJECT_GI_HEART);
|
||||
|
||||
if (Object_IsLoaded(&play->objectCtx, bankIndex)) {
|
||||
this->actor.objBankIndex = bankIndex;
|
||||
Actor_SetObjectDependency(play, &this->actor);
|
||||
|
|
@ -673,6 +732,7 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
break;
|
||||
}
|
||||
// fallthrough
|
||||
case ITEM00_BOMBS_A:
|
||||
case ITEM00_ARROWS_10:
|
||||
case ITEM00_ARROWS_30:
|
||||
|
|
@ -688,14 +748,19 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
case ITEM00_BOMBS_0:
|
||||
EnItem00_DrawSprite(this, play);
|
||||
break;
|
||||
|
||||
case ITEM00_SHIELD_HERO:
|
||||
GetItem_Draw(play, GID_SHIELD_HERO);
|
||||
break;
|
||||
|
||||
case ITEM00_MAP:
|
||||
GetItem_Draw(play, GID_DUNGEON_MAP);
|
||||
break;
|
||||
|
||||
case ITEM00_COMPASS:
|
||||
GetItem_Draw(play, GID_COMPASS);
|
||||
break;
|
||||
|
||||
case ITEM00_MASK:
|
||||
case ITEM00_FLEXIBLE:
|
||||
case ITEM00_3_HEARTS:
|
||||
|
|
@ -706,17 +771,13 @@ void EnItem00_Draw(Actor* thisx, PlayState* play) {
|
|||
}
|
||||
}
|
||||
|
||||
TexturePtr D_801ADF30[] = {
|
||||
gameplay_keep_Tex_061FC0, // Green rupee
|
||||
gameplay_keep_Tex_061FE0, // Blue rupee
|
||||
gameplay_keep_Tex_062000, // Red rupee
|
||||
gameplay_keep_Tex_062040, // Orange rupee
|
||||
gameplay_keep_Tex_062020 // Purple rupee
|
||||
static TexturePtr sRupeeTextures[] = {
|
||||
gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeeOrangeTex, gRupeePurpleTex,
|
||||
};
|
||||
|
||||
void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 iconNb;
|
||||
s32 texIndex;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
|
@ -724,67 +785,66 @@ void EnItem00_DrawRupee(EnItem00* this, PlayState* play) {
|
|||
func_800B8050(&this->actor, play, 0);
|
||||
|
||||
if (this->actor.params <= ITEM00_RUPEE_RED) {
|
||||
iconNb = this->actor.params;
|
||||
texIndex = this->actor.params;
|
||||
} else {
|
||||
iconNb = this->actor.params - 0x10;
|
||||
texIndex = this->actor.params - 0x10;
|
||||
}
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_801ADF30[iconNb]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sRupeeTextures[texIndex]));
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_0622C0); // TODO symbol
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
TexturePtr D_801ADF44[12] = {
|
||||
gameplay_keep_Tex_05E6F0, // Heart (Not used)
|
||||
gameplay_keep_Tex_05CEF0, // Bombs (A), Bombs (0)
|
||||
gameplay_keep_Tex_05BEF0, // Arrows (10)
|
||||
gameplay_keep_Tex_05B6F0, // Arrows (30)
|
||||
gameplay_keep_Tex_05C6F0, // Arrows (40), Arrows (50)
|
||||
gameplay_keep_Tex_05CEF0, // Bombs (B)
|
||||
gameplay_keep_Tex_0607C0, // Nuts (1), Nuts (10)
|
||||
gameplay_keep_Tex_060FC0, // Sticks (1)
|
||||
gameplay_keep_Tex_0617C0, // Magic (Large)
|
||||
gameplay_keep_Tex_05FFC0, // Magic (Small)
|
||||
TexturePtr sItemDropTextures[] = {
|
||||
gDropRecoveryHeartTex, // Heart (Not used)
|
||||
gDropBombTex, // Bombs (A), Bombs (0)
|
||||
gDropArrows1Tex, // Arrows (10)
|
||||
gDropArrows2Tex, // Arrows (30)
|
||||
gDropArrows3Tex, // Arrows (40), Arrows (50)
|
||||
gDropBombTex, // Bombs (B)
|
||||
gDropDekuNutTex, // Nuts (1), Nuts (10)
|
||||
gDropDekuStickTex, // Sticks (1)
|
||||
gDropMagicLargeTex, // Magic (Large)
|
||||
gDropMagicSmallTex, // Magic (Small)
|
||||
NULL,
|
||||
gameplay_keep_Tex_05F7C0 // Small Key
|
||||
gDropKeySmallTex // Small Key
|
||||
};
|
||||
|
||||
void EnItem00_DrawSprite(EnItem00* this, PlayState* play) {
|
||||
s32 iconNb = this->actor.params - 3;
|
||||
s32 texIndex = this->actor.params - 3;
|
||||
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
|
||||
if (this->actor.params == ITEM00_NUTS_10) {
|
||||
iconNb = 6;
|
||||
texIndex = 6;
|
||||
} else if (this->actor.params == ITEM00_BOMBS_0) {
|
||||
iconNb = 1;
|
||||
texIndex = 1;
|
||||
} else if (this->actor.params >= ITEM00_ARROWS_30) {
|
||||
iconNb -= 3;
|
||||
texIndex -= 3;
|
||||
if (this->actor.params < ITEM00_ARROWS_50) {
|
||||
iconNb++;
|
||||
texIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_801ADF44[iconNb]));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sItemDropTextures[texIndex]));
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05F6F0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
void EnItem00_DrawHeartContainer(EnItem00* actor, PlayState* play) {
|
||||
s32 pad;
|
||||
s32 pad2;
|
||||
s32 pad[2];
|
||||
|
||||
if (Object_GetIndex(&play->objectCtx, OBJECT_GI_HEARTS) == actor->actor.objBankIndex) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
|
@ -811,7 +871,7 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
|
|||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_05AAB0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gHeartPieceInteriorDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
@ -893,7 +953,7 @@ Actor* Item_DropCollectible(PlayState* play, Vec3f* spawnPos, u32 params) {
|
|||
}
|
||||
spawnedActor->speedXZ = 2.0f;
|
||||
spawnedActor->gravity = -0.9f;
|
||||
spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(65536.0f);
|
||||
spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(0x10000);
|
||||
Actor_SetScale(spawnedActor, 0.0f);
|
||||
((EnItem00*)spawnedActor)->actionFunc = func_800A6780;
|
||||
((EnItem00*)spawnedActor)->unk152 = 0xDC;
|
||||
|
|
@ -948,7 +1008,7 @@ Actor* Item_DropCollectible2(PlayState* play, Vec3f* spawnPos, s32 params) {
|
|||
} else {
|
||||
spawnedActor->gravity = -0.9f;
|
||||
}
|
||||
spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(65536.0f);
|
||||
spawnedActor->world.rot.y = randPlusMinusPoint5Scaled(0x10000);
|
||||
spawnedActor->flags |= 0x10;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ void func_80AFE414(Actor* thisx, PlayState* play) {
|
|||
func_8012C2DC(play->state.gfxCtx);
|
||||
func_800B8118(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gameplay_keep_DL_05AAB0);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gHeartPieceInteriorDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
@ -246,9 +246,9 @@ void func_80AFE4AC(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx);
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05E6F0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05F6F0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
||||
|
|
@ -268,8 +268,8 @@ void func_80AFE650(Actor* thisx, PlayState* play) {
|
|||
OPEN_DISPS(play->state.gfxCtx);
|
||||
POLY_OPA_DISP = func_801660B8(play, POLY_OPA_DISP);
|
||||
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05CEF0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropBombTex));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05F6F0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1460,7 +1460,7 @@ void func_80964950(PlayState* play, EnFuUnkStruct* ptr, s32 len) {
|
|||
Matrix_ReplaceRotation(&play->billboardMtxF);
|
||||
Matrix_Scale(ptr->unk_00, ptr->unk_00, ptr->unk_00, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05E6F0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_mu_DL_00B0E0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,9 +55,8 @@ static ColliderCylinderInit sCylinderInit = {
|
|||
{ 10, 30, 0, { 0, 0, 0 } },
|
||||
};
|
||||
|
||||
static TexturePtr sRupeeTex[] = {
|
||||
gameplay_keep_Tex_061FC0, gameplay_keep_Tex_061FE0, gameplay_keep_Tex_062000,
|
||||
gameplay_keep_Tex_062040, gameplay_keep_Tex_062020,
|
||||
static TexturePtr sRupeeTextures[] = {
|
||||
gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeeOrangeTex, gRupeePurpleTex,
|
||||
};
|
||||
|
||||
static Color_RGBA8 sPrimColor = { 255, 255, 255, 255 };
|
||||
|
|
@ -185,8 +184,8 @@ void EnGamelupy_Draw(Actor* thisx, PlayState* play) {
|
|||
func_8012C28C(play->state.gfxCtx);
|
||||
func_800B8050(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sRupeeTex[this->rupeeIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_0622C0);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sRupeeTextures[this->rupeeIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -963,7 +963,7 @@ void EnKanban_Draw(Actor* thisx, PlayState* play) {
|
|||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (this->partFlags == 0xFFFF) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05AED0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gSignRectangularDL);
|
||||
} else {
|
||||
for (i = 0; i < ARRAY_COUNT(sPartFlags); i++) {
|
||||
if (sPartFlags[i] & this->partFlags) {
|
||||
|
|
|
|||
|
|
@ -1152,7 +1152,7 @@ void func_80B5E1D8(PlayState* play, EnOtUnkStruct* arg1, s32 arg2) {
|
|||
Matrix_RotateYS(BINANG_ROT180(Camera_GetCamDirYaw(GET_ACTIVE_CAM(play))), MTXMODE_APPLY);
|
||||
Matrix_Scale(arg1->unk_04, arg1->unk_04, arg1->unk_04, MTXMODE_APPLY);
|
||||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gameplay_keep_Tex_05E6F0));
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(gDropRecoveryHeartTex));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, object_ot_DL_000078);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,12 +36,12 @@ const ActorInit En_Sc_Ruppe_InitVars = {
|
|||
};
|
||||
|
||||
RuppeInfo sRupeeInfo[] = {
|
||||
{ gameplay_keep_Tex_061FC0, 1 }, // Green rupee
|
||||
{ gameplay_keep_Tex_061FE0, 5 }, // Blue rupee
|
||||
{ gameplay_keep_Tex_062000, 20 }, // Red rupee
|
||||
{ gameplay_keep_Tex_062040, 200 }, // Orange rupee
|
||||
{ gameplay_keep_Tex_062020, 50 }, // Purple rupee
|
||||
{ gameplay_keep_Tex_062060, 10 }, // (unused)
|
||||
{ gRupeeGreenTex, 1 }, // Green rupee
|
||||
{ gRupeeBlueTex, 5 }, // Blue rupee
|
||||
{ gRupeeRedTex, 20 }, // Red rupee
|
||||
{ gRupeeOrangeTex, 200 }, // Orange rupee
|
||||
{ gRupeePurpleTex, 50 }, // Purple rupee
|
||||
{ gRupeeSilverTex, 10 }, // (unused)
|
||||
};
|
||||
|
||||
static ColliderCylinderInit sCylinderInit = {
|
||||
|
|
@ -185,7 +185,7 @@ void EnScRuppe_Draw(Actor* thisx, PlayState* play) {
|
|||
func_800B8050(&this->actor, play, 0);
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sRupeeInfo[this->ruppeIndex].tex));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_0622C0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,6 @@ void EnScopecoin_Destroy(Actor* thisx, PlayState* play);
|
|||
void EnScopecoin_Update(Actor* thisx, PlayState* play);
|
||||
void EnScopecoin_Draw(Actor* thisx, PlayState* play);
|
||||
|
||||
void func_80BFCFA0(EnScopecoin* this, PlayState* play);
|
||||
void func_80BFCFB8(EnScopecoin* this, PlayState* play);
|
||||
|
||||
const ActorInit En_Scopecoin_InitVars = {
|
||||
ACTOR_EN_SCOPECOIN,
|
||||
ACTORCAT_NPC,
|
||||
|
|
@ -31,12 +28,12 @@ const ActorInit En_Scopecoin_InitVars = {
|
|||
(ActorFunc)EnScopecoin_Draw,
|
||||
};
|
||||
|
||||
void func_80BFCFA0(EnScopecoin* this, PlayState* play) {
|
||||
this->actor.shape.rot.y += 500;
|
||||
void EnScopecoin_Spin(EnScopecoin* this, PlayState* play) {
|
||||
this->actor.shape.rot.y += 0x1F4;
|
||||
}
|
||||
|
||||
void func_80BFCFB8(EnScopecoin* this, PlayState* play) {
|
||||
if (Flags_GetCollectible(play, (this->actor.params & 0x7F0) >> 4)) {
|
||||
void EnScopecoin_CheckCollectible(EnScopecoin* this, PlayState* play) {
|
||||
if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) {
|
||||
Item_DropCollectible(play, &this->actor.world.pos, ITEM00_RUPEE_RED);
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
|
|
@ -47,31 +44,32 @@ void EnScopecoin_Init(Actor* thisx, PlayState* play) {
|
|||
|
||||
Actor_SetScale(&this->actor, 0.01f);
|
||||
ActorShape_Init(&this->actor.shape, 0, ActorShadow_DrawCircle, 10.0f);
|
||||
this->unk148 = (this->actor.params & 0xF);
|
||||
if (this->unk148 < 0 || this->unk148 >= 8) {
|
||||
this->unk148 = 0;
|
||||
|
||||
this->rupeeIndex = OBJMUPICT_GET_RUPEE_INDEX(&this->actor);
|
||||
if ((this->rupeeIndex < 0) || (this->rupeeIndex > 7)) {
|
||||
this->rupeeIndex = 0;
|
||||
}
|
||||
|
||||
if (play->actorCtx.flags & ACTORCTX_FLAG_1) {
|
||||
if (this->unk148 == 2 || this->unk148 == 6) {
|
||||
if (Flags_GetCollectible(play, (this->actor.params & 0x7F0) >> 4)) {
|
||||
if ((this->rupeeIndex == 2) || (this->rupeeIndex == 6)) {
|
||||
if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this->actor.shape.yOffset = 700.0f;
|
||||
this->actionFunc = func_80BFCFA0;
|
||||
return;
|
||||
}
|
||||
if (this->unk148 == 2 || this->unk148 == 6) {
|
||||
if (Flags_GetCollectible(play, (this->actor.params & 0x7F0) >> 4)) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
} else {
|
||||
this->actor.draw = NULL;
|
||||
this->actionFunc = func_80BFCFB8;
|
||||
}
|
||||
this->actionFunc = EnScopecoin_Spin;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
if ((this->rupeeIndex == 2) || (this->rupeeIndex == 6)) {
|
||||
if (Flags_GetCollectible(play, OBJMUPICT_GET_RUPEE_FLAG(&this->actor))) {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
return;
|
||||
}
|
||||
this->actor.draw = NULL;
|
||||
this->actionFunc = EnScopecoin_CheckCollectible;
|
||||
} else {
|
||||
Actor_MarkForDeath(&this->actor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -84,9 +82,8 @@ void EnScopecoin_Update(Actor* thisx, PlayState* play) {
|
|||
this->actionFunc(this, play);
|
||||
}
|
||||
|
||||
static TexturePtr D_80BFD280[] = {
|
||||
gameplay_keep_Tex_061FC0, gameplay_keep_Tex_061FE0, gameplay_keep_Tex_062000, gameplay_keep_Tex_062040,
|
||||
gameplay_keep_Tex_062020, gameplay_keep_Tex_062060, gameplay_keep_Tex_062000,
|
||||
static TexturePtr sRupeeTextures[] = {
|
||||
gRupeeGreenTex, gRupeeBlueTex, gRupeeRedTex, gRupeeOrangeTex, gRupeePurpleTex, gRupeeSilverTex, gRupeeRedTex,
|
||||
};
|
||||
|
||||
void EnScopecoin_Draw(Actor* thisx, PlayState* play) {
|
||||
|
|
@ -95,11 +92,12 @@ void EnScopecoin_Draw(Actor* thisx, PlayState* play) {
|
|||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
func_800B8050(&this->actor, play, 0);
|
||||
|
||||
OPEN_DISPS(gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80BFD280[this->unk148]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_0622C0);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(sRupeeTextures[this->rupeeIndex]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
|
||||
CLOSE_DISPS(gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,13 +5,15 @@
|
|||
|
||||
struct EnScopecoin;
|
||||
|
||||
#define OBJMUPICT_GET_RUPEE_INDEX(thisx) ((thisx)->params & 0xF)
|
||||
#define OBJMUPICT_GET_RUPEE_FLAG(thisx) (((thisx)->params & 0x7F0) >> 4)
|
||||
|
||||
typedef void (*EnScopecoinActionFunc)(struct EnScopecoin*, PlayState*);
|
||||
|
||||
typedef struct EnScopecoin {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ EnScopecoinActionFunc actionFunc;
|
||||
/* 0x148 */ s16 unk148;
|
||||
/* 0x14A */ s16 unk14A;
|
||||
/* 0x148 */ s16 rupeeIndex;
|
||||
} EnScopecoin; // size = 0x14C
|
||||
|
||||
extern const ActorInit En_Scopecoin_InitVars;
|
||||
|
|
|
|||
|
|
@ -508,9 +508,9 @@ void func_80BE5C10(Actor* thisx, PlayState* play) {
|
|||
|
||||
func_8012C28C(play->state.gfxCtx);
|
||||
if (this->unk_1A0 == 0) {
|
||||
texture = gameplay_keep_Tex_05BEF0;
|
||||
texture = gDropArrows1Tex;
|
||||
} else {
|
||||
texture = gameplay_keep_Tex_0617C0;
|
||||
texture = gDropMagicLargeTex;
|
||||
}
|
||||
|
||||
POLY_OPA_DISP = func_8012C724(POLY_OPA_DISP);
|
||||
|
|
@ -521,7 +521,7 @@ void func_80BE5C10(Actor* thisx, PlayState* play) {
|
|||
Matrix_RotateZS(this->unk_198, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05F6F0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
|
||||
CLOSE_DISPS(play->state.gfxCtx);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,13 +80,7 @@ u8 D_80A93E80[] = {
|
|||
};
|
||||
|
||||
TexturePtr D_80A9402C[] = {
|
||||
NULL,
|
||||
gameplay_keep_Tex_05B6F0,
|
||||
gameplay_keep_Tex_05CEF0,
|
||||
gameplay_keep_Tex_0607C0,
|
||||
gameplay_keep_Tex_060FC0,
|
||||
gameplay_keep_Tex_061FC0,
|
||||
gameplay_keep_Tex_061FE0,
|
||||
NULL, gDropArrows2Tex, gDropBombTex, gDropDekuNutTex, gDropDekuStickTex, gRupeeGreenTex, gRupeeBlueTex,
|
||||
};
|
||||
|
||||
Color_RGB8 D_80A94048 = { 230, 230, 220 };
|
||||
|
|
@ -221,7 +215,7 @@ void func_80A90D34(EnTest6* this, PlayState* play, EnTest6Struct* ptr) {
|
|||
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A9402C[ptr->unk_00]));
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_05F6F0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gItemDropDL);
|
||||
}
|
||||
|
||||
Matrix_Translate(ptr->unk_08 * ptr->unk_04, ptr->unk_0C, ptr->unk_10 * ptr->unk_04, MTXMODE_NEW);
|
||||
|
|
@ -273,7 +267,7 @@ void func_80A90FC0(EnTest6* this, PlayState* play, EnTest6Struct* ptr) {
|
|||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPSegment(POLY_OPA_DISP++, 0x08, Lib_SegmentedToVirtual(D_80A9402C[ptr->unk_00]));
|
||||
gSPDisplayList(POLY_OPA_DISP++, gameplay_keep_DL_0622C0);
|
||||
gSPDisplayList(POLY_OPA_DISP++, gRupeeDL);
|
||||
}
|
||||
|
||||
Matrix_Translate(ptr->unk_08 * ptr->unk_04, ptr->unk_0C, ptr->unk_10 * ptr->unk_04, MTXMODE_NEW);
|
||||
|
|
|
|||
|
|
@ -16430,8 +16430,8 @@
|
|||
0x80BFC9E4:("EnRz_Update",),
|
||||
0x80BFCAD0:("func_80BFCAD0",),
|
||||
0x80BFCB3C:("EnRz_Draw",),
|
||||
0x80BFCFA0:("func_80BFCFA0",),
|
||||
0x80BFCFB8:("func_80BFCFB8",),
|
||||
0x80BFCFA0:("EnScopecoin_Spin",),
|
||||
0x80BFCFB8:("EnScopecoin_CheckCollectible",),
|
||||
0x80BFD010:("EnScopecoin_Init",),
|
||||
0x80BFD148:("EnScopecoin_Destroy",),
|
||||
0x80BFD158:("EnScopecoin_Update",),
|
||||
|
|
|
|||
|
|
@ -377,12 +377,12 @@
|
|||
0x801ADEC0:("En_Item00_InitVars","ActorInit","",0x20),
|
||||
0x801ADEE0:("enItem00CylinderInit","ColliderCylinderInit","",0x2c),
|
||||
0x801ADF0C:("enItem00InitVars","ActorInitVar","[1]",0x4),
|
||||
0x801ADF10:("D_801ADF10","ColorRGBA8","",0x4),
|
||||
0x801ADF14:("D_801ADF14","ColorRGBA8","",0x4),
|
||||
0x801ADF18:("D_801ADF18","Vec3f","",0xc),
|
||||
0x801ADF24:("D_801ADF24","Vec3f","",0xc),
|
||||
0x801ADF30:("D_801ADF30","UNK_PTR","[5]",0x14),
|
||||
0x801ADF44:("D_801ADF44","UNK_PTR","[12]",0x30),
|
||||
0x801ADF10:("sEffectPrimColor","ColorRGBA8","",0x4),
|
||||
0x801ADF14:("sEffectEnvColor","ColorRGBA8","",0x4),
|
||||
0x801ADF18:("sEffectVelocity","Vec3f","",0xc),
|
||||
0x801ADF24:("sEffectAccel","Vec3f","",0xc),
|
||||
0x801ADF30:("sRupeeTextures","UNK_PTR","[5]",0x14),
|
||||
0x801ADF44:("sItemDropTextures","UNK_PTR","[12]",0x30),
|
||||
0x801ADF74:("sDropTable","u8","[272]",0x110),
|
||||
0x801AE084:("sDropTableAmounts","u8","[272]",0x110),
|
||||
0x801AE194:("D_801AE194","s32","[32]",0x80),
|
||||
|
|
@ -16250,7 +16250,7 @@
|
|||
0x80BFCD78:("D_80BFCD78","f32","",0x4),
|
||||
0x80BFCD7C:("D_80BFCD7C","f32","",0x4),
|
||||
0x80BFD260:("En_Scopecoin_InitVars","UNK_TYPE1","",0x1),
|
||||
0x80BFD280:("D_80BFD280","UNK_TYPE1","",0x1),
|
||||
0x80BFD280:("sRupeeTextures","UNK_TYPE1","",0x1),
|
||||
0x80BFDEA0:("D_80BFDEA0","UNK_TYPE1","",0x1),
|
||||
0x80BFDEB4:("D_80BFDEB4","UNK_TYPE1","",0x1),
|
||||
0x80BFDF28:("En_Bjt_InitVars","UNK_TYPE1","",0x1),
|
||||
|
|
|
|||
Loading…
Reference in New Issue