Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_INIT([Tux Of Math Command],[2.0.4],[[email protected]],[tuxmath])

AC_PREREQ(2.61)
AC_PREREQ([2.72])
AC_CANONICAL_HOST
AC_CANONICAL_BUILD
AC_CANONICAL_TARGET
Expand All @@ -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.
Expand Down Expand Up @@ -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])


Expand Down
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ set(SOURCES_TUXMATH
game.c
menu.c
menu_lan.c
mysetenv.c
highscore.c
lessons.c
mathcards.c
Expand Down
2 changes: 1 addition & 1 deletion src/campaign.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */


#include "tuxmath.h"

#include "comets.h"
//#define TESTING_CAMPAIGN //allow ESC to skip missions instead of exiting

#define NUM_STAGES 5
Expand Down
13 changes: 6 additions & 7 deletions src/comets.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -4152,13 +4154,10 @@ 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);
}

void stop_tts_announcer_thread(){
tts_announcer_switch = 0;
T4K_Tts_stop();
}


3 changes: 3 additions & 0 deletions src/comets_graphics.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

#include "comets.h"

#include "draw_utils.h"

#include "network.h"

void comets_draw_background(SDL_Surface *bkgd, int wave);

Expand Down
2 changes: 1 addition & 1 deletion src/draw_utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "draw_utils.h"
#include "tuxmath.h"
#include "fileops.h"

#include <math.h>

float get_scale(void)
{
Expand Down
2 changes: 1 addition & 1 deletion src/globals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/menu.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#ifndef MENU_H
#define MENU_H

#include "comets.h"
#include "globals.h"

#include "SDL.h"
Expand Down
4 changes: 2 additions & 2 deletions src/menu_lan.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#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);
Expand Down
2 changes: 1 addition & 1 deletion src/multiplayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef MULTIPLAYER_H
#define MULTIPLAYER_H


#include "comets.h"
#define MAX_PLAYERS 4

enum {
Expand Down
1 change: 1 addition & 0 deletions src/network.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define NETWORK_H

#include "config.h"
#include "globals.h"

#ifdef HAVE_LIBSDL_NET

Expand Down
2 changes: 1 addition & 1 deletion src/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "titlescreen.h"
#include "highscore.h"
#include "mysetenv.h"

#include "config.h"

/* SDL includes: -----------------*/
#include "SDL.h"
Expand Down
8 changes: 4 additions & 4 deletions src/titlescreen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions src/titlescreen.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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
Expand Down Expand Up @@ -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);
Expand Down