diff --git a/configure.ac b/configure.ac
index 13aae14..c994414 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT([Tux Of Math Command],[2.0.4],[tuxmath-devel@lists.sourceforge.net],[tuxmath])
-AC_PREREQ(2.61)
+AC_PREREQ([2.72])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
@@ -18,7 +18,7 @@ AC_DEFINE_UNQUOTED([PROGRAM_NAME], "$PACKAGE", [Tux Of Math Command])
AC_SUBST(NAME_VERSION)
-AC_GNU_SOURCE
+AC_USE_SYSTEM_EXTENSIONS
dnl For libtool support to link libt4k-common:
dnl NOTE - currently libtool init commented out because of errors in crossbuild.
@@ -225,7 +225,15 @@ LIBS="$LIBS $T4K_COMMON_LIBS"
AC_FUNC_ALLOCA
AC_HEADER_DIRENT
-AC_HEADER_STDC
+m4_warn([obsolete],
+[The preprocessor macro 'STDC_HEADERS' is obsolete.
+ Except in unusual embedded environments, you can safely include all
+ C89 headers unconditionally.])dnl
+# Autoupdate added the next two lines to ensure that your configure
+# script's behavior did not change. They are probably safe to remove.
+AC_CHECK_INCLUDES_DEFAULT
+AC_PROG_EGREP
+
AC_CHECK_HEADERS([argz.h error.h errno.h fcntl.h float.h iconv.h inttypes.h langinfo.h libgen.h libintl.h limits.h locale.h malloc.h math.h pthread.h stddef.h stdint.h stdio_ext.h stdlib.h string.h strings.h sys/param.h unistd.h wchar.h])
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9c198d0..8c8e0b1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -39,6 +39,7 @@ set(SOURCES_TUXMATH
game.c
menu.c
menu_lan.c
+ mysetenv.c
highscore.c
lessons.c
mathcards.c
diff --git a/src/campaign.h b/src/campaign.h
index e4f7a20..d4b15c8 100644
--- a/src/campaign.h
+++ b/src/campaign.h
@@ -25,7 +25,7 @@ along with this program. If not, see . */
#include "tuxmath.h"
-
+#include "comets.h"
//#define TESTING_CAMPAIGN //allow ESC to skip missions instead of exiting
#define NUM_STAGES 5
diff --git a/src/comets.c b/src/comets.c
index 84c9b6e..0185841 100644
--- a/src/comets.c
+++ b/src/comets.c
@@ -175,6 +175,8 @@ SDL_Rect player_left_pos = {0};
static help_controls_type help_controls;
+SDL_Thread *tts_announcer_thread;
+
/* Local function prototypes: */
static int comets_initialize(void);
static void comets_cleanup(void);
@@ -4008,13 +4010,13 @@ wchar_t* convert_formula_to_sentence(char *formula_string)
while(temp != NULL)
{
if (wcscmp(temp,L"+") == 0)
- wcscat(sentence,_(L"plus "));
+ wcscat(sentence,(const wchar_t *)_("plus "));
else if (wcscmp(temp,L"-") == 0)
- wcscat(sentence,_(L"minus "));
+ wcscat(sentence,(const wchar_t *)_("minus "));
else if (wcscmp(temp,L"รท") == 0)
- wcscat(sentence,_(L"divided by "));
+ wcscat(sentence,(const wchar_t *)_("divided by "));
else if (wcscmp(temp,L"x") == 0)
- wcscat(sentence,_(L"Times "));
+ wcscat(sentence,(const wchar_t *)_("Times "));
else
{
wcscat(sentence,temp);
@@ -4152,7 +4154,6 @@ int tts_announcer(void *unused)
return 0;
}
void start_tts_announcer_thread(){
- extern SDL_Thread *tts_announcer_thread;
tts_announcer_thread = SDL_CreateThread(tts_announcer,NULL);
}
@@ -4160,5 +4161,3 @@ void stop_tts_announcer_thread(){
tts_announcer_switch = 0;
T4K_Tts_stop();
}
-
-
diff --git a/src/comets_graphics.h b/src/comets_graphics.h
index b1182bc..102bca9 100644
--- a/src/comets_graphics.h
+++ b/src/comets_graphics.h
@@ -7,6 +7,9 @@
#include "comets.h"
+#include "draw_utils.h"
+
+#include "network.h"
void comets_draw_background(SDL_Surface *bkgd, int wave);
diff --git a/src/draw_utils.c b/src/draw_utils.c
index 523437a..3cfab42 100644
--- a/src/draw_utils.c
+++ b/src/draw_utils.c
@@ -3,7 +3,7 @@
#include "draw_utils.h"
#include "tuxmath.h"
#include "fileops.h"
-
+#include
float get_scale(void)
{
diff --git a/src/globals.h b/src/globals.h
index 24cc610..aafeff6 100644
--- a/src/globals.h
+++ b/src/globals.h
@@ -186,7 +186,7 @@ extern char **lesson_list_filenames;
extern int* lesson_list_goldstars;
extern int num_lessons;
-SDL_Thread *tts_announcer_thread;
+extern SDL_Thread *tts_announcer_thread;
#endif
diff --git a/src/menu.h b/src/menu.h
index e722c3f..6329a6a 100644
--- a/src/menu.h
+++ b/src/menu.h
@@ -34,7 +34,7 @@ along with this program. If not, see .
#ifndef MENU_H
#define MENU_H
-
+#include "comets.h"
#include "globals.h"
#include "SDL.h"
diff --git a/src/menu_lan.c b/src/menu_lan.c
index 4512eb1..9751b42 100644
--- a/src/menu_lan.c
+++ b/src/menu_lan.c
@@ -36,8 +36,8 @@ along with this program. If not, see . */
#include "menu_lan.h"
-/* lan_player_type now defined in network.h */
-lan_player_type lan_player_info[MAX_CLIENTS];
+/* lan_player_type now defined in network.h; added extern for lan_player_info so it's only defined once */
+extern lan_player_type lan_player_info[MAX_CLIENTS];
/* Local function prototypes: ------------------- */
void draw_player_table(void);
diff --git a/src/multiplayer.h b/src/multiplayer.h
index 483d1e7..1432a26 100644
--- a/src/multiplayer.h
+++ b/src/multiplayer.h
@@ -34,7 +34,7 @@ along with this program. If not, see .
#ifndef MULTIPLAYER_H
#define MULTIPLAYER_H
-
+#include "comets.h"
#define MAX_PLAYERS 4
enum {
diff --git a/src/network.h b/src/network.h
index ed506f2..aae2cde 100644
--- a/src/network.h
+++ b/src/network.h
@@ -34,6 +34,7 @@ along with this program. If not, see .
#define NETWORK_H
#include "config.h"
+#include "globals.h"
#ifdef HAVE_LIBSDL_NET
diff --git a/src/setup.c b/src/setup.c
index c61eb5d..9d38fe2 100644
--- a/src/setup.c
+++ b/src/setup.c
@@ -37,7 +37,7 @@ along with this program. If not, see .
#include "titlescreen.h"
#include "highscore.h"
#include "mysetenv.h"
-
+#include "config.h"
/* SDL includes: -----------------*/
#include "SDL.h"
diff --git a/src/titlescreen.c b/src/titlescreen.c
index 3522a55..cc561a4 100644
--- a/src/titlescreen.c
+++ b/src/titlescreen.c
@@ -397,21 +397,21 @@ int RenderTitleScreen(void)
/* handle titlescreen events (easter egg)
this function should be called from event loops
return 1 if events require full redraw */
-int HandleTitleScreenEvents(const SDL_Event* evt)
+int HandleTitleScreenEvents(SDL_Event* evt)
{
if (evt->type == SDL_KEYDOWN)
if (evt->key.keysym.sym == SDLK_F10)
HandleTitleScreenResSwitch(T4K_GetScreen()->w, T4K_GetScreen()->h);
- return handle_easter_egg(evt);
+ return handle_easter_egg(evt);
}
/* handle a resolution switch. Tux et. al. may need to be resized
and/or repositioned
*/
-int HandleTitleScreenResSwitch(int new_w, int new_h)
+void HandleTitleScreenResSwitch(int new_w, int new_h)
{
- return RenderTitleScreen();
+ RenderTitleScreen();
}
/* handle all titlescreen blitting
diff --git a/src/titlescreen.h b/src/titlescreen.h
index 478b935..fbdddf5 100644
--- a/src/titlescreen.h
+++ b/src/titlescreen.h
@@ -62,7 +62,7 @@ along with this program. If not, see .
#define MAX_WORD_SIZE 8
//MAX_UPDATES needed for TransWipe() and friends:
-#define MAX_UPDATES 180
+#define MAX_UPDATES 512
#define WAIT_MS 2500
#define FRAMES_PER_SEC 50
@@ -102,8 +102,8 @@ extern SDL_Event event;
void TitleScreen(void);
int RenderTitleScreen(void);
void DrawTitleScreen(void);
-int HandleTitleScreenEvents(const SDL_Event* evt);
-int HandleTitleScreenResSwitch(int new_w, int new_h);
+int HandleTitleScreenEvents(SDL_Event* evt);
+void HandleTitleScreenResSwitch(int new_w, int new_h);
void HandleTitleScreenAnimations();
void HandleTitleScreenAnimations_Reset(bool reset);
void ShowMessage(int font_size, const char* str1, const char* str2, const char* str3, const char* str4);