X-Git-Url: http://git.mutantstargoat.com/user/nuclear/?a=blobdiff_plain;f=src%2Fsprite.S;h=d258d624929759151b0fe3bb8b8c61127f06601e;hb=8bec66098f3111e4b7c87361fd4142e94dcfeebd;hp=158aaace5b99b8df9c5c670c5bc5b6c93e8d4533;hpb=b789e37efab3baed9def2c1199d1cc5884e06ab5;p=mdlife diff --git a/src/sprite.S b/src/sprite.S index 158aaac..d258d62 100644 --- a/src/sprite.S +++ b/src/sprite.S @@ -8,11 +8,16 @@ .globl spr_submit spr_submit: - move.l spr_count, %d0 - lsl.l #2, %d0 | 4 words per sprite + move.w spr_count, %d0 + tst.w %d0 + bne.s 0f + | if spr_count is zero, upload a single null sprite + addq.w #1, %d0 +0: ext.l %d0 + lsl.w #2, %d0 | 4 words per sprite move.l %d0, -(%sp) pea spr_shadow - pea 0xe000.w | we placed the spirte table at e000 + pea 0xd000.w | we placed the spirte table at d000 jsr dma_systovram addq.l #8, %sp addq.l #4, %sp