PVSnesLib
4.3.0
Documentation to code in C or ASM for the Nintendo SNES
|
contains the functions to manage / scroll large background MAP on SNES. More...
#include <snes/snestypes.h>
Go to the source code of this file.
Macros | |
#define | ACT_BURN 0x0020 |
Action type BURN for object. | |
#define | ACT_CLIMB 0x0008 |
Action type CLIMB for object. | |
#define | ACT_DIE 0x0010 |
Action type DIE for object. | |
#define | ACT_FALL 0x0004 |
Action type FALL for object. | |
#define | ACT_JUMP 0x0002 |
Action type JUMP for object. | |
#define | ACT_STAND 0x0000 |
Action type STAND for object. | |
#define | ACT_WALK 0x0001 |
Action type WALK for object. | |
#define | T_EMPTY 0x0000 |
Type Empty (action will be fall) for tile | |
#define | T_FIRES 0x0002 |
Type Fire (action will be burn) for tile | |
#define | T_LADDE 0x0001 |
Type Ladder (action will be climb) for tile | |
#define | T_PLATE 0x0008 |
Type Ground (action will be jump through and land) for tile | |
#define | T_SOLID 0xFF00 |
Type Solid (action is walk only) for tile | |
#define | T_SPIKE 0x0004 |
Type Spike (action will be die) for tile | |
Functions | |
u16 | mapGetMetaTile (u16 xpos, u16 ypos) |
Get metatile value from current map. More... | |
u16 | mapGetMetaTilesProp (u16 xpos, u16 ypos) |
Get metatile property from current map (solid, lad, fire, etc...) More... | |
void | mapLoad (u8 *layer1map, u8 *layertiles, u8 *tilesprop) |
Load map definition into memory. More... | |
void | mapUpdate (void) |
Update map regarding current camera position (must be done once per frame) | |
void | mapUpdateCamera (u16 xpos, u16 ypos) |
Update map camera (must be done once per frame) More... | |
void | mapVblank (void) |
Display map regarding current buffer (must be done once per frame, near Vblank) | |
Variables | |
u16 | bg_L1 [32 *32] |
The buffer to use when updating the whole display on layer 1. | |
u8 | mapupdbuf |
State of buffer update (vert / horiz / all) | |
u16 | y_pos |
Current value of camera in x & y coordinates. | |
contains the functions to manage / scroll large background MAP on SNES.
this can only be use for mode 1
the engine scrolls layer1 in x and y coordinates
layer address is : 6800 for Layer 1
mapGetMetaTile | ( | u16 | xpos, |
u16 | ypos | ||
) |
Get metatile value from current map.
xpos | x coordinate of metatile |
ypos | x coordinate of metatile |
mapGetMetaTilesProp | ( | u16 | xpos, |
u16 | ypos | ||
) |
Get metatile property from current map (solid, lad, fire, etc...)
xpos | x coordinate of metatile |
ypos | x coordinate of metatile |
mapLoad | ( | u8 * | layer1map, |
u8 * | layertiles, | ||
u8 * | tilesprop | ||
) |
Load map definition into memory.
WARNING! Map engine must be used on Background #0.
layer1map | address of map with tiles |
layertiles | address of tiles definition |
tilesprop | address of tiles property definition (blocker, spikes, and so on) |
mapUpdateCamera | ( | u16 | xpos, |
u16 | ypos | ||
) |
Update map camera (must be done once per frame)
xpos | x coordinate of object where we want to focus on |
ypos | x coordinate of object where we want to focus on |