00001 00013 /*************************************************************************** 00014 * Copyright (C) 2007 by Jan Koci * 00015 * honza.koci@email.cz * 00016 * http://kengine.sourceforge.net/tutorial/ 00017 * * 00018 * This program is free software; you can redistribute it and/or modify * 00019 * it under the terms of the GNU General Public License as published by * 00020 * the Free Software Foundation; either version 2 of the License, or * 00021 * (at your option) any later version. * 00022 * * 00023 * This program is distributed in the hope that it will be useful, * 00024 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00025 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00026 * GNU General Public License for more details. * 00027 * * 00028 * You should have received a copy of the GNU General Public License * 00029 * along with this program; if not, write to the * 00030 * Free Software Foundation, Inc., * 00031 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00032 ***************************************************************************/ 00033 00034 #pragma once 00035 #include <SDL/SDL.h> 00036 #include <SDL/SDL_opengl.h> 00037 #include <SDL/SDL_image.h> 00038 #include "../../System/K3dDefines.h" 00039 00040 00041 00043 struct TGraphicOption 00044 { 00045 bool bFullscreen; 00046 int iWidth; 00047 int iHeight; 00048 int iColorBits; 00049 unsigned int uiFlags; 00050 int iNearPlane; 00051 int iFarPlane; 00052 int iFovy; 00053 SDL_Surface *ptScreen; 00054 }; 00055 00057 struct TTextureOption 00058 { 00059 bool bTexture; 00060 bool bMultitexture; 00061 bool bLightmap; 00062 float fGamma; 00063 bool bMipmap; 00064 bool bLinear; 00065 }; 00066 00068 struct TFontBmpOption 00069 { 00070 const char *strFont; 00071 bool bItalic; 00072 bool bDrawFps; 00073 bool bDrawCamPos; 00074 bool bDrawNumFaces; 00075 }; 00076 00078 struct TScriptOption 00079 { 00080 const char *strDefault; 00081 }; 00082 00083 class K3dOptionsData 00084 { 00085 TGraphicOption *m_pGraphicOption; 00086 TTextureOption *m_pTextureOption; 00087 TFontBmpOption *m_pFontBmpOption; 00088 TScriptOption *m_pScriptOption; 00089 public: 00090 K3dOptionsData() {} 00091 ~K3dOptionsData() {} 00092 00095 void SetGraphicOption ( TGraphicOption *_pGraphicOption ) 00096 { 00097 m_pGraphicOption = _pGraphicOption; 00098 } 00099 00102 TGraphicOption *GetGraphicOption() 00103 { 00104 return m_pGraphicOption; 00105 } 00106 00109 void SetTextureOption ( TTextureOption *_pTextureOption ) 00110 { 00111 m_pTextureOption = _pTextureOption; 00112 } 00115 TTextureOption *GetTextureOption() 00116 { 00117 return m_pTextureOption; 00118 } 00119 00122 void SetScriptOption ( TScriptOption *_pScriptOption ) 00123 { 00124 m_pScriptOption = _pScriptOption; 00125 } 00128 TScriptOption *GetScriptOption() 00129 { 00130 return m_pScriptOption; 00131 } 00132 00135 void SetFontBmpOption ( TFontBmpOption *_pFontBmpOption ) 00136 { 00137 m_pFontBmpOption = _pFontBmpOption; 00138 } 00141 TFontBmpOption *GetFontBmpOption() 00142 { 00143 return m_pFontBmpOption; 00144 } 00145 }; 00146