diff options
author | Strangerke | 2016-11-09 13:40:08 -0800 |
---|---|---|
committer | Eugene Sandulenko | 2017-01-25 22:42:04 +0100 |
commit | 6704ceebf21428023a9617368b58cd6b60ec366f (patch) | |
tree | f101c4ac9663ea90ca13a8b04b8d5389932d0754 /engines/cryo/cryolib.cpp | |
parent | 4cbea869225e2605df460efc6c19b50dd7513c79 (diff) | |
download | scummvm-rg350-6704ceebf21428023a9617368b58cd6b60ec366f.tar.gz scummvm-rg350-6704ceebf21428023a9617368b58cd6b60ec366f.tar.bz2 scummvm-rg350-6704ceebf21428023a9617368b58cd6b60ec366f.zip |
CRYO: remove some CryoLib functions, simplify some code
Also, reduce the use of g_ed
Diffstat (limited to 'engines/cryo/cryolib.cpp')
-rw-r--r-- | engines/cryo/cryolib.cpp | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/engines/cryo/cryolib.cpp b/engines/cryo/cryolib.cpp index 8b5eaf6252..b6a92f243a 100644 --- a/engines/cryo/cryolib.cpp +++ b/engines/cryo/cryolib.cpp @@ -115,13 +115,6 @@ void CLView_CenterIn(View *parent, View *child) { ///// CLScreenView View ScreenView; -void CLScreenView_Init() { - // ScreenView is the game's target screen (a pc display) - // we use a dedicated surface for it, which at some point will be - // presented to user by System::copyRectToScreen call - CLView_InitDatas(&ScreenView, g_ed->_screen.w, g_ed->_screen.h, g_ed->_screen.getPixels()); -} - void CLScreenView_CenterIn(View *view) { CLView_CenterIn(&ScreenView, view); } @@ -374,27 +367,11 @@ void CLFile_MakeStruct(int a3, int a4, const char *name, filespec_t *fs) { fs->create = 0; } -void CLFile_Create(filespec_t *fs) { - fs->create = 1; -} - -void CLFile_Open(filespec_t *fs, int16 mode, file_t &handle) { - handle.open(fs->name); -} - -void CLFile_Close(file_t &handle) { - handle.close(); -} - void CLFile_SetPosition(file_t &handle, int16 mode, int32 pos) { assert(mode == 1); handle.seek(pos, 0); } -void CLFile_Read(file_t &handle, void *buffer, int32 *size) { - handle.read(buffer, *size); -} - void CLFile_Write(file_t &handle, void *buffer, int32 *size) { assert(0); } @@ -438,7 +415,7 @@ void CLSoundChannel_Free(soundchannel_t *ch) { } void CLSoundChannel_Stop(soundchannel_t *ch) { - // g_ed->_mixer->stopHandle(ch->ch); + // _vm->_mixer->stopHandle(ch->ch); } void CLSoundChannel_Play(soundchannel_t *ch, sound_t *sound) { @@ -474,22 +451,14 @@ void CLTimer_Action(void *arg) { TimerTicks++; } -void CLTimer_Init() { - g_system->getTimerManager()->installTimerProc(CLTimer_Action, 10000, nullptr, "100hz timer"); -} - -void CLTimer_Done() { - g_system->getTimerManager()->removeTimerProc(CLTimer_Action); -} - ///// CRYOLib void CRYOLib_ManagersInit() { - CLTimer_Init(); - CLScreenView_Init(); + g_system->getTimerManager()->installTimerProc(CLTimer_Action, 10000, nullptr, "100hz timer"); + CLView_InitDatas(&ScreenView, g_ed->_screen.w, g_ed->_screen.h, g_ed->_screen.getPixels()); } void CRYOLib_ManagersDone() { - CLTimer_Done(); + g_system->getTimerManager()->removeTimerProc(CLTimer_Action); } ///// CLDesktop |