cscg22-gearboy

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

msx_metasprites_hide_spr.s (631B)


      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  #(32+1)
     19        ret nc
     20
     21        sub e
     22        ret c
     23        ret z
     24        ld b, a
     25
     26        ld a, e
     27        add a
     28        add a
     29        ld l, a
     30
     31        ld a, (___render_shadow_OAM)
     32        ld h, a
     33        ld de, #4
     341$:
     35        ld (hl), #0xC0
     36        add hl, de
     37        djnz 1$
     38
     39        ret