OoT: ASM modifications to allow for more than 255 players
This commit is contained in:
parent
db2731dfb7
commit
d5934a88a7
|
@ -3,6 +3,7 @@ import itertools
|
|||
import re
|
||||
import zlib
|
||||
from collections import defaultdict
|
||||
from functools import partial
|
||||
|
||||
from .LocationList import business_scrubs
|
||||
from .Hints import writeGossipStoneHints, buildAltarHints, \
|
||||
|
@ -1804,7 +1805,7 @@ def write_rom_item(rom, item_id, item):
|
|||
|
||||
|
||||
def get_override_table(world):
|
||||
return list(filter(lambda val: val != None, map(get_override_entry, world.world.get_filled_locations(world.player))))
|
||||
return list(filter(lambda val: val != None, map(partial(get_override_entry, world.player), world.world.get_filled_locations(world.player))))
|
||||
|
||||
|
||||
override_struct = struct.Struct('>xBBBHBB') # match override_t in get_items.c
|
||||
|
@ -1812,10 +1813,10 @@ def get_override_table_bytes(override_table):
|
|||
return b''.join(sorted(itertools.starmap(override_struct.pack, override_table)))
|
||||
|
||||
|
||||
def get_override_entry(location):
|
||||
def get_override_entry(player_id, location):
|
||||
scene = location.scene
|
||||
default = location.default
|
||||
player_id = min(location.item.player, 255)
|
||||
player_id = 0 if player_id == location.item.player else min(location.item.player, 255)
|
||||
if location.item.game != 'Ocarina of Time':
|
||||
# This is an AP sendable. It's guaranteed to not be None.
|
||||
looks_like_item_id = 0
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -38,7 +38,7 @@
|
|||
"CFG_TEXT_CURSOR_COLOR": "03480866",
|
||||
"CHAIN_HBA_REWARDS": "03483950",
|
||||
"CHEST_SIZE_MATCH_CONTENTS": "034826F0",
|
||||
"COMPLETE_MASK_QUEST": "0348B1C9",
|
||||
"COMPLETE_MASK_QUEST": "0348B1D1",
|
||||
"COOP_CONTEXT": "03480020",
|
||||
"COOP_VERSION": "03480020",
|
||||
"COSMETIC_CONTEXT": "03480844",
|
||||
|
@ -46,13 +46,13 @@
|
|||
"CURRENT_GROTTO_ID": "03482E82",
|
||||
"DEBUG_OFFSET": "034828A0",
|
||||
"DISABLE_TIMERS": "03480CDC",
|
||||
"DPAD_TEXTURE": "0348D748",
|
||||
"DPAD_TEXTURE": "0348D750",
|
||||
"DUNGEONS_SHUFFLED": "03480CDE",
|
||||
"EXTENDED_OBJECT_TABLE": "03480C9C",
|
||||
"EXTERN_DAMAGE_MULTIPLYER": "03482CB1",
|
||||
"FAST_BUNNY_HOOD_ENABLED": "03480CE0",
|
||||
"FAST_CHESTS": "03480CD6",
|
||||
"FONT_TEXTURE": "0348C280",
|
||||
"FONT_TEXTURE": "0348C288",
|
||||
"FREE_SCARECROW_ENABLED": "03480CCC",
|
||||
"GET_CHEST_OVERRIDE_COLOR_WRAPPER": "03482720",
|
||||
"GET_CHEST_OVERRIDE_SIZE_WRAPPER": "034826F4",
|
||||
|
@ -68,12 +68,12 @@
|
|||
"LACS_CONDITION_COUNT": "03480CD2",
|
||||
"MALON_GAVE_ICETRAP": "0348368C",
|
||||
"MALON_TEXT_ID": "03480CDB",
|
||||
"MAX_RUPEES": "0348B1CB",
|
||||
"MAX_RUPEES": "0348B1D3",
|
||||
"MOVED_ADULT_KING_ZORA": "03482FFC",
|
||||
"NO_ESCAPE_SEQUENCE": "0348B194",
|
||||
"NO_ESCAPE_SEQUENCE": "0348B19C",
|
||||
"NO_FOG_STATE": "03480CDD",
|
||||
"OCARINAS_SHUFFLED": "03480CD5",
|
||||
"OPEN_KAKARIKO": "0348B1CA",
|
||||
"OPEN_KAKARIKO": "0348B1D2",
|
||||
"OUTGOING_ITEM": "03480030",
|
||||
"OUTGOING_KEY": "0348002C",
|
||||
"OUTGOING_PLAYER": "03480032",
|
||||
|
@ -96,88 +96,88 @@
|
|||
"SPEED_MULTIPLIER": "03482760",
|
||||
"START_TWINROVA_FIGHT": "0348307C",
|
||||
"TIME_TRAVEL_SAVED_EQUIPS": "03481A64",
|
||||
"TRIFORCE_ICON_TEXTURE": "0348DF48",
|
||||
"TRIFORCE_ICON_TEXTURE": "0348DF50",
|
||||
"TWINROVA_ACTION_TIMER": "03483080",
|
||||
"WINDMILL_SONG_ID": "03480CD9",
|
||||
"WINDMILL_TEXT_ID": "03480CDA",
|
||||
"a_button": "0348B158",
|
||||
"a_note_b": "0348B144",
|
||||
"a_note_font_glow_base": "0348B12C",
|
||||
"a_note_font_glow_max": "0348B128",
|
||||
"a_note_g": "0348B148",
|
||||
"a_note_glow_base": "0348B134",
|
||||
"a_note_glow_max": "0348B130",
|
||||
"a_note_r": "0348B14C",
|
||||
"active_item_action_id": "0348B1AC",
|
||||
"active_item_fast_chest": "0348B19C",
|
||||
"active_item_graphic_id": "0348B1A0",
|
||||
"active_item_object_id": "0348B1A4",
|
||||
"active_item_row": "0348B1B0",
|
||||
"active_item_text_id": "0348B1A8",
|
||||
"active_override": "0348B1B8",
|
||||
"active_override_is_outgoing": "0348B1B4",
|
||||
"b_button": "0348B154",
|
||||
"beating_dd": "0348B160",
|
||||
"beating_no_dd": "0348B168",
|
||||
"c_button": "0348B150",
|
||||
"c_note_b": "0348B138",
|
||||
"c_note_font_glow_base": "0348B11C",
|
||||
"c_note_font_glow_max": "0348B118",
|
||||
"c_note_g": "0348B13C",
|
||||
"c_note_glow_base": "0348B124",
|
||||
"c_note_glow_max": "0348B120",
|
||||
"c_note_r": "0348B140",
|
||||
"cfg_dungeon_info_enable": "0348B0E4",
|
||||
"cfg_dungeon_info_mq_enable": "0348B188",
|
||||
"cfg_dungeon_info_mq_need_map": "0348B184",
|
||||
"cfg_dungeon_info_reward_enable": "0348B0E0",
|
||||
"cfg_dungeon_info_reward_need_altar": "0348B17C",
|
||||
"cfg_dungeon_info_reward_need_compass": "0348B180",
|
||||
"cfg_dungeon_is_mq": "0348B1E8",
|
||||
"cfg_dungeon_rewards": "03489EDC",
|
||||
"cfg_file_select_hash": "0348B190",
|
||||
"cfg_item_overrides": "0348B23C",
|
||||
"defaultDDHeart": "0348B16C",
|
||||
"defaultHeart": "0348B174",
|
||||
"dpad_sprite": "0348A050",
|
||||
"dummy_actor": "0348B1C0",
|
||||
"dungeon_count": "0348B0E8",
|
||||
"dungeons": "03489F00",
|
||||
"empty_dlist": "0348B100",
|
||||
"extern_ctxt": "03489F9C",
|
||||
"font_sprite": "0348A060",
|
||||
"freecam_modes": "03489C5C",
|
||||
"hash_sprites": "0348B0F4",
|
||||
"hash_symbols": "03489FB0",
|
||||
"heap_next": "0348B1E4",
|
||||
"heart_sprite": "03489FF0",
|
||||
"icon_sprites": "03489E20",
|
||||
"item_digit_sprite": "0348A010",
|
||||
"item_overrides_count": "0348B1C4",
|
||||
"item_table": "0348A0D8",
|
||||
"items_sprite": "0348A080",
|
||||
"key_rupee_clock_sprite": "0348A020",
|
||||
"last_fog_distance": "0348B0EC",
|
||||
"linkhead_skull_sprite": "0348A000",
|
||||
"medal_colors": "03489EEC",
|
||||
"medals_sprite": "0348A090",
|
||||
"normal_dd": "0348B15C",
|
||||
"normal_no_dd": "0348B164",
|
||||
"object_slots": "0348C23C",
|
||||
"pending_freezes": "0348B1C8",
|
||||
"pending_item_queue": "0348B224",
|
||||
"quest_items_sprite": "0348A070",
|
||||
"rupee_colors": "03489E2C",
|
||||
"satisified_pending_frames": "0348B198",
|
||||
"scene_fog_distance": "0348B0F0",
|
||||
"setup_db": "0348A0B0",
|
||||
"song_note_sprite": "0348A030",
|
||||
"stones_sprite": "0348A0A0",
|
||||
"text_cursor_border_base": "0348B10C",
|
||||
"text_cursor_border_max": "0348B108",
|
||||
"text_cursor_inner_base": "0348B114",
|
||||
"text_cursor_inner_max": "0348B110",
|
||||
"triforce_hunt_enabled": "0348B1D8",
|
||||
"triforce_pieces_requied": "0348B17A",
|
||||
"triforce_sprite": "0348A040"
|
||||
"a_button": "0348B160",
|
||||
"a_note_b": "0348B14C",
|
||||
"a_note_font_glow_base": "0348B134",
|
||||
"a_note_font_glow_max": "0348B130",
|
||||
"a_note_g": "0348B150",
|
||||
"a_note_glow_base": "0348B13C",
|
||||
"a_note_glow_max": "0348B138",
|
||||
"a_note_r": "0348B154",
|
||||
"active_item_action_id": "0348B1B4",
|
||||
"active_item_fast_chest": "0348B1A4",
|
||||
"active_item_graphic_id": "0348B1A8",
|
||||
"active_item_object_id": "0348B1AC",
|
||||
"active_item_row": "0348B1B8",
|
||||
"active_item_text_id": "0348B1B0",
|
||||
"active_override": "0348B1C0",
|
||||
"active_override_is_outgoing": "0348B1BC",
|
||||
"b_button": "0348B15C",
|
||||
"beating_dd": "0348B168",
|
||||
"beating_no_dd": "0348B170",
|
||||
"c_button": "0348B158",
|
||||
"c_note_b": "0348B140",
|
||||
"c_note_font_glow_base": "0348B124",
|
||||
"c_note_font_glow_max": "0348B120",
|
||||
"c_note_g": "0348B144",
|
||||
"c_note_glow_base": "0348B12C",
|
||||
"c_note_glow_max": "0348B128",
|
||||
"c_note_r": "0348B148",
|
||||
"cfg_dungeon_info_enable": "0348B0EC",
|
||||
"cfg_dungeon_info_mq_enable": "0348B190",
|
||||
"cfg_dungeon_info_mq_need_map": "0348B18C",
|
||||
"cfg_dungeon_info_reward_enable": "0348B0E8",
|
||||
"cfg_dungeon_info_reward_need_altar": "0348B184",
|
||||
"cfg_dungeon_info_reward_need_compass": "0348B188",
|
||||
"cfg_dungeon_is_mq": "0348B1F0",
|
||||
"cfg_dungeon_rewards": "03489EE4",
|
||||
"cfg_file_select_hash": "0348B198",
|
||||
"cfg_item_overrides": "0348B244",
|
||||
"defaultDDHeart": "0348B174",
|
||||
"defaultHeart": "0348B17C",
|
||||
"dpad_sprite": "0348A058",
|
||||
"dummy_actor": "0348B1C8",
|
||||
"dungeon_count": "0348B0F0",
|
||||
"dungeons": "03489F08",
|
||||
"empty_dlist": "0348B108",
|
||||
"extern_ctxt": "03489FA4",
|
||||
"font_sprite": "0348A068",
|
||||
"freecam_modes": "03489C60",
|
||||
"hash_sprites": "0348B0FC",
|
||||
"hash_symbols": "03489FB8",
|
||||
"heap_next": "0348B1EC",
|
||||
"heart_sprite": "03489FF8",
|
||||
"icon_sprites": "03489E24",
|
||||
"item_digit_sprite": "0348A018",
|
||||
"item_overrides_count": "0348B1CC",
|
||||
"item_table": "0348A0E0",
|
||||
"items_sprite": "0348A088",
|
||||
"key_rupee_clock_sprite": "0348A028",
|
||||
"last_fog_distance": "0348B0F4",
|
||||
"linkhead_skull_sprite": "0348A008",
|
||||
"medal_colors": "03489EF4",
|
||||
"medals_sprite": "0348A098",
|
||||
"normal_dd": "0348B164",
|
||||
"normal_no_dd": "0348B16C",
|
||||
"object_slots": "0348C244",
|
||||
"pending_freezes": "0348B1D0",
|
||||
"pending_item_queue": "0348B22C",
|
||||
"quest_items_sprite": "0348A078",
|
||||
"rupee_colors": "03489E30",
|
||||
"satisified_pending_frames": "0348B1A0",
|
||||
"scene_fog_distance": "0348B0F8",
|
||||
"setup_db": "0348A0B8",
|
||||
"song_note_sprite": "0348A038",
|
||||
"stones_sprite": "0348A0A8",
|
||||
"text_cursor_border_base": "0348B114",
|
||||
"text_cursor_border_max": "0348B110",
|
||||
"text_cursor_inner_base": "0348B11C",
|
||||
"text_cursor_inner_max": "0348B118",
|
||||
"triforce_hunt_enabled": "0348B1E0",
|
||||
"triforce_pieces_requied": "0348B182",
|
||||
"triforce_sprite": "0348A048"
|
||||
}
|
Loading…
Reference in New Issue