[Scummvm-cvs-logs] CVS: scummvm/backends/morphos build.rules,1.5,1.6 morphos.cpp,1.14,1.15 morphos.h,1.7,1.8 morphos_scaler.cpp,1.3,1.4 morphos_scaler.h,1.1.1.1,1.2 morphos_timer.cpp,1.5,1.6
Ruediger Hanke
tomjoad at users.sourceforge.net
Wed Dec 25 03:39:03 CET 2002
Update of /cvsroot/scummvm/scummvm/backends/morphos
In directory sc8-pr-cvs1:/tmp/cvs-serv32201
Modified Files:
build.rules morphos.cpp morphos.h morphos_scaler.cpp
morphos_scaler.h morphos_timer.cpp
Log Message:
Compilation warnings fixed
Index: build.rules
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/build.rules,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- build.rules 9 Dec 2002 13:38:01 -0000 1.5
+++ build.rules 25 Dec 2002 11:38:21 -0000 1.6
@@ -1,8 +1,8 @@
-CXX = g++
-CXXFLAGS = -Wno-multichar -fstrength-reduce -fno-rtti -O2
-DEFINES = -DNDEBUG
-LDFLAGS = -noixemul -s
-LIBS = -lamiga -lamigastubs -lcdda -lcybergraphics
+CXX = g++
+CFLAGS = -Wno-multichar -fstrength-reduce -fno-rtti -O2
+DEFINES = -DNDEBUG
+LDFLAGS = -noixemul -s
+LIBS = -lamiga -lamigastubs -lcybergraphics
INCLUDES += -Ibackends/morphos
MODULES += backends/morphos
OBJS += backends/morphos/morphos.o backends/morphos/morphos_scaler.o \
Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.cpp,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- morphos.cpp 2 Dec 2002 19:03:03 -0000 1.14
+++ morphos.cpp 25 Dec 2002 11:38:21 -0000 1.15
@@ -44,7 +44,9 @@
#include <proto/intuition.h>
#include <proto/keymap.h>
#include <proto/timer.h>
+#define USE_INLINE_STDARG
#include <proto/cdda.h>
+#undef USE_INLINE_STDARG
#include <proto/cybergraphics.h>
#include <time.h>
@@ -261,7 +263,7 @@
TimerIORequest->tr_time.tv_secs = 0;
TimerIORequest->tr_time.tv_micro = msecs*1000;
DoIO((IORequest *) TimerIORequest);*/
- TimeDelay(UNIT_MICROHZ, 0, msecs*1000);
+ TimeDelay(UNIT_MICROHZ, 0, msecs*1000);
}
void OSystem_MorphOS::set_timer(int timer, int (*callback)(int))
@@ -273,7 +275,7 @@
{
ScummMusicThread = CreateNewProcTags(NP_Entry, (ULONG) proc, NP_CodeType, CODETYPE_PPC,
NP_Name, (ULONG) "ScummVM Music Thread",
- NP_Priority, 80, NP_StackSize, 32000,
+ NP_Priority, 60, NP_StackSize, 32000,
NP_PPC_Arg1, (ULONG) param, TAG_DONE);
return ScummMusicThread;
}
@@ -322,15 +324,15 @@
if (!CDDABase) CDDABase = OpenLibrary("cdda.library", 2);
if (CDDABase)
{
- CDrive = CDDA_FindNextDrive(NULL, FindCDTags);
+ CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
if (!CDrive && GameID == GID_MONKEY)
{
FindCDTags[0].ti_Data = (ULONG) "Madness";
- CDrive = CDDA_FindNextDrive(NULL, FindCDTags);
+ CDrive = CDDA_FindNextDriveA(NULL, FindCDTags);
}
if (CDrive)
{
- if (!CDDA_ObtainDrive(CDrive, CDDA_SHARED_ACCESS, NULL))
+ if (!CDDA_ObtainDriveA(CDrive, CDDA_SHARED_ACCESS, NULL))
{
CDrive = NULL;
warning("Failed to obtain CD drive - music will not play");
@@ -378,7 +380,7 @@
PlayTags[2].ti_Data = (length == 0) ? track+1 : track;
PlayTags[3].ti_Data = length ? start_frame+length : 0;
PlayTags[4].ti_Data = (num_loops == 0) ? 1 : num_loops;
- CDDA_Play(CDrive, PlayTags);
+ CDDA_PlayA(CDrive, PlayTags);
}
}
@@ -458,7 +460,7 @@
void OSystem_MorphOS::CreateScreen(CS_DSPTYPE dspType)
{
- ULONG mode = INVALID_ID;
+ LONG mode = INVALID_ID;
int depths[] = { 8, 32, 16, 15, 0 };
int i;
Screen *wb = NULL;
@@ -521,7 +523,7 @@
if (ScummScreen == NULL)
error("Failed to open screen");
- ULONG RealDepth = GetBitMapAttr(&ScummScreen->BitMap, BMA_DEPTH);
+ LONG RealDepth = GetBitMapAttr(&ScummScreen->BitMap, BMA_DEPTH);
if (RealDepth != ScummDepth)
{
warning("Screen did not open in expected depth");
@@ -691,7 +693,8 @@
{
IntuiMessage *ScummMsg;
- if (ScummMsg = (IntuiMessage *) GetMsg(ScummWindow->UserPort))
+ ScummMsg = (IntuiMessage *) GetMsg(ScummWindow->UserPort);
+ if (ScummMsg)
{
switch (ScummMsg->Class)
{
@@ -788,8 +791,8 @@
if (!FullScreenMode && !ScummDefaultMouse)
{
- if (newx < 0 || newx > ScummBufferWidth ||
- newy < 0 || newy > ScummBufferHeight
+ if (newx < 0 || newx > (LONG) ScummBufferWidth ||
+ newy < 0 || newy > (LONG) ScummBufferHeight
)
{
if (!ScummOrigMouse)
@@ -1069,9 +1072,9 @@
InitRastPort(&rp);
rp.BitMap = ScummRenderTo;
- uint32 src_x, src_y;
- uint32 src_w, src_h;
- uint32 reg_x, reg_y;
+ int32 src_x, src_y;
+ int32 src_w, src_h;
+ int32 reg_x, reg_y;
RegionRectangle *update_rect = UpdateRegion->RegionRectangle;
reg_x = UpdateRegion->bounds.MinX;
@@ -1104,9 +1107,9 @@
}
else
{
- uint32 src_x, src_y;
- uint32 src_w, src_h;
- uint32 reg_x, reg_y;
+ int32 src_x, src_y;
+ int32 src_w, src_h;
+ int32 reg_x, reg_y;
RegionRectangle *update_rect = UpdateRegion->RegionRectangle;
reg_x = UpdateRegion->bounds.MinX;
@@ -1171,7 +1174,6 @@
void OSystem_MorphOS::DrawMouse()
{
- APTR handle = NULL;
int x,y;
byte *dst,*bak;
byte color;
@@ -1198,11 +1200,11 @@
for (y = 0; y < h; y++, dst += ScummBufferWidth, bak += MAX_MOUSE_W, buf += w)
{
- if ((uint)(ydraw+y) < ScummBufferHeight)
+ if (ydraw+y < ScummBufferHeight)
{
for (x = 0; x<w; x++)
{
- if ((uint)(xdraw+x) < ScummBufferWidth)
+ if (xdraw+x < ScummBufferWidth)
{
bak[x] = dst[x];
if ((color=buf[x])!=0xFF)
@@ -1231,11 +1233,11 @@
for (y = 0; y < MouseOldHeight; y++, bak += MAX_MOUSE_W, dst += ScummBufferWidth)
{
- if ((uint)(MouseOldY + y) < ScummBufferHeight)
+ if (MouseOldY + y < ScummBufferHeight)
{
for (x = 0; x < MouseOldWidth; x++)
{
- if ((uint)(MouseOldX + x) < ScummBufferWidth)
+ if (MouseOldX + x < ScummBufferWidth)
dst[x] = bak[x];
}
}
@@ -1455,13 +1457,11 @@
{
for (x1 = 0; x1 < w; x1++)
{
- ULONG r, g, b;
+ uint8 r, g, b;
int16 col;
col = *ovl++;
- r = RED_FROM_16(col);
- g = GREEN_FROM_16(col);
- b = BLUE_FROM_16(col);
+ colorToRBG(col, r, g, b);
*dest++ = r;
*dest++ = g;
*dest++ = b;
Index: morphos.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- morphos.h 25 Oct 2002 15:42:43 -0000 1.7
+++ morphos.h 25 Dec 2002 11:38:21 -0000 1.8
@@ -138,8 +138,8 @@
Window *ScummWindow;
char ScummWndTitle[125];
APTR ScummBuffer;
- int ScummBufferWidth;
- int ScummBufferHeight;
+ LONG ScummBufferWidth;
+ LONG ScummBufferHeight;
ScreenBuffer *ScummScreenBuffer[2];
BitMap *ScummRenderTo;
ULONG ScummPaintBuffer;
Index: morphos_scaler.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_scaler.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- morphos_scaler.cpp 23 Sep 2002 16:53:11 -0000 1.3
+++ morphos_scaler.cpp 25 Dec 2002 11:38:21 -0000 1.4
@@ -671,9 +671,9 @@
dst_line[0] = dest+dest_y*2*dest_pitch+dest_x*2*dest_bpp;
dst_line[1] = dst_line[0]+dest_pitch;
- for (int y = 0; y < height; y++)
+ for (uint32 y = 0; y < height; y++)
{
- for (int x = 0; x < width; x++)
+ for (uint32 x = 0; x < width; x++)
{
uint32 B, D, E, F, H;
Index: morphos_scaler.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_scaler.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- morphos_scaler.h 21 Aug 2002 16:07:15 -0000 1.1.1.1
+++ morphos_scaler.h 25 Dec 2002 11:38:21 -0000 1.2
@@ -72,8 +72,8 @@
bool ScummPCMode;
APTR Buffer;
- int BufferWidth;
- int BufferHeight;
+ ULONG BufferWidth;
+ ULONG BufferHeight;
ULONG *ScummColors;
USHORT *ScummColors16;
};
Index: morphos_timer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/backends/morphos/morphos_timer.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- morphos_timer.cpp 1 Nov 2002 23:09:06 -0000 1.5
+++ morphos_timer.cpp 25 Dec 2002 11:38:21 -0000 1.6
@@ -140,7 +140,7 @@
{
TimerServiceMessage *tmsg;
- while (tmsg = (TimerServiceMessage *) GetMsg(port))
+ while ((tmsg = (TimerServiceMessage *) GetMsg(port)))
{
if (tmsg->tsm_Message.mn_Length == sizeof (TimerServiceMessage))
{
More information about the Scummvm-git-logs
mailing list