[Super-tux-commit] supertux/lib/special sprite.cpp,1.35,1.36 sprite_data.cpp,1.3,1.4
Brought to you by:
wkendrick
From: Matze B. <mat...@us...> - 2005-04-01 12:17:35
|
Update of /cvsroot/super-tux/supertux/lib/special In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14310/lib/special Modified Files: sprite.cpp sprite_data.cpp Log Message: -Worldmap cleanups (use DrawingContext transformstack) -Refactoring/Cleanup in PlayerStatus handling (no separate handling of PlayerStatus in Player object now) -Reimplemented stalactite badguy -more smaller cleanups Index: sprite_data.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/special/sprite_data.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- sprite_data.cpp 28 Nov 2004 14:56:48 -0000 1.3 +++ sprite_data.cpp 1 Apr 2005 12:16:49 -0000 1.4 @@ -86,18 +86,6 @@ lisp->get("z-order", action->z_order); lisp->get("fps", action->fps); - // this doesn't seem to be used and implemented -#if 0 - std::vector <int> mask_color; - lispreader.read_int_vector("apply-mask", mask_color); - if(mask_color.size() == 4) { - for(std::vector<Surface*>::iterator i = action->surfaces.begin(); - i < action->surfaces.end(); i++) { - (*i)->apply_filter(MASK_FILTER, Color(mask_color)); - } - } -#endif - std::string mirror_action; lisp->get("mirror-action", mirror_action); if(!mirror_action.empty()) { @@ -136,8 +124,6 @@ { Actions::iterator i = actions.find(act); if(i == actions.end()) { - std::cerr << "Warning: Action '" << act << - "' not found on Sprite '" << name << "'\n"; return 0; } return i->second; Index: sprite.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/special/sprite.cpp,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- sprite.cpp 26 Nov 2004 14:45:31 -0000 1.35 +++ sprite.cpp 1 Apr 2005 12:16:49 -0000 1.36 @@ -34,7 +34,9 @@ Sprite::Sprite(SpriteData& newdata) : data(newdata), frame(0), animation_loops(-1) { - action = data.actions.begin()->second; + action = data.get_action("normal"); + if(!action) + action = data.actions.begin()->second; last_ticks = SDL_GetTicks(); } |