[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src col_map.cxx,1.7,1.8 groundpiece_data.
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src col_map.cxx,1.7,1.8 groundpiece_data.cxx,1.10,1.11 groundpiece_data.hxx,1.13,1.14 world.cxx,1.24,1.25 world.hxx,1.11,1.12 worldobj.hxx,1.7,1.8 worldobj_data_factory.cxx,1.16,1.17 |
Date: |
16 Sep 2002 19:18:58 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv6593
Modified Files:
col_map.cxx groundpiece_data.cxx groundpiece_data.hxx
world.cxx world.hxx worldobj.hxx worldobj_data_factory.cxx
Log Message:
introducing WorldObj Groundpieces...
Index: col_map.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/col_map.cxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- col_map.cxx 4 Sep 2002 19:40:19 -0000 1.7
+++ col_map.cxx 16 Sep 2002 19:18:56 -0000 1.8
@@ -227,6 +227,7 @@
bool
ColMap::blit_allowed (int x, int y, GroundpieceData::GPType gtype)
{
+ // FIXME: Inline me
if (gtype == GroundpieceData::GP_BRIDGE)
{
int pixel = getpixel (x, y);
Index: groundpiece_data.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- groundpiece_data.cxx 14 Sep 2002 19:06:33 -0000 1.10
+++ groundpiece_data.cxx 16 Sep 2002 19:18:56 -0000 1.11
@@ -19,6 +19,8 @@
#include <fstream>
#include "editor/editor_groundpiece_obj.hxx"
+#include "worldobjs/groundpiece.hxx"
+#include "world.hxx"
#include "xml_helper.hxx"
GroundpieceData::GroundpieceData ()
@@ -148,6 +150,12 @@
EditorObjLst lst;
lst.push_back(new EditorGroundpieceObj(*this));
return lst;
+}
+
+WorldObj*
+GroundpieceData::create_WorldObj()
+{
+ return new WorldObjs::Groundpiece(*this);
}
void
Index: groundpiece_data.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/groundpiece_data.hxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- groundpiece_data.hxx 16 Sep 2002 15:47:35 -0000 1.13
+++ groundpiece_data.hxx 16 Sep 2002 19:18:56 -0000 1.14
@@ -58,7 +58,7 @@
~GroundpieceData ();
- WorldObj* create_WorldObj() { return 0; }
+ WorldObj* create_WorldObj();
EditorObjLst create_EditorObj();
void write_xml(std::ostream& xml);
Index: world.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.cxx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- world.cxx 16 Sep 2002 15:47:35 -0000 1.24
+++ world.cxx 16 Sep 2002 19:18:56 -0000 1.25
@@ -71,17 +71,12 @@
std::cout << "World: Time is not in the tolerated range: " << exit_time <<
std::endl;
shutdown_time = -1;
- init_map(plf);
- init_worldobjs(plf);
-}
-
-void
-World::init_map(PLF* plf)
-{
+ // Create the groundmap
gfx_map = new PingusSpotMap(plf);
- colmap = gfx_map->get_colmap();
-
+ colmap = gfx_map->get_colmap();
world_obj.push_back (gfx_map);
+
+ init_worldobjs(plf);
}
void
Index: world.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/world.hxx,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- world.hxx 14 Sep 2002 22:41:31 -0000 1.11
+++ world.hxx 16 Sep 2002 19:18:56 -0000 1.12
@@ -100,7 +100,6 @@
View* view;
void init_worldobjs (PLF* plf);
- void init_map (PLF* plf);
public:
World(PLF*);
Index: worldobj.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj.hxx,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- worldobj.hxx 16 Sep 2002 15:47:35 -0000 1.7
+++ worldobj.hxx 16 Sep 2002 19:18:56 -0000 1.8
@@ -73,6 +73,12 @@
stuff onto the gfx map or do other manipulations to the World */
virtual void on_startup ();
+ /** @return true if this WorldObj is empty and doesn't have an
+ update() or draw() function, but only a on_startup() one. The
+ World can so decide which objects need to stay active and which
+ one can get purged after calling on_startup() */
+ virtual bool purge_after_startup() { return false; }
+
/** The update function is called once a game loop, the delta
* specifies how much time is passed since the last update
* delta = 1.0 means that one second of realtime has passed. */
Index: worldobj_data_factory.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobj_data_factory.cxx,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- worldobj_data_factory.cxx 16 Sep 2002 16:47:41 -0000 1.16
+++ worldobj_data_factory.cxx 16 Sep 2002 19:18:56 -0000 1.17
@@ -48,6 +48,7 @@
#include "worldobjsdata/teleporter_data.hxx"
#include "worldobjsdata/rain_generator_data.hxx"
#include "worldobjsdata/snow_generator_data.hxx"
+#include "groundpiece_data.hxx"
using namespace WorldObjsData;
@@ -100,6 +101,9 @@
// Weather-Backward compability
new WorldObjDataFactoryImpl<SnowGeneratorData>("snow");
new WorldObjDataFactoryImpl<RainGeneratorData>("rain");
+
+ // Groundpieces
+ new WorldObjDataFactoryImpl<GroundpieceData>("groundpiece");
}
return instance_;
@@ -159,6 +163,5 @@
{
factories[id] = factory;
}
-
/* EOF */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src col_map.cxx,1.7,1.8 groundpiece_data.cxx,1.10,1.11 groundpiece_data.hxx,1.13,1.14 world.cxx,1.24,1.25 world.hxx,1.11,1.12 worldobj.hxx,1.7,1.8 worldobj_data_factory.cxx,1.16,1.17,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs groundpiece.cxx,NONE,1.1 groundpiece.hxx,NONE,1.1 Makefile.am,1.10,1.11
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/particles rain_particle.cxx,1.3,1.4 snow_particle.cxx,1.5,1.6
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs groundpiece.cxx,NONE,1.1 groundpiece.hxx,NONE,1.1 Makefile.am,1.10,1.11
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/particles rain_particle.cxx,1.3,1.4 snow_particle.cxx,1.5,1.6
- Index(es):