aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilippos Karapetis2010-01-05 01:47:44 +0000
committerFilippos Karapetis2010-01-05 01:47:44 +0000
commite72e1300488e8124d94ea8c9a8df52650f7d97bb (patch)
tree0b0d42fda923573055f30a820f03836695450e09
parentd99aa0f12634bed7b5101b4b5a64f50ee744961b (diff)
downloadscummvm-rg350-e72e1300488e8124d94ea8c9a8df52650f7d97bb.tar.gz
scummvm-rg350-e72e1300488e8124d94ea8c9a8df52650f7d97bb.tar.bz2
scummvm-rg350-e72e1300488e8124d94ea8c9a8df52650f7d97bb.zip
Yet more renaming
svn-id: r47010
-rw-r--r--engines/sci/graphics/controls.cpp16
-rw-r--r--engines/sci/graphics/controls.h6
-rw-r--r--engines/sci/graphics/gui.cpp6
-rw-r--r--engines/sci/graphics/gui.h8
-rw-r--r--engines/sci/graphics/menu.cpp28
-rw-r--r--engines/sci/graphics/menu.h6
6 files changed, 35 insertions, 35 deletions
diff --git a/engines/sci/graphics/controls.cpp b/engines/sci/graphics/controls.cpp
index ba6ded2936..7b930ba19f 100644
--- a/engines/sci/graphics/controls.cpp
+++ b/engines/sci/graphics/controls.cpp
@@ -37,22 +37,22 @@
namespace Sci {
-SciGuiControls::SciGuiControls(SegManager *segMan, Gfx *gfx, Text *text)
+Controls::Controls(SegManager *segMan, Gfx *gfx, Text *text)
: _segMan(segMan), _gfx(gfx), _text(text) {
init();
}
-SciGuiControls::~SciGuiControls() {
+Controls::~Controls() {
}
-void SciGuiControls::init() {
+void Controls::init() {
_texteditCursorVisible = false;
}
const char controlListUpArrow[2] = { 0x18, 0 };
const char controlListDownArrow[2] = { 0x19, 0 };
-void SciGuiControls::drawListControl(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 upperPos, int16 cursorPos, bool isAlias) {
+void Controls::drawListControl(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 upperPos, int16 cursorPos, bool isAlias) {
Common::Rect workerRect = rect;
GuiResourceId oldFontId = _text->GetFontId();
int16 oldPenColor = _gfx->_curPort->penClr;
@@ -107,7 +107,7 @@ void SciGuiControls::drawListControl(Common::Rect rect, reg_t obj, int16 maxChar
_text->SetFont(oldFontId);
}
-void SciGuiControls::TexteditCursorDraw(Common::Rect rect, const char *text, uint16 curPos) {
+void Controls::TexteditCursorDraw(Common::Rect rect, const char *text, uint16 curPos) {
int16 textWidth, i;
if (!_texteditCursorVisible) {
textWidth = 0;
@@ -125,7 +125,7 @@ void SciGuiControls::TexteditCursorDraw(Common::Rect rect, const char *text, uin
}
}
-void SciGuiControls::TexteditCursorErase() {
+void Controls::TexteditCursorErase() {
if (_texteditCursorVisible) {
_gfx->InvertRect(_texteditCursorRect);
_gfx->BitsShow(_texteditCursorRect);
@@ -134,11 +134,11 @@ void SciGuiControls::TexteditCursorErase() {
TexteditSetBlinkTime();
}
-void SciGuiControls::TexteditSetBlinkTime() {
+void Controls::TexteditSetBlinkTime() {
_texteditBlinkTime = g_system->getMillis() + (30 * 1000 / 60);
}
-void SciGuiControls::TexteditChange(reg_t controlObject, reg_t eventObject) {
+void Controls::TexteditChange(reg_t controlObject, reg_t eventObject) {
uint16 cursorPos = GET_SEL32V(_segMan, controlObject, cursor);
uint16 maxChars = GET_SEL32V(_segMan, controlObject, max);
reg_t textReference = GET_SEL32(_segMan, controlObject, text);
diff --git a/engines/sci/graphics/controls.h b/engines/sci/graphics/controls.h
index 1d0b9e1ac6..161dc1a1be 100644
--- a/engines/sci/graphics/controls.h
+++ b/engines/sci/graphics/controls.h
@@ -31,10 +31,10 @@ namespace Sci {
class Gfx;
class Font;
class Text;
-class SciGuiControls {
+class Controls {
public:
- SciGuiControls(SegManager *segMan, Gfx *gfx, Text *text);
- ~SciGuiControls();
+ Controls(SegManager *segMan, Gfx *gfx, Text *text);
+ ~Controls();
void drawListControl(Common::Rect rect, reg_t obj, int16 maxChars, int16 count, const char **entries, GuiResourceId fontId, int16 upperPos, int16 cursorPos, bool isAlias);
void TexteditCursorDraw(Common::Rect rect, const char *text, uint16 curPos);
diff --git a/engines/sci/graphics/gui.cpp b/engines/sci/graphics/gui.cpp
index 8931459a26..99449603cf 100644
--- a/engines/sci/graphics/gui.cpp
+++ b/engines/sci/graphics/gui.cpp
@@ -60,8 +60,8 @@ SciGui::SciGui(EngineState *state, Screen *screen, SciPalette *palette, Cursor *
_animate = new SciGuiAnimate(_s, _gfx, _screen, _palette);
_text = new Text(_s->resMan, _gfx, _screen);
_windowMgr = new WindowMgr(this, _screen, _gfx, _text);
- _controls = new SciGuiControls(_s->_segMan, _gfx, _text);
- _menu = new SciGuiMenu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
+ _controls = new Controls(_s->_segMan, _gfx, _text);
+ _menu = new Menu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
// _gui32 = new SciGui32(_s, _screen, _palette, _cursor); // for debug purposes
}
@@ -325,7 +325,7 @@ void SciGui::drawMenuBar(bool clear) {
void SciGui::menuReset() {
delete _menu;
- _menu = new SciGuiMenu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
+ _menu = new Menu(_s->_event, _s->_segMan, _gfx, _text, _screen, _cursor);
}
void SciGui::menuAdd(Common::String title, Common::String content, reg_t contentVmPtr) {
diff --git a/engines/sci/graphics/gui.h b/engines/sci/graphics/gui.h
index db25698fe1..91439181b1 100644
--- a/engines/sci/graphics/gui.h
+++ b/engines/sci/graphics/gui.h
@@ -47,8 +47,8 @@ class Cursor;
class Gfx;
class WindowMgr;
class SciGuiAnimate;
-class SciGuiControls;
-class SciGuiMenu;
+class Controls;
+class Menu;
class Text;
class Transitions;
class SciGui32; // for debug purposes
@@ -183,8 +183,8 @@ private:
WindowMgr *_windowMgr;
SciGuiAnimate *_animate;
- SciGuiControls *_controls;
- SciGuiMenu *_menu;
+ Controls *_controls;
+ Menu *_menu;
Text *_text;
Transitions *_transitions;
// SciGui32 *_gui32; // for debug purposes
diff --git a/engines/sci/graphics/menu.cpp b/engines/sci/graphics/menu.cpp
index 719b52fec1..9583189512 100644
--- a/engines/sci/graphics/menu.cpp
+++ b/engines/sci/graphics/menu.cpp
@@ -40,7 +40,7 @@
namespace Sci {
-SciGuiMenu::SciGuiMenu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor)
+Menu::Menu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor)
: _event(event), _segMan(segMan), _gfx(gfx), _text(text), _screen(screen), _cursor(cursor) {
_listCount = 0;
@@ -54,11 +54,11 @@ SciGuiMenu::SciGuiMenu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text
_oldPort = NULL;
}
-SciGuiMenu::~SciGuiMenu() {
+Menu::~Menu() {
// TODO: deallocate _list and _itemList
}
-void SciGuiMenu::add(Common::String title, Common::String content, reg_t contentVmPtr) {
+void Menu::add(Common::String title, Common::String content, reg_t contentVmPtr) {
GuiMenuEntry *menuEntry;
uint16 itemCount = 0;
GuiMenuItemEntry *itemEntry;
@@ -207,7 +207,7 @@ void SciGuiMenu::add(Common::String title, Common::String content, reg_t content
} while (curPos < contentSize);
}
-GuiMenuItemEntry *SciGuiMenu::findItem(uint16 menuId, uint16 itemId) {
+GuiMenuItemEntry *Menu::findItem(uint16 menuId, uint16 itemId) {
GuiMenuItemList::iterator listIterator;
GuiMenuItemList::iterator listEnd = _itemList.end();
GuiMenuItemEntry *listEntry;
@@ -223,7 +223,7 @@ GuiMenuItemEntry *SciGuiMenu::findItem(uint16 menuId, uint16 itemId) {
return NULL;
}
-void SciGuiMenu::setAttribute(uint16 menuId, uint16 itemId, uint16 attributeId, reg_t value) {
+void Menu::setAttribute(uint16 menuId, uint16 itemId, uint16 attributeId, reg_t value) {
EngineState *s = ((SciEngine *)g_engine)->getEngineState(); // HACK: needed for strSplit()
GuiMenuItemEntry *itemEntry = findItem(menuId, itemId);
if (!itemEntry)
@@ -255,7 +255,7 @@ void SciGuiMenu::setAttribute(uint16 menuId, uint16 itemId, uint16 attributeId,
}
}
-reg_t SciGuiMenu::getAttribute(uint16 menuId, uint16 itemId, uint16 attributeId) {
+reg_t Menu::getAttribute(uint16 menuId, uint16 itemId, uint16 attributeId) {
GuiMenuItemEntry *itemEntry = findItem(menuId, itemId);
if (!itemEntry)
error("Tried to getAttribute() on non-existant menu-item %d:%d", menuId, itemId);
@@ -279,7 +279,7 @@ reg_t SciGuiMenu::getAttribute(uint16 menuId, uint16 itemId, uint16 attributeId)
return NULL_REG;
}
-void SciGuiMenu::drawBar() {
+void Menu::drawBar() {
GuiMenuEntry *listEntry;
GuiMenuList::iterator listIterator;
GuiMenuList::iterator listEnd = _list.end();
@@ -299,7 +299,7 @@ void SciGuiMenu::drawBar() {
}
// This helper calculates all text widths for all menus/items
-void SciGuiMenu::calculateTextWidth() {
+void Menu::calculateTextWidth() {
GuiMenuList::iterator menuIterator;
GuiMenuList::iterator menuEnd = _list.end();
GuiMenuEntry *menuEntry;
@@ -326,7 +326,7 @@ void SciGuiMenu::calculateTextWidth() {
}
}
-reg_t SciGuiMenu::select(reg_t eventObject) {
+reg_t Menu::select(reg_t eventObject) {
int16 eventType = GET_SEL32V(_segMan, eventObject, type);
int16 keyPress, keyModifier;
Common::Point mousePosition;
@@ -408,7 +408,7 @@ reg_t SciGuiMenu::select(reg_t eventObject) {
return NULL_REG;
}
-GuiMenuItemEntry *SciGuiMenu::interactiveGetItem(uint16 menuId, uint16 itemId, bool menuChanged) {
+GuiMenuItemEntry *Menu::interactiveGetItem(uint16 menuId, uint16 itemId, bool menuChanged) {
GuiMenuItemList::iterator itemIterator = _itemList.begin();
GuiMenuItemList::iterator itemEnd = _itemList.end();
GuiMenuItemEntry *itemEntry;
@@ -437,7 +437,7 @@ GuiMenuItemEntry *SciGuiMenu::interactiveGetItem(uint16 menuId, uint16 itemId, b
return firstItemEntry;
}
-void SciGuiMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
+void Menu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
GuiMenuEntry *listEntry;
GuiMenuList::iterator listIterator;
GuiMenuList::iterator listEnd = _list.end();
@@ -539,7 +539,7 @@ void SciGuiMenu::drawMenu(uint16 oldMenuId, uint16 newMenuId) {
_gfx->BitsShow(_menuRect);
}
-void SciGuiMenu::invertMenuSelection(uint16 itemId) {
+void Menu::invertMenuSelection(uint16 itemId) {
Common::Rect itemRect = _menuRect;
itemRect.top += (itemId - 1) * _gfx->_curPort->fontHeight;
@@ -550,7 +550,7 @@ void SciGuiMenu::invertMenuSelection(uint16 itemId) {
_gfx->BitsShow(itemRect);
}
-GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
+GuiMenuItemEntry *Menu::interactiveWithKeyboard() {
sciEvent curEvent;
uint16 newMenuId = _curMenuId;
uint16 newItemId = _curItemId;
@@ -637,7 +637,7 @@ GuiMenuItemEntry *SciGuiMenu::interactiveWithKeyboard() {
}
}
-GuiMenuItemEntry *SciGuiMenu::interactiveWithMouse() {
+GuiMenuItemEntry *Menu::interactiveWithMouse() {
calculateTextWidth();
// TODO
diff --git a/engines/sci/graphics/menu.h b/engines/sci/graphics/menu.h
index 590c40e2e4..27d8f2b798 100644
--- a/engines/sci/graphics/menu.h
+++ b/engines/sci/graphics/menu.h
@@ -76,10 +76,10 @@ struct GuiMenuItemEntry {
};
typedef Common::List<GuiMenuItemEntry *> GuiMenuItemList;
-class SciGuiMenu {
+class Menu {
public:
- SciGuiMenu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor);
- ~SciGuiMenu();
+ Menu(SciEvent *event, SegManager *segMan, Gfx *gfx, Text *text, Screen *screen, Cursor *cursor);
+ ~Menu();
void reset();
void add(Common::String title, Common::String content, reg_t contentVmPtr);