Răsfoiți Sursa

Delete world-editor

Daniele Bartolini 12 ani în urmă
părinte
comite
7b94b16940

+ 0 - 49
tools/gui/world-editor/CMakeLists.txt

@@ -1,49 +0,0 @@
-cmake_minimum_required(VERSION 2.8)
-
-find_package(PkgConfig)
-
-pkg_check_modules(GTKMM gtkmm-3.0)
-
-link_directories(${GTKMM_LIBRARY_DIRS} ${CROWN_BINARY_DIR})
-
-set (INCLUDES
-	terrain
-)
-
-set (SRC
-	world-editor.cpp
-	CrownDrawingArea.cpp
-)
-
-set (HEADERS
-	CrownDrawingArea.h
-)
-
-set (TERRAIN_SRC
-	terrain/Heightfield.cpp
-)
-
-set (TERRAIN_HEADERS
-	terrain/Heightfield.h
-)
-
-set (WORLD_EDITOR_SRC
-	${SRC}
-
-	${TERRAIN_SRC}
-)
-
-set (WORLD_EDITOR_HEADERS
-	${HEADERS}
-
-	${TERRAIN_HEADERS}
-)
-
-include_directories(${GTKMM_INCLUDE_DIRS} ${INCLUDES})
-
-add_executable(world-editor ${WORLD_EDITOR_SRC} ${WORLD_EDITOR_HEADERS})
-
-target_link_libraries(world-editor ${GTKMM_LIBRARIES} X11 GL crown)
-
-install (TARGETS world-editor DESTINATION bin/world-editor)
-install (FILES ui/world-editor.glade DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/world-editor/ui)

+ 0 - 172
tools/gui/world-editor/CrownDrawingArea.cpp

@@ -1,172 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include "CrownDrawingArea.h"
-#include <iostream>
-#include <gdk/gdkx.h>
-#include "Assert.h"
-#include <cstdio>
-#include <GL/gl.h>
-#include <gtkmm/window.h>
-#include <glibmm.h>
-
-namespace crown
-{
-
-//-----------------------------------------------------------------------------
-CrownDrawingArea::CrownDrawingArea(Device* engine) :
-	Gtk::DrawingArea(),
-	m_engine(engine)
-{
-	Gtk::Widget::set_double_buffered(false);
-
-	Display* dpy = gdk_x11_get_default_xdisplay();
-	int xscreen = DefaultScreen(dpy);
-	GdkScreen* screen = gdk_screen_get_default();
-
-	// Color index buffer not supported - deprecated
-	int32_t fbAttribs[] =
-	{
-		GLX_DOUBLEBUFFER,		static_cast<int32_t>(True),
-		GLX_RED_SIZE,			8,
-		GLX_GREEN_SIZE,			8,
-		GLX_BLUE_SIZE,			8,
-		GLX_ALPHA_SIZE,			8,
-		GLX_DEPTH_SIZE,			24,
-		GLX_STENCIL_SIZE,		0,
-		GLX_ACCUM_RED_SIZE,		0,
-		GLX_ACCUM_GREEN_SIZE,	0,
-		GLX_ACCUM_BLUE_SIZE,	0,
-		GLX_ACCUM_ALPHA_SIZE,	0,
-		GLX_RENDER_TYPE,		static_cast<int32_t>(GLX_RGBA_BIT),
-		GLX_DRAWABLE_TYPE,		static_cast<int32_t>(GLX_WINDOW_BIT),
-		GLX_X_RENDERABLE,		static_cast<int32_t>(True),
-		GLX_CONFIG_CAVEAT,		static_cast<int32_t>(GLX_DONT_CARE),
-		GLX_TRANSPARENT_TYPE,	static_cast<int32_t>(GLX_NONE),
-		static_cast<int32_t>(None)
-	};
-
-	int32_t fbCount;
-	GLXFBConfig* fbConfig = glXChooseFBConfig(dpy, xscreen, fbAttribs, &fbCount);
-
-	if (!fbConfig)
-	{
-		printf("Unable to find a matching FrameBuffer configuration.");
-		return;
-	}
-
-	XVisualInfo* visualInfo = glXGetVisualFromFBConfig(dpy, fbConfig[0]);
-
-	if (!visualInfo)
-	{
-		printf("Unable to find a matching Visual for the FrameBuffer configuration.");
-		XFree(fbConfig);
-		return;
-	}
- 
-	XVisualInfo* xvisual = visualInfo;
-	GdkVisual* visual = gdk_x11_screen_lookup_visual(screen, xvisual->visualid);
-
-	
-	gtk_widget_set_visual(GTK_WIDGET(this->gobj()), visual);
-
-	m_context = glXCreateContext(dpy, xvisual, NULL, True);
-
-	XFree(visualInfo);
-	XFree(fbConfig);
-	XFlush(dpy);
-
-	m_display = dpy;
-}
-
-//-----------------------------------------------------------------------------
-CrownDrawingArea::~CrownDrawingArea()
-{
-	if (m_context)
-	{
-		if (m_context == glXGetCurrentContext())
-		{
-			glXMakeCurrent(m_display, None, NULL);
-		}
-
-		glXDestroyContext(m_display, m_context);
-	}
-}
-
-//-----------------------------------------------------------------------------
-bool CrownDrawingArea::make_current()
-{
-	Glib::RefPtr<Gdk::Window> gdk_win = get_window();
-
-	return (glXMakeContextCurrent(m_display,
-								  GDK_WINDOW_XID(gdk_win->gobj()),
-								  GDK_WINDOW_XID(gdk_win->gobj()),
-								  m_context) == True);
-}
-
-//-----------------------------------------------------------------------------
-void CrownDrawingArea::swap_buffers()
-{
-	Glib::RefPtr<Gdk::Window> gdk_win = get_window();
-
-	glXSwapBuffers(m_display, GDK_WINDOW_XID(gdk_win->gobj()));
-}
-
-//-----------------------------------------------------------------------------
-void CrownDrawingArea::on_realize()
-{
-	Gtk::DrawingArea::on_realize();
-
-	make_current();
-
-	char* argv[] = {"crown", "--dev" };
-
-	m_engine->init(2, argv);
-
-	Glib::signal_idle().connect(sigc::mem_fun(*this, &CrownDrawingArea::on_idle));
-}
-
-//-----------------------------------------------------------------------------
-bool CrownDrawingArea::on_draw(const ::Cairo::RefPtr< ::Cairo::Context >& cr)
-{
-	(void)cr;
-	return true;
-}
-
-//-----------------------------------------------------------------------------
-bool CrownDrawingArea::on_idle()
-{
-	make_current();
-
-	m_engine->frame();
-
-	swap_buffers();
-
-	return true;
-}
-
-} // namespace crown
-

