mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-13 01:57:18 -07:00
Rando Enhancement: Mysterious Shuffled Items (#3227)
* Add rando enhancement "Mysterious Shuffled Items", which obfuscates shuffled freestanding/drawn-in-world items (PoH, tokens, shop items) with a custom question mark model (thanks Hato), and uses the "mysterious item" functionality of `GetMerchantMessage` for everything that supports it, regardless of hint status on generation. * Reverted back to rando enhancement, but added condition for Mysterious Shuffle not being on for the gem rotation fix to apply. * First attempt at changing to fake GetItemEntry instead of directly calling the mystery draw function. Needs more work. * Updated CVar to reflect CVar rework values. Added `IsCheckShuffled` as preliminary function for checking *only* if a check is shuffled, not necessarily if it is just visible on the tracker. This accounts for the difference between tokensanity and "Always Show GS On Tracker", where you don't want to obfuscate the latter. * Bit of cleanup. * Cross-platform building edits. If anyone has a better idea of how to handle this fake GIE, I'm all ears. * Update to CVar macros. * Fix freestanding item gives. Fix mysterious item model colors. * Fix bombchu bowling mystery. * Remove bowling bomchus check obfuscation (unused, removed in v3).
This commit is contained in:
parent
f3b948226b
commit
b3d51441eb
29 changed files with 896 additions and 41 deletions
|
@ -1366,17 +1366,19 @@ void EnItem00_DrawCollectible(EnItem00* this, PlayState* play) {
|
|||
if (IS_RANDO && (this->getItemId != GI_NONE || this->actor.params == ITEM00_SMALL_KEY)) {
|
||||
RandomizerCheck randoCheck =
|
||||
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
|
||||
GetItemEntry giEntry = this->randoGiEntry;
|
||||
|
||||
if (randoCheck != RC_UNKNOWN_CHECK) {
|
||||
this->randoGiEntry =
|
||||
Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
|
||||
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
|
||||
this->randoGiEntry = Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
|
||||
giEntry = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && Randomizer_IsCheckShuffled(randoCheck))
|
||||
? GetItemMystery() : this->randoGiEntry;
|
||||
giEntry.getItemFrom = ITEM_FROM_FREESTANDING;
|
||||
}
|
||||
|
||||
f32 mtxScale = 10.67f;
|
||||
|
||||
f32 mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry);
|
||||
GetItemEntry_Draw(play, this->randoGiEntry);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, giEntry);
|
||||
GetItemEntry_Draw(play, giEntry);
|
||||
} else if (this->actor.params == ITEM00_BOMBCHU) {
|
||||
OPEN_DISPS(play->state.gfxCtx);
|
||||
|
||||
|
@ -1460,17 +1462,19 @@ void EnItem00_DrawHeartPiece(EnItem00* this, PlayState* play) {
|
|||
if (IS_RANDO) {
|
||||
RandomizerCheck randoCheck =
|
||||
Randomizer_GetCheckFromActor(this->actor.id, play->sceneNum, this->ogParams);
|
||||
GetItemEntry giEntry = this->randoGiEntry;
|
||||
|
||||
if (randoCheck != RC_UNKNOWN_CHECK) {
|
||||
this->randoGiEntry =
|
||||
Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
|
||||
this->randoGiEntry.getItemFrom = ITEM_FROM_FREESTANDING;
|
||||
this->randoGiEntry = Randomizer_GetItemFromKnownCheck(randoCheck, GI_NONE);
|
||||
giEntry = (CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0) && Randomizer_IsCheckShuffled(randoCheck))
|
||||
? GetItemMystery() : this->randoGiEntry;
|
||||
giEntry.getItemFrom = ITEM_FROM_FREESTANDING;
|
||||
}
|
||||
|
||||
f32 mtxScale = 16.0f;
|
||||
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, this->randoGiEntry);
|
||||
GetItemEntry_Draw(play, this->randoGiEntry);
|
||||
EnItem00_CustomItemsParticles(&this->actor, play, giEntry);
|
||||
GetItemEntry_Draw(play, giEntry);
|
||||
} else {
|
||||
s32 pad;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue