mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-27 04:35:52 +01:00
1a2ccb8f50
Conflicts: Sources/Ecc/Parser.cpp Sources/Ecc/Scanner.cpp Sources/Engine/Base/Scanner.cpp Sources/Engine/GameAgent/GameAgent.cpp Sources/Engine/Graphics/Gfx_wrapper.h Sources/Engine/Network/Network.cpp Sources/Engine/Sound/SoundDecoder.h Sources/Engine/Templates/HashTableTemplate.cpp Sources/Engine/Terrain/Terrain.h Sources/EntitiesMP/ParticleCloudsHolder.es Sources/EntitiesMP/ParticleCloudsMarker.es Sources/SeriousSam/CDCheck.h Sources/SeriousSam/Menu.cpp Sources/SeriousSam/MenuGadgets.cpp Sources/SeriousSam/SeriousSam.cpp Sources/SeriousSam/SplashScreen.cpp Sources/SeriousSam/StdH.cpp Sources/SeriousSam/StdH.h Sources/Shaders/StdH.cpp
65 lines
1.6 KiB
C++
65 lines
1.6 KiB
C++
/* Copyright (c) 2002-2012 Croteam Ltd.
|
|
This program is free software; you can redistribute it and/or modify
|
|
it under the terms of version 2 of the GNU General Public License as published by
|
|
the Free Software Foundation
|
|
|
|
|
|
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. */
|
|
|
|
#include "Engine/StdH.h"
|
|
|
|
#include <Engine/Graphics/DisplayMode.h>
|
|
#include <Engine/Base/Translation.h>
|
|
|
|
/*
|
|
* Default constructor.
|
|
*/
|
|
CDisplayMode::CDisplayMode(void)
|
|
{
|
|
// clear all members
|
|
dm_pixSizeI = 0;
|
|
dm_pixSizeJ = 0;
|
|
dm_ddDepth = DD_DEFAULT;
|
|
}
|
|
|
|
|
|
// get depth string
|
|
CTString CDisplayMode::DepthString(void) const
|
|
{
|
|
switch (dm_ddDepth) {
|
|
case DD_NODEPTH: return "none"; break;
|
|
case DD_16BIT: return "16"; break;
|
|
case DD_32BIT: return "32"; break;
|
|
case DD_DEFAULT: return TRANS("desktop"); break;
|
|
default: ASSERT(FALSE); return TRANS("unknown"); break;
|
|
}
|
|
}
|
|
|
|
|
|
// check if mode is dualhead
|
|
BOOL CDisplayMode::IsDualHead(void)
|
|
{
|
|
// if size is 8:3 it is dual head
|
|
return dm_pixSizeI*3==dm_pixSizeJ*8;
|
|
}
|
|
|
|
|
|
// check if mode is widescreen
|
|
BOOL CDisplayMode::IsWideScreen(void)
|
|
{
|
|
// only this one supported as widescreen
|
|
return dm_pixSizeI==856 && dm_pixSizeJ==480;
|
|
}
|
|
// check if mode is fullscreen
|
|
BOOL CDisplayMode::IsFullScreen(void)
|
|
{
|
|
return dm_pixSizeI!=0 && dm_pixSizeJ!=0;
|
|
}
|