[Tux4kids-commits] r1418 - in branches/commonification/tuxtype/trunk: data/images/tux src
Bolesław Kulbabiński
bolekk-guest at alioth.debian.org
Wed Aug 12 12:48:11 UTC 2009
Author: bolekk-guest
Date: 2009-08-12 12:48:11 +0000 (Wed, 12 Aug 2009)
New Revision: 1418
Modified:
branches/commonification/tuxtype/trunk/data/images/tux/gulp0.png
branches/commonification/tuxtype/trunk/data/images/tux/gulp1.png
branches/commonification/tuxtype/trunk/data/images/tux/gulp2.png
branches/commonification/tuxtype/trunk/data/images/tux/gulp3.png
branches/commonification/tuxtype/trunk/data/images/tux/run0.png
branches/commonification/tuxtype/trunk/data/images/tux/run1.png
branches/commonification/tuxtype/trunk/data/images/tux/stand0.png
branches/commonification/tuxtype/trunk/data/images/tux/stand1.png
branches/commonification/tuxtype/trunk/data/images/tux/walk0.png
branches/commonification/tuxtype/trunk/data/images/tux/walk1.png
branches/commonification/tuxtype/trunk/data/images/tux/walk2.png
branches/commonification/tuxtype/trunk/data/images/tux/walk3.png
branches/commonification/tuxtype/trunk/data/images/tux/win0.png
branches/commonification/tuxtype/trunk/data/images/tux/win1.png
branches/commonification/tuxtype/trunk/data/images/tux/yipe0.png
branches/commonification/tuxtype/trunk/src/playgame.c
branches/commonification/tuxtype/trunk/src/playgame.h
Log:
moved the rest of playgame.c paths into fileops_media
Modified: branches/commonification/tuxtype/trunk/data/images/tux/gulp0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/gulp1.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/gulp2.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/gulp3.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/run0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/run1.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/stand0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/stand1.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/walk0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/walk1.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/walk2.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/walk3.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/win0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/win1.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/data/images/tux/yipe0.png
===================================================================
(Binary files differ)
Modified: branches/commonification/tuxtype/trunk/src/playgame.c
===================================================================
--- branches/commonification/tuxtype/trunk/src/playgame.c 2009-08-11 23:35:34 UTC (rev 1417)
+++ branches/commonification/tuxtype/trunk/src/playgame.c 2009-08-12 12:48:11 UTC (rev 1418)
@@ -86,6 +86,12 @@
SetSprite(ANIM_NUMS, NULL);
SetSprite(ANIM_FISHY, NULL);
SetSprite(ANIM_SPLAT, NULL);
+ SetSprite(ANIM_TUX_WALKING, NULL);
+ SetSprite(ANIM_TUX_STANDING, NULL);
+ SetSprite(ANIM_TUX_RUNNING, NULL);
+ SetSprite(ANIM_TUX_GULPING, NULL);
+ SetSprite(ANIM_TUX_WINNING, NULL);
+ SetSprite(ANIM_TUX_YIPING, NULL);
}
@@ -699,11 +705,16 @@
LOG( "=LoadTuxAnims(): Loading Tux Animations\n" );
- for ( i=0; i < TUX_NUM_STATES; i++ ) {
- tux_object.spr[i][RIGHT] = LoadSpriteNoPrefix( tux_sprite_fns[i], IMG_COLORKEY );
- tux_object.spr[i][LEFT] = FlipSprite( tux_object.spr[i][RIGHT], 1, 0 );
- }
+ tux_object.spr[TUX_WALKING][RIGHT] = GetSprite(ANIM_TUX_WALKING);
+ tux_object.spr[TUX_STANDING][RIGHT] = GetSprite(ANIM_TUX_STANDING);
+ tux_object.spr[TUX_RUNNING][RIGHT] = GetSprite(ANIM_TUX_RUNNING);
+ tux_object.spr[TUX_GULPING][RIGHT] = GetSprite(ANIM_TUX_GULPING);
+ tux_object.spr[TUX_WINNING][RIGHT] = GetSprite(ANIM_TUX_WINNING);
+ tux_object.spr[TUX_YIPING][RIGHT] = GetSprite(ANIM_TUX_YIPING);
+ for(i=0; i < TUX_NUM_STATES; i++)
+ tux_object.spr[i][LEFT] = FlipSprite(tux_object.spr[i][RIGHT], 1, 0);
+
tux_max_width = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->w;
height = tux_object.spr[TUX_STANDING][RIGHT]->frame[0]->h;
@@ -798,6 +809,8 @@
/**********************
FreeGame : Free all
the game elements
+NOTE: do not free data taken from fileops_media - it'll
+be freed when TuxType quits
***********************/
static void FreeGame(void)
{
@@ -809,8 +822,6 @@
for (i = 0; i < TUX_NUM_STATES; i++ )
{
- if (tux_object.spr[i][RIGHT])
- FreeSprite(tux_object.spr[i][RIGHT]);
tux_object.spr[i][RIGHT] = NULL;
if (tux_object.spr[i][LEFT])
Modified: branches/commonification/tuxtype/trunk/src/playgame.h
===================================================================
--- branches/commonification/tuxtype/trunk/src/playgame.h 2009-08-11 23:35:34 UTC (rev 1417)
+++ branches/commonification/tuxtype/trunk/src/playgame.h 2009-08-12 12:48:11 UTC (rev 1418)
@@ -110,15 +110,6 @@
TUX_NUM_STATES
};
-static char* tux_sprite_fns[TUX_NUM_STATES] = {
- "/images/tux/walk",
- "/images/tux/stand",
- "/images/tux/run",
- "/images/tux/gulp",
- "/images/tux/win",
- "/images/tux/yipe"
-};
-
#define RIGHT 0
#define LEFT 1
More information about the Tux4kids-commits
mailing list