[Tux4kids-commits] r608 - in tuxmath/trunk: . mingw src
cheezmeister-guest at alioth.debian.org
cheezmeister-guest at alioth.debian.org
Mon Aug 11 19:14:07 UTC 2008
Author: cheezmeister-guest
Date: 2008-08-11 19:14:06 +0000 (Mon, 11 Aug 2008)
New Revision: 608
Modified:
tuxmath/trunk/configure.ac
tuxmath/trunk/mingw/tuxmath.cbp
tuxmath/trunk/src/SDL_extras.h
tuxmath/trunk/src/credits.c
Log:
Fixed SDL_Pango support in credits, added multiplayer to autotools build and factroids to mingw build
Modified: tuxmath/trunk/configure.ac
===================================================================
--- tuxmath/trunk/configure.ac 2008-08-11 16:48:59 UTC (rev 607)
+++ tuxmath/trunk/configure.ac 2008-08-11 19:14:06 UTC (rev 608)
@@ -233,6 +233,7 @@
data/missions/campaign/ranger/Makefile
data/missions/campaign/scout/Makefile
data/missions/lessons/Makefile
+data/missions/multiplay/Makefile
data/sounds/Makefile
doc/Makefile
nsis/tuxmath.nsi
Modified: tuxmath/trunk/mingw/tuxmath.cbp
===================================================================
--- tuxmath/trunk/mingw/tuxmath.cbp 2008-08-11 16:48:59 UTC (rev 607)
+++ tuxmath/trunk/mingw/tuxmath.cbp 2008-08-11 19:14:06 UTC (rev 608)
@@ -55,6 +55,7 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
+ <Add option='-DPACKAGE=\\"tuxmath\\"' />
<Add option='-DPROGRAM_NAME=\\"tuxmath\\"' />
<Add option='-DDATA_PREFIX=\\"../data\\"' />
<Add option='-DLOCALEDIR=\\"/usr/local/share/locale\\"' />
@@ -67,10 +68,32 @@
<Add library="SDL_ttf" />
</Linker>
</Target>
+ <Target title="NixRelease">
+ <Option platforms="Unix;" />
+ <Option output="/usr/bin/tuxmath" prefix_auto="1" extension_auto="1" />
+ <Option object_output="obj/release" />
+ <Option type="1" />
+ <Option compiler="gcc" />
+ <Option use_console_runner="0" />
+ <Compiler>
+ <Add option="-O" />
+ <Add option="-Wall" />
+ <Add option='-DPACKAGE=\\"tuxmath\\"' />
+ <Add option='-DPROGRAM_NAME=\\"tuxmath\\"' />
+ <Add option='-DDATA_PREFIX=\\"/usr/local/share/tuxmath\\"' />
+ <Add option='-DLOCALEDIR=\\"/usr/local/share/locale\\"' />
+ <Add option="-DVERSION=FULLVERSION_STRING" />
+ </Compiler>
+ <Linker>
+ <Add library="SDL" />
+ <Add library="SDL_image" />
+ <Add library="SDL_mixer" />
+ <Add library="SDL_ttf" />
+ </Linker>
+ </Target>
</Build>
<Compiler>
<Add option="-Wall" />
- <Add option='-DPACKAGE=\\"tuxmath\\"' />
<Add directory="NOTE: CHANGE TO WHEREVER CONFIG.H IS LOCATED" />
<Add directory="../" />
</Compiler>
@@ -82,6 +105,7 @@
</Unit>
<Unit filename="version.h">
<Option target="WinRelease" />
+ <Option target="NixRelease" />
</Unit>
<Unit filename="../src/ConvertUTF.c">
<Option compilerVar="CC" />
Modified: tuxmath/trunk/src/SDL_extras.h
===================================================================
--- tuxmath/trunk/src/SDL_extras.h 2008-08-11 16:48:59 UTC (rev 607)
+++ tuxmath/trunk/src/SDL_extras.h 2008-08-11 19:14:06 UTC (rev 608)
@@ -28,6 +28,15 @@
#define amask 0xff000000
#endif
+#ifdef SDL_Pango
+
+#include "SDL_Pango.h"
+
+extern SDLPango_Context *context;
+void init_SDLPango_Context();
+void free_SDLPango_Context();
+#endif
+
void DrawButton(SDL_Rect* target_rect, int radius, Uint8 r, Uint8 g, Uint8 b, Uint8 a);
void RoundCorners(SDL_Surface* s, Uint16 radius);
SDL_Surface* Flip(SDL_Surface *in, int x, int y);
Modified: tuxmath/trunk/src/credits.c
===================================================================
--- tuxmath/trunk/src/credits.c 2008-08-11 16:48:59 UTC (rev 607)
+++ tuxmath/trunk/src/credits.c 2008-08-11 19:14:06 UTC (rev 608)
@@ -28,6 +28,9 @@
#include "fileops.h"
#include "setup.h"
#include "credits.h"
+#ifdef SDL_Pango
+# include "SDL_extras.h"
+#endif
char * credit_text[] = {
"-TUX, OF MATH COMMAND", /* '-' at beginning makes highlighted: */
@@ -591,11 +594,20 @@
#ifndef SDL_Pango
surf = TTF_RenderUTF8_Blended(default_font, str+hloffset, col);
-#else
+#else
+ printf("Using Pango\n");
+
+ SDLPango_Matrix colormatrix = {
+ col.r, col.r, 0, 0,
+ col.g, col.g, 0, 0,
+ col.b, col.b, 0, 0,
+ 0, 255, 0, 0,
+ };
+
if( context != NULL)
{
- SDLPango_SetDefaultColor(context, MATRIX_TRANSPARENT_BACK_BLACK_LETTER);
- SDLPango_SetText(context, t, -1);
+ SDLPango_SetDefaultColor(context, &colormatrix );
+ SDLPango_SetText(context, str, -1);
surf = SDLPango_CreateSurfaceDraw(context);
}
else {
More information about the Tux4kids-commits
mailing list