ADD: Rando particles on NUTS and STICK Upgrade (#907)

* ADD: Rando particles on NUTS and STICK Upgrade

(Completely forgot they were a thing...)

* TWEAK:  spacing comment
This commit is contained in:
PurpleHato 2022-07-26 00:44:38 +02:00 committed by GitHub
parent d05295aad2
commit 5d0452d1dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 43 additions and 23 deletions

View File

@ -1231,27 +1231,40 @@ void EnItem00_CustomItemsParticles(Actor* Parent, GlobalContext* globalCtx, s16
case GI_PRELUDE_OF_LIGHT: case GI_PRELUDE_OF_LIGHT:
color_slot = 5; color_slot = 5;
break; break;
case GI_STICK_UPGRADE_20:
case GI_STICK_UPGRADE_30:
color_slot = 6;
break;
case GI_NUT_UPGRADE_30:
case GI_NUT_UPGRADE_40:
color_slot = 7;
break;
} }
s16* colors[7][3] = { s16* colors[9][3] = {
{ 34, 255, 76 }, // Minuet and Magic Upgrades Colors { 34, 255, 76 }, // Minuet and Magic Upgrades Colors
{ 177, 35, 35 }, // Bolero and Double Defense Colors { 177, 35, 35 }, // Bolero and Double Defense Colors
{ 115, 251, 253 }, // Serenade Color { 115, 251, 253 }, // Serenade Color
{ 177, 122, 35 }, // Requiem Color { 177, 122, 35 }, // Requiem Color
{ 177, 28, 212 }, // Nocturne Color { 177, 28, 212 }, // Nocturne Color
{ 255, 255, 92 }, // Prelude Color { 255, 255, 92 }, // Prelude Color
{ 31, 152, 49 }, // Stick Upgrade Color
{ 222, 182, 20 }, // Nut Upgrade Color
{ 255, 255, 255 } // White Color placeholder { 255, 255, 255 } // White Color placeholder
}; };
s16* colorsEnv[7][3] = { s16* colorsEnv[9][3] = {
{ 30, 110, 30 }, // Minuet and Magic Upgrades Colors { 30, 110, 30 }, // Minuet and Magic Upgrades Colors
{ 90, 10, 10 }, // Bolero and Double Defense Colors { 90, 10, 10 }, // Bolero and Double Defense Colors
{ 35, 35, 177 }, // Serenade Color { 35, 35, 177 }, // Serenade Color
{ 70, 20, 10 }, // Requiem Color { 70, 20, 10 }, // Requiem Color
{ 100, 20, 140 }, // Nocturne Color { 100, 20, 140 }, // Nocturne Color
{ 100, 100, 10 }, // Prelude Color { 100, 100, 10 }, // Prelude Color
{ 5, 50, 10 }, // Stick Upgrade Color
{ 150, 100, 5 }, // Nut Upgrade Color
{ 154, 154, 154 } // White Color placeholder { 154, 154, 154 } // White Color placeholder
}; };
static Vec3f velocity = { 0.0f, 0.2f, 0.0f }; static Vec3f velocity = { 0.0f, 0.2f, 0.0f };
static Vec3f accel = { 0.0f, 0.05f, 0.0f }; static Vec3f accel = { 0.0f, 0.05f, 0.0f };
Color_RGBA8 primColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 }; Color_RGBA8 primColor = { colors[color_slot][0], colors[color_slot][1], colors[color_slot][2], 0 };
@ -1304,7 +1317,8 @@ void EnItem00_DrawCollectible(EnItem00* this, GlobalContext* globalCtx) {
f32 mtxScale = 16.0f; f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
s32 randoGetItemId = Randomizer_GetRandomizedItemId(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum); s32 randoGetItemId = Randomizer_GetRandomizedItemId(this->getItemId, this->actor.id, this->ogParams, globalCtx->sceneNum);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));
@ -1364,7 +1378,8 @@ void EnItem00_DrawHeartPiece(EnItem00* this, GlobalContext* globalCtx) {
f32 mtxScale = 16.0f; f32 mtxScale = 16.0f;
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY); Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
s32 randoGetItemId = Randomizer_GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum); s32 randoGetItemId = Randomizer_GetRandomizedItemId(GI_HEART_PIECE, this->actor.id, this->ogParams, globalCtx->sceneNum);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));

View File

@ -520,7 +520,8 @@ void EnExItem_DrawItems(EnExItem* this, GlobalContext* globalCtx) {
break; break;
} }
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
} }
@ -534,7 +535,8 @@ void EnExItem_DrawHeartPiece(EnExItem* this, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck( s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck(
RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE); RC_MARKET_BOMBCHU_BOWLING_SECOND_PRIZE, GI_HEART_PIECE);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));

View File

@ -230,7 +230,8 @@ void ItemEtcetera_DrawThroughLens(Actor* thisx, GlobalContext* globalCtx) {
if(gSaveContext.n64ddFlag && globalCtx->sceneNum == 16) { if(gSaveContext.n64ddFlag && globalCtx->sceneNum == 16) {
s32 randoGetItemId = GetChestGameRandoGetItemId(this->actor.room, this->giDrawId, globalCtx); s32 randoGetItemId = GetChestGameRandoGetItemId(this->actor.room, this->giDrawId, globalCtx);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
if (randoGetItemId != GI_NONE) { if (randoGetItemId != GI_NONE) {
@ -255,7 +256,8 @@ void ItemEtcetera_Draw(Actor* thisx, GlobalContext* globalCtx) {
randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO); randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_LH_UNDERWATER_ITEM, GI_LETTER_RUTO);
} }
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }

View File

@ -215,7 +215,8 @@ void ItemOcarina_Draw(Actor* thisx, GlobalContext* globalCtx) {
if (gSaveContext.n64ddFlag) { if (gSaveContext.n64ddFlag) {
s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT); s32 randoGetItemId = Randomizer_GetItemIdFromKnownCheck(RC_HF_OCARINA_OF_TIME_ITEM, GI_OCARINA_OOT);
if (randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) { if ((randoGetItemId >= GI_MINUET_OF_FOREST && randoGetItemId <= GI_DOUBLE_DEFENSE) ||
(randoGetItemId >= GI_STICK_UPGRADE_20 && randoGetItemId <= GI_NUT_UPGRADE_40)) {
EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId); EnItem00_CustomItemsParticles(&this->actor, globalCtx, randoGetItemId);
} }
GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId)); GetItem_Draw(globalCtx, Randomizer_GetItemModelFromId(randoGetItemId));