mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-12-23 22:29:38 +00:00
gr-sim: add text test
This commit is contained in:
parent
339a08444a
commit
d87eac3693
@ -5,7 +5,11 @@ LFLAGS =
|
||||
SDL_LIBS= `sdl-config --libs`
|
||||
SDL_INCLUDE= `sdl-config --cflags`
|
||||
|
||||
all: rainbow sparkle kaleido tfv
|
||||
all: rainbow sparkle kaleido tfv text
|
||||
|
||||
|
||||
|
||||
####
|
||||
|
||||
rainbow: rainbow.o gr-sim.o
|
||||
$(CC) $(LFLAGS) $(SDL_LIBS) -o rainbow rainbow.o gr-sim.o
|
||||
@ -15,6 +19,15 @@ rainbow.o: rainbow.c
|
||||
|
||||
####
|
||||
|
||||
text: text.o gr-sim.o
|
||||
$(CC) $(LFLAGS) $(SDL_LIBS) -o text text.o gr-sim.o
|
||||
|
||||
text.o: text.c
|
||||
$(CC) $(CFLAGS) -c text.c
|
||||
|
||||
|
||||
####
|
||||
|
||||
tfv: tfv.o gr-sim.o
|
||||
$(CC) $(LFLAGS) $(SDL_LIBS) -o tfv tfv.o gr-sim.o
|
||||
|
||||
@ -42,6 +55,6 @@ gr-sim.o: gr-sim.c
|
||||
$(CC) $(CFLAGS) $(SDL_INCLUDE) -c gr-sim.c
|
||||
|
||||
clean:
|
||||
rm -f *~ *.o gr-sim rainbow sparkle kaleido tfv
|
||||
rm -f *~ *.o gr-sim rainbow sparkle kaleido tfv text
|
||||
|
||||
|
||||
|
27
gr-sim/text.c
Normal file
27
gr-sim/text.c
Normal file
@ -0,0 +1,27 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "gr-sim.h"
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
||||
int x,y,ch;
|
||||
|
||||
grsim_init();
|
||||
|
||||
home();
|
||||
|
||||
while(1) {
|
||||
grsim_update();
|
||||
|
||||
ch=grsim_input();
|
||||
|
||||
if (ch=='q') break;
|
||||
|
||||
usleep(100000);
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user