[Super-tux-commit] supertux/lib/special sprite.cpp,1.18,1.19 sprite.h,1.12,1.13
Brought to you by:
wkendrick
From: Ricardo C. <rm...@us...> - 2004-08-21 13:10:16
|
Update of /cvsroot/super-tux/supertux/lib/special In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26869/lib/special Modified Files: sprite.cpp sprite.h Log Message: Renamed code variables, as well. Index: sprite.cpp =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/special/sprite.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- sprite.cpp 21 Aug 2004 11:47:07 -0000 1.18 +++ sprite.cpp 21 Aug 2004 13:09:52 -0000 1.19 @@ -70,8 +70,8 @@ if(!lispreader.read_string("name", action->name)) if(!actions.empty()) Termination::abort("Error: If there are more than one action, they need names!", ""); - lispreader.read_int("x-offset", action->x_hotspot); - lispreader.read_int("y-offset", action->y_hotspot); + lispreader.read_int("x-offset", action->x_offset); + lispreader.read_int("y-offset", action->y_offset); lispreader.read_float("fps", action->fps); std::vector<std::string> images; @@ -90,8 +90,8 @@ void Sprite::init_defaults(Action* act) { - act->x_hotspot = 0; - act->y_hotspot = 0; + act->x_offset = 0; + act->y_offset = 0; act->fps = 10; start_animation(-1); @@ -215,7 +215,7 @@ << "/" << get_action_name() << std::endl; else context.draw_surface(action->surfaces[(int)frame], - pos - Vector(action->x_hotspot, action->y_hotspot), layer, drawing_effect); + pos - Vector(action->x_offset, action->y_offset), layer, drawing_effect); } #if 0 @@ -226,7 +226,7 @@ unsigned int frame = get_current_frame(); if (frame < surfaces.size()) - surfaces[frame]->draw_part(sx, sy, x - x_hotspot, y - y_hotspot, w, h); + surfaces[frame]->draw_part(sx, sy, x - x_offset, y - y_offset, w, h); } #endif Index: sprite.h =================================================================== RCS file: /cvsroot/super-tux/supertux/lib/special/sprite.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- sprite.h 18 Aug 2004 10:32:26 -0000 1.12 +++ sprite.h 21 Aug 2004 13:09:52 -0000 1.13 @@ -39,8 +39,8 @@ { std::string name; - int x_hotspot; - int y_hotspot; + int x_offset; + int y_offset; /** Frames per second */ float fps; @@ -49,8 +49,8 @@ }; public: - /** cur has to be a pointer to data in the form of ((x-hotspot 5) - (y-hotspot 10) ...) */ + /** cur has to be a pointer to data in the form of ((x-offset 5) + (y-offset 10) ...) */ Sprite(lisp_object_t* cur); ~Sprite(); |