[Scummvm-cvs-logs] SF.net SVN: scummvm:[47913] scummvm/trunk/engines/sci
m_kiewitz at users.sourceforge.net
m_kiewitz at users.sourceforge.net
Fri Feb 5 21:48:06 CET 2010
Revision: 47913
http://scummvm.svn.sourceforge.net/scummvm/?rev=47913&view=rev
Author: m_kiewitz
Date: 2010-02-05 20:48:06 +0000 (Fri, 05 Feb 2010)
Log Message:
-----------
SCI: drawMenuBar, drawStatus now called directly and w/o SciGui
Modified Paths:
--------------
scummvm/trunk/engines/sci/engine/kmenu.cpp
scummvm/trunk/engines/sci/graphics/gui.cpp
scummvm/trunk/engines/sci/graphics/gui.h
scummvm/trunk/engines/sci/graphics/menu.cpp
scummvm/trunk/engines/sci/graphics/menu.h
Modified: scummvm/trunk/engines/sci/engine/kmenu.cpp
===================================================================
--- scummvm/trunk/engines/sci/engine/kmenu.cpp 2010-02-05 20:44:03 UTC (rev 47912)
+++ scummvm/trunk/engines/sci/engine/kmenu.cpp 2010-02-05 20:48:06 UTC (rev 47913)
@@ -77,7 +77,7 @@
// Sometimes this is called without giving text, if thats the case dont process it
text = s->_segMan->getString(textReference);
- s->_gui->drawStatus(s->strSplit(text.c_str(), NULL).c_str(), colorPen, colorBack);
+ s->_gfxMenu->kernelDrawStatus(s->strSplit(text.c_str(), NULL).c_str(), colorPen, colorBack);
}
return s->r_acc;
}
@@ -85,7 +85,7 @@
reg_t kDrawMenuBar(EngineState *s, int argc, reg_t *argv) {
bool clear = argv[0].isNull() ? true : false;
- s->_gui->drawMenuBar(clear);
+ s->_gfxMenu->kernelDrawMenuBar(clear);
return s->r_acc;
}
Modified: scummvm/trunk/engines/sci/graphics/gui.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.cpp 2010-02-05 20:44:03 UTC (rev 47912)
+++ scummvm/trunk/engines/sci/graphics/gui.cpp 2010-02-05 20:48:06 UTC (rev 47913)
@@ -247,28 +247,6 @@
_text16->CodeSetColors(argc, argv);
}
-void SciGui::drawStatus(const char *text, int16 colorPen, int16 colorBack) {
- Port *oldPort = _ports->setPort(_ports->_menuPort);
-
- _paint16->fillRect(_ports->_menuBarRect, 1, colorBack);
- _ports->penColor(colorPen);
- _ports->moveTo(0, 1);
- _text16->Draw_String(text);
- _paint16->bitsShow(_ports->_menuBarRect);
- _ports->setPort(oldPort);
-}
-
-void SciGui::drawMenuBar(bool clear) {
- if (!clear) {
- Port *oldPort = _ports->setPort(_ports->_menuPort);
- _menu->drawBar();
- _paint16->bitsShow(_ports->_menuBarRect);
- _ports->setPort(oldPort);
- } else {
- drawStatus("", 0, 0);
- }
-}
-
void SciGui::graphAdjustPriority(int top, int bottom) {
if (_usesOldGfxFunctions) {
_ports->priorityBandsInit(15, top, bottom);
Modified: scummvm/trunk/engines/sci/graphics/gui.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/gui.h 2010-02-05 20:44:03 UTC (rev 47912)
+++ scummvm/trunk/engines/sci/graphics/gui.h 2010-02-05 20:48:06 UTC (rev 47913)
@@ -72,9 +72,6 @@
virtual void textFonts(int argc, reg_t *argv);
virtual void textColors(int argc, reg_t *argv);
- virtual void drawStatus(const char *text, int16 colorPen, int16 colorBack);
- virtual void drawMenuBar(bool clear);
-
virtual void graphAdjustPriority(int top, int bottom);
virtual void shakeScreen(uint16 shakeCount, uint16 directions);
Modified: scummvm/trunk/engines/sci/graphics/menu.cpp
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.cpp 2010-02-05 20:44:03 UTC (rev 47912)
+++ scummvm/trunk/engines/sci/graphics/menu.cpp 2010-02-05 20:48:06 UTC (rev 47913)
@@ -836,4 +836,26 @@
return NULL;
}
+void GfxMenu::kernelDrawStatus(const char *text, int16 colorPen, int16 colorBack) {
+ Port *oldPort = _ports->setPort(_ports->_menuPort);
+
+ _paint16->fillRect(_ports->_menuBarRect, 1, colorBack);
+ _ports->penColor(colorPen);
+ _ports->moveTo(0, 1);
+ _text16->Draw_String(text);
+ _paint16->bitsShow(_ports->_menuBarRect);
+ _ports->setPort(oldPort);
+}
+
+void GfxMenu::kernelDrawMenuBar(bool clear) {
+ if (!clear) {
+ Port *oldPort = _ports->setPort(_ports->_menuPort);
+ drawBar();
+ _paint16->bitsShow(_ports->_menuBarRect);
+ _ports->setPort(oldPort);
+ } else {
+ kernelDrawStatus("", 0, 0);
+ }
+}
+
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/graphics/menu.h
===================================================================
--- scummvm/trunk/engines/sci/graphics/menu.h 2010-02-05 20:44:03 UTC (rev 47912)
+++ scummvm/trunk/engines/sci/graphics/menu.h 2010-02-05 20:48:06 UTC (rev 47913)
@@ -92,6 +92,9 @@
void drawBar();
reg_t kernelSelect(reg_t eventObject);
+ void kernelDrawStatus(const char *text, int16 colorPen, int16 colorBack);
+ void kernelDrawMenuBar(bool clear);
+
private:
GuiMenuItemEntry *findItem(uint16 menuId, uint16 itemId);
void calculateTextWidth();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list