[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.6,1.7 entran
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.6,1.7 entrance.hxx,1.3,1.4 exit.cxx,1.4,1.5 exit.hxx,1.2,1.3 |
Date: |
10 Oct 2002 12:25:56 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/worldobjs
In directory dark:/tmp/cvs-serv2198/worldobjs
Modified Files:
entrance.cxx entrance.hxx exit.cxx exit.hxx
Log Message:
- added exit/entrances back to the smallmap
- misc other cleanup
Index: entrance.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/entrance.cxx,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- entrance.cxx 4 Oct 2002 16:54:04 -0000 1.6
+++ entrance.cxx 10 Oct 2002 12:25:54 -0000 1.7
@@ -25,12 +25,14 @@
#include "../pingu.hxx"
#include "../game_time.hxx"
#include "../worldobjsdata/entrance_data.hxx"
+#include "../smallmap.hxx"
#include "entrance.hxx"
namespace WorldObjs {
Entrance::Entrance (const WorldObjsData::EntranceData& data_)
: data(new WorldObjsData::EntranceData(data_)),
+ smallmap_symbol("misc/smallmap_entrance", "core"),
last_release(-data->release_rate)
{
if (verbose > 2)
@@ -129,6 +131,12 @@
// FIXME: Why do we still have these hardcoded offsets?!
gc.draw(surface, Vector(data->pos.x - 32, data->pos.y - 16));
+}
+
+void
+Entrance::draw_smallmap(SmallMap* smallmap)
+{
+ smallmap->draw_sprite(smallmap_symbol, data->pos);
}
} // namespace WorldObjs
Index: entrance.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/entrance.hxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- entrance.hxx 2 Oct 2002 19:20:19 -0000 1.3
+++ entrance.hxx 10 Oct 2002 12:25:54 -0000 1.4
@@ -21,6 +21,7 @@
#define HEADER_PINGUS_ENTRANCE_HXX
#include <ClanLib/Display/Display/surface.h>
+#include "../sprite.hxx"
#include "../worldobj.hxx"
namespace WorldObjsData {
@@ -37,7 +38,8 @@
{
protected:
WorldObjsData::EntranceData* const data;
-
+
+ Sprite smallmap_symbol;
CL_Surface surface;
int last_release;
@@ -53,6 +55,8 @@
virtual void update ();
virtual void draw (GraphicContext& gc);
+
+ void draw_smallmap(SmallMap* smallmap);
private:
Entrance (const Entrance&);
Index: exit.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/exit.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- exit.cxx 4 Oct 2002 13:46:56 -0000 1.4
+++ exit.cxx 10 Oct 2002 12:25:54 -0000 1.5
@@ -27,6 +27,7 @@
#include "../pingu_action.hxx"
#include "../pingu.hxx"
#include "../worldobjsdata/exit_data.hxx"
+#include "../smallmap.hxx"
#include "exit.hxx"
namespace WorldObjs {
@@ -34,7 +35,8 @@
Exit::Exit (const WorldObjsData::ExitData& data_)
: data(new WorldObjsData::ExitData(data_)),
sprite(data->desc, 10.0f),
- flag("misc/flag" + to_string(data->owner_id), "core")
+ flag("misc/flag" + to_string(data->owner_id), "core"),
+ smallmap_symbol("misc/smallmap_exit", "core")
{
flag.set_align_center_bottom();
if (verbose > 2)
@@ -42,6 +44,8 @@
sprite.set_align_center_bottom();
+ smallmap_symbol.set_align_center_bottom();
+
if (data->use_old_pos_handling) {
data->pos.x += sprite.get_width() / 2;
data->pos.y += sprite.get_height();
@@ -67,6 +71,12 @@
{
gc.draw(sprite, data->pos);
gc.draw(flag, data->pos + Vector(40, 0));
+}
+
+void
+Exit::draw_smallmap(SmallMap* smallmap)
+{
+ smallmap->draw_sprite(smallmap_symbol, data->pos);
}
void
Index: exit.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/worldobjs/exit.hxx,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- exit.hxx 1 Oct 2002 19:53:46 -0000 1.2
+++ exit.hxx 10 Oct 2002 12:25:54 -0000 1.3
@@ -35,13 +35,16 @@
WorldObjsData::ExitData* const data;
Sprite sprite;
Sprite flag;
+ Sprite smallmap_symbol;
public:
Exit (const WorldObjsData::ExitData& data_);
~Exit ();
void on_startup ();
+
void draw (GraphicContext& gc);
+ void draw_smallmap(SmallMap* smallmap);
void update ();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/worldobjs entrance.cxx,1.6,1.7 entrance.hxx,1.3,1.4 exit.cxx,1.4,1.5 exit.hxx,1.2,1.3,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src goal_manager.cxx,1.1,1.2 goal_manager.hxx,1.1,1.2
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.21,1.22 goal_manager.hxx,1.2,1.3 pingus_main.cxx,1.23,1.24 screenshot.cxx,1.8,1.9 smallmap.cxx,1.22,1.23 smallmap.hxx,1.13,1.14 world.cxx,1.31,1.32 world.hxx,1.18,1.19 worldobj.cxx,1.9,1.10 worldobj.hxx,1.10,1.11
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src goal_manager.cxx,1.1,1.2 goal_manager.hxx,1.1,1.2
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src game_session.cxx,1.21,1.22 goal_manager.hxx,1.2,1.3 pingus_main.cxx,1.23,1.24 screenshot.cxx,1.8,1.9 smallmap.cxx,1.22,1.23 smallmap.hxx,1.13,1.14 world.cxx,1.31,1.32 world.hxx,1.18,1.19 worldobj.cxx,1.9,1.10 worldobj.hxx,1.10,1.11
- Index(es):