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

megath at users.sourceforge.net megath at users.sourceforge.net
Tue Sep 15 09:41:06 CEST 2009


Revision: 44098
          http://scummvm.svn.sourceforge.net/scummvm/?rev=44098&view=rev
Author:   megath
Date:     2009-09-15 07:41:05 +0000 (Tue, 15 Sep 2009)

Log Message:
-----------
adapted code to comply code formatting conventions.

Modified Paths:
--------------
    scummvm/trunk/engines/teenagent/actor.cpp
    scummvm/trunk/engines/teenagent/actor.h
    scummvm/trunk/engines/teenagent/animation.cpp
    scummvm/trunk/engines/teenagent/animation.h
    scummvm/trunk/engines/teenagent/dialog.cpp
    scummvm/trunk/engines/teenagent/inventory.cpp
    scummvm/trunk/engines/teenagent/inventory.h
    scummvm/trunk/engines/teenagent/music.cpp
    scummvm/trunk/engines/teenagent/objects.cpp
    scummvm/trunk/engines/teenagent/pack.cpp
    scummvm/trunk/engines/teenagent/pack.h
    scummvm/trunk/engines/teenagent/resources.cpp
    scummvm/trunk/engines/teenagent/resources.h
    scummvm/trunk/engines/teenagent/scene.cpp
    scummvm/trunk/engines/teenagent/scene.h
    scummvm/trunk/engines/teenagent/segment.h
    scummvm/trunk/engines/teenagent/surface.cpp
    scummvm/trunk/engines/teenagent/surface.h
    scummvm/trunk/engines/teenagent/teenagent.cpp
    scummvm/trunk/engines/teenagent/teenagent.h

