mirror of
https://github.com/libretro/scummvm.git
synced 2025-03-05 01:38:36 +00:00
FREESCAPE: better handling for title and border drawing when a game starts
This commit is contained in:
parent
f81e71a42e
commit
362f134af4
@ -500,7 +500,17 @@ Common::Error FreescapeEngine::run() {
|
||||
}
|
||||
}
|
||||
|
||||
prepareBorder();
|
||||
loadBorder(); // Border is load unmodified
|
||||
if (_border && isDOS()) {
|
||||
if (saveSlot == -1) {
|
||||
drawBorder();
|
||||
_gfx->flipBuffer();
|
||||
g_system->updateScreen();
|
||||
g_system->delayMillis(3000);
|
||||
}
|
||||
}
|
||||
processBorder(); // Border is processed to use during the game
|
||||
|
||||
if (saveSlot >= 0) { // load the savegame
|
||||
loadGameState(saveSlot);
|
||||
} else
|
||||
@ -539,9 +549,14 @@ Common::Error FreescapeEngine::run() {
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
void FreescapeEngine::prepareBorder() {
|
||||
void FreescapeEngine::loadBorder() {
|
||||
_borderTexture = _gfx->createTexture(_border);
|
||||
}
|
||||
|
||||
void FreescapeEngine::processBorder() {
|
||||
if (_border) {
|
||||
_borderTexture = nullptr;
|
||||
if (_borderTexture)
|
||||
delete _borderTexture;
|
||||
uint32 gray = _gfx->_texturePixelFormat.ARGBToColor(0x00, 0xA0, 0xA0, 0xA0);
|
||||
_border->fillRect(_viewArea, gray);
|
||||
|
||||
|
@ -104,7 +104,8 @@ public:
|
||||
Common::Rect _fullscreenViewArea;
|
||||
void centerCrossair();
|
||||
|
||||
virtual void prepareBorder();
|
||||
virtual void loadBorder();
|
||||
virtual void processBorder();
|
||||
void drawBorder();
|
||||
void drawTitle();
|
||||
void drawBackground();
|
||||
@ -359,7 +360,7 @@ public:
|
||||
|
||||
void gotoArea(uint16 areaID, int entranceID) override;
|
||||
|
||||
void prepareBorder() override;
|
||||
void processBorder() override;
|
||||
void loadAssets() override;
|
||||
void drawUI() override;
|
||||
|
||||
|
@ -407,7 +407,6 @@ void DrillerEngine::loadAssetsFullGame() {
|
||||
loadSoundsFx(&file, 0x30da6, 25);
|
||||
} else if (_renderMode == Common::kRenderEGA) {
|
||||
loadBundledImages();
|
||||
_title = _border;
|
||||
file.open("DRILLE.EXE");
|
||||
|
||||
if (!file.isOpen())
|
||||
@ -420,7 +419,6 @@ void DrillerEngine::loadAssetsFullGame() {
|
||||
|
||||
} else if (_renderMode == Common::kRenderCGA) {
|
||||
loadBundledImages();
|
||||
_title = _border;
|
||||
file.open("DRILLC.EXE");
|
||||
|
||||
if (!file.isOpen())
|
||||
@ -457,8 +455,8 @@ void DrillerEngine::loadAssetsFullGame() {
|
||||
_areaMap[18]->_conditionSources.push_back(conditionSource);
|
||||
}
|
||||
|
||||
void DrillerEngine::prepareBorder() {
|
||||
FreescapeEngine::prepareBorder();
|
||||
void DrillerEngine::processBorder() {
|
||||
FreescapeEngine::processBorder();
|
||||
if (isDOS() && _renderMode == Common::kRenderCGA) { // Replace some colors for the CGA borders
|
||||
uint32 color1 = _border->format.ARGBToColor(0xFF, 0xAA, 0x00, 0xAA);
|
||||
uint32 color2 = _border->format.ARGBToColor(0xFF, 0xAA, 0x55, 0x00);
|
||||
|
@ -585,6 +585,15 @@ void FreescapeEngine::loadBundledImages() {
|
||||
decoder.destroy();
|
||||
} else
|
||||
error("Missing border file '%s' in data bundle", borderFilename.c_str());
|
||||
|
||||
Common::String titleFilename = targetName + "_" + Common::getRenderModeDescription(_renderMode) + "_title.bmp";
|
||||
if (_dataBundle->hasFile(titleFilename)) {
|
||||
Common::SeekableReadStream *titleFile = _dataBundle->createReadStreamForMember(titleFilename);
|
||||
decoder.loadStream(*titleFile);
|
||||
_title = new Graphics::Surface();
|
||||
_title->copyFrom(*decoder.getSurface());
|
||||
decoder.destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void FreescapeEngine::loadFonts(Common::SeekableReadStream *file, int offset) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user