scummvm/engines/tinsel/noir/sysreel.cpp
Einar Johan Trøan Sømåen 51b2994659
Revert TINSEL refactors that happened too close to code freeze.
Revert "TINSEL: Fix int32 discrepancy"
- This reverts commit a640e6b489.

Revert "TINSEL: Refactor Notebook and System reels to follow naming conventions"
- This reverts commit 2cfc3b4ed2.

Revert "TINSEL: Rename IsConvAndNotMove -> isConvAndNotMove"
- This reverts commit 5ba099f408.

Revert "TINSEL: Rename the public methods in Dialogs to follow convention"
- This reverts commit 8ef52754a1.

Revert "TINSEL: Rename the private methods in Dialogs to follow convention"
- This reverts commit a3d0b5206b.

Revert "TINSEL: Add debug commands to add all clues, as well as listing them."
- This reverts commit fdfede64ca.

Revert "TINSEL: Implement pointer handling for Notebook"
- This reverts commit 195b04c9cf.

Revert "TINSEL: Implement polygon-handling for Notebook"
- This reverts commit 10cce703dc.

Revert "TINSEL: Add initial event support to Notebook."
- This reverts commit 61c94379cd.

Revert "TINSEL: Close Inventories when switching between them."
- This reverts commit 337aed1915.

Revert "TINSEL: Implement library function CROSSCLUE"
- This reverts commit 9519288acd.

Revert "TINSEL: Implement Notebook logic for adding clues and showing pages."
- This reverts commit 3580c17cc5.

Revert "TINSEL: Implement InventoryOrNotebookActive"
- This reverts commit 89aefb7794.

Revert "TINSEL: Minor style-fixes"
- This reverts commit e92fafb955.

Revert "TINSEL: Refactor IsInPolygon to be partially a member-function"
- This reverts commit fa7d448051.

Revert "TINSEL: Replace LockMem with GetFrame for FRAME"
- This reverts commit ec9c630fc5.

Revert "TINSEL: Replace LockMem with GetMultiInit for MULTI_INIT"
- This reverts commit fa8e3c506b.

Revert "TINSEL: Further refactor InventoryObjects"
- This reverts commit 1a2f18e421.
2022-05-27 19:55:36 +02:00

67 lines
1.8 KiB
C++

/* ScummVM - Graphic Adventure Engine
*
* ScummVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the COPYRIGHT
* file distributed with this source distribution.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "tinsel/noir/sysreel.h"
#include "common/scummsys.h"
#include "tinsel/cursor.h"
#include "tinsel/pid.h"
#include "tinsel/tinsel.h"
namespace Tinsel {
/**
* Returns the handle to the sysreel at the given index.
*
* @param index reel to get the handle to
*/
SCNHANDLE SystemReel::Get(SysReel index) {
assert((int)index >= 0 && (int)index < MAX_SYSREELS);
return _reels[(int)index];
}
/**
* Stores a reel at an index and if the index is a cursor
*
* @param index where to store the reel
* @param reel handle to the reel
*/
void SystemReel::Set(int32 index, SCNHANDLE reel) {
assert(index >= 0 && index < MAX_SYSREELS);
if (index == (int)SysReel::LOADSCREEN) {
if (CoroScheduler.getCurrentPID() != PID_SCENE) {
return;
}
}
_reels[index] = reel;
// Noir actually calls a function specifically for doing DwInitCursor on
// system reel 11.
if (index == (int)SysReel::CURSOR && reel != 0) {
_vm->_cursor->DwInitCursor(reel);
}
}
} // End of namespace Tinsel