From 9f08842406ac86e687d3dea257f392de1edbb8b9 Mon Sep 17 00:00:00 2001 From: Alex Bevilacqua Date: Mon, 15 Jun 2009 14:24:55 +0000 Subject: [PATCH] ASYLUM: * renaming of a couple classes git-svn-id: http://asylumengine.googlecode.com/svn/trunk@135 0bfb4aae-4ea4-11de-8d8d-752d95cf3e3c --- engines/asylum/graphics.h | 4 ++-- engines/asylum/menu.h | 2 +- engines/asylum/module.mk | 4 ++-- .../asylum/{resourcepack.cpp => respack.cpp} | 2 +- engines/asylum/{resourcepack.h => respack.h} | 0 engines/asylum/scene.h | 4 ++-- .../{scene_resource.cpp => sceneres.cpp} | 24 +++++++++---------- .../asylum/{scene_resource.h => sceneres.h} | 0 engines/asylum/screen.h | 2 +- engines/asylum/sound.h | 6 ++--- engines/asylum/text.h | 6 ++--- 11 files changed, 27 insertions(+), 27 deletions(-) rename engines/asylum/{resourcepack.cpp => respack.cpp} (95%) rename engines/asylum/{resourcepack.h => respack.h} (100%) rename engines/asylum/{scene_resource.cpp => sceneres.cpp} (92%) rename engines/asylum/{scene_resource.h => sceneres.h} (100%) diff --git a/engines/asylum/graphics.h b/engines/asylum/graphics.h index babf65bf2d2..b8c3d6e4203 100644 --- a/engines/asylum/graphics.h +++ b/engines/asylum/graphics.h @@ -28,7 +28,7 @@ #include "common/array.h" #include "graphics/surface.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" namespace Asylum { @@ -47,7 +47,7 @@ public: GraphicResource(byte *data, uint32 size); GraphicResource(ResourcePack *resPack, int entry) { ResourceEntry *resEntry = resPack->getResource(entry); - init(resEntry->data, resEntry->size); + init(resEntry->data, resEntry->size); } ~GraphicResource(); diff --git a/engines/asylum/menu.h b/engines/asylum/menu.h index 4cfce4b6d60..1760fba5c0b 100644 --- a/engines/asylum/menu.h +++ b/engines/asylum/menu.h @@ -29,7 +29,7 @@ #include "common/events.h" #include "asylum/asylum.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" #include "asylum/scene.h" #include "asylum/graphics.h" #include "asylum/text.h" diff --git a/engines/asylum/module.mk b/engines/asylum/module.mk index bb65ad05433..7235cd759d5 100644 --- a/engines/asylum/module.mk +++ b/engines/asylum/module.mk @@ -5,9 +5,9 @@ MODULE_OBJS := \ detection.o \ graphics.o \ menu.o \ - resourcepack.o \ + respack.o \ scene.o \ - scene_resource.o \ + sceneres.o \ screen.o \ sound.o \ text.o \ diff --git a/engines/asylum/resourcepack.cpp b/engines/asylum/respack.cpp similarity index 95% rename from engines/asylum/resourcepack.cpp rename to engines/asylum/respack.cpp index 0ead6e996a8..091e74c9008 100644 --- a/engines/asylum/resourcepack.cpp +++ b/engines/asylum/respack.cpp @@ -23,7 +23,7 @@ * */ -#include "asylum/resourcepack.h" +#include "asylum/respack.h" namespace Asylum { diff --git a/engines/asylum/resourcepack.h b/engines/asylum/respack.h similarity index 100% rename from engines/asylum/resourcepack.h rename to engines/asylum/respack.h diff --git a/engines/asylum/scene.h b/engines/asylum/scene.h index 6b720d9f478..ac233e3f0c7 100644 --- a/engines/asylum/scene.h +++ b/engines/asylum/scene.h @@ -29,10 +29,10 @@ #include "common/events.h" #include "asylum/asylum.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" #include "asylum/graphics.h" #include "asylum/text.h" -#include "asylum/scene_resource.h" +#include "asylum/sceneres.h" namespace Asylum { diff --git a/engines/asylum/scene_resource.cpp b/engines/asylum/sceneres.cpp similarity index 92% rename from engines/asylum/scene_resource.cpp rename to engines/asylum/sceneres.cpp index 9065fce5332..ecc05ca7b60 100644 --- a/engines/asylum/scene_resource.cpp +++ b/engines/asylum/sceneres.cpp @@ -23,7 +23,7 @@ * */ -#include "asylum/scene_resource.h" +#include "asylum/sceneres.h" namespace Asylum { @@ -73,15 +73,15 @@ void SceneResource::loadWorldStats(Common::SeekableReadStream *stream) { _worldStats->_size = stream->readUint32LE(); _worldStats->_numEntries = stream->readUint32LE(); _worldStats->_numChapter = stream->readUint32LE(); - + stream->skip(24); // unused data - + // read common graphic resources stream->read(&_worldStats->_commonRes,sizeof(CommonResources)); _worldStats->_width = stream->readUint32LE(); _worldStats->_height = stream->readUint32LE(); - + stream->skip(8); // unused data _worldStats->_numActions = stream->readUint32LE(); @@ -112,15 +112,15 @@ void SceneResource::loadWorldStats(Common::SeekableReadStream *stream) { actorDef.graphicResId = stream->readUint32LE(); actorDef.x = stream->readUint32LE(); actorDef.y = stream->readUint32LE(); - stream->skip(0x30); - stream->read(actorDef.name, 52); + stream->skip(0x30); + stream->read(actorDef.name, 52); stream->skip(0x158); actorDef.soundResId = stream->readUint32LE(); stream->skip(0x4D8); _worldStats->_actorsDef.push_back(actorDef); } - + // TODO grab Max actor definitions stream->seek(0xD6B5A); // where actors action definitions start @@ -132,17 +132,17 @@ void SceneResource::loadWorldStats(Common::SeekableReadStream *stream) { stream->read(actorActionDef.name,52); actorActionDef.id = stream->readUint32LE(); - stream->skip(0x14); + stream->skip(0x14); actorActionDef.actionListIdx1 = stream->readUint32LE(); actorActionDef.actionListIdx2 = stream->readUint32LE(); actorActionDef.actionType = stream->readUint32LE(); - stream->skip(0x2C); + stream->skip(0x2C); actorActionDef.polyIdx = stream->readUint32LE(); - stream->skip(0x08); + stream->skip(0x08); actorActionDef.soundResId = stream->readUint32LE(); - stream->skip(0x04); + stream->skip(0x04); actorActionDef.palCorrection = stream->readUint32LE(); - stream->skip(0x14); + stream->skip(0x14); actorActionDef.soundVolume = stream->readUint32LE(); _worldStats->_actorsActionDef.push_back(actorActionDef); diff --git a/engines/asylum/scene_resource.h b/engines/asylum/sceneres.h similarity index 100% rename from engines/asylum/scene_resource.h rename to engines/asylum/sceneres.h diff --git a/engines/asylum/screen.h b/engines/asylum/screen.h index f02e20f96a6..d0d09a7542b 100644 --- a/engines/asylum/screen.h +++ b/engines/asylum/screen.h @@ -28,7 +28,7 @@ #include "asylum/asylum.h" #include "asylum/graphics.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" #include "common/system.h" // for OSystem #include "graphics/surface.h" diff --git a/engines/asylum/sound.h b/engines/asylum/sound.h index 77c7cfa2b86..b4183f366ae 100644 --- a/engines/asylum/sound.h +++ b/engines/asylum/sound.h @@ -27,7 +27,7 @@ #define ASYLUM_SOUND_H_ #include "sound/mixer.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" namespace Asylum { @@ -41,12 +41,12 @@ public: void playSfx(ResourcePack *resPack, int entry) { ResourceEntry *resEntry = resPack->getResource(entry); - playSfx(resEntry->data, resEntry->size); + playSfx(resEntry->data, resEntry->size); } void playMusic(ResourcePack *resPack, int entry) { ResourceEntry *resEntry = resPack->getResource(entry); - playMusic(resEntry->data, resEntry->size); + playMusic(resEntry->data, resEntry->size); } bool isSfxActive() { return _mixer->isSoundHandleActive(_sfxHandle); } diff --git a/engines/asylum/text.h b/engines/asylum/text.h index c728db0e9f6..c75caca499c 100644 --- a/engines/asylum/text.h +++ b/engines/asylum/text.h @@ -27,7 +27,7 @@ #define ASYLUM_TEXT_H_ #include "asylum/screen.h" -#include "asylum/resourcepack.h" +#include "asylum/respack.h" namespace Asylum { @@ -39,7 +39,7 @@ public: ~Text(); void loadFont(ResourcePack *resPack, uint32 resId); - + void setTextPos(uint32 x, uint32 y); uint32 getTextWidth(char *text); uint32 getResTextWidth(uint32 resId); @@ -50,7 +50,7 @@ public: void drawResText(uint32 resId); void drawResText(uint32 x, uint32 y, uint32 resId); - void drawTextCentered(uint32 x, uint32 y, uint32 width, char *text); + void drawTextCentered(uint32 x, uint32 y, uint32 width, char *text); void drawResTextCentered(uint32 x, uint32 y, uint32 width, uint32 resId); void drawTextAlignRight(uint32 x, uint32 y, char *text);