[Scummvm-cvs-logs] SF.net SVN: scummvm:[42110] scummvm/trunk/engines/kyra
athrxx at users.sourceforge.net
athrxx at users.sourceforge.net
Sat Jul 4 23:18:20 CEST 2009
Revision: 42110
http://scummvm.svn.sourceforge.net/scummvm/?rev=42110&view=rev
Author: athrxx
Date: 2009-07-04 21:18:20 +0000 (Sat, 04 Jul 2009)
Log Message:
-----------
KYRA: fix minor bug in Screen::drawShape()
Modified Paths:
--------------
scummvm/trunk/engines/kyra/screen.cpp
scummvm/trunk/engines/kyra/screen.h
Modified: scummvm/trunk/engines/kyra/screen.cpp
===================================================================
--- scummvm/trunk/engines/kyra/screen.cpp 2009-07-04 20:04:43 UTC (rev 42109)
+++ scummvm/trunk/engines/kyra/screen.cpp 2009-07-04 21:18:20 UTC (rev 42110)
@@ -1529,6 +1529,7 @@
_dsTmpWidth = shapeWidth;
int cnt = _dsOffscreenLeft;
int scaleState = (this->*_dsProcessMargin)(d, src, cnt);
+
if (_dsTmpWidth) {
cnt += shpWidthScaled1;
if (cnt > 0) {
@@ -1584,7 +1585,6 @@
while (cnt > 0) {
--cnt;
-
if (*src++)
continue;
@@ -1611,7 +1611,6 @@
while (cnt > 0) {
--cnt;
-
if (*src++)
continue;
@@ -1640,10 +1639,11 @@
return 0;
do {
+ --cnt;
if (*src++)
continue;
cnt = cnt + 1 - (*src++);
- } while (--cnt > 0);
+ } while (cnt > 0);
return 0;
}
@@ -1656,16 +1656,17 @@
return 0;
do {
+ --cnt;
if (*src++)
continue;
found = true;
cnt = cnt + 1 - (*src++);
- } while (--cnt > 0);
+ } while (cnt > 0);
return found ? 0 : _dsOffscreenScaleVal1;
}
-void Screen::drawShapeProcessLineNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16) {
+void Screen::drawShapeProcessLineNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, int16) {
do {
uint8 c = *src++;
if (c) {
@@ -1680,7 +1681,7 @@
} while (cnt > 0);
}
-void Screen::drawShapeProcessLineNoScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16) {
+void Screen::drawShapeProcessLineNoScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, int16) {
do {
uint8 c = *src++;
if (c) {
@@ -1695,7 +1696,7 @@
} while (cnt > 0);
}
-void Screen::drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState) {
+void Screen::drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState) {
int c = 0;
do {
@@ -1723,7 +1724,7 @@
cnt = -1;
}
-void Screen::drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState) {
+void Screen::drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState) {
int c = 0;
do {
Modified: scummvm/trunk/engines/kyra/screen.h
===================================================================
--- scummvm/trunk/engines/kyra/screen.h 2009-07-04 20:04:43 UTC (rev 42109)
+++ scummvm/trunk/engines/kyra/screen.h 2009-07-04 21:18:20 UTC (rev 42110)
@@ -421,10 +421,10 @@
int drawShapeMarginScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt);
int drawShapeSkipScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt);
int drawShapeSkipScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt);
- void drawShapeProcessLineNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState);
- void drawShapeProcessLineNoScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState);
- void drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState);
- void drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState);
+ void drawShapeProcessLineNoScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState);
+ void drawShapeProcessLineNoScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState);
+ void drawShapeProcessLineScaleUpwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState);
+ void drawShapeProcessLineScaleDownwind(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState);
void drawShapePlotType0(uint8 *dst, uint8 cmd);
void drawShapePlotType1(uint8 *dst, uint8 cmd);
@@ -446,7 +446,7 @@
void drawShapePlotType52(uint8 *dst, uint8 cmd);
typedef int (Screen::*DsMarginSkipFunc)(uint8 *&dst, const uint8 *&src, int &cnt);
- typedef void (Screen::*DsLineFunc)(uint8 *&dst, const uint8 *&src, int &cnt, uint16 scaleState);
+ typedef void (Screen::*DsLineFunc)(uint8 *&dst, const uint8 *&src, int &cnt, int16 scaleState);
typedef void (Screen::*DsPlotFunc)(uint8 *dst, uint8 cmd);
DsMarginSkipFunc _dsProcessMargin;
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