home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Commodore Disk User Volume 1 #3
/
Commodore_Disk_User_Vol.1_3_1988_-.d64
/
levels
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
78 lines
0 poke53280,0:poke53281,0:print"[147][158]"
1 print"this program is for viewing
2 [153]"it will not run, so get
3 print" to"
4 print"list 10-[145][145][145]"
5 end
6 :
7 :
8 :
9 :
10 locations:
11 :
12 :
20 :
30 :
40 block number = screen block counter
50 level = game level * 2
60 level table = starts of level maps
70 table = start of current map
80 blocks = block definition locations
90 curblock = current block
100 scrloc = table of screen positions
110 screen = current screen location
120 :
130 :
140 :
150 generalised routine:
160 :
170 :
1000 lda #$3d
1010 sta block number
1020 ldy level
1030 lda level table,y
1040 sta table
1050 iny
1060 lda level table,y
1070 sta table+1
1080 dec block number
1090 bmi program
1100 clc
1110 lda block number
1120 asl
1130 tay
1140 lda screen loc,y
1150 sta screen
1160 iny
1170 lda screen loc+1,y
1180 sta screen+1
1190 ldy block number
1200 ldy table,y
1210 asl
1220 tay
1230 lda blocks,y
1240 sta curblock
1250 iny
1260 lda blocks,y
1270 sta curblock+1
1280 ldx #$04
1290 ldy #$04
1300 lda curblock,y
1310 sta screen,y
1320 dey
1330 bne line 1300
1340 dex
1350 beq line 1080
1360 clc
1370 lda curblock+1
1380 adc #$28
1390 bcc line 1420
1400 inc curblock
1410 clc
1420 lda screen+1
1430 adc #$28
1440 bcc line 1460
1450 inc screen
1460 jmp line 1290
1470 rem"list10-