diff options
author | Travis Howell | 2008-12-13 03:12:56 +0000 |
---|---|---|
committer | Travis Howell | 2008-12-13 03:12:56 +0000 |
commit | e593015402c6b4990fda584164956132350d720a (patch) | |
tree | 1f3b6c0ba181f81b70e1b31bf4659a7b078d09cd /engines/agos/cursor.cpp | |
parent | 1cc08d8b6a3ee995ff130bf96d6e9217b41b856d (diff) | |
download | scummvm-rg350-e593015402c6b4990fda584164956132350d720a.tar.gz scummvm-rg350-e593015402c6b4990fda584164956132350d720a.tar.bz2 scummvm-rg350-e593015402c6b4990fda584164956132350d720a.zip |
Cleanup.
svn-id: r35323
Diffstat (limited to 'engines/agos/cursor.cpp')
-rw-r--r-- | engines/agos/cursor.cpp | 66 |
1 files changed, 35 insertions, 31 deletions
diff --git a/engines/agos/cursor.cpp b/engines/agos/cursor.cpp index 1cbfdaed7b..d8c5793ba2 100644 --- a/engines/agos/cursor.cpp +++ b/engines/agos/cursor.cpp @@ -571,45 +571,49 @@ void AGOSEngine::mouseOn() { _lockWord &= ~1; } -void AGOSEngine::initMouse() { - if (getGameType() == GType_PP) { - _maxCursorWidth = 75; - _maxCursorHeight = 97; - _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); - } else if (getGameType() == GType_FF) { - _maxCursorWidth = 40; - _maxCursorHeight = 40; - _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); - } else if (getGameType() == GType_SIMON1) { - _maxCursorWidth = 16; - _maxCursorHeight = 16; - _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); - memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight); +void AGOSEngine_PuzzlePack::initMouse() { + _maxCursorWidth = 75; + _maxCursorHeight = 97; + _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); +} - uint8 color = 225; - if (getPlatform() == Common::kPlatformAmiga) - color = (getFeatures() & GF_32COLOR) ? 17 : 241; +void AGOSEngine_Feeble::initMouse() { + _maxCursorWidth = 40; + _maxCursorHeight = 40; + _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); +} - const uint16 *src = _common_mouseInfo; - for (int i = 0; i < 16; i++) { - for (int j = 0; j < 16; j++) { - if (src[0] & (1 << (15 - (j % 16)))) { - if (src[1] & (1 << (15 - (j % 16)))) { - _mouseData[16 * i + j] = color; - } else { - _mouseData[16 * i + j] = 0; - } +void AGOSEngine_Simon1::initMouse() { + _maxCursorWidth = 16; + _maxCursorHeight = 16; + _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); + memset(_mouseData, 0xFF, _maxCursorWidth * _maxCursorHeight); + + uint8 color = 225; + if (getPlatform() == Common::kPlatformAmiga) + color = (getFeatures() & GF_32COLOR) ? 17 : 241; + + const uint16 *src = _common_mouseInfo; + for (int i = 0; i < 16; i++) { + for (int j = 0; j < 16; j++) { + if (src[0] & (1 << (15 - (j % 16)))) { + if (src[1] & (1 << (15 - (j % 16)))) { + _mouseData[16 * i + j] = color; + } else { + _mouseData[16 * i + j] = 0; } } - src += 2; } - } else { - _maxCursorWidth = 16; - _maxCursorHeight = 16; - _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); + src += 2; } } +void AGOSEngine::initMouse() { + _maxCursorWidth = 16; + _maxCursorHeight = 16; + _mouseData = (byte *)calloc(_maxCursorWidth * _maxCursorHeight, 1); +} + void AGOSEngine_PuzzlePack::loadMouseImage() { loadZone(_variableArray[500]); VgaPointersEntry *vpe = &_vgaBufferPointers[_variableArray[500]]; |