aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/font.cpp
diff options
context:
space:
mode:
authorPaul Gilbert2012-05-03 22:49:30 +1000
committerPaul Gilbert2012-05-03 22:49:30 +1000
commita2982a0b20027f658c9b47266a8ddbec74a15878 (patch)
treec324455bc893fbc48ffb6b13fa4b153e30b93a7d /engines/tony/font.cpp
parentba2711b5e39e495c4cfb1187710605bb9fbf10b1 (diff)
downloadscummvm-rg350-a2982a0b20027f658c9b47266a8ddbec74a15878.tar.gz
scummvm-rg350-a2982a0b20027f658c9b47266a8ddbec74a15878.tar.bz2
scummvm-rg350-a2982a0b20027f658c9b47266a8ddbec74a15878.zip
TONY: Engine is now compiling and linking again
Diffstat (limited to 'engines/tony/font.cpp')
-rw-r--r--engines/tony/font.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/engines/tony/font.cpp b/engines/tony/font.cpp
index 2996b30f04..a0500047b6 100644
--- a/engines/tony/font.cpp
+++ b/engines/tony/font.cpp
@@ -125,6 +125,14 @@ void RMFont::Load(const byte *buf, int nChars, int dimx, int dimy, uint32 palRes
nLetters=nChars;
}
+void RMFont::Load(uint32 resID, int nChars, int dimx, int dimy, uint32 palResID) {
+ RMRes res(resID);
+
+ if ((int)res.Size() < nChars * (dimy * dimx + 8))
+ nChars = res.Size() / (dimy * dimx + 8);
+
+ Load(res, nChars, dimx, dimy, palResID);
+}
void RMFont::Unload(void) {
if (m_letter != NULL) {
@@ -2273,6 +2281,25 @@ void RMTextItemName::Draw(RMGfxTargetBuffer &bigBuf, RMGfxPrimitive *prim) {
RMText::Draw(bigBuf,prim);
}
+RMPoint RMTextItemName::GetHotspot() {
+ if (m_item == NULL)
+ return m_mpos + m_curscroll;
+ else
+ return m_item->Hotspot();
+}
+
+RMItem *RMTextItemName::GetSelectedItem() {
+ return m_item;
+}
+
+bool RMTextItemName::IsItemSelected() {
+ return m_item != NULL;
+}
+
+bool RMTextItemName::IsNormalItemSelected() {
+ return m_item != NULL && m_itemName.Length() > 0;
+}
+
/****************************************************************************\
* Metodi di RMDialogChoice