- 注册时间
- 2006-1-6
- 最后登录
- 1970-1-1
|
_GRAPH DW $19c0
;_GraphArea DW $1068
; x1,y1,x2,y2,t,m四个坐标点和两个偏移数值
;GraphAddress首地址为170d
GraphAddress:
.DW _GRAPH+$0000,_GRAPH+$0014,_GRAPH+$0028,_GRAPH+$003C,_GRAPH+$0050,_GRAPH+$0064,_GRAPH+$0078,_GRAPH+$008C
.DW _GRAPH+$00A0,_GRAPH+$00B4,_GRAPH+$00C8,_GRAPH+$00DC,_GRAPH+$00F0,_GRAPH+$0104,_GRAPH+$0118,_GRAPH+$012C
.DW _GRAPH+$0140,_GRAPH+$0154,_GRAPH+$0168,_GRAPH+$017C,_GRAPH+$0190,_GRAPH+$01A4,_GRAPH+$01B8,_GRAPH+$01CC
.DW _GRAPH+$01E0,_GRAPH+$01F4,_GRAPH+$0208,_GRAPH+$021C,_GRAPH+$0230,_GRAPH+$0244,_GRAPH+$0258,_GRAPH+$026C
.DW _GRAPH+$0280,_GRAPH+$0294,_GRAPH+$02A8,_GRAPH+$02BC,_GRAPH+$02D0,_GRAPH+$02E4,_GRAPH+$02F8,_GRAPH+$030C
.DW _GRAPH+$0320,_GRAPH+$0334,_GRAPH+$0348,_GRAPH+$035C,_GRAPH+$0370,_GRAPH+$0384,_GRAPH+$0398,_GRAPH+$03AC
.DW _GRAPH+$03C0,_GRAPH+$03D4,_GRAPH+$03E8,_GRAPH+$03FC,_GRAPH+$0410,_GRAPH+$0424,_GRAPH+$0438,_GRAPH+$044C
.DW _GRAPH+$0460,_GRAPH+$0474,_GRAPH+$0488,_GRAPH+$049C,_GRAPH+$04B0,_GRAPH+$04C4,_GRAPH+$04D8,_GRAPH+$04EC
.DW _GRAPH+$0500,_GRAPH+$0514,_GRAPH+$0528,_GRAPH+$053C,_GRAPH+$0550,_GRAPH+$0564,_GRAPH+$0578,_GRAPH+$058C
.DW _GRAPH+$05A0,_GRAPH+$05B4,_GRAPH+$05C8,_GRAPH+$05DC,_GRAPH+$05F0,_GRAPH+$0604,_GRAPH+$0618,_GRAPH+$062C
lda #$68
sta $82
lda #$10
sta $83
lda y1
asl
tax
loop2:pha
ldy x1
lda $170d,x
sta $80
lda $170e,x
sta $81
loop1: ldx #00
lda ($82,x)
inc $82
bne cc
inc $83
cc: sta $17ad,y
iny
cpy x2+1
bne loop1
lda #$00
sta $17ad,y
lda t
sta $84
beq mm
next : clc
php
ldx x1
loop3: plp
ror $17ad,x
php
inx
cpx x2+2
bne loop3
plp
dec $84
bne next
mm:ldy x1
lda $17ad,y
ora ($80),y
sta ($80),y
iny
cpy x2+2
bne loop4
pla
tax
inx
inx
txa
cpx (y2+1)*2
bne loop2
rts
新写的截图函数(其实是贴图的逆写法):
lda #$68
sta $82
lda #$10
sta $83
lda #y1
asl
tax
loop2:pha
ldy#$x1
lda $170d,x
sta $80
lda $170e,x
sta $81
loop1: lda($80),y
sta $17ad,y
iny
cpy #x2+1
bne loop1
lda #t
sta $84
beq pp
next:clc
php
ldx #x2
loop3:plp
rol $17ad,x
php
dex
cpx #x1-1
bne loop3
plp
dec $84
bne next
pp:ldy #x1
ldx #$00
loop4:lda $17ad,y
sta ($82,x)
inc $82
bne cc
inc $83
cc:iny
cpy #x2+1
bne loop4
pla
tax
inx
inx
txa
cpx #(y2+1)*2
bne loop2
rts
;lzjseed作品 |
|