[Scummvm-cvs-logs] CVS: scummvm/scumm akos.cpp,1.199,1.200 akos.h,1.31,1.32 base-costume.cpp,2.21,2.22 base-costume.h,1.33,1.34 costume.cpp,1.147,1.148 costume.h,1.29,1.30
Max Horn
fingolfin at users.sourceforge.net
Thu Nov 25 15:37:02 CET 2004
Update of /cvsroot/scummvm/scummvm/scumm
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25912
Modified Files:
akos.cpp akos.h base-costume.cpp base-costume.h costume.cpp
costume.h
Log Message:
Turn the v1 member in the costume renderers into a function local object (used to be a member var)
Index: akos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.cpp,v
retrieving revision 1.199
retrieving revision 1.200
diff -u -d -r1.199 -r1.200
--- akos.cpp 12 Oct 2004 14:40:32 -0000 1.199
+++ akos.cpp 25 Nov 2004 23:36:01 -0000 1.200
@@ -500,7 +500,7 @@
return result;
}
-void AkosRenderer::codec1_genericDecode() {
+void AkosRenderer::codec1_genericDecode(Codec1 &v1) {
const byte *mask, *src;
byte *dst;
byte len, maskbit;
@@ -736,6 +736,7 @@
Common::Rect rect;
int step;
byte drawFlag = 1;
+ Codec1 v1;
const int scaletableSize = (_vm->_features & GF_HUMONGOUS) ? 128 : 384;
@@ -886,7 +887,7 @@
skip = -v1.x;
if (skip > 0) {
v1.skip_width -= skip;
- codec1_ignorePakCols(skip);
+ codec1_ignorePakCols(v1, skip);
v1.x = 0;
} else {
skip = rect.right - _out.w;
@@ -901,7 +902,7 @@
skip = rect.right - _out.w + 1;
if (skip > 0) {
v1.skip_width -= skip;
- codec1_ignorePakCols(skip);
+ codec1_ignorePakCols(v1, skip) ;
v1.x = _out.w - 1;
} else {
skip = -1 - rect.left;
@@ -934,7 +935,7 @@
v1.destptr = (byte *)_out.pixels + v1.y * _out.pitch + v1.x;
- codec1_genericDecode();
+ codec1_genericDecode(v1);
return drawFlag;
}
Index: akos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/akos.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -d -r1.31 -r1.32
--- akos.h 30 Sep 2004 23:49:46 -0000 1.31
+++ akos.h 25 Nov 2004 23:36:02 -0000 1.32
@@ -91,7 +91,7 @@
byte drawLimb(const Actor *a, int limb);
byte codec1(int xmoveCur, int ymoveCur);
- void codec1_genericDecode();
+ void codec1_genericDecode(Codec1 &v1);
byte codec5(int xmoveCur, int ymoveCur);
byte codec16(int xmoveCur, int ymoveCur);
byte codec32(int xmoveCur, int ymoveCur);
Index: base-costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.cpp,v
retrieving revision 2.21
retrieving revision 2.22
diff -u -d -r2.21 -r2.22
--- base-costume.cpp 9 Oct 2004 00:06:36 -0000 2.21
+++ base-costume.cpp 25 Nov 2004 23:36:02 -0000 2.22
@@ -51,7 +51,7 @@
return result;
}
-void BaseCostumeRenderer::codec1_ignorePakCols(int num) {
+void BaseCostumeRenderer::codec1_ignorePakCols(Codec1 &v1, int num) {
num *= _height;
do {
Index: base-costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/base-costume.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- base-costume.h 12 Oct 2004 14:12:20 -0000 1.33
+++ base-costume.h 25 Nov 2004 23:36:02 -0000 1.34
@@ -86,7 +86,7 @@
// width and height of cel to decode
int _width, _height;
- struct {
+ struct Codec1 {
// Parameters for the original ("V1") costume codec.
const byte *scaletable;
byte mask, shr;
@@ -98,8 +98,8 @@
int skip_width;
byte *destptr;
const byte *mask_ptr;
- } v1;
-
+ };
+
public:
BaseCostumeRenderer(ScummEngine *scumm) {
_actorID = 0;
@@ -128,10 +128,9 @@
byte drawCostume(const VirtScreen &vs, int numStrips, const Actor *a, bool drawToBackBuf);
protected:
-
virtual byte drawLimb(const Actor *a, int limb) = 0;
- void codec1_ignorePakCols(int num);
+ void codec1_ignorePakCols(Codec1 &v1, int num);
};
} // End of namespace Scumm
Index: costume.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.cpp,v
retrieving revision 1.147
retrieving revision 1.148
diff -u -d -r1.147 -r1.148
--- costume.cpp 9 Nov 2004 11:27:15 -0000 1.147
+++ costume.cpp 25 Nov 2004 23:36:02 -0000 1.148
@@ -83,6 +83,8 @@
int ex1, ex2;
Common::Rect rect;
int step;
+ Codec1 v1;
+
const int scaletableSize = 128;
const bool newAmiCost = (_vm->_version == 5) && (_vm->_features & GF_AMIGA);
@@ -234,7 +236,7 @@
if (skip > 0) {
if (!newAmiCost && _loaded._format != 0x57) {
v1.skip_width -= skip;
- codec1_ignorePakCols(skip);
+ codec1_ignorePakCols(v1, skip);
v1.x = 0;
}
} else {
@@ -251,7 +253,7 @@
if (skip > 0) {
if (!newAmiCost && _loaded._format != 0x57) {
v1.skip_width -= skip;
- codec1_ignorePakCols(skip);
+ codec1_ignorePakCols(v1, skip);
v1.x = _out.w - 1;
}
} else {
@@ -301,11 +303,11 @@
if (_loaded._format == 0x57) {
// The v1 costume renderer needs the actor number, which is
// the same thing as the costume renderer's _actorID.
- procC64(_actorID);
+ procC64(v1, _actorID);
} else if (newAmiCost)
- proc3_ami();
+ proc3_ami(v1);
else
- proc3();
+ proc3(v1);
CHECK_HEAP
return drawFlag;
@@ -329,7 +331,7 @@
dst[p + 1] = palette[pcolor]; \
}
-void CostumeRenderer::procC64(int actor) {
+void CostumeRenderer::procC64(Codec1 &v1, int actor) {
const byte *mask, *src;
byte *dst;
byte len;
@@ -404,7 +406,7 @@
#undef LINE
#undef MASK_AT
-void CostumeRenderer::proc3() {
+void CostumeRenderer::proc3(Codec1 &v1) {
#ifdef __PALM_OS__
ARM_START(CostumeProc3Type)
ARM_ADDP(v1)
@@ -499,7 +501,7 @@
} while (1);
}
-void CostumeRenderer::proc3_ami() {
+void CostumeRenderer::proc3_ami(Codec1 &v1) {
const byte *mask, *src;
byte *dst;
byte maskbit, len, height, width;
Index: costume.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/scumm/costume.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- costume.h 30 Sep 2004 23:49:46 -0000 1.29
+++ costume.h 25 Nov 2004 23:36:02 -0000 1.30
@@ -71,10 +71,10 @@
protected:
byte drawLimb(const Actor *a, int limb);
- void proc3();
- void proc3_ami();
+ void proc3(Codec1 &v1);
+ void proc3_ami(Codec1 &v1);
- void procC64(int actor);
+ void procC64(Codec1 &v1, int actor);
byte mainRoutine(int xmoveCur, int ymoveCur);
};
More information about the Scummvm-git-logs
mailing list