[Scummvm-cvs-logs] scummvm master -> f3f3d5bcbf949cff514e58dc1f2b0c1d4e743cab
bluegr
bluegr at gmail.com
Wed May 1 02:54:30 CEST 2013
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
5692c378ec TINSEL: Simplify palette endianess conversions
f3f3d5bcbf TINSEL: Clear the screen with the correct color in DW1 Mac
Commit: 5692c378ec5338b0bc977acd27945114f6f57537
https://github.com/scummvm/scummvm/commit/5692c378ec5338b0bc977acd27945114f6f57537
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-30T17:50:29-07:00
Commit Message:
TINSEL: Simplify palette endianess conversions
Changed paths:
engines/tinsel/faders.cpp
engines/tinsel/object.cpp
engines/tinsel/palette.cpp
diff --git a/engines/tinsel/faders.cpp b/engines/tinsel/faders.cpp
index b772e37..b51b1d6 100644
--- a/engines/tinsel/faders.cpp
+++ b/engines/tinsel/faders.cpp
@@ -106,7 +106,7 @@ static void FadeProcess(CORO_PARAM, const void *param) {
FadingPalette(pFade->pPalQ, true);
// get pointer to palette - reduce pointer indirection a bit
- _ctx->pPalette = (PALETTE *)LockMem(FROM_32(pFade->pPalQ->hPal));
+ _ctx->pPalette = (PALETTE *)LockMem(pFade->pPalQ->hPal);
for (_ctx->pColMult = pFade->pColorMultTable; *_ctx->pColMult >= 0; _ctx->pColMult++) {
// go through all multipliers in table - until a negative entry
diff --git a/engines/tinsel/object.cpp b/engines/tinsel/object.cpp
index cbf1c86..b70b581 100644
--- a/engines/tinsel/object.cpp
+++ b/engines/tinsel/object.cpp
@@ -375,7 +375,7 @@ OBJECT *InitObject(const OBJ_INIT *pInitTbl) {
if (pImg->hImgPal) {
// allocate a palette for this object
- pPalQ = AllocPalette(FROM_LE_32(pImg->hImgPal));
+ pPalQ = AllocPalette(FROM_32(pImg->hImgPal));
// make sure palette allocated
assert(pPalQ != NULL);
@@ -494,7 +494,7 @@ OBJECT *RectangleObject(SCNHANDLE hPal, int color, int width, int height) {
OBJECT *pRect = InitObject(&rectObj);
// allocate a palette for this object
- pPalQ = AllocPalette(FROM_32(hPal));
+ pPalQ = AllocPalette(hPal);
// make sure palette allocated
assert(pPalQ != NULL);
diff --git a/engines/tinsel/palette.cpp b/engines/tinsel/palette.cpp
index 505cb21..b72d52c 100644
--- a/engines/tinsel/palette.cpp
+++ b/engines/tinsel/palette.cpp
@@ -150,7 +150,7 @@ void PalettesToVideoDAC() {
// we are using a palette handle
// get hardware palette pointer
- pPalette = (const PALETTE *)LockMem(FROM_32(pDACtail->pal.hRGBarray));
+ pPalette = (const PALETTE *)LockMem(pDACtail->pal.hRGBarray);
// get RGB pointer
pColors = pPalette->palRGB;
@@ -306,7 +306,7 @@ PALQ *AllocPalette(SCNHANDLE hNewPal) {
PALETTE *pNewPal;
// get pointer to new palette
- pNewPal = (PALETTE *)LockMem(FROM_32(hNewPal));
+ pNewPal = (PALETTE *)LockMem(hNewPal);
// search all structs in palette allocator - see if palette already allocated
for (p = g_palAllocData; p < g_palAllocData + NUM_PALETTES; p++) {
Commit: f3f3d5bcbf949cff514e58dc1f2b0c1d4e743cab
https://github.com/scummvm/scummvm/commit/f3f3d5bcbf949cff514e58dc1f2b0c1d4e743cab
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2013-04-30T17:53:00-07:00
Commit Message:
TINSEL: Clear the screen with the correct color in DW1 Mac
Changed paths:
engines/tinsel/graphics.cpp
diff --git a/engines/tinsel/graphics.cpp b/engines/tinsel/graphics.cpp
index ef8a102..5dae984 100644
--- a/engines/tinsel/graphics.cpp
+++ b/engines/tinsel/graphics.cpp
@@ -797,9 +797,10 @@ static void PackedWrtNonZero(DRAWOBJECT *pObj, uint8 *srcP, uint8 *destP,
* Clears both the screen surface buffer and screen to the specified value
*/
void ClearScreen() {
+ byte blackColorIndex = (!TinselV1Mac) ? 0 : 255;
void *pDest = _vm->screen().getBasePtr(0, 0);
- memset(pDest, 0, SCREEN_WIDTH * SCREEN_HEIGHT);
- g_system->fillScreen(0);
+ memset(pDest, blackColorIndex, SCREEN_WIDTH * SCREEN_HEIGHT);
+ g_system->fillScreen(blackColorIndex);
g_system->updateScreen();
}
More information about the Scummvm-git-logs
mailing list