[Scummvm-cvs-logs] CVS: scummvm-new/backends/morphos build.rules,1.1,1.2 morphos_sound.cpp,1.1.1.1,1.2 morphos_timer.cpp,1.1.1.1,1.2 morphos_timer.h,1.1.1.1,1.2
Ruediger Hanke
tomjoad at users.sourceforge.net
Thu Aug 22 03:44:05 CEST 2002
Update of /cvsroot/scummvm/scummvm-new/backends/morphos
In directory usw-pr-cvs1:/tmp/cvs-serv1067/backends/morphos
Modified Files:
build.rules morphos_sound.cpp morphos_timer.cpp
morphos_timer.h
Log Message:
Made MorphOS port use master makefile, few compilation fixes
Index: build.rules
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/backends/morphos/build.rules,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- build.rules 21 Aug 2002 17:35:45 -0000 1.1
+++ build.rules 22 Aug 2002 10:43:50 -0000 1.2
@@ -1,5 +1,11 @@
-CC = g++
+CXX = g++
CFLAGS = -Wno-multichar -fstrength-reduce -fno-rtti -O2
DEFINES = -DNO_PPCINLINE_STDARG -DNO_PPCINLINE_VARARGS
LDFLAGS = -noixemul -s
LIBS = -lamiga -lamigastubs -lcdda
+INCLUDES += -Ibackends/morphos
+MODULES += backends/morphos
+OBJS += backends/morphos/morphos.o backends/morphos/morphos_scaler.o \
+ backends/morphos/morphos_sound.o backends/morphos/morphos_start.o \
+ backends/morphos/morphos_timer.o
+
Index: morphos_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/backends/morphos/morphos_sound.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- morphos_sound.cpp 21 Aug 2002 16:07:15 -0000 1.1.1.1
+++ morphos_sound.cpp 22 Aug 2002 10:43:50 -0000 1.2
@@ -66,7 +66,7 @@
if (ScummMidiRequest)
{
ScummMidiRequest->amr_Version = 2;
- if (OpenDevice("amidi.device", MidiUnit, (IORequest *) ScummMidiRequest, AMIDIF_MIDISERVER))
+ if (OpenDevice("amidi.device", MidiUnit, (IORequest *) ScummMidiRequest, 0))
{
DeleteIORequest((IORequest *) ScummMidiRequest);
DeleteMsgPort(ScummMidiPort);
Index: morphos_timer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/backends/morphos/morphos_timer.cpp,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- morphos_timer.cpp 21 Aug 2002 16:07:15 -0000 1.1.1.1
+++ morphos_timer.cpp 22 Aug 2002 10:43:50 -0000 1.2
@@ -50,6 +50,7 @@
ThreadEmulFunc.StackSize = 16000;
ThreadEmulFunc.Extension = 0;
ThreadEmulFunc.Arg1 = (ULONG) this;
+ ThreadEmulFunc.Arg2 = (ULONG) system;
TimerServiceTags[0].ti_Data = (ULONG) &ThreadEmulFunc;
TimerServiceThread = CreateNewProc(TimerServiceTags);
}
@@ -73,17 +74,17 @@
{
}
-bool Timer::installProcedure(int ((*procedure)(int)), int32 interval)
+bool Timer::installProcedure(TimerProc procedure, int32 interval)
{
return SendMsg(TSM_MSGID_ADDTIMER, procedure, interval);
}
-void Timer::releaseProcedure(int ((*procedure)(int)))
+void Timer::releaseProcedure(TimerProc procedure)
{
SendMsg(TSM_MSGID_REMTIMER, procedure, 0);
}
-bool Timer::SendMsg(ULONG msg_id, int ((*procedure)(int)), LONG interval)
+bool Timer::SendMsg(ULONG msg_id, TimerProc procedure, LONG interval)
{
if (TimerServiceThread == NULL)
return false;
@@ -115,7 +116,7 @@
return true;
}
-void Timer::TimerService(Timer *this_ptr)
+void Timer::TimerService(Timer *this_ptr, Scumm *system)
{
MsgPort *port = &((Process *) FindTask(NULL))->pr_MsgPort;
ULONG port_bit = 1 << port->mp_SigBit;
@@ -215,7 +216,7 @@
timerequest *req = timer_slots[t].ts_IORequest;
WaitIO((IORequest *) req);
interval = timer_slots[t].ts_Interval;
- (*timer_slots[t].ts_Callback)(interval);
+ (*timer_slots[t].ts_Callback)(system);
GetSysTime(&end_callback);
SubTime(&end_callback, &start_callback);
interval -= end_callback.tv_sec*1000+end_callback.tv_micro/1000+40;
Index: morphos_timer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm-new/backends/morphos/morphos_timer.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- morphos_timer.h 21 Aug 2002 16:07:15 -0000 1.1.1.1
+++ morphos_timer.h 22 Aug 2002 10:43:50 -0000 1.2
@@ -44,13 +44,13 @@
class OSystem;
#define TSM_MSGID_ADDTIMER 0
-#define TSM_MSGID_REMTIMER 1
+#define TSM_MSGID_REMTIMER 1
struct TimerServiceMessage
{
Message tsm_Message;
ULONG tsm_MsgID;
- int ((*tsm_Callback)(int));
+ TimerProc tsm_Callback;
LONG tsm_Interval;
};
@@ -62,12 +62,12 @@
bool init();
void release();
- bool installProcedure(int ((*procedure)(int)), int32 interval);
- void releaseProcedure(int ((*procedure)(int)));
+ bool installProcedure(TimerProc procedure, int32 interval);
+ void releaseProcedure(TimerProc procedure);
protected:
- bool SendMsg(ULONG MsgID, int ((*procedure)(int)), LONG interval);
- static void TimerService(Timer *);
+ bool SendMsg(ULONG MsgID, TimerProc procedure, LONG interval);
+ static void TimerService(Timer *, Scumm *);
Process *TimerServiceThread;
SignalSemaphore TimerServiceSemaphore;
@@ -77,7 +77,7 @@
MsgPort *ts_Port;
timerequest *ts_IORequest;
ULONG ts_SignalBit;
- int ((*ts_Callback)(int));
+ TimerProc ts_Callback;
LONG ts_Interval;
};
};
More information about the Scummvm-git-logs
mailing list