Misc bug fixes

This commit is contained in:
aMannus
2025-07-29 10:46:22 +02:00
parent 761f85037b
commit 075bce439b
4 changed files with 20 additions and 10 deletions

View File

@@ -1069,7 +1069,7 @@ void Interface_LoadItemIcon1(PlayState* play, u16 button);
void Interface_LoadItemIcon2(PlayState* play, u16 button);
void func_80084BF4(PlayState* play, u16 flag);
uint16_t Interface_DrawTextLine(GraphicsContext* gfx, char text[], int16_t x, int16_t y, uint16_t colorR, uint16_t colorG, uint16_t colorB, uint16_t colorA, float textScale, uint8_t textShadow);
uint16_t Interface_DrawTextLine_overlay(GraphicsContext* gfx, char text[], int16_t x, int16_t y, uint16_t colorR, uint16_t colorG, uint16_t colorB, uint16_t colorA, float textScale, uint8_t textShadow);
uint16_t Interface_DrawTextLineOverlay(GraphicsContext* gfx, char text[], int16_t x, int16_t y, uint16_t colorR, uint16_t colorG, uint16_t colorB, uint16_t colorA, float textScale, uint8_t textShadow);
u8 Item_Give(PlayState* play, u8 item);
u16 Randomizer_Item_Give(PlayState* play, GetItemEntry giEntry);
u8 Item_CheckObtainability(u8 item);

View File

@@ -546,7 +546,13 @@ void Context::ParseArchipelagoOptions(const std::map<std::string, int>& slot_dat
mOptions[RSK_SCRUBS_PRICES_AFFORDABLE].Set(0);
mOptions[RSK_SHUFFLE_BEEHIVES].Set(slotData["shuffle_beehives"]);
mOptions[RSK_SHUFFLE_COWS].Set(slotData["shuffle_cows"]);
mOptions[RSK_SHUFFLE_WEIRD_EGG].Set(slotData["shuffle_weird_egg"]);
// Ship shows Malon Egg location if weird egg is shuffled even with "Skip Child Zelda" on
// So manually set this to off.
if (slotData["skip_child_zelda"] == 0) {
mOptions[RSK_SHUFFLE_WEIRD_EGG].Set(slotData["shuffle_weird_egg"]);
} else {
mOptions[RSK_SHUFFLE_WEIRD_EGG].Set(RO_GENERIC_NO);
}
mOptions[RSK_SHUFFLE_GERUDO_MEMBERSHIP_CARD].Set(RO_GENERIC_YES);
mOptions[RSK_SHUFFLE_POTS].Set(slotData["shuffle_pots"]);
mOptions[RSK_SHUFFLE_CRATES].Set(slotData["shuffle_crates"]);
@@ -692,13 +698,13 @@ void Context::ParseArchipelagoOptions(const std::map<std::string, int>& slot_dat
mOptions[RSK_SHUFFLE_100_GS_REWARD].Set(RO_GENERIC_NO);
mOptions[RSK_TRIFORCE_HUNT].Set(slotData["triforce_hunt"]);
uint16_t triforcePiecesRequired = slotData["triforce_hunt_required_pieces"];
uint16_t triforcePiecesExtraPercentage = slotData["triforce_hunt_extra_pieces_percentage"];
uint16_t triforcePiecesTotal = floor(triforcePiecesRequired * (1 + (triforcePiecesExtraPercentage / 100)));
float triforcePiecesExtraMultiplier = 1 + (float(slotData["triforce_hunt_extra_pieces_percentage"]) / 100);
uint16_t triforcePiecesTotal = floor(triforcePiecesRequired * triforcePiecesExtraMultiplier);
if (triforcePiecesTotal > 100) {
triforcePiecesTotal = 100;
}
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL].Set(triforcePiecesTotal);
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].Set(triforcePiecesRequired);
mOptions[RSK_TRIFORCE_HUNT_PIECES_TOTAL].Set((triforcePiecesTotal - 1));
mOptions[RSK_TRIFORCE_HUNT_PIECES_REQUIRED].Set((triforcePiecesRequired - 1));
mOptions[RSK_SHUFFLE_BOSS_SOULS].Set(slotData["shuffle_boss_souls"]);
if (slotData["shuffle_fish"] == 0) {
mOptions[RSK_FISHSANITY].Set(RO_FISHSANITY_OFF);

View File

@@ -17,8 +17,8 @@
#include "soh/Notification/Notification.h"
#include "soh/ShipInit.hpp"
#include "soh/SaveManager.h"
#include "soh/util.h"
#include "soh/SohGui/SohGui.hpp"
#include "soh/OTRGlobals.h"
extern "C" {
#include "variables.h"
@@ -393,11 +393,15 @@ void ArchipelagoClient::OnItemReceived(const ApItem apItem) {
}
void ArchipelagoClient::QueueItem(const ApItem item) {
const RandomizerGet RG = Rando::StaticData::itemNameToEnum[item.itemName];
RandomizerGet RG = Rando::StaticData::itemNameToEnum[item.itemName];
if (RG == RG_NONE) {
return;
}
if (OTRGlobals::Instance->gRandomizer->GetItemObtainabilityFromRandomizerGet(RG) != CAN_OBTAIN) {
RG = RG_BLUE_RUPEE;
}
itemQueued = true;
GameInteractor_ExecuteOnArchipelagoItemReceived(static_cast<int32_t>(RG));
}

View File

@@ -3461,7 +3461,7 @@ void Interface_DrawArchipelagoStatusString(PlayState* play) {
}
Interface_DrawTextLine_overlay(play->state.gfxCtx, statusText, posX, posY, 255, 255, 255, 255, 0.8f, true);
Interface_DrawTextLineOverlay(play->state.gfxCtx, statusText, posX, posY, 255, 255, 255, 255, 0.8f, true);
}
void Interface_DrawMagicBar(PlayState* play) {
@@ -7046,7 +7046,7 @@ uint16_t Interface_DrawTextLine(GraphicsContext* gfx, char text[], int16_t x, in
return kerningOffset;
}
uint16_t Interface_DrawTextLine_overlay(GraphicsContext* gfx, char text[], int16_t x, int16_t y, uint16_t colorR,
uint16_t Interface_DrawTextLineOverlay(GraphicsContext* gfx, char text[], int16_t x, int16_t y, uint16_t colorR,
uint16_t colorG, uint16_t colorB, uint16_t colorA, float textScale,
uint8_t textShadow) {