aboutsummaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorVicent Marti2008-07-25 11:13:47 +0000
committerVicent Marti2008-07-25 11:13:47 +0000
commit078ac062e764b9b6a46110861f924e3df6328f20 (patch)
tree0707efb27e90c8c6bd976227982e8e55aaa6b115 /graphics
parent1c0bceecd583efd3f852213916fdec832fa5e5c4 (diff)
downloadscummvm-rg350-078ac062e764b9b6a46110861f924e3df6328f20.tar.gz
scummvm-rg350-078ac062e764b9b6a46110861f924e3df6328f20.tar.bz2
scummvm-rg350-078ac062e764b9b6a46110861f924e3df6328f20.zip
More triangle work
svn-id: r33286
Diffstat (limited to 'graphics')
-rw-r--r--graphics/VectorRenderer.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/graphics/VectorRenderer.cpp b/graphics/VectorRenderer.cpp
index ce8868241b..352ab971a3 100644
--- a/graphics/VectorRenderer.cpp
+++ b/graphics/VectorRenderer.cpp
@@ -521,18 +521,13 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
if (Base::_dynamicData != 0)
orient = (TriangleOrientation)Base::_dynamicData;
- int newW = w * 3 / 4;
+ int newW = w / 2;
if (newW % 2) newW++;
switch(orient) {
case kTriangleUp:
case kTriangleDown:
-// #ifdef VECTOR_RENDERER_FAST_TRIANGLES
- // if (w == h)
- drawTriangleFast(x + (w / 2) - w * 3 / 8, y + w / 4, newW, (orient == kTriangleDown), color, Base::_fillMode);
- // else
-// #endif
- // drawTriangleVertAlg(x, y, w, h, (orient == kTriangleDown), color, Base::_fillMode);
+ drawTriangleFast(x + (newW / 2), y + (h / 2) - (newW / 2), newW, (orient == kTriangleDown), color, Base::_fillMode);
break;
case kTriangleLeft:
@@ -543,12 +538,7 @@ drawTriangle(int x, int y, int w, int h, TriangleOrientation orient) {
if (Base::_strokeWidth > 0)
if (Base::_fillMode == kFillBackground || Base::_fillMode == kFillGradient) {
-#ifdef VECTOR_RENDERER_FAST_TRIANGLES
- if (w == h)
- drawTriangleFast(x, y, w, (orient == kTriangleDown), _fgColor, kFillDisabled);
- else
-#endif
- drawTriangleVertAlg(x, y, w, h, (orient == kTriangleDown), _fgColor, kFillDisabled);
+ drawTriangleFast(x + (newW / 2), y + (h / 2) - (newW / 2), newW, (orient == kTriangleDown), _fgColor, kFillDisabled);
}
}