Forgot the non-debug version...
This commit is contained in:
parent
0f862353a9
commit
2345e18077
|
@ -1,309 +1,309 @@
|
||||||
Dim scrAddrCache(25) as WORD @loc_scrAddrCache ' 0 -> 24
|
Dim scrAddrCache(25) as WORD @loc_scrAddrCache ' 0 -> 24
|
||||||
loc_scrAddrCache:
|
loc_scrAddrCache:
|
||||||
DATA AS WORD 1024, 1064, 1104, 1144, 1184, 1224, 1264, 1304, 1344, 1384
|
DATA AS WORD 1024, 1064, 1104, 1144, 1184, 1224, 1264, 1304, 1344, 1384
|
||||||
DATA AS WORD 1424, 1464, 1504, 1544, 1584, 1624, 1664, 1704, 1744, 1784
|
DATA AS WORD 1424, 1464, 1504, 1544, 1584, 1624, 1664, 1704, 1744, 1784
|
||||||
DATA AS WORD 1824, 1864, 1904, 1944, 1984
|
DATA AS WORD 1824, 1864, 1904, 1944, 1984
|
||||||
|
|
||||||
poke 53280, 13 : poke 53281, 13
|
poke 53280, 13 : poke 53281, 13
|
||||||
sys $E544 FAST ' clear screen
|
sys $E544 FAST ' clear screen
|
||||||
poke 646, 0 'black chars
|
poke 646, 0 'black chars
|
||||||
locate 0, 24
|
locate 0, 24
|
||||||
|
|
||||||
dim charset_array(2048) as BYTE @LOC_charset_addr
|
dim charset_array(2048) as BYTE @LOC_charset_addr
|
||||||
memcpy @charset_array, $3800, 2048
|
memcpy @charset_array, $3800, 2048
|
||||||
poke $D018, 31 'final character location: $3800
|
poke $D018, 31 'final character location: $3800
|
||||||
|
|
||||||
PRINT " **************"
|
PRINT " **************"
|
||||||
PRINT " * superchase *"
|
PRINT " * superchase *"
|
||||||
PRINT " **************"
|
PRINT " **************"
|
||||||
PRINT "{13}{13}{13}{13} use the arrow keys to move."
|
PRINT "{13}{13}{13}{13} use the arrow keys to move."
|
||||||
PRINT "{13}{13} try to gather as many"
|
PRINT "{13}{13} try to gather as many"
|
||||||
PRINT "{13} treasures ({160}) in the maze"
|
PRINT "{13} treasures ({160}) in the maze"
|
||||||
PRINT "{13} as possible before the"
|
PRINT "{13} as possible before the"
|
||||||
PRINT "{13} enemy catches you!"
|
PRINT "{13} enemy catches you!"
|
||||||
|
|
||||||
PRINT "{13}{13}{13} press any key to begin";
|
PRINT "{13}{13}{13} press any key to begin";
|
||||||
|
|
||||||
poke 198, 0 : wait 198, 1 : poke 198, 0
|
poke 198, 0 : wait 198, 1 : poke 198, 0
|
||||||
|
|
||||||
line300:
|
line300:
|
||||||
SC = 0
|
SC = 0
|
||||||
LV = 1
|
LV = 1
|
||||||
Dim FL as BYTE : FL = 0
|
Dim FL as BYTE : FL = 0
|
||||||
Dim CX as INT : CX = 0
|
Dim CX as INT : CX = 0
|
||||||
Dim CY as INT : CY = 0
|
Dim CY as INT : CY = 0
|
||||||
Dim CCX as INT : CCX = 0
|
Dim CCX as INT : CCX = 0
|
||||||
Dim CCY as INT : CCY = 0
|
Dim CCY as INT : CCY = 0
|
||||||
Dim G as BYTE : G = 0
|
Dim G as BYTE : G = 0
|
||||||
Dim tryAgain$ as STRING * 1
|
Dim tryAgain$ as STRING * 1
|
||||||
|
|
||||||
line320:
|
line320:
|
||||||
sys $E544 FAST ' clear screen
|
sys $E544 FAST ' clear screen
|
||||||
poke 53280, 5 ' green
|
poke 53280, 5 ' green
|
||||||
poke 53281, 7 'yellow
|
poke 53281, 7 'yellow
|
||||||
|
|
||||||
memset $0400, 1000, 104 'reverse space
|
memset $0400, 1000, 104 'reverse space
|
||||||
memset $D800, 1000, 6 'blue
|
memset $D800, 1000, 6 'blue
|
||||||
|
|
||||||
Randomize TI()
|
Randomize TI()
|
||||||
|
|
||||||
For I AS BYTE = 1 to 65
|
For I AS BYTE = 1 to 65
|
||||||
X = 2 * (CBYTE(9*RND())) + 4
|
X = 2 * (CBYTE(9*RND())) + 4
|
||||||
Y = 2 * (CBYTE(11*RND())) + 4
|
Y = 2 * (CBYTE(11*RND())) + 4
|
||||||
TEXTAT Y, X, "{176}{176}{176}{176}{176}"
|
TEXTAT Y, X, "{176}{176}{176}{176}{176}"
|
||||||
Next I
|
Next I
|
||||||
|
|
||||||
For I AS BYTE = 1 to 60
|
For I AS BYTE = 1 to 60
|
||||||
X = 2 * (CBYTE(7*RND())) + 4
|
X = 2 * (CBYTE(7*RND())) + 4
|
||||||
Y = 2 * (CBYTE(13*RND())) + 4
|
Y = 2 * (CBYTE(13*RND())) + 4
|
||||||
CHARAT Y, X , 112
|
CHARAT Y, X , 112
|
||||||
CHARAT Y, X + 1, 112
|
CHARAT Y, X + 1, 112
|
||||||
CHARAT Y, X + 2, 112
|
CHARAT Y, X + 2, 112
|
||||||
CHARAT Y, X + 3, 112
|
CHARAT Y, X + 3, 112
|
||||||
CHARAT Y, X + 4, 112
|
CHARAT Y, X + 4, 112
|
||||||
Next I
|
Next I
|
||||||
|
|
||||||
TEXTAT 4, 4, "{176}{176}{176}{176}{176}"
|
TEXTAT 4, 4, "{176}{176}{176}{176}{176}"
|
||||||
CHARAT 4, 5, 112
|
CHARAT 4, 5, 112
|
||||||
CHARAT 4, 6, 112
|
CHARAT 4, 6, 112
|
||||||
CHARAT 4, 7, 112
|
CHARAT 4, 7, 112
|
||||||
CHARAT 4, 8, 112
|
CHARAT 4, 8, 112
|
||||||
|
|
||||||
For I AS BYTE = 1 to 80
|
For I AS BYTE = 1 to 80
|
||||||
X = 2 * (CBYTE(9*RND())) + 4
|
X = 2 * (CBYTE(9*RND())) + 4
|
||||||
Y = 2 * (CBYTE(13*RND())) + 4
|
Y = 2 * (CBYTE(13*RND())) + 4
|
||||||
CHARAT Y, X, 96, 4 ' 4 = magenta
|
CHARAT Y, X, 96, 4 ' 4 = magenta
|
||||||
Next I
|
Next I
|
||||||
|
|
||||||
TEXTAT 3, 23, "score:", 0 'black
|
TEXTAT 3, 23, "score:", 0 'black
|
||||||
|
|
||||||
'****************************************************************************
|
'****************************************************************************
|
||||||
|
|
||||||
T = 0 ' treasures collected
|
T = 0 ' treasures collected
|
||||||
|
|
||||||
IF LV = 8 Then LV = 7
|
IF LV = 8 Then LV = 7
|
||||||
|
|
||||||
A = 4
|
A = 4
|
||||||
B = 4
|
B = 4
|
||||||
C = 4
|
C = 4
|
||||||
D = 4
|
D = 4
|
||||||
PG = 112
|
PG = 112
|
||||||
|
|
||||||
'****************************************************************************
|
'****************************************************************************
|
||||||
|
|
||||||
line670:
|
line670:
|
||||||
CHARAT B, A, 120, 2 ' 2 = Red
|
CHARAT B, A, 120, 2 ' 2 = Red
|
||||||
|
|
||||||
IF T < 8-LV THEN goto line1410
|
IF T < 8-LV THEN goto line1410
|
||||||
|
|
||||||
IF FL = 0 THEN goto line740
|
IF FL = 0 THEN goto line740
|
||||||
|
|
||||||
IF (FL AND 1) = 0 THEN Goto line1140
|
IF (FL AND 1) = 0 THEN Goto line1140
|
||||||
|
|
||||||
CCX = CX
|
CCX = CX
|
||||||
CCY = CY
|
CCY = CY
|
||||||
FL = 0
|
FL = 0
|
||||||
|
|
||||||
line740: '"PRIVILEGED" CHECK -------------------------------------------------
|
line740: '"PRIVILEGED" CHECK -------------------------------------------------
|
||||||
GC = peek(scrAddrCache(C + 1) + D)
|
GC = peek(scrAddrCache(C + 1) + D)
|
||||||
IF GC = 120 THEN goto line1760
|
IF GC = 120 THEN goto line1760
|
||||||
IF GC = 104 THEN goto line810
|
IF GC = 104 THEN goto line810
|
||||||
IF GC <> 128 THEN goto line810
|
IF GC <> 128 THEN goto line810
|
||||||
CX = 1
|
CX = 1
|
||||||
CY = 0
|
CY = 0
|
||||||
GOTO line1340
|
GOTO line1340
|
||||||
|
|
||||||
line810:
|
line810:
|
||||||
GC = peek(scrAddrCache(C) + D + 1)
|
GC = peek(scrAddrCache(C) + D + 1)
|
||||||
IF GC = 120 THEN goto line1760
|
IF GC = 120 THEN goto line1760
|
||||||
IF GC = 104 THEN goto line880
|
IF GC = 104 THEN goto line880
|
||||||
IF GC <> 128 THEN goto line880
|
IF GC <> 128 THEN goto line880
|
||||||
CX = 0
|
CX = 0
|
||||||
CY = 1
|
CY = 1
|
||||||
GOTO line1340
|
GOTO line1340
|
||||||
|
|
||||||
line880:
|
line880:
|
||||||
GC = peek(scrAddrCache(C - 1) + D)
|
GC = peek(scrAddrCache(C - 1) + D)
|
||||||
IF GC = 120 THEN goto line1760
|
IF GC = 120 THEN goto line1760
|
||||||
IF GC = 104 THEN goto line950
|
IF GC = 104 THEN goto line950
|
||||||
IF GC <> 128 THEN goto line950
|
IF GC <> 128 THEN goto line950
|
||||||
CX = -1
|
CX = -1
|
||||||
CY = 0
|
CY = 0
|
||||||
GOTO line1340
|
GOTO line1340
|
||||||
|
|
||||||
line950:
|
line950:
|
||||||
GC = peek(scrAddrCache(C) + D - 1)
|
GC = peek(scrAddrCache(C) + D - 1)
|
||||||
IF GC = 120 THEN goto line1760
|
IF GC = 120 THEN goto line1760
|
||||||
IF GC = 128 THEN goto line1320
|
IF GC = 128 THEN goto line1320
|
||||||
IF GC = 112 THEN goto line1320
|
IF GC = 112 THEN goto line1320
|
||||||
|
|
||||||
FL = FL + 1
|
FL = FL + 1
|
||||||
IF (FL AND 1) = 0 then goto line1040
|
IF (FL AND 1) = 0 then goto line1040
|
||||||
|
|
||||||
CX = CCX
|
CX = CCX
|
||||||
CY = CCY
|
CY = CCY
|
||||||
GOTO line1160
|
GOTO line1160
|
||||||
|
|
||||||
line1040: '-----------CHECK USING SGN - ***NEVER EXECUTES!!***
|
line1040: '-----------CHECK USING SGN - ***NEVER EXECUTES!!***
|
||||||
CX = SGN(A - C)
|
CX = SGN(A - C)
|
||||||
CY = 0
|
CY = 0
|
||||||
IF CX <> 0 THEN goto line1080
|
IF CX <> 0 THEN goto line1080
|
||||||
CY = SGN(D - B)
|
CY = SGN(D - B)
|
||||||
|
|
||||||
line1080:
|
line1080:
|
||||||
GC = peek(scrAddrCache(C + CX) + D + CY)
|
GC = peek(scrAddrCache(C + CX) + D + CY)
|
||||||
IF GC = 104 THEN goto line1110
|
IF GC = 104 THEN goto line1110
|
||||||
IF (GC = 96) OR (GC = 112) THEN goto line1340
|
IF (GC = 96) OR (GC = 112) THEN goto line1340
|
||||||
|
|
||||||
line1110:
|
line1110:
|
||||||
CX = -1
|
CX = -1
|
||||||
CY = 0
|
CY = 0
|
||||||
GOTO line1160
|
GOTO line1160
|
||||||
|
|
||||||
line1140:
|
line1140:
|
||||||
FL = FL + 1
|
FL = FL + 1
|
||||||
IF FL > 1 THEN goto line1300
|
IF FL > 1 THEN goto line1300
|
||||||
|
|
||||||
line1160: '---------------"RELAXED" CHECK
|
line1160: '---------------"RELAXED" CHECK
|
||||||
GC = peek(scrAddrCache(C + CX) + D + CY)
|
GC = peek(scrAddrCache(C + CX) + D + CY)
|
||||||
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
||||||
|
|
||||||
CX = 1
|
CX = 1
|
||||||
CY = 0
|
CY = 0
|
||||||
GC = peek(scrAddrCache(C + CX) + D)
|
GC = peek(scrAddrCache(C + CX) + D)
|
||||||
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
||||||
|
|
||||||
CX = -1
|
CX = -1
|
||||||
GC = peek(scrAddrCache(C + CX) + D)
|
GC = peek(scrAddrCache(C + CX) + D)
|
||||||
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
||||||
|
|
||||||
CX = 0
|
CX = 0
|
||||||
CY = -1
|
CY = -1
|
||||||
GC = peek(scrAddrCache(C) + D + CY)
|
GC = peek(scrAddrCache(C) + D + CY)
|
||||||
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
IF (GC = 112) OR (GC = 96) OR (GC = 128) THEN goto line1340
|
||||||
|
|
||||||
CY = 1
|
CY = 1
|
||||||
|
|
||||||
line1300:
|
line1300:
|
||||||
GC = peek(scrAddrCache(C + CX) + D + CY)
|
GC = peek(scrAddrCache(C + CX) + D + CY)
|
||||||
IF GC = 104 THEN goto line1390 ELSE goto line1340
|
IF GC = 104 THEN goto line1390 ELSE goto line1340
|
||||||
|
|
||||||
line1320:
|
line1320:
|
||||||
CX = 0
|
CX = 0
|
||||||
CY = -1
|
CY = -1
|
||||||
|
|
||||||
line1340:
|
line1340:
|
||||||
IF PG = 96 THEN goto line1360
|
IF PG = 96 THEN goto line1360
|
||||||
PG = 112 + FL
|
PG = 112 + FL
|
||||||
|
|
||||||
line1360:
|
line1360:
|
||||||
CHARAT D, C, PG, 4 '4 = magenta
|
CHARAT D, C, PG, 4 '4 = magenta
|
||||||
C = C + CX
|
C = C + CX
|
||||||
D = D + CY
|
D = D + CY
|
||||||
|
|
||||||
line1390:
|
line1390:
|
||||||
CHARAT D, C, 42, 0 ' 0 = black
|
CHARAT D, C, 42, 0 ' 0 = black
|
||||||
PG = GC
|
PG = GC
|
||||||
'****************************************************************************
|
'****************************************************************************
|
||||||
|
|
||||||
line1410:
|
line1410:
|
||||||
K1 = peek( $DC00) : K1 = 127 - K1
|
K1 = peek( $DC00) : K1 = 127 - K1
|
||||||
if K1 = 0 OR K1 > 8 then goto line1410
|
if K1 = 0 OR K1 > 8 then goto line1410
|
||||||
|
|
||||||
'Wait for the stick to be released, otherwise the game runs too fast
|
'Wait for the stick to be released, otherwise the game runs too fast
|
||||||
do
|
do
|
||||||
loop until peek ( $DC00) = 127
|
loop until peek ( $DC00) = 127
|
||||||
|
|
||||||
CHARAT B, A, 128, 1 ' 1 = White
|
CHARAT B, A, 128, 1 ' 1 = White
|
||||||
'1: up - 2: down - 4: left - 8: right
|
'1: up - 2: down - 4: left - 8: right
|
||||||
on K1 goto line1410, line1690, line1540, line1410, line1590, line1410, line1410, line1410, line1640
|
on K1 goto line1410, line1690, line1540, line1410, line1590, line1410, line1410, line1410, line1640
|
||||||
|
|
||||||
line1450:
|
line1450:
|
||||||
IF G <> 96 then goto line670
|
IF G <> 96 then goto line670
|
||||||
poke 53280, 13 : wait $d011, 128 : wait $d011, 128, 128 : wait $d011, 128 : wait $d011, 128, 128 : poke 53280, 5 ' light green, green
|
poke 53280, 13 : wait $d011, 128 : wait $d011, 128, 128 : wait $d011, 128 : wait $d011, 128, 128 : poke 53280, 5 ' light green, green
|
||||||
SC = SC + 1
|
SC = SC + 1
|
||||||
textat 10, 23, str$(SC), 0
|
textat 10, 23, str$(SC), 0
|
||||||
T = T + 1 ' treasures collected
|
T = T + 1 ' treasures collected
|
||||||
IF T < 45 then goto line670 else LV = LV + 1 : Goto line320
|
IF T < 45 then goto line670 else LV = LV + 1 : Goto line320
|
||||||
|
|
||||||
line1540:
|
line1540:
|
||||||
G = peek(scrAddrCache(A + 1) + B)
|
G = peek(scrAddrCache(A + 1) + B)
|
||||||
IF G = 104 then goto line1740
|
IF G = 104 then goto line1740
|
||||||
IF G = 42 then goto line1760
|
IF G = 42 then goto line1760
|
||||||
A = A + 1
|
A = A + 1
|
||||||
Goto line1450
|
Goto line1450
|
||||||
|
|
||||||
line1590:
|
line1590:
|
||||||
G = peek(scrAddrCache(A) + B - 1)
|
G = peek(scrAddrCache(A) + B - 1)
|
||||||
IF G = 104 then goto line1740
|
IF G = 104 then goto line1740
|
||||||
IF G = 42 then goto line1760
|
IF G = 42 then goto line1760
|
||||||
B = B - 1
|
B = B - 1
|
||||||
Goto line1450
|
Goto line1450
|
||||||
|
|
||||||
line1640:
|
line1640:
|
||||||
G = peek(scrAddrCache(A) + B + 1)
|
G = peek(scrAddrCache(A) + B + 1)
|
||||||
IF G = 104 then goto line1740
|
IF G = 104 then goto line1740
|
||||||
IF G = 42 then goto line1760
|
IF G = 42 then goto line1760
|
||||||
B = B + 1
|
B = B + 1
|
||||||
Goto line1450
|
Goto line1450
|
||||||
|
|
||||||
line1690:
|
line1690:
|
||||||
G = peek(scrAddrCache(A - 1) + B)
|
G = peek(scrAddrCache(A - 1) + B)
|
||||||
IF G = 104 then goto line1740
|
IF G = 104 then goto line1740
|
||||||
IF G = 42 then goto line1760
|
IF G = 42 then goto line1760
|
||||||
A = A - 1
|
A = A - 1
|
||||||
Goto line1450
|
Goto line1450
|
||||||
|
|
||||||
line1740:
|
line1740:
|
||||||
poke 53280, 2 : wait $d011, 128 : wait $d011, 128, 128 : poke 53280, 5 ' red, green
|
poke 53280, 2 : wait $d011, 128 : wait $d011, 128, 128 : poke 53280, 5 ' red, green
|
||||||
goto line670
|
goto line670
|
||||||
'****************************************************************************
|
'****************************************************************************
|
||||||
|
|
||||||
line1760:
|
line1760:
|
||||||
FOR I = 1 to 3
|
FOR I = 1 to 3
|
||||||
poke 53280, 2
|
poke 53280, 2
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
poke 53280, 4
|
poke 53280, 4
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
next I
|
next I
|
||||||
FOR I = 1 to 3
|
FOR I = 1 to 3
|
||||||
poke 53280, 1 : poke 53281, 1 'white
|
poke 53280, 1 : poke 53281, 1 'white
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
|
|
||||||
poke 53280, 10 : poke 53281, 10 'light red
|
poke 53280, 10 : poke 53281, 10 'light red
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
|
|
||||||
poke 53280, 3 : poke 53281, 3 'cyan
|
poke 53280, 3 : poke 53281, 3 'cyan
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
wait $d011, 128 : wait $d011, 128, 128
|
wait $d011, 128 : wait $d011, 128, 128
|
||||||
next I
|
next I
|
||||||
|
|
||||||
locate 0, 24
|
locate 0, 24
|
||||||
PRINT "got caught!!!"
|
PRINT "got caught!!!"
|
||||||
PRINT "try again? (y/n)";
|
PRINT "try again? (y/n)";
|
||||||
|
|
||||||
line1840:
|
line1840:
|
||||||
poke 198, 0 : wait 198,1
|
poke 198, 0 : wait 198,1
|
||||||
get tryAgain$
|
get tryAgain$
|
||||||
if tryAgain$ = "y" then goto line300
|
if tryAgain$ = "y" then goto line300
|
||||||
if tryAgain$ <> "n" then goto line1840
|
if tryAgain$ <> "n" then goto line1840
|
||||||
|
|
||||||
poke 53280, 14 : poke 53281, 6
|
poke 53280, 14 : poke 53281, 6
|
||||||
memset $d800, 1000, 14
|
memset $d800, 1000, 14
|
||||||
poke 646, 14
|
poke 646, 14
|
||||||
poke $D018, 21 'original character location
|
poke $D018, 21 'original character location
|
||||||
memcpy $E3A2, $73, $17 'CHRGET bug workaround
|
memcpy $E3A2, $73, $17 'CHRGET bug workaround
|
||||||
|
|
||||||
END
|
END
|
||||||
|
|
||||||
LOC_charset_addr:
|
LOC_charset_addr:
|
||||||
incbin "charset.chr"
|
incbin "charset.chr"
|
Loading…
Reference in New Issue