Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- org $0091B4
- autoclean JML main
- freecode
- reset bytes
- main:
- LDA $1425 ;
- BEQ + ;
- JML $8091BD ; ?????????
- +
- draw_level:
- LDX #$04 ;\
- LDY #$00 ; | I have no idea what any of this does
- LDA #$60 : STA $00 ;/
- .loop:
- LDA.l leveltilemap,x : STA $0302,y ; top tile #
- CLC : ADC #$10 : STA $0306,y ; bottom tile #
- LDA #$04 : STA $0303,y : STA $0307,y ; tile properties
- LDA #$60 : STA $0301,y : LDA #$68 : STA $0305,y ; y position
- LDA $00 : CLC : ADC #$08 : STA $00 ; increase x position
- STA $0300,y : STA $0304,y ; use x position
- TYA : CLC : ADC #$08 : TAY ; inc y for next tile
- DEX : BPL .loop ; loop
- get_number:
- LDX $010A ;\ since this is being run before the level number is derived,
- LDA $13BF : BNE + ; | we have to derive it ourselves.
- LDA #$01 ;/ based on $05D84D
- +
- draw_number:
- AND #$0F : TAX ; get level number (???)
- LDA #$A0 : STA $0328 : STA $032C ; x position
- LDA #$60 : STA $0329 : LDA #$68 : STA $032D ; y postion
- LDA.l numbertoptiles,x : STA $032A ; top tile
- LDA.l numberbtmtiles,x : STA $032E ; btm tile
- LDA.l numbertopprops,x : STA $032B ; top props
- LDA.l numberbtmprops,x : STA $032F ; btm props
- do_sizes:
- LDX #$10 ; make sure they're all 8x8 and on screen
- .loop:
- STZ $0460,x ;
- DEX : BPL .loop ;
- ; done!
- return:
- JML $808494 ; ?????????????
- leveltilemap:
- ; bottom tiles are just tile + $10, props are all $04
- db $4E,$4B,$4A,$4B,$4E
- numbertoptiles:
- db $03,$00,$02,$5D,$13,$5B,$02,$5E,$01,$4C
- numbertopprops:
- db $04,$04,$44,$44,$84,$84,$04,$C4,$04,$44
- ; 04 = no change
- ; 44 = x-flip
- ; 84 = y-flip
- ; C4 = xy-flip
- numberbtmtiles:
- db $03,$00,$5D,$5D,$4E,$02,$4C,$4E,$01,$02
- numberbtmprops:
- db $84,$84,$84,$C4,$C4,$C4,$84,$C4,$84,$C4
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement