mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
IHNM verb panel fixes:
* Verb buttons and texts are drawn at the correct coordinates. I've compared it to the screenshot on Mobygames. * Verb text is drawn without shadow. * The "Walk to", "Look at", "Take" and "Use" buttons all have the correct background. For some reason, I can't find the sprites for the remaining four buttons. svn-id: r19004
This commit is contained in:
parent
24202dea85
commit
6ce32fd4a5
@ -525,14 +525,14 @@ static GamePatchDescription ITELinPatch_Files[] = {
|
||||
// IHNM section
|
||||
|
||||
static PanelButton IHNM_MainPanelButtons[] = {
|
||||
{kPanelButtonVerb, 106,13, 114,30, kVerbWalkTo,'w',0, 0,0,0}, //TODO: verb Sprite Numbers
|
||||
{kPanelButtonVerb, 106,45, 114,30, kVerbLookAt,'l',0, 0,0,0},
|
||||
{kPanelButtonVerb, 106,77, 114,30, kVerbTake,'k',0, 0,0,0},
|
||||
{kPanelButtonVerb, 106,109, 114,30, kVerbUse,'u',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,13, 114,30, kVerbTalkTo,'t',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,45, 114,30, kVerbSwallow,'s',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,77, 114,30, kVerbGive,'g',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,109, 114,30, kVerbPush,'p',0, 0,0,0},
|
||||
{kPanelButtonVerb, 106,12, 114,30, kVerbWalkTo,'w',0, 0,2,0},
|
||||
{kPanelButtonVerb, 106,44, 114,30, kVerbLookAt,'l',0, 4,6,0},
|
||||
{kPanelButtonVerb, 106,76, 114,30, kVerbTake,'k',0, 8,10,0},
|
||||
{kPanelButtonVerb, 106,108, 114,30, kVerbUse,'u',0, 12,14,0},
|
||||
{kPanelButtonVerb, 223,12, 114,30, kVerbTalkTo,'t',0, 0,0,0}, // TODO: Find the sprites for the remaining buttons
|
||||
{kPanelButtonVerb, 223,44, 114,30, kVerbSwallow,'s',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,76, 114,30, kVerbGive,'g',0, 0,0,0},
|
||||
{kPanelButtonVerb, 223,108, 114,30, kVerbPush,'p',0, 0,0,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
|
||||
|
@ -118,7 +118,6 @@ Interface::Interface(SagaEngine *vm) : _vm(vm) {
|
||||
&_optionPanel.imageLength, &_optionPanel.imageWidth, &_optionPanel.imageHeight);
|
||||
free(resource);
|
||||
|
||||
|
||||
_vm->_sprite->loadList(_vm->getResourceDescription()->mainPanelSpritesResourceId, _mainPanel.sprites);
|
||||
|
||||
if (_vm->getGameType() == GType_ITE) {
|
||||
@ -1915,13 +1914,18 @@ void Interface::drawVerbPanelText(Surface *ds, PanelButton *panelButton, int tex
|
||||
textId = verbTypeToTextStringsIdLUT[1][panelButton->id];
|
||||
text = _vm->_script->_mainStrings.getString(textId + 1);
|
||||
font = kIHNMFont8;
|
||||
textShadowColor = 0;
|
||||
}
|
||||
|
||||
|
||||
textWidth = _vm->_font->getStringWidth(font, text, 0, kFontNormal);
|
||||
|
||||
point.x = _mainPanel.x + panelButton->xOffset + 1 + (panelButton->width - 1 - textWidth) / 2;
|
||||
point.y = _mainPanel.y + panelButton->yOffset + 1;
|
||||
if (_vm->getGameType() == GType_ITE) {
|
||||
point.x = _mainPanel.x + panelButton->xOffset + 1 + (panelButton->width - 1 - textWidth) / 2;
|
||||
point.y = _mainPanel.y + panelButton->yOffset + 1;
|
||||
} else {
|
||||
point.x = _mainPanel.x + panelButton->xOffset + 1 + (panelButton->width - textWidth) / 2;
|
||||
point.y = _mainPanel.y + panelButton->yOffset + 12;
|
||||
}
|
||||
|
||||
_vm->_font->textDraw(font, ds, text, point, textColor, textShadowColor, (textShadowColor != 0) ? kFontShadow : kFontNormal);
|
||||
}
|
||||
|
@ -94,11 +94,11 @@ namespace Saga {
|
||||
#define RID_ITE_SPR_XHAIR1 (73 + 9)
|
||||
#define RID_ITE_SPR_XHAIR2 (74 + 9)
|
||||
|
||||
#define RID_IHNM_MAIN_PANEL 9
|
||||
#define RID_IHNM_MAIN_PANEL 9
|
||||
#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 13 // TODO: verify this
|
||||
#define RID_IHNM_MAIN_PANEL_SPRITES 12 // TODO: verify this
|
||||
#define RID_IHNM_ARROW_SPRITES 13
|
||||
#define RID_IHNM_SAVEREMINDER_SPRITES 14
|
||||
#define RID_IHNM_OPTION_PANEL 15
|
||||
|
@ -124,7 +124,7 @@ void Sprite::loadList(int resourceId, SpriteList &spriteList) {
|
||||
spriteInfo->width = readS2.readUint16();
|
||||
spriteInfo->height = readS2.readUint16();
|
||||
|
||||
if (spriteInfo->width > 100) { // FIXME: HACK
|
||||
if (spriteInfo->width > 200) { // FIXME: HACK
|
||||
warning("Sprite width is too big: (%d x %d)", spriteInfo->width, spriteInfo->height);
|
||||
spriteInfo->width = spriteInfo->height = 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user