mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-13 20:44:41 -04:00
Move files in with other rando files
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
#include "z64adult_trade_shuffle.h"
|
||||
#include "functions.h"
|
||||
#include "variables.h"
|
||||
#include "macros.h"
|
||||
|
||||
void Randomizer_ConsumeAdultTradeItem(GlobalContext* globalCtx, u8 itemId) {
|
||||
gSaveContext.adultTradeItems &= ~ADULT_TRADE_FLAG(itemId);
|
||||
Inventory_ReplaceItem(globalCtx, itemId, Randomizer_GetNextAdultTradeItem());
|
||||
}
|
||||
|
||||
u8 Randomizer_GetNextAdultTradeItem() {
|
||||
const u8 numTradeItems = ITEM_CLAIM_CHECK - ITEM_POCKET_EGG + 1;
|
||||
u8 currentTradeItemIndex = INV_CONTENT(ITEM_TRADE_ADULT) - ITEM_POCKET_EGG;
|
||||
for (int i = 0; i < numTradeItems; i++) {
|
||||
u8 tradeIndex = (currentTradeItemIndex + i + 1) % numTradeItems;
|
||||
if (gSaveContext.adultTradeItems & (1 << tradeIndex)) {
|
||||
return ITEM_POCKET_EGG + tradeIndex;
|
||||
}
|
||||
}
|
||||
return ITEM_NONE;
|
||||
}
|
||||
|
||||
u8 Randomizer_GetPrevAdultTradeItem() {
|
||||
const u8 numTradeItems = ITEM_CLAIM_CHECK - ITEM_POCKET_EGG + 1;
|
||||
u8 currentTradeItemIndex = INV_CONTENT(ITEM_TRADE_ADULT) - ITEM_POCKET_EGG;
|
||||
for (int i = 0; i < numTradeItems; i++) {
|
||||
u8 tradeIndex = (currentTradeItemIndex - i - 1 + numTradeItems) % numTradeItems;
|
||||
if (gSaveContext.adultTradeItems & (1 << tradeIndex)) {
|
||||
return ITEM_POCKET_EGG + tradeIndex;
|
||||
}
|
||||
}
|
||||
return ITEM_NONE;
|
||||
}
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
#include "objects/gameplay_field_keep/gameplay_field_keep.h"
|
||||
#include "soh/frame_interpolation.h"
|
||||
#include "z64adult_trade_shuffle.h"
|
||||
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ LENS_FLARE_CIRCLE0,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include "textures/parameter_static/parameter_static.h"
|
||||
#include "textures/do_action_static/do_action_static.h"
|
||||
#include "textures/icon_item_static/icon_item_static.h"
|
||||
#include "z64adult_trade_shuffle.h"
|
||||
#include "soh/Enhancements/randomizer/adult_trade_shuffle.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <stdlib.h>
|
||||
|
||||
Reference in New Issue
Block a user