Author: ilor
Date: Fri Jul  4 01:30:04 2008
New Revision: 27705

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27705&view=rev
Log:
editor2 minor update

Modified:
    trunk/src/editor2/editor_controller.cpp
    trunk/src/editor2/editor_controller.hpp
    trunk/src/editor2/editor_map.cpp
    trunk/src/editor2/editor_map.hpp

Modified: trunk/src/editor2/editor_controller.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_controller.cpp?rev=27705&r1=27704&r2=27705&view=diff
==============================================================================
--- trunk/src/editor2/editor_controller.cpp (original)
+++ trunk/src/editor2/editor_controller.cpp Fri Jul  4 01:30:04 2008
@@ -13,6 +13,7 @@
 
 #include "editor_controller.hpp"
 #include "editor_display.hpp"
+#include "editor_map.hpp"
 #include "../preferences.hpp"
 
 #include "SDL.h"
@@ -22,14 +23,16 @@
 editor_controller::editor_controller(const config &game_config, CVideo& video)
 : game_config_(game_config), gui_(NULL)
 {
+       map_ = editor_map::new_map(44, 33, t_translation::GRASS_LAND);
+       init(video);
        gui_.invalidate_game_status();
        gui_.invalidate_all();
        gui_.draw();
        events::raise_draw_event();
-//     redraw_everything();
+       redraw_everything();
 }
 
-editor_controller::init_gui(CVideo& video)
+editor_controller::init(CVideo& video)
 {
        const config* theme_cfg = get_theme(game_config_, "editor2");
        const config theme = theme_cfg ? theme_cfg : config();

Modified: trunk/src/editor2/editor_controller.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_controller.hpp?rev=27705&r1=27704&r2=27705&view=diff
==============================================================================
--- trunk/src/editor2/editor_controller.hpp (original)
+++ trunk/src/editor2/editor_controller.hpp Fri Jul  4 01:30:04 2008
@@ -35,6 +35,8 @@
                bool can_execute_command(hotkey::HOTKEY_COMMAND, int) const {}
                void handle_event(const SDL_Event&){}
        private:    
+               /** init the display object and general set-up */ 
+               void init(CVideo& video);
                /** cref to the main game config */
                const config& game_config_;
                /** The current map object */

Modified: trunk/src/editor2/editor_map.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_map.cpp?rev=27705&r1=27704&r2=27705&view=diff
==============================================================================
--- trunk/src/editor2/editor_map.cpp (original)
+++ trunk/src/editor2/editor_map.cpp Fri Jul  4 01:30:04 2008
@@ -20,6 +20,13 @@
 : gamemap(terrain_cfg, data)
 {
 }
+
+editor_map editor_map::create_map(const config& terrain_cfg, size_t width, 
size_t height, t_translation::t_terrain filler)
+{
+       const t_translation::t_list column(height, filler);
+       const t_translation::t_map map(width, column);
+       return editor_map(terrain_cfg, gamemap::default_map_header + 
t_translation::write_game_map(map));
+}
        
 
 

Modified: trunk/src/editor2/editor_map.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/editor2/editor_map.hpp?rev=27705&r1=27704&r2=27705&view=diff
==============================================================================
--- trunk/src/editor2/editor_map.hpp (original)
+++ trunk/src/editor2/editor_map.hpp Fri Jul  4 01:30:04 2008
@@ -26,6 +26,7 @@
 class editor_map : public gamemap 
 {
        editor_map(const config& terrain_cfg, const std::string& data);
+       static editor_map new_map(const config& terrain_cfg, size_t width, 
size_t height, t_translation::t_terrain filler);
 };
 
 


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to