git.y1.nz

gbdk-2020

GameBoy Development Kit
download: https://git.y1.nz/archives/gbdk.tar.gz
README | Files | Log | Refs | LICENSE

gbdk-lib/libc/targets/z80/sms_metasprites_hide.s

      1         .include    "global.s"
      2 
      3         .title  "Metasprites"
      4         .module Metasprites
      5 
      6         .globl  ___current_metasprite, ___render_shadow_OAM
      7 
      8         .area   _CODE
      9 
     10 
     11 ; void __hide_metasprite(uint8_t id) __z88dk_fastcall __preserves_regs(iyh,iyl);
     12 
     13 ___hide_metasprite::
     14         ld      e, l
     15 
     16         ld      hl, (___current_metasprite)
     17 
     18         ld      bc, #3
     19 
     20         ld      a, (___render_shadow_OAM)
     21         ld      d, a
     22 1$:
     23         ld      a, (hl)
     24         cp      #0x80
     25         ret     z
     26 
     27         ld      a, #0x3F
     28         cp      e
     29         ret     c
     30 
     31         add     hl, bc
     32 
     33         ld      a, #0xC0
     34         ld      (de), a
     35 
     36         inc     e
     37         jp      1$

This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.