Super Mario World: Implement New Game (#1045)

This commit is contained in:
PoryGone
2022-09-29 14:16:59 -04:00
committed by GitHub
parent 885c8d3fcc
commit 13edfa60be
23 changed files with 4923 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ from worlds.sm.Rom import ROM_PLAYER_LIMIT as SM_ROM_PLAYER_LIMIT
from worlds.smz3.Rom import ROM_PLAYER_LIMIT as SMZ3_ROM_PLAYER_LIMIT
import Utils
from CommonClient import CommonContext, server_loop, ClientCommandProcessor, gui_enabled, get_base_parser
from Patch import GAME_ALTTP, GAME_SM, GAME_SMZ3, GAME_DKC3
from Patch import GAME_ALTTP, GAME_SM, GAME_SMZ3, GAME_DKC3, GAME_SMW
snes_logger = logging.getLogger("SNES")
@@ -236,6 +236,10 @@ async def deathlink_kill_player(ctx: Context):
snes_buffered_write(ctx, WRAM_START + 0x0A50, bytes([255])) # deal 255 of damage at next opportunity
if not ctx.death_link_allow_survive:
snes_buffered_write(ctx, WRAM_START + 0x09D6, bytes([0, 0])) # set current reserve to 0
elif ctx.game == GAME_SMW:
from worlds.smw.Client import deathlink_kill_player as smw_deathlink_kill_player
await smw_deathlink_kill_player(ctx)
await snes_flush_writes(ctx)
await asyncio.sleep(1)
@@ -1041,6 +1045,9 @@ async def game_watcher(ctx: Context):
from worlds.dkc3.Client import dkc3_rom_init
init_handled = await dkc3_rom_init(ctx)
if not init_handled:
from worlds.smw.Client import smw_rom_init
init_handled = await smw_rom_init(ctx)
if not init_handled:
game_name = await snes_read(ctx, SM_ROMNAME_START, 5)
if game_name is None:
@@ -1299,6 +1306,9 @@ async def game_watcher(ctx: Context):
elif ctx.game == GAME_DKC3:
from worlds.dkc3.Client import dkc3_game_watcher
await dkc3_game_watcher(ctx)
elif ctx.game == GAME_SMW:
from worlds.smw.Client import smw_game_watcher
await smw_game_watcher(ctx)
async def run_game(romfile):