[Scummvm-cvs-logs] CVS: scummvm/morphos Makefile,1.1,1.2 morphos.cpp,1.4,1.5 morphos_sound.cpp,1.3,1.4
Ruediger Hanke
tomjoad at users.sourceforge.net
Wed Apr 10 13:52:08 CEST 2002
Update of /cvsroot/scummvm/scummvm/morphos
In directory usw-pr-cvs1:/tmp/cvs-serv6999/morphos
Modified Files:
Makefile morphos.cpp morphos_sound.cpp
Log Message:
MorphOS version adapted to v0.2.0
Index: Makefile
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/Makefile,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Makefile 4 Apr 2002 12:54:27 -0000 1.1
--- Makefile 10 Apr 2002 20:48:27 -0000 1.2
***************
*** 1,3 ****
! vpath %.cpp ../:../sound/
CC = g++
--- 1,3 ----
! vpath %.cpp ../:../sound/:../v3/:../v4/
CC = g++
***************
*** 15,19 ****
saveload.o script.o scummvm.o sound.o string.o \
sys.o verbs.o morphos.o morphos_sound.o script_v1.o script_v2.o debug.o gui.o \
! imuse.o fmopl.o adlib.o gmidi.o debugrl.o vars.o insane.o
DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \
--- 15,20 ----
saveload.o script.o scummvm.o sound.o string.o \
sys.o verbs.o morphos.o morphos_sound.o script_v1.o script_v2.o debug.o gui.o \
! imuse.o fmopl.o adlib.o gmidi.o debugrl.o vars.o insane.o \
! gameDetector.o init.o resource_v3.o resource_v4.o
DISTFILES=$(OBJS:.o=.cpp) Makefile scumm.h scummsys.h stdafx.h stdafx.cpp \
Index: morphos.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** morphos.cpp 10 Apr 2002 16:45:00 -0000 1.4
--- morphos.cpp 10 Apr 2002 20:48:27 -0000 1.5
***************
*** 27,31 ****
#include "scumm.h"
#include "gui.h"
! #include "sound.h"
#include <exec/types.h>
--- 27,31 ----
#include "scumm.h"
#include "gui.h"
! #include "gameDetector.h"
#include <exec/types.h>
***************
*** 59,65 ****
extern "C" struct WBStartup *_WBenchMsg;
! Scumm scumm;
ScummDebugger debugger;
Gui gui;
SoundEngine sound;
--- 59,67 ----
extern "C" struct WBStartup *_WBenchMsg;
! Scumm *scumm = NULL;
ScummDebugger debugger;
Gui gui;
+ OSystem _system;
+ GameDetector detector;
SoundEngine sound;
***************
*** 199,205 ****
static ULONG cd_stop_time = 0;
! void cd_play( int track, int num_loops, int start_frame, int length )
{
! scumm._vars[14] = 0;
if( CDrive && start_frame >= 0 )
{
--- 201,207 ----
static ULONG cd_stop_time = 0;
! void cd_play( Scumm *s, int track, int num_loops, int start_frame, int length )
{
! scumm->_vars[14] = 0;
if( CDrive && start_frame >= 0 )
{
***************
*** 1591,1597 ****
memset( ScummColors, 0, 256*sizeof( ULONG ) );
! char *gameName;
! sprintf( ScummWndTitle, "ScummVM MorphOS - %s", gameName = s->getGameName());
! free( gameName );
createScreen( args[ USG_WBWINDOW ] ? CSDSPTYPE_WINDOWED : CSDSPTYPE_FULLSCREEN );
--- 1593,1597 ----
memset( ScummColors, 0, 256*sizeof( ULONG ) );
! sprintf( ScummWndTitle, "ScummVM MorphOS - %s", s->_gameText);
createScreen( args[ USG_WBWINDOW ] ? CSDSPTYPE_WINDOWED : CSDSPTYPE_FULLSCREEN );
***************
*** 1859,1870 ****
}
- scumm._gui = &gui;
- sound.initialize( &scumm, &snd_driv );
char *argvfake[] = { "ScummVM", (char *)ScummStory, "-e5", (char *)ScummPath };
! scumm.scummMain( ScummPath ? 4 : 3, argvfake);
- /* Fix up argument flags */
- if( args[ USG_NOSUBTITLES ] )
- scumm._noSubtitles = true;
if( args[ USG_VOLUME ] )
{
--- 1859,1892 ----
}
char *argvfake[] = { "ScummVM", (char *)ScummStory, "-e5", (char *)ScummPath };
! if( detector.detectMain( ScummPath ? 4 : 3, argvfake ) )
! exit( 1 );
!
! if( detector._features & GF_OLD256 )
! scumm = new Scumm_v3;
! else if( detector._features & GF_SMALL_HEADER ) // this force loomCD as v4
! scumm = new Scumm_v4;
! else if( detector._features & GF_AFTER_V7 )
! scumm = new Scumm_v7;
! else if( detector._features & GF_AFTER_V6 ) // this force SamnmaxCD as v6
! scumm = new Scumm_v6;
! else
! scumm = new Scumm_v5;
!
! scumm->_fullScreen = detector._fullScreen;
! scumm->_debugMode = detector._debugMode;
! scumm->_bootParam = detector._bootParam;
! scumm->_scale = detector._scale;
! scumm->_gameDataPath = detector._gameDataPath;
! scumm->_gameTempo = detector._gameTempo;
! scumm->_soundEngine = detector._soundEngine;
! scumm->_videoMode = detector._videoMode;
! scumm->_exe_name = detector._exe_name;
! scumm->_gameId = detector._gameId;
! scumm->_gameText = detector._gameText;
! scumm->_features = detector._features;
! scumm->_soundCardType = detector._soundCardType;
! scumm->_noSubtitles = args[ USG_NOSUBTITLES ] != FALSE;
if( args[ USG_VOLUME ] )
{
***************
*** 1874,1901 ****
}
if( args[ USG_TEMPO ] )
! scumm._gameTempo = *(LONG *)args[ USG_TEMPO ];
! gui.init(&scumm);
! last_time = GetTicks();
! delta = 0;
do
{
! updateScreen( &scumm );
!
new_time = GetTicks();
! waitForTimer( &scumm, delta * 15 + last_time - new_time );
last_time = GetTicks();
-
if( gui._active )
{
! gui.loop();
delta = 5;
}
! else
! delta = scumm.scummLoop( delta );
! } while( 1 );
! return 0;
}
--- 1896,1941 ----
}
if( args[ USG_TEMPO ] )
! scumm->_gameTempo = *(LONG *)args[ USG_TEMPO ];
! scumm->delta=6;
! scumm->_gui = &gui;
! sound.initialize(scumm, &snd_driv);
!
! scumm->delta=0;
! scumm->_system = &_system;
!
! _system.last_time=0;
!
! scumm->launch();
!
! gui.init(scumm); /* Reinit GUI after loading a game */
! scumm->mainRun();
!
! return 0;
! }
!
! int OSystem::waitTick(int delta)
! {
do
{
! updateScreen( scumm );
new_time = GetTicks();
! waitForTimer( scumm, delta * 15 + last_time - new_time );
last_time = GetTicks();
if( gui._active )
{
! gui.loop( scumm );
delta = 5;
}
! }
! while( gui._active );
! return( delta );
! }
!
! OSystem::OSystem()
! {
! last_time = GetTicks();
}
Index: morphos_sound.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/morphos/morphos_sound.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** morphos_sound.cpp 6 Apr 2002 15:57:34 -0000 1.3
--- morphos_sound.cpp 10 Apr 2002 20:48:27 -0000 1.4
***************
*** 26,30 ****
#include "stdafx.h"
#include "scumm.h"
- #include "sound.h"
#include <dos/dos.h>
--- 26,29 ----
***************
*** 211,215 ****
--- 210,221 ----
{
if( CheckSignal( SIGBREAKF_CTRL_F ) )
+ {
+ if( ahiReqSent[ ahiCurBuf ] )
+ {
+ AbortIO( (struct IORequest *)ahiReq[ ahiCurBuf ] );
+ WaitIO ( (struct IORequest *)ahiReq[ ahiCurBuf ] );
+ }
break;
+ }
if( !snd_driv.wave_based() )
***************
*** 242,249 ****
if( ahiReqSent[ ahiCurBuf ] )
- {
WaitIO( (struct IORequest *)req );
- ahiReqSent[ ahiCurBuf ] = FALSE;
- }
if( CheckSignal( SIGBREAKF_CTRL_F ) )
--- 248,252 ----
***************
*** 267,276 ****
}
}
- }
-
- if( ahiReqSent[ ahiCurBuf ] )
- {
- AbortIO( (struct IORequest *)ahiReq[ ahiCurBuf ] );
- WaitIO ( (struct IORequest *)ahiReq[ ahiCurBuf ] );
}
--- 270,273 ----
More information about the Scummvm-git-logs
mailing list