Fix for verbs in IHNM

svn-id: r26732
This commit is contained in:
Filippos Karapetis 2007-05-01 21:48:18 +00:00
parent d08eeff700
commit 6ca558f0ff
2 changed files with 20 additions and 17 deletions

View File

@ -283,14 +283,16 @@ static const GameDisplayInfo ITE_DisplayInfo = {
#define IHNM_CONVERSE_TEXT_LINES 10 #define IHNM_CONVERSE_TEXT_LINES 10
static PanelButton IHNM_MainPanelButtons[] = { static PanelButton IHNM_MainPanelButtons[] = {
{kPanelButtonVerb, 106,12, 114,30, kVerbIHNMWalk,'w',0, 0,1,0}, // TODO: The +2's are needed here to fix the verbs, investigate why
{kPanelButtonVerb, 106,44, 114,30, kVerbIHNMLookAt,'l',0, 2,3,0}, // The computation of textid in Interface::drawVerbPanelText has also been changed accordingly
{kPanelButtonVerb, 106,76, 114,30, kVerbIHNMTake,'k',0, 4,5,0}, {kPanelButtonVerb, 106,12, 114,30, kVerbIHNMWalk + 2,'w',0, 0,1,0},
{kPanelButtonVerb, 106,108, 114,30, kVerbIHNMUse,'u',0, 6,7,0}, {kPanelButtonVerb, 106,44, 114,30, kVerbIHNMLookAt + 2,'l',0, 2,3,0},
{kPanelButtonVerb, 223,12, 114,30, kVerbIHNMTalkTo,'t',0, 8,9,0}, {kPanelButtonVerb, 106,76, 114,30, kVerbIHNMTake + 2,'k',0, 4,5,0},
{kPanelButtonVerb, 223,44, 114,30, kVerbIHNMSwallow,'s',0, 10,11,0}, {kPanelButtonVerb, 106,108, 114,30, kVerbIHNMUse + 2,'u',0, 6,7,0},
{kPanelButtonVerb, 223,76, 114,30, kVerbIHNMGive,'g',0, 12,13,0}, {kPanelButtonVerb, 223,12, 114,30, kVerbIHNMTalkTo + 2,'t',0, 8,9,0},
{kPanelButtonVerb, 223,108, 114,30, kVerbIHNMPush,'p',0, 14,15,0}, {kPanelButtonVerb, 223,44, 114,30, kVerbIHNMSwallow + 2,'s',0, 10,11,0},
{kPanelButtonVerb, 223,76, 114,30, kVerbIHNMGive + 2,'g',0, 12,13,0},
{kPanelButtonVerb, 223,108, 114,30, kVerbIHNMPush + 2,'p',0, 14,15,0},
{kPanelButtonArrow, 606,22, 20,25, -1,'[',0, 0,0,0}, //TODO: arrow Sprite Numbers {kPanelButtonArrow, 606,22, 20,25, -1,'[',0, 0,0,0}, //TODO: arrow Sprite Numbers
{kPanelButtonArrow, 606,108, 20,25, 1,']',0, 0,0,0}, {kPanelButtonArrow, 606,108, 20,25, 1,']',0, 0,0,0},

View File

@ -69,14 +69,14 @@ static int verbTypeToTextStringsIdLUT[2][kVerbTypeIdsMax] = {
-1, -1,
-1}, -1},
{-1, {-1,
3, //TODO:check kVerbIHNMWalk,
2, kVerbIHNMLookAt,
1, kVerbIHNMTake,
5, kVerbIHNMUse,
6, //TODO:check kVerbIHNMTalkTo,
8, //TODO:check kVerbIHNMSwallow,
7, kVerbIHNMGive,
4} kVerbIHNMPush}
}; };
Interface::Interface(SagaEngine *vm) : _vm(vm) { Interface::Interface(SagaEngine *vm) : _vm(vm) {
@ -1939,7 +1939,8 @@ void Interface::drawVerbPanelText(Surface *ds, PanelButton *panelButton, KnownCo
textId = verbTypeToTextStringsIdLUT[0][panelButton->id]; textId = verbTypeToTextStringsIdLUT[0][panelButton->id];
text = _vm->getTextString(textId); text = _vm->getTextString(textId);
} else { } else {
textId = verbTypeToTextStringsIdLUT[1][panelButton->id]; // This -2 has been placed because of the changes in the ids in IHNM_MainPanelButtons
textId = verbTypeToTextStringsIdLUT[1][panelButton->id - 2];
text = _vm->_script->_mainStrings.getString(textId + 1); text = _vm->_script->_mainStrings.getString(textId + 1);
textShadowKnownColor = kKnownColorTransparent; textShadowKnownColor = kKnownColorTransparent;
} }