gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/examples/gb/apa_image/Readme.md
1
2 ### Displaying an image with more than 256 tiles in APA mode.
3
4 This example shows how to use APA graphics mode and png2asset to convert and display an image with more than 256 tiles. The image should be in PNG format with 4 colors at 160 x 144.
5
6 This sample project can be used to make a minimal program which displays a logo
7
8 The image is displayed with:
9 `draw_image();`
10
11 This call will automatically switch to APA graphics mode and install it's start and mid-frame ISRs which switch the tile source, enabling it to display more than 256 tiles. The screen hardware map is configured such that each tile used is unique, and indexed sequentially from left-to-right, top-to-bottom (20 x 18 = 360 tiles total).
12
13 png2asset is called with these values in order to produce a compatible image:
14 - `keep_duplicate_tiles` : Don't remove duplicate tiles (required for APA bitmap image display)
15 - `map` : Use "map style" output, not metasprite
16 - `tiles_only` : Only keep tiles, no map (since APA mode expects tiles in linear order)
17 - `bpp 2` : Use 2bpp output
18
19
20 Pixel art originally by RodrixAP under Creative Commons Attribution 2.0 Generic (CC BY 2.0)
21
22 https://www.flickr.com/photos/rodrixap/10591266994/in/album-72157637154901153/
23
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.