mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 14:18:37 +00:00
Draw main panel. Buttons lack backgorunds and save reminder is buggy atm.
svn-id: r18994
This commit is contained in:
parent
c79dcadcc0
commit
fc11b60674
@ -571,7 +571,7 @@ static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
|
||||
|
||||
0, // status x offset
|
||||
304, // status y offset
|
||||
640, // status width
|
||||
616, // status width
|
||||
24, // status height
|
||||
8, // status text y offset
|
||||
186, // status text color
|
||||
@ -590,7 +590,7 @@ static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
|
||||
-1, -1, // inventory Up & Down button indexies
|
||||
2, 4, // inventory rows, columns
|
||||
|
||||
0, 149, // main panel offsets
|
||||
0, 328, // main panel offsets
|
||||
ARRAYSIZE(IHNM_MainPanelButtons),
|
||||
IHNM_MainPanelButtons,
|
||||
|
||||
@ -599,7 +599,7 @@ static GameDisplayInfo IHNM_DisplayInfo = { //TODO: fill it all
|
||||
IHNM_CONVERSE_MAX_TEXT_WIDTH,
|
||||
IHNM_CONVERSE_TEXT_HEIGHT,
|
||||
IHNM_CONVERSE_TEXT_LINES,
|
||||
0, 0, // converse panel offsets
|
||||
0, 328, // converse panel offsets
|
||||
ARRAYSIZE(IHNM_ConversePanelButtons),
|
||||
IHNM_ConversePanelButtons,
|
||||
|
||||
@ -691,7 +691,7 @@ static GameFontDescription IHNMCD_GameFonts[] = {
|
||||
{3},
|
||||
{4},
|
||||
{5},
|
||||
{6},
|
||||
{6}, // kIHNMFont8
|
||||
{7},
|
||||
{8} // kIHNMMainFont
|
||||
};
|
||||
|
@ -50,8 +50,8 @@
|
||||
|
||||
namespace Saga {
|
||||
|
||||
static int verbTypeToTextStringsIdLUT[kVerbTypesMax] = {
|
||||
-1,
|
||||
static int verbTypeToTextStringsIdLUT[2][kVerbTypesMax] = {
|
||||
{-1,
|
||||
kTextPickUp,
|
||||
kTextLookAt,
|
||||
kTextWalkTo,
|
||||
@ -68,7 +68,8 @@ static int verbTypeToTextStringsIdLUT[kVerbTypesMax] = {
|
||||
-1,
|
||||
-1,
|
||||
-1,
|
||||
-1
|
||||
-1},
|
||||
{-1, -1, 2, 1, 5, -1, -1, 7, 4, -1, -1, -1, -1, -1, -1, 3, 6, 8}
|
||||
};
|
||||
|
||||
Interface::Interface(SagaEngine *vm) : _vm(vm) {
|
||||
@ -595,13 +596,6 @@ void Interface::draw() {
|
||||
if (_vm->_scene->isInIntro() || _fadeMode == kFadeOut)
|
||||
return;
|
||||
|
||||
// Disable this for IHNM for now, since that game uses the full screen
|
||||
// in some cases.
|
||||
|
||||
if (_vm->getGameType() == GType_IHNM) {
|
||||
return;
|
||||
}
|
||||
|
||||
drawStatusBar();
|
||||
|
||||
if (_panelMode == kPanelMain || _panelMode == kPanelMap) {
|
||||
@ -1486,10 +1480,6 @@ void Interface::drawStatusBar() {
|
||||
// Disable this for IHNM for now, since that game uses the full screen
|
||||
// in some cases.
|
||||
|
||||
if (_vm->getGameType() == GType_IHNM) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Erase background of status bar
|
||||
rect.left = _vm->getDisplayInfo().statusXOffset;
|
||||
rect.top = _vm->getDisplayInfo().statusYOffset;
|
||||
@ -1917,20 +1907,25 @@ void Interface::drawVerbPanelText(Surface *ds, PanelButton *panelButton, int tex
|
||||
int textWidth;
|
||||
Point point;
|
||||
int textId;
|
||||
FontId font;
|
||||
|
||||
textId = verbTypeToTextStringsIdLUT[panelButton->id];
|
||||
if (_vm->getGameType() == GType_ITE) {
|
||||
textId = verbTypeToTextStringsIdLUT[0][panelButton->id];
|
||||
text = _vm->getTextString(textId);
|
||||
font = kSmallFont;
|
||||
} else {
|
||||
textId = verbTypeToTextStringsIdLUT[1][panelButton->id];
|
||||
text = _vm->_script->_mainStrings.getString(textId + 1);
|
||||
font = kIHNMFont8;
|
||||
}
|
||||
|
||||
if (textId == -1)
|
||||
error("textId == -1");
|
||||
|
||||
text = _vm->getTextString(textId);
|
||||
|
||||
textWidth = _vm->_font->getStringWidth(kSmallFont, text, 0, kFontNormal);
|
||||
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;
|
||||
|
||||
_vm->_font->textDraw(kSmallFont, ds, text, point, textColor, textShadowColor, (textShadowColor != 0) ? kFontShadow : kFontNormal);
|
||||
_vm->_font->textDraw(font, ds, text, point, textColor, textShadowColor, (textShadowColor != 0) ? kFontShadow : kFontNormal);
|
||||
}
|
||||
|
||||
|
||||
@ -2331,7 +2326,7 @@ void Interface::keyBoss() {
|
||||
|
||||
backBuffer = _vm->_gfx->getBackBuffer();
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
rect.left = rect.top = 20;
|
||||
|
||||
_vm->_resource->loadResource(_interfaceContext, RID_IHNM_BOSS_SCREEN, resource, resourceLength);
|
||||
if (resourceLength == 0) {
|
||||
|
@ -88,6 +88,7 @@ namespace Saga {
|
||||
#define RID_IHNM_MAIN_SPRITES 12 // TODO: verify this
|
||||
#define RID_IHNM_MAIN_PANEL_SPRITES 13 // TODO: verify this
|
||||
#define RID_IHNM_MAIN_STRINGS 21
|
||||
#define RID_IHNM_PROFILE_BG 20
|
||||
|
||||
#define RID_IHNM_BOSS_SCREEN 19
|
||||
|
||||
|
@ -322,6 +322,7 @@ enum FontId {
|
||||
kMediumFont,
|
||||
kBigFont,
|
||||
|
||||
kIHNMFont8 = 4,
|
||||
kIHNMMainFont = 6
|
||||
};
|
||||
|
||||
|
@ -198,6 +198,14 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
|
||||
bufRowPointer += ds->pitch * io;
|
||||
srcRowPointer += width * io;
|
||||
}
|
||||
|
||||
int traverseSign = 1;
|
||||
|
||||
if (_vm->getGameType() == GType_IHNM) {
|
||||
traverseSign = -1;
|
||||
bufRowPointer += clipHeight * ds->pitch;
|
||||
}
|
||||
|
||||
for (i = io; i < clipHeight; i++) {
|
||||
for (j = jo; j < clipWidth; j++) {
|
||||
assert((byte *)ds->pixels <= (byte *)(bufRowPointer + j + spritePointer.x));
|
||||
@ -210,7 +218,7 @@ void Sprite::drawClip(Surface *ds, const Rect &clipRect, const Point &spritePoin
|
||||
*(bufRowPointer + j + spritePointer.x) = *(srcRowPointer + j);
|
||||
}
|
||||
}
|
||||
bufRowPointer += ds->pitch;
|
||||
bufRowPointer += ds->pitch * traverseSign;
|
||||
srcRowPointer += width;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user