diff options
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h')
-rw-r--r-- | libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h | 158 |
1 files changed, 79 insertions, 79 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h b/libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h index 306e11a..b4de8ac 100644 --- a/libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h +++ b/libraries/irrlicht-1.8/source/Irrlicht/CVideoModeList.h | |||
@@ -1,79 +1,79 @@ | |||
1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt | 1 | // Copyright (C) 2002-2012 Nikolaus Gebhardt |
2 | // This file is part of the "Irrlicht Engine". | 2 | // This file is part of the "Irrlicht Engine". |
3 | // For conditions of distribution and use, see copyright notice in irrlicht.h | 3 | // For conditions of distribution and use, see copyright notice in irrlicht.h |
4 | 4 | ||
5 | #ifndef __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ | 5 | #ifndef __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ |
6 | #define __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ | 6 | #define __IRR_C_VIDEO_MODE_LIST_H_INCLUDED__ |
7 | 7 | ||
8 | #include "IVideoModeList.h" | 8 | #include "IVideoModeList.h" |
9 | #include "dimension2d.h" | 9 | #include "dimension2d.h" |
10 | #include "irrArray.h" | 10 | #include "irrArray.h" |
11 | 11 | ||
12 | namespace irr | 12 | namespace irr |
13 | { | 13 | { |
14 | namespace video | 14 | namespace video |
15 | { | 15 | { |
16 | 16 | ||
17 | class CVideoModeList : public IVideoModeList | 17 | class CVideoModeList : public IVideoModeList |
18 | { | 18 | { |
19 | public: | 19 | public: |
20 | 20 | ||
21 | //! constructor | 21 | //! constructor |
22 | CVideoModeList(); | 22 | CVideoModeList(); |
23 | 23 | ||
24 | //! Gets amount of video modes in the list. | 24 | //! Gets amount of video modes in the list. |
25 | virtual s32 getVideoModeCount() const; | 25 | virtual s32 getVideoModeCount() const; |
26 | 26 | ||
27 | //! Returns the screen size of a video mode in pixels. | 27 | //! Returns the screen size of a video mode in pixels. |
28 | virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const; | 28 | virtual core::dimension2d<u32> getVideoModeResolution(s32 modeNumber) const; |
29 | 29 | ||
30 | //! Returns the screen size of an optimal video mode in pixels. | 30 | //! Returns the screen size of an optimal video mode in pixels. |
31 | virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const; | 31 | virtual core::dimension2d<u32> getVideoModeResolution(const core::dimension2d<u32>& minSize, const core::dimension2d<u32>& maxSize) const; |
32 | 32 | ||
33 | //! Returns the pixel depth of a video mode in bits. | 33 | //! Returns the pixel depth of a video mode in bits. |
34 | virtual s32 getVideoModeDepth(s32 modeNumber) const; | 34 | virtual s32 getVideoModeDepth(s32 modeNumber) const; |
35 | 35 | ||
36 | //! Returns current desktop screen resolution. | 36 | //! Returns current desktop screen resolution. |
37 | virtual const core::dimension2d<u32>& getDesktopResolution() const; | 37 | virtual const core::dimension2d<u32>& getDesktopResolution() const; |
38 | 38 | ||
39 | //! Returns the pixel depth of a video mode in bits. | 39 | //! Returns the pixel depth of a video mode in bits. |
40 | virtual s32 getDesktopDepth() const; | 40 | virtual s32 getDesktopDepth() const; |
41 | 41 | ||
42 | //! adds a new mode to the list | 42 | //! adds a new mode to the list |
43 | void addMode(const core::dimension2d<u32>& size, s32 depth); | 43 | void addMode(const core::dimension2d<u32>& size, s32 depth); |
44 | 44 | ||
45 | void setDesktop(s32 desktopDepth, const core::dimension2d<u32>& desktopSize); | 45 | void setDesktop(s32 desktopDepth, const core::dimension2d<u32>& desktopSize); |
46 | 46 | ||
47 | private: | 47 | private: |
48 | 48 | ||
49 | struct SVideoMode | 49 | struct SVideoMode |
50 | { | 50 | { |
51 | core::dimension2d<u32> size; | 51 | core::dimension2d<u32> size; |
52 | s32 depth; | 52 | s32 depth; |
53 | 53 | ||
54 | bool operator==(const SVideoMode& other) const | 54 | bool operator==(const SVideoMode& other) const |
55 | { | 55 | { |
56 | return size == other.size && depth == other.depth; | 56 | return size == other.size && depth == other.depth; |
57 | } | 57 | } |
58 | 58 | ||
59 | bool operator <(const SVideoMode& other) const | 59 | bool operator <(const SVideoMode& other) const |
60 | { | 60 | { |
61 | return (size.Width < other.size.Width || | 61 | return (size.Width < other.size.Width || |
62 | (size.Width == other.size.Width && | 62 | (size.Width == other.size.Width && |
63 | size.Height < other.size.Height) || | 63 | size.Height < other.size.Height) || |
64 | (size.Width == other.size.Width && | 64 | (size.Width == other.size.Width && |
65 | size.Height == other.size.Height && | 65 | size.Height == other.size.Height && |
66 | depth < other.depth)); | 66 | depth < other.depth)); |
67 | } | 67 | } |
68 | }; | 68 | }; |
69 | 69 | ||
70 | core::array<SVideoMode> VideoModes; | 70 | core::array<SVideoMode> VideoModes; |
71 | SVideoMode Desktop; | 71 | SVideoMode Desktop; |
72 | }; | 72 | }; |
73 | 73 | ||
74 | } // end namespace video | 74 | } // end namespace video |
75 | } // end namespace irr | 75 | } // end namespace irr |
76 | 76 | ||
77 | 77 | ||
78 | #endif | 78 | #endif |
79 | 79 | ||