struct WORLD_MAP_VIEW
The world map's perspective view, in the map's heap slot: the followed position, screen shake, view position, window, pitch and yaw, a 32 by 32 grid of tile ids and zoom, then the still image's state and the region tint.
Declared in perspective.h.
Fields
| Name | Description | |
|---|---|---|
Sint32 * | origin | The followed point, as in MAP_STATE. |
Sint32 | shakeX, shakeY, shakeDecay , shakeY, shakeDecay | The screen shake, as in MAP_STATE. |
Uint8 * | script | NULL at load. |
Uint16 | shownLayers | MAP_STATE's flags: REG_DISPCNT bits, BG0 to BG3 and the sprites at load. |
Uint8 | wideTiles | MAP_STATE's wideTiles, 0x80 at load. |
Uint8 | animationsAndBlend [205] | As MAP_STATE: footprints, tileset animations and blend script. |
FIXED | view [2] | The view's top left, x then y, 16.16 fixed-point pixels. |
FIXED | scaleX | 32 in 16.16 at load. |
FIXED | scaleY | 64 in 16.16 at load. |
FIXED | limitX | 16352 in 16.16 at load. |
FIXED | limitY | 16352 in 16.16 at load. |
Uint8 | unusedAfterLimitY [4] | No code names it. |
Sint8 | animationActive | Set by |
Uint8 | unused [3] | fdWorldMapStartStillImage while BG1 shows the drawn map; the tileset animations are then neither suspended nor resumed. |
Uint16 | windowTop | Screen rows, 0 and 159 at load |
Uint16 | windowBottom | and 200 and 255 from fdWorldMapStartStillImage; each tick copies them to shownTop and shownBottom and picks BG mode 2 or 0 from them. |
Uint16 | shownTop | windowTop as the tick update last applied it. |
Uint16 | shownBottom | windowBottom as the tick update last applied it. |
Uint16 | windowPending | Cleared by the tick update; not |
Uint8 | unusedAfterWindow [6] | set by name. |
void * | tiles | The world map's tile offsets |
Uint8 | unusedAfterTiles [4] | (ResourceIdPerspectiveDataA), each tile LZ-compressed. |
Uint16 | pitch | 1/65536 turns. |
Uint16 | yaw | 1/65536 turns. |
const Uint32 * | resources | A row of |
Uint8 | unusedAfterResources [36] | WorldMapGraphicsResources, by the region the party is in. |
Uint16 | tileIds [32 * 32] | The world map tile in each of 32 by 32 metatiles. |
Uint16 | quarterTiles [8] | The tile each quarter of each layer's block buffer shows, so an unchanged quarter is not decoded again. |
Sint32 | reloadSteps | Steps left of reloading the area's graphics after the region changed, one a tick from 12 (fdWorldMapPreloadCurrentTileBlock). |
Sint32 | farPlane | 510 pixels at load. |
Sint32 | distance | farPlane scaled by the zoom. |
Sint32 | prevZoom | The zoom a transition starts from. |
FIXED | zoom | 16.16 fixed point, toFIXED(1) full size. |
Uint16 | zoomTransitionFrame | A zoom transition's length; 0 when none. |
Sint16 | zoomTransitionStep | Ticks of the transition done. |
Sint8 | tileBufUsed | Set when a field Psynergy cast on the World Map has used the second half of the BG tile buffer; the still image then decodes it again. |
Sint8 | stillImageShown | Set while BG1 shows the still image: the view then only shakes BG1. |
Sint8 | viewHeld | Set while the view is held for the still image or the map screen: no tile is preloaded, and without a shake the tick does nothing. |
Sint8 | tintRegion | The encounter region the tint was chosen for. |
Sint8 | tint | Brightness steps, darker when negative. |
Sint8 | tintTarget | The tint the region asks for. |
Sint8 | fixedEye | Set: the tick update leaves the eye where it is. |
Description
The world map's perspective view, in the map's heap slot: the followed position, screen shake, view position, window, pitch and yaw, a 32 by 32 grid of tile ids and zoom, then the still image's state and the region tint.
struct WORLD_MAP_VIEW
Referenced by fdActorFlyOnWorldMap(), fdActorMoveAsSandOnWorldMap(), fdActorMoveOnWorldMap(), fdActorSailOnWorldMap(), fdMapScreenShow(), fdPsynergyMarkWorldMapTilesUsed(), fdWorldMapApplyAffinePage(), fdWorldMapInitPerspective(), fdWorldMapLoadAreaGraphics(), fdWorldMapLoadDefaultMetatilesAndUpdateBlock(), fdWorldMapLoadGraphics(), fdWorldMapPreloadCurrentTileBlock(), fdWorldMapSetWindowMetatileTile(), fdWorldMapSetWindowMetatileTileAndDraw(), fdWorldMapStartStillImage(), fdWorldMapStepZoom(), fdWorldMapUpdateCurrentTileBlock(), fdWorldMapUpdateRegionTint(), fdWorldMapUpdateView(), fdWorldMapWriteLayerMetatileTile(), scStaffCreditShowBeacon(), scTileSpriteReset(), scWorldMapDriftNorthOfContinent(), scWorldMapSetIslandTile() and scWorldMapSetPlacedActorTile().
Definition at line 13 of file perspective.h.
Fields in detail
origin
Sint32 *origin
The followed point, as in
MAP_STATE.
shakeX, shakeY, shakeDecay
Sint32 shakeX, shakeY, shakeDecay
The screen shake, as in
MAP_STATE.
script
Uint8 *script
NULL at load.
shownLayers
Uint16 shownLayers
MAP_STATE's flags: REG_DISPCNT
bits, BG0 to BG3 and the
sprites at load.
wideTiles
Uint8 wideTiles
MAP_STATE's wideTiles, 0x80 at
load.
animationsAndBlend
Uint8 animationsAndBlend[205]
As MAP_STATE: footprints,
tileset animations and blend
script.
view
FIXED view[2]
The view's top left, x then y, 16.16 fixed-point pixels.
scaleX
FIXED scaleX
32 in 16.16 at load.
scaleY
FIXED scaleY
64 in 16.16 at load.
limitX
FIXED limitX
16352 in 16.16 at load.
limitY
FIXED limitY
16352 in 16.16 at load.
unusedAfterLimitY
Uint8 unusedAfterLimitY[4]
No code names it.
animationActive
Sint8 animationActive
Set by
unused
Uint8 unused[3]
fdWorldMapStartStillImage while
BG1 shows the drawn map; the
tileset animations are then
neither suspended nor resumed.
windowTop
Uint16 windowTop
Screen rows, 0 and 159 at load
windowBottom
Uint16 windowBottom
and 200 and 255 from
fdWorldMapStartStillImage; each
tick copies them to shownTop
and shownBottom and picks BG
mode 2 or 0 from them.
shownTop
Uint16 shownTop
windowTop as the tick update last applied it.
shownBottom
Uint16 shownBottom
windowBottom as the tick update last applied it.
windowPending
Uint16 windowPending
Cleared by the tick update; not
unusedAfterWindow
Uint8 unusedAfterWindow[6]
set by name.
tiles
void *tiles
The world map's tile offsets
unusedAfterTiles
Uint8 unusedAfterTiles[4]
(ResourceIdPerspectiveDataA),
each tile LZ-compressed.
pitch
Uint16 pitch
1/65536 turns.
yaw
Uint16 yaw
1/65536 turns.
resources
const Uint32 *resources
A row of
unusedAfterResources
Uint8 unusedAfterResources[36]
WorldMapGraphicsResources, by
the region the party is in.
tileIds
Uint16 tileIds[32 * 32]
The world map tile in each of 32 by 32 metatiles.
quarterTiles
Uint16 quarterTiles[8]
The tile each quarter of each layer's block buffer shows, so an unchanged quarter is not decoded again.
reloadSteps
Sint32 reloadSteps
Steps left of reloading the area's
graphics after the region changed, one
a tick from 12
(fdWorldMapPreloadCurrentTileBlock).
farPlane
Sint32 farPlane
510 pixels at load.
distance
Sint32 distance
farPlane scaled by the zoom.
prevZoom
Sint32 prevZoom
The zoom a transition starts from.
zoom
FIXED zoom
16.16 fixed point, toFIXED(1) full
size.
zoomTransitionFrame
Uint16 zoomTransitionFrame
A zoom transition's length; 0 when none.
zoomTransitionStep
Sint16 zoomTransitionStep
Ticks of the transition done.
tileBufUsed
Sint8 tileBufUsed
Set when a field Psynergy cast on the World Map has used the second half of the BG tile buffer; the still image then decodes it again.
stillImageShown
Sint8 stillImageShown
Set while BG1 shows the still image: the view then only shakes BG1.
viewHeld
Sint8 viewHeld
Set while the view is held for the still image or the map screen: no tile is preloaded, and without a shake the tick does nothing.
tintRegion
Sint8 tintRegion
The encounter region the tint was chosen for.
tint
Sint8 tint
Brightness steps, darker when negative.
tintTarget
Sint8 tintTarget
The tint the region asks for.
fixedEye
Sint8 fixedEye
Set: the tick update leaves the eye where it is.