diff options
author | Travis Howell | 2006-04-10 23:44:17 +0000 |
---|---|---|
committer | Travis Howell | 2006-04-10 23:44:17 +0000 |
commit | 8ae793c81e505c5b839ca47ac1dcbd3c31c06b08 (patch) | |
tree | 243806cf1e684670cc320128b5ab52042f769703 /engines | |
parent | badb5218fa3989e12e1f383ed7c510102626a8ec (diff) | |
download | scummvm-rg350-8ae793c81e505c5b839ca47ac1dcbd3c31c06b08.tar.gz scummvm-rg350-8ae793c81e505c5b839ca47ac1dcbd3c31c06b08.tar.bz2 scummvm-rg350-8ae793c81e505c5b839ca47ac1dcbd3c31c06b08.zip |
Cleanup
svn-id: r21773
Diffstat (limited to 'engines')
-rw-r--r-- | engines/simon/simon.cpp | 126 | ||||
-rw-r--r-- | engines/simon/simon.h | 26 | ||||
-rw-r--r-- | engines/simon/vga.cpp | 58 |
3 files changed, 106 insertions, 104 deletions
diff --git a/engines/simon/simon.cpp b/engines/simon/simon.cpp index ef7838b33c..353f662270 100644 --- a/engines/simon/simon.cpp +++ b/engines/simon/simon.cpp @@ -330,11 +330,11 @@ SimonEngine::SimonEngine(OSystem *syst) _scrollUpHitArea = 0; _scrollDownHitArea = 0; - _videoVar7 = 0xFFFF; + _noOverWrite = 0xFFFF; _paletteColorCount = 0; - _videoVar4 = 0; - _videoVar5 = 0; + _rejectCount = 0; + _rejectBlock = 0; _fastFadeOutFlag = 0; _unkPalFlag = 0; _exitCutscene = 0; @@ -367,9 +367,9 @@ SimonEngine::SimonEngine(OSystem *syst) _frameRate = 1; - _vgaCurFile2 = 0; + _zoneNumber = 0; _vgaWaitFor = 0; - _vgaCurFileId = 0; + _vgaCurZoneNum = 0; _vgaCurSpriteId = 0; _vgaCurSpritePriority = 0; @@ -2140,29 +2140,29 @@ void SimonEngine::loadZone(uint vga_res) { vpe->sfxFile = read_vga_from_datfile_2(vga_res * 2, 3); } -byte *SimonEngine::setup_vga_destination(uint32 size) { - byte *dest, *end; +byte *SimonEngine::allocBlock(uint32 size) { + byte *block, *blockEnd; - _videoVar4 = 0; + _rejectCount = 0; for (;;) { - dest = _vgaBufFreeStart; + block = _vgaBufFreeStart; - end = dest + size; + blockEnd = block + size; - if (end >= _vgaBufEnd) { + if (blockEnd >= _vgaBufEnd) { _vgaBufFreeStart = _vgaBufStart; } else { - _videoVar5 = false; - vga_buf_unk_proc3(end); - if (_videoVar5) + _rejectBlock = false; + checkNoOverWrite(blockEnd); + if (_rejectBlock) continue; - vga_buf_unk_proc1(end); - if (_videoVar5) + checkRunningAnims(blockEnd); + if (_rejectBlock) continue; - delete_memptr_range(end); - _vgaBufFreeStart = end; - return dest; + checkZonePtrs(blockEnd); + _vgaBufFreeStart = blockEnd; + return block; } } } @@ -2179,40 +2179,40 @@ void SimonEngine::setup_vga_file_buf_pointers() { _vgaBufEnd = alloced + VGA_MEM_SIZE; } -void SimonEngine::vga_buf_unk_proc3(byte *end) { +void SimonEngine::checkNoOverWrite(byte *end) { VgaPointersEntry *vpe; - if (_videoVar7 == 0xFFFF) + if (_noOverWrite == 0xFFFF) return; - if (_videoVar4 == 2) - error("vga_buf_unk_proc3: _videoVar4 == 2"); + if (_rejectCount == 2) + error("checkNoOverWrite: _rejectCount == 2"); - vpe = &_vgaBufferPointers[_videoVar7]; + vpe = &_vgaBufferPointers[_noOverWrite]; if (_vgaBufFreeStart <= vpe->vgaFile1 && end >= vpe->vgaFile1 || _vgaBufFreeStart <= vpe->vgaFile2 && end >= vpe->vgaFile2) { - _videoVar5 = 1; - _videoVar4++; + _rejectBlock = 1; + _rejectCount++; _vgaBufFreeStart = vpe->vgaFile1 + 0x5000; } else { - _videoVar5 = 0; + _rejectBlock = 0; } } -void SimonEngine::vga_buf_unk_proc1(byte *end) { +void SimonEngine::checkRunningAnims(byte *end) { VgaSprite *vsp; if (_lockWord & 0x20) return; for (vsp = _vgaSprites; vsp->id; vsp++) { - vga_buf_unk_proc2(vsp->fileId, end); - if (_videoVar5 == true) + checkAnims(vsp->zoneNum, end); + if (_rejectBlock == true) return; } } -void SimonEngine::delete_memptr_range(byte *end) { +void SimonEngine::checkZonePtrs(byte *end) { uint count = ARRAYSIZE(_vgaBufferPointers); VgaPointersEntry *vpe = _vgaBufferPointers; do { @@ -2226,18 +2226,18 @@ void SimonEngine::delete_memptr_range(byte *end) { } while (++vpe, --count); } -void SimonEngine::vga_buf_unk_proc2(uint a, byte *end) { +void SimonEngine::checkAnims(uint a, byte *end) { VgaPointersEntry *vpe; vpe = &_vgaBufferPointers[a]; if (_vgaBufFreeStart <= vpe->vgaFile1 && end >= vpe->vgaFile1 || _vgaBufFreeStart <= vpe->vgaFile2 && end >= vpe->vgaFile2) { - _videoVar5 = true; - _videoVar4++; + _rejectBlock = true; + _rejectCount++; _vgaBufFreeStart = vpe->vgaFile1 + 0x5000; } else { - _videoVar5 = false; + _rejectBlock = false; } } @@ -2254,13 +2254,13 @@ void SimonEngine::set_video_mode_internal(uint mode, uint vga_res_id) { if (vga_res_id == 0) { if (getGameType() == GType_SIMON1) { _unkPalFlag = true; - } else { + } else if (getGameType() == GType_SIMON2) { _dxUse3Or4ForLock = true; _restoreWindow6 = true; } } - _vgaCurFile2 = num = vga_res_id / 100; + _zoneNumber = num = vga_res_id / 100; for (;;) { vpe = &_vgaBufferPointers[num]; @@ -2410,7 +2410,7 @@ void SimonEngine::expire_vga_timers() { while (vte->delay) { if (!--vte->delay) { uint16 cur_file = vte->cur_vga_file; - uint16 cur_unk = vte->sprite_id; + uint16 cur_sprite = vte->sprite_id; const byte *script_ptr = vte->script_pointer; _nextVgaTimerToProcess = vte + 1; @@ -2420,7 +2420,7 @@ void SimonEngine::expire_vga_timers() { // special scroll timer scroll_timeout(); } else { - vcResumeSprite(script_ptr, cur_file, cur_unk); + vcResumeSprite(script_ptr, cur_file, cur_sprite); } vte = _nextVgaTimerToProcess; } else { @@ -2470,8 +2470,8 @@ void SimonEngine::vcResumeSprite(const byte *code_ptr, uint16 cur_file, uint16 c _vgaCurSpriteId = cur_sprite; - _vgaCurFileId = cur_file; - _vgaCurFile2 = cur_file; + _vgaCurZoneNum = cur_file; + _zoneNumber = cur_file; vpe = &_vgaBufferPointers[cur_file]; _curVgaFile1 = vpe->vgaFile1; @@ -2588,7 +2588,7 @@ void SimonEngine::timer_vga_sprites() { while (vsp->id != 0) { vsp->windowNum &= 0x7FFF; - vpe = &_vgaBufferPointers[vsp->fileId]; + vpe = &_vgaBufferPointers[vsp->zoneNum]; _curVgaFile1 = vpe->vgaFile1; _curVgaFile2 = vpe->vgaFile2; _curSfxFile = vpe->sfxFile; @@ -2688,7 +2688,7 @@ void SimonEngine::timer_vga_sprites_2() { while (vsp->id != 0) { vsp->windowNum &= 0x7FFF; - vpe = &_vgaBufferPointers[vsp->fileId]; + vpe = &_vgaBufferPointers[vsp->zoneNum]; _curVgaFile1 = vpe->vgaFile1; _curVgaFile2 = vpe->vgaFile2; _curSfxFile = vpe->sfxFile; @@ -2961,7 +2961,7 @@ VgaSprite *SimonEngine::findCurSprite() { if (vsp->id == _vgaCurSpriteId) break; } else { - if (vsp->id == _vgaCurSpriteId && vsp->fileId == _vgaCurFileId) + if (vsp->id == _vgaCurSpriteId && vsp->zoneNum == _vgaCurZoneNum) break; } vsp++; @@ -2969,14 +2969,14 @@ VgaSprite *SimonEngine::findCurSprite() { return vsp; } -bool SimonEngine::isSpriteLoaded(uint16 id, uint16 fileId) { +bool SimonEngine::isSpriteLoaded(uint16 id, uint16 zoneNum) { VgaSprite *vsp = _vgaSprites; while (vsp->id) { if (getGameType() == GType_SIMON1) { if (vsp->id == id) return true; } else { - if (vsp->id == id && vsp->fileId == fileId) + if (vsp->id == id && vsp->zoneNum == zoneNum) return true; } vsp++; @@ -3017,6 +3017,10 @@ void SimonEngine::processSpecialKeys() { if (getGameType() == GType_SIMON2 || getGameType() == GType_FF) _exitCutscene = true; break; + case 65: // F7 + if (getGameType() == GType_FF && getBitFlag(76)) + _variableArray[254] = 70; + break; case 'p': pause(); break; @@ -3136,7 +3140,7 @@ void SimonEngine::resetWindow(WindowBlock *window) { window->mode = 0; } -void SimonEngine::loadSprite(uint windowNum, uint fileId, uint vgaSpriteId, uint x, uint y, uint palette) { +void SimonEngine::loadSprite(uint windowNum, uint zoneNum, uint vgaSpriteId, uint x, uint y, uint palette) { VgaSprite *vsp; VgaPointersEntry *vpe; byte *p, *pp; @@ -3144,7 +3148,7 @@ void SimonEngine::loadSprite(uint windowNum, uint fileId, uint vgaSpriteId, uint _lockWord |= 0x40; - if (isSpriteLoaded(vgaSpriteId, fileId)) { + if (isSpriteLoaded(vgaSpriteId, zoneNum)) { _lockWord &= ~0x40; return; } @@ -3163,18 +3167,18 @@ void SimonEngine::loadSprite(uint windowNum, uint fileId, uint vgaSpriteId, uint vsp->palette = palette; vsp->id = vgaSpriteId; if (getGameType() == GType_SIMON1) - vsp->fileId = fileId = vgaSpriteId / 100; + vsp->zoneNum = zoneNum = vgaSpriteId / 100; else - vsp->fileId = fileId; + vsp->zoneNum = zoneNum; for (;;) { - vpe = &_vgaBufferPointers[fileId]; - _vgaCurFile2 = fileId; + vpe = &_vgaBufferPointers[zoneNum]; + _zoneNumber = zoneNum; _curVgaFile1 = vpe->vgaFile1; if (vpe->vgaFile1 != NULL) break; - loadZone(fileId); + loadZone(zoneNum); } pp = _curVgaFile1; @@ -3192,18 +3196,18 @@ void SimonEngine::loadSprite(uint windowNum, uint fileId, uint vgaSpriteId, uint if (getGameType() == GType_FF) { if (READ_LE_UINT16(&((AnimationHeader_Feeble *) p)->id) == vgaSpriteId) { if (_startVgaScript) - dump_vga_script(pp + READ_LE_UINT16(&((AnimationHeader_Feeble*)p)->scriptOffs), fileId, vgaSpriteId); + dump_vga_script(pp + READ_LE_UINT16(&((AnimationHeader_Feeble*)p)->scriptOffs), zoneNum, vgaSpriteId); - add_vga_timer(VGA_DELAY_BASE, pp + READ_LE_UINT16(&((AnimationHeader_Feeble *) p)->scriptOffs), vgaSpriteId, fileId); + add_vga_timer(VGA_DELAY_BASE, pp + READ_LE_UINT16(&((AnimationHeader_Feeble *) p)->scriptOffs), vgaSpriteId, zoneNum); break; } p += sizeof(AnimationHeader_Feeble); } else { if (READ_BE_UINT16(&((AnimationHeader_Simon *) p)->id) == vgaSpriteId) { if (_startVgaScript) - dump_vga_script(pp + READ_BE_UINT16(&((AnimationHeader_Simon*)p)->scriptOffs), fileId, vgaSpriteId); + dump_vga_script(pp + READ_BE_UINT16(&((AnimationHeader_Simon*)p)->scriptOffs), zoneNum, vgaSpriteId); - add_vga_timer(VGA_DELAY_BASE, pp + READ_BE_UINT16(&((AnimationHeader_Simon *) p)->scriptOffs), vgaSpriteId, fileId); + add_vga_timer(VGA_DELAY_BASE, pp + READ_BE_UINT16(&((AnimationHeader_Simon *) p)->scriptOffs), vgaSpriteId, zoneNum); break; } p += sizeof(AnimationHeader_Simon); @@ -3457,7 +3461,7 @@ byte *SimonEngine::read_vga_from_datfile_2(uint id, uint type) { if (in.isOpen() == false) error("read_vga_from_datfile_2: can't open %s", buf); - dst = setup_vga_destination(dstSize); + dst = allocBlock(dstSize); in.seek(offset, SEEK_SET); if (srcSize != dstSize) { @@ -3509,11 +3513,11 @@ byte *SimonEngine::read_vga_from_datfile_2(uint id, uint type) { byte *buffer = new byte[size]; if (in.read(buffer, size) != size) error("read_vga_from_datfile_2: read failed"); - dst = setup_vga_destination (READ_BE_UINT32(buffer + size - 4) + extraBuffer); + dst = allocBlock (READ_BE_UINT32(buffer + size - 4) + extraBuffer); decrunchFile(buffer, dst, size); delete[] buffer; } else { - dst = setup_vga_destination(size + extraBuffer); + dst = allocBlock(size + extraBuffer); if (in.read(dst, size) != size) error("read_vga_from_datfile_2: read failed"); } @@ -3525,7 +3529,7 @@ byte *SimonEngine::read_vga_from_datfile_2(uint id, uint type) { uint32 size = _gameOffsetsPtr[id + 1] - offs_a; byte *dst; - dst = setup_vga_destination(size + extraBuffer); + dst = allocBlock(size + extraBuffer); resfile_read(dst, offs_a, size); return dst; diff --git a/engines/simon/simon.h b/engines/simon/simon.h index fc051f11f8..81cc400a63 100644 --- a/engines/simon/simon.h +++ b/engines/simon/simon.h @@ -89,7 +89,7 @@ struct VgaSprite { uint16 x, y; /* actually signed numbers */ uint16 flags; uint16 priority; - uint16 windowNum, fileId; + uint16 windowNum, zoneNum; VgaSprite() { memset(this, 0, sizeof(*this)); } }; @@ -329,13 +329,13 @@ protected: uint16 _scrollUpHitArea; uint16 _scrollDownHitArea; - uint16 _videoVar7; + uint16 _noOverWrite; volatile uint16 _paletteColorCount; int _screenWidth, _screenHeight; - byte _videoVar4; - bool _videoVar5; + byte _rejectCount; + bool _rejectBlock; bool _fastFadeOutFlag; bool _unkPalFlag; bool _exitCutscene; @@ -363,8 +363,8 @@ protected: uint16 _frameRate; - uint16 _vgaCurFile2; - uint16 _vgaWaitFor, _vgaCurFileId; + uint16 _zoneNumber; + uint16 _vgaWaitFor, _vgaCurZoneNum; uint16 _vgaCurSpriteId; uint16 _vgaCurSpritePriority; @@ -418,7 +418,7 @@ protected: byte _videoBuf1[3000]; - VgaTimerEntry _vgaTimerList[95]; + VgaTimerEntry _vgaTimerList[900]; WindowBlock *_windowList; @@ -692,11 +692,11 @@ protected: void renderStringAmiga(uint vga_sprite_id, uint color, uint width, uint height, const char *txt); void renderString(uint vga_sprite_id, uint color, uint width, uint height, const char *txt); - byte *setup_vga_destination(uint32 size); - void vga_buf_unk_proc3(byte *end); - void vga_buf_unk_proc1(byte *end); - void vga_buf_unk_proc2(uint a, byte *end); - void delete_memptr_range(byte *end); + byte *allocBlock(uint32 size); + void checkNoOverWrite(byte *end); + void checkRunningAnims(byte *end); + void checkAnims(uint a, byte *end); + void checkZonePtrs(byte *end); void setup_vga_file_buf_pointers(); @@ -1013,7 +1013,7 @@ protected: void expire_vga_timers(); - bool isSpriteLoaded(uint16 id, uint16 fileId); + bool isSpriteLoaded(uint16 id, uint16 zoneNum); void resetWindow(WindowBlock *window); void delete_hitarea_by_index(uint index); diff --git a/engines/simon/vga.cpp b/engines/simon/vga.cpp index b30b306c28..87792eb57f 100644 --- a/engines/simon/vga.cpp +++ b/engines/simon/vga.cpp @@ -130,7 +130,7 @@ void SimonEngine::run_vga_script() { if (_continousVgaScript) { if (_vcPtr != (const byte *)&_vc_get_out_of_code) { - fprintf(_dumpFile, "%.5d %.5X: %5d %4d ", _vgaTickCounter, _vcPtr - _curVgaFile1, _vgaCurSpriteId, _vgaCurFileId); + fprintf(_dumpFile, "%.5d %.5X: %5d %4d ", _vgaTickCounter, _vcPtr - _curVgaFile1, _vgaCurSpriteId, _vgaCurZoneNum); dump_video_script(_vcPtr, true); } } @@ -251,11 +251,11 @@ void SimonEngine::vc2_call() { _curVgaFile2 = vpe->vgaFile2; if (vpe->vgaFile1 != NULL) break; - if (_vgaCurFile2 != res) - _videoVar7 = _vgaCurFile2; + if (_zoneNumber != res) + _noOverWrite = _zoneNumber; loadZone(res); - _videoVar7 = 0xFFFF; + _noOverWrite = 0xFFFF; } @@ -292,7 +292,7 @@ void SimonEngine::vc2_call() { } void SimonEngine::vc3_loadSprite() { - uint16 windowNum, fileId, palette, x, y, vgaSpriteId; + uint16 windowNum, zoneNum, palette, x, y, vgaSpriteId; uint16 res; VgaSprite *vsp; VgaPointersEntry *vpe; @@ -303,9 +303,9 @@ void SimonEngine::vc3_loadSprite() { if (getGameType() == GType_SIMON1) { vgaSpriteId = vcReadNextWord(); /* 2 */ - fileId = vgaSpriteId / 100; + zoneNum = vgaSpriteId / 100; } else { - fileId = vcReadNextWord(); /* 0 */ + zoneNum = vcReadNextWord(); /* 0 */ vgaSpriteId = vcReadNextWord(); /* 2 */ } @@ -314,7 +314,7 @@ void SimonEngine::vc3_loadSprite() { palette = vcReadNextWord(); /* 8 */ /* 2nd param ignored with simon1 */ - if (isSpriteLoaded(vgaSpriteId, fileId)) + if (isSpriteLoaded(vgaSpriteId, zoneNum)) return; vsp = _vgaSprites; @@ -329,7 +329,7 @@ void SimonEngine::vc3_loadSprite() { vsp->x = x; vsp->y = y; vsp->id = vgaSpriteId; - vsp->fileId = res = fileId; + vsp->zoneNum = res = zoneNum; old_file_1 = _curVgaFile1; for (;;) { @@ -338,11 +338,11 @@ void SimonEngine::vc3_loadSprite() { if (vpe->vgaFile1 != NULL) break; - if (_vgaCurFile2 != res) - _videoVar7 = _vgaCurFile2; + if (_zoneNumber != res) + _noOverWrite = _zoneNumber; loadZone(res); - _videoVar7 = 0xFFFF; + _noOverWrite = 0xFFFF; } pp = _curVgaFile1; @@ -723,7 +723,7 @@ void SimonEngine::vc10_draw() { return; if (_dumpImages) - dump_single_bitmap(_vgaCurFileId, state.image, state.depack_src, width, height, + dump_single_bitmap(_vgaCurZoneNum, state.image, state.depack_src, width, height, state.palette); // Check if image is compressed if (getGameType() == GType_FF) { @@ -1424,7 +1424,7 @@ void SimonEngine::vc12_delay() { else num += VGA_DELAY_BASE; - add_vga_timer(num, _vcPtr, _vgaCurSpriteId, _vgaCurFileId); + add_vga_timer(num, _vcPtr, _vgaCurSpriteId, _vgaCurZoneNum); _vcPtr = (byte *)&_vc_get_out_of_code; } @@ -1469,7 +1469,7 @@ void SimonEngine::vc16_sleep_on_id() { vfs->ident = vcReadNextWord(); vfs->code_ptr = _vcPtr; vfs->sprite_id = _vgaCurSpriteId; - vfs->cur_vga_file = _vgaCurFileId; + vfs->cur_vga_file = _vgaCurZoneNum; _vcPtr = (byte *)&_vc_get_out_of_code; } @@ -1816,7 +1816,7 @@ void SimonEngine::vc42_delayIfNotEQ() { uint val = vcReadVar(vcReadNextWord()); if (val != vcReadNextWord()) { - add_vga_timer(_frameRate + 1, _vcPtr - 4, _vgaCurSpriteId, _vgaCurFileId); + add_vga_timer(_frameRate + 1, _vcPtr - 4, _vgaCurSpriteId, _vgaCurZoneNum); _vcPtr = (byte *)&_vc_get_out_of_code; } } @@ -2007,7 +2007,7 @@ void SimonEngine::vc55_offset_hit_area() { void SimonEngine::vc56_delay() { uint num = vcReadVarOrWord() * _frameRate; - add_vga_timer(num + VGA_DELAY_BASE, _vcPtr, _vgaCurSpriteId, _vgaCurFileId); + add_vga_timer(num + VGA_DELAY_BASE, _vcPtr, _vgaCurSpriteId, _vgaCurZoneNum); _vcPtr = (byte *)&_vc_get_out_of_code; } @@ -2028,11 +2028,11 @@ void SimonEngine::vc59() { void SimonEngine::vc58() { uint sprite = _vgaCurSpriteId; - uint file = _vgaCurFileId; + uint file = _vgaCurZoneNum; const byte *vc_ptr_org; uint16 tmp; - _vgaCurFileId = vcReadNextWord(); + _vgaCurZoneNum = vcReadNextWord(); _vgaCurSpriteId = vcReadNextWord(); tmp = to16Wrapper(vcReadNextWord()); @@ -2043,7 +2043,7 @@ void SimonEngine::vc58() { _vcPtr = vc_ptr_org; _vgaCurSpriteId = sprite; - _vgaCurFileId = file; + _vgaCurZoneNum = file; } void SimonEngine::vc57_no_op() { @@ -2058,15 +2058,15 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) { const byte *vc_ptr_org; old_sprite_id = _vgaCurSpriteId; - old_cur_file_id = _vgaCurFileId; + old_cur_file_id = _vgaCurZoneNum; vc_ptr_org = _vcPtr; - _vgaCurFileId = file; + _vgaCurZoneNum = file; _vgaCurSpriteId = sprite; vfs = _vgaSleepStructs; while (vfs->ident != 0) { - if (vfs->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vfs->cur_vga_file == _vgaCurFileId)) { + if (vfs->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vfs->cur_vga_file == _vgaCurZoneNum)) { while (vfs->ident != 0) { memcpy(vfs, vfs + 1, sizeof(VgaSleepStruct)); vfs++; @@ -2082,7 +2082,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) { vte = _vgaTimerList; while (vte->delay != 0) { - if (vte->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vte->cur_vga_file == _vgaCurFileId)) { + if (vte->sprite_id == _vgaCurSpriteId && ((getGameType() == GType_SIMON1) || vte->cur_vga_file == _vgaCurZoneNum)) { delete_vga_timer(vte); break; } @@ -2090,7 +2090,7 @@ void SimonEngine::vc_kill_sprite(uint file, uint sprite) { } } - _vgaCurFileId = old_cur_file_id; + _vgaCurZoneNum = old_cur_file_id; _vgaCurSpriteId = old_sprite_id; _vcPtr = vc_ptr_org; } @@ -2099,7 +2099,7 @@ void SimonEngine::vc60_killSprite() { uint file; if (getGameType() == GType_SIMON1) { - file = _vgaCurFileId; + file = _vgaCurZoneNum; } else { file = vcReadNextWord(); } @@ -2114,7 +2114,7 @@ void SimonEngine::vc61_setMaskImage() { vsp->x += vcReadNextWord(); vsp->y += vcReadNextWord(); - vsp->flags = kDFMasked | 0x4; + vsp->flags = kDFMasked | kDFUseFrontBuf; _vgaSpriteChanged++; } @@ -2155,7 +2155,7 @@ void SimonEngine::vc62_fastFadeOut() { byte *old_file_2 = _curVgaFile2; uint palmode = _windowNum; - vpe = &_vgaBufferPointers[vsp->fileId]; + vpe = &_vgaBufferPointers[vsp->zoneNum]; _curVgaFile1 = vpe->vgaFile1; _curVgaFile2 = vpe->vgaFile2; _windowNum = vsp->windowNum; @@ -2518,7 +2518,6 @@ void SimonEngine::checkScrollY(int y, int ypos) { if (_scrollCount != 0) { if (_scrollCount >= 0) return; - _scrollCount = 0; } else { if (_scrollFlag != 0) return; @@ -2534,7 +2533,6 @@ void SimonEngine::checkScrollY(int y, int ypos) { if (_scrollCount != 0) { if (_scrollCount < 0) return; - _scrollCount = 0; } else { if (_scrollFlag != 0) return; |