Skip to content

Commit 4466442

Browse files
committed
add location IDs to yaml db, get started on translating received ap data to rando data
the idea is to use the existing randomizer systems (like World, RandomizerContext, etc) in order to generate necessary data for in-game modifications such as text replacements, model swaps, etc. to do this we need to get the apworld's current settings, which atm will require loading the configured ap yaml file before connecting to archipelago.
1 parent d6f7419 commit 4466442

9 files changed

Lines changed: 1007 additions & 30 deletions

File tree

include/d/d_item.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ void item_func_FUSED_SHADOW_1();
250250
void item_func_FUSED_SHADOW_2();
251251
void item_func_FUSED_SHADOW_3();
252252
void item_func_MIRROR_PIECE_1();
253+
void item_func_ARCHIPELAGO_ITEM();
253254
#endif
254255
void item_func_POU_SPIRIT();
255256
#if TARGET_PC

include/d/d_item_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ enum {
638638
/* 0xD9 */ dItemNo_Randomizer_FUSED_SHADOW_2_e,
639639
/* 0xDA */ dItemNo_Randomizer_FUSED_SHADOW_3_e,
640640
/* 0xDB */ dItemNo_Randomizer_MIRROR_PIECE_1_e,
641-
/* 0xDC */ dItemNo_Randomizer_NOENTRY_220_e,
641+
/* 0xDC */ dItemNo_Randomizer_ARCHIPELAGO_ITEM_e,
642642
/* 0xDD */ dItemNo_Randomizer_NOENTRY_221_e,
643643
/* 0xDE */ dItemNo_Randomizer_NOENTRY_222_e,
644644
/* 0xDF */ dItemNo_Randomizer_NOENTRY_223_e,

src/d/d_item.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#endif
1717
#include <cstring>
1818

19+
#include "dusk/archipelago/archipelago_context.hpp"
20+
1921
static void (*item_func_ptr[256])() = {
2022
item_func_HEART,
2123
item_func_GREEN_RUPEE,
@@ -497,7 +499,7 @@ static void (*item_func_ptr_randomizer[256])() = {
497499
/* 0xD9 */ item_func_FUSED_SHADOW_2,
498500
/* 0xDA */ item_func_FUSED_SHADOW_3,
499501
/* 0xDB */ item_func_MIRROR_PIECE_1,
500-
/* 0xDC */ item_func_noentry,
502+
/* 0xDC */ item_func_ARCHIPELAGO_ITEM,
501503
/* 0xDD */ item_func_noentry,
502504
/* 0xDE */ item_func_noentry,
503505
/* 0xDF */ item_func_noentry,
@@ -2180,6 +2182,13 @@ void item_func_MIRROR_PIECE_1() {
21802182
dComIfGs_onCollectMirror(0);
21812183
}
21822184
}
2185+
2186+
void item_func_ARCHIPELAGO_ITEM() {
2187+
if (randomizer_IsActive()) {
2188+
dusk::archi::ArchipelagoContext::UpdateCheckedLocations();
2189+
}
2190+
}
2191+
21832192
#endif
21842193

21852194
void item_func_POU_SPIRIT() {

0 commit comments

Comments
 (0)