mirror of
https://github.com/badvision/lawless-legends.git
synced 2024-07-07 14:29:16 +00:00
Add Rod's Colors
This commit is contained in:
parent
1b065b7aec
commit
23e3eb0af0
@ -22,10 +22,10 @@ TXTTYPE = .TXT
|
|||||||
#SYSTYPE = \#ff0000
|
#SYSTYPE = \#ff0000
|
||||||
#TXTTYPE = \#040000
|
#TXTTYPE = \#040000
|
||||||
|
|
||||||
all: $(PLASM) $(PLVM) $(PLVM02) $(CMD) TESTLIB
|
all: $(PLASM) $(PLVM) $(PLVM02) $(CMD) TESTLIB ROD.REL
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
-rm *.o *~ *.a *.SYM *.SYS *.BIN TESTLIB $(PLASM) $(PLVM)
|
-rm *.o *~ *.a *.SYM *.SYS *.REL TESTLIB $(PLASM) $(PLVM)
|
||||||
|
|
||||||
$(PLASM): $(OBJS) $(INCS)
|
$(PLASM): $(OBJS) $(INCS)
|
||||||
cc $(OBJS) -o $(PLASM)
|
cc $(OBJS) -o $(PLASM)
|
||||||
@ -54,11 +54,14 @@ test: test.pla TESTLIB $(PLVM) $(PLASM)
|
|||||||
|
|
||||||
debug: test.pla TESTLIB $(PLVM) $(PLASM)
|
debug: test.pla TESTLIB $(PLVM) $(PLASM)
|
||||||
./$(PLASM) -AM < test.pla > test.a
|
./$(PLASM) -AM < test.pla > test.a
|
||||||
acme --setpc 4096 -o TEST.BIN test.a
|
acme --setpc 4096 -o TEST.REL test.a
|
||||||
./$(PLVM) -s TEST.BIN MAIN
|
./$(PLVM) -s TEST.REL MAIN
|
||||||
|
|
||||||
hello: hello.pla $(PLVM) $(PLASM)
|
hello: hello.pla $(PLVM) $(PLASM)
|
||||||
./$(PLASM) -AM < hello.pla > hello.a
|
./$(PLASM) -AM < hello.pla > hello.a
|
||||||
acme --setpc 4096 -o HELLO.BIN hello.a
|
acme --setpc 4096 -o HELLO.REL hello.a
|
||||||
./$(PLVM) HELLO.BIN
|
./$(PLVM) HELLO.REL
|
||||||
|
|
||||||
|
ROD.REL: rod.pla $(PLVM) $(PLASM)
|
||||||
|
./$(PLASM) -AM < rod.pla > rod.a
|
||||||
|
acme --setpc 4096 -o ROD.REL rod.a
|
||||||
|
84
PLASMA/src/rod.pla
Normal file
84
PLASMA/src/rod.pla
Normal file
@ -0,0 +1,84 @@
|
|||||||
|
import STDLIB
|
||||||
|
predef romcall, puts
|
||||||
|
end
|
||||||
|
const speaker=$C030
|
||||||
|
const showgraphics=$C050
|
||||||
|
const showtext=$C051
|
||||||
|
const showfull=$C052
|
||||||
|
const showmix=$C053
|
||||||
|
const TRUE=$FFFF
|
||||||
|
const FALSE=$0000
|
||||||
|
const showpage1=$C054
|
||||||
|
const showpage2=$C055
|
||||||
|
const showlores=$C056
|
||||||
|
const showhires=$C057
|
||||||
|
const keyboard=$C000
|
||||||
|
const keystrobe=$C010
|
||||||
|
const hgr1=$2000
|
||||||
|
const hgr2=$4000
|
||||||
|
const page1=0
|
||||||
|
const page2=1
|
||||||
|
byte exitmsg[] = "PRESS ANY KEY TO EXIT.\n"
|
||||||
|
byte goodbye[] = "THAT'S ALL FOLKS!\n"
|
||||||
|
byte i, j, k, w, fmi, fmk, color
|
||||||
|
|
||||||
|
def textmode
|
||||||
|
romcall(0, 0, 0, 0, $FB39)
|
||||||
|
end
|
||||||
|
def home
|
||||||
|
romcall(0, 0, 0, 0, $FC58)
|
||||||
|
end
|
||||||
|
def gotoxy(x, y)
|
||||||
|
^($24) = x
|
||||||
|
romcall(y, 0, 0, 0, $FB5B)
|
||||||
|
end
|
||||||
|
def grmode
|
||||||
|
romcall(0, 0, 0, 0, $FB40)
|
||||||
|
^showlores
|
||||||
|
end
|
||||||
|
def grcolor(color)
|
||||||
|
romcall(color, 0, 0, 0, $F864)
|
||||||
|
end
|
||||||
|
def grplot(x, y)
|
||||||
|
romcall(y, 0, x, 0, $F800)
|
||||||
|
end
|
||||||
|
def colors
|
||||||
|
while TRUE
|
||||||
|
for w = 3 to 50
|
||||||
|
for i = 1 to 19
|
||||||
|
for j = 0 to 19
|
||||||
|
k = i + j
|
||||||
|
color = (j * 3) / (i + 3) + i * w / 12
|
||||||
|
fmi = 40 - i
|
||||||
|
fmk = 40 - k
|
||||||
|
romcall(color, 0, 0, 0, $F864) ;grcolor(color);
|
||||||
|
romcall(k, 0, i, 0, $F800) ;grplot(i, k);
|
||||||
|
romcall(i, 0, k, 0, $F800) ;grplot(k, i);
|
||||||
|
romcall(fmk, 0, fmi, 0, $F800) ;grplot(fmi, fmk);
|
||||||
|
romcall(fmi, 0, fmk, 0, $F800) ;grplot(fmk, fmi);
|
||||||
|
romcall(fmi, 0, k, 0, $F800) ;grplot(k, fmi);
|
||||||
|
romcall(k, 0, fmi, 0, $F800) ;grplot(fmi, k);
|
||||||
|
romcall(fmk, 0, i, 0, $F800) ;grplot(i, fmk);
|
||||||
|
romcall(i, 0, fmk, 0, $F800) ;grplot(fmk, i);
|
||||||
|
if ^keyboard >= 128
|
||||||
|
^keystrobe
|
||||||
|
return
|
||||||
|
fin
|
||||||
|
next
|
||||||
|
next
|
||||||
|
next
|
||||||
|
loop
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
grmode()
|
||||||
|
gotoxy(10,22)
|
||||||
|
puts(@exitmsg)
|
||||||
|
colors()
|
||||||
|
textmode()
|
||||||
|
home()
|
||||||
|
puts(@goodbye)
|
||||||
|
while ^keyboard < 128
|
||||||
|
loop
|
||||||
|
^keystrobe
|
||||||
|
done
|
Loading…
Reference in New Issue
Block a user