mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-02 23:26:44 +00:00
FREESCAPE: added strength indicators for castle dos (ega)
This commit is contained in:
parent
8d0a6784f7
commit
a9083ab9a1
BIN
devtools/create_freescape/castle_strength_background_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_background_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
devtools/create_freescape/castle_strength_bar_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_bar_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 690 B |
BIN
devtools/create_freescape/castle_strength_weight_0_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_weight_0_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 B |
BIN
devtools/create_freescape/castle_strength_weight_1_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_weight_1_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 B |
BIN
devtools/create_freescape/castle_strength_weight_2_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_weight_2_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 B |
BIN
devtools/create_freescape/castle_strength_weight_3_ega.bmp
Normal file
BIN
devtools/create_freescape/castle_strength_weight_3_ega.bmp
Normal file
Binary file not shown.
After Width: | Height: | Size: 258 B |
Binary file not shown.
@ -638,70 +638,47 @@ void CastleEngine::drawStringInSurface(const Common::String &str, int x, int y,
|
||||
}
|
||||
|
||||
void CastleEngine::drawEnergyMeter(Graphics::Surface *surface) {
|
||||
/*uint32 back = 0;
|
||||
uint32 black = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0x00, 0x00, 0x00);
|
||||
Common::Rect weightRect;
|
||||
Common::Rect barRect;
|
||||
Common::Rect backRect;*/
|
||||
Common::Point origin;
|
||||
|
||||
if (isDOS()) {
|
||||
/*back = _gfx->_texturePixelFormat.ARGBToColor(0xFF, 0xA7, 0x00, 0x00);
|
||||
barRect = Common::Rect(45, 164, 110, 166);
|
||||
weightRect = Common::Rect(57, 158, 59, 172);
|
||||
backRect = Common::Rect(45, 157, 112, 173);
|
||||
if (_gameStateVars[k8bitVariableShield] > 16)
|
||||
weightRect.translate(3, 0);*/
|
||||
} if (isSpectrum()) {
|
||||
if (isDOS())
|
||||
origin = Common::Point(43, 157);
|
||||
if (isSpectrum())
|
||||
origin = Common::Point(63, 154);
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtBackgroundFrame, origin.x, origin.y, Common::Rect(0, 0, _strenghtBackgroundFrame->w, _strenghtBackgroundFrame->h));
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtBarFrame, origin.x, origin.y + 6, Common::Rect(0, 0, _strenghtBarFrame->w, _strenghtBarFrame->h));
|
||||
|
||||
Common::Point weightPoint;
|
||||
int frameIdx = -1;
|
||||
|
||||
weightPoint = Common::Point(origin.x + 5, origin.y + 1);
|
||||
frameIdx = 3 - _gameStateVars[k8bitVariableShield] % 4;
|
||||
frameIdx++;
|
||||
frameIdx = frameIdx % 4;
|
||||
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[frameIdx], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[frameIdx]->h));
|
||||
weightPoint += Common::Point(3, 0);
|
||||
|
||||
for (int i = 0; i < _gameStateVars[k8bitVariableShield] / 4 - 1; i++) {
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[0], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[0]->h));
|
||||
weightPoint += Common::Point(3, 0);
|
||||
}
|
||||
|
||||
weightPoint = Common::Point(origin.x + 64, origin.y + 1);
|
||||
frameIdx = 3 - _gameStateVars[k8bitVariableShield] % 4;
|
||||
frameIdx++;
|
||||
frameIdx = frameIdx % 4;
|
||||
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[frameIdx], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[frameIdx]->h));
|
||||
weightPoint += Common::Point(-3, 0);
|
||||
|
||||
for (int i = 0; i < _gameStateVars[k8bitVariableShield] / 4 - 1; i++) {
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[0], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[0]->h));
|
||||
weightPoint += Common::Point(-3, 0);
|
||||
}
|
||||
if (!_strenghtBackgroundFrame)
|
||||
return;
|
||||
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtBackgroundFrame, origin.x, origin.y, Common::Rect(0, 0, _strenghtBackgroundFrame->w, _strenghtBackgroundFrame->h));
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtBarFrame, origin.x, origin.y + 8, Common::Rect(0, 0, _strenghtBarFrame->w, _strenghtBarFrame->h));
|
||||
|
||||
Common::Point weightPoint;
|
||||
int frameIdx = -1;
|
||||
|
||||
weightPoint = Common::Point(origin.x + 5, origin.y);
|
||||
frameIdx = 3 - _gameStateVars[k8bitVariableShield] % 4;
|
||||
frameIdx++;
|
||||
frameIdx = frameIdx % 4;
|
||||
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[frameIdx], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[frameIdx]->h));
|
||||
weightPoint += Common::Point(3, 0);
|
||||
|
||||
for (int i = 0; i < _gameStateVars[k8bitVariableShield] / 4 - 1; i++) {
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[0], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[0]->h));
|
||||
weightPoint += Common::Point(3, 0);
|
||||
}
|
||||
|
||||
/*surface->fillRect(backRect, black);
|
||||
surface->fillRect(barRect, back);
|
||||
weightPoint = Common::Point(origin.x + 62, origin.y);
|
||||
frameIdx = 3 - _gameStateVars[k8bitVariableShield] % 4;
|
||||
frameIdx++;
|
||||
frameIdx = frameIdx % 4;
|
||||
|
||||
for (int i = 0; i < _gameStateVars[k8bitVariableShield] / 4; i++) {
|
||||
surface->fillRect(weightRect, back);
|
||||
weightRect.translate(-3, 0);
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[frameIdx], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[frameIdx]->h));
|
||||
weightPoint += Common::Point(-3, 0);
|
||||
|
||||
for (int i = 0; i < _gameStateVars[k8bitVariableShield] / 4 - 1; i++) {
|
||||
surface->copyRectToSurface((const Graphics::Surface)*_strenghtWeightsFrames[0], weightPoint.x, weightPoint.y, Common::Rect(0, 0, 3, _strenghtWeightsFrames[0]->h));
|
||||
weightPoint += Common::Point(-3, 0);
|
||||
}
|
||||
|
||||
uint8 remainder = 3 - _gameStateVars[k8bitVariableShield] % 4;
|
||||
if (remainder < 3) {
|
||||
weightRect.translate(0, remainder / 2);
|
||||
weightRect.setHeight(weightRect.height() - remainder);
|
||||
surface->fillRect(weightRect, back);
|
||||
}*/
|
||||
}
|
||||
|
||||
void CastleEngine::addGhosts() {
|
||||
|
@ -152,6 +152,24 @@ void CastleEngine::loadAssetsDOSFullGame() {
|
||||
_menu = loadBundledImage("castle_menu");
|
||||
assert(_menu);
|
||||
_menu->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBackgroundFrame = loadBundledImage("castle_strength_background");
|
||||
_strenghtBackgroundFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBarFrame = loadBundledImage("castle_strength_bar");
|
||||
_strenghtBarFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_0"));
|
||||
_strenghtWeightsFrames[0]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_1"));
|
||||
_strenghtWeightsFrames[1]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_2"));
|
||||
_strenghtWeightsFrames[2]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_3"));
|
||||
_strenghtWeightsFrames[3]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
} else
|
||||
error("Not implemented yet");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user