cscg22-gearboy

CSCG 2022 Challenge 'Gearboy'
git clone https://git.sinitax.com/sinitax/cscg22-gearboy
Log | Files | Refs | sfeed.txt

sms_metasprites_hide_spr.s (636B)


      1        .include    "global.s"
      2
      3        .title  "Metasprites"
      4        .module Metasprites
      5
      6        .globl  ___render_shadow_OAM
      7
      8        .area   _CODE
      9
     10; void hide_sprites_range(UINT8 from, UINT8 to) __z88dk_callee __preserves_regs(iyh,iyl);
     11
     12_hide_sprites_range::
     13        pop hl
     14        pop de
     15        push hl
     16
     17        ld  a, d
     18        cp  #(64+1)
     19        ret nc
     20
     21        sub e
     22        ret c
     23        ret z
     24
     25        ld c, a
     26        xor a
     27        ld b, a
     28
     29        ld hl, #___render_shadow_OAM
     30        ld h, (hl)
     31        ld l, e
     32
     33        ld d, h
     34        inc e
     35        ld (hl), #0xC0
     36
     37        dec c
     38        ret z
     39
     40        ldir
     41        ret