[Scummvm-cvs-logs] SF.net SVN: scummvm:[44768] scummvm/trunk/engines/sci
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Thu Oct 8 01:21:19 CEST 2009
Revision: 44768
http://scummvm.svn.sourceforge.net/scummvm/?rev=44768&view=rev
Author: fingolfin
Date: 2009-10-07 23:21:18 +0000 (Wed, 07 Oct 2009)
Log Message:
-----------
SCI: Change more stuff to be CFG compliant
Modified Paths:
--------------
scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
scummvm/trunk/engines/sci/gui/gui.h
scummvm/trunk/engines/sci/gui/gui_font.cpp
scummvm/trunk/engines/sci/gui/gui_font.h
scummvm/trunk/engines/sci/gui/gui_gfx.h
Modified: scummvm/trunk/engines/sci/gfx/gfx_driver.cpp
===================================================================
--- scummvm/trunk/engines/sci/gfx/gfx_driver.cpp 2009-10-07 23:04:13 UTC (rev 44767)
+++ scummvm/trunk/engines/sci/gfx/gfx_driver.cpp 2009-10-07 23:21:18 UTC (rev 44768)
@@ -226,7 +226,7 @@
int i;
PaletteEntry firstColor = _mode->palette->getColor(fromColor);
PaletteEntry loopColor;
- for (i=fromColor+1; i<=toColor; i++) {
+ for (i = fromColor + 1; i <= toColor; i++) {
loopColor = _mode->palette->getColor(i);
loopColor.r = 0;
loopColor.g = 0;
Modified: scummvm/trunk/engines/sci/gui/gui.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui.h 2009-10-07 23:04:13 UTC (rev 44767)
+++ scummvm/trunk/engines/sci/gui/gui.h 2009-10-07 23:21:18 UTC (rev 44768)
@@ -23,8 +23,8 @@
*
*/
-#ifndef SCI_GUI_Gui_H
-#define SCI_GUI_Gui_H
+#ifndef SCI_GUI_GUI_H
+#define SCI_GUI_GUI_H
#include "sci/gui/gui_helpers.h"
@@ -36,6 +36,7 @@
class SciGuiGfx;
class SciGuiresources;
class SciGuiWindowMgr;
+
class SciGui {
public:
SciGui(EngineState *s, SciGuiScreen *screen, SciGuiPalette *palette, SciGuiCursor *cursor);
Modified: scummvm/trunk/engines/sci/gui/gui_font.cpp
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_font.cpp 2009-10-07 23:04:13 UTC (rev 44767)
+++ scummvm/trunk/engines/sci/gui/gui_font.cpp 2009-10-07 23:21:18 UTC (rev 44768)
@@ -46,14 +46,14 @@
}
_resourceData = fontResource->data;
- mCharMax = READ_LE_UINT16(_resourceData + 2);
- mFontH = READ_LE_UINT16(_resourceData + 4);
- mChars = new charinfo[mCharMax];
+ _numChars = READ_LE_UINT16(_resourceData + 2);
+ _fontHeight = READ_LE_UINT16(_resourceData + 4);
+ _chars = new Charinfo[_numChars];
// filling info for every char
- for (int16 i = 0; i < mCharMax; i++) {
- mChars[i].offset = READ_LE_UINT16(_resourceData + 6 + i * 2);
- mChars[i].w = _resourceData[mChars[i].offset];
- mChars[i].h = _resourceData[mChars[i].offset + 1];
+ for (int16 i = 0; i < _numChars; i++) {
+ _chars[i].offset = READ_LE_UINT16(_resourceData + 6 + i * 2);
+ _chars[i].w = _resourceData[_chars[i].offset];
+ _chars[i].h = _resourceData[_chars[i].offset + 1];
}
}
@@ -65,16 +65,16 @@
}
byte SciGuiFont::getHeight() {
- return mFontH;
+ return _fontHeight;
}
byte SciGuiFont::getCharWidth(byte chr) {
- return chr < mCharMax ? mChars[chr].w : 0;
+ return chr < _numChars ? _chars[chr].w : 0;
}
byte SciGuiFont::getCharHeight(byte chr) {
- return chr < mCharMax ? mChars[chr].h : 0;
+ return chr < _numChars ? _chars[chr].h : 0;
}
byte *SciGuiFont::getCharData(byte chr) {
- return chr < mCharMax ? _resourceData + mChars[chr].offset + 2 : 0;
+ return chr < _numChars ? _resourceData + _chars[chr].offset + 2 : 0;
}
void SciGuiFont::draw(SciGuiScreen *screen, int16 chr, int16 top, int16 left, byte color, byte textface) {
Modified: scummvm/trunk/engines/sci/gui/gui_font.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_font.h 2009-10-07 23:04:13 UTC (rev 44767)
+++ scummvm/trunk/engines/sci/gui/gui_font.h 2009-10-07 23:21:18 UTC (rev 44768)
@@ -46,13 +46,13 @@
GuiResourceId _resourceId;
byte *_resourceData;
- struct charinfo {
+ struct Charinfo {
byte w, h;
int16 offset;
};
- byte mFontH;
- uint16 mCharMax;
- charinfo* mChars;
+ byte _fontHeight;
+ uint16 _numChars;
+ Charinfo *_chars;
};
} // End of namespace Sci
Modified: scummvm/trunk/engines/sci/gui/gui_gfx.h
===================================================================
--- scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-07 23:04:13 UTC (rev 44767)
+++ scummvm/trunk/engines/sci/gui/gui_gfx.h 2009-10-07 23:21:18 UTC (rev 44768)
@@ -118,8 +118,8 @@
private:
int16 TextCodeProcessing(const char *&text, GuiResourceId orgFontId, int16 orgPenColor);
- void TextWidth(const char*text, int16 from, int16 len, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight);
- void StringWidth(const char*str, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight);
+ void TextWidth(const char *text, int16 from, int16 len, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight);
+ void StringWidth(const char *str, GuiResourceId orgFontId, int16 &textWidth, int16 &textHeight);
int16 GetLongest(const char *str, int16 maxwidth, GuiResourceId orgFontId);
void DrawText(const char *str, int16 from, int16 len, GuiResourceId orgFontId, int16 orgPenColor);
void ShowText(const char *str, int16 from, int16 len, GuiResourceId orgFontId, int16 orgPenColor);
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