BURIED: Hook the demo into the interface

This commit is contained in:
Matthew Hoops 2013-09-14 13:39:39 -04:00 committed by Eugene Sandulenko
parent 6b72a97670
commit 7d19e450bb
3 changed files with 20 additions and 4 deletions

View File

@ -182,7 +182,10 @@ void BioChipRightWindow::onPaint() {
bitmapResID = (_status == 0) ? 10 : 11;
break;
case kItemBioChipInterface:
bitmapResID = (_status == 0) ? 12 : 13;
if (_vm->isDemo())
bitmapResID = (_status == 0) ? IDB_BCR_INTERFACE_MENU : IDB_BCR_INTERFACE_EXIT;
else
bitmapResID = (_status == 0) ? 12 : 13;
break;
case kItemBioChipJump:
// TODO
@ -194,7 +197,10 @@ void BioChipRightWindow::onPaint() {
}
if (bitmapResID >= 0) {
Graphics::Surface *bitmap = _vm->_gfx->getBitmap(IDB_BCR_BITMAP_BASE + bitmapResID);
if (!_vm->isDemo())
bitmapResID += IDB_BCR_BITMAP_BASE;
Graphics::Surface *bitmap = _vm->_gfx->getBitmap(bitmapResID);
Common::Rect absoluteRect = getAbsoluteRect();
_vm->_gfx->blit(bitmap, absoluteRect.left, absoluteRect.top);
bitmap->free();

View File

@ -153,8 +153,12 @@ void DemoMainMenuWindow::onLButtonUp(const Common::Point &point, uint flags) {
}
return;
case BUTTON_INTERACTIVE:
// TODO
break;
if (_interactive.contains(point)) {
_vm->_sound->setAmbientSound();
// TODO: Reviewer mode check (control)
((FrameWindow *)_parent)->startNewGame();
}
return;
case BUTTON_GALLERY:
if (_gallery.contains(point)) {
_vm->_sound->setAmbientSound();

View File

@ -251,8 +251,14 @@ namespace Buried {
#define IDB_DEATH_WT_BUTTONS_NORMAL 12414
#define IDB_DEATH_WT_BUTTONS_DEPRESSED 12415
// Full Game:
#define IDB_BCR_BITMAP_BASE 12450
// Demo:
#define IDB_BCR_BLANK_BACKGROUND 12400
#define IDB_BCR_INTERFACE_MENU 12401
#define IDB_BCR_INTERFACE_EXIT 12402
#define IDB_PICON_BITMAP_BASE 12800
#define IDB_DRAG_BITMAP_BASE 12900