[Scummvm-cvs-logs] CVS: scummvm/gui ScrollBarWidget.cpp,1.16,1.17 TabWidget.cpp,1.11,1.12 newgui.cpp,1.78,1.79 newgui.h,1.37,1.38 widget.cpp,1.36,1.37
Max Horn
fingolfin at users.sourceforge.net
Sat Feb 28 05:17:10 CET 2004
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common scummsys.h,1.44,1.45 system.h,1.53,1.54 timer.cpp,1.25,1.26 util.cpp,1.40,1.41
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.111,1.112
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32588/gui
Modified Files:
ScrollBarWidget.cpp TabWidget.cpp newgui.cpp newgui.h
widget.cpp
Log Message:
renamed more OSystem methods to follow our naming scheme; renamed NewGuiColor to OverlayColor; fixed some calls to error() in the SDL backend
Index: ScrollBarWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/ScrollBarWidget.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -d -r1.16 -r1.17
--- ScrollBarWidget.cpp 6 Jan 2004 12:45:28 -0000 1.16
+++ ScrollBarWidget.cpp 28 Feb 2004 12:57:53 -0000 1.17
@@ -241,7 +241,7 @@
(hilite && _part == kSliderPart) ? gui->_textcolorhi : gui->_textcolor);
gui->frameRect(_x, _y + _sliderPos, _w, _sliderHeight, gui->_color);
int y = _y + _sliderPos + _sliderHeight / 2;
- NewGuiColor color = (hilite && _part == kSliderPart) ? gui->_color : gui->_shadowcolor;
+ OverlayColor color = (hilite && _part == kSliderPart) ? gui->_color : gui->_shadowcolor;
gui->hLine(_x + 2, y - 2, _x + _w - 3, color);
gui->hLine(_x + 2, y, _x + _w - 3, color);
gui->hLine(_x + 2, y + 2, _x + _w-3, color);
Index: TabWidget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/TabWidget.cpp,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- TabWidget.cpp 5 Feb 2004 00:19:54 -0000 1.11
+++ TabWidget.cpp 28 Feb 2004 12:57:53 -0000 1.12
@@ -127,7 +127,7 @@
// Iterate over all tabs and draw them
int i, x = _x + kTabLeftOffset;
for (i = 0; i < (int)_tabs.size(); ++i) {
- NewGuiColor color = (i == _activeTab) ? gui->_color : gui->_shadowcolor;
+ OverlayColor color = (i == _activeTab) ? gui->_color : gui->_shadowcolor;
int yOffset = (i == _activeTab) ? 0 : 2;
gui->box(x, _y + yOffset, _tabWidth, kTabHeight - yOffset, color, color);
gui->drawString(_tabs[i].title, x + kTabPadding, _y + yOffset / 2 + (kTabHeight - kLineHeight - 1), _tabWidth - 2 * kTabPadding, gui->_textcolor, kTextAlignCenter);
Index: newgui.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.cpp,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- newgui.cpp 25 Feb 2004 23:16:04 -0000 1.78
+++ newgui.cpp 28 Feb 2004 12:57:53 -0000 1.79
@@ -146,7 +146,7 @@
}
animateCursor();
- _system->update_screen();
+ _system->updateScreen();
OSystem::Event event;
uint32 time = _system->get_msecs();
@@ -239,7 +239,7 @@
// whatever is visible on the screen rught now.
int sys_height = _system->get_overlay_height();
int sys_width = _system->get_overlay_width();
- _screen = (NewGuiColor*)calloc(sys_width * sys_height, sizeof(NewGuiColor));
+ _screen = (OverlayColor*)calloc(sys_width * sys_height, sizeof(OverlayColor));
_screenPitch = sys_width;
_system->grab_overlay(_screen, _screenPitch);
@@ -260,7 +260,7 @@
_screen = 0;
}
- _system->update_screen();
+ _system->updateScreen();
_stateIsSaved = false;
}
@@ -282,11 +282,11 @@
#pragma mark -
-NewGuiColor *NewGui::getBasePtr(int x, int y) {
+OverlayColor *NewGui::getBasePtr(int x, int y) {
return _screen + x + y * _screenPitch;
}
-void NewGui::box(int x, int y, int width, int height, NewGuiColor colorA, NewGuiColor colorB) {
+void NewGui::box(int x, int y, int width, int height, OverlayColor colorA, OverlayColor colorB) {
hLine(x + 1, y, x + width - 2, colorA);
hLine(x, y + 1, x + width - 1, colorA);
vLine(x, y + 1, y + height - 2, colorA);
@@ -298,8 +298,8 @@
vLine(x + width - 2, y + 1, y + height - 1, colorB);
}
-void NewGui::line(int x, int y, int x2, int y2, NewGuiColor color) {
- NewGuiColor *ptr;
+void NewGui::line(int x, int y, int x2, int y2, OverlayColor color) {
+ OverlayColor *ptr;
if (x2 < x)
SWAP(x2, x);
@@ -323,7 +323,7 @@
}
}
-void NewGui::blendRect(int x, int y, int w, int h, NewGuiColor color, int level) {
+void NewGui::blendRect(int x, int y, int w, int h, OverlayColor color, int level) {
#ifdef NEWGUI_256
fillRect(x, y, w, h, color);
#else
@@ -334,7 +334,7 @@
g = ag * level;
b = ab * level;
- NewGuiColor *ptr = getBasePtr(x, y);
+ OverlayColor *ptr = getBasePtr(x, y);
while (h--) {
for (int i = 0; i < w; i++) {
@@ -348,9 +348,9 @@
#endif
}
-void NewGui::fillRect(int x, int y, int w, int h, NewGuiColor color) {
+void NewGui::fillRect(int x, int y, int w, int h, OverlayColor color) {
int i;
- NewGuiColor *ptr = getBasePtr(x, y);
+ OverlayColor *ptr = getBasePtr(x, y);
while (h--) {
for (i = 0; i < w; i++) {
@@ -360,9 +360,9 @@
}
}
-void NewGui::checkerRect(int x, int y, int w, int h, NewGuiColor color) {
+void NewGui::checkerRect(int x, int y, int w, int h, OverlayColor color) {
int i;
- NewGuiColor *ptr = getBasePtr(x, y);
+ OverlayColor *ptr = getBasePtr(x, y);
while (h--) {
for (i = 0; i < w; i++) {
@@ -373,9 +373,9 @@
}
}
-void NewGui::frameRect(int x, int y, int w, int h, NewGuiColor color) {
+void NewGui::frameRect(int x, int y, int w, int h, OverlayColor color) {
int i;
- NewGuiColor *ptr, *basePtr = getBasePtr(x, y);
+ OverlayColor *ptr, *basePtr = getBasePtr(x, y);
if (basePtr == NULL)
return;
@@ -397,12 +397,12 @@
// For now we don't keep yet another list of dirty rects but simply
// blit the affected area directly to the overlay. At least for our current
// GUI/widget/dialog code that is just fine.
- NewGuiColor *buf = getBasePtr(x, y);
+ OverlayColor *buf = getBasePtr(x, y);
_system->copy_rect_overlay(buf, _screenPitch, x, y, w, h);
}
-void NewGui::drawChar(byte chr, int xx, int yy, NewGuiColor color) {
- NewGuiColor *ptr = getBasePtr(xx, yy);
+void NewGui::drawChar(byte chr, int xx, int yy, OverlayColor color) {
+ OverlayColor *ptr = getBasePtr(xx, yy);
uint x, y;
#ifdef NEW_FONT_CODE
@@ -480,7 +480,7 @@
#endif
}
-void NewGui::drawString(const String &s, int x, int y, int w, NewGuiColor color, int align, int deltax, bool useEllipsis) {
+void NewGui::drawString(const String &s, int x, int y, int w, OverlayColor color, int align, int deltax, bool useEllipsis) {
const int leftX = x, rightX = x + w;
uint i;
int width = getStringWidth(s);
@@ -553,7 +553,7 @@
// Blit from a buffer to the display
//
void NewGui::blitFromBuffer(int x, int y, int w, int h, const byte *buf, int pitch) {
- NewGuiColor *ptr = getBasePtr(x, y);
+ OverlayColor *ptr = getBasePtr(x, y);
assert(buf);
while (h--) {
@@ -567,7 +567,7 @@
// Blit from the display to a buffer
//
void NewGui::blitToBuffer(int x, int y, int w, int h, byte *buf, int pitch) {
- NewGuiColor *ptr = getBasePtr(x, y);
+ OverlayColor *ptr = getBasePtr(x, y);
assert(buf);
while (h--) {
@@ -580,8 +580,8 @@
//
// Draw an 8x8 bitmap at location (x,y)
//
-void NewGui::drawBitmap(uint32 *bitmap, int x, int y, NewGuiColor color, int h) {
- NewGuiColor *ptr = getBasePtr(x, y);
+void NewGui::drawBitmap(uint32 *bitmap, int x, int y, OverlayColor color, int h) {
+ OverlayColor *ptr = getBasePtr(x, y);
for (y = 0; y < h; y++) {
uint32 mask = 0xF0000000;
Index: newgui.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/newgui.h,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -d -r1.37 -r1.38
--- newgui.h 6 Jan 2004 12:45:29 -0000 1.37
+++ newgui.h 28 Feb 2004 12:58:09 -0000 1.38
@@ -92,7 +92,7 @@
protected:
OSystem *_system;
- NewGuiColor *_screen;
+ OverlayColor *_screen;
int _screenPitch;
bool _needRedraw;
@@ -134,28 +134,28 @@
public:
// Theme colors
- NewGuiColor _color, _shadowcolor;
- NewGuiColor _bgcolor;
- NewGuiColor _textcolor;
- NewGuiColor _textcolorhi;
+ OverlayColor _color, _shadowcolor;
+ OverlayColor _bgcolor;
+ OverlayColor _textcolor;
+ OverlayColor _textcolorhi;
// Drawing primitives
- NewGuiColor *getBasePtr(int x, int y);
- void box(int x, int y, int width, int height, NewGuiColor colorA, NewGuiColor colorB);
- void line(int x, int y, int x2, int y2, NewGuiColor color);
- void blendRect(int x, int y, int w, int h, NewGuiColor color, int level = 3);
- void fillRect(int x, int y, int w, int h, NewGuiColor color);
- void checkerRect(int x, int y, int w, int h, NewGuiColor color);
- void frameRect(int x, int y, int w, int h, NewGuiColor color);
- void drawChar(byte c, int x, int y, NewGuiColor color);
+ OverlayColor *getBasePtr(int x, int y);
+ void box(int x, int y, int width, int height, OverlayColor colorA, OverlayColor colorB);
+ void line(int x, int y, int x2, int y2, OverlayColor color);
+ void blendRect(int x, int y, int w, int h, OverlayColor color, int level = 3);
+ void fillRect(int x, int y, int w, int h, OverlayColor color);
+ void checkerRect(int x, int y, int w, int h, OverlayColor color);
+ void frameRect(int x, int y, int w, int h, OverlayColor color);
+ void drawChar(byte c, int x, int y, OverlayColor color);
int getStringWidth(const String &str);
int getCharWidth(byte c);
- void drawString(const String &str, int x, int y, int w, NewGuiColor color, int align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true);
+ void drawString(const String &str, int x, int y, int w, OverlayColor color, int align = kTextAlignLeft, int deltax = 0, bool useEllipsis = true);
void blitFromBuffer(int x, int y, int w, int h, const byte *buf, int pitch);
void blitToBuffer(int x, int y, int w, int h, byte *buf, int pitch);
- void drawBitmap(uint32 *bitmap, int x, int y, NewGuiColor color, int h = 8);
+ void drawBitmap(uint32 *bitmap, int x, int y, OverlayColor color, int h = 8);
void addDirtyRect(int x, int y, int w, int h);
};
Index: widget.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/gui/widget.cpp,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- widget.cpp 26 Jan 2004 07:37:41 -0000 1.36
+++ widget.cpp 28 Feb 2004 12:58:09 -0000 1.37
@@ -57,8 +57,8 @@
// Draw border
if (_flags & WIDGET_BORDER) {
- NewGuiColor colorA = gui->_color;
- NewGuiColor colorB = gui->_shadowcolor;
+ OverlayColor colorA = gui->_color;
+ OverlayColor colorB = gui->_shadowcolor;
if ((_flags & WIDGET_INV_BORDER) == WIDGET_INV_BORDER)
SWAP(colorA, colorB);
gui->box(_x, _y, _w, _h, colorA, colorB);
- Previous message: [Scummvm-cvs-logs] CVS: scummvm/common scummsys.h,1.44,1.45 system.h,1.53,1.54 timer.cpp,1.25,1.26 util.cpp,1.40,1.41
- Next message: [Scummvm-cvs-logs] CVS: scummvm/scumm/smush smush_player.cpp,1.111,1.112
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list