2017-01-13 12:17:36 +11:00
|
|
|
/* ScummVM - Graphic Adventure Engine
|
2021-12-26 18:47:58 +01:00
|
|
|
*
|
|
|
|
* 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/>.
|
|
|
|
*
|
|
|
|
*/
|
2017-01-13 12:17:36 +11:00
|
|
|
|
2017-02-07 20:08:49 +01:00
|
|
|
#include "common/system.h"
|
2022-06-13 17:55:09 +02:00
|
|
|
#include "common/memstream.h"
|
2017-02-07 20:08:49 +01:00
|
|
|
#include "graphics/macgui/macwindowmanager.h"
|
|
|
|
|
2017-01-13 12:17:36 +11:00
|
|
|
#include "director/director.h"
|
2022-06-15 00:37:23 +02:00
|
|
|
#include "director/cast.h"
|
|
|
|
#include "director/movie.h"
|
2022-06-14 01:02:27 +02:00
|
|
|
#include "director/images.h"
|
2023-03-25 07:15:50 +01:00
|
|
|
#include "director/picture.h"
|
2022-06-15 17:21:31 +02:00
|
|
|
#include "director/window.h"
|
2023-04-20 23:48:40 +08:00
|
|
|
#include "director/castmember/bitmap.h"
|
2017-01-13 12:17:36 +11:00
|
|
|
|
|
|
|
namespace Director {
|
|
|
|
|
2020-08-21 00:17:28 +02:00
|
|
|
#include "director/graphics-data.h"
|
2020-03-21 14:19:56 +01:00
|
|
|
|
|
|
|
/**
|
2022-12-31 12:40:18 +08:00
|
|
|
* Used to upgrade to 32-bit color if required.
|
2020-03-28 13:09:11 +01:00
|
|
|
**/
|
2020-03-21 14:45:08 +01:00
|
|
|
uint32 DirectorEngine::transformColor(uint32 color) {
|
2020-08-15 12:18:35 +02:00
|
|
|
if (_pixelformat.bytesPerPixel == 1)
|
2022-12-31 12:40:18 +08:00
|
|
|
return color;
|
2020-08-15 12:18:35 +02:00
|
|
|
|
|
|
|
return _wm->findBestColor(_currentPalette[color * 3], _currentPalette[color * 3 + 1], _currentPalette[color * 3 + 2]);
|
2020-03-21 14:19:56 +01:00
|
|
|
}
|
|
|
|
|
2017-01-13 12:17:36 +11:00
|
|
|
void DirectorEngine::loadPatterns() {
|
|
|
|
for (int i = 0; i < ARRAYSIZE(director3Patterns); i++)
|
|
|
|
_director3Patterns.push_back(director3Patterns[i]);
|
|
|
|
|
|
|
|
for (int i = 0; i < ARRAYSIZE(director3QuickDrawPatterns); i++)
|
|
|
|
_director3QuickDrawPatterns.push_back(director3QuickDrawPatterns[i]);
|
2022-06-13 17:55:09 +02:00
|
|
|
|
2022-06-15 00:37:23 +02:00
|
|
|
// We must set it here for correct work of BITDDecoder.
|
|
|
|
// It is set later in Director properly
|
2022-06-14 01:02:27 +02:00
|
|
|
_pixelformat = Graphics::PixelFormat::createFormatCLUT8();
|
|
|
|
|
2022-06-13 17:55:09 +02:00
|
|
|
for (int i = 0; i < ARRAYSIZE(builtinTiles); i++) {
|
|
|
|
Common::MemoryReadStream stream(builtinTiles[i].ptr, builtinTiles[i].size);
|
2022-06-14 01:02:27 +02:00
|
|
|
|
2023-03-25 07:15:50 +01:00
|
|
|
auto decoder = new BITDDecoder(builtinTiles[i].w, builtinTiles[i].h, 8, builtinTiles[i].w, macPalette, kFileVer300);
|
|
|
|
decoder->loadStream(stream);
|
|
|
|
_builtinTiles[i].img = new Picture(*decoder);
|
|
|
|
delete decoder;
|
2022-06-15 00:37:23 +02:00
|
|
|
|
|
|
|
_builtinTiles[i].rect = Common::Rect(0, 0, builtinTiles[i].w, builtinTiles[i].h);
|
2022-06-13 17:55:09 +02:00
|
|
|
}
|
2017-01-13 12:17:36 +11:00
|
|
|
}
|
|
|
|
|
|
|
|
Graphics::MacPatterns &DirectorEngine::getPatterns() {
|
2017-03-02 23:12:42 +01:00
|
|
|
// TOOD: implement switch and other version patterns. (use getVersion());
|
2017-01-13 12:17:36 +11:00
|
|
|
return _director3QuickDrawPatterns;
|
|
|
|
}
|
|
|
|
|
2023-03-25 07:15:50 +01:00
|
|
|
Picture *DirectorEngine::getTile(int num) {
|
2022-06-15 00:37:23 +02:00
|
|
|
TilePatternEntry *tile = &getCurrentMovie()->getCast()->_tiles[num];
|
|
|
|
|
|
|
|
if (tile->bitmapId.isNull())
|
|
|
|
return _builtinTiles[num].img;
|
|
|
|
|
|
|
|
CastMember *member = getCurrentMovie()->getCastMember(tile->bitmapId);
|
|
|
|
|
|
|
|
if (!member) {
|
|
|
|
warning("BUILDBOT: DirectorEngine::getTile(%d) VWTL refers to non-existing cast %s", num,
|
|
|
|
tile->bitmapId.asString().c_str());
|
|
|
|
|
|
|
|
return _builtinTiles[num].img;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (member->_type != kCastBitmap) {
|
|
|
|
warning("BUILDBOT: DirectorEngine::getTile(%d) VWTL refers to incorrect cast %s type %s", num,
|
2023-02-13 12:10:58 +01:00
|
|
|
tile->bitmapId.asString().c_str(), castType2str(member->_type));
|
2022-06-15 00:37:23 +02:00
|
|
|
|
|
|
|
return _builtinTiles[num].img;
|
|
|
|
}
|
|
|
|
|
2023-03-25 07:15:50 +01:00
|
|
|
return ((BitmapCastMember *)member)->_picture;
|
2022-06-15 00:37:23 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
const Common::Rect &DirectorEngine::getTileRect(int num) {
|
|
|
|
TilePatternEntry *tile = &getCurrentMovie()->getCast()->_tiles[num];
|
|
|
|
|
|
|
|
if (tile->bitmapId.isNull())
|
|
|
|
return _builtinTiles[num].rect;
|
|
|
|
|
|
|
|
return tile->rect;
|
|
|
|
}
|
|
|
|
|
2020-07-26 21:26:28 -04:00
|
|
|
void DirectorEngine::loadDefaultPalettes() {
|
2023-05-06 17:10:45 +08:00
|
|
|
_loadedPalettes[CastMemberID(kClutSystemMac, -1)] = PaletteV4(CastMemberID(kClutSystemMac, -1), macPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutRainbow, -1)] = PaletteV4(CastMemberID(kClutRainbow, -1), rainbowPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutGrayscale, -1)] = PaletteV4(CastMemberID(kClutGrayscale, -1), grayscalePalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutPastels, -1)] = PaletteV4(CastMemberID(kClutPastels, -1), pastelsPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutVivid, -1)] = PaletteV4(CastMemberID(kClutVivid, -1), vividPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutNTSC, -1)] = PaletteV4(CastMemberID(kClutNTSC, -1), ntscPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutMetallic, -1)] = PaletteV4(CastMemberID(kClutMetallic, -1), metallicPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutSystemWin, -1)] = PaletteV4(CastMemberID(kClutSystemWin, -1), winPalette, 256);
|
|
|
|
_loadedPalettes[CastMemberID(kClutSystemWinD5, -1)] = PaletteV4(CastMemberID(kClutSystemWinD5, -1), winD5Palette, 256);
|
|
|
|
|
|
|
|
_loaded16Palettes[CastMemberID(kClutSystemMac, -1)] = PaletteV4(CastMemberID(kClutSystemMac, -1), mac16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutRainbow, -1)] = PaletteV4(CastMemberID(kClutRainbow, -1), rainbow16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutGrayscale, -1)] = PaletteV4(CastMemberID(kClutGrayscale, -1), grayscale16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutPastels, -1)] = PaletteV4(CastMemberID(kClutPastels, -1), pastels16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutVivid, -1)] = PaletteV4(CastMemberID(kClutVivid, -1), vivid16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutNTSC, -1)] = PaletteV4(CastMemberID(kClutNTSC, -1), ntsc16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutMetallic, -1)] = PaletteV4(CastMemberID(kClutMetallic, -1), metallic16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutSystemWin, -1)] = PaletteV4(CastMemberID(kClutSystemWin, -1), win16Palette, 16);
|
|
|
|
_loaded16Palettes[CastMemberID(kClutSystemWinD5, -1)] = PaletteV4(CastMemberID(kClutSystemWinD5, -1), winD516Palette, 16);
|
|
|
|
|
|
|
|
_loaded4Palette = PaletteV4(CastMemberID(kClutGrayscale, -1), grayscale4Palette, 4);
|
2020-07-26 21:26:28 -04:00
|
|
|
}
|
|
|
|
|
2023-05-06 17:10:45 +08:00
|
|
|
PaletteV4 *DirectorEngine::getPalette(const CastMemberID &id) {
|
2020-07-27 09:25:38 -04:00
|
|
|
if (!_loadedPalettes.contains(id)) {
|
2023-05-14 16:27:05 +08:00
|
|
|
warning("DirectorEngine::getPalette(): Palette %s not found", id.asString().c_str());
|
|
|
|
return nullptr;
|
2020-07-27 09:25:38 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
return &_loadedPalettes[id];
|
|
|
|
}
|
|
|
|
|
2023-05-06 17:10:45 +08:00
|
|
|
void DirectorEngine::addPalette(CastMemberID &id, byte *palette, int length) {
|
|
|
|
if (id.castLib < 0) {
|
|
|
|
warning("DirectorEngine::addPalette(): Negative cast library ids reserved for default palettes");
|
2020-07-26 21:26:28 -04:00
|
|
|
return;
|
|
|
|
} else if (_loadedPalettes.contains(id)) {
|
2020-08-03 09:43:33 -04:00
|
|
|
delete[] _loadedPalettes[id].palette;
|
2020-01-11 23:30:40 +08:00
|
|
|
}
|
2020-07-26 21:26:28 -04:00
|
|
|
|
|
|
|
_loadedPalettes[id] = PaletteV4(id, palette, length);
|
2020-01-11 23:30:40 +08:00
|
|
|
}
|
|
|
|
|
2023-05-06 17:10:45 +08:00
|
|
|
bool DirectorEngine::setPalette(const CastMemberID &id) {
|
|
|
|
if (id.isNull()) {
|
2020-07-27 09:25:38 -04:00
|
|
|
// Palette id of 0 is unused
|
|
|
|
return false;
|
2023-05-14 16:27:05 +08:00
|
|
|
}
|
2020-07-26 21:26:28 -04:00
|
|
|
|
2023-05-06 17:10:45 +08:00
|
|
|
PaletteV4 *pal = getPalette(id);
|
|
|
|
if (!pal)
|
|
|
|
return false;
|
|
|
|
setPalette(pal->palette, pal->length);
|
2020-07-26 21:26:28 -04:00
|
|
|
return true;
|
2020-01-11 23:30:40 +08:00
|
|
|
}
|
|
|
|
|
2017-02-07 20:08:49 +01:00
|
|
|
void DirectorEngine::setPalette(byte *palette, uint16 count) {
|
2020-08-14 10:28:27 +02:00
|
|
|
|
2022-08-28 19:02:47 +08:00
|
|
|
memset(_currentPalette, 0, 768);
|
2022-08-29 00:52:29 +08:00
|
|
|
memmove(_currentPalette, palette, count * 3);
|
2017-02-07 20:08:49 +01:00
|
|
|
_currentPaletteLength = count;
|
2019-12-11 11:49:45 +01:00
|
|
|
|
2022-08-29 00:52:29 +08:00
|
|
|
// Pass the palette to OSystem only for 8bpp mode
|
|
|
|
if (_pixelformat.bytesPerPixel == 1)
|
|
|
|
_system->getPaletteManager()->setPalette(_currentPalette, 0, _currentPaletteLength);
|
|
|
|
|
|
|
|
_wm->passPalette(_currentPalette, _currentPaletteLength);
|
|
|
|
}
|
|
|
|
|
|
|
|
void DirectorEngine::shiftPalette(int startIndex, int endIndex, bool reverse) {
|
|
|
|
if (startIndex == endIndex)
|
|
|
|
return;
|
|
|
|
|
2022-12-31 12:40:18 +08:00
|
|
|
if (startIndex > endIndex)
|
2022-08-29 00:52:29 +08:00
|
|
|
return;
|
|
|
|
|
|
|
|
byte temp[3] = { 0, 0, 0 };
|
2022-12-31 12:40:18 +08:00
|
|
|
int span = endIndex - startIndex + 1;
|
2022-08-29 00:52:29 +08:00
|
|
|
if (reverse) {
|
|
|
|
memcpy(temp, _currentPalette + 3 * startIndex, 3);
|
2022-12-31 12:40:18 +08:00
|
|
|
memmove(_currentPalette + 3 * startIndex,
|
|
|
|
_currentPalette + 3 * startIndex + 3,
|
2022-08-29 00:52:29 +08:00
|
|
|
(span - 1) * 3);
|
|
|
|
memcpy(_currentPalette + 3 * endIndex, temp, 3);
|
2022-12-31 12:40:18 +08:00
|
|
|
} else {
|
|
|
|
memcpy(temp, _currentPalette + 3 * endIndex, 3);
|
|
|
|
memmove(_currentPalette + 3 * startIndex + 3,
|
|
|
|
_currentPalette + 3 * startIndex,
|
|
|
|
(span - 1) * 3);
|
|
|
|
memcpy(_currentPalette + 3 * startIndex, temp, 3);
|
2022-08-29 00:52:29 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Pass the palette to OSystem only for 8bpp mode
|
|
|
|
if (_pixelformat.bytesPerPixel == 1)
|
|
|
|
_system->getPaletteManager()->setPalette(_currentPalette, 0, _currentPaletteLength);
|
|
|
|
|
|
|
|
_wm->passPalette(_currentPalette, _currentPaletteLength);
|
2017-02-07 20:08:49 +01:00
|
|
|
}
|
|
|
|
|
2020-07-26 21:26:28 -04:00
|
|
|
void DirectorEngine::clearPalettes() {
|
2023-05-06 17:10:45 +08:00
|
|
|
for (auto it = _loadedPalettes.begin(); it != _loadedPalettes.end(); ++it) {
|
|
|
|
if (it->_value.id.castLib > 0)
|
2020-07-26 21:26:28 -04:00
|
|
|
delete[] it->_value.palette;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-08-06 01:00:53 -04:00
|
|
|
void DirectorEngine::setCursor(DirectorCursor type) {
|
2020-03-27 02:01:06 +01:00
|
|
|
switch (type) {
|
|
|
|
case kCursorMouseDown:
|
2021-08-06 01:00:53 -04:00
|
|
|
_wm->replaceCustomCursor(mouseDown, 16, 16, 0, 0, 3);
|
2020-03-27 02:01:06 +01:00
|
|
|
break;
|
|
|
|
case kCursorMouseUp:
|
2021-08-06 01:00:53 -04:00
|
|
|
_wm->replaceCustomCursor(mouseUp, 16, 16, 0, 0, 3);
|
2020-03-27 02:01:06 +01:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-07-11 12:30:58 +08:00
|
|
|
void DirectorEngine::draw() {
|
|
|
|
_wm->renderZoomBox(true);
|
|
|
|
_wm->draw();
|
2020-07-21 17:31:36 -04:00
|
|
|
g_system->updateScreen();
|
2020-07-11 12:30:58 +08:00
|
|
|
}
|
|
|
|
|
2020-08-16 00:11:51 +02:00
|
|
|
template <typename T>
|
2020-07-09 15:33:03 -04:00
|
|
|
void inkDrawPixel(int x, int y, int src, void *data) {
|
2020-06-29 18:16:48 -04:00
|
|
|
DirectorPlotData *p = (DirectorPlotData *)data;
|
2022-06-12 15:52:29 +02:00
|
|
|
Graphics::MacWindowManager *wm = p->d->_wm;
|
2020-06-29 18:16:48 -04:00
|
|
|
|
|
|
|
if (!p->destRect.contains(x, y))
|
|
|
|
return;
|
|
|
|
|
2022-07-30 23:16:19 +08:00
|
|
|
T *dst;
|
2020-08-16 00:11:51 +02:00
|
|
|
uint32 tmpDst;
|
2020-06-29 18:16:48 -04:00
|
|
|
|
2022-07-30 23:16:19 +08:00
|
|
|
dst = (T *)p->dst->getBasePtr(x, y);
|
2020-06-29 18:16:48 -04:00
|
|
|
|
2020-07-09 15:33:03 -04:00
|
|
|
if (p->ms) {
|
2022-06-16 14:43:14 +02:00
|
|
|
if (p->ms->pd->thickness > 1) {
|
|
|
|
int prevThickness = p->ms->pd->thickness;
|
|
|
|
int x1 = x;
|
|
|
|
int x2 = x1 + prevThickness;
|
|
|
|
int y1 = y;
|
|
|
|
int y2 = y1 + prevThickness;
|
|
|
|
|
|
|
|
p->ms->pd->thickness = 1; // We do not want recursive loops
|
|
|
|
|
|
|
|
for (y = y1; y < y2; y++)
|
|
|
|
for (x = x1; x < x2; x++)
|
|
|
|
if (x >= 0 && x < p->ms->pd->surface->w && y >= 0 && y < p->ms->pd->surface->h) {
|
|
|
|
inkDrawPixel<T>(x, y, src, data);
|
|
|
|
}
|
|
|
|
|
|
|
|
p->ms->pd->thickness = prevThickness;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2022-06-15 01:00:32 +02:00
|
|
|
if (p->ms->tile) {
|
|
|
|
int x1 = p->ms->tileRect->left + (p->ms->pd->fillOriginX + x) % p->ms->tileRect->width();
|
|
|
|
int y1 = p->ms->tileRect->top + (p->ms->pd->fillOriginY + y) % p->ms->tileRect->height();
|
|
|
|
|
2023-03-25 07:15:50 +01:00
|
|
|
src = p->ms->tile->_surface.getPixel(x1, y1);
|
2022-06-16 14:43:14 +02:00
|
|
|
} else {
|
|
|
|
// Get the pixel that macDrawPixel will give us, but store it to apply the
|
|
|
|
// ink later
|
|
|
|
tmpDst = *dst;
|
|
|
|
(wm->getDrawPixel())(x, y, src, p->ms->pd);
|
|
|
|
src = *dst;
|
2020-06-29 18:16:48 -04:00
|
|
|
|
2022-06-16 14:43:14 +02:00
|
|
|
*dst = tmpDst;
|
|
|
|
}
|
2020-07-29 00:11:28 -04:00
|
|
|
} else if (p->alpha) {
|
|
|
|
// Sprite blend does not respect colourization; defaults to matte ink
|
|
|
|
byte rSrc, gSrc, bSrc;
|
|
|
|
byte rDst, gDst, bDst;
|
|
|
|
|
2022-08-31 18:15:01 +05:30
|
|
|
wm->decomposeColor<T>(src, rSrc, gSrc, bSrc);
|
|
|
|
wm->decomposeColor<T>(*dst, rDst, gDst, bDst);
|
2020-07-29 00:11:28 -04:00
|
|
|
|
2023-03-09 19:41:01 +08:00
|
|
|
rDst = lerpByte(rSrc, rDst, p->alpha, 255);
|
|
|
|
gDst = lerpByte(gSrc, gDst, p->alpha, 255);
|
|
|
|
bDst = lerpByte(bSrc, bDst, p->alpha, 255);
|
2022-06-12 15:52:29 +02:00
|
|
|
*dst = wm->findBestColor(rDst, gDst, bDst);
|
2020-07-29 00:11:28 -04:00
|
|
|
return;
|
2020-06-29 18:16:48 -04:00
|
|
|
}
|
|
|
|
|
2020-07-09 09:29:57 -04:00
|
|
|
switch (p->ink) {
|
2020-06-29 18:16:48 -04:00
|
|
|
case kInkTypeBackgndTrans:
|
2022-10-29 01:00:11 +08:00
|
|
|
if (p->oneBitImage) {
|
|
|
|
// One-bit images have a slightly different rendering algorithm for BackgndTrans.
|
|
|
|
// Foreground colour is used, and background colour is ignored.
|
|
|
|
*dst = (src == (int)p->colorBlack) ? p->foreColor : *dst;
|
|
|
|
} else {
|
|
|
|
*dst = (src == (int)p->backColor) ? *dst : src;
|
|
|
|
}
|
2022-07-30 23:16:19 +08:00
|
|
|
break;
|
2020-07-03 13:15:39 -04:00
|
|
|
case kInkTypeMatte:
|
2022-07-30 23:16:19 +08:00
|
|
|
// fall through
|
2020-07-03 13:15:39 -04:00
|
|
|
case kInkTypeMask:
|
|
|
|
// Only unmasked pixels make it here, so copy them straight
|
2023-03-09 19:41:01 +08:00
|
|
|
case kInkTypeBlend:
|
|
|
|
// If there's a blend factor set, it's dealt with in the alpha handling block.
|
|
|
|
// Otherwise, treat it like a Matte image.
|
2020-07-08 09:20:15 -04:00
|
|
|
case kInkTypeCopy: {
|
|
|
|
if (p->applyColor) {
|
2022-07-30 23:16:19 +08:00
|
|
|
if (sizeof(T) == 1) {
|
2022-12-31 12:40:18 +08:00
|
|
|
*dst = src == 0xff ? p->foreColor : (src == 0x00 ? p->backColor : *dst);
|
2022-07-30 23:16:19 +08:00
|
|
|
} else {
|
|
|
|
// TODO: Improve the efficiency of this composition
|
|
|
|
byte rSrc, gSrc, bSrc;
|
|
|
|
byte rDst, gDst, bDst;
|
|
|
|
byte rFor, gFor, bFor;
|
|
|
|
byte rBak, gBak, bBak;
|
|
|
|
|
2022-08-31 18:15:01 +05:30
|
|
|
wm->decomposeColor<T>(src, rSrc, gSrc, bSrc);
|
|
|
|
wm->decomposeColor<T>(*dst, rDst, gDst, bDst);
|
|
|
|
wm->decomposeColor<T>(p->foreColor, rFor, gFor, bFor);
|
|
|
|
wm->decomposeColor<T>(p->backColor, rBak, gBak, bBak);
|
2022-07-30 23:16:19 +08:00
|
|
|
|
|
|
|
*dst = wm->findBestColor((rSrc | rFor) & (~rSrc | rBak),
|
|
|
|
(gSrc | gFor) & (~gSrc | gBak),
|
|
|
|
(bSrc | bFor) & (~bSrc | bBak));
|
|
|
|
}
|
2020-07-08 09:20:15 -04:00
|
|
|
} else {
|
|
|
|
*dst = src;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
case kInkTypeNotCopy:
|
|
|
|
if (p->applyColor) {
|
2022-07-30 23:16:19 +08:00
|
|
|
if (sizeof(T) == 1) {
|
2022-12-31 12:40:18 +08:00
|
|
|
*dst = src == 0xff ? p->backColor : (src == 0x00 ? p->foreColor : src);
|
2022-07-30 23:16:19 +08:00
|
|
|
} else {
|
|
|
|
// TODO: Improve the efficiency of this composition
|
|
|
|
byte rSrc, gSrc, bSrc;
|
|
|
|
byte rDst, gDst, bDst;
|
|
|
|
byte rFor, gFor, bFor;
|
|
|
|
byte rBak, gBak, bBak;
|
|
|
|
|
2022-08-31 18:15:01 +05:30
|
|
|
wm->decomposeColor<T>(src, rSrc, gSrc, bSrc);
|
|
|
|
wm->decomposeColor<T>(*dst, rDst, gDst, bDst);
|
|
|
|
wm->decomposeColor<T>(p->foreColor, rFor, gFor, bFor);
|
|
|
|
wm->decomposeColor<T>(p->backColor, rBak, gBak, bBak);
|
2022-07-30 23:16:19 +08:00
|
|
|
|
|
|
|
*dst = wm->findBestColor((~rSrc | rFor) & (rSrc | rBak),
|
|
|
|
(~gSrc | gFor) & (gSrc | gBak),
|
|
|
|
(~bSrc | bFor) & (bSrc | bBak));
|
|
|
|
}
|
2020-07-08 09:20:15 -04:00
|
|
|
} else {
|
2023-01-03 20:31:44 +08:00
|
|
|
// Find the inverse of the colour and match it back to the palette if required
|
|
|
|
byte rSrc, gSrc, bSrc;
|
|
|
|
wm->decomposeColor<T>(src, rSrc, gSrc, bSrc);
|
|
|
|
|
|
|
|
*dst = wm->findBestColor(~rSrc, ~gSrc, ~bSrc);
|
2020-07-08 09:20:15 -04:00
|
|
|
}
|
2020-06-29 18:16:48 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeTransparent:
|
2023-03-09 19:01:44 +08:00
|
|
|
if (p->oneBitImage || p->applyColor) {
|
|
|
|
*dst = src == (int)p->colorBlack ? p->foreColor : *dst;
|
|
|
|
} else {
|
2023-03-09 22:39:44 +08:00
|
|
|
// OR dst palette index with src.
|
|
|
|
// Originally designed for 1-bit mode to make white pixels
|
|
|
|
// transparent.
|
2023-03-09 19:01:44 +08:00
|
|
|
*dst = *dst | src;
|
|
|
|
}
|
2020-07-08 09:20:15 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeNotTrans:
|
2023-03-09 19:01:44 +08:00
|
|
|
if (p->oneBitImage || p->applyColor) {
|
|
|
|
*dst = src == (int)p->colorWhite ? p->foreColor : *dst;
|
|
|
|
} else {
|
2023-03-09 22:39:44 +08:00
|
|
|
// OR dst palette index with the inverse of src.
|
2023-03-09 19:01:44 +08:00
|
|
|
*dst = *dst | ~src;
|
|
|
|
}
|
2020-06-29 18:16:48 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeReverse:
|
2023-03-09 22:39:44 +08:00
|
|
|
// XOR dst palette index with src.
|
|
|
|
// Originally designed for 1-bit mode so that
|
|
|
|
// black pixels would appear white on a black
|
|
|
|
// background.
|
2022-12-31 12:40:18 +08:00
|
|
|
*dst ^= src;
|
2020-06-29 18:16:48 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeNotReverse:
|
2023-03-09 22:39:44 +08:00
|
|
|
// XOR dst palette index with the inverse of src.
|
2022-12-31 12:40:18 +08:00
|
|
|
*dst ^= ~(src);
|
2020-07-08 09:20:15 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeGhost:
|
2023-03-09 19:01:44 +08:00
|
|
|
if (p->oneBitImage || p->applyColor) {
|
|
|
|
*dst = src == (int)p->colorBlack ? p->backColor : *dst;
|
|
|
|
} else {
|
2023-03-09 22:39:44 +08:00
|
|
|
// AND dst palette index with the inverse of src.
|
|
|
|
// Originally designed for 1-bit mode so that
|
|
|
|
// black pixels would be invisible until they were
|
|
|
|
// over a black background, showing as white.
|
2023-03-09 19:01:44 +08:00
|
|
|
*dst = *dst & ~src;
|
|
|
|
}
|
2020-06-29 18:16:48 -04:00
|
|
|
break;
|
|
|
|
case kInkTypeNotGhost:
|
2023-03-09 19:01:44 +08:00
|
|
|
if (p->oneBitImage || p->applyColor) {
|
|
|
|
*dst = src == (int)p->colorWhite ? p->backColor : *dst;
|
|
|
|
} else {
|
2023-03-09 22:39:44 +08:00
|
|
|
// AND dst palette index with src.
|
2023-03-09 19:01:44 +08:00
|
|
|
*dst = *dst & src;
|
|
|
|
}
|
2020-06-29 18:16:48 -04:00
|
|
|
break;
|
2020-07-03 16:51:04 -04:00
|
|
|
default: {
|
2023-03-09 22:39:44 +08:00
|
|
|
// Arithmetic ink types, based on real color values
|
2020-08-21 00:20:38 +02:00
|
|
|
byte rSrc, gSrc, bSrc;
|
|
|
|
byte rDst, gDst, bDst;
|
|
|
|
|
2022-08-31 18:15:01 +05:30
|
|
|
wm->decomposeColor<T>(src, rSrc, gSrc, bSrc);
|
|
|
|
wm->decomposeColor<T>(*dst, rDst, gDst, bDst);
|
2020-07-06 13:03:58 -04:00
|
|
|
|
2020-08-21 00:20:38 +02:00
|
|
|
switch (p->ink) {
|
|
|
|
case kInkTypeAddPin:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Add src to dst, but pinning each channel so it can't go above 0xff.
|
|
|
|
*dst = wm->findBestColor(rDst + MIN(0xff - rDst, (int)rSrc), gDst + MIN(0xff - gDst, (int)gSrc), bDst + MIN(0xff - bDst, (int)bSrc));
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
case kInkTypeAdd:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Add src to dst, allowing each channel to overflow and wrap around.
|
|
|
|
*dst = wm->findBestColor(rDst + rSrc, gDst + gSrc, bDst + bSrc);
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
case kInkTypeSubPin:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Subtract src from dst, but pinning each channel so it can't go below 0x00.
|
|
|
|
*dst = wm->findBestColor(MAX(rDst - rSrc, 1) - 1, MAX(gDst - gSrc, 1) - 1, MAX(bDst - bSrc, 1) - 1);
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
case kInkTypeLight:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Pick the higher of src and dst for each channel, lightening the image.
|
|
|
|
*dst = wm->findBestColor(MAX(rSrc, rDst), MAX(gSrc, gDst), MAX(bSrc, bDst));
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
case kInkTypeSub:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Subtract src from dst, allowing each channel to underflow and wrap around.
|
|
|
|
*dst = wm->findBestColor(rDst - rSrc, gDst - gSrc, bDst - bSrc);
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
case kInkTypeDark:
|
2023-03-09 22:39:44 +08:00
|
|
|
// Pick the lower of src and dst for each channel, darkening the image.
|
|
|
|
*dst = wm->findBestColor(MIN(rSrc, rDst), MIN(gSrc, gDst), MIN(bSrc, bDst));
|
2020-08-21 00:20:38 +02:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2020-07-03 16:51:04 -04:00
|
|
|
}
|
|
|
|
}
|
2020-06-29 18:16:48 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-08-16 00:11:51 +02:00
|
|
|
Graphics::MacDrawPixPtr DirectorEngine::getInkDrawPixel() {
|
|
|
|
if (_pixelformat.bytesPerPixel == 1)
|
2022-07-30 23:16:19 +08:00
|
|
|
return &inkDrawPixel<byte>;
|
2020-08-16 00:11:51 +02:00
|
|
|
else
|
2022-07-30 23:16:19 +08:00
|
|
|
return &inkDrawPixel<uint32>;
|
2020-08-16 00:11:51 +02:00
|
|
|
}
|
|
|
|
|
2020-07-09 15:33:03 -04:00
|
|
|
void DirectorPlotData::setApplyColor() {
|
2023-03-09 19:01:44 +08:00
|
|
|
// Director has two ways of rendering an ink setting.
|
|
|
|
// The default is to incorporate the full range of colors in the image.
|
|
|
|
// "applyColor" is used to denote the other option; reduce the image
|
|
|
|
// to some combination of the currently set foreground and background color.
|
2020-07-09 15:33:03 -04:00
|
|
|
applyColor = false;
|
2020-07-09 11:08:15 -04:00
|
|
|
|
2023-03-09 19:01:44 +08:00
|
|
|
switch (ink) {
|
|
|
|
case kInkTypeMatte:
|
|
|
|
case kInkTypeMask:
|
|
|
|
case kInkTypeCopy:
|
|
|
|
case kInkTypeNotCopy:
|
|
|
|
applyColor = (foreColor != colorBlack) || (backColor != colorWhite);
|
|
|
|
break;
|
|
|
|
case kInkTypeTransparent:
|
|
|
|
case kInkTypeNotTrans:
|
|
|
|
case kInkTypeBackgndTrans:
|
|
|
|
case kInkTypeGhost:
|
|
|
|
case kInkTypeNotGhost:
|
|
|
|
applyColor = !((foreColor == colorBlack) && (backColor == colorWhite));
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2020-07-09 11:08:15 -04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-10-09 09:41:27 +08:00
|
|
|
uint32 DirectorPlotData::preprocessColor(uint32 src) {
|
|
|
|
// HACK: Right now this method is just used for adjusting the colourization on text
|
|
|
|
// sprites, as it would be costly to colourize the chunks on the fly each
|
|
|
|
// time a section needs drawing. It's ugly but mostly works.
|
|
|
|
if (sprite == kTextSprite) {
|
|
|
|
switch(ink) {
|
|
|
|
case kInkTypeMask:
|
|
|
|
src = (src == backColor ? foreColor : 0xff);
|
|
|
|
break;
|
|
|
|
case kInkTypeReverse:
|
|
|
|
src = (src == foreColor ? 0 : colorWhite);
|
|
|
|
break;
|
|
|
|
case kInkTypeNotReverse:
|
|
|
|
src = (src == backColor ? colorWhite : 0);
|
|
|
|
break;
|
|
|
|
// looks like this part is wrong, maybe it's very same as reverse?
|
|
|
|
// check warlock/DATA/WARLOCKSHIP/ENG/ABOUT to see more detail.
|
|
|
|
// case kInkTypeGhost:
|
|
|
|
// src = (src == foreColor ? backColor : colorWhite);
|
|
|
|
// break;
|
|
|
|
case kInkTypeNotGhost:
|
|
|
|
src = (src == backColor ? colorWhite : backColor);
|
|
|
|
break;
|
|
|
|
case kInkTypeNotCopy:
|
|
|
|
src = (src == foreColor ? backColor : foreColor);
|
|
|
|
break;
|
|
|
|
case kInkTypeNotTrans:
|
|
|
|
src = (src == foreColor ? backColor : colorWhite);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return src;
|
|
|
|
}
|
|
|
|
|
2021-10-12 08:19:29 +08:00
|
|
|
void DirectorPlotData::inkBlitShape(Common::Rect &srcRect) {
|
2021-10-09 09:41:27 +08:00
|
|
|
if (!ms)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// Preprocess shape colours
|
|
|
|
switch (ink) {
|
|
|
|
case kInkTypeNotTrans:
|
|
|
|
case kInkTypeNotReverse:
|
|
|
|
case kInkTypeNotGhost:
|
|
|
|
return;
|
|
|
|
case kInkTypeReverse:
|
|
|
|
ms->foreColor = 0;
|
|
|
|
ms->backColor = 0;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2022-06-15 17:21:31 +02:00
|
|
|
Common::Point wpos;
|
|
|
|
Movie *movie = g_director->getCurrentMovie();
|
|
|
|
|
|
|
|
if (g_director->_wm->_mode & Graphics::kWMModeNoDesktop)
|
|
|
|
wpos = Common::Point(movie->getCast()->_movieRect.left, movie->getCast()->_movieRect.top);
|
|
|
|
else
|
|
|
|
wpos = movie->getWindow()->getAbsolutePos();
|
|
|
|
|
2021-10-12 08:19:29 +08:00
|
|
|
Common::Rect fillAreaRect((int)srcRect.width(), (int)srcRect.height());
|
|
|
|
fillAreaRect.moveTo(srcRect.left, srcRect.top);
|
2022-06-15 17:21:31 +02:00
|
|
|
Graphics::MacPlotData plotFill(dst, nullptr, &d->getPatterns(), ms->pattern, srcRect.left + wpos.x, srcRect.top + wpos.y, 1, ms->backColor);
|
2021-10-09 09:41:27 +08:00
|
|
|
|
2022-06-15 16:58:37 +02:00
|
|
|
uint strokePattern = 1;
|
|
|
|
|
2022-06-17 01:03:21 +02:00
|
|
|
bool outline = (ms->spriteType == kOutlinedRectangleSprite || ms->spriteType == kOutlinedRoundedRectangleSprite
|
|
|
|
|| ms->spriteType == kOutlinedOvalSprite);
|
|
|
|
|
|
|
|
if (outline)
|
2022-06-15 16:58:37 +02:00
|
|
|
strokePattern = ms->pattern;
|
|
|
|
|
2021-10-12 08:19:29 +08:00
|
|
|
Common::Rect strokeRect(MAX((int)srcRect.width() - ms->lineSize, 0), MAX((int)srcRect.height() - ms->lineSize, 0));
|
|
|
|
strokeRect.moveTo(srcRect.left, srcRect.top);
|
2022-06-15 17:21:31 +02:00
|
|
|
Graphics::MacPlotData plotStroke(dst, nullptr, &d->getPatterns(), strokePattern, strokeRect.left + wpos.x, strokeRect.top + wpos.y, ms->lineSize, ms->backColor);
|
2021-10-09 09:41:27 +08:00
|
|
|
|
|
|
|
switch (ms->spriteType) {
|
|
|
|
case kRectangleSprite:
|
|
|
|
ms->pd = &plotFill;
|
2022-07-13 23:22:35 +02:00
|
|
|
Graphics::drawFilledRect1(fillAreaRect, ms->foreColor, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
// fall through
|
|
|
|
case kOutlinedRectangleSprite:
|
|
|
|
// if we have lineSize <= 0, means we are not drawing anything. so we may return directly.
|
|
|
|
if (ms->lineSize <= 0)
|
|
|
|
break;
|
|
|
|
ms->pd = &plotStroke;
|
2022-06-17 01:03:21 +02:00
|
|
|
|
|
|
|
if (!outline)
|
|
|
|
ms->tile = nullptr;
|
|
|
|
|
2022-07-13 23:22:35 +02:00
|
|
|
Graphics::drawRect1(strokeRect, ms->foreColor, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
break;
|
|
|
|
case kRoundedRectangleSprite:
|
|
|
|
ms->pd = &plotFill;
|
2022-07-13 23:22:35 +02:00
|
|
|
Graphics::drawRoundRect1(fillAreaRect, 12, ms->foreColor, true, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
// fall through
|
|
|
|
case kOutlinedRoundedRectangleSprite:
|
|
|
|
if (ms->lineSize <= 0)
|
|
|
|
break;
|
|
|
|
ms->pd = &plotStroke;
|
2022-06-17 01:03:21 +02:00
|
|
|
|
|
|
|
if (!outline)
|
|
|
|
ms->tile = nullptr;
|
|
|
|
|
2022-07-13 23:22:35 +02:00
|
|
|
Graphics::drawRoundRect1(strokeRect, 12, ms->foreColor, false, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
break;
|
|
|
|
case kOvalSprite:
|
|
|
|
ms->pd = &plotFill;
|
2022-06-12 15:52:29 +02:00
|
|
|
Graphics::drawEllipse(fillAreaRect.left, fillAreaRect.top, fillAreaRect.right, fillAreaRect.bottom, ms->foreColor, true, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
// fall through
|
|
|
|
case kOutlinedOvalSprite:
|
|
|
|
if (ms->lineSize <= 0)
|
|
|
|
break;
|
|
|
|
ms->pd = &plotStroke;
|
2022-06-17 01:03:21 +02:00
|
|
|
|
|
|
|
if (!outline)
|
|
|
|
ms->tile = nullptr;
|
|
|
|
|
2022-06-12 15:52:29 +02:00
|
|
|
Graphics::drawEllipse(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, false, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
break;
|
|
|
|
case kLineTopBottomSprite:
|
|
|
|
ms->pd = &plotStroke;
|
2022-06-12 15:52:29 +02:00
|
|
|
Graphics::drawLine(strokeRect.left, strokeRect.top, strokeRect.right, strokeRect.bottom, ms->foreColor, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
break;
|
|
|
|
case kLineBottomTopSprite:
|
|
|
|
ms->pd = &plotStroke;
|
2022-06-12 15:52:29 +02:00
|
|
|
Graphics::drawLine(strokeRect.left, strokeRect.bottom, strokeRect.right, strokeRect.top, ms->foreColor, d->getInkDrawPixel(), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
break;
|
|
|
|
default:
|
|
|
|
warning("DirectorPlotData::inkBlitShape: Expected shape type but got type %d", ms->spriteType);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void DirectorPlotData::inkBlitSurface(Common::Rect &srcRect, const Graphics::Surface *mask) {
|
|
|
|
if (!srf)
|
|
|
|
return;
|
|
|
|
|
|
|
|
// TODO: Determine why colourization causes problems in Warlock
|
|
|
|
if (sprite == kTextSprite)
|
|
|
|
applyColor = false;
|
|
|
|
|
2022-11-01 23:11:32 +08:00
|
|
|
Common::Rect srfClip = srf->getBounds();
|
|
|
|
bool failedBoundsCheck = false;
|
|
|
|
|
2021-10-09 09:41:27 +08:00
|
|
|
srcPoint.y = abs(srcRect.top - destRect.top);
|
|
|
|
for (int i = 0; i < destRect.height(); i++, srcPoint.y++) {
|
2022-06-12 15:52:29 +02:00
|
|
|
if (d->_wm->_pixelformat.bytesPerPixel == 1) {
|
2021-10-09 09:41:27 +08:00
|
|
|
srcPoint.x = abs(srcRect.left - destRect.left);
|
|
|
|
const byte *msk = mask ? (const byte *)mask->getBasePtr(srcPoint.x, srcPoint.y) : nullptr;
|
|
|
|
|
|
|
|
for (int j = 0; j < destRect.width(); j++, srcPoint.x++) {
|
2022-11-01 23:11:32 +08:00
|
|
|
if (!srfClip.contains(srcPoint)) {
|
|
|
|
failedBoundsCheck = true;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2021-10-09 09:41:27 +08:00
|
|
|
if (!mask || (msk && !(*msk++))) {
|
2022-06-12 15:52:29 +02:00
|
|
|
(d->getInkDrawPixel())(destRect.left + j, destRect.top + i,
|
2021-10-09 09:41:27 +08:00
|
|
|
preprocessColor(*((byte *)srf->getBasePtr(srcPoint.x, srcPoint.y))), this);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
srcPoint.x = abs(srcRect.left - destRect.left);
|
|
|
|
const uint32 *msk = mask ? (const uint32 *)mask->getBasePtr(srcPoint.x, srcPoint.y) : nullptr;
|
|
|
|
|
|
|
|
for (int j = 0; j < destRect.width(); j++, srcPoint.x++) {
|
2022-11-01 23:11:32 +08:00
|
|
|
if (!srfClip.contains(srcPoint)) {
|
|
|
|
failedBoundsCheck = true;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
|
2021-10-09 09:41:27 +08:00
|
|
|
if (!mask || (msk && !(*msk++))) {
|
2022-06-12 15:52:29 +02:00
|
|
|
(d->getInkDrawPixel())(destRect.left + j, destRect.top + i,
|
2021-10-09 11:30:30 +08:00
|
|
|
preprocessColor(*((uint32 *)srf->getBasePtr(srcPoint.x, srcPoint.y))), this);
|
2021-10-09 09:41:27 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2022-11-01 23:11:32 +08:00
|
|
|
|
|
|
|
if (failedBoundsCheck) {
|
|
|
|
warning("DirectorPlotData::inkBlitSurface: Out of bounds - srfClip: %d,%d,%d,%d, srcRect: %d,%d,%d,%d, dstRect: %d,%d,%d,%d",
|
|
|
|
srfClip.left, srfClip.top, srfClip.right, srfClip.bottom,
|
|
|
|
srcRect.left, srcRect.top, srcRect.right, srcRect.bottom,
|
|
|
|
destRect.left, destRect.top, destRect.right, destRect.bottom);
|
|
|
|
}
|
|
|
|
|
2021-10-09 09:41:27 +08:00
|
|
|
}
|
|
|
|
|
2020-08-21 00:35:36 +02:00
|
|
|
} // End of namespace Director
|