[Scummvm-cvs-logs] CVS: scummvm/simon simon.cpp,1.47,1.48 simon.h,1.26,1.27
Max Horn
fingolfin at users.sourceforge.net
Sun Aug 18 10:49:02 CEST 2002
Update of /cvsroot/scummvm/scummvm/simon
In directory usw-pr-cvs1:/tmp/cvs-serv19809/simon
Modified Files:
simon.cpp simon.h
Log Message:
MAJOR change to the way how Engine objects are instantiated
Index: simon.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.cpp,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- simon.cpp 18 Aug 2002 16:21:08 -0000 1.47
+++ simon.cpp 18 Aug 2002 17:48:18 -0000 1.48
@@ -22,7 +22,9 @@
#include "stdafx.h"
#include "simon.h"
#include "simonintern.h"
+#include "gameDetector.h"
#include <errno.h>
+#include <time.h>
#ifdef _WIN32_WCE
@@ -109,13 +111,23 @@
};
-SimonState::SimonState()
+SimonState::SimonState(GameDetector *detector, OSystem *syst)
+ : Engine(detector, syst)
{
+ MidiDriver *driver = detector->createMidi();
+
_dummy_item_1 = new Item();
_dummy_item_2 = new Item();
_dummy_item_3 = new Item();
_fcs_list = new FillOrCopyStruct[16];
+
+ /* Setup midi driver */
+ midi.set_driver(driver);
+
+ _game = detector->_gameId;
+ set_volume(detector->_sfx_volume);
+ _game_path = detector->_gameDataPath;
}
SimonState::~SimonState()
@@ -127,14 +139,9 @@
delete [] _fcs_list;
}
-SimonState *SimonState::create(OSystem *syst, MidiDriver *driver)
+SimonState *SimonState::createFromDetector(GameDetector *detector, OSystem *syst)
{
- SimonState *s = new SimonState;
-
- s->_system = syst;
-
- /* Setup midi driver */
- s->midi.set_driver(driver);
+ SimonState *s = new SimonState(detector, syst);
/* Setup mixer */
if (!s->_mixer->bind_to_system(syst))
Index: simon.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/simon.h,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- simon.h 18 Aug 2002 16:21:08 -0000 1.26
+++ simon.h 18 Aug 2002 17:48:18 -0000 1.27
@@ -22,10 +22,10 @@
#ifndef SIMON_H
#define SIMON_H
-#include <time.h>
-#include <sys/stat.h>
+#include <stdio.h>
#include "engine.h"
#include "simon/midi.h"
+#include "sound/mixer.h"
/* Various other settings */
//#define DUMP_CONTINOUS_MAINSCRIPT
@@ -356,7 +356,7 @@
byte *_sdl_buf;
byte *_sdl_buf_attached;
- SimonState();
+ SimonState(GameDetector *detector, OSystem *syst);
virtual ~SimonState();
int allocGamePcVars(FILE *in);
@@ -795,7 +795,7 @@
void vc_kill_thread(uint file, uint sprite);
- static SimonState *create(OSystem *syst, MidiDriver *driver);
+ static SimonState *createFromDetector(GameDetector *detector, OSystem *syst);
void set_dummy_cursor();
@@ -820,13 +820,6 @@
void NORETURN CDECL error(const char *errmsg, ...);
void CDECL warning(const char *errmsg, ...);
-void _2xSaI(uint8 *srcPtr, uint32 srcPitch, uint8 *deltaPtr, uint8 *dstPtr, uint32 dstPitch,
- int width, int height);
-int Init_2xSaI(uint32 BitFormat);
-void Super2xSaI(uint8 *srcPtr, uint32 srcPitch,
- uint8 *deltaPtr, uint8 *dstPtr, uint32 dstPitch, int width, int height);
-void initializeHardware();
-void dx_set_palette(uint32 *colors, uint num);
void palette_fadeout(uint32 *pal_values, uint num);
#endif
More information about the Scummvm-git-logs
mailing list