[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.10,1.11
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.10,1.11 object_selector.hxx,1.8,1.9 |
Date: |
8 Sep 2002 18:13:06 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/editor
In directory dark:/tmp/cvs-serv696/src/editor
Modified Files:
object_selector.cxx object_selector.hxx
Log Message:
- fixed trap in the editor (well, moving them is still broken now)
- some worldmap rewrite stuff, completly #ifdef'ed out at the moment
Index: object_selector.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.cxx,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- object_selector.cxx 6 Sep 2002 17:33:29 -0000 1.10
+++ object_selector.cxx 8 Sep 2002 18:13:04 -0000 1.11
@@ -45,6 +45,14 @@
#include "../backgrounds/solidcolor_background.hxx"
#include "../backgrounds/thunderstorm_background.hxx"
+#include "../editorobjs/bumper_obj.hxx"
+#include "../editorobjs/guillotine_obj.hxx"
+#include "../editorobjs/laser_exit_obj.hxx"
+#include "../editorobjs/spike_obj.hxx"
+#include "../editorobjs/fake_exit_obj.hxx"
+#include "../editorobjs/hammer_obj.hxx"
+#include "../editorobjs/smasher_obj.hxx"
+
#include "../worldobjs/teleporter.hxx"
#include "../worldobjs/ice_block.hxx"
#include "../worldobjs/info_box.hxx"
@@ -53,6 +61,8 @@
using namespace std;
+using namespace EditorObjs;
+
ObjectSelector::ObjectSelector()
{
last_object = "GroundPieces/";
@@ -80,16 +90,11 @@
return select_obj_type();
}
-/*
+
EditorObjLst
ObjectSelector::get_trap()
{
- TrapData trap;
-
- trap.pos = pos;
-
CL_Display::clear_display();
-
font->print_left(20, 20, _("1 - guillotine"));
font->print_left(20, 50, _("2 - hammer"));
font->print_left(20, 80, _("3 - spike"));
@@ -99,44 +104,29 @@
font->print_left(20,200, _("7 - bumper"));
Display::flip_display();
- trap.type = "";
- while (trap.type.empty())
+ while (true)
{
switch (read_key())
{
case CL_KEY_1:
- trap.type = "guillotine";
- break;
+ return GuillotineObj::create (pos);
case CL_KEY_2:
- trap.type = "hammer";
- break;
+ return HammerObj::create (pos);
case CL_KEY_3:
- trap.type = "spike";
- break;
+ return SpikeObj::create (pos);
case CL_KEY_4:
- trap.type = "laser_exit";
- break;
+ return LaserExitObj::create (pos);
case CL_KEY_5:
- trap.type = "fake_exit";
- break;
+ return FakeExitObj::create (pos);
case CL_KEY_6:
- trap.type = "smasher";
- break;
+ return SmasherObj::create (pos);
case CL_KEY_7:
- trap.type = "bumper";
- break;
+ return BumperObj::create (pos);
case CL_KEY_ESCAPE:
return EditorObjLst();
}
- CL_System::keep_alive ();
- CL_System::sleep (20);
}
-
- // FIXME: Can somebody enlight me, why gcc gives here a warrning?:
- // object_selector.cxx:107: warning: control reaches end of non-void
function `ObjectSelector::get_trap()'
- return trap.create_EditorObj ();
}
-*/
EditorObjLst
ObjectSelector::get_groundpiece(const GroundpieceData::GPType & gptype)
@@ -397,10 +387,11 @@
font->print_left(20,210, _("x - Exit"));
font->print_left(20,230, _("l - Liquid"));
font->print_left(20,250, _("w - Weather"));
- font->print_left(20,270, _("o - WorldObject"));
- font->print_left(20,290, _("z - Background"));
- font->print_left(20,310, _("p - Prefab (ObjectGroup)"));
- font->print_left(20,330, _("f - something from file (~/.pingus/images/)"));
+ font->print_left(20,270, _("t - Traps"));
+ font->print_left(20,290, _("o - WorldObject"));
+ font->print_left(20,310, _("z - Background"));
+ font->print_left(20,330, _("p - Prefab (ObjectGroup)"));
+ font->print_left(20,350, _("f - something from file (~/.pingus/images/)"));
Display::flip_display();
exit_loop = false;
@@ -409,8 +400,8 @@
{
switch (read_key())
{
- //case CL_KEY_T:
- //return get_trap();
+ case CL_KEY_T:
+ return get_trap();
case CL_KEY_B:
return get_groundpiece(GroundpieceData::GP_BRIDGE);
Index: object_selector.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/editor/object_selector.hxx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- object_selector.hxx 6 Sep 2002 17:33:29 -0000 1.8
+++ object_selector.hxx 8 Sep 2002 18:13:04 -0000 1.9
@@ -53,7 +53,7 @@
std::string read_string(const std::string &, const std::string &);
EditorObjLst get_obj(int, int);
- //EditorObjLst get_trap();
+ EditorObjLst get_trap();
EditorObjLst get_groundpiece(const GroundpieceData::GPType & gptype);
EditorObjLst get_hotspot(const std::string&);
EditorObjLst get_entrance();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/editor object_selector.cxx,1.10,1.11 object_selector.hxx,1.8,1.9,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src xml_plf.cxx,1.12,1.13 xml_plf.hxx,1.5,1.6
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap graph.hxx,1.7,1.8 pingus.hxx,1.9,1.10 worldmap.cxx,1.10,1.11 worldmap.hxx,1.9,1.10
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src xml_plf.cxx,1.12,1.13 xml_plf.hxx,1.5,1.6
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/worldmap graph.hxx,1.7,1.8 pingus.hxx,1.9,1.10 worldmap.cxx,1.10,1.11 worldmap.hxx,1.9,1.10
- Index(es):