diff options
Diffstat (limited to 'engines/cge/vga13h.cpp')
-rw-r--r-- | engines/cge/vga13h.cpp | 140 |
1 files changed, 1 insertions, 139 deletions
diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 7e1d8f9962..6e14666bd9 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -212,148 +212,10 @@ Sprite *locate(int ref) { } -Heart::Heart() - : Engine_(TMR_DIV) { +Heart::Heart() { _enable = false; - _xTimer = NULL; } - -/* -extern "C" void TimerProc() { - static SPRITE * spr; - static uint8 run = 0; - - // decrement external timer uint16 - if (_heart->_xTimer) { - if (*_heart->_xTimer) - *_heart->_xTimer--; - else - _heart->_xTimer = NULL; - } - - if (!run && _heart->_enable) { // check overrun flag - static uint16 oldSP, oldSS; - run++; // disable 2nd call until current lasts - asm mov ax,ds - asm mov oldSS,ss - asm mov oldSP,sp - asm mov ss,ax - asm mov sp,0xFF80 - - // system pseudo-sprite - if (Sys) { - if (Sys->Time) { - if (--Sys->Time == 0) - Sys->tick(); - } - } - for (spr = VGA::ShowQ.First(); spr; spr = spr->Next) { - if (spr->Time) { - if (!spr->_flags.Hide) { - if (-- spr->Time == 0) - spr->tick(); - } - } - } - asm mov ss,oldSS - asm mov sp,oldSP - run--; - } -} -*/ - - -void Engine_::newTimer(...) { - /* - static SPRITE *spr; - static uint8 run = 0, cntr1 = TMR_RATE1, cntr2 = TMR_RATE2; - ___1152_Hz___: - - SNDMIDIPlay(); - asm dec cntr1 - asm jz ___72_Hz___ - asm mov al,0x20 // send... - asm out 0x020,al // ...e-o-i - return; - - ___72_Hz___: - - asm mov cntr1,TMR_RATE1 - asm dec cntr2 - asm jnz my_eoi - - ___18_Hz___: - - OldTimer(); - asm mov cntr2,TMR_RATE2 - asm jmp short my_int - - // send E-O-I - my_eoi: - asm mov al,0x20 - asm out 0x020,al - asm sti // enable interrupts - - my_int: //------72Hz-------// - - // decrement external timer uint16 - if (_heart->XTimer) { - if (*_heart->XTimer) - *_heart->XTimer--; - else - _heart->XTimer = NULL; - } - - if (! run && _heart->Enable) { // check overrun flag - static uint16 oldSP, oldSS; - - run++; // disable 2nd call until current lasts - asm mov ax,ds - asm mov oldSS,ss - asm mov oldSP,sp - asm mov ss,ax - asm mov sp,0xFF80 - - // system pseudo-sprite - if (Sys) { - if (Sys->Time) { - if (--Sys->Time == 0) - Sys->tick(); - } - } - - for (spr = VGA::ShowQ.First(); spr; spr = spr->Next) { - if (spr->Time) { - if (!spr->_flags.Hide) { - if (--spr->Time == 0) - spr->tick(); - } - } - } - asm mov ss,oldSS - asm mov sp,oldSP - run--; - } - - */ - warning("STUB: Engine_::NewTimer"); -} - - -void Heart::setXTimer(uint16 *ptr) { - if (_xTimer && ptr != _xTimer) - *_xTimer = 0; - _xTimer = ptr; -} - - -void Heart::setXTimer(uint16 *ptr, uint16 time) { - setXTimer(ptr); - *ptr = time; -} - - Sprite::Sprite(CGEEngine *vm, BMP_PTR *shpP) : _x(0), _y(0), _z(0), _nearPtr(0), _takePtr(0), _next(NULL), _prev(NULL), _seqPtr(NO_SEQ), _time(0), //Delay(0), |