summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorYohann Ferreira <bertram@cegetel.net>2005-06-22 19:29:44 +0000
committerYohann Ferreira <bertram@cegetel.net>2005-06-22 19:29:44 +0000
commit1a956b89043fdba091ab8cb600b48b532cd34e13 (patch)
treee3b39975f1bcac725cd56a70e2a7bc711f9c5c59 /src/game.cpp
parent2318cf879b40b494a63e6f070c6b31123350afe8 (diff)
downloadmana-1a956b89043fdba091ab8cb600b48b532cd34e13.tar.gz
mana-1a956b89043fdba091ab8cb600b48b532cd34e13.tar.bz2
mana-1a956b89043fdba091ab8cb600b48b532cd34e13.tar.xz
mana-1a956b89043fdba091ab8cb600b48b532cd34e13.zip
Removing some forgotten debug output.
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/game.cpp b/src/game.cpp
index 0ef6ee8c..60db563d 100644
--- a/src/game.cpp
+++ b/src/game.cpp
@@ -1025,7 +1025,8 @@ void do_parse()
// Get the equipments
case 0x00a4:
- for (int loop = 0; loop < (RFIFOW(2) - 4) / 20; loop++)
+
+ for (int loop = 0; loop < ((RFIFOW(2) - 4) / 20); loop++)
{
inventoryWindow->addItem(RFIFOW(4 + loop * 20),
RFIFOW(4 + loop * 20 + 2), 1, true);
@@ -1040,7 +1041,8 @@ void do_parse()
{
int mask = 1;
int position = 0;
- while(!(RFIFOW(4+loop*20+8) & mask)) {
+ while(!(RFIFOW(4+loop*20+8) & mask))
+ {
mask *= 2;
position++;
}
@@ -1048,7 +1050,6 @@ void do_parse()
chatWindow->chat_log(info, BY_SERVER);*/
equipmentWindow->addEquipment(position - 1,
RFIFOW(4+loop*20+2));
- std::cout << ": pos:" << position - 1 << "; id:" << RFIFOW(4+loop*20+2) << std::endl;
equipmentWindow->equipments[position - 1].inventoryIndex =
RFIFOW(4+loop*20);
inventoryWindow->items->setEquipped(
@@ -1058,9 +1059,12 @@ void do_parse()
break;
// Can I use the item?
case 0x00a8:
- if (RFIFOB(6) == 0) {
+ if (RFIFOB(6) == 0)
+ {
chatWindow->chat_log("Failed to use item", BY_SERVER);
- } else {
+ }
+ else
+ {
inventoryWindow->changeQuantity(RFIFOW(2), RFIFOW(4));
}
break;
@@ -1077,11 +1081,14 @@ void do_parse()
if (tiledMap) delete tiledMap;
tiledMap = MapReader::readMap(map_path);
- if (tiledMap) {
+ if (tiledMap)
+ {
// Delete all beings except the local player
std::list<Being *>::iterator i;
- for (i = beings.begin(); i != beings.end(); i++) {
- if ((*i) != player_node) {
+ for (i = beings.begin(); i != beings.end(); i++)
+ {
+ if ((*i) != player_node)
+ {
delete (*i);
}
}
@@ -1101,7 +1108,8 @@ void do_parse()
while (out_size > 0) flush();
engine->setCurrentMap(tiledMap);
}
- else {
+ else
+ {
logger->error("Could not find map file");
}
break;