[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Enigma-cvs] enigma/src items.cc,1.93,1.94
From: |
Ralf Westram <address@hidden> |
Subject: |
[Enigma-cvs] enigma/src items.cc,1.93,1.94 |
Date: |
Sun, 09 Nov 2003 11:45:09 +0000 |
Update of /cvsroot/enigma/enigma/src
In directory subversions:/tmp/cvs-serv30327/src
Modified Files:
items.cc
Log Message:
- renamed it-soother to it-ring
- it-ring exchanges marbles if white and black marble are present
Index: items.cc
===================================================================
RCS file: /cvsroot/enigma/enigma/src/items.cc,v
retrieving revision 1.93
retrieving revision 1.94
diff -C2 -d -r1.93 -r1.94
*** items.cc 27 Oct 2003 22:14:43 -0000 1.93
--- items.cc 9 Nov 2003 11:45:06 -0000 1.94
***************
*** 106,111 ****
class Dummyitem : public Item {
CLONEOBJ(Dummyitem);
- public:
- Dummyitem() : Item("it-dummy") {}
void on_pickup(Actor *) {
--- 106,109 ----
***************
*** 117,139 ****
fprintf(stderr, "Dropped item 0x%x\n", code);
}
};
class Weight : public Item {
CLONEOBJ(Weight);
- public:
- Weight() : Item("it-weight") {}
void on_pickup(Actor *a) {
ActorInfo *ai = a->get_actorinfo();
ai->mass += 10.0;
}
! ItemAction activate(Actor *, GridPos)
! {
return ITEM_KEEP;
}
};
class Pin : public Item {
CLONEOBJ(Pin);
! public:
void on_pickup(Actor *a) {
a->set_spikes(true);
--- 115,138 ----
fprintf(stderr, "Dropped item 0x%x\n", code);
}
+ public:
+ Dummyitem() : Item("it-dummy") {}
};
class Weight : public Item {
CLONEOBJ(Weight);
void on_pickup(Actor *a) {
ActorInfo *ai = a->get_actorinfo();
ai->mass += 10.0;
}
! ItemAction activate(Actor *, GridPos) {
return ITEM_KEEP;
}
+ public:
+ Weight() : Item("it-weight") {}
};
class Pin : public Item {
CLONEOBJ(Pin);
!
void on_pickup(Actor *a) {
a->set_spikes(true);
***************
*** 142,145 ****
--- 141,145 ----
a->set_spikes(false);
}
+ public:
Pin() : Item("it-pin") {}
};
***************
*** 195,199 ****
return false;
}
-
ItemAction activate(Actor *a, GridPos) {
SendMessage(a, "shield");
--- 195,198 ----
***************
*** 201,205 ****
}
-
public:
Umbrella() : Item ("it-umbrella") {}
--- 200,203 ----
***************
*** 230,234 ****
/* -------------------- Booze -------------------- */
! namespace
{
class Booze : public Item {
--- 228,232 ----
/* -------------------- Booze -------------------- */
! namespace
{
class Booze : public Item {
***************
*** 2160,2177 ****
//----------------------------------------
! // Soother
//----------------------------------------
namespace
{
! class Soother : public Item {
! CLONEOBJ(Soother);
public:
! Soother() : Item ("it-soother") {}
ItemAction activate(Actor *a, GridPos) {
! play_sound("warp");
! world::RespawnActor(a);
! return ITEM_KILL;
}
};
--- 2158,2179 ----
//----------------------------------------
! // Ring
//----------------------------------------
namespace
{
! class Ring : public Item {
! CLONEOBJ(Ring);
public:
! Ring() : Item ("it-ring") {}
ItemAction activate(Actor *a, GridPos) {
! if (ExchangeMarbles(a)) {
! play_sound("warp");
! }
! else {
! world::RespawnActor(a);
! }
! return ITEM_DROP;
}
};
***************
*** 2517,2520 ****
--- 2519,2523 ----
Register("it-puller-s", new Puller(SOUTH));
Register("it-puller-w", new Puller(WEST));
+ Register(new Ring);
Register(new Seed);
Register("it-seed_wood", new Seed(Seed::WOOD));
***************
*** 2528,2532 ****
Register(new SignalFilterItem("it-signal-filter0", 0));
Register(new SignalFilterItem("it-signal-filter1", 1));
- Register(new Soother);
Register(new Spade);
Register(new Spring1);
--- 2531,2534 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Enigma-cvs] enigma/src items.cc,1.93,1.94,
Ralf Westram <address@hidden> <=
- Prev by Date:
[Enigma-cvs] enigma/src enigma-lua.cc, 1.25, 1.26 enigma-lua.hh, 1.24, 1.25 enigma-lua.pkg, 1.20, 1.21
- Next by Date:
[Enigma-cvs] enigma/src world.cc,1.78,1.79
- Previous by thread:
[Enigma-cvs] enigma/src enigma-lua.cc, 1.25, 1.26 enigma-lua.hh, 1.24, 1.25 enigma-lua.pkg, 1.20, 1.21
- Next by thread:
[Enigma-cvs] enigma/src world.cc,1.78,1.79
- Index(es):