+ 0 - 67
tools/gui/world-editor/CrownDrawingArea.h

@@ -1,67 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-#include <gtkmm/drawingarea.h>
-#include <X11/Xutil.h>
-#include <X11/Xatom.h>
-#include <X11/Xlib.h>
-#include <GL/glx.h>
-
-#include "Device.h"
-
-namespace crown
-{
-
-// Custom widget to draw with OpenGL
-class CrownDrawingArea : public Gtk::DrawingArea
-{
-public:
-
-				CrownDrawingArea(Device* engine);
-	virtual		~CrownDrawingArea();
-
-	void		on_realize();
-	bool		on_draw(const ::Cairo::RefPtr< ::Cairo::Context >& cr);
-
-	bool		on_idle();
-
-protected:
-
-	Display*	m_display;
-	GLXContext	m_context;
-
-	Device*		m_engine;
-
-private:
-
-	bool		make_current();
-	void		swap_buffers();
-};
-
-} // namespace crown
-

+ 0 - 173
tools/gui/world-editor/terrain/Heightfield.cpp

@@ -1,173 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#include "Heightfield.h"
-
-namespace crown
-{
-
-//-----------------------------------------------------------------------------
-Heightfield::Heightfield() :
-	m_initial_width(0),
-	m_initial_height(0),
-	m_initial_meters_per_tile(0),
-	m_initial_altitude(0.0f),
-	m_initial_min_altitude(0.0f),
-	m_initial_max_altitude(0.0f),
-
-	m_width(0),
-	m_height(0),
-	m_meters_per_tile(0),
-
-	m_min_altitude(0.0f),
-	m_max_altitude(0.0f),
-
-	m_altitudes(NULL)
-{
-}
-
-//-----------------------------------------------------------------------------
-Heightfield::~Heightfield()
-{
-	if (m_altitudes != NULL)
-	{
-		m_allocator.deallocate(m_altitudes);
-	}
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::recreate(uint32_t width, uint32_t height, uint32_t meters_per_tile, float initial_altitude, float min_altitude, float max_altitude)
-{
-	// Recreate the heightfield if already existent
-	if (m_altitudes != NULL)
-	{
-		m_allocator.deallocate(m_altitudes);
-		m_altitudes = NULL;
-	}
-
-	m_initial_width = width;
-	m_initial_height = height;
-	m_initial_meters_per_tile = meters_per_tile;
-	m_initial_altitude = initial_altitude;
-	m_initial_min_altitude = min_altitude;
-	m_initial_max_altitude = max_altitude;
-
-	m_width = width;
-	m_height = height;
-	m_meters_per_tile = meters_per_tile;
-	m_min_altitude = min_altitude;
-	m_max_altitude = max_altitude;
-
-	m_altitudes = (float*)m_allocator.allocate(width * height * sizeof(float));
-
-	set_altitudes(m_initial_altitude);
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::clear()
-{
-	m_width = m_initial_width;
-	m_height = m_initial_height;
-	m_meters_per_tile = m_initial_meters_per_tile;
-	m_min_altitude = m_initial_min_altitude;
-	m_max_altitude = m_initial_max_altitude;
-
-	set_altitudes(m_initial_altitude);
-}
-
-//-----------------------------------------------------------------------------
-uint32_t Heightfield::width() const
-{
-	return m_width;
-}
-
-//-----------------------------------------------------------------------------
-uint32_t Heightfield::height() const
-{
-	return m_height;
-}
-
-//-----------------------------------------------------------------------------
-float Heightfield::min_altitude() const
-{
-	return m_min_altitude;
-}
-
-//-----------------------------------------------------------------------------
-float Heightfield::max_altitude() const
-{
-	return m_max_altitude;
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::set_min_altitude(float min)
-{
-	m_min_altitude = min;
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::set_max_altitude(float max)
-{
-	m_max_altitude = max;
-}
-
-//-----------------------------------------------------------------------------
-float Heightfield::altitude(uint32_t x, uint32_t y) const
-{
-	return m_altitudes[coords_to_index(x, y)];
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::set_altitude(uint32_t x, uint32_t y, float altitude)
-{
-	const uint32_t adjusted_altitude = (altitude < m_min_altitude) ? m_min_altitude : (altitude > m_max_altitude) ? m_max_altitude : altitude;
-
-	m_altitudes[coords_to_index(x, y)] = adjusted_altitude;
-}
-
-//-----------------------------------------------------------------------------
-void Heightfield::set_altitudes(float altitude)
-{
-	for (uint32_t w = 0; w < m_width; w++)
-	{
-		for (uint32_t h = 0; h < m_height; h++)
-		{
-			set_altitude(w, h, altitude);
-		}
-	}
-}
-
-//-----------------------------------------------------------------------------
-uint32_t Heightfield::coords_to_index(uint32_t x, uint32_t y) const
-{
-	CE_ASSERT(x < m_width, "X coordinates beyond heightfield width");
-	CE_ASSERT(y < m_height, "Y coordinates beyond heightfield height");
-
-	return m_width * y + x;
-}
-
-} // namespace crown
-

+ 0 - 95
tools/gui/world-editor/terrain/Heightfield.h

@@ -1,95 +0,0 @@
-/*
-Copyright (c) 2013 Daniele Bartolini, Michele Rossi
-Copyright (c) 2012 Daniele Bartolini, Simone Boscaratto
-
-Permission is hereby granted, free of charge, to any person
-obtaining a copy of this software and associated documentation
-files (the "Software"), to deal in the Software without
-restriction, including without limitation the rights to use,
-copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the
-Software is furnished to do so, subject to the following
-conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#pragma once
-
-#include "Types.h"
-#include "HeapAllocator.h"
-
-namespace crown
-{
-
-/// Represents a heightfiled.
-class Heightfield
-{
-public:
-
-				Heightfield();
-				~Heightfield();
-
-	/// (Re)Creates the heightfield of sizes @a width by @a height.
-	/// The param @a meters_per_tile indicates how many meters should be mapped per tile unit. (Higher values
-	///	means better quality at same sizes. You can also specify an @a initial_height for all the tiles of the heightmap.
-	void		recreate(uint32_t width, uint32_t height, uint32_t meters_per_tile, float initial_altitude, float min_altitude, float max_altitude);
-
-	/// Clears the content of the heightfield, switching it to the initial parameters passed to @a recreate().
-	void		clear();
-
-	uint32_t	width() const;
-	uint32_t	height() const;
-
-	float		min_altitude() const;
-	float		max_altitude() const;
-
-	void		set_min_altitude(float min);
-	void		set_max_altitude(float max);
-
-	/// Returns the altitude value for the tile at @a x and @a y coordinates.
-	float		altitude(uint32_t x, uint32_t y) const;
-
-	/// Sets the @a height value for the tile @a x and @a y coordinates.
-	void		set_altitude(uint32_t x, uint32_t y, float altitude);
-
-	/// Sets the @a height value for all the tiles.
-	void		set_altitudes(float altitude);
-
-private:
-
-	uint32_t	coords_to_index(uint32_t x, uint32_t y) const;
-
-private:
-
-	HeapAllocator	m_allocator;
-
-	uint32_t		m_initial_width;
-	uint32_t		m_initial_height;
-	uint32_t		m_initial_meters_per_tile;
-	float			m_initial_altitude;
-	float			m_initial_min_altitude;
-	float			m_initial_max_altitude;
-
-	uint32_t		m_width;
-	uint32_t		m_height;
-	uint32_t		m_meters_per_tile;
-	float			m_min_altitude;
-	float			m_max_altitude;
-
-	// A buffer of heights of width by height.
-	float*			m_altitudes;
-};
-
-} // namespace crown
-

+ 0 - 276
tools/gui/world-editor/ui/world-editor.glade

@@ -1,276 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<interface>
-  <!-- interface-requires gtk+ 3.0 -->
-  <object class="GtkWindow" id="window1">
-    <property name="can_focus">False</property>
-    <child>
-      <object class="GtkBox" id="box1">
-        <property name="visible">True</property>
-        <property name="can_focus">False</property>
-        <property name="orientation">vertical</property>
-        <child>
-          <object class="GtkMenuBar" id="menubar1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-            <child>
-              <object class="GtkMenuItem" id="menuitem1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_File</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem1">
-                        <property name="label">gtk-new</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem2">
-                        <property name="label">gtk-open</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem3">
-                        <property name="label">gtk-save</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem4">
-                        <property name="label">gtk-save-as</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem5">
-                        <property name="label">gtk-quit</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                        <signal name="activate" handler="on_quit" swapped="no"/>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem2">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Edit</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu2">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem6">
-                        <property name="label">gtk-cut</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem7">
-                        <property name="label">gtk-copy</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem8">
-                        <property name="label">gtk-paste</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem9">
-                        <property name="label">gtk-delete</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkSeparatorMenuItem" id="separatormenuitem2">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="menuitem5">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Grid size</property>
-                        <property name="use_underline">True</property>
-                        <child type="submenu">
-                          <object class="GtkMenu" id="menu4">
-                            <property name="visible">True</property>
-                            <property name="can_focus">False</property>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="radiomenuitem2">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">0.25</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="radiomenuitem3">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">0.5</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">radiomenuitem2</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="radiomenuitem4">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">1</property>
-                                <property name="use_underline">True</property>
-                                <property name="active">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">radiomenuitem3</property>
-                              </object>
-                            </child>
-                            <child>
-                              <object class="GtkRadioMenuItem" id="radiomenuitem5">
-                                <property name="visible">True</property>
-                                <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">2</property>
-                                <property name="use_underline">True</property>
-                                <property name="draw_as_radio">True</property>
-                                <property name="group">radiomenuitem4</property>
-                              </object>
-                            </child>
-                          </object>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem3">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_View</property>
-                <property name="use_underline">True</property>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem6">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Tools</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu5">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkMenuItem" id="menuitem7">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Resource browser</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                    </child>
-                    <child>
-                      <object class="GtkMenuItem" id="menuitem8">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="label" translatable="yes">Terrain</property>
-                        <property name="use_underline">True</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-            <child>
-              <object class="GtkMenuItem" id="menuitem4">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label" translatable="yes">_Help</property>
-                <property name="use_underline">True</property>
-                <child type="submenu">
-                  <object class="GtkMenu" id="menu3">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <child>
-                      <object class="GtkImageMenuItem" id="imagemenuitem10">
-                        <property name="label">gtk-about</property>
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="use_underline">True</property>
-                        <property name="use_stock">True</property>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-              </object>
-            </child>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">0</property>
-          </packing>
-        </child>
-        <child>
-          <object class="GtkToolbar" id="toolbar1">
-            <property name="visible">True</property>
-            <property name="can_focus">False</property>
-          </object>
-          <packing>
-            <property name="expand">False</property>
-            <property name="fill">True</property>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-      </object>
-    </child>
-  </object>
-</interface>

+ 0 - 35
tools/gui/world-editor/world-editor.cpp

@@ -1,35 +0,0 @@
-#include <gtkmm.h>
-#include "CrownDrawingArea.h"
-#include "Crown.h"
-
-using namespace crown;
-
-int main(int argc, char *argv[])
-{
-	Gtk::Main kit(argc, argv);
-
-	Device* engine = device();
-
-	CrownDrawingArea crown_area(engine);
-	crown_area.set_size_request(800, 500);
-
-	Glib::RefPtr<Gtk::Builder> builder = Gtk::Builder::create_from_file("ui/world-editor.glade");
-
-	Gtk::Window* window = NULL;
-	builder->get_widget("window1", window);
-
-	window->set_title("World editor");
-
-	Gtk::Box* box = NULL;
-	builder->get_widget("box1", box);
-
-	box->pack_start(crown_area);
-
-	crown_area.show();
-
-	Gtk::Main::run(*window);
-
-	engine->shutdown();
-
-	return EXIT_SUCCESS;
-}