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: player_location macro [Commit 4] (#40)
This commit is contained in:
@@ -854,6 +854,12 @@ QueueFollowerFirstStep:
|
||||
scf
|
||||
ret
|
||||
|
||||
PositionAllPlayerObjectsExceptCurrent:
|
||||
; called by MAPSETUP_NEXTPLAYER
|
||||
; calls RepositionMockedPlayerObject for each player according to wNumLevelPlayers,
|
||||
; except for the player at wCurTurnPlayer.
|
||||
ret
|
||||
|
||||
RepositionMockedPlayerObject::
|
||||
; map setup command called by map setup script MAPSETUP_CONNECTION after LoadBlockData,
|
||||
; once the new map blocks have been loaded to wOverworldMapBlocks.
|
||||
@@ -929,12 +935,8 @@ RepositionMockedPlayerObject::
|
||||
ld [wMockingWhichPlayer], a
|
||||
jr MockPlayerObject.loaded_player_mock_coords
|
||||
|
||||
MockAllPlayerObjectsExceptCurrent:
|
||||
; calls MockPlayerObject_Multiplayer for each player according to wNumLevelPlayers,
|
||||
; except for the player at wCurTurnPlayer.
|
||||
ret
|
||||
|
||||
MockPlayerObject_Multiplayer::
|
||||
; input: a: value to write into wMockingWhichPlayer
|
||||
maskbits MAX_PLAYERS
|
||||
ld [wMockingWhichPlayer], a
|
||||
; ld a, [wMockingWhichPlayer]
|
||||
|
||||
@@ -6,7 +6,7 @@ EnterMapSpawnPoint:
|
||||
push de
|
||||
ld a, [wDefaultSpawnpoint]
|
||||
cp SPAWN_N_A
|
||||
jr z, .done
|
||||
jr z, .spawn_n_a
|
||||
cp SPAWN_FROM_RAM
|
||||
jr z, .spawn_from_ram
|
||||
ld l, a
|
||||
@@ -32,31 +32,25 @@ EnterMapSpawnPoint:
|
||||
cp MAPSETUP_EXITVIEWMAP
|
||||
jr nz, .not_exit_view_map
|
||||
; exiting from View Map mode
|
||||
ld a, [wBeforeViewMapMapGroup]
|
||||
ld [wMapGroup], a
|
||||
ld a, [wBeforeViewMapMapNumber]
|
||||
ld [wMapNumber], a
|
||||
ld a, [wBeforeViewMapYCoord]
|
||||
ld [wYCoord], a
|
||||
ld a, [wBeforeViewMapXCoord]
|
||||
ld [wXCoord], a
|
||||
jr .done
|
||||
ld hl, wBeforeViewMapLocation
|
||||
jr .copy
|
||||
.not_exit_view_map
|
||||
; "moving camera" to next turn player
|
||||
ld a, [wCurTurnPlayer]
|
||||
ld hl, wPlayer1MapGroup
|
||||
ld bc, wPlayer2MapGroup - wPlayer1MapGroup
|
||||
call AddNTimes
|
||||
.copy
|
||||
ld a, [hli]
|
||||
ld [wMapGroup], a
|
||||
ld a, [hli]
|
||||
ld [wMapNumber], a
|
||||
ld a, [hli]
|
||||
ld [wXCoord], a
|
||||
ld a, [hl]
|
||||
ld [wYCoord], a
|
||||
ld a, [hl]
|
||||
ld [wXCoord], a
|
||||
|
||||
.done
|
||||
.spawn_n_a
|
||||
pop de
|
||||
pop hl
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user