[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor object_manager.cxx,1.32,1.33 o
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor object_manager.cxx,1.32,1.33 object_selector.cxx,1.18,1.19 weather_obj.cxx,1.8,1.9 weather_obj.hxx,1.7,1.8 |
Date: |
16 Sep 2002 15:47:37 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv30898/src/editor
Modified Files:
object_manager.cxx object_selector.cxx weather_obj.cxx
weather_obj.hxx
Log Message:
- made weather thingies real worldobjs
Index: object_manager.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_manager.cxx,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- object_manager.cxx 15 Sep 2002 21:21:47 -0000 1.32
+++ object_manager.cxx 16 Sep 2002 15:47:35 -0000 1.33
@@ -123,16 +123,9 @@
i->surface = PingusResource::load_surface(i->desc);
}
- vector<WeatherData> temp_weather = plf->get_weather();
vector<WorldObjData*> temp_worldobj = plf->get_worldobjs_data();
for (vector<GroundpieceData>::iterator i = temp_surfaces.begin(); i !=
temp_surfaces.end(); ++i) {
- const EditorObjLst& temp = i->create_EditorObj();
- editor_objs.insert(editor_objs.end(), temp.begin(), temp.end() );
- }
-
-
- for (vector<WeatherData>::iterator i = temp_weather.begin(); i !=
temp_weather.end(); ++i) {
const EditorObjLst& temp = i->create_EditorObj();
editor_objs.insert(editor_objs.end(), temp.begin(), temp.end() );
}
Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- object_selector.cxx 15 Sep 2002 15:30:21 -0000 1.18
+++ object_selector.cxx 16 Sep 2002 15:47:35 -0000 1.19
@@ -212,7 +212,7 @@
EditorObjLst
ObjectSelector::get_weather()
{
- WeatherData weather;
+ std::string type;
bool done = false;
CL_Display::clear_display();
@@ -226,17 +226,18 @@
switch (read_key())
{
case CL_KEY_1:
- weather.type = "snow";
+ type = "snow-generator";
done = true;
break;
case CL_KEY_2:
- weather.type = "rain";
+ type = "rain-generator";
done = true;
break;
}
}
- return weather.create_EditorObj ();
+ std::cout << "Weather objects currently not implemented" << std::endl;
+ return EditorObjLst();
}
EditorObjLst
Index: weather_obj.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.cxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- weather_obj.cxx 11 Sep 2002 12:45:58 -0000 1.8
+++ weather_obj.cxx 16 Sep 2002 15:47:35 -0000 1.9
@@ -22,17 +22,17 @@
#include "editor_view.hxx"
#include "weather_obj.hxx"
-WeatherObj::WeatherObj(const WeatherData& data)
+WeatherObj::WeatherObj(const std::string& type_)
+ : type(type_),
+ pos(0,0,200)
{
- type = data.type;
- pos = CL_Vector(0,0,200);
dragging = false;
- if (type == "rain")
+ if (type == "rain-generator")
{
sprite = Sprite("editor/weather_rain", "core");
}
- else if (type == "snow")
+ else if (type == "snow-generator")
{
sprite = Sprite("editor/weather_snow", "core");
}
@@ -76,17 +76,16 @@
void
WeatherObj::write_xml(std::ostream& xml)
{
- xml << " <weather>\n"
- << " <type>" << type << "</type>\n";
+ xml << " <worldobj type=\"" << type << "\"/>\n";
XMLhelper::write_vector_xml(xml, pos);
- xml << " </weather>\n"
+ xml << " </worldobj>\n"
<< std::endl;
}
EditorObj*
WeatherObj::duplicate()
{
- return new WeatherObj(static_cast<WeatherData>(*this));
+ return new WeatherObj(type);
}
void
Index: weather_obj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/weather_obj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- weather_obj.hxx 11 Sep 2002 12:45:58 -0000 1.7
+++ weather_obj.hxx 16 Sep 2002 15:47:35 -0000 1.8
@@ -21,17 +21,17 @@
#define HEADER_PINGUS_EDITOR_WEATHER_OBJ_HXX
#include <ClanLib/Core/Math/cl_vector.h>
-#include "../weather_data.hxx"
#include "sprite_editorobj.hxx"
-class WeatherObj : public SpriteEditorObj, public WeatherData
+class WeatherObj : public SpriteEditorObj
{
private:
+ std::string type;
CL_Vector pos;
bool dragging;
public:
- WeatherObj (const WeatherData& data);
+ WeatherObj (const std::string& type_);
virtual ~WeatherObj();
virtual void drag ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor object_manager.cxx,1.32,1.33 object_selector.cxx,1.18,1.19 weather_obj.cxx,1.8,1.9 weather_obj.hxx,1.7,1.8,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/particles Makefile.am,1.7,1.8
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata rain_generator_data.cxx,NONE,1.1 rain_generator_data.hxx,NONE,1.1 snow_generator_data.cxx,NONE,1.1 snow_generator_data.hxx,NONE,1.1 Makefile.am,1.8,1.9
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/particles Makefile.am,1.7,1.8
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjsdata rain_generator_data.cxx,NONE,1.1 rain_generator_data.hxx,NONE,1.1 snow_generator_data.cxx,NONE,1.1 snow_generator_data.hxx,NONE,1.1 Makefile.am,1.8,1.9
- Index(es):