aboutsummaryrefslogtreecommitdiff
path: root/engines/prince
diff options
context:
space:
mode:
authorWillem Jan Palenstijn2014-10-10 13:55:53 +0200
committerWillem Jan Palenstijn2014-10-10 14:02:33 +0200
commit6419a0da5ea501581b7571e679203638757d6338 (patch)
tree1659a77951f63a7635cd4a01fa5f9b954b8c28ff /engines/prince
parentbdc20cf1c992622d1767ec25ad06ffa15b6fc791 (diff)
downloadscummvm-rg350-6419a0da5ea501581b7571e679203638757d6338.tar.gz
scummvm-rg350-6419a0da5ea501581b7571e679203638757d6338.tar.bz2
scummvm-rg350-6419a0da5ea501581b7571e679203638757d6338.zip
PRINCE: Fix a few warnings
Diffstat (limited to 'engines/prince')
-rw-r--r--engines/prince/graphics.cpp14
-rw-r--r--engines/prince/mob.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/engines/prince/graphics.cpp b/engines/prince/graphics.cpp
index cd4b62f7a5..91ba699e85 100644
--- a/engines/prince/graphics.cpp
+++ b/engines/prince/graphics.cpp
@@ -79,7 +79,7 @@ void GraphicsMan::change() {
void GraphicsMan::draw(Graphics::Surface *screen, const Graphics::Surface *s) {
uint16 w = MIN(screen->w, s->w);
- byte *src = (byte *)s->getBasePtr(0, 0);
+ const byte *src = (const byte *)s->getBasePtr(0, 0);
byte *dst = (byte *)screen->getBasePtr(0, 0);
for (uint y = 0; y < s->h; y++) {
if (y < screen->h) {
@@ -93,11 +93,11 @@ void GraphicsMan::draw(Graphics::Surface *screen, const Graphics::Surface *s) {
// Black (value = 0) as a primary transparent color, fix for FLC animations
void GraphicsMan::drawTransparentSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, int secondTransColor) {
- byte *src1 = (byte *)s->getBasePtr(0, 0);
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
for (int y = 0; y < s->h; y++) {
if (y + posY < screen->h && y + posY >= 0) {
- byte *src2 = src1;
+ const byte *src2 = src1;
byte *dst2 = dst1;
for (int x = 0; x < s->w; x++, src2++, dst2++) {
if (*src2 && *src2 != secondTransColor) {
@@ -118,11 +118,11 @@ void GraphicsMan::drawTransparentSurface(Graphics::Surface *screen, int32 posX,
* and kShadowColor (191) as a transparent color.
*/
void GraphicsMan::drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s, byte *shadowTable) {
- byte *src1 = (byte *)s->getBasePtr(0, 0);
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
for (int y = 0; y < s->h; y++) {
if (y + posY < screen->h && y + posY >= 0) {
- byte *src2 = src1;
+ const byte *src2 = src1;
byte *dst2 = dst1;
for (int x = 0; x < s->w; x++, src2++, dst2++) {
if (*src2 == kShadowColor) {
@@ -142,7 +142,7 @@ void GraphicsMan::drawAsShadowSurface(Graphics::Surface *screen, int32 posX, int
* use black (0) as a transparent color.
*/
void GraphicsMan::drawTransparentWithBlendSurface(Graphics::Surface *screen, int32 posX, int32 posY, const Graphics::Surface *s) {
- byte *src1 = (byte *)s->getBasePtr(0, 0);
+ const byte *src1 = (const byte *)s->getBasePtr(0, 0);
byte *dst1 = (byte *)screen->getBasePtr(posX, posY);
byte *blendTable = (byte *)malloc(256);
for (int i = 0; i < 256; i++) {
@@ -150,7 +150,7 @@ void GraphicsMan::drawTransparentWithBlendSurface(Graphics::Surface *screen, int
}
for (int y = 0; y < s->h; y++) {
if (y + posY < screen->h && y + posY >= 0) {
- byte *src2 = src1;
+ const byte *src2 = src1;
byte *dst2 = dst1;
for (int x = 0; x < s->w; x++, src2++, dst2++) {
if (*src2) {
diff --git a/engines/prince/mob.h b/engines/prince/mob.h
index ecf0eb4c3a..cc60e36f9b 100644
--- a/engines/prince/mob.h
+++ b/engines/prince/mob.h
@@ -44,7 +44,7 @@ public:
kMobVisible = 0,
kMobExamX = 14,
kMobExamY = 16,
- kMobExamDir = 18,
+ kMobExamDir = 18
};
void setData(AttrId dataId, uint16 value);