Yet more renaming

svn-id: r47010
This commit is contained in:
Filippos Karapetis 2010-01-05 01:47:44 +00:00
parent d99aa0f126
commit e72e130048
6 changed files with 35 additions and 35 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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) {

View File

@ -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

View File

@ -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

View File

@ -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);