mode7: more planning changes

This commit is contained in:
Vince Weaver 2017-12-15 09:20:40 -05:00
parent 58adfcfcd0
commit 20dfdcc36e
5 changed files with 48 additions and 3 deletions

View File

@ -5,9 +5,17 @@ LFLAGS = -lm
SDL_LIBS= `sdl-config --libs`
SDL_INCLUDE= `sdl-config --cflags`
all: fixed_point rainbow sparkle starfield kaleido tfv mode7_demo text tfv_multiply
all: fade fixed_point rainbow sparkle starfield kaleido \
tfv mode7_demo text tfv_multiply
####
fade: fade.o gr-sim.o tfv_backgrounds.o tfv_utils.o
$(CC) $(LFLAGS) $(SDL_LIBS) -o fade fade.o gr-sim.o tfv_backgrounds.o tfv_utils.o
fade.o: fade.c
$(CC) $(CFLAGS) -c fade.c
####
@ -156,6 +164,6 @@ gr-sim.o: gr-sim.c gr-sim.h apple2_font.h
clean:
rm -f *~ *.o gr-sim rainbow sparkle starfield kaleido \
tfv text mode7_demo fixed_point tfv_multiply
tfv text mode7_demo fade fixed_point tfv_multiply

34
gr-sim/fade.c Normal file
View File

@ -0,0 +1,34 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include "gr-sim.h"
#include "tfv_utils.h"
#include "tfv_zp.h"
#include "tfv_backgrounds.h"
int main(int argc, char **argv) {
int result;
grsim_init();
gr();
clear_bottom(PAGE0);
clear_bottom(PAGE1);
clear_bottom(PAGE2);
grsim_unrle(title_rle,0xc00);
gr_copy_to_current(0xc00);
page_flip();
gr_copy_to_current(0xc00);
page_flip();
repeat_until_keypressed();
return result;
}

View File

@ -35,8 +35,11 @@ int main(int argc, char **argv) {
while(1) {
gr();
color_equals(15);
for(i=0;i<NUMSTARS;i++) {
if (stars[i].z<2) color_equals(15);
else if (stars[i].z<3) color_equals(7);
else color_equals(5);
basic_plot(stars[i].x/stars[i].z+20,
stars[i].y/stars[i].z+20);
}

BIN
tfv/demo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 566 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB