pingus-cvs
[Top][All Lists]
Advanced

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

[Pingus-CVS] r2697 - branches/pingus_sdl/src/editor


From: grumbel at BerliOS
Subject: [Pingus-CVS] r2697 - branches/pingus_sdl/src/editor
Date: Fri, 19 Jan 2007 22:48:25 +0100

Author: grumbel
Date: 2007-01-19 22:48:25 +0100 (Fri, 19 Jan 2007)
New Revision: 2697

Modified:
   branches/pingus_sdl/src/editor/context_menu.cpp
   branches/pingus_sdl/src/editor/editor_screen.cpp
   branches/pingus_sdl/src/editor/level_objs.cpp
   branches/pingus_sdl/src/editor/panel_buttons.cpp
   branches/pingus_sdl/src/editor/xml_level.cpp
Log:
- a few fixes to the editor

Modified: branches/pingus_sdl/src/editor/context_menu.cpp
===================================================================
--- branches/pingus_sdl/src/editor/context_menu.cpp     2007-01-19 10:56:00 UTC 
(rev 2696)
+++ branches/pingus_sdl/src/editor/context_menu.cpp     2007-01-19 21:48:25 UTC 
(rev 2697)
@@ -78,7 +78,7 @@
                {
                        // Draw the box
                        gc.draw_fillrect(pos.x, pos.y, pos.x + width, pos.y + 
total_height, 
-                               Color(211,211,211,100));
+                                         Color(211,211,211,100));
                        // Draw the border
                        gc.draw_rect(pos.x, pos.y, pos.x + width, pos.y + 
total_height, 
                                      Color(0,0,0));

Modified: branches/pingus_sdl/src/editor/editor_screen.cpp
===================================================================
--- branches/pingus_sdl/src/editor/editor_screen.cpp    2007-01-19 10:56:00 UTC 
(rev 2696)
+++ branches/pingus_sdl/src/editor/editor_screen.cpp    2007-01-19 21:48:25 UTC 
(rev 2697)
@@ -142,8 +142,7 @@
 EditorScreen::draw(DrawingContext &gc)
 {
        // Black out screen
-       gc.draw_fillrect(0, 0, (float)Display::get_width(), 
-                         (float)Display::get_height(), Color(0,0,0), -10000);
+       gc.fill_screen(Color(0,0,0));
        gui_manager->draw(gc);
 
        // FIXME: Remove this warning

Modified: branches/pingus_sdl/src/editor/level_objs.cpp
===================================================================
--- branches/pingus_sdl/src/editor/level_objs.cpp       2007-01-19 10:56:00 UTC 
(rev 2696)
+++ branches/pingus_sdl/src/editor/level_objs.cpp       2007-01-19 21:48:25 UTC 
(rev 2697)
@@ -167,13 +167,12 @@
                }
                else            // No stretch involved
                        pb = Resource::load_pixelbuffer(desc);
-#if 0                
-               SpriteDescription sprite_desc;
-               sprite_desc.add_frame(pb);
-               sprite = Sprite(sprite_desc);
 
-               sprite.set_alignment(origin, x, y);
-#endif 
+               ////SpriteDescription sprite_desc;
+               ////sprite_desc.add_frame(pb);
+               ////sprite = Sprite(sprite_desc);
+                sprite = Sprite(pb);
+               ////sprite.set_alignment(origin, x, y);
        }
        set_translated_pos();
 }

Modified: branches/pingus_sdl/src/editor/panel_buttons.cpp
===================================================================
--- branches/pingus_sdl/src/editor/panel_buttons.cpp    2007-01-19 10:56:00 UTC 
(rev 2696)
+++ branches/pingus_sdl/src/editor/panel_buttons.cpp    2007-01-19 21:48:25 UTC 
(rev 2697)
@@ -148,14 +148,13 @@
 void
 PanelButtonGroundpiece::on_primary_button_click(int x, int y)
 {
-#if 0
        PanelButton::on_primary_button_click(x, y);
 
        panel->get_combobox(1)->clear();
        panel->get_combobox(1)->set_label("Type");
        panel->get_combobox(2)->set_label("Subtype");
        panel->get_combobox(3)->set_label("Groundpiece");
-       std::vector<std::string> groundpieces = 
Resource::get_sections("groundpieces");
+       std::vector<std::string> groundpieces; //// = 
Resource::get_sections("groundpieces");
        for (unsigned i = 0; i < groundpieces.size(); i++)
        {
                // We add each ComboItem to the first box:
@@ -165,14 +164,12 @@
                        groundpieces[i]));
        }
        panel->get_combobox(1)->set_enabled(true);
-#endif
 }
 
 // Populate the other comboboxes with the available resources.
 void
 PanelButtonGroundpiece::combobox_changed(int i, const std::string &value)
 {
-#if 0
        std::string section;
        if (i == 1)
        {
@@ -181,8 +178,8 @@
                panel->get_combobox(2)->set_enabled(true);
                panel->get_combobox(3)->set_enabled(false);
 
-               std::vector<std::string> groundpieces = Resource::get_sections(
-                       
panel->get_combobox(1)->get_selected_item()->get_displayed_string());
+               std::vector<std::string> groundpieces;//// = 
Resource::get_sections(
+                
////panel->get_combobox(1)->get_selected_item()->get_displayed_string());
                for (std::vector<std::string>::const_iterator it = 
groundpieces.begin();
                        it != groundpieces.end(); it++)
                        panel->get_combobox(2)->add(new GUI::ComboItem(value + 
"/" + (*it), (*it)));            
@@ -193,8 +190,8 @@
                panel->get_combobox(3)->clear();
                panel->get_combobox(3)->set_enabled(true);
 
-               std::vector<std::string> groundpieces = Resource::get_resources(
-                       "sprite", value);
+               std::vector<std::string> groundpieces;//// = 
Resource::get_resources(
+               ////    "sprite", value);
                for (std::vector<std::string>::const_iterator it = 
groundpieces.begin();
                        it != groundpieces.end(); it++)
                {
@@ -214,7 +211,6 @@
                
obj->set_type(panel->get_combobox(1)->get_selected_item()->get_displayed_string());
                panel->get_screen()->add_object(obj);
        }
-#endif
 }
 
 PanelButtonHead::PanelButtonHead(EditorPanel *p)

Modified: branches/pingus_sdl/src/editor/xml_level.cpp
===================================================================
--- branches/pingus_sdl/src/editor/xml_level.cpp        2007-01-19 10:56:00 UTC 
(rev 2696)
+++ branches/pingus_sdl/src/editor/xml_level.cpp        2007-01-19 21:48:25 UTC 
(rev 2697)
@@ -126,13 +126,12 @@
 // Load an existing level from a file
 void XMLLevel::load_level(const std::string& filename)
 {
-#if 0
        if (impl)
                delete impl;
        impl = new LevelImpl();
 
        // Load the level from the file - we don't care what it's res_name is.
-       XMLPingusLevel existing_level("", filename);
+       PingusLevel existing_level("", filename);
        
        // Assign all of the level information to our LevelImpl
        impl->levelname = existing_level.get_levelname();
@@ -150,7 +149,7 @@
        // Temporary objects
        unsigned attribs;
        Vector3f p;
-       Colorf tmp_color;
+       Color tmp_color;
        ResDescriptor desc;
        std::string tmp_str;
        int tmp_int;
@@ -245,7 +244,6 @@
 
        // Sort by Z coordinate
        impl->sort_objs();
-#endif
 }
 
 void





reply via email to

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