diff options
author | Max Horn | 2009-09-04 20:09:29 +0000 |
---|---|---|
committer | Max Horn | 2009-09-04 20:09:29 +0000 |
commit | 4ae8f43be3394927a9b8b71dfaaaff4a87aa2f69 (patch) | |
tree | e6dd0dd773cb6f8c0978230ff197e4b52af2a30b /engines/teenagent/inventory.cpp | |
parent | 088c5dada3040fd2f0d0df04d12156610786a0e2 (diff) | |
download | scummvm-rg350-4ae8f43be3394927a9b8b71dfaaaff4a87aa2f69.tar.gz scummvm-rg350-4ae8f43be3394927a9b8b71dfaaaff4a87aa2f69.tar.bz2 scummvm-rg350-4ae8f43be3394927a9b8b71dfaaaff4a87aa2f69.zip |
TEEN: Some whitespace fixes
svn-id: r43946
Diffstat (limited to 'engines/teenagent/inventory.cpp')
-rw-r--r-- | engines/teenagent/inventory.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/engines/teenagent/inventory.cpp b/engines/teenagent/inventory.cpp index c90223463a..a0346f63be 100644 --- a/engines/teenagent/inventory.cpp +++ b/engines/teenagent/inventory.cpp @@ -46,14 +46,14 @@ void Inventory::init(TeenAgentEngine * engine) { byte offsets = items->readByte(); assert(offsets == 92); - for(byte i = 0; i < offsets; ++i) { + for (byte i = 0; i < offsets; ++i) { offset[i] = items->readUint16LE(); } objects = res->dseg.ptr(0xc4a4); inventory = res->dseg.ptr(0xc48d); - for(int y = 0; y < 4; ++y) - for(int x = 0; x < 6; ++x) { + for (int y = 0; y < 4; ++y) + for (int x = 0; x < 6; ++x) { int i = y * 6 + x; graphics[i].rect.left = 28 + 45 * x - 1; graphics[i].rect.top = 23 + 31 * y - 1; @@ -65,7 +65,7 @@ void Inventory::init(TeenAgentEngine * engine) { } bool Inventory::has(byte item) const { - for(int i = 0; i < 24; ++i) { + for (int i = 0; i < 24; ++i) { if (inventory[i] == item) return true; } @@ -75,12 +75,12 @@ bool Inventory::has(byte item) const { void Inventory::remove(byte item) { debug(0, "removing %02x from inventory", item); int i; - for(i = 0; i < 24; ++i) { + for (i = 0; i < 24; ++i) { if (inventory[i] == item) { break; } } - for(; i < 23; ++i) { + for (; i < 23; ++i) { inventory[i] = inventory[i + 1]; graphics[i].free(); } @@ -90,7 +90,7 @@ void Inventory::remove(byte item) { void Inventory::clear() { debug(0, "clearing inventory"); - for(int i = 0; i < 24; ++i) { + for (int i = 0; i < 24; ++i) { inventory[i] = 0; graphics[i].free(); } @@ -101,7 +101,7 @@ void Inventory::add(byte item) { if (has(item)) return; debug(0, "adding %02x to inventory", item); - for(int i = 0; i < 24; ++i) { + for (int i = 0; i < 24; ++i) { if (inventory[i] == 0) { inventory[i] = item; return; @@ -131,7 +131,7 @@ bool Inventory::processEvent(const Common::Event &event) { hovered_obj = NULL; - for(int i = 0; i < 24; ++i) { + for (int i = 0; i < 24; ++i) { byte item = inventory[i]; if (item == 0) continue; @@ -152,7 +152,7 @@ bool Inventory::processEvent(const Common::Event &event) { debug(0, "combine(0x%02x, 0x%02x)!", id1, id2); byte * table = res->dseg.ptr(0xC335); - while(table[0] != 0 && table[1] != 0) { + while (table[0] != 0 && table[1] != 0) { if ( (id1 == table[0] && id2 == table[1]) || (id2 == table[0] && id1 == table[1]) @@ -183,7 +183,7 @@ bool Inventory::processEvent(const Common::Event &event) { byte id = hovered_obj->id; debug(0, "rclick object %u", id); uint i = 0; - for(byte * table = res->dseg.ptr(0xBB6F + 3); //original offset + 3 bytes. + for (byte * table = res->dseg.ptr(0xBB6F + 3); //original offset + 3 bytes. table[0] != 0 && i < 7; table += 3, ++i) { if (table[0] == id) { resetSelectedObject(); |