Video - itIsBrando/GBzLib GitHub Wiki
video.asm
contains routines for the background and window.
List of routines:
bg_fill
- Creates a filled rectangle background from (x, y) to (x+w, y+h) with a tile
Parameters: A
-tile, L
-x, H
-y, B
-width, C
-height
Destroys: All
bg_draw_tiles
- Draw tiles in a rectangular pattern onto the screen, based on the tiles pointed by
DE
.
Parameters: H
- screen X, L
- screen Y, B
- width, C
- height, DE
- pointer to tile data
Destroys: All
bg_init
- Initializes LCD registers. Enables window, background, and sprites
- Initializes sprite & background palettes
Parameters: None
Destroys: A
, HL
bg_load_tiles
- Loads tiles into VRAM
Parameters: A
-tile number, B
-number of tiles to load, DE
-pointer to tile data
Destroys: AF
, BC
, D
, HL
bg_move
- Scrolls the background to (x, y)
Parameters: H
-x, L
-y
Destroys: A
memcpy_vram
- Block copy of data from/to VRAM.
Parameters: HL
-source pointer, DE
-destination pointer, BC
-size
Destroys: All
vid_vram_readable
- Inefficiently waits for VRAM to be accessible.
Parameters: None
Destroys: AF