[Scummvm-cvs-logs] SF.net SVN: scummvm:[43946] scummvm/trunk/engines/teenagent

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Fri Sep 4 22:09:29 CEST 2009


Revision: 43946
          http://scummvm.svn.sourceforge.net/scummvm/?rev=43946&view=rev
Author:   fingolfin
Date:     2009-09-04 20:09:29 +0000 (Fri, 04 Sep 2009)

Log Message:
-----------
TEEN: Some whitespace fixes

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/animation.cpp
    scummvm/trunk/engines/teenagent/callbacks.cpp
    scummvm/trunk/engines/teenagent/dialog.cpp
    scummvm/trunk/engines/teenagent/font.cpp
    scummvm/trunk/engines/teenagent/inventory.cpp
    scummvm/trunk/engines/teenagent/objects.cpp
    scummvm/trunk/engines/teenagent/pack.cpp
    scummvm/trunk/engines/teenagent/scene.cpp
    scummvm/trunk/engines/teenagent/teenagent.cpp

Modified: scummvm/trunk/engines/teenagent/animation.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/animation.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/animation.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -107,7 +107,7 @@
 		data_size -= 2;
 		data = new byte[data_size];
 		data_size = s->read(data, data_size);
-/*		for(int i = 0; i < data_size; ++i) {
+/*		for (int i = 0; i < data_size; ++i) {
 			debug(0, "%02x ", data[i]);
 		}
 		debug(0, ", %u frames", data_size / 3);
@@ -123,7 +123,7 @@
 		pos = s->readUint16LE();
 		//debug(0, "pos?: %04x", pos);
 			
-		for(uint16 i = 0; i < frames_count; ++i) {
+		for (uint16 i = 0; i < frames_count; ++i) {
 			frames[i].load(s, Surface::TypeLan);
 			frames[i].x = 0;
 			frames[i].y = 0;
@@ -135,7 +135,7 @@
 		data = new byte[data_size];
 
 		frames_count = 0;
-		for(byte i = 0; i < data_size / 3; ++i) {
+		for (byte i = 0; i < data_size / 3; ++i) {
 			int idx = i * 3;
 			/* byte unk = */ s->readByte();
 			data[idx] = s->readByte();
@@ -150,7 +150,7 @@
 		
 		frames = new Surface[frames_count];
 		
-		for(uint16 i = 0; i < frames_count; ++i) {
+		for (uint16 i = 0; i < frames_count; ++i) {
 			frames[i].load(s, Surface::TypeOns);
 		}
 	}
@@ -160,12 +160,12 @@
 		frames_count = s->readByte();
 		debug(0, "loading varia resource, %u physical frames", frames_count);
 		uint16 offset[255];
