[Scummvm-cvs-logs] SF.net SVN: scummvm: [26863] scummvm/trunk/engines/cine
cyx at users.sourceforge.net
cyx at users.sourceforge.net
Fri May 18 00:26:06 CEST 2007
Revision: 26863
http://scummvm.svn.sourceforge.net/scummvm/?rev=26863&view=rev
Author: cyx
Date: 2007-05-17 15:26:05 -0700 (Thu, 17 May 2007)
Log Message:
-----------
moved gfx related functions from various.cpp/.h to gfx.cpp/.h and fixed indentation of previous commit
Modified Paths:
--------------
scummvm/trunk/engines/cine/gfx.cpp
scummvm/trunk/engines/cine/gfx.h
scummvm/trunk/engines/cine/various.cpp
scummvm/trunk/engines/cine/various.h
Modified: scummvm/trunk/engines/cine/gfx.cpp
===================================================================
--- scummvm/trunk/engines/cine/gfx.cpp 2007-05-17 22:18:51 UTC (rev 26862)
+++ scummvm/trunk/engines/cine/gfx.cpp 2007-05-17 22:26:05 UTC (rev 26863)
@@ -36,6 +36,7 @@
uint16 c_palette[256];
byte *page0;
+byte *page0c;
byte *page1;
byte *page2;
byte *page3;
@@ -129,7 +130,7 @@
}
}
-uint16 transformColor(uint16 baseColor, int8 r, int8 g, int8 b) {
+static uint16 transformColor(uint16 baseColor, int8 r, int8 g, int8 b) {
int8 oriR = (baseColor & 0x7);
int8 oriG = (baseColor & 0x70) >> 4;
int8 oriB = (baseColor & 0x700) >> 8;
@@ -210,54 +211,54 @@
// gfxUpdateSpriteMask
void gfxSpriteFunc2(byte *spritePtr, byte *spriteMskPtr, int16 width, int16 height, byte *maskPtr,
- int16 maskWidth, int16 maskHeight, byte *bufferSprPtr, byte *bufferMskPtr, int16 xs, int16 ys, int16 xm, int16 ym, byte maskIdx) {
- int16 i, j, d, spritePitch, maskPitch;
+ int16 maskWidth, int16 maskHeight, byte *bufferSprPtr, byte *bufferMskPtr, int16 xs, int16 ys, int16 xm, int16 ym, byte maskIdx) {
+ int16 i, j, d, spritePitch, maskPitch;
- width *= 8;
- maskWidth *= 8;
+ width *= 8;
+ maskWidth *= 8;
- spritePitch = width;
- maskPitch = maskWidth;
+ spritePitch = width;
+ maskPitch = maskWidth;
- if (maskIdx == 0) {
- memcpy(bufferSprPtr, spritePtr, spritePitch * height);
- memcpy(bufferMskPtr, spriteMskPtr, spritePitch * height);
- }
+ if (maskIdx == 0) {
+ memcpy(bufferSprPtr, spritePtr, spritePitch * height);
+ memcpy(bufferMskPtr, spriteMskPtr, spritePitch * height);
+ }
- if (ys > ym) {
- d = ys - ym;
- maskPtr += d * maskPitch;
- maskHeight -= d;
- }
- if (maskHeight <= 0) {
- return;
- }
- if (xs > xm) {
- d = xs - xm;
- maskPtr += d;
- maskWidth -= d;
- }
- if (maskWidth <= 0) {
- return;
- }
- if (ys < ym) {
- d = ym - ys;
- spriteMskPtr += d * spritePitch;
- bufferMskPtr += d * spritePitch;
- height -= d;
- }
- if (height <= 0) {
- return;
- }
+ if (ys > ym) {
+ d = ys - ym;
+ maskPtr += d * maskPitch;
+ maskHeight -= d;
+ }
+ if (maskHeight <= 0) {
+ return;
+ }
+ if (xs > xm) {
+ d = xs - xm;
+ maskPtr += d;
+ maskWidth -= d;
+ }
+ if (maskWidth <= 0) {
+ return;
+ }
+ if (ys < ym) {
+ d = ym - ys;
+ spriteMskPtr += d * spritePitch;
+ bufferMskPtr += d * spritePitch;
+ height -= d;
+ }
+ if (height <= 0) {
+ return;
+ }
if (xs < xm) {
- d = xm - xs;
- spriteMskPtr += d;
- bufferMskPtr += d;
- width -= d;
- }
- if (width <= 0) {
- return;
- }
+ d = xm - xs;
+ spriteMskPtr += d;
+ bufferMskPtr += d;
+ width -= d;
+ }
+ if (width <= 0) {
+ return;
+ }
for (j = 0; j < height; ++j) {
for (i = 0; i < width; ++i) {
bufferMskPtr[i] |= maskPtr[i] ^ 1;
@@ -470,5 +471,21 @@
}
}
+void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5) {
+}
+void ptrGfxFunc13(void) {
+}
+
+void gfxFuncGen2(void) {
+}
+
+void blitRawScreen(byte *frontBuffer) {
+ gfxFlipRawPage(frontBuffer);
+}
+
+void flip(void) {
+ blitRawScreen(page1Raw);
+}
+
} // End of namespace Cine
Modified: scummvm/trunk/engines/cine/gfx.h
===================================================================
--- scummvm/trunk/engines/cine/gfx.h 2007-05-17 22:18:51 UTC (rev 26862)
+++ scummvm/trunk/engines/cine/gfx.h 2007-05-17 22:26:05 UTC (rev 26863)
@@ -30,6 +30,7 @@
void gfxDrawSprite(byte *src4, uint16 sw, uint16 sh, byte *dst4, int16 sx, int16 sy);
extern byte *page0;
+extern byte *page0c;
extern byte *page1;
extern byte *page2;
extern byte *page3;
@@ -72,6 +73,14 @@
void fadeToBlack(void);
+void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5);
+void ptrGfxFunc13(void);
+void gfxFuncGen2(void);
+
+void blitScreen(byte *frontBuffer, byte *backbuffer);
+void blitRawScreen(byte *frontBuffer);
+void flip(void);
+
} // End of namespace Cine
#endif
Modified: scummvm/trunk/engines/cine/various.cpp
===================================================================
--- scummvm/trunk/engines/cine/various.cpp 2007-05-17 22:18:51 UTC (rev 26862)
+++ scummvm/trunk/engines/cine/various.cpp 2007-05-17 22:26:05 UTC (rev 26863)
@@ -56,10 +56,6 @@
void drawString(const char *string, byte param) {
}
-void blitRawScreen(byte *frontBuffer) {
- gfxFlipRawPage(frontBuffer);
-}
-
Common::File *partFileHandleP = NULL;
void waitPlayerInput(void) {
@@ -74,17 +70,6 @@
uint16 errorVar;
byte menuVar;
-void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5) {
-}
-
-byte *page0c;
-
-void ptrGfxFunc13(void) {
-}
-
-void gfxFuncGen2(void) {
-}
-
uint16 allowPlayerInput;
uint16 checkForPendingDataLoadSwitch;
@@ -2650,10 +2635,6 @@
}
}
-void flip(void) {
- blitRawScreen(page1Raw);
-}
-
uint16 processKeyboard(uint16 param) {
return 0;
}
Modified: scummvm/trunk/engines/cine/various.h
===================================================================
--- scummvm/trunk/engines/cine/various.h 2007-05-17 22:18:51 UTC (rev 26862)
+++ scummvm/trunk/engines/cine/various.h 2007-05-17 22:26:05 UTC (rev 26863)
@@ -93,14 +93,6 @@
extern uint16 errorVar;
extern byte menuVar;
-void gfxFuncGen1(byte *param1, byte *param2, byte *param3, byte *param4, int16 param5);
-
-extern byte *page0;
-extern byte *page0c;
-
-void ptrGfxFunc13(void);
-void gfxFuncGen2(void);
-
extern uint16 allowPlayerInput;
extern uint16 checkForPendingDataLoadSwitch;
@@ -137,7 +129,6 @@
uint16 executePlayerInput(void);
void drawOverlays(void);
-void flip(void);
extern uint16 mouseUpdateStatus;
extern uint16 dummyU16;
@@ -170,8 +161,6 @@
void addMessage(byte param1, int16 param2, int16 param3, int16 param4, int16 param5);
-void blitScreen(byte *frontBuffer, byte *backbuffer);
-
extern int16 additionalBgVScroll;
void addSeqListElement(int16 param0, int16 param1, int16 param2, int16 param3, int16 param4, int16 param5, int16 param6, int16 param7, int16 param8);
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