Discussion about software development for the old-school Gameboys, ranging from the "Gray brick" to Gameboy Color
(Launched in 2008)
You are not logged in.
How to do you unload a background and then reload a new one.
Last edited by BuffaloBingo (2022-08-20 00:11:50)
Offline
You don't "unload" a background, you just change it.
You need two things for a background: tile data and map data. The tile data are the individual tiles for the background, and the map data is where they go in the background. Once you've figured out that, (in C) you do this:
set_bkg_tiles(0, 0, 20, 20, your_map_data); set_bkg_data(0x00, 0x1a, your_tile_data);
With 1A being the amount of tiles in the tile data (in hexadecimal).
Offline
Here is a helpful link to turn an image into a Game Boy background.
http://chrisantonellis.github.io/gbtdg/
Offline