[A83] Mario Side-Scroller


[Prev][Next][Index][Thread]

[A83] Mario Side-Scroller




If I have a level for a game like mario, how do I display it and then scroll 
it left and right when the right button is pressed.  I used crashman's 
routine demo at first, and I could get it to draw and scroll the level, but I 
couldn't get it to draw the sprites and do the stuff I wanted to happen in 
the mainloop.  Also, how do I make a map over 32 wide?  When I use the 'db' 
statements it says max # of args exceeded.  Thanks
-Cole South

mapbuffer:
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
.DB   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0

map:
 .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ;Row 0
 .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$00 ;Row 1
 .db $00,$00,$00,$00,$00,$00,$08,$00,$00,$00,$00,$00,$00,$00,$00,$00 ;Row 2
 .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$00,$1A,$00,$00,$00,$00,$00 ;Row 3
 .db $00,$00,$00,$00,$00,$00,$00,$00,$00,$1A,$1A,$00,$00,$00,$15,$00 ;Row 4
 .db $00,$00,$00,$17,$1C,$1C,$1C,$1C,$1C,$1C,$1C,$18,$00,$00,$16,$00 ;Row 5
 .db $01,$01,$01,$1B,$1B,$1B,$1B,$1B,$1B,$1B,$1B,$1B,$01,$01,$01,$01 ;Row 6
 .db $02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02,$02 ;Row 7

rMario:
 .db $3C,$48,$44,$38,$54,$6C,$6C,$38

graphic_source:
 ;Tile 0
 .db $00,$00,$00,$00,$00,$00,$00,$00
 ;Tile 1
 .db $FF,$04,$00,$20,$AA,$55,$AA,$55
 ;Tile 2
 .db $55,$AA,$55,$AA,$55,$AA,$55,$AA
 ;Tile 3
 .db $3C,$42,$81,$81,$FF,$6A,$56,$3C
 ;Tile 4
 .db $01,$02,$04,$09,$10,$21,$42,$A5
 ;Tile 5
 .db $80,$40,$20,$90,$08,$84,$42,$A5
 ;Tile 6
 .db $FA,$FD,$FF,$FF,$FF,$FF,$FF,$FF
 ;Tile 7
 .db $5F,$BF,$FF,$FF,$FF,$FF,$FF,$FF
 ;Tile 8
 .db $7E,$DB,$A5,$89,$99,$81,$DB,$7E
 ;Tile 9
 .db $7E,$E7,$DB,$F7,$E7,$FF,$E7,$7E
 ;Tile 10
 .db $18,$24,$4A,$4A,$4A,$42,$24,$18
 ;Tile 11
 .db $00,$00,$FF,$57,$2F,$37,$2F,$37
 ;Tile 12
 .db $00,$00,$FF,$EA,$F4,$EC,$F4,$EC
 ;Tile 13
 .db $2F,$37,$2F,$37,$2F,$37,$2F,$37
 ;Tile 14
 .db $F4,$EC,$F4,$EC,$F4,$EC,$F4,$EC
 ;Tile 15
 .db $F5,$EA,$FF,$FF,$FF,$FF,$FF,$FF
 ;Tile 16
 .db $AF,$57,$FF,$FF,$FF,$FF,$FF,$FF
 ;Tile 17
 .db $3C,$48,$44,$38,$54,$6C,$6C,$38
 ;Tile 18
 .db $3C,$12,$22,$1C,$2A,$36,$36,$1C
 ;Tile 19
 .db $3C,$7E,$DB,$FF,$FF,$7E,$3C,$42
 ;Tile 20
 .db $3C,$7E,$DB,$FF,$FF,$7E,$3C,$24
 ;Tile 21
 .db $00,$3C,$7E,$FF,$FF,$FF,$FF,$FF
 ;Tile 22
 .db $FF,$F9,$F9,$FF,$FF,$FF,$FF,$FF
 ;Tile 23
 .db $7F,$84,$80,$A0,$80,$82,$80,$90
 ;Tile 24
 .db $FE,$21,$01,$05,$01,$41,$01,$09
 ;Tile 25
 .db $FE,$05,$01,$21,$AB,$55,$AB,$55
 ;Tile 26
 .db $2B,$55,$2B,$55,$2B,$55,$2B,$FF
 ;Tile 27
 .db $40,$04,$00,$20,$AA,$55,$AA,$55
 ;Tile 28
 .db $FF,$20,$00,$02,$00,$40,$04,$00
 ;Tile 29
 .db $00,$00,$00,$00,$00,$00,$00,$00
 ;Tile 30
 .db $00,$00,$00,$00,$00,$00,$00,$00
 ;Tile 31
 .db $00,$00,$00,$00,$00,$00,$00,$00
 ;Tile 32
 .db $00,$00,$00,$00,$00,$00,$00,$00