diff options
author | Max Horn | 2006-02-11 22:45:04 +0000 |
---|---|---|
committer | Max Horn | 2006-02-11 22:45:04 +0000 |
commit | 26ee630756ebdd7c96bccede0881a8c8b98e8f2b (patch) | |
tree | 26e378d5cf990a2b81c2c96e9e683a7f333b62e8 /engines/sword2/d_draw.cpp | |
parent | 2a9a0d4211b1ea5723f1409d91cb95de8984429e (diff) | |
download | scummvm-rg350-26ee630756ebdd7c96bccede0881a8c8b98e8f2b.tar.gz scummvm-rg350-26ee630756ebdd7c96bccede0881a8c8b98e8f2b.tar.bz2 scummvm-rg350-26ee630756ebdd7c96bccede0881a8c8b98e8f2b.zip |
Moved engines to the new engines/ directory
svn-id: r20582
Diffstat (limited to 'engines/sword2/d_draw.cpp')
-rw-r--r-- | engines/sword2/d_draw.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/engines/sword2/d_draw.cpp b/engines/sword2/d_draw.cpp new file mode 100644 index 0000000000..7f278996fb --- /dev/null +++ b/engines/sword2/d_draw.cpp @@ -0,0 +1,71 @@ +/* Copyright (C) 1994-1998 Revolution Software Ltd. + * Copyright (C) 2003-2006 The ScummVM project + * + * 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 2 + * 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * $URL$ + * $Id$ + */ + +#include "common/stdafx.h" +#include "common/system.h" +#include "sword2/sword2.h" +#include "sword2/mouse.h" + +namespace Sword2 { + +/** + * @return the graphics detail setting + */ + +int8 Screen::getRenderLevel() { + return _renderLevel; +} + +void Screen::setRenderLevel(int8 level) { + _renderLevel = level; + + switch (_renderLevel) { + case 0: + // Lowest setting: no fancy stuff + _renderCaps = 0; + break; + case 1: + // Medium-low setting: transparency-blending + _renderCaps = RDBLTFX_SPRITEBLEND; + break; + case 2: + // Medium-high setting: transparency-blending + shading + _renderCaps = RDBLTFX_SPRITEBLEND | RDBLTFX_SHADOWBLEND; + break; + case 3: + // Highest setting: transparency-blending + shading + + // edge-blending + improved stretching + _renderCaps = RDBLTFX_SPRITEBLEND | RDBLTFX_SHADOWBLEND | RDBLTFX_EDGEBLEND; + break; + } +} + +/** + * Fill the screen buffer with palette colour zero. Note that it does not + * touch the menu areas of the screen. + */ + +void Screen::clearScene() { + memset(_buffer + MENUDEEP * _screenWide, 0, _screenWide * RENDERDEEP); + _needFullRedraw = true; +} + +} // End of namespace Sword2 |