diff options
-rw-r--r-- | saga/actor.cpp | 4 | ||||
-rw-r--r-- | saga/game.cpp | 24 | ||||
-rw-r--r-- | saga/interface.cpp | 3 | ||||
-rw-r--r-- | saga/resnames.h | 2 | ||||
-rw-r--r-- | saga/rscfile.cpp | 5 | ||||
-rw-r--r-- | saga/rscfile.h | 2 | ||||
-rw-r--r-- | saga/scene.cpp | 4 | ||||
-rw-r--r-- | saga/sprite.cpp | 2 | ||||
-rw-r--r-- | saga/sprite.h | 1 |
9 files changed, 24 insertions, 23 deletions
diff --git a/saga/actor.cpp b/saga/actor.cpp index 0461cf9d96..efca4b529b 100644 --- a/saga/actor.cpp +++ b/saga/actor.cpp @@ -414,7 +414,7 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource actor = _actors[i] = new ActorData(); actor->_id = objectIndexToId(kGameObjectActor, i); //actorIndexToId(i); actor->_index = i; - debug(0, "init actor id=0x%x index=%d", actor->_id, actor->_index); + debug(4, "init actor id=0x%x index=%d", actor->_id, actor->_index); actorS.readUint32LE(); //next displayed actorS.readByte(); //type actor->_flags = actorS.readByte(); @@ -427,7 +427,7 @@ void Actor::loadActorList(int protagonistIdx, int actorCount, int actorsResource actor->_screenDepth = actorS.readUint16LE(); actor->_spriteListResourceId = actorS.readUint32LE(); actor->_frameListResourceId = actorS.readUint32LE(); - debug(0, "%d: %d, %d [%d]", i, actor->_spriteListResourceId, actor->_frameListResourceId, actor->_nameIndex); + debug(4, "%d: %d, %d [%d]", i, actor->_spriteListResourceId, actor->_frameListResourceId, actor->_nameIndex); actor->_scriptEntrypointNumber = actorS.readUint32LE(); actorS.readUint32LE(); // xSprite *dSpr; actorS.readUint16LE(); //LEFT diff --git a/saga/game.cpp b/saga/game.cpp index 47f4c68442..53c7da43c5 100644 --- a/saga/game.cpp +++ b/saga/game.cpp @@ -534,19 +534,17 @@ static PanelButton IHNM_MainPanelButtons[] = { {kPanelButtonVerb, 223,76, 114,30, kVerbGive,'g',0, 12,13,0}, {kPanelButtonVerb, 223,108, 114,30, kVerbPush,'p',0, 14,15,0}, {kPanelButtonArrow, 606,22, 20,25, -1,'[',0, 0,0,0}, //TODO: arrow Sprite Numbers - {kPanelButtonArrow, 606,108, 20,25, 1,']',0, 0,0,0} -//TODO:inventory -/* - {kPanelButtonInventory, 181 + 32*0,6, 27,18, 0,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*1,6, 27,18, 1,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*2,6, 27,18, 2,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*3,6, 27,18, 3,'-',0, 0,0,0}, + {kPanelButtonArrow, 606,108, 20,25, 1,']',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*0,27, 27,18, 4,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*1,27, 27,18, 5,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*2,27, 27,18, 6,'-',0, 0,0,0}, - {kPanelButtonInventory, 181 + 32*3,27, 27,18, 7,'-',0, 0,0,0} -*/ + {kPanelButtonInventory, 357 + 64*0,18, 54,54, 0,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*1,18, 54,54, 1,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*2,18, 54,54, 2,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*3,18, 54,54, 3,'-',0, 0,0,0}, + + {kPanelButtonInventory, 357 + 64*0,80, 54,54, 4,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*1,80, 54,54, 5,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*2,80, 54,54, 6,'-',0, 0,0,0}, + {kPanelButtonInventory, 357 + 64*3,80, 54,54, 7,'-',0, 0,0,0} }; static PanelButton IHNM_ConversePanelButtons[] = { @@ -587,7 +585,7 @@ static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all 616, // status width 24, // status height 8, // status text y offset - 186, // status text color + 253, // status text color 250, // status BG color 616, 303, // save reminder pos 24, 24, // save reminder w&h diff --git a/saga/interface.cpp b/saga/interface.cpp index ae35f36877..f3618b00c8 100644 --- a/saga/interface.cpp +++ b/saga/interface.cpp @@ -1689,6 +1689,7 @@ int Interface::inventoryItemPosition(int objectId) { void Interface::drawInventory(Surface *backBuffer) { if (!isInMainMode()) return; + int i; Rect rect; int ci; @@ -1712,7 +1713,7 @@ void Interface::drawInventory(Surface *backBuffer) { if (ci < _inventoryCount) { obj = _vm->_actor->getObj(_inventory[ci]); - _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_mainSprites, obj->_spriteListResourceId, rect, 256); + _vm->_sprite->draw(backBuffer, _vm->getDisplayClip(), _vm->_sprite->_inventorySprites, obj->_spriteListResourceId, rect, 256); } ci++; diff --git a/saga/resnames.h b/saga/resnames.h index 9317557cdd..3b33d33dd8 100644 --- a/saga/resnames.h +++ b/saga/resnames.h @@ -98,7 +98,7 @@ namespace Saga { #define RID_IHNM_CONVERSE_PANEL 10 #define RID_IHNM_HOURGLASS_CURSOR 11 #define RID_IHNM_MAIN_SPRITES 12 // TODO: verify this -#define RID_IHNM_MAIN_PANEL_SPRITES 12 // TODO: verify this +#define RID_IHNM_MAIN_PANEL_SPRITES 12 #define RID_IHNM_ARROW_SPRITES 13 #define RID_IHNM_SAVEREMINDER_SPRITES 14 #define RID_IHNM_OPTION_PANEL 15 diff --git a/saga/rscfile.cpp b/saga/rscfile.cpp index 0088a8be42..ddb0c79b4f 100644 --- a/saga/rscfile.cpp +++ b/saga/rscfile.cpp @@ -469,7 +469,7 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) { _metaResource.sceneIndex = metaS.readSint16LE(); _metaResource.objectCount = metaS.readSint16LE(); _metaResource.objectsStringsResourceID = metaS.readSint32LE(); - _metaResource.field_8 = metaS.readSint32LE(); + _metaResource.inventorySpritesID = metaS.readSint32LE(); _metaResource.mainSpritesID = metaS.readSint32LE(); _metaResource.objectsResourceID = metaS.readSint32LE(); _metaResource.actorCount = metaS.readSint16LE(); @@ -531,7 +531,8 @@ void Resource::loadGlobalResources(int chapter, int actorsEntrance) { _vm->loadStrings(_vm->_actor->_actorsStrings, resourcePointer, resourceLength); free(resourcePointer); - // TODO: field_8. Inventory-related + _vm->_sprite->_inventorySprites.freeMem(); + _vm->_sprite->loadList(_metaResource.inventorySpritesID, _vm->_sprite->_inventorySprites); _vm->_sprite->_mainSprites.freeMem(); _vm->_sprite->loadList(_metaResource.mainSpritesID, _vm->_sprite->_mainSprites); diff --git a/saga/rscfile.h b/saga/rscfile.h index 7de0e5b119..4b720a4eb0 100644 --- a/saga/rscfile.h +++ b/saga/rscfile.h @@ -93,7 +93,7 @@ struct MetaResource { int16 sceneIndex; int16 objectCount; int32 objectsStringsResourceID; - int32 field_8; + int32 inventorySpritesID; int32 mainSpritesID; int32 objectsResourceID; int16 actorCount; diff --git a/saga/scene.cpp b/saga/scene.cpp index 909914cd4c..4acef59409 100644 --- a/saga/scene.cpp +++ b/saga/scene.cpp @@ -610,7 +610,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { _vm->_interface->clearInventory(); _vm->_resource->loadGlobalResources(loadSceneParams->chapter, loadSceneParams->actorsEntrance); - _vm->_interface->addToInventory(IHNM_OBJ_PROFILE); + _vm->_interface->addToInventory(0x4000); //IHNM_OBJ_PROFILE); _vm->_interface->activate(); if (loadSceneParams->chapter == 8 || loadSceneParams->chapter == -1) @@ -620,7 +620,7 @@ void Scene::loadScene(LoadSceneParams *loadSceneParams) { _inGame = true; - //_vm->_script->setVerb(kVerbIHNMWalkTo); uncomment then panel will be done + _vm->_script->setVerb(kVerbWalkTo); if (loadSceneParams->sceneDescriptor == -2) { return; diff --git a/saga/sprite.cpp b/saga/sprite.cpp index 191055acca..633d9cd91c 100644 --- a/saga/sprite.cpp +++ b/saga/sprite.cpp @@ -53,7 +53,7 @@ Sprite::Sprite(SagaEngine *vm) : _vm(vm) { if (_vm->getGameType() == GType_ITE) { loadList(_vm->getResourceDescription()->mainSpritesResourceId, _mainSprites); - _arrowSprites = _saveReminderSprites = _mainSprites; + _arrowSprites = _saveReminderSprites = _inventorySprites = _mainSprites; } else { loadList(RID_IHNM_ARROW_SPRITES, _arrowSprites); loadList(RID_IHNM_SAVEREMINDER_SPRITES, _saveReminderSprites); diff --git a/saga/sprite.h b/saga/sprite.h index 58a2ba9626..ea8accda47 100644 --- a/saga/sprite.h +++ b/saga/sprite.h @@ -66,6 +66,7 @@ public: SpriteList _mainSprites; SpriteList _saveReminderSprites; SpriteList _arrowSprites; + SpriteList _inventorySprites; Sprite(SagaEngine *vm); ~Sprite(void); |