Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- renderDie:
- ld hl,dieValues-1 \ ld b,5
- ld e,$01
- @: inc hl \ ld a,(hl)
- ld c,a
- add a,a
- add a,c
- add a,a
- add a,a
- add a,a
- ld hl,Sprites
- add a,l
- ld l,a
- jr nc,$+3
- inc h
- ld d,$40
- push bc
- call drawSprite_6_Bit
- pop bc
- inc e \ inc e \ djnz {-1@}
- ret
- drawSprite_6_Bit:
- ld a,d \ add a,$79 ; Y coord into A
- ld b,12 ; Loop this 12 times
- drawSprite_outerloop:
- inc a \ push af
- out ($10),a \ call lcdwait
- ld a,e \ add a,$20
- out ($10),a \ call lcdwait ; use outi instead
- ld c,$11
- outi \ call lcdwait
- outi \ call lcdwait
- pop af
- djnz drawSprite_outerloop
- ret
- Sprites:
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ;sprite_OneDie:
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000110,%00010000
- .db %10000110,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ;sprite_TwoDie:
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000110,%00010000
- .db %10000110,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000110,%00010000
- .db %10000110,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ; three die
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10000000,%11010000
- .db %10000000,%11010000
- .db %10000000,%00010000
- .db %10000110,%00010000
- .db %10000110,%00010000
- .db %10000000,%00010000
- .db %10110000,%00010000
- .db %10110000,%00010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ; four die
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10110000,%11010000
- .db %10110000,%11010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10000000,%00010000
- .db %10110000,%11010000
- .db %10110000,%11010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ; five die
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10011001,%10010000
- .db %10011001,%10010000
- .db %10000000,%00010000
- .db %10000110,%00010000
- .db %10000110,%00010000
- .db %10000000,%00010000
- .db %10011001,%10010000
- .db %10011001,%10010000
- .db %10000000,%00010000
- .db %11111111,%11110000
- ; six die
- .db %11111111,%11110000
- .db %10000000,%00010000
- .db %10011001,%10010000
- .db %10011001,%10010000
- .db %10000000,%00010000
- .db %10011001,%10010000
- .db %10011001,%10010000
- .db %10000000,%00010000
- .db %10011001,%10010000
- .db %10011001,%10010000
- .db %10000000,%00010000
- .db %11111111,%11110000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement