From fb2027ba8e9e4a2b42f126cf2bac756ae930d8fa Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Sat, 7 Feb 2009 13:09:39 +0100 Subject: [PATCH] Add some missing #include lines, use C99 as standard Just some more correctness updates to the current code. --- archive.c | 1 + game.c | 2 ++ graphics.c | 5 +++-- input.c | 2 ++ makefile | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/archive.c b/archive.c index d28942d..6866d71 100644 --- a/archive.c +++ b/archive.c @@ -22,6 +22,7 @@ **/ +#include #include #include #include diff --git a/game.c b/game.c index aa5a508..464267d 100644 --- a/game.c +++ b/game.c @@ -22,6 +22,8 @@ **/ #include +#include +#include #include #include "tennix.h" diff --git a/graphics.c b/graphics.c index a6feed7..26b31b2 100644 --- a/graphics.c +++ b/graphics.c @@ -26,6 +26,8 @@ #include #include #include +#include +#include #include "tennix.h" #include "graphics.h" @@ -499,7 +501,7 @@ void font_draw_string_alpha( image_id id, const char* s, int x_offset, int y_off int y = y_offset; int x = x_offset; int additional_x = 0, additional_y = 0; - float xw = 0.0, xw_diff; + float xw = 0.0, xw_diff = 0.0; unsigned int i; SDL_Surface *bitmap; @@ -510,7 +512,6 @@ void font_draw_string_alpha( image_id id, const char* s, int x_offset, int y_off if( animation & ANIMATION_BUNGEE) { xw = (25.0*sinf( start/10.0)); - xw_diff = 0.0; x -= xw / 2; } diff --git a/input.c b/input.c index 60d7fd1..4a69fbd 100644 --- a/input.c +++ b/input.c @@ -21,6 +21,8 @@ * **/ +#include + #include "tennix.h" #include "input.h" diff --git a/makefile b/makefile index 8ff6d89..1a532e4 100644 --- a/makefile +++ b/makefile @@ -33,7 +33,7 @@ PREFIX ?= usr/local/ BINARY_INSTALL_DIR ?= $(PREFIX)/bin LIBS = -CFLAGS += -W -Wall -ansi -pedantic -Wshadow -Wcast-qual -Wwrite-strings -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\" +CFLAGS += -std=c99 -W -Wall -ansi -pedantic -Wcast-qual -Wwrite-strings -DVERSION=\"$(RELEASE)\" -O2 -DPREFIX=\"$(PREFIX)\" ifeq ($(UPDRECTANGLE),1) CFLAGS += -DDRAW_UPDATE_RECTANGLE -- 2.11.4.GIT