vgi: work on colors

This commit is contained in:
Vince Weaver 2021-06-30 09:30:42 -04:00
parent 70ab2f4223
commit 76275d1ee7
3 changed files with 68 additions and 3 deletions

View File

@ -6,13 +6,14 @@ LINKERSCRIPTS = ../../../linker_scripts
EMPTYDISK = ../../../empty_disk/empty.dsk
MAKEVGI = ./make_vgi_asm
all: vgi_myst.dsk make_vgi_asm
all: vgi_myst.dsk make_vgi_asm make_color_test
vgi_myst.dsk: HELLO VGI-MYST VGI-DOOM
vgi_myst.dsk: HELLO VGI-MYST VGI-DOOM COLOR-TEST
cp $(EMPTYDISK) vgi_myst.dsk
$(DOS33) -y vgi_myst.dsk SAVE A HELLO
$(DOS33) -y vgi_myst.dsk BSAVE -a 0xC00 VGI-MYST
$(DOS33) -y vgi_myst.dsk BSAVE -a 0x4000 VGI-DOOM
$(DOS33) -y vgi_myst.dsk BSAVE -a 0x4000 COLOR-TEST
###
@ -41,6 +42,16 @@ doom_vgi.o: doom.data \
vgi_triangles.s
ca65 -o doom_vgi.o doom_vgi.s -l doom_vgi.lst
###
COLOR-TEST: color_test.o
ld65 -o COLOR-TEST color_test.o -C $(LINKERSCRIPTS)/apple2_4000.inc
color_test.o: color_test.data \
color_test.s vgi_clearscreen.s vgi_rectangle.s vgi_circles.s vgi_lines.s \
vgi_triangles.s
ca65 -o color_test.o color_test.s -l color_test.lst
###
@ -86,6 +97,15 @@ fireplace.data: make_vgi_asm fireplace.vgi
echo "fireplace_data:" > fireplace.data
./make_vgi_asm < fireplace.vgi >> fireplace.data
###
color_test.vgi: make_color_test
./make_color_test > color_test.vgi
color_test.data: make_vgi_asm color_test.vgi
echo "color_test_data:" > color_test.data
./make_vgi_asm < color_test.vgi >> color_test.data
###
@ -97,5 +117,15 @@ make_vgi_asm.o: make_vgi_asm.c
###
make_color_test: make_color_test.o
$(CC) -o make_color_test make_color_test.o $(LFLAGS)
make_color_test.o: make_color_test.c
$(CC) $(CFLAGS) -c make_color_test.c
###
clean:
rm -f *~ *.o *.lst HELLO VGI-MYST VGI-DOOM make_vgi_asm *.data
rm -f *~ *.o *.lst HELLO VGI-MYST VGI-DOOM COLOR-TEST \
make_vgi_asm make_color_test *.data

View File

@ -0,0 +1,20 @@
#include <stdio.h>
int main(int argc, char **argv) {
int x,y,c;
printf("; color test\n");
printf("CLS\t0\n");
for(x=0;x<16;x++) {
for(y=0;y<16;y++) {
c=(x*16)+y;
printf("DRECT\t0x%x\t0x%x\t",c,c);
printf("%d\t%d\t%d\t%d\n",
x*14,y*8,(x+1)*14,(y+1)*8);
}
}
printf("END\n");
return 0;
}

View File

@ -0,0 +1,15 @@
; Path from Myst
CLS 0x80 ; black background
; TODO, rounded edges?
RECT 7 7 3 85 239 188 ; glow
; book
; link
RECT 7 7 161 40 227 91 ; sky
RECT 6 6 202 70 227 91 ; ocean
RECT 5 5 180 55 208 74 ; mountain
RECT 5 5 208 66 219 74 ; mountain
VTRI 5 180 55 176 182 66 ; mountain left
LINE 6 225 78 213 83 ; mast
LINETO 212 75 ; mast
LINE 0 226 85 214 68 ; mast
END