You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-12-11 05:02:16 -08:00
Multiplayer engine: reload mocked players in several map setups [Commit 12] (#40)
This commit is contained in:
@@ -58,5 +58,5 @@ MapSetupCommands:
|
||||
add_mapsetup LoadDisabledSpaces ; 33
|
||||
add_mapsetup MapCallbackAtEndMapSetup ; 34
|
||||
add_mapsetup RepositionMockedPlayerObjects_Connection ; 35
|
||||
add_mapsetup RepositionMockedPlayerObjects_NextPlayer ; 36
|
||||
add_mapsetup RepositionMockedPlayerObjects_NonTurnPlayers ; 36
|
||||
add_mapsetup InitializeAllPlayersSpawnPoints ; 37
|
||||
|
||||
@@ -68,6 +68,7 @@ MapSetupScript_Warp:
|
||||
mapsetup GetMapScreenCoords
|
||||
mapsetup LoadBlockData
|
||||
mapsetup LoadDisabledSpaces
|
||||
mapsetup RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
mapsetup BufferScreen
|
||||
mapsetup LoadMapGraphics
|
||||
mapsetup LoadMapTimeOfDay
|
||||
@@ -120,6 +121,7 @@ MapSetupScript_Train:
|
||||
mapsetup RefreshPlayerCoords
|
||||
mapsetup LoadBlockData
|
||||
mapsetup LoadDisabledSpaces
|
||||
mapsetup RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
mapsetup BufferScreen
|
||||
mapsetup DisableLCD
|
||||
mapsetup LoadMapGraphics
|
||||
@@ -154,7 +156,7 @@ MapSetupScript_NextPlayer:
|
||||
mapsetup GetMapScreenCoords
|
||||
mapsetup LoadBlockData
|
||||
mapsetup LoadDisabledSpaces
|
||||
mapsetup RepositionMockedPlayerObjects_NextPlayer
|
||||
mapsetup RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
mapsetup BufferScreen
|
||||
mapsetup LoadMapGraphics
|
||||
mapsetup LoadMapTimeOfDay
|
||||
@@ -201,6 +203,7 @@ MapSetupScript_ExitViewMap:
|
||||
mapsetup GetMapScreenCoords
|
||||
mapsetup LoadBlockData
|
||||
mapsetup LoadDisabledSpaces
|
||||
mapsetup RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
mapsetup BufferScreen
|
||||
mapsetup LoadMapGraphics
|
||||
mapsetup LoadMapTimeOfDay
|
||||
|
||||
@@ -161,11 +161,11 @@ StartMap:
|
||||
ld hl, wPlayer1Character
|
||||
ld a, [wPlayerGender] ; PLAYER_DEFAULT_MALE or PLAYER_DEFAULT_FEMALE
|
||||
ld [hli], a ; wPlayer1Character
|
||||
ld a, PLAYER_YOUNGSTER_1
|
||||
ld [hli], a ; wPlayer2Character
|
||||
ld a, PLAYER_YOUNGSTER_3
|
||||
ld [hli], a ; wPlayer3Character
|
||||
ld a, PLAYER_BUG_CATCHER_1
|
||||
ld [hli], a ; wPlayer2Character
|
||||
ld a, PLAYER_YOUNGSTER_1
|
||||
ld [hli], a ; wPlayer3Character
|
||||
ld a, PLAYER_YOUNGSTER_3
|
||||
ld [hl], a ; wPlayer4Character
|
||||
|
||||
; initialize board state
|
||||
|
||||
@@ -847,8 +847,8 @@ QueueFollowerFirstStep:
|
||||
scf
|
||||
ret
|
||||
|
||||
RepositionMockedPlayerObjects_NextPlayer:
|
||||
; map setup command called by MAPSETUP_NEXTPLAYER after LoadBlockData,
|
||||
RepositionMockedPlayerObjects_NonTurnPlayers:
|
||||
; map setup command called by MAPSETUP_NEXTPLAYER, etc. after LoadBlockData,
|
||||
; once the new map blocks have been loaded to wOverworldMapBlocks.
|
||||
; position all players according to wNumLevelPlayers, except for the player at wCurTurnPlayer (which isn't being mocked).
|
||||
ld a, [wNumLevelPlayers]
|
||||
@@ -874,10 +874,10 @@ RepositionMockedPlayerObjects_Connection::
|
||||
; position all players according to wNumLevelPlayers.
|
||||
; Otherwise:
|
||||
; position all players according to wNumLevelPlayers, except for the player at wCurTurnPlayer (which isn't being mocked).
|
||||
; this mode is the same as RepositionMockedPlayerObjects_NextPlayer
|
||||
; this mode is the same as RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
ldh a, [hCurBoardEvent]
|
||||
cp BOARDEVENT_VIEW_MAP_MODE
|
||||
jr nz, RepositionMockedPlayerObjects_NextPlayer
|
||||
jr nz, RepositionMockedPlayerObjects_NonTurnPlayers
|
||||
ld a, [wNumLevelPlayers]
|
||||
.loop
|
||||
dec a
|
||||
|
||||
Reference in New Issue
Block a user