gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/libc/targets/sm83/set_spr.s
1 .include "global.s"
2
3 .area _HOME
4
5 ;; Set sprite number C to tile D
6 .set_sprite_tile::
7 LD HL,#_shadow_OAM+2 ; Calculate origin of sprite info
8
9 SLA C ; Multiply C by 4
10 SLA C
11 LD B,#0x00
12 ADD HL,BC
13
14 LD A,D ; Set sprite number
15 LD (HL),A
16 RET
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.