pingus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pingus-CVS] r2559 - trunk/src/editor


From: jave27
Subject: [Pingus-CVS] r2559 - trunk/src/editor
Date: Mon, 12 Dec 2005 01:03:23 +0100

Author: jave27
Date: 2005-12-12 01:03:13 +0100 (Mon, 12 Dec 2005)
New Revision: 2559

Modified:
   trunk/src/editor/level_objs.cxx
Log:
Minor hack to the sprite refresh function in the editor.

Modified: trunk/src/editor/level_objs.cxx
===================================================================
--- trunk/src/editor/level_objs.cxx     2005-12-11 18:01:39 UTC (rev 2558)
+++ trunk/src/editor/level_objs.cxx     2005-12-12 00:03:13 UTC (rev 2559)
@@ -128,23 +128,18 @@
 LevelObj::refresh_sprite()
 {
        // Apply modifier, then change the sprite loaded for this object in 
memory.
-       CL_SpriteDescription sprite_desc;
-       sprite_desc = Resource::load_sprite_desc(desc.res_name);
-       CL_Sprite spr = CL_Sprite(sprite_desc);
-       sprite_desc = CL_SpriteDescription();
-       CL_Surface sur = Resource::apply_modifier(spr.get_frame_surface(0), 
desc);
-       sprite_desc.add_frame(sur.get_pixeldata());
-       sprite = CL_Sprite(sprite_desc);
+       sprite = Resource::load_sprite(desc);
 
-       if (stretch_x || stretch_y)
+       if (0)
+       //if (stretch_x || stretch_y)
        {
                float w, h;
                // FIXME: Temporary hack
                w = 800;
                h = 600;
 
-               sur = 
Blitter::scale_surface_to_canvas(sprite.get_frame_surface(0), (int)w, (int)h);
-               sprite_desc = CL_SpriteDescription();
+               CL_Surface sur = 
Blitter::scale_surface_to_canvas(sprite.get_frame_surface(0), (int)w, (int)h);
+               CL_SpriteDescription sprite_desc;
                sprite_desc.add_frame(sur.get_pixeldata());
                sprite = CL_Sprite(sprite_desc);
        }





reply via email to

[Prev in Thread] Current Thread [Next in Thread]