[Tux4kids-commits] r1569 - in branches/commonification: . t4kcommon t4kcommon/trunk t4kcommon/trunk/src tuxmath/trunk/src
B. Luchen
cheezmeister-guest at alioth.debian.org
Tue Oct 6 00:02:44 UTC 2009
Author: cheezmeister-guest
Date: 2009-10-06 00:02:39 +0000 (Tue, 06 Oct 2009)
New Revision: 1569
Added:
branches/commonification/t4kcommon/
branches/commonification/t4kcommon/trunk/
branches/commonification/t4kcommon/trunk/src/
branches/commonification/t4kcommon/trunk/src/t4kcommon.h
Removed:
branches/commonification/t4kcommon/trunk/
branches/commonification/t4kcommon/trunk/src/tux4kids-common.h
branches/commonification/t4kcommon/trunk/t4kcommon/
branches/commonification/tux4kids-common/
Modified:
branches/commonification/t4kcommon/trunk/CMakeLists.txt
branches/commonification/t4kcommon/trunk/src/CMakeLists.txt
branches/commonification/t4kcommon/trunk/src/t4k-audio.c
branches/commonification/t4kcommon/trunk/src/t4k-loaders.c
branches/commonification/t4kcommon/trunk/src/t4k-main.c
branches/commonification/t4kcommon/trunk/src/t4k-menu.c
branches/commonification/t4kcommon/trunk/src/t4k-pixels.c
branches/commonification/t4kcommon/trunk/src/t4k-sdl.c
branches/commonification/tuxmath/trunk/src/titlescreen.c
branches/commonification/tuxmath/trunk/src/tuxmath.h
Log:
Renaming for consistency--t4kcommon for directories and lib, tux4kids-common for package name
Modified: branches/commonification/t4kcommon/trunk/CMakeLists.txt
===================================================================
--- branches/commonification/tux4kids-common/trunk/CMakeLists.txt 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/CMakeLists.txt 2009-10-06 00:02:39 UTC (rev 1569)
@@ -36,6 +36,6 @@
endif (APPLE)
-add_subdirectory(t4kcommon)
+add_subdirectory(src)
add_subdirectory(data)
Property changes on: branches/commonification/t4kcommon/trunk/src
___________________________________________________________________
Added: svn:ignore
+ CMakeCache.txt
CMakeFiles
cmake_install.cmake
install_manifest.txt
Makefile
*.o
*.a
Added: svn:mergeinfo
+
Modified: branches/commonification/t4kcommon/trunk/src/CMakeLists.txt
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/CMakeLists.txt 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/CMakeLists.txt 2009-10-06 00:02:39 UTC (rev 1569)
@@ -56,10 +56,10 @@
INSTALL( TARGETS t4kcommon
DESTINATION ${TUXTYPE_DESTINATION_DIR}/t4kcommon )
-INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/tux4kids-common.h
+INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/t4kcommon.h
DESTINATION include/t4kcommon)
-INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/tux4kids-common.h
+INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/t4kcommon.h
DESTINATION ${TUXMATH_DESTINATION_DIR}/t4kcommon )
-INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/tux4kids-common.h
+INSTALL(FILES ${T4KCOMMON_SOURCE_DIR}/t4kcommon.h
DESTINATION ${TUXTYPE_DESTINATION_DIR}/t4kcommon )
Modified: branches/commonification/t4kcommon/trunk/src/t4k-audio.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-audio.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-audio.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -21,7 +21,7 @@
***************************************************************************/
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
static Mix_Music *default_music = NULL;
Modified: branches/commonification/t4kcommon/trunk/src/t4k-loaders.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-loaders.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-loaders.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -21,7 +21,7 @@
Copyright: See COPYING file that comes with this distribution.
*/
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
#include "t4k-compiler.h"
Modified: branches/commonification/t4kcommon/trunk/src/t4k-main.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-main.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-main.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -11,7 +11,7 @@
Copyright: See COPYING file that comes with this distribution.
*/
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
int debug_status;
Modified: branches/commonification/t4kcommon/trunk/src/t4k-menu.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-menu.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-menu.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -11,7 +11,7 @@
Copyright: See COPYING file that comes with this distribution.
*/
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
#include "t4k-compiler.h"
Modified: branches/commonification/t4kcommon/trunk/src/t4k-pixels.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-pixels.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-pixels.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -27,7 +27,7 @@
$Id: pixels.c,v 1.3 2006/08/27 21:00:55 wkendrick Exp $
*/
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
#include "t4k-compiler.h"
Modified: branches/commonification/t4kcommon/trunk/src/t4k-sdl.c
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/t4k-sdl.c 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/t4k-sdl.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -12,7 +12,7 @@
#include <math.h>
-#include "tux4kids-common.h"
+#include "t4kcommon.h"
#include "t4k-globals.h"
SDL_Surface* screen = NULL;
Copied: branches/commonification/t4kcommon/trunk/src/t4kcommon.h (from rev 1564, branches/commonification/tux4kids-common/trunk/t4kcommon/tux4kids-common.h)
===================================================================
--- branches/commonification/t4kcommon/trunk/src/t4kcommon.h (rev 0)
+++ branches/commonification/t4kcommon/trunk/src/t4kcommon.h 2009-10-06 00:02:39 UTC (rev 1569)
@@ -0,0 +1,170 @@
+/*
+ tux4kids-common
+
+ Library of common functions used in Tux4Kids games.
+
+ Part of "Tux4Kids" Project
+ http://www.tux4kids.com/
+
+ Copyright: See COPYING file that comes with this distribution.
+*/
+
+#ifndef TUX4KIDS_COMMON_H
+#define TUX4KIDS_COMMON_H
+
+#include "SDL.h"
+#include "SDL_image.h"
+#include "SDL_mixer.h"
+
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
+#define rmask 0xff000000
+#define gmask 0x00ff0000
+#define bmask 0x0000ff00
+#define amask 0x000000ff
+#else
+#define rmask 0x000000ff
+#define gmask 0x0000ff00
+#define bmask 0x00ff0000
+#define amask 0xff000000
+#endif
+
+#define _(String) gettext (String)
+
+typedef enum { false, true } bool;
+
+extern const int debug_loaders;
+extern const int debug_menu;
+extern const int debug_menu_parser;
+extern const int debug_sdl;
+extern const int debug_all;
+
+/* FIXME: global vars such as screen should be hidden when all games
+ are using only getters (such as GetScreen() ) */
+extern SDL_Surface* screen;
+
+#define MAX_SPRITE_FRAMES 15
+
+typedef struct {
+ SDL_Surface *frame[MAX_SPRITE_FRAMES];
+ SDL_Surface *default_img;
+ int num_frames;
+ int cur;
+} sprite;
+
+/* from t4k-main.c */
+void InitT4KCommon(int debug_flags);
+
+/* from tk4-menu.c */
+
+/* special values used by RunMenu. RUN_MAIN_MENU is a special
+ activity that can be used in .xml menu structures but should not
+ be declared in activities' lists.
+ RunMenu returning QUIT indicates that user decided to quit application while
+ running the menu. Returning STOP indicates that user pressed stop button. */
+enum { RUN_MAIN_MENU = -3, QUIT = -2, STOP = -1 };
+
+extern SDL_Rect menu_rect, stop_rect, prev_rect, next_rect;
+extern SDL_Surface *stop_button, *prev_arrow, *next_arrow, *prev_gray, *next_gray;
+
+void SetActivitiesList(int num, char** acts);
+void SetMenuSounds(char* mus_path, Mix_Chunk* click, Mix_Chunk* hover);
+void SetImagePathPrefix(char* pref);
+
+void CreateOneLevelMenu(int index, int items, char** item_names, char** sprite_names, char* title, char* trailer);
+int RunMenu(int index, bool return_choice, void (*draw_background)(), int (*handle_event)(SDL_Event*), void (*handle_animations)(), int (*handle_activity)(int, int));
+void PrerenderMenu(int index);
+void PrerenderAll();
+void LoadMenu(int index, const char* file_name);
+void UnloadMenus(void);
+
+/* from tk4-sdl.c */
+
+/* For TransWipe(): */
+enum
+{
+ WIPE_BLINDS_VERT,
+ WIPE_BLINDS_HORIZ,
+ WIPE_BLINDS_BOX,
+ RANDOM_WIPE,
+ NUM_WIPES
+};
+
+//TODO most of these functions are documented...somewhere. That should end up
+//in this header eventually
+SDL_Surface* GetScreen();
+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);
+
+SDL_Surface* Flip(SDL_Surface *in, int x, int y);
+SDL_Surface* Blend(SDL_Surface *S1, SDL_Surface *S2, float gamma);
+
+void FreeSurfaceArray(SDL_Surface** surfs, int length);
+int inRect(SDL_Rect r, int x, int y);
+void SetRect(SDL_Rect* rect, const float* pos);
+void UpdateRect(SDL_Surface* surf, SDL_Rect* rect);
+
+void DarkenScreen(Uint8 bits);
+void ChangeWindowSize(int new_res_x, int new_res_y);
+void SwitchScreenMode(void);
+
+SDL_EventType WaitForEvent(SDL_EventMask events);
+SDL_Surface* zoom(SDL_Surface* src, int new_w, int new_h);
+
+int TransWipe(const SDL_Surface* newbkg, int type, int segments, int duration);
+void InitBlitQueue(void);
+void ResetBlitQueue(void);
+int AddRect(SDL_Rect* src, SDL_Rect* dst);
+int DrawSprite(sprite* gfx, int x, int y);
+int DrawObject(SDL_Surface* surf, int x, int y);
+void UpdateScreen(int* frame);
+int EraseSprite(sprite* img, SDL_Surface* curr_bkgd, int x, int y);
+int EraseObject(SDL_Surface* surf, SDL_Surface* curr_bkgd, int x, int y);
+
+
+/* from tk4-loaders.c */
+#define IMG_REGULAR 0x01
+#define IMG_COLORKEY 0x02
+#define IMG_ALPHA 0x04
+#define IMG_MODES 0x07
+
+#define IMG_NOT_REQUIRED 0x10
+#define IMG_NO_PNG_FALLBACK 0x20
+
+
+int CheckFile(const char* file);
+/**
+ * Add a path to search for data (in addition to t4kcommon's install path and
+ * the root directory) This affects how LoadImage and friends are able to
+ * find files.
+ */
+void AddDataPrefix(const char* path);
+
+SDL_Surface* LoadImage(const char* file_name, int mode);
+SDL_Surface* LoadScaledImage(const char* file_name, int mode, int width, int height);
+SDL_Surface* LoadImageOfBoundingBox(const char* file_name, int mode, int max_width, int max_height);
+
+SDL_Surface* LoadBkgd(const char* file_name, int width, int height);
+
+sprite* LoadSprite(const char* name, int mode);
+sprite* LoadScaledSprite(const char* name, int mode, int width, int height);
+sprite* LoadSpriteOfBoundingBox(const char* name, int mode, int max_width, int max_height);
+sprite* FlipSprite(sprite* in, int X, int Y);
+void FreeSprite(sprite* gfx);
+void NextFrame(sprite* s);
+
+Mix_Chunk* LoadSound(char* datafile);
+Mix_Music* LoadMusic(char *datafile);
+
+/* from tk4-loaders.c */
+
+void PlaySound(Mix_Chunk* sound);
+void PlaySoundLoop(Mix_Chunk* sound, int loops);
+void AudioHaltChannel( int channel );
+void AudioMusicLoad(char* music_path, int loops);
+void AudioMusicUnload();
+bool IsPlayingMusic();
+void AudioMusicPlay(Mix_Music *musicData, int loops);
+
+#endif
Property changes on: branches/commonification/t4kcommon/trunk/src/t4kcommon.h
___________________________________________________________________
Added: svn:mergeinfo
+
Deleted: branches/commonification/t4kcommon/trunk/src/tux4kids-common.h
===================================================================
--- branches/commonification/tux4kids-common/trunk/t4kcommon/tux4kids-common.h 2009-10-03 10:43:54 UTC (rev 1564)
+++ branches/commonification/t4kcommon/trunk/src/tux4kids-common.h 2009-10-06 00:02:39 UTC (rev 1569)
@@ -1,170 +0,0 @@
-/*
- tux4kids-common
-
- Library of common functions used in Tux4Kids games.
-
- Part of "Tux4Kids" Project
- http://www.tux4kids.com/
-
- Copyright: See COPYING file that comes with this distribution.
-*/
-
-#ifndef TUX4KIDS_COMMON_H
-#define TUX4KIDS_COMMON_H
-
-#include "SDL.h"
-#include "SDL_image.h"
-#include "SDL_mixer.h"
-
-#if SDL_BYTEORDER == SDL_BIG_ENDIAN
-#define rmask 0xff000000
-#define gmask 0x00ff0000
-#define bmask 0x0000ff00
-#define amask 0x000000ff
-#else
-#define rmask 0x000000ff
-#define gmask 0x0000ff00
-#define bmask 0x00ff0000
-#define amask 0xff000000
-#endif
-
-#define _(String) gettext (String)
-
-typedef enum { false, true } bool;
-
-extern const int debug_loaders;
-extern const int debug_menu;
-extern const int debug_menu_parser;
-extern const int debug_sdl;
-extern const int debug_all;
-
-/* FIXME: global vars such as screen should be hidden when all games
- are using only getters (such as GetScreen() ) */
-extern SDL_Surface* screen;
-
-#define MAX_SPRITE_FRAMES 15
-
-typedef struct {
- SDL_Surface *frame[MAX_SPRITE_FRAMES];
- SDL_Surface *default_img;
- int num_frames;
- int cur;
-} sprite;
-
-/* from t4k-main.c */
-void InitT4KCommon(int debug_flags);
-
-/* from tk4-menu.c */
-
-/* special values used by RunMenu. RUN_MAIN_MENU is a special
- activity that can be used in .xml menu structures but should not
- be declared in activities' lists.
- RunMenu returning QUIT indicates that user decided to quit application while
- running the menu. Returning STOP indicates that user pressed stop button. */
-enum { RUN_MAIN_MENU = -3, QUIT = -2, STOP = -1 };
-
-extern SDL_Rect menu_rect, stop_rect, prev_rect, next_rect;
-extern SDL_Surface *stop_button, *prev_arrow, *next_arrow, *prev_gray, *next_gray;
-
-void SetActivitiesList(int num, char** acts);
-void SetMenuSounds(char* mus_path, Mix_Chunk* click, Mix_Chunk* hover);
-void SetImagePathPrefix(char* pref);
-
-void CreateOneLevelMenu(int index, int items, char** item_names, char** sprite_names, char* title, char* trailer);
-int RunMenu(int index, bool return_choice, void (*draw_background)(), int (*handle_event)(SDL_Event*), void (*handle_animations)(), int (*handle_activity)(int, int));
-void PrerenderMenu(int index);
-void PrerenderAll();
-void LoadMenu(int index, const char* file_name);
-void UnloadMenus(void);
-
-/* from tk4-sdl.c */
-
-/* For TransWipe(): */
-enum
-{
- WIPE_BLINDS_VERT,
- WIPE_BLINDS_HORIZ,
- WIPE_BLINDS_BOX,
- RANDOM_WIPE,
- NUM_WIPES
-};
-
-//TODO most of these functions are documented...somewhere. That should end up
-//in this header eventually
-SDL_Surface* GetScreen();
-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);
-
-SDL_Surface* Flip(SDL_Surface *in, int x, int y);
-SDL_Surface* Blend(SDL_Surface *S1, SDL_Surface *S2, float gamma);
-
-void FreeSurfaceArray(SDL_Surface** surfs, int length);
-int inRect(SDL_Rect r, int x, int y);
-void SetRect(SDL_Rect* rect, const float* pos);
-void UpdateRect(SDL_Surface* surf, SDL_Rect* rect);
-
-void DarkenScreen(Uint8 bits);
-void ChangeWindowSize(int new_res_x, int new_res_y);
-void SwitchScreenMode(void);
-
-SDL_EventType WaitForEvent(SDL_EventMask events);
-SDL_Surface* zoom(SDL_Surface* src, int new_w, int new_h);
-
-int TransWipe(const SDL_Surface* newbkg, int type, int segments, int duration);
-void InitBlitQueue(void);
-void ResetBlitQueue(void);
-int AddRect(SDL_Rect* src, SDL_Rect* dst);
-int DrawSprite(sprite* gfx, int x, int y);
-int DrawObject(SDL_Surface* surf, int x, int y);
-void UpdateScreen(int* frame);
-int EraseSprite(sprite* img, SDL_Surface* curr_bkgd, int x, int y);
-int EraseObject(SDL_Surface* surf, SDL_Surface* curr_bkgd, int x, int y);
-
-
-/* from tk4-loaders.c */
-#define IMG_REGULAR 0x01
-#define IMG_COLORKEY 0x02
-#define IMG_ALPHA 0x04
-#define IMG_MODES 0x07
-
-#define IMG_NOT_REQUIRED 0x10
-#define IMG_NO_PNG_FALLBACK 0x20
-
-
-int CheckFile(const char* file);
-/**
- * Add a path to search for data (in addition to t4kcommon's install path and
- * the root directory) This affects how LoadImage and friends are able to
- * find files.
- */
-void AddDataPrefix(const char* path);
-
-SDL_Surface* LoadImage(const char* file_name, int mode);
-SDL_Surface* LoadScaledImage(const char* file_name, int mode, int width, int height);
-SDL_Surface* LoadImageOfBoundingBox(const char* file_name, int mode, int max_width, int max_height);
-
-SDL_Surface* LoadBkgd(const char* file_name, int width, int height);
-
-sprite* LoadSprite(const char* name, int mode);
-sprite* LoadScaledSprite(const char* name, int mode, int width, int height);
-sprite* LoadSpriteOfBoundingBox(const char* name, int mode, int max_width, int max_height);
-sprite* FlipSprite(sprite* in, int X, int Y);
-void FreeSprite(sprite* gfx);
-void NextFrame(sprite* s);
-
-Mix_Chunk* LoadSound(char* datafile);
-Mix_Music* LoadMusic(char *datafile);
-
-/* from tk4-loaders.c */
-
-void PlaySound(Mix_Chunk* sound);
-void PlaySoundLoop(Mix_Chunk* sound, int loops);
-void AudioHaltChannel( int channel );
-void AudioMusicLoad(char* music_path, int loops);
-void AudioMusicUnload();
-bool IsPlayingMusic();
-void AudioMusicPlay(Mix_Music *musicData, int loops);
-
-#endif
Modified: branches/commonification/tuxmath/trunk/src/titlescreen.c
===================================================================
--- branches/commonification/tuxmath/trunk/src/titlescreen.c 2009-10-05 22:39:30 UTC (rev 1568)
+++ branches/commonification/tuxmath/trunk/src/titlescreen.c 2009-10-06 00:02:39 UTC (rev 1569)
@@ -40,7 +40,7 @@
#include "menu.h"
#ifdef HAVE_LIBT4KCOMMON
-#include <t4kcommon/tux4kids-common.h>
+#include <t4kcommon/t4kcommon.h>
#endif
/* these are all menu choices that are available in tuxmath.
Modified: branches/commonification/tuxmath/trunk/src/tuxmath.h
===================================================================
--- branches/commonification/tuxmath/trunk/src/tuxmath.h 2009-10-05 22:39:30 UTC (rev 1568)
+++ branches/commonification/tuxmath/trunk/src/tuxmath.h 2009-10-06 00:02:39 UTC (rev 1569)
@@ -25,7 +25,7 @@
#include "config.h"
#ifdef HAVE_LIBT4KCOMMON
-#include <t4kcommon/tux4kids-common.h>
+#include <t4kcommon/t4kcommon.h>
#endif
// Translation stuff (now works for Mac and Win too!):
More information about the Tux4kids-commits
mailing list