SHERLOCK: 3DO: room fade in, font ignore UI ignore
This commit is contained in:
parent
b668b1edd7
commit
316cd55bb2
3 changed files with 23 additions and 3 deletions
|
@ -64,6 +64,9 @@ void Fonts::writeString(Surface *surface, const Common::String &str,
|
||||||
const Common::Point &pt, int overrideColor) {
|
const Common::Point &pt, int overrideColor) {
|
||||||
Common::Point charPos = pt;
|
Common::Point charPos = pt;
|
||||||
|
|
||||||
|
if (!_font)
|
||||||
|
return;
|
||||||
|
|
||||||
for (const char *c = str.c_str(); *c; ++c) {
|
for (const char *c = str.c_str(); *c; ++c) {
|
||||||
if (*c == ' ')
|
if (*c == ' ')
|
||||||
charPos.x += 5;
|
charPos.x += 5;
|
||||||
|
@ -79,6 +82,9 @@ void Fonts::writeString(Surface *surface, const Common::String &str,
|
||||||
int Fonts::stringWidth(const Common::String &str) {
|
int Fonts::stringWidth(const Common::String &str) {
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
|
||||||
|
if (!_font)
|
||||||
|
return 0;
|
||||||
|
|
||||||
for (const char *c = str.c_str(); *c; ++c)
|
for (const char *c = str.c_str(); *c; ++c)
|
||||||
width += charWidth(*c);
|
width += charWidth(*c);
|
||||||
|
|
||||||
|
@ -88,6 +94,9 @@ int Fonts::stringWidth(const Common::String &str) {
|
||||||
int Fonts::stringHeight(const Common::String &str) {
|
int Fonts::stringHeight(const Common::String &str) {
|
||||||
int height = 0;
|
int height = 0;
|
||||||
|
|
||||||
|
if (!_font)
|
||||||
|
return 0;
|
||||||
|
|
||||||
for (const char *c = str.c_str(); *c; ++c)
|
for (const char *c = str.c_str(); *c; ++c)
|
||||||
height = MAX(height, charHeight(*c));
|
height = MAX(height, charHeight(*c));
|
||||||
|
|
||||||
|
|
|
@ -390,6 +390,9 @@ void ScalpelUserInterface::depressButton(int num) {
|
||||||
Screen &screen = *_vm->_screen;
|
Screen &screen = *_vm->_screen;
|
||||||
Common::Point pt(MENU_POINTS[num][0], MENU_POINTS[num][1]);
|
Common::Point pt(MENU_POINTS[num][0], MENU_POINTS[num][1]);
|
||||||
|
|
||||||
|
if (_vm->getPlatform() == Common::kPlatform3DO)
|
||||||
|
return; // don't do anything for 3DO atm
|
||||||
|
|
||||||
ImageFrame &frame = (*_controls)[num];
|
ImageFrame &frame = (*_controls)[num];
|
||||||
screen._backBuffer1.transBlitFrom(frame, pt);
|
screen._backBuffer1.transBlitFrom(frame, pt);
|
||||||
screen.slamArea(pt.x, pt.y, pt.x + frame._width, pt.y + frame._height);
|
screen.slamArea(pt.x, pt.y, pt.x + frame._width, pt.y + frame._height);
|
||||||
|
|
|
@ -1052,10 +1052,18 @@ void Scene::transitionToScene() {
|
||||||
updateBackground();
|
updateBackground();
|
||||||
|
|
||||||
// Actually do the transition
|
// Actually do the transition
|
||||||
if (screen._fadeStyle)
|
if (screen._fadeStyle) {
|
||||||
screen.randomTransition();
|
if (_vm->getPlatform() != Common::kPlatform3DO) {
|
||||||
else
|
// do pixel-transition for PC
|
||||||
|
screen.randomTransition();
|
||||||
|
} else {
|
||||||
|
// fade in for 3DO
|
||||||
|
screen.clear();
|
||||||
|
screen.fadeIntoScreen3DO(2);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
screen.blitFrom(screen._backBuffer1);
|
screen.blitFrom(screen._backBuffer1);
|
||||||
|
}
|
||||||
screen.update();
|
screen.update();
|
||||||
|
|
||||||
// Start any initial animation for the scene
|
// Start any initial animation for the scene
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue