[Scummvm-cvs-logs] SF.net SVN: scummvm:[33911] scummvm/branches/gsoc2008-gui
Tanoku at users.sourceforge.net
Tanoku at users.sourceforge.net
Fri Aug 15 21:10:39 CEST 2008
Revision: 33911
http://scummvm.svn.sourceforge.net/scummvm/?rev=33911&view=rev
Author: Tanoku
Date: 2008-08-15 19:10:37 +0000 (Fri, 15 Aug 2008)
Log Message:
-----------
Tons of misc. GFX fixes.
Modified Paths:
--------------
scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp
scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp
scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
scummvm/branches/gsoc2008-gui/gui/newgui.cpp
scummvm/branches/gsoc2008-gui/gui/options.cpp
scummvm/branches/gsoc2008-gui/gui/options.h
scummvm/branches/gsoc2008-gui/gui/themes/default.inc
scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_gfx.stx
scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx
scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx
scummvm/branches/gsoc2008-gui/gui/themes/scummclassic.zip
scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx
scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx
scummvm/branches/gsoc2008-gui/gui/themes/scummodern.zip
Modified: scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/engines/scumm/dialogs.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -951,7 +951,10 @@
if (_value > 2)
_value = 0;
- setInfoText(subtitleDesc[_value]);
+ if (_value == 1 && g_system->getOverlayWidth() <= 320)
+ setInfoText("Speech & Subs");
+ else
+ setInfoText(subtitleDesc[_value]);
_timer = getMillis() + 1500;
}
Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -370,15 +370,21 @@
PixelType *ptr = (PixelType *)_activeSurface->getBasePtr(x1, y1);
int pitch = Base::surfacePitch();
+ int st = Base::_strokeWidth >> 1;
if (dy == 0) { // horizontal lines
// these can be filled really fast with a single memset.
colorFill(ptr, ptr + dx + 1, (PixelType)_fgColor);
+
+ for (int i = 0, p = pitch; i < st; ++i, p += pitch) {
+ colorFill(ptr + p, ptr + dx + 1 + p, (PixelType)_fgColor);
+ colorFill(ptr - p, ptr + dx + 1 - p, (PixelType)_fgColor);
+ }
} else if (dx == 0) { // vertical lines
// these ones use a static pitch increase.
while (y1++ <= y2) {
- *ptr = (PixelType)_fgColor;
+ colorFill(ptr - st, ptr + st, (PixelType)_fgColor);
ptr += pitch;
}
@@ -387,7 +393,7 @@
pitch += (x2 > x1) ? 1 : -1;
while (dy--) {
- *ptr = (PixelType)_fgColor;
+ colorFill(ptr - st, ptr + st, (PixelType)_fgColor);
ptr += pitch;
}
Modified: scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h
===================================================================
--- scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/graphics/VectorRenderer.h 2008-08-15 19:10:37 UTC (rev 33911)
@@ -211,6 +211,15 @@
* @param r Radius of the corners of the tab (0 for squared tabs).
*/
virtual void drawTab(int x, int y, int r, int w, int h) = 0;
+
+
+ /**
+ * Simple helper function to draw a cross.
+ */
+ virtual void drawCross(int x, int y, int w, int h) {
+ drawLine(x, y, x + w, y + w);
+ drawLine(x + w, y, x, y + h);
+ }
/**
* Gets the pixel pitch for the current drawing surface.
@@ -419,6 +428,12 @@
stepGetPositions(step, area, x, y, w, h);
blitAlphaBitmap(step.blitSrc, Common::Rect(x, y, x + w, y + h));
}
+
+ void drawCallback_CROSS(const Common::Rect &area, const DrawStep &step) {
+ uint16 x, y, w, h;
+ stepGetPositions(step, area, x, y, w, h);
+ drawCross(x, y, w, h);
+ }
void drawCallback_VOID(const Common::Rect &area, const DrawStep &step) {}
Modified: scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeParser.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -52,6 +52,7 @@
_drawFunctions["tab"] = &Graphics::VectorRenderer::drawCallback_TAB;
_drawFunctions["void"] = &Graphics::VectorRenderer::drawCallback_VOID;
_drawFunctions["bitmap"] = &Graphics::VectorRenderer::drawCallback_BITMAP;
+ _drawFunctions["cross"] = &Graphics::VectorRenderer::drawCallback_CROSS;
_defaultStepGlobal = defaultDrawStep();
_defaultStepLocal = 0;
Modified: scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/ThemeRenderer.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -29,6 +29,7 @@
#include "common/system.h"
#include "common/events.h"
#include "common/config-manager.h"
+#include "common/fs.h"
#include "graphics/imageman.h"
#include "graphics/cursorman.h"
#include "gui/launcher.h"
@@ -461,7 +462,7 @@
if (parser()->loadStream(stream) == false || parser()->parse() == false) {
warning("Failed to load stream for zipped file '%s'", fileNameBuffer);
unzClose(zipFile);
- delete stream;
+// delete stream;
return false;
}
}
@@ -474,6 +475,9 @@
}
}
+// FilesystemNode dir(themeName);
+// FSList files = dir.listDir(FilesystemNode::kListFilesOnly);
+
unzClose(zipFile);
return (parseCount > 0 && _themeName.empty() == false);
#else
@@ -705,6 +709,9 @@
r2.right -= 1;
r2.top += sliderY;
r2.bottom = r2.top + sliderHeight - 1;
+
+ r2.top += r.width() / 5;
+ r2.bottom -= r.width() / 5;
queueDD(scrollState == kScrollbarStateSlider ? kDDScrollbarHandleHover : kDDScrollbarHandleIdle, r2);
}
Modified: scummvm/branches/gsoc2008-gui/gui/newgui.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/newgui.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/newgui.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -423,6 +423,7 @@
// redrawn before redraw() has been called.
_redrawStatus = kRedrawFull;
redraw();
+ _system->showOverlay();
_system->updateScreen();
}
Modified: scummvm/branches/gsoc2008-gui/gui/options.cpp
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/options.cpp 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/options.cpp 2008-08-15 19:10:37 UTC (rev 33911)
@@ -88,6 +88,12 @@
"Subtitles Only"
};
+const char *OptionsDialog::_lowresSubModeDesc[] = {
+ "Speech Only",
+ "Speech & Subs",
+ "Subtitles Only"
+};
+
void OptionsDialog::init() {
_enableGraphicSettings = false;
_gfxPopUp = 0;
@@ -417,7 +423,7 @@
else
_subMode = 0;
- _subToggleButton->setLabel(_subModeDesc[_subMode]);
+ _subToggleButton->setLabel(g_system->getOverlayWidth() > 320 ? _subModeDesc[_subMode] : _lowresSubModeDesc[_subMode]);
_subToggleButton->draw();
_subSpeedDesc->draw();
_subSpeedSlider->draw();
Modified: scummvm/branches/gsoc2008-gui/gui/options.h
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/options.h 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/options.h 2008-08-15 19:10:37 UTC (rev 33911)
@@ -122,6 +122,7 @@
ButtonWidget *_subToggleButton;
int _subMode;
static const char *_subModeDesc[];
+ static const char *_lowresSubModeDesc[];
StaticTextWidget *_subSpeedDesc;
SliderWidget *_subSpeedSlider;
StaticTextWidget *_subSpeedLabel;
Modified: scummvm/branches/gsoc2008-gui/gui/themes/default.inc
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/default.inc 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/default.inc 2008-08-15 19:10:37 UTC (rev 33911)
@@ -282,6 +282,11 @@
"bevel = '2' "
"fill = 'none' "
"/> "
+"<drawstep func = 'cross' "
+"fill = 'foreground' "
+"stroke = '2' "
+"fg_color = 'green' "
+"/> "
"</drawdata> "
"<drawdata id = 'checkbox_default' cache = false> "
"<text font = 'text_default' "
Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_gfx.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_gfx.stx 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_gfx.stx 2008-08-15 19:10:37 UTC (rev 33911)
@@ -338,7 +338,11 @@
bevel = '2'
fill = 'none'
/>
-/* TODO */
+ <drawstep func = 'cross'
+ fill = 'foreground'
+ stroke = '2'
+ fg_color = 'green'
+ />
</drawdata>
<drawdata id = 'checkbox_default' cache = false>
Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout.stx 2008-08-15 19:10:37 UTC (rev 33911)
@@ -250,12 +250,12 @@
<widget name = 'mcFontButton'
type = 'Button'
/>
+ <widget name = 'mcFontPath'
+ height = 'Globals.Line.Height'
+ />
<widget name = 'mcFontClearButton'
height = 'Globals.Line.Height'
width = 'Globals.Line.Height'
- />
- <widget name = 'mcFontPath'
- height = 'Globals.Line.Height'
/>
</layout>
<widget name = 'mcMixedCheckbox'
Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummclassic/classic_layout_320.stx 2008-08-15 19:10:37 UTC (rev 33911)
@@ -248,13 +248,13 @@
<widget name = 'mcFontButton'
type = 'Button'
/>
+ <widget name = 'mcFontPath'
+ height = 'Globals.Line.Height'
+ />
<widget name = 'mcFontClearButton'
height = 'Globals.Line.Height'
width = 'Globals.Line.Height'
/>
- <widget name = 'mcFontPath'
- height = 'Globals.Line.Height'
- />
</layout>
<widget name = 'mcMixedCheckbox'
type = 'Checkbox'
Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_gfx.stx 2008-08-15 19:10:37 UTC (rev 33911)
@@ -26,23 +26,20 @@
<render_info>
<palette>
<color name = 'darkred'
- rgb = '168, 42, 12'
+ rgb = '169, 42, 12'
/>
<color name = 'brightred'
- rgb = '200, 124, 104'
+ rgb = '203, 126, 107'
/>
<color name = 'xtrabrightred'
- rgb = '251, 241, 206'
+ rgb = '255, 210, 200'
/>
<color name = 'blandyellow'
rgb = '247, 228, 166'
/>
<color name = 'bgreen'
- rgb = '96, 160, 8'
+ rgb = '100, 162, 8'
/>
- <color name = 'blue'
- rgb = '0, 255, 255'
- />
<color name = 'black'
rgb = '0, 0, 0'
/>
@@ -232,7 +229,7 @@
<drawdata id = 'tab_background' cache = false>
<drawstep func = 'tab'
- radius = '8'
+ radius = '6'
stroke = '0'
fill = 'foreground'
fg_color = '232, 180, 81'
@@ -272,6 +269,17 @@
gradient_end = 'darkred'
/>
</drawdata>
+
+ <drawdata id = 'slider_disabled' cache = false>
+ <drawstep func = 'roundedsq'
+ stroke = 1
+ radius = 4
+ fill = 'gradient'
+ fg_color = '123, 112, 56'
+ gradient_start = 'xtrabrightred'
+ gradient_end = 'darkred'
+ />
+ </drawdata>
<drawdata id = 'popup_idle' cache = false>
<drawstep func = 'roundedsq'
@@ -334,7 +342,7 @@
<drawdata id = 'plain_bg' cache = false>
<drawstep func = 'roundedsq'
- radius = 8
+ radius = 6
stroke = 0
gradient_start = 'blandyellow'
gradient_end = 'xtrabrightred'
@@ -366,7 +374,7 @@
horizontal_align = 'center'
/>
<drawstep func = 'roundedsq'
- radius = '6'
+ radius = '3'
stroke = 1
fill = 'gradient'
shadow = 0
@@ -383,7 +391,7 @@
horizontal_align = 'center'
/>
<drawstep func = 'roundedsq'
- radius = '6'
+ radius = '3'
gradient_factor = 1
stroke = 1
fill = 'gradient'
@@ -402,11 +410,14 @@
horizontal_align = 'center'
/>
<drawstep func = 'roundedsq'
- radius = '8'
- stroke = 0
- fill = 'foreground'
- fg_color = '200, 200, 200'
- shadow = 3
+ radius = '3'
+ stroke = 1
+ fill = 'gradient'
+ shadow = 0
+ fg_color = 'shadowcolor'
+ gradient_start = 'brightred'
+ gradient_end = 'darkred'
+ bevel = 1
/>
</drawdata>
Modified: scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx
===================================================================
--- scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx 2008-08-15 18:26:59 UTC (rev 33910)
+++ scummvm/branches/gsoc2008-gui/gui/themes/scummodern/scummodern_layout_320.stx 2008-08-15 19:10:37 UTC (rev 33911)
@@ -245,12 +245,12 @@
<widget name = 'mcFontButton'
type = 'Button'
/>
+ <widget name = 'mcFontPath'
+ height = 'Globals.Line.Height'
+ />
<widget name = 'mcFontClearButton'
height = 'Globals.Line.Height'
width = 'Globals.Line.Height'
- />
- <widget name = 'mcFontPath'
- height = 'Globals.Line.Height'
/>
</layout>
<widget name = 'mcMixedCheckbox'
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