[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx,1.3,1.4 faller.cxx
From: |
torangan |
Subject: |
[Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx,1.3,1.4 faller.cxx,1.3,1.4 walker.cxx,1.1,1.2 |
Date: |
23 Jun 2002 19:16:44 -0000 |
Update of /usr/local/cvsroot/Games/Pingus/src/actions
In directory dark:/tmp/cvs-serv15884/actions
Modified Files:
basher.cxx faller.cxx walker.cxx
Log Message:
changed debug statements to use Pingus debug streams
Index: basher.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/basher.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- basher.cxx 19 Jun 2002 15:19:26 -0000 1.3
+++ basher.cxx 23 Jun 2002 19:16:41 -0000 1.4
@@ -22,6 +22,7 @@
#include "../pingus_resource.hxx"
#include "../globals.hxx"
#include "../pingu.hxx"
+#include "../debug.hxx"
#include "basher.hxx"
using namespace std;
@@ -116,8 +117,7 @@
{
if (rel_getpixel(i,j) & ColMap::WALL)
{
- if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
- std::cout << "Basher: Found something to dig..." << std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "Basher: Found something to dig..."
<< std::endl;
return true;
}
}
Index: faller.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/faller.cxx,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- faller.cxx 21 Jun 2002 07:45:35 -0000 1.3
+++ faller.cxx 23 Jun 2002 19:16:41 -0000 1.4
@@ -27,6 +27,7 @@
#include "../world.hxx"
#include "../string_converter.hxx"
#include "../pingu.hxx"
+#include "../debug.hxx"
#include "faller.hxx"
const float Faller::deadly_velocity = 20.0f;
@@ -126,8 +127,7 @@
}
else if (fabs(pingu->velocity.x) > deadly_velocity)
{
- if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
- std::cout << "Pingu: x Smashed on ground, jumping" << std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "Pingu: x Smashed on ground,
jumping" << std::endl;
}
}
// Reset the velocity
Index: walker.cxx
===================================================================
RCS file: /usr/local/cvsroot/Games/Pingus/src/actions/walker.cxx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- walker.cxx 12 Jun 2002 19:01:43 -0000 1.1
+++ walker.cxx 23 Jun 2002 19:16:41 -0000 1.2
@@ -24,6 +24,7 @@
#include "../globals.hxx"
#include "../string_converter.hxx"
#include "../pingu.hxx"
+#include "../debug.hxx"
#include "walker.hxx"
const int Walker::max_steps=4;
@@ -71,13 +72,11 @@
{
if (pingu->action && pingu->persist[i]->get_name() ==
pingu->action->get_name())
{
- if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
- std::cout << "Pingu: Not using action, we already did."
<< std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "Pingu: Not using action,
we already did." << std::endl;
}
else
{
- if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
- std::cout << "Pingu: We are in front of a wall, setting
persistant action" << std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "Pingu: We are in front of
a wall, setting persistant action" << std::endl;
// pingu->set_paction(pingu->persist[i]->get_name());
// FIXME: above fails because of Capitalised name
// returned from get_name(). May be we should
@@ -99,7 +98,7 @@
for(y_inc=2; y_inc <= max_steps + 1; y_inc++)
{
- if (rel_getpixel(0, -y_inc) & ColMap::WATER)
+ if (rel_getpixel(0, -y_inc) == ColMap::WATER)
{
pingu->set_paction ("drown");
return;
@@ -121,10 +120,9 @@
// This is moved here to fix the bug where pingu stuck turning both
// sides indefinetely when a head collision occured. the fix needs the
// above downhill walk being done before head collision check.
- if (rel_getpixel(0, 26) != ColMap::NOTHING && !(rel_getpixel(0, 26) &
ColMap::BRIDGE))
+ if (rel_getpixel(0, 26) != ColMap::NOTHING && !(rel_getpixel(0, 26) ==
ColMap::BRIDGE))
{
- if (pingus_debug_flags & PINGUS_DEBUG_ACTIONS)
- std::cout << "Pingu: Head collision" << std::endl;
+ pout(PINGUS_DEBUG_ACTIONS) << "Pingu: Head collision" << std::endl;
pingu->direction.change();
return;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pingus-CVS] CVS: Games/Pingus/src/actions basher.cxx,1.3,1.4 faller.cxx,1.3,1.4 walker.cxx,1.1,1.2,
torangan <=