[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.13,1.14 pingu.hxx,1.5,1.6
From: |
grumbel |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.13,1.14 pingu.hxx,1.5,1.6 server.cxx,1.4,1.5 |
Date: |
26 Jun 2002 17:43:20 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src
In directory dark:/tmp/cvs-serv2878
Modified Files:
pingu.cxx pingu.hxx server.cxx
Log Message:
cleaned up the set_paction/set_action confusing and renamed set_action to
request_set_action (should only be used by the GUI) and set_paction to
set_action (shoud be used by other actions, traps, pingus, etc.)
Index: pingu.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.cxx,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- pingu.cxx 26 Jun 2002 16:49:33 -0000 1.13
+++ pingu.cxx 26 Jun 2002 17:43:18 -0000 1.14
@@ -54,7 +54,7 @@
velocity.x = 0;
velocity.y = 0;
- set_paction("faller");
+ set_action("faller");
}
Pingu::~Pingu()
@@ -114,7 +114,7 @@
// When you select a function on the button panel and click on a
// pingu, this action will be called with the action name
bool
-Pingu::set_action(PinguAction* act)
+Pingu::request_set_action(PinguAction* act)
{
assert(act);
@@ -183,21 +183,21 @@
}
}
-void
-Pingu::set_action (const std::string& action_name)
+bool
+Pingu::request_set_action (const std::string& action_name)
{
- set_action (PinguActionFactory::instance ()->create (action_name));
+ return request_set_action (PinguActionFactory::instance ()->create
(action_name));
}
void
-Pingu::set_paction(const std::string& action_name)
+Pingu::set_action(const std::string& action_name)
{
- set_paction (PinguActionFactory::instance ()->create (action_name));
+ set_action (PinguActionFactory::instance ()->create (action_name));
}
// Sets an action without any checking
void
-Pingu::set_paction(PinguAction* act)
+Pingu::set_action(PinguAction* act)
{
assert(act);
action = act;
@@ -258,7 +258,7 @@
if (persist[i]->get_type() == (ActionType)FALL)
{
// FIXME: Use action slots instead of the persistend vector
- set_paction("floater");
+ set_action("floater");
}
}
}
@@ -291,7 +291,7 @@
{
std::cout << "COUNTDOWNACTIAN SET: " << countdown_action->get_name () <<
std::endl;
- set_paction(countdown_action);
+ set_action(countdown_action);
// Reset the countdown action handlers
countdown_action = 0;
action_time = -1;
Index: pingu.hxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/pingu.hxx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- pingu.hxx 25 Jun 2002 18:15:18 -0000 1.5
+++ pingu.hxx 26 Jun 2002 17:43:18 -0000 1.6
@@ -139,16 +139,17 @@
// Set the pingu in the gives direction
void set_direction(Direction d);
- /** Set an action if it is appliable to the current pingu, if its a
- persistent action, it will be hold back for later execution */
- bool set_action (PinguAction*);
- void set_action (const std::string& action_name);
+ /** Request an action to be set to the pingu, if its a persistent
+ action, it will be hold back for later execution, same with a
+ timed action, normal action will be applied if the current
+ action allows that. */
+ bool request_set_action (PinguAction*);
+ bool request_set_action (const std::string& action_name);
/** Set an action without any checking, the action will take
- instantly control */
- void set_paction (PinguAction*);
-
- void set_paction (const std::string& action_name);
+ instantly control. */
+ void set_action (PinguAction*);
+ void set_action (const std::string& action_name);
///
PinguAction* get_action();
Index: server.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/server.cxx,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- server.cxx 20 Jun 2002 12:22:51 -0000 1.4
+++ server.cxx 26 Jun 2002 17:43:18 -0000 1.5
@@ -164,7 +164,7 @@
if (tmp_action)
{
- if (!(*pingu)->set_action(tmp_action))
+ if (!(*pingu)->request_set_action(tmp_action))
{
action_holder.push_action(action);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src pingu.cxx,1.13,1.14 pingu.hxx,1.5,1.6 server.cxx,1.4,1.5,
grumbel <=
- Prev by Date:
[Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.2,1.3 hammer.cxx,1.2,1.3 laser_exit.cxx,1.2,1.3 smasher.cxx,1.3,1.4
- Next by Date:
[Pingus-CVS] CVS: Games/Pingus/src/actions faller.cxx,1.8,1.9 floater.cxx,1.4,1.5 jumper.cxx,1.2,1.3 walker.cxx,1.7,1.8
- Previous by thread:
[Pingus-CVS] CVS: Games/Pingus/src/traps fake_exit.cxx,1.2,1.3 hammer.cxx,1.2,1.3 laser_exit.cxx,1.2,1.3 smasher.cxx,1.3,1.4
- Next by thread:
[Pingus-CVS] CVS: Games/Pingus/src/actions faller.cxx,1.8,1.9 floater.cxx,1.4,1.5 jumper.cxx,1.2,1.3 walker.cxx,1.7,1.8
- Index(es):