aboutsummaryrefslogtreecommitdiff
path: root/backends/wince/screen.cpp
diff options
context:
space:
mode:
authorNicolas Bacca2003-04-04 13:20:24 +0000
committerNicolas Bacca2003-04-04 13:20:24 +0000
commita3e673b2a2e9f3c5b5d61a3fb9928325935ba850 (patch)
treeb0d0f41d1d52322128b03834f0e0ebf112b0e480 /backends/wince/screen.cpp
parent868161a7b079e8ccac4fbda2748f9f91e6dda9f7 (diff)
downloadscummvm-rg350-a3e673b2a2e9f3c5b5d61a3fb9928325935ba850.tar.gz
scummvm-rg350-a3e673b2a2e9f3c5b5d61a3fb9928325935ba850.tar.bz2
scummvm-rg350-a3e673b2a2e9f3c5b5d61a3fb9928325935ba850.zip
Latest local version, rewrite pending ...
svn-id: r6909
Diffstat (limited to 'backends/wince/screen.cpp')
-rw-r--r--backends/wince/screen.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/backends/wince/screen.cpp b/backends/wince/screen.cpp
index 6e2d3974b5..cbbffb7765 100644
--- a/backends/wince/screen.cpp
+++ b/backends/wince/screen.cpp
@@ -21,7 +21,7 @@
#ifdef _WIN32_WCE
-#define POCKETSCUMM_VERSION "CVS build 0.3.1cvs"
+#define POCKETSCUMM_VERSION "PPC build 03.02.09/1"
/* Original GFX code by Vasyl Tsvirkunov */
@@ -34,6 +34,8 @@
//#include "resource.h"
//#include "dynamic_imports.h"
+#include <tlhelp32.h>
+
#define COLORCONV565(r,g,b) \
(((r&0xf8)<<(11-3))|((g&0xfc)<<(5-2))|((b&0xf8)>>3))
#define COLORCONV555(r,g,b) \
@@ -99,6 +101,7 @@ UBYTE comment_zone[8 * 220];
UBYTE highlighted_zone[8 * 220];
int _highlighted_index = -1;
+
bool _gfx_mode_switch;
int _game_selection_X_offset;
int _game_selection_Y_offset;
@@ -603,6 +606,8 @@ void palette_update()
void SetPalEntry(int ent, UBYTE r, UBYTE g, UBYTE b)
{
+ int i;
+
if (ent >= MAX_CLR)
return;
@@ -616,6 +621,7 @@ void SetPalEntry(int ent, UBYTE r, UBYTE g, UBYTE b)
pal[ent] = COLORCONV555(r,g,b);
else if(gxdp.ffFormat & kfDirect)
pal[ent] = COLORCONVMONO(r,g,b);
+
}
/* *************** CLS IMPLEMENTATIONS ****************** */
@@ -2045,7 +2051,7 @@ void hicolor565_Blt_part(UBYTE * scr_ptr, int x, int y, int width, int height,
if (!own_palette) {
register first = *(src + 0);
register second = *(src + 1);
-
+
r = (3*palRed[first] + palRed[second])>>2;
g = (3*palGreen[first] + palGreen[second])>>2;
b = (3*palBlue[first] + palBlue[second])>>2;
@@ -2054,7 +2060,7 @@ void hicolor565_Blt_part(UBYTE * scr_ptr, int x, int y, int width, int height,
register second = 3 * *(src + 1);
r = (3 * own_palette[first] +
- own_palette[second]) >> 2;
+ own_palette[second]) >> 2;
g = (3 * own_palette[first + 1] +
own_palette[second + 1]) >> 2;
b = (3 * own_palette[first + 2] +
@@ -2068,7 +2074,7 @@ void hicolor565_Blt_part(UBYTE * scr_ptr, int x, int y, int width, int height,
if (!own_palette) {
register first = *(src + 1);
register second = *(src + 2);
-
+
r = (palRed[first] + palRed[second])>>1;
g = (palGreen[first] + palGreen[second])>>1;
b = (palBlue[first] + palBlue[second])>>1;
@@ -2084,9 +2090,9 @@ void hicolor565_Blt_part(UBYTE * scr_ptr, int x, int y, int width, int height,
b = (own_palette[first + 2] +
own_palette[second + 2]) >> 1;
}
-
+
*(unsigned short*)dst = COLORCONV565(r,g,b);
-
+
dst += pixelstep;
src += 3;