Modified: scummvm/trunk/engines/teenagent/actor.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/actor.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/actor.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -27,12 +27,12 @@
 
 namespace TeenAgent {
 
-void Actor::render(Graphics::Surface * surface, const Common::Point & position, uint8 orientation, int delta_frame) {
+void Actor::render(Graphics::Surface *surface, const Common::Point & position, uint8 orientation, int delta_frame) {
 	const uint8 frames_left_right[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
 	const uint8 frames_up[] = {18, 19, 20, 21, 22, 23, 24, 25, };
 	const uint8 frames_down[] = {10, 11, 12, 13, 14, 15, 16, 17, };
 	
-	Surface * s = NULL;
+	Surface *s = NULL;
 	
 	if (delta_frame == 0) {
 		index = 0; //static animation

Modified: scummvm/trunk/engines/teenagent/actor.h
===================================================================
--- scummvm/trunk/engines/teenagent/actor.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/actor.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -29,7 +29,7 @@
 
 class Actor : public Animation {
 public: 
-	void render(Graphics::Surface * surface, const Common::Point & position, uint8 orientation, int delta_frame);
+	void render(Graphics::Surface *surface, const Common::Point & position, uint8 orientation, int delta_frame);
 };
 
 } // End of namespace TeenAgent

Modified: scummvm/trunk/engines/teenagent/animation.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/animation.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/animation.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -30,11 +30,11 @@
 Animation::Animation() : id(0), x(0), y(0), loop(true), paused(false), data(0), data_size(0), frames_count(0), frames(0), index(0) {
 }
 
-Surface * Animation::firstFrame(){
+Surface *Animation::firstFrame(){
 	if (frames == NULL || frames_count == 0)
 		return NULL;
 	
-	Surface * r = frames;
+	Surface *r = frames;
 	uint16 pos = READ_LE_UINT16(data + 1);
 	if (pos != 0) {
 		r->x = pos % 320;
@@ -43,14 +43,14 @@
 	return r;
 }
 
-Surface * Animation::currentFrame(int dt) {
+Surface *Animation::currentFrame(int dt) {
 	if (paused)
 		return firstFrame();
 	
 	if (frames == NULL || frames_count == 0)
 		return NULL;
 	
-	Surface * r;
+	Surface *r;
 	
 	if (data != NULL) {
 		uint32 frame = 3 * index;
@@ -102,7 +102,7 @@
 	index = 0;
 }
 
-void Animation::load(Common::SeekableReadStream * s, Type type) {
+void Animation::load(Common::SeekableReadStream *s, Type type) {
 	//fixme: do not reload the same animation each time
 	free();
 	

Modified: scummvm/trunk/engines/teenagent/animation.h
===================================================================
--- scummvm/trunk/engines/teenagent/animation.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/animation.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -38,11 +38,11 @@
 	enum Type {TypeLan, TypeVaria, TypeInventory};
 	
 	Animation();
-	void load(Common::SeekableReadStream * s, Type type = TypeLan);
+	void load(Common::SeekableReadStream *s, Type type = TypeLan);
 	void free();
 	
-	Surface * firstFrame();
-	Surface * currentFrame(int dt = 1);
+	Surface *firstFrame();
+	Surface *currentFrame(int dt = 1);
 	uint16 currentIndex() const { return index; }
 	
 	~Animation();
@@ -53,11 +53,11 @@
 	//uint16 height() const { return frames? frames[0].h: 0; }
 
 protected:
-	byte * data;
+	byte *data;
 	uint16 data_size;
 	
 	uint16 frames_count;
-	Surface * frames;
+	Surface *frames;
 	uint16 index;
 };
 

Modified: scummvm/trunk/engines/teenagent/dialog.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/dialog.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/dialog.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -28,7 +28,7 @@
 
 namespace TeenAgent {
 
-void Dialog::show(Scene * scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2) {
+void Dialog::show(Scene *scene, uint16 addr, uint16 animation1, uint16 animation2, byte color1, byte color2, byte slot1, byte slot2) {
 	--slot1;
 	--slot2;
 	debug(0, "Dialog::pop(%04x, %u:%u, %u:%u)", addr, slot1, animation1, slot2, animation2);

Modified: scummvm/trunk/engines/teenagent/inventory.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/inventory.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -31,12 +31,12 @@
 
 namespace TeenAgent {
 
-void Inventory::init(TeenAgentEngine * engine) {
+void Inventory::init(TeenAgentEngine *engine) {
 	_engine = engine;
 	_active = false;
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	
-	Common::SeekableReadStream * s = res->varia.getStream(3);
+	Common::SeekableReadStream *s = res->varia.getStream(3);
 	assert(s != NULL);
 	debug(0, "loading inventory background...");
 	background.load(s, Surface::TypeOns);
@@ -111,7 +111,7 @@
 }
 
 bool Inventory::processEvent(const Common::Event &event) {
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	
 	switch(event.type) {
 	case Common::EVENT_MOUSEMOVE:
@@ -157,7 +157,7 @@
 		int id2 = hovered_obj->id;
 
 		debug(0, "combine(0x%02x, 0x%02x)!", id1, id2);
-		byte * table = res->dseg.ptr(0xC335);
+		byte *table = res->dseg.ptr(0xC335);
 		while (table[0] != 0 && table[1] != 0) {
 			if (
 				(id1 == table[0] && id2 == table[1]) ||
@@ -189,7 +189,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();
@@ -227,8 +227,8 @@
 	surface.free();
 }
 
-void Inventory::Item::render(Inventory * inventory, InventoryObject *obj, Graphics::Surface * dst) {
-	Resources * res = Resources::instance();
+void Inventory::Item::render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *dst) {
+	Resources *res = Resources::instance();
 	
 	rect.render(dst, hovered? 233: 234);
 	if (obj->animated) {
@@ -238,13 +238,13 @@
 			animation.load(inventory->items, Animation::TypeInventory);
 		}
 		if (hovered) {
-			Surface * s = animation.currentFrame();
+			Surface *s = animation.currentFrame();
 			if (animation.currentIndex() == 0)
 				s = animation.currentFrame();
 			if (s != NULL)
 				s->render(dst, rect.left + 1, rect.top + 1);
 		} else {
-			Surface * s = animation.firstFrame();
+			Surface *s = animation.firstFrame();
 			if (s != NULL)
 				s->render(dst, rect.left + 1, rect.top + 1);
 		}
@@ -270,12 +270,12 @@
 	}
 }
 
-void Inventory::render(Graphics::Surface * surface) {
+void Inventory::render(Graphics::Surface *surface) {
 	if (!_active)
 		return;
 
 	background.render(surface);
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	
 	for (int y = 0; y < 4; y++) {
 		for (int x = 0; x < 6; x++) {
@@ -286,7 +286,7 @@
 			
 			//debug(0, "%d,%d -> %u", x0, y0, item);
 			
-			InventoryObject * obj = (InventoryObject *)res->dseg.ptr(READ_LE_UINT16(objects + item * 2));
+			InventoryObject *obj = (InventoryObject *)res->dseg.ptr(READ_LE_UINT16(objects + item * 2));
 			graphics[idx].render(this, obj, surface);
 		}
 	}

Modified: scummvm/trunk/engines/teenagent/inventory.h
===================================================================
--- scummvm/trunk/engines/teenagent/inventory.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/inventory.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -37,8 +37,8 @@
 
 class Inventory {
 public:
-	void init(TeenAgentEngine * engine);
-	void render(Graphics::Surface * surface);
+	void init(TeenAgentEngine *engine);
+	void render(Graphics::Surface *surface);
 
 	void clear();
 	void add(byte item);
@@ -69,7 +69,7 @@
 		
 		Item() : hovered(false) {}
 		void free();
-		void render(Inventory *inventory, InventoryObject *obj, Graphics::Surface * surface);
+		void render(Inventory *inventory, InventoryObject *obj, Graphics::Surface *surface);
 	} graphics[24];
 	
 	bool _active;

Modified: scummvm/trunk/engines/teenagent/music.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/music.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/music.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -41,7 +41,7 @@
 }
 
 bool MusicPlayer::load(int id) {
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 
 	Common::SeekableReadStream *stream	= res->mmm.getStream(id);
 	if (stream == NULL)

Modified: scummvm/trunk/engines/teenagent/objects.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/objects.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/objects.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -50,7 +50,7 @@
 }
 
 Common::String Object::description(const char *name) {
-	const char * desc = name + strlen(name) + 1;
+	const char *desc = name + strlen(name) + 1;
 	if (*desc == 0)
 		return Common::String();
 		

Modified: scummvm/trunk/engines/teenagent/pack.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/pack.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/pack.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -74,7 +74,7 @@
 	return r;
 }
 
-Common::SeekableReadStream * Pack::getStream(uint32 id) const {
+Common::SeekableReadStream *Pack::getStream(uint32 id) const {
 	if (id < 1 || id > count)
 		return 0;
 	debug(0, "stream: %04x-%04x", offsets[id - 1], offsets[id]);

Modified: scummvm/trunk/engines/teenagent/pack.h
===================================================================
--- scummvm/trunk/engines/teenagent/pack.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/pack.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -41,7 +41,7 @@
 	void close();
 	uint32 get_size(uint32 id) const;
 	uint32 read(uint32 id, byte *dst, uint32 size) const;
-	Common::SeekableReadStream * getStream(uint32 id) const;
+	Common::SeekableReadStream *getStream(uint32 id) const;
 };
 
 } // End of namespace TeenAgent

Modified: scummvm/trunk/engines/teenagent/resources.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/resources.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/resources.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -30,7 +30,7 @@
 
 Resources::Resources() {}
 
-Resources * Resources::instance() {
+Resources *Resources::instance() {
 	static Resources i;
 	return &i;
 }
@@ -47,7 +47,7 @@
 	sam_sam.close();
 }
 
-bool Resources::loadArchives(const ADGameDescription * gd) {
+bool Resources::loadArchives(const ADGameDescription *gd) {
 	Common::File dat_file;
 	if (!dat_file.open("teenagent.dat")) {
 		Common::String errorMessage = "You're missing the 'teenagent.dat' file. Get it from the ScummVM website";
@@ -55,7 +55,7 @@
 		warning("%s", errorMessage.c_str());
 		return false;
 	}
-	Common::SeekableReadStream * dat = Common::wrapCompressedReadStream(&dat_file);
+	Common::SeekableReadStream *dat = Common::wrapCompressedReadStream(&dat_file);
 	cseg.read(dat, 0xb3b0);
 	dseg.read(dat, 0xe790);
 	eseg.read(dat, 0x8be2);
@@ -81,7 +81,7 @@
 	return true;
 }
 
-void Resources::loadOff(Graphics::Surface &surface, byte * palette, int id) {
+void Resources::loadOff(Graphics::Surface &surface, byte *palette, int id) {
 	uint32 size = off.get_size(id);
 	if (size == 0) {
 		error("invalid background %d", id);
@@ -90,17 +90,17 @@
 	byte buf[64768];
 	off.read(id, buf, sizeof(buf));
 
-	byte * src = buf;
-	byte * dst = (byte *)surface.pixels;
+	byte *src = buf;
+	byte *dst = (byte *)surface.pixels;
 	memcpy(dst, src, 64000);
 	memcpy(palette, buf + 64000, 768);
 }
 
-Common::SeekableReadStream * Resources::loadLan(uint32 id) const {
+Common::SeekableReadStream *Resources::loadLan(uint32 id) const {
 	return id <= 500? loadLan000(id): lan500.getStream(id - 500);
 }
 
-Common::SeekableReadStream * Resources::loadLan000(uint32 id) const {
+Common::SeekableReadStream *Resources::loadLan000(uint32 id) const {
 	switch(id) {
 
 	case 81:

Modified: scummvm/trunk/engines/teenagent/resources.h
===================================================================
--- scummvm/trunk/engines/teenagent/resources.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/resources.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -38,13 +38,13 @@
 protected:
 	Resources();
 public: 
-	static Resources * instance();
-	bool loadArchives(const ADGameDescription * gd);
+	static Resources *instance();
+	bool loadArchives(const ADGameDescription *gd);
 	void deinit();
 	void loadOff(Graphics::Surface &surface, byte *palette, int id);
-	Common::SeekableReadStream * loadLan(uint32 id) const;
-	Common::SeekableReadStream * loadLan000(uint32 id) const;
-	//void loadOn(Graphics::Surface &surface, int id, uint16 &dst, uint16 * flags);
+	Common::SeekableReadStream *loadLan(uint32 id) const;
+	Common::SeekableReadStream *loadLan000(uint32 id) const;
+	//void loadOn(Graphics::Surface &surface, int id, uint16 &dst, uint16 *flags);
 	//void loadOns(Graphics::Surface &surface, int id, uint16 &dst);
 
 	Pack varia, off, on, ons, lan000, lan500, mmm, sam_mmm, sam_sam;

Modified: scummvm/trunk/engines/teenagent/scene.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/scene.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/scene.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -52,7 +52,7 @@
 	debug(0, "moveTo(%d, %d, %u)", point.x, point.y, orient);
 	if (validate) {
 		for (byte i = 0; i < walkboxes; ++i) {
-			Walkbox * w = walkbox[i];
+			Walkbox *w = walkbox[i];
 			if (w->rect.in(point)) {
 				debug(0, "bumped into walkbox %u", i);
 				byte o = w->orientation;
@@ -89,12 +89,12 @@
 }
 
 
-void Scene::init(TeenAgentEngine *engine, OSystem * system) {
+void Scene::init(TeenAgentEngine *engine, OSystem *system) {
 	_engine = engine;
 	_system = system;
 	
-	Resources * res = Resources::instance();
-	Common::SeekableReadStream * s = res->varia.getStream(1);
+	Resources *res = Resources::instance();
+	Common::SeekableReadStream *s = res->varia.getStream(1);
 	if (s == NULL)
 		error("invalid resource data");
 
@@ -112,18 +112,18 @@
 }
 
 byte *Scene::getOns(int id) {
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	return res->dseg.ptr(res->dseg.get_word(0xb4f5 + (id - 1) * 2));
 }
 
-byte * Scene::getLans(int id) {
-	Resources * res = Resources::instance();
+byte *Scene::getLans(int id) {
+	Resources *res = Resources::instance();
 	return res->dseg.ptr(0xd89e + (id - 1) * 4);
 }
 
 void Scene::loadOns() {
 	debug(0, "loading ons animation");
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 
 	uint16 addr = res->dseg.get_word(0xb4f5 + (_id - 1) * 2);
 	//debug(0, "ons index: %04x", addr);
@@ -146,7 +146,7 @@
 	if (ons_count > 0) {
 		ons = new Surface[ons_count];
 		for (uint32 i = 0; i < ons_count; ++i) {
-			Common::SeekableReadStream * s = res->ons.getStream(on_id[i]);
+			Common::SeekableReadStream *s = res->ons.getStream(on_id[i]);
 			if (s != NULL)
 				ons[i].load(s, Surface::TypeOns);
 		}
@@ -155,7 +155,7 @@
 
 void Scene::loadLans() {
 	debug(0, "loading lans animation");
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	//load lan000
 	
 	for (int i = 0; i < 4; ++i) {
@@ -168,7 +168,7 @@
 		if (bxv == 0)
 			continue;
 
-		Common::SeekableReadStream * s = res->loadLan000(res_id);
+		Common::SeekableReadStream *s = res->loadLan000(res_id);
 		if (s != NULL) {
 			animations[i].load(s, Animation::TypeLan);
 			if (bxv != 0 && bxv != 0xff) 
@@ -190,7 +190,7 @@
 		
 	warp(pos);
 
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	res->loadOff(background, palette, id);
 	if (id == 24) {
 		//dark scene
@@ -214,7 +214,7 @@
 	loadOns();
 	loadLans();
 	
-	byte * walkboxes_base = res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(0x6746 + (id - 1) * 2)));
+	byte *walkboxes_base = res->dseg.ptr(READ_LE_UINT16(res->dseg.ptr(0x6746 + (id - 1) * 2)));
 	walkboxes = *walkboxes_base++;
 
 	debug(0, "found %d walkboxes", walkboxes);
@@ -232,7 +232,7 @@
 
 void Scene::playAnimation(byte idx, uint id, bool loop, bool paused) {
 	assert(idx < 4);
-	Common::SeekableReadStream * s = Resources::instance()->loadLan(id + 1);
+	Common::SeekableReadStream *s = Resources::instance()->loadLan(id + 1);
 	if (s == NULL)
 		error("playing animation %u failed", id);
 
@@ -242,7 +242,7 @@
 }
 
 void Scene::playActorAnimation(uint id, bool loop) {
-	Common::SeekableReadStream * s = Resources::instance()->loadLan(id + 1);
+	Common::SeekableReadStream *s = Resources::instance()->loadLan(id + 1);
 	if (s == NULL)
 		error("playing animation %u failed", id);
 
@@ -287,12 +287,12 @@
 	}
 }
 
-bool Scene::render(OSystem * system) {
+bool Scene::render(OSystem *system) {
 	//render background
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	if (current_event.type == SceneEvent::CreditsMessage) {
 		system->fillScreen(0);
-		Graphics::Surface * surface = system->lockScreen();
+		Graphics::Surface *surface = system->lockScreen();
 		res->font8.color = current_event.color;
 		res->font8.shadow_color = current_event.orientation;
 		res->font8.render(surface, current_event.dst.x, current_event.dst.y, message);
@@ -308,11 +308,11 @@
 		busy = processEventQueue();
 		system->copyRectToScreen((const byte *)background.pixels, background.pitch, 0, 0, background.w, background.h);
 
-		Graphics::Surface * surface = system->lockScreen();
+		Graphics::Surface *surface = system->lockScreen();
 
 		if (ons != NULL) {
 			for (uint32 i = 0; i < ons_count; ++i) {
-				Surface* s = ons + i;
+				Surface *s = ons + i;
 				if (s != NULL)
 					s->render(surface);
 			}
@@ -345,7 +345,7 @@
 			if (a->id == 0)
 				continue;
 
-			Object * obj = getObject(a->id);
+			Object *obj = getObject(a->id);
 			if (obj != NULL) {
 				obj->rect.left = s->x;
 				obj->rect.top = s->y;
@@ -356,7 +356,7 @@
 		}
 
 		if (!hide_actor) {
-			Surface * mark = actor_animation.currentFrame();
+			Surface *mark = actor_animation.currentFrame();
 			if (mark == NULL) {
 				actor_animation.free();
 
@@ -407,7 +407,7 @@
 		//	current_event.dump();
 		/*
 		for (byte i = 0; i < walkboxes; ++i) {
-			Walkbox * w = walkbox[i];
+			Walkbox *w = walkbox[i];
 			w->rect.render(surface, 0xd0 + i);
 		}
 		*/
@@ -437,7 +437,7 @@
 		switch(current_event.type) {
 		
 		case SceneEvent::SetOn: {
-			byte * ptr = getOns(current_event.scene == 0? _id: current_event.scene);
+			byte *ptr = getOns(current_event.scene == 0? _id: current_event.scene);
 			debug(0, "on[%u] = %02x", current_event.ons - 1, current_event.color);
 			ptr[current_event.ons - 1] = current_event.color;
 			loadOns();
@@ -447,7 +447,7 @@
 		case SceneEvent::SetLan: {
 			if (current_event.lan != 0) {
 				debug(0, "lan[%u] = %02x", current_event.lan - 1, current_event.color);
-				byte * ptr = getLans(current_event.scene == 0? _id: current_event.scene);
+				byte *ptr = getLans(current_event.scene == 0? _id: current_event.scene);
 				ptr[current_event.lan - 1] = current_event.color;
 			}
 			loadLans();
@@ -524,7 +524,7 @@
 		
 		case SceneEvent::EnableObject: {
 				debug(0, "%s object #%u", current_event.color?"enabling":"disabling", current_event.object - 1);
-				Object * obj = getObject(current_event.object - 1, current_event.scene == 0? _id: current_event.scene);
+				Object *obj = getObject(current_event.object - 1, current_event.scene == 0? _id: current_event.scene);
 				obj->enabled = current_event.color;
 				current_event.clear();
 			}
@@ -555,7 +555,7 @@
 	return !current_event.empty();
 }
 
-void Scene::setPalette(OSystem *system, const byte * buf, unsigned mul) {
+void Scene::setPalette(OSystem *system, const byte *buf, unsigned mul) {
 	byte p[1024];
 
 	memset(p, 0, 1024);
@@ -567,11 +567,11 @@
 	system->setPalette(p, 0, 256);
 }
 
-Object * Scene::getObject(int id, int scene_id) {
+Object *Scene::getObject(int id, int scene_id) {
 	if (scene_id == 0)
 		scene_id = _id;
 	
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	uint16 addr = res->dseg.get_word(0x7254 + (scene_id - 1) * 2);
 	//debug(0, "object base: %04x, x: %d, %d", addr, point.x, point.y);
 	uint16 object = res->dseg.get_word(addr + 2 * id - 2);
@@ -581,7 +581,7 @@
 }
 
 Common::Point Scene::messagePosition(const Common::String &str, const Common::Point & position) {
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	uint w = res->font7.render(NULL, 0, 0, str);
 	Common::Point message_pos = position;
 	message_pos.x -= w / 2;

Modified: scummvm/trunk/engines/teenagent/scene.h
===================================================================
--- scummvm/trunk/engines/teenagent/scene.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/scene.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -95,9 +95,9 @@
 	
 	Scene();
 	
-	void init(TeenAgentEngine *engine, OSystem * system);
+	void init(TeenAgentEngine *engine, OSystem *system);
 	void init(int id, const Common::Point &pos);
-	bool render(OSystem * system);
+	bool render(OSystem *system);
 	int getId() const { return _id; }
 	
 	void warp(const Common::Point & point, byte orientation = 0);
@@ -113,13 +113,13 @@
 	
 	void clear();
 	
-	byte * getOns(int id);
-	byte * getLans(int id);
+	byte *getOns(int id);
+	byte *getLans(int id);
 	
 	bool eventRunning() const { return !current_event.empty(); }
 	
 	Walkbox *getWalkbox(byte id) { return walkbox[id]; }
-	Object * getObject(int id, int scene_id = 0);
+	Object *getObject(int id, int scene_id = 0);
 
 private:
 	void loadOns();
@@ -129,7 +129,7 @@
 	void playActorAnimation(uint id, bool loop);
 	
 	byte palette[768];
-	void setPalette(OSystem *system, const byte * palette, unsigned mul = 1);
+	void setPalette(OSystem *system, const byte *palette, unsigned mul = 1);
 	static Common::Point messagePosition(const Common::String &str, const Common::Point & position);
 
 	bool processEventQueue();
@@ -139,7 +139,7 @@
 	}
 	
 	TeenAgentEngine *_engine;
-	OSystem * _system;
+	OSystem *_system;
 	
 	int _id;
 	Graphics::Surface background;
@@ -154,7 +154,7 @@
 	uint8 orientation;
 	
 	byte walkboxes;
-	Walkbox * walkbox[255];
+	Walkbox *walkbox[255];
 
 	Common::String message;
 	Common::Point message_pos;

Modified: scummvm/trunk/engines/teenagent/segment.h
===================================================================
--- scummvm/trunk/engines/teenagent/segment.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/segment.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -32,7 +32,7 @@
 
 class Segment {
 	uint32 _size;
-	byte * _data;
+	byte *_data;
 
 public: 
 	Segment() : _size(0), _data(0) {}
@@ -65,12 +65,12 @@
 		return WRITE_LE_UINT32(_data + offset, v);
 	}
 	
-	const byte * ptr(uint32 addr) const {
+	const byte *ptr(uint32 addr) const {
 		assert(addr < _size);
 		return _data + addr;
 	}
 
-	byte * ptr(uint32 addr) {
+	byte *ptr(uint32 addr) {
 		assert(addr < _size);
 		return _data + addr;
 	}

Modified: scummvm/trunk/engines/teenagent/surface.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/surface.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/surface.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -75,7 +75,7 @@
 	stream->read(pixels, w_ * h_);
 }
 
-void Surface::render(Graphics::Surface * surface, int dx, int dy, bool mirror) {
+void Surface::render(Graphics::Surface *surface, int dx, int dy, bool mirror) {
 	assert(x + w <= surface->w);
 	assert(y + h <= surface->h);
 

Modified: scummvm/trunk/engines/teenagent/surface.h
===================================================================
--- scummvm/trunk/engines/teenagent/surface.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/surface.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -39,8 +39,8 @@
 	uint16 x, y;
 	
 	Surface();
-	void load(Common::SeekableReadStream * stream, Type type);
-	void render(Graphics::Surface * surface, int dx = 0, int dy = 0, bool mirror = false);
+	void load(Common::SeekableReadStream *stream, Type type);
+	void render(Graphics::Surface *surface, int dx = 0, int dy = 0, bool mirror = false);
 
 	bool empty() const { return pixels == NULL; }
 };

Modified: scummvm/trunk/engines/teenagent/teenagent.cpp
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.cpp	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/teenagent.cpp	2009-09-15 07:41:05 UTC (rev 44098)
@@ -36,7 +36,7 @@
 
 namespace TeenAgent {
 
-TeenAgentEngine::TeenAgentEngine(OSystem * system, const ADGameDescription *gd) : Engine(system), action(ActionNone), _gameDescription(gd) {
+TeenAgentEngine::TeenAgentEngine(OSystem *system, const ADGameDescription *gd) : Engine(system), action(ActionNone), _gameDescription(gd) {
 	music = new MusicPlayer();
 }
 
@@ -44,10 +44,10 @@
 	if (dst_object == NULL)
 		return;
 
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	switch (action) {
 	case ActionExamine: {
-		byte * dcall = res->dseg.ptr(0xb5ce);
+		byte *dcall = res->dseg.ptr(0xb5ce);
 		dcall = res->dseg.ptr(READ_LE_UINT16(dcall + scene->getId() * 2 - 2));
 		dcall += 2 * dst_object->id - 2;
 		uint16 callback = READ_LE_UINT16(dcall);
@@ -62,9 +62,9 @@
 		{
 			InventoryObject *inv = inventory->selectedObject();
 			if (inv != NULL) {
-				byte * dcall = res->dseg.ptr(0xbb87);
+				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);
@@ -81,7 +81,7 @@
 				
 				break;
 			} else {
-				byte * dcall = res->dseg.ptr(0xb89c);
+				byte *dcall = res->dseg.ptr(0xb89c);
 				dcall = res->dseg.ptr(READ_LE_UINT16(dcall + scene->getId() * 2 - 2));
 				dcall += 2 * dst_object->id - 2;
 				uint16 callback = READ_LE_UINT16(dcall);
@@ -150,7 +150,7 @@
 	if (in == NULL)
 		return Common::kReadPermissionDenied;
 
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 
 	assert(res->dseg.size() >= 0x6478 + 0x777a);
 	char data[0x777a];
@@ -181,7 +181,7 @@
 	if (out == NULL)
 		return Common::kWritePermissionDenied;
 
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	res->dseg.set_byte(0xB4F3, scene->getId());
 	Common::Point pos = scene->getPosition();
 	res->dseg.set_word(0x64AF, pos.x);
@@ -195,11 +195,11 @@
 }
 
 Common::Error TeenAgentEngine::run() {
-	Resources * res = Resources::instance();
+	Resources *res = Resources::instance();
 	if (!res->loadArchives(_gameDescription))
 		return Common::kUnknownError;
 	
-	Common::EventManager * _event = _system->getEventManager();
+	Common::EventManager *_event = _system->getEventManager();
 
 	initGraphics(320, 200, false);
 	
@@ -237,7 +237,7 @@
 	do {
 		_system->showMouse(true);
 		uint32 t0 = _system->getMillis();
-		Object * current_object = findObject(scene->getId(), mouse);
+		Object *current_object = findObject(scene->getId(), mouse);
 		
 		while (_event->pollEvent(event)) {
 			if (event.type == Common::EVENT_RTL) {
@@ -275,7 +275,7 @@
 		}
 		bool busy = inventory->active() || scene_busy;
 		
-		Graphics::Surface * surface = _system->lockScreen();
+		Graphics::Surface *surface = _system->lockScreen();
 
 		if (!busy) {
 			InventoryObject *selected_object = inventory->selectedObject();
@@ -314,8 +314,8 @@
 	return Common::kNoError;
 }
 
-Object * TeenAgentEngine::findObject(int id, const Common::Point &point) {
-	Resources * res = Resources::instance();
+Object *TeenAgentEngine::findObject(int id, const Common::Point &point) {
+	Resources *res = Resources::instance();
 	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;
@@ -345,7 +345,7 @@
 Common::String TeenAgentEngine::parseMessage(uint16 addr) {
 	Common::String message;
 	for (
-		const char * str = (const char *)Resources::instance()->dseg.ptr(addr);
+		const char *str = (const char *)Resources::instance()->dseg.ptr(addr);
 		str[0] != 0 || str[1] != 0; 
 		++str) 
 	{
@@ -366,7 +366,7 @@
 void TeenAgentEngine::displayCredits(uint16 addr) {
 	SceneEvent event(SceneEvent::CreditsMessage);
 
-	const byte * src = Resources::instance()->dseg.ptr(addr);
+	const byte *src = Resources::instance()->dseg.ptr(addr);
 	event.orientation = *src++;
 	event.color = *src++;
 
@@ -517,8 +517,8 @@
 }
 
 void TeenAgentEngine::playSoundNow(byte id) {
-	Resources * res = Resources::instance();
-	Common::SeekableReadStream * in = res->sam_sam.getStream(id);
+	Resources *res = Resources::instance();
+	Common::SeekableReadStream *in = res->sam_sam.getStream(id);
 	if (in == NULL) {
 		debug(0, "skipping invalid sound %u", id);
 		return;

Modified: scummvm/trunk/engines/teenagent/teenagent.h
===================================================================
--- scummvm/trunk/engines/teenagent/teenagent.h	2009-09-15 07:18:16 UTC (rev 44097)
+++ scummvm/trunk/engines/teenagent/teenagent.h	2009-09-15 07:41:05 UTC (rev 44098)
@@ -44,7 +44,7 @@
 public: 
 	enum Action { ActionNone, ActionExamine, ActionUse };
 	
-	TeenAgentEngine(OSystem * system, const ADGameDescription *gd);
+	TeenAgentEngine(OSystem *system, const ADGameDescription *gd);
 
 	virtual Common::Error run();
 	virtual Common::Error loadGameState(int slot);
@@ -56,13 +56,13 @@
 
 	void deinit();
 	
-	Object * findObject(int id, const Common::Point &point);
+	Object *findObject(int id, const Common::Point &point);
 	
 	void examine(const Common::Point &point, Object *object);
 	void use(Object *object);
 
 	bool processCallback(uint16 addr);
-	inline Scene * getScene() { return scene; }
+	inline Scene *getScene() { return scene; }
 
 	static Common::String parseMessage(uint16 addr);
 
@@ -72,7 +72,7 @@
 	void displayCredits(uint16 addr);
 	void moveTo(const Common::Point & dst, byte o, bool warp = false);
 	void moveTo(uint16 x, uint16 y, byte o, bool warp = false);
-	void moveTo(Object * obj);
+	void moveTo(Object *obj);
 	void moveRel(int16 x, int16 y, byte o, bool warp = false);
 	void playActorAnimation(uint16 id, bool async = false);
 	void playAnimation(uint16 id, byte slot, bool async = false);
@@ -105,7 +105,7 @@
 
 	bool scene_busy;
 	Action action;
-	Object * dst_object;
+	Object *dst_object;
 
 
 	Audio::AudioStream *_musicStream;


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