diff options
| author | Oxore <oxore@protonmail.com> | 2017-05-25 18:41:18 +0700 | 
|---|---|---|
| committer | Oxore <oxore@protonmail.com> | 2017-05-25 18:41:18 +0700 | 
| commit | d66b6169cf254cd0d7c83354170824c39a663ad5 (patch) | |
| tree | e7559a88fb35c15f0e83de78b41cd3a8bba4a93e | |
| parent | 5a8b79c468578cd5226d8a543324835ca6978103 (diff) | |
Makefile added, README.md updated
| -rw-r--r-- | Makefile | 18 | ||||
| -rw-r--r-- | README.md | 10 | ||||
| -rwxr-xr-x | bld | 1 | ||||
| -rw-r--r-- | src/functions.c | 2 | 
4 files changed, 23 insertions, 8 deletions
| diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b274ebc --- /dev/null +++ b/Makefile @@ -0,0 +1,18 @@ +CC=gcc +FILES:=$(wildcard src/*.c) +FILES:=$(FILES:.c=.o) + +CFLAGS += -Wall +CFLAGS += -std=c99 +CFLAGS += -O3 +LIBS += -lcsfml-graphics  +LIBS += -lcsfml-window  +LIBS += -lcsfml-system  + +all: tetris + +tetris: $(FILES)  +	$(CC) -o $@ $^ $(CFLAGS) $(LIBS) + +clean: +	rm -f tetris $(FILES) @@ -1,13 +1,12 @@  ## Tetris CSFML -This is unfinished tetris project written in pure C with CSFML-2.3-2 library. It is under development. Obvious, it depends on csfml. +This is unfinished tetris project written in pure C with CSFML library. It is under development. Obvious, it depends on csfml, but nothing more. -To compile and run the source code under __nix__ just enter following commands: +__Compilation__  ``` -./bld -./main +make all  ``` -Hit *Return* to start game. +File named "tetris" is the final binary. Run it. Hit *Return* to start game.  __TODO:__ @@ -16,4 +15,3 @@ __TODO:__  - Three next shapes  - Main menu with beauties  - Look with sprites -- Autotools script @@ -1 +0,0 @@ -gcc -O3 src/main.c src/functions.c src/shape_maps.c -o main -lcsfml-graphics -lcsfml-window -lcsfml-system diff --git a/src/functions.c b/src/functions.c index 499a085..603cc5f 100644 --- a/src/functions.c +++ b/src/functions.c @@ -135,7 +135,7 @@ void scoreDisplay() {  	for (int i=0;i<7;i++) {  		a[i] = b[i];  	} -	scoreDisp = &a; +	scoreDisp = (char *)&a;  	sfText_setString(textScore, scoreDisp);  } | 
