disjaukifa, on Mon Sep 12, 2011 4:22 PM, said:
1st. You can't use an of the var variables, meaning var0 ~ var47, just returns a compilation error.
2nd. It seems that pfclear do not work on the DPC+ kernel as well.
How do you clear the playfield? Also how to you define var0 ~ var47? Are they just not available or am I missing something? Does anyone have a reference page to DPC+ kernel (Random I'm thinking of you at the moment

)
1) Nope can't use them, they existed in the original to keep the playfield in ram and are now used for the virtual sprites stuff.
2) pfread, pfclear and pfscroll aren't implemented yet. To define a playfield either build it with pfpixel, pfvline x(start) y x(end), pfhline x(start) y x(end) or:
rem always set the DF#FRACINC at least once before attempting to draw
rem the playfields or backgrounds
DF0FRACINC = 16 ;16 = 11 rows of playfield, 32 is 22 ect
DF1FRACINC = 16
DF2FRACINC = 16
DF3FRACINC = 16
DF4FRACINC = 32 ;PFcolors table, Always double the playfields
DF6FRACINC = 32 ;BKcolors table
bkcolors:
$1E
$2E
$3E
$4E
$5E
$6E
$7E
$8E
$9E
$AE
$BE
end
pfcolors:
$02
$04
$06
$08
$02
$04
$06
$08
$02
$04
$06
end
playfield:
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
end
rem and to clear the playfield just define an empty playfield:
playfield:
...............................
end
For defining multiple things to a variable for bit operations it's as easy as:
dim MULTIVAR = a
def Switch7=MULTIVAR{7}
def Switch6=MULTIVAR{6}
def Switch5=MULTIVAR{5}
def Switch4=MULTIVAR{4}
def Switch3=MULTIVAR{3}
def Switch2=MULTIVAR{2}
def Switch1=MULTIVAR{1}
def Switch0=MULTIVAR{0}
rem then to test if the switch is on
if switch1 then goto SWITCH1_is_on
rem to test if a switch is off
if !switch1 then goto SWITCH1_is_off
rem be sure to watch your capitals, because a label with the same
rem spelling in it as a variable will confuse the compiler
SWITCH1_is_on ;is different then Switch1 and switch1
rem however
Switch1_is_on ;Will confuse the compiler since Switch1 is the same as the var Switch1
;and it will try to convert the label into an invalid instruction
Hope this helped.
Edited by ScumSoft, Mon Sep 12, 2011 7:42 PM.