diff options
author | Max Horn | 2009-10-07 23:21:18 +0000 |
---|---|---|
committer | Max Horn | 2009-10-07 23:21:18 +0000 |
commit | a4fa78743d23deed3414f1915694184bac3f2798 (patch) | |
tree | c619b9dde5dfff1eff2d176be46d70a5a7f17732 /engines | |
parent | 8498d769be544a7a4d0edbca894fa594f4723c8e (diff) | |
download | scummvm-rg350-a4fa78743d23deed3414f1915694184bac3f2798.tar.gz scummvm-rg350-a4fa78743d23deed3414f1915694184bac3f2798.tar.bz2 scummvm-rg350-a4fa78743d23deed3414f1915694184bac3f2798.zip |
SCI: Change more stuff to be CFG compliant
svn-id: r44768
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/gfx/gfx_driver.cpp | 2 | ||||
-rw-r--r-- | engines/sci/gui/gui.h | 5 | ||||
-rw-r--r-- | engines/sci/gui/gui_font.cpp | 22 | ||||
-rw-r--r-- | engines/sci/gui/gui_font.h | 8 | ||||
-rw-r--r-- | engines/sci/gui/gui_gfx.h | 4 |
5 files changed, 21 insertions, 20 deletions
diff --git a/engines/sci/gfx/gfx_driver.cpp b/engines/sci/gfx/gfx_driver.cpp index 803d29f4f9..78ed7620e9 100644 --- a/engines/sci/gfx/gfx_driver.cpp +++ b/engines/sci/gfx/gfx_driver.cpp @@ -226,7 +226,7 @@ void GfxDriver::animatePalette(int fromColor, int toColor, int stepCount) { 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; diff --git a/engines/sci/gui/gui.h b/engines/sci/gui/gui.h index 2ebf4e85d4..dc03182024 100644 --- a/engines/sci/gui/gui.h +++ b/engines/sci/gui/gui.h @@ -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 SciGuiCursor; class SciGuiGfx; class SciGuiresources; class SciGuiWindowMgr; + class SciGui { public: SciGui(EngineState *s, SciGuiScreen *screen, SciGuiPalette *palette, SciGuiCursor *cursor); diff --git a/engines/sci/gui/gui_font.cpp b/engines/sci/gui/gui_font.cpp index 57e736613e..a44a2fe644 100644 --- a/engines/sci/gui/gui_font.cpp +++ b/engines/sci/gui/gui_font.cpp @@ -46,14 +46,14 @@ SciGuiFont::SciGuiFont(ResourceManager *resMan, GuiResourceId resourceId) } _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 @@ GuiResourceId SciGuiFont::getResourceId() { } 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) { diff --git a/engines/sci/gui/gui_font.h b/engines/sci/gui/gui_font.h index e1916ff2ac..4e1c41a73e 100644 --- a/engines/sci/gui/gui_font.h +++ b/engines/sci/gui/gui_font.h @@ -46,13 +46,13 @@ private: 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 diff --git a/engines/sci/gui/gui_gfx.h b/engines/sci/gui/gui_gfx.h index 0caa317e83..ca00f329ba 100644 --- a/engines/sci/gui/gui_gfx.h +++ b/engines/sci/gui/gui_gfx.h @@ -118,8 +118,8 @@ public: 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); |