[Tux4kids-commits] r1289 - in branches/commonification: tux4kids-common/trunk tux4kids-common/trunk/src tuxmath/trunk tuxmath/trunk/src
Bolesław Kulbabiński
bolekk-guest at alioth.debian.org
Wed Jul 29 17:55:27 UTC 2009
Author: bolekk-guest
Date: 2009-07-29 17:55:26 +0000 (Wed, 29 Jul 2009)
New Revision: 1289
Modified:
branches/commonification/tux4kids-common/trunk/
branches/commonification/tux4kids-common/trunk/CMakeLists.txt
branches/commonification/tux4kids-common/trunk/src/
branches/commonification/tux4kids-common/trunk/src/SDL_extras.c
branches/commonification/tux4kids-common/trunk/src/tux4kids-common.h
branches/commonification/tuxmath/trunk/configure.ac
branches/commonification/tuxmath/trunk/src/SDL_extras.c
branches/commonification/tuxmath/trunk/src/SDL_extras.h
branches/commonification/tuxmath/trunk/src/menu.c
Log:
fixed some problems with building tuxmath with t4kcommon
Property changes on: branches/commonification/tux4kids-common/trunk
___________________________________________________________________
Added: svn:ignore
+ CMakeCache.txt
CMakeFiles
cmake_install.cmake
install_manifest.txt
Makefile
Modified: branches/commonification/tux4kids-common/trunk/CMakeLists.txt
===================================================================
--- branches/commonification/tux4kids-common/trunk/CMakeLists.txt 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tux4kids-common/trunk/CMakeLists.txt 2009-07-29 17:55:26 UTC (rev 1289)
@@ -2,7 +2,7 @@
#other CMakeLists.txt and is not safe for human consumption.
#Please hack responsibly.
-
+cmake_minimum_required(VERSION 2.6)
find_package(SDL REQUIRED)
add_subdirectory(src)
Property changes on: branches/commonification/tux4kids-common/trunk/src
___________________________________________________________________
Added: svn:ignore
+ CMakeFiles
cmake_install.cmake
Makefile
Modified: branches/commonification/tux4kids-common/trunk/src/SDL_extras.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/src/SDL_extras.c 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tux4kids-common/trunk/src/SDL_extras.c 2009-07-29 17:55:26 UTC (rev 1289)
@@ -11,7 +11,7 @@
*/
#include <math.h>
-#include "SDL_extras.h"
+#include "tux4kids-common.h"
static SDL_Surface* screen = NULL;
@@ -76,15 +76,6 @@
return tmp_surf;
}
-
-
-/**
- * TODO ***Migrate other functions! Oh, and test on Win/Mac
- */
-
-#if 0
-
-
void RoundCorners(SDL_Surface* s, Uint16 radius)
{
int y = 0;
@@ -182,7 +173,11 @@
SDL_UnlockSurface(s);
}
+/**
+ * TODO ***Migrate other functions! Oh, and test on Win/Mac
+ */
+#if 0
/**********************
Flip:
input: a SDL_Surface, x, y
Modified: branches/commonification/tux4kids-common/trunk/src/tux4kids-common.h
===================================================================
--- branches/commonification/tux4kids-common/trunk/src/tux4kids-common.h 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tux4kids-common/trunk/src/tux4kids-common.h 2009-07-29 17:55:26 UTC (rev 1289)
@@ -35,5 +35,6 @@
void DrawButton(SDL_Rect* target_rect, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
void DrawButtonOn(SDL_Surface* target, SDL_Rect* target_rect, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
SDL_Surface* CreateButton(int w, int h, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+void RoundCorners(SDL_Surface* s, Uint16 radius);
#endif
Modified: branches/commonification/tuxmath/trunk/configure.ac
===================================================================
--- branches/commonification/tuxmath/trunk/configure.ac 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tuxmath/trunk/configure.ac 2009-07-29 17:55:26 UTC (rev 1289)
@@ -151,15 +151,11 @@
[with_t4kcommon=yes])
if test "x$with_t4kcommon" = xyes; then
- RSVG_CFLAGS=""
- RSVG_LIBS=""
- PKG_CHECK_MODULES([T4KCOMMON],
- [t4kcommon],
- ,
- [AC_MSG_FAILURE([t4kcommon not found])])
- CFLAGS="$CFLAGS $T4KCOMMON_CFLAGS"
- LIBS="$LIBS $T4KCOMMON_LIBS"
- AC_DEFINE([HAVE_T4KCOMMON],[1],[Define to 1 if you have the `libt4kcommon` library])
+ AC_CHECK_LIB([t4kcommon],
+ [GetScreen],
+ ,
+ [with_t4kcommon=no;
+ AC_MSG_FAILURE([tux4kids-common test failed (--without-t4kcommon to disable)])])
fi
dnl Check for (somewhat) higher-level math functions - needed for SDL_extras
Modified: branches/commonification/tuxmath/trunk/src/SDL_extras.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/SDL_extras.c 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tuxmath/trunk/src/SDL_extras.c 2009-07-29 17:55:26 UTC (rev 1289)
@@ -18,7 +18,7 @@
#include "options.h"
-#ifndef HAVE_T4KCOMMON
+#ifndef HAVE_LIBT4KCOMMON
/* DrawButton() creates a translucent button with rounded ends
and draws it on the screen.
All colors and alpha values are supported.*/
@@ -50,7 +50,6 @@
RoundCorners(tmp_surf, radius);
return tmp_surf;
}
-#endif
void RoundCorners(SDL_Surface* s, Uint16 radius)
{
@@ -149,6 +148,7 @@
SDL_UnlockSurface(s);
}
+#endif
/**********************
Flip:
Modified: branches/commonification/tuxmath/trunk/src/SDL_extras.h
===================================================================
--- branches/commonification/tuxmath/trunk/src/SDL_extras.h 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tuxmath/trunk/src/SDL_extras.h 2009-07-29 17:55:26 UTC (rev 1289)
@@ -15,8 +15,8 @@
#include "SDL.h"
-#ifdef HAVE_T4KCOMMON
-# include "tux4kids-common.h"
+#ifdef HAVE_LIBT4KCOMMON
+# include "t4kcommon/tux4kids-common.h"
#else
#if SDL_BYTEORDER == SDL_BIG_ENDIAN
# define rmask 0xff000000
@@ -32,13 +32,12 @@
#endif
/* Non-text graphics functions: */
-#ifndef HAVE_T4KCOMMON
+#ifndef HAVE_LIBT4KCOMMON
void DrawButton(SDL_Rect* target_rect, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
SDL_Surface* CreateButton(int w, int h, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
+void RoundCorners(SDL_Surface* s, Uint16 radius);
#endif
-void RoundCorners(SDL_Surface* s, Uint16 radius);
-
SDL_Surface* Flip(SDL_Surface *in, int x, int y);
SDL_Surface* Blend(SDL_Surface *S1, SDL_Surface *S2, float gamma);
Modified: branches/commonification/tuxmath/trunk/src/menu.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/menu.c 2009-07-29 00:26:01 UTC (rev 1288)
+++ branches/commonification/tuxmath/trunk/src/menu.c 2009-07-29 17:55:26 UTC (rev 1289)
@@ -33,7 +33,7 @@
#include <string.h>
#ifdef HAVE_T4KCOMMON
-#include <tux4kids-common.h>
+#include "t4kcommon/tux4kids-common.h"
#endif
/* create string array of activities' names */
More information about the Tux4kids-commits
mailing list