mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
ULTIMA1: Adjust x2, y2 calculation for TextRects
This commit is contained in:
parent
f33a0dc69b
commit
83addc920f
@ -49,7 +49,7 @@ public:
|
||||
class TextRect : public Common::Rect {
|
||||
public:
|
||||
TextRect() : Common::Rect() {}
|
||||
TextRect(int16 x1, int16 y1, int16 x2, int16 y2) : Common::Rect(x1 * 8, y1 * 8, x2 * 8, y2 * 8) {}
|
||||
TextRect(int16 x1, int16 y1, int16 x2, int16 y2) : Common::Rect(x1 * 8, y1 * 8, (x2 + 1) * 8, (y2 + 1) * 8) {}
|
||||
};
|
||||
|
||||
} // End of namespace Shared
|
||||
|
@ -42,7 +42,7 @@ public:
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
Info(TreeItem *parent) : Shared::Info(parent, TextRect(0, 21, 30, 25)) {}
|
||||
Info(TreeItem *parent) : Shared::Info(parent, TextRect(0, 21, 29, 24)) {}
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
|
@ -32,7 +32,7 @@ BEGIN_MESSAGE_MAP(Status, Shared::Gfx::VisualItem)
|
||||
ON_MESSAGE(FrameMsg)
|
||||
END_MESSAGE_MAP()
|
||||
|
||||
Status::Status(TreeItem *parent) : Shared::Gfx::VisualItem("Status", TextRect(31, 21, 40, 25), parent),
|
||||
Status::Status(Shared::TreeItem *parent) : Shared::Gfx::VisualItem("Status", TextRect(31, 21, 39, 24), parent),
|
||||
_hitPoints(0), _food(0), _experience(0), _coins(0) {
|
||||
}
|
||||
|
||||
|
@ -167,8 +167,8 @@ void ViewCharacterGeneration::drawHelp(Shared::Gfx::VisualSurface &s) {
|
||||
|
||||
void ViewCharacterGeneration::drawRace(Shared::Gfx::VisualSurface &s) {
|
||||
Ultima1Game *game = static_cast<Ultima1Game *>(getGame());
|
||||
s.fillRect(TextRect(6, 2, 38, 5), game->_bgColor);
|
||||
s.fillRect(TextRect(2, 16, 38, 22), game->_bgColor);
|
||||
s.fillRect(TextRect(6, 2, 37, 4), game->_bgColor);
|
||||
s.fillRect(TextRect(2, 16, 37, 21), game->_bgColor);
|
||||
|
||||
s.writeString(game->_res->CHAR_GEN_TEXT[6], TextPoint(3, 17), game->_textColor);
|
||||
s.writeString(Common::String::format(game->_res->CHAR_GEN_TEXT[4],
|
||||
|
Loading…
x
Reference in New Issue
Block a user