root/cafu/trunk/Libs/PlatformAux.hpp

Revision 457, 3.5 KB (checked in by Carsten, 4 months ago)

Using UltraEdit's multi-line search-and-replace-in-files feature, replaced


^#ifndef _(CAFU|CF|CFS|CA)_(.*)_$
^#define _\1_\2_$

with

#ifndef CAFU_\2_INCLUDED
#define CAFU_\2_INCLUDED

and


^#ifndef _(.*)_HPP_$
^#define _\1_HPP_$

with

#ifndef CAFU_\1_HPP_INCLUDED
#define CAFU_\1_HPP_INCLUDED

Closes #91.

Line 
1/*
2=================================================================================
3This file is part of Cafu, the open-source game engine and graphics engine
4for multiplayer, cross-platform, real-time 3D action.
5Copyright (C) 2002-2012 Carsten Fuchs Software.
6
7Cafu is free software: you can redistribute it and/or modify it under the terms
8of the GNU General Public License as published by the Free Software Foundation,
9either version 3 of the License, or (at your option) any later version.
10
11Cafu is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
12without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
13PURPOSE. See the GNU General Public License for more details.
14
15You should have received a copy of the GNU General Public License
16along with Cafu. If not, see <http://www.gnu.org/licenses/>.
17
18For support and more information about Cafu, visit us at <http://www.cafu.de>.
19=================================================================================
20*/
21
22#ifndef CAFU_PLATFORM_AUX_HPP_INCLUDED
23#define CAFU_PLATFORM_AUX_HPP_INCLUDED
24
25#ifdef _WIN32
26#define WIN32_LEAN_AND_MEAN
27#include <windows.h>
28#elif __linux__
29#define HMODULE void*
30#endif
31
32#include <string>
33
34namespace MatSys
35{
36    class RendererI;
37    class TextureMapManagerI;
38}
39
40class SoundSysI;
41
42
43namespace PlatformAux
44{
45    /// Returns a file suffix that indicates the platform, the compiler, and the debug/release switch setting.
46    /// Examples include "_win32_ow_r", "_li686_g++_d", etc.
47    /// @return   The suffix that indicates the platform, compiler, and debug/release built.
48    std::string GetEnvFileSuffix();
49
50    /// Gets the renderer by name.
51    /// @param DLLName         The path and full name of the desired renderer DLL, e.g. "Renderers/RendererNull_win32_vc60_r.dll".
52    /// @param OutRendererDLL  On success, returns the DLL handle of the renderer.
53    /// @return   On success, the pointer to the implementation of the MatSys::RendererI. NULL on failure.
54    MatSys::RendererI* GetRenderer(const std::string& DLLName, HMODULE& OutRendererDLL);
55
56    /// Auto-selects the "best" renderer from the "Renderers/" subdirectory.
57    /// @param OutRendererDLL On success, returns the DLL handle of the best renderer.
58    /// @return   On success, the pointer to the implementation of the best MatSys::RendererI. NULL on failure.
59    MatSys::RendererI* GetBestRenderer(HMODULE& OutRendererDLL);
60
61    /// Returns the MatSys::TextureMapManagerI implementation of the RendererDLL.
62    /// @param RendererDLL   The renderer DLL for which the texture manager should be returned.
63    /// @return   On success the MatSys::TextureMapManagerI implementation of the RendererDLL. NULL on failure.
64    MatSys::TextureMapManagerI* GetTextureMapManager(HMODULE RendererDLL);
65
66    /// Gets the sound system by name.
67    /// @param DLLName         The path and full name of the desired sound system DLL.
68    /// @param OutSoundSysDLL  On success, returns the DLL handle of the sound system.
69    /// @return On success, the pointer to the implementation of the SoundSysI. NULL on failure.
70    SoundSysI* GetSoundSys(const std::string& DLLName, HMODULE& OutSoundSysDLL);
71
72    /// Auto-selects the "best" sound system from the "SoundSys/" subdirectory.
73    /// @param  OutSoundSysDLL On success, returns the DLL handle of the best sound system.
74    /// @return On success, the pointer to the implementation of the best SoundSysI. NULL on failure.
75    SoundSysI* GetBestSoundSys(HMODULE& OutSoundSysDLL);
76
77}
78
79#endif
Note: See TracBrowser for help on using the browser.