Skip to content

Commit afc324f

Browse files
committed
Display the correct item model on Big Octo
1 parent 95bd035 commit afc324f

File tree

9 files changed

+32032
-32018
lines changed

9 files changed

+32032
-32018
lines changed

ASM/build/asm_symbols.txt

Lines changed: 977 additions & 975 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/build/bundle.o

152 Bytes
Binary file not shown.

ASM/build/c_symbols.txt

Lines changed: 587 additions & 585 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ASM/c/demo_effect.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@
66
extern void DemoEffect_DrawJewel(z64_actor_t* this, z64_game_t* globalCtx, void* func);
77
extern void* DemoEffect_DrawJewel_AfterHook;
88

9+
extern override_key_t CFG_BIGOCTO_OVERRIDE_KEY;
10+
911
void DemoEffect_DrawJewel_Hook(DemoEffect* this, z64_game_t* globalCtx) {
1012
if (!this->override_initialized) {
1113
if (globalCtx->scene_index == 0x02) {
12-
override_key_t sapphire_override_key = {
13-
.scene = 0x13,
14-
.type = 0x00,
15-
.flag = 0x65,
16-
};
17-
this->override = lookup_override_by_key(sapphire_override_key);
14+
if (CFG_BIGOCTO_OVERRIDE_KEY.all) {
15+
this->override = lookup_override_by_key(CFG_BIGOCTO_OVERRIDE_KEY);
16+
}
1817
if (this->override.key.all) {
1918
this->actor.rot_2.x = 0;
19+
this->actor.scale = (z64_xyzf_t) { 0.02f, 0.02f, 0.02f };
2020
}
2121
}
2222

ASM/src/config.asm

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,9 @@ CFG_DUNGEON_INFO_REWARD_WORLDS_ENABLE:
236236
CFG_DUNGEON_REWARD_WORLDS:
237237
.endarea
238238
.align 4
239+
CFG_BIGOCTO_OVERRIDE_KEY:
240+
.word 0
241+
.align 4
239242

240243
; These configuration values are given fixed addresses to aid auto-trackers.
241244
; Any changes made here should be documented in Notes/auto-tracker-ctx.md

ItemList.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -357,15 +357,15 @@
357357
'Buy Red Potion for 40 Rupees': ('Shop', False, 0x30, {'object': 0x00EB, 'price': 40}),
358358
'Buy Red Potion for 50 Rupees': ('Shop', False, 0x31, {'object': 0x00EB, 'price': 50}),
359359

360-
'Kokiri Emerald': ('DungeonReward', True, 0x0127, {'stone': True, 'item_id': 0x6C, 'actor_type': 0x13, 'object_id': 0x00AD}),
361-
'Goron Ruby': ('DungeonReward', True, 0x0128, {'stone': True, 'item_id': 0x6D, 'actor_type': 0x14, 'object_id': 0x00AD}),
362-
'Zora Sapphire': ('DungeonReward', True, 0x0129, {'stone': True, 'item_id': 0x6E, 'actor_type': 0x15, 'object_id': 0x00AD}),
363-
'Light Medallion': ('DungeonReward', True, 0x012A, {'medallion': True, 'item_id': 0x6B, 'actor_type': 0x0E, 'object_id': 0x00BA}),
364-
'Forest Medallion': ('DungeonReward', True, 0x012B, {'medallion': True, 'item_id': 0x66, 'actor_type': 0x0B, 'object_id': 0x00BA}),
365-
'Fire Medallion': ('DungeonReward', True, 0x012C, {'medallion': True, 'item_id': 0x67, 'actor_type': 0x09, 'object_id': 0x00BA}),
366-
'Water Medallion': ('DungeonReward', True, 0x012D, {'medallion': True, 'item_id': 0x68, 'actor_type': 0x0A, 'object_id': 0x00BA}),
367-
'Shadow Medallion': ('DungeonReward', True, 0x012E, {'medallion': True, 'item_id': 0x6A, 'actor_type': 0x0D, 'object_id': 0x00BA}),
368-
'Spirit Medallion': ('DungeonReward', True, 0x012F, {'medallion': True, 'item_id': 0x69, 'actor_type': 0x0C, 'object_id': 0x00BA}),
360+
'Kokiri Emerald': ('DungeonReward', True, 0x0127, {'stone': True, 'item_id': 0x6C}),
361+
'Goron Ruby': ('DungeonReward', True, 0x0128, {'stone': True, 'item_id': 0x6D}),
362+
'Zora Sapphire': ('DungeonReward', True, 0x0129, {'stone': True, 'item_id': 0x6E}),
363+
'Light Medallion': ('DungeonReward', True, 0x012A, {'medallion': True, 'item_id': 0x6B}),
364+
'Forest Medallion': ('DungeonReward', True, 0x012B, {'medallion': True, 'item_id': 0x66}),
365+
'Fire Medallion': ('DungeonReward', True, 0x012C, {'medallion': True, 'item_id': 0x67}),
366+
'Water Medallion': ('DungeonReward', True, 0x012D, {'medallion': True, 'item_id': 0x68}),
367+
'Shadow Medallion': ('DungeonReward', True, 0x012E, {'medallion': True, 'item_id': 0x6A}),
368+
'Spirit Medallion': ('DungeonReward', True, 0x012F, {'medallion': True, 'item_id': 0x69}),
369369
}
370370

371371
REWARD_COLORS: dict[str, str] = {

Patches.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,16 +1837,9 @@ def calculate_traded_flags(world):
18371837
update_message_by_id(messages, 0x4050, new_message)
18381838

18391839
# Set Dungeon Reward Actor in Jabu Jabu to be accurate
1840-
#if location is not None and location.item is not None: # TODO make actor invisible if no item?
1841-
# jabu_item = location.item
1842-
# jabu_actor_type = jabu_item.special.get('actor_type', 0x15) #TODO handle non-dungeon-reward items
1843-
# set_jabu_stone_actors(rom, jabu_actor_type)
1844-
# # Also set the right object for the actor, since medallions and stones require different objects
1845-
# # MQ is handled separately, as we include both objects in the object list in mqu.json (Scene 2, Room 6)
1846-
# if not world.dungeon_mq['Jabu Jabus Belly']:
1847-
# jabu_stone_object = jabu_item.special.get('object_id', 0x00AD) #TODO handle non-dungeon-reward items
1848-
# rom.write_int16(0x277D068, jabu_stone_object)
1849-
# rom.write_int16(0x277D168, jabu_stone_object)
1840+
if location is not None and location.item is not None: # TODO make actor invisible if no item?
1841+
scene, type, default, _, _, _ = get_override_entry(location)
1842+
rom.write_bytes(rom.sym('CFG_BIGOCTO_OVERRIDE_KEY'), override_key_struct.pack(scene, type, default))
18501843

18511844
# use faster jabu elevator
18521845
if not world.dungeon_mq['Jabu Jabus Belly'] and world.settings.shuffle_scrubs == 'off':
@@ -2739,6 +2732,7 @@ def get_override_table(world: World):
27392732
return list(filter(lambda val: val is not None, map(get_override_entry, world.get_filled_locations())))
27402733

27412734

2735+
override_key_struct = struct.Struct('>BBH') # match override_key_t in get_items.h
27422736
override_struct = struct.Struct('>BBHxxxxHBxHxx') # match override_t in get_items.h
27432737

27442738

0 commit comments

Comments
 (0)