-		for(byte i = 0; i < frames_count; ++i) {
+		for (byte i = 0; i < frames_count; ++i) {
 			offset[i] = s->readUint16LE();
 			debug(0, "%u: %04x", i, offset[i]);
 		}
 		frames = new Surface[frames_count];
-		for(uint16 i = 0; i < frames_count; ++i) {
+		for (uint16 i = 0; i < frames_count; ++i) {
 			debug(0, "%04x", offset[i]);
 			s->seek(offset[i] + off);
 			frames[i].load(s, Surface::TypeOns);

Modified: scummvm/trunk/engines/teenagent/callbacks.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/callbacks.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/callbacks.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -1816,7 +1816,7 @@
 	}
 
 	//unimplemented callback  :(
-	for(uint i = 0; i < 32; ++i) {
+	for (uint i = 0; i < 32; ++i) {
 		debug(0, "code[%u] = %02x ", i, code[i]);
 	}
 	//error("invalid callback %04x called", addr);

Modified: scummvm/trunk/engines/teenagent/dialog.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/dialog.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/dialog.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -97,7 +97,7 @@
 	do {
 		next = res->dseg.get_word(addr);
 		addr += 2;
-	} while(next == 0);
+	} while (next == 0);
 	uint16 next2 = res->dseg.get_word(addr);
 	if (next2 != 0xffff)
 		res->dseg.set_word(addr - 2, 0);

Modified: scummvm/trunk/engines/teenagent/font.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/font.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/font.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -59,8 +59,8 @@
 	//debug(0, "char %c, width: %dx%d", c, w, h);
 	glyph += 2;
 	byte * dst = (byte *)surface->getBasePtr(x, y);
-	for(uint i = 0; i < h; ++i) {
-		for(uint j = 0; j < w; ++j) {
+	for (uint i = 0; i < h; ++i) {
+		for (uint j = 0; j < w; ++j) {
 			byte v = *glyph++;
 			switch(v) {
 			case 1:
@@ -77,7 +77,7 @@
 }
 
 static uint find_in_str(const Common::String &str, char c, uint pos = 0) {
-	while(pos < str.size() && str[pos] != c) ++pos;
+	while (pos < str.size() && str[pos] != c) ++pos;
 	return pos;
 }
 
@@ -102,7 +102,7 @@
 			
 			y += height;
 			i = j + 1;
-		} while(i < str.size());
+		} while (i < str.size());
 		return max_w;
 	} else {
 		//surface == NULL;
@@ -127,8 +127,8 @@
 
 void Font::grid(Graphics::Surface *surface, int x, int y, int w, int h, byte color) {
 	byte * dst = (byte *)surface->getBasePtr(x, y);
-	for(int i = 0; i < h; ++i) {
-		for(int j = 0; j < w; ++j) {
+	for (int i = 0; i < h; ++i) {
+		for (int j = 0; j < w; ++j) {
 			if (((i ^ j) & 1) == 0)
 				dst[j] = color;
 		}

Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/inventory.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -46,14 +46,14 @@
 	
 	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 @@
 }
 
 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 @@
 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::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 @@
 	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 @@
 			
 		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 @@
 
 		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 @@
 			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();

Modified: scummvm/trunk/engines/teenagent/objects.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/objects.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/objects.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -55,9 +55,9 @@
 		
 	Common::String result;
 
-	while(*desc != 1 && *desc != 0) {
+	while (*desc != 1 && *desc != 0) {
 		Common::String line;
-		while(*desc != 1 && *desc != 0) {
+		while (*desc != 1 && *desc != 0) {
 			//debug(0, "%02x ", *desc);
 			line += *desc++;
 		}

Modified: scummvm/trunk/engines/teenagent/pack.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/pack.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/pack.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -47,11 +47,11 @@
 	count = file.readUint32LE();
 	debug(0, "opened %s, found %u entries", filename.c_str(), count);
 	offsets = new uint32[count + 1];
-	for(uint32 i = 0; i <= count; ++i) {
+	for (uint32 i = 0; i <= count; ++i) {
 		offsets[i] = file.readUint32LE();
 		//debug(0, "%d: %06x", i, offsets[i]);
 	}
-/*	for(uint32 i = 0; i < count; ++i) {
+/*	for (uint32 i = 0; i < count; ++i) {
 		debug(0, "%d: len = %d", i, offsets[i + 1] - offsets[i]);
 	}
 */

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -52,7 +52,7 @@
 	Common::Point point(_point);
 	debug(0, "moveTo(%d, %d, %u)", point.x, point.y, orient);
 	if (validate) {
-		for(byte i = 0; i < walkboxes; ++i) {
+		for (byte i = 0; i < walkboxes; ++i) {
 			if (walkbox[i]->rect.in(point)) {
 				debug(0, "bumped into walkbox %u", i);
 				return;
@@ -111,7 +111,7 @@
 	ons_count = 0;
 	byte b;
 	byte on_id[16];
-	while((b = res->dseg.get_byte(addr)) != 0xff) {
+	while ((b = res->dseg.get_byte(addr)) != 0xff) {
 		debug(0, "on: %04x = %02x", addr, b);
 		++addr;
 		if (b == 0)
@@ -125,7 +125,7 @@
 	
 	if (ons_count > 0) {
 		ons = new Surface[ons_count];
-		for(uint32 i = 0; i < ons_count; ++i) {
+		for (uint32 i = 0; i < ons_count; ++i) {
 			Common::SeekableReadStream * s = res->ons.getStream(on_id[i]);
 			if (s != NULL)
 				ons[i].load(s, Surface::TypeOns);
@@ -178,10 +178,10 @@
 		if (res->dseg.get_byte(0xDBA4) != 1) {
 			//dim down palette
 			uint i;
-			for(i = 0; i < 624; ++i) {
+			for (i = 0; i < 624; ++i) {
 				palette[i] = palette[i] > 0x20? palette[i] - 0x20: 0;
 			}
-			for(i = 726; i < 768; ++i) {
+			for (i = 726; i < 768; ++i) {
 				palette[i] = palette[i] > 0x20? palette[i] - 0x20: 0;
 			}
 		}
@@ -258,14 +258,14 @@
 	Graphics::Surface * surface = system->lockScreen();
 
 	if (ons != NULL) {
-		for(uint32 i = 0; i < ons_count; ++i) {
+		for (uint32 i = 0; i < ons_count; ++i) {
 			Surface* s = ons + i;
 			if (s != NULL)
 				s->render(surface);
 		}
 	}
 	
-	for(int i = 3; i >= 0; --i) {
+	for (int i = 3; i >= 0; --i) {
 		Animation &a = animations[i];
 		Surface *s = a.currentFrame();
 		if (s == NULL)
@@ -294,7 +294,7 @@
 	bool hide_actor = false;
 	bool got_any_animation = false;
 	
-	for(int i = 3; i >= 0; --i) {
+	for (int i = 3; i >= 0; --i) {
 		Animation &a = custom_animations[i];
 		Surface *s = a.currentFrame();
 		if (s == NULL) {
@@ -463,8 +463,8 @@
 	byte p[1024];
 
 	memset(p, 0, 1024);
-	for(int i = 0; i < 256; ++i) {
-		for(int c = 0; c < 3; ++c) 
+	for (int i = 0; i < 256; ++i) {
+		for (int c = 0; c < 3; ++c) 
 			p[i * 4 + c] = buf[i * 3 + c] * mul;
 	}
 

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2009-09-04 20:08:33 UTC (rev 43945)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2009-09-04 20:09:29 UTC (rev 43946)
@@ -65,7 +65,7 @@
 			if (inv != NULL) {
 				byte * dcall = res->dseg.ptr(0xbb87);
 				dcall = res->dseg.ptr(READ_LE_UINT16(dcall + scene->getId() * 2 - 2));
-				for(UseObject * obj = (UseObject *)dcall; obj->inventory_id != 0; ++obj) {
+				for (UseObject * obj = (UseObject *)dcall; obj->inventory_id != 0; ++obj) {
 					if (obj->inventory_id == inv->id && dst_object->id == obj->object_id) {
 						debug(0, "combine! %u,%u", obj->x, obj->y);
 						//moveTo(Common::Point(obj->x, obj->y), NULL, Examine);
@@ -308,7 +308,7 @@
 			_system->delayMillis(40 - dt);
 		
 		++frame;
-	} while(!_event->shouldQuit());
+	} while (!_event->shouldQuit());
 
 	deinit();
 	return Common::kNoError;
@@ -319,7 +319,7 @@
 	uint16 addr = res->dseg.get_word(0x7254 + (id - 1) * 2);
 	//debug(0, "object base: %04x, x: %d, %d", addr, point.x, point.y);
 	uint16 object;
-	for(;(object = res->dseg.get_word(addr)) != 0; addr += 2) {
+	for (;(object = res->dseg.get_word(addr)) != 0; addr += 2) {
 		if (object == 0)
 			return NULL;
 		


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list