[Scummvm-cvs-logs] CVS: scummvm/saga input.cpp,1.54,1.55 interface.cpp,1.148,1.149 interface.h,1.77,1.78 resnames.h,1.37,1.38
Eugene Sandulenko
sev at users.sourceforge.net
Sat Oct 8 20:38:13 CEST 2005
Update of /cvsroot/scummvm/scummvm/saga
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1490
Modified Files:
input.cpp interface.cpp interface.h resnames.h
Log Message:
Boss key like in original. Press F9. Palette seems to be wrong though and
cursor does not reappear.
Index: input.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/input.cpp,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- input.cpp 6 Oct 2005 15:56:06 -0000 1.54
+++ input.cpp 9 Oct 2005 03:35:45 -0000 1.55
@@ -100,6 +100,9 @@
break;
case 289: // F8
break;
+ case 290: // F9
+ _interface->keyBoss();
+ break;
// Actual game keys
case 32: // space
Index: interface.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.cpp,v
retrieving revision 1.148
retrieving revision 1.149
diff -u -d -r1.148 -r1.149
--- interface.cpp 9 Oct 2005 01:20:46 -0000 1.148
+++ interface.cpp 9 Oct 2005 03:35:45 -0000 1.149
@@ -177,6 +177,7 @@
_active = true;
_panelMode = _lockedMode = kPanelNull;
_savedMode = -1;
+ _bossMode = -1;
_fadeMode = kNoFade;
_inMainMode = false;
*_statusText = 0;
@@ -313,6 +314,9 @@
break;
case kPanelChapterSelection:
break;
+ case kPanelBoss:
+ _vm->_render->setFlag(RF_DEMO_SUBST);
+ break;
}
draw();
@@ -487,6 +491,10 @@
_vm->shutDown();
}
break;
+ case kPanelBoss:
+ _vm->_render->clearFlag(RF_DEMO_SUBST);
+ keyBossExit();
+ break;
}
return false;
}
@@ -2298,4 +2306,81 @@
}
}
+void Interface::keyBoss() {
+ if (_vm->getGameType() != GType_IHNM)
+ return;
+
+ if (_bossMode != -1 || _fadeMode != kNoFade)
+ return;
+
+ _vm->_sound->pauseVoice();
+ _vm->_sound->pauseSound();
+ _vm->_music->pause();
+
+ int i;
+ byte *resource;
+ size_t resourceLength, imageLength;
+ Surface *backBuffer;
+ Rect rect;
+ byte *image;
+ int imageWidth, imageHeight;
+ const byte *pal;
+ PalEntry cPal[PAL_ENTRIES];
+
+ _vm->_gfx->showCursor(false);
+
+ backBuffer = _vm->_gfx->getBackBuffer();
+
+ rect.left = rect.top = 0;
+
+ _vm->_resource->loadResource(_interfaceContext, RID_IHNM_BOSS_SCREEN, resource, resourceLength);
+ if (resourceLength == 0) {
+ error("Interface::bossKey() unable to load Boss image resource");
+ }
+
+ _bossMode = _panelMode;
+ setMode(kPanelBoss);
+
+ _vm->decodeBGImage(resource, resourceLength, &image, &imageLength, &imageWidth, &imageHeight);
+ rect.setWidth(imageWidth);
+ rect.setHeight(imageHeight);
+
+ _vm->_gfx->getCurrentPal(_mapSavedPal);
+ pal = _vm->getImagePal(resource, resourceLength);
+
+ for (i = 0; i < PAL_ENTRIES; i++) {
+ cPal[i].red = *pal++;
+ cPal[i].green = *pal++;
+ cPal[i].blue = *pal++;
+ }
+
+ backBuffer->blit(rect, image);
+
+ _vm->_gfx->setPalette(cPal);
+
+ free(resource);
+ free(image);
+}
+
+
+void Interface::keyBossExit() {
+ PalEntry pal[PAL_ENTRIES];
+
+ _vm->_sound->resumeVoice();
+ _vm->_sound->resumeSound();
+ _vm->_music->resume();
+
+ _vm->_gfx->getCurrentPal(pal);
+
+ _vm->_gfx->palToBlack(pal, 1);
+ setMode(_bossMode);
+
+ _vm->_render->drawScene();
+
+ _vm->_gfx->blackToPal(_mapSavedPal, 1);
+
+ _bossMode = -1;
+}
+
+
} // End of namespace Saga
Index: interface.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/interface.h,v
retrieving revision 1.77
retrieving revision 1.78
diff -u -d -r1.77 -r1.78
--- interface.h 7 Oct 2005 15:36:28 -0000 1.77
+++ interface.h 9 Oct 2005 03:35:45 -0000 1.78
@@ -70,7 +70,8 @@
kPanelSceneSubstitute,
kPanelChapterSelection,
kPanelCutaway,
- kPanelVideo
+ kPanelVideo,
+ kPanelBoss
// kPanelInventory
};
@@ -243,6 +244,9 @@
bool processAscii(uint16 ascii, bool synthetic = false);
void processKeyUp(uint16 ascii);
+ void keyBoss();
+ void keyBossExit();
+
void disableAbortSpeeches(bool d) { _disableAbortSpeeches = d; }
bool _textInput;
@@ -423,6 +427,7 @@
int _panelMode;
int _savedMode;
int _lockedMode;
+ int _bossMode;
bool _inMainMode;
char _statusText[STATUS_TEXT_LEN];
int _statusOnceColor;
Index: resnames.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/saga/resnames.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- resnames.h 5 Oct 2005 01:31:46 -0000 1.37
+++ resnames.h 9 Oct 2005 03:35:45 -0000 1.38
@@ -87,6 +87,8 @@
#define RID_IHNM_MAIN_PANEL_SPRITES 13 // TODO: verify this
#define RID_IHNM_MAIN_STRINGS 21
+#define RID_IHNM_BOSS_SCREEN 19
+
// Puzzle portraits
#define RID_ITE_SAKKA_APPRAISING 6
#define RID_ITE_SAKKA_DENIAL 7
More information about the Scummvm-git-logs
mailing list