DlgVideoQuality.cpp 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /* Copyright (c) 2002-2012 Croteam Ltd.
  2. This program is free software; you can redistribute it and/or modify
  3. it under the terms of version 2 of the GNU General Public License as published by
  4. the Free Software Foundation
  5. This program is distributed in the hope that it will be useful,
  6. but WITHOUT ANY WARRANTY; without even the implied warranty of
  7. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  8. GNU General Public License for more details.
  9. You should have received a copy of the GNU General Public License along
  10. with this program; if not, write to the Free Software Foundation, Inc.,
  11. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
  12. // DlgVideoQuality.cpp : implementation file
  13. //
  14. #include "stdafx.h"
  15. #ifdef _DEBUG
  16. #undef new
  17. #define new DEBUG_NEW
  18. #undef THIS_FILE
  19. static char THIS_FILE[] = __FILE__;
  20. #endif
  21. /////////////////////////////////////////////////////////////////////////////
  22. // CDlgVideoQuality dialog
  23. CDlgVideoQuality::CDlgVideoQuality(CWnd* pParent /*=NULL*/)
  24. : CDialog(CDlgVideoQuality::IDD, pParent)
  25. {
  26. //{{AFX_DATA_INIT(CDlgVideoQuality)
  27. m_radioObjectShadowQuality = -1;
  28. m_radioTextureQuality = -1;
  29. m_radioWorldShadowQuality = -1;
  30. //}}AFX_DATA_INIT
  31. }
  32. void CDlgVideoQuality::DoDataExchange(CDataExchange* pDX)
  33. {
  34. CDialog::DoDataExchange(pDX);
  35. // if dialog is recieving data
  36. if( pDX->m_bSaveAndValidate == FALSE)
  37. {
  38. // set current state of texture quality radio button
  39. /* switch( Flesh.gm_tqTextureQuality)
  40. {
  41. case CGame::TQ_LOW: { m_radioTextureQuality = 0; break; }
  42. case CGame::TQ_MEDIUM: { m_radioTextureQuality = 1; break; }
  43. case CGame::TQ_HIGH: { m_radioTextureQuality = 2; break; }
  44. default: { ASSERTALWAYS( "Illegal texture quality value found!"); }
  45. }
  46. // set current state of object shadow quality radio button
  47. switch( Flesh.gm_osqObjectShadowQuality)
  48. {
  49. case CGame::OSQ_OFF: { m_radioObjectShadowQuality = 0; break; }
  50. case CGame::OSQ_LOW: { m_radioObjectShadowQuality = 1; break; }
  51. case CGame::OSQ_HIGH: { m_radioObjectShadowQuality = 2; break; }
  52. default: { ASSERTALWAYS( "Illegal object shadow quality value found!"); }
  53. }
  54. // set current state of world shadow quality radio button
  55. switch( Flesh.gm_wsqWorldShadowQuality)
  56. {
  57. case CGame::WSQ_LOW: { m_radioWorldShadowQuality = 0; break; }
  58. case CGame::WSQ_MEDIUM: { m_radioWorldShadowQuality = 1; break; }
  59. case CGame::WSQ_HIGH: { m_radioWorldShadowQuality = 2; break; }
  60. default: { ASSERTALWAYS( "Illegal world shadow quality value found!"); }
  61. }
  62. */
  63. }
  64. //{{AFX_DATA_MAP(CDlgVideoQuality)
  65. DDX_Radio(pDX, IDC_OBJECT_SHADOW_QUALITY, m_radioObjectShadowQuality);
  66. DDX_Radio(pDX, IDC_TEXTURE_QUALITY, m_radioTextureQuality);
  67. DDX_Radio(pDX, IDC_WORLD_SHADOW_QUALITY, m_radioWorldShadowQuality);
  68. //}}AFX_DATA_MAP
  69. // if dialog is giving data
  70. if( pDX->m_bSaveAndValidate != FALSE)
  71. {
  72. // pick up states of texture quality radio button
  73. /* switch( m_radioTextureQuality)
  74. {
  75. case 0: { Flesh.gm_tqTextureQuality = CGame::TQ_LOW; break; }
  76. case 1: { Flesh.gm_tqTextureQuality = CGame::TQ_MEDIUM; break; }
  77. case 2: { Flesh.gm_tqTextureQuality = CGame::TQ_HIGH; break; }
  78. default: { ASSERTALWAYS( "Illegal texture quality radio value found!"); }
  79. }
  80. // pick up states of object shadow quality radio button
  81. switch( m_radioObjectShadowQuality)
  82. {
  83. case 0: { Flesh.gm_osqObjectShadowQuality = CGame::OSQ_OFF; break; }
  84. case 1: { Flesh.gm_osqObjectShadowQuality = CGame::OSQ_LOW; break; }
  85. case 2: { Flesh.gm_osqObjectShadowQuality = CGame::OSQ_HIGH; break; }
  86. default: { ASSERTALWAYS( "Illegal object shadow quality radio value found!"); }
  87. }
  88. // pick up states of world shadow quality radio button
  89. switch( m_radioWorldShadowQuality)
  90. {
  91. case 0: { Flesh.gm_wsqWorldShadowQuality = CGame::WSQ_LOW; break; }
  92. case 1: { Flesh.gm_wsqWorldShadowQuality = CGame::WSQ_MEDIUM; break; }
  93. case 2: { Flesh.gm_wsqWorldShadowQuality = CGame::WSQ_HIGH; break; }
  94. default: { ASSERTALWAYS( "Illegal world shadow quality radio value found!"); }
  95. }
  96. */
  97. }
  98. }
  99. BEGIN_MESSAGE_MAP(CDlgVideoQuality, CDialog)
  100. //{{AFX_MSG_MAP(CDlgVideoQuality)
  101. // NOTE: the ClassWizard will add message map macros here
  102. //}}AFX_MSG_MAP
  103. END_MESSAGE_MAP()
  104. /////////////////////////////////////////////////////////////////////////////
  105. // CDlgVideoQuality message handlers