[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] [pingus] push by address@hidden - Moved LevelImpl into Edit
From: |
pingus |
Subject: |
[Pingus-CVS] [pingus] push by address@hidden - Moved LevelImpl into EditorLevel file on 2011-10-17 21:44 GMT |
Date: |
Mon, 17 Oct 2011 21:45:20 +0000 |
Revision: ed1a7b66a884
Author: Ingo Ruhnke <address@hidden>
Date: Mon Oct 17 14:44:35 2011
Log: Moved LevelImpl into EditorLevel file
http://code.google.com/p/pingus/source/detail?r=ed1a7b66a884
Deleted:
/src/editor/level_impl.hpp
Modified:
/src/editor/editor_level.cpp
/src/editor/generic_level_obj.cpp
/src/editor/level_obj.hpp
/src/editor/level_obj_factory.hpp
/src/editor/object_selector_list.hpp
=======================================
--- /src/editor/level_impl.hpp Mon Sep 12 13:41:30 2011
+++ /dev/null
@@ -1,88 +0,0 @@
-// Pingus - A free Lemmings clone
-// Copyright (C) 2007 Jason Green <address@hidden>,
-// Ingo Ruhnke <address@hidden>
-//
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-#ifndef HEADER_PINGUS_EDITOR_LEVEL_IMPL_HPP
-#define HEADER_PINGUS_EDITOR_LEVEL_IMPL_HPP
-
-#include <algorithm>
-#include <map>
-#include <string>
-#include <vector>
-
-#include "editor/editor_screen.hpp"
-#include "editor/level_obj.hpp"
-#include "editor/editor_level.hpp"
-
-namespace Editor {
-
-class LevelImpl
-{
-public:
- // Set defaults in constructor
- LevelImpl() :
- resname(),
- levelname(),
- description(),
- ambient_light(255, 255, 255),
- size(),
- number_of_pingus(),
- number_to_save(),
- actions(),
- time(),
- author(),
- music(),
- objects()
- {
- // Do nothing
- }
-
- /** Destructor */
- ~LevelImpl()
- {
- }
-
- std::string resname;
-
- std::string levelname;
- std::string description;
-
- Color ambient_light;
- Size size;
-
- int number_of_pingus;
- int number_to_save;
-
- std::map<std::string, int> actions;
-
- int time;
-
- std::string author;
- std::string music;
-
- EditorLevel::Objects objects;
-
-private:
- LevelImpl (const LevelImpl&);
- LevelImpl& operator= (const LevelImpl&);
-};
-
-} // namespace Editor
-
-#endif
-
-/* EOF */
-
=======================================
--- /src/editor/editor_level.cpp Mon Sep 12 16:30:49 2011
+++ /src/editor/editor_level.cpp Mon Oct 17 14:44:35 2011
@@ -22,7 +22,7 @@
#include "editor/level_obj.hpp"
#include "editor/level_obj_factory.hpp"
#include "editor/generic_level_obj.hpp"
-#include "editor/level_impl.hpp"
+#include "editor/level_data.hpp"
#include "pingus/pingus_level.hpp"
#include "pingus/prefab_file.hpp"
#include "util/log.hpp"
@@ -31,6 +31,57 @@
namespace Editor {
+class LevelImpl
+{
+public:
+ // Set defaults in constructor
+ LevelImpl() :
+ resname(),
+ levelname(),
+ description(),
+ ambient_light(255, 255, 255),
+ size(),
+ number_of_pingus(),
+ number_to_save(),
+ actions(),
+ time(),
+ author(),
+ music(),
+ objects()
+ {
+ // Do nothing
+ }
+
+ /** Destructor */
+ ~LevelImpl()
+ {
+ }
+
+ std::string resname;
+
+ std::string levelname;
+ std::string description;
+
+ Color ambient_light;
+ Size size;
+
+ int number_of_pingus;
+ int number_to_save;
+
+ std::map<std::string, int> actions;
+
+ int time;
+
+ std::string author;
+ std::string music;
+
+ EditorLevel::Objects objects;
+
+private:
+ LevelImpl (const LevelImpl&);
+ LevelImpl& operator= (const LevelImpl&);
+};
+
static bool LevelObjSort(const LevelObjPtr& a, const LevelObjPtr& b)
{
return (a->get_pos().z < b->get_pos().z);
@@ -38,7 +89,7 @@
// Default constructor
EditorLevel::EditorLevel() :
- impl(new LevelImpl())
+ impl(new LevelImpl)
{
set_impl_defaults();
}
=======================================
--- /src/editor/generic_level_obj.cpp Tue Oct 11 08:42:27 2011
+++ /src/editor/generic_level_obj.cpp Mon Oct 17 14:44:35 2011
@@ -210,7 +210,6 @@
{
if (get_rect().contains(Vector2i(x,y)))
{
- Vector2i offset = sprite.get_offset();
Rect rect = get_rect();
Color pixel = surface.get_pixel(x - rect.left, y - rect.top);
return pixel.a != 0;
=======================================
--- /src/editor/level_obj.hpp Mon Sep 12 15:43:02 2011
+++ /src/editor/level_obj.hpp Mon Oct 17 14:44:35 2011
@@ -29,8 +29,6 @@
namespace Editor {
-class LevelImpl;
-
const unsigned HAS_TYPE = 1 << 0;
const unsigned HAS_SPEED = 1 << 1;
const unsigned HAS_PARALLAX = 1 << 2;
=======================================
--- /src/editor/level_obj_factory.hpp Mon Sep 12 16:30:49 2011
+++ /src/editor/level_obj_factory.hpp Mon Oct 17 14:44:35 2011
@@ -23,8 +23,6 @@
namespace Editor {
-class LevelImpl;
-
class LevelObjFactory
{
private:
=======================================
--- /src/editor/object_selector_list.hpp Tue Sep 13 05:38:41 2011
+++ /src/editor/object_selector_list.hpp Mon Oct 17 14:44:35 2011
@@ -26,7 +26,6 @@
namespace Editor {
class LevelObj;
-class LevelImpl;
class EditorScreen;
class ObjectSelector;
class ObjectSelectorSet;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] [pingus] push by address@hidden - Moved LevelImpl into EditorLevel file on 2011-10-17 21:44 GMT,
pingus <=