mirror of
https://github.com/libretro/scummvm.git
synced 2025-04-02 14:51:40 +00:00
Re-enabled the code for correct text positioning - it should work correctly now
svn-id: r40891
This commit is contained in:
parent
db62ae8b33
commit
5f7847d88d
@ -3267,33 +3267,25 @@ reg_t kDisplay(EngineState *s, int funct_nr, int argc, reg_t *argv) {
|
||||
}
|
||||
}
|
||||
|
||||
// FIXME: This code places texts incorrectly on screen. Apparently, it was used for latter SCI1 games
|
||||
// (1.000.510 onwards), like Eco Quest 1. It has been replaced with clipping code instead
|
||||
#if 0
|
||||
// If the text does not fit on the screen, move it to the left and upwards until it does
|
||||
if (halign == ALIGN_LEFT)
|
||||
if (halign == ALIGN_LEFT) {
|
||||
// If the text does not fit on the screen, move it to the left and upwards until it does
|
||||
GFX_ASSERT(gfxop_get_text_params(s->gfx_state, font_nr, text, area.width, &area.width, &area.height, 0, NULL, NULL, NULL));
|
||||
|
||||
// Make the text fit on the screen
|
||||
if (area.x + area.width > 320)
|
||||
area.x += 320 - area.x - area.width; // Plus negative number = subtraction
|
||||
// Make the text fit on the screen
|
||||
if (area.x + area.width > 320)
|
||||
area.x += 320 - area.x - area.width; // Plus negative number = subtraction
|
||||
|
||||
if (area.y + area.height > 200)
|
||||
area.y += 200 - area.y - area.height; // Plus negative number = subtraction
|
||||
#else
|
||||
// If the text does not fit on the screen, clip it till it does
|
||||
if (area.x + area.width > s->gfx_state->pic_port_bounds.width) {
|
||||
warning("Text does not fit on screen width, clipping it");
|
||||
area.width = s->gfx_state->pic_port_bounds.width - area.x;
|
||||
if (area.y + area.height > 200)
|
||||
area.y += 200 - area.y - area.height; // Plus negative number = subtraction
|
||||
} else {
|
||||
// If the text does not fit on the screen, clip it till it does
|
||||
if (area.x + area.width > s->gfx_state->pic_port_bounds.width)
|
||||
area.width = s->gfx_state->pic_port_bounds.width - area.x;
|
||||
|
||||
if (area.y + area.height > s->gfx_state->pic_port_bounds.height)
|
||||
area.height = s->gfx_state->pic_port_bounds.height - area.y;
|
||||
}
|
||||
|
||||
if (area.y + area.height > s->gfx_state->pic_port_bounds.height) {
|
||||
warning("Text does not fit on screen height, clipping it");
|
||||
area.height = s->gfx_state->pic_port_bounds.height - area.y;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
if (gray)
|
||||
color1 = &bg_color;
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user