OPTIONS.H 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. //
  2. // Copyright 2020 Electronic Arts Inc.
  3. //
  4. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is free
  5. // software: you can redistribute it and/or modify it under the terms of
  6. // the GNU General Public License as published by the Free Software Foundation,
  7. // either version 3 of the License, or (at your option) any later version.
  8. // TiberianDawn.DLL and RedAlert.dll and corresponding source code is distributed
  9. // in the hope that it will be useful, but with permitted additional restrictions
  10. // under Section 7 of the GPL. See the GNU General Public License in LICENSE.TXT
  11. // distributed with this program. You should have received a copy of the
  12. // GNU General Public License along with permitted additional restrictions
  13. // with this program. If not, see https://github.com/electronicarts/CnC_Remastered_Collection
  14. /* $Header: /CounterStrike/OPTIONS.H 1 3/03/97 10:25a Joe_bostic $ */
  15. /***********************************************************************************************
  16. *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
  17. ***********************************************************************************************
  18. * *
  19. * Project Name : Command & Conquer *
  20. * *
  21. * File Name : OPTIONS.H *
  22. * *
  23. * Programmer : Joe L. Bostic *
  24. * *
  25. * Start Date : June 8, 1994 *
  26. * *
  27. * Last Update : June 8, 1994 [JLB] *
  28. * *
  29. *---------------------------------------------------------------------------------------------*
  30. * Functions: *
  31. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  32. #ifndef OPTIONS_H
  33. #define OPTIONS_H
  34. class OptionsClass {
  35. public:
  36. enum {
  37. MAX_SCROLL_SETTING=7,
  38. MAX_SPEED_SETTING=7
  39. };
  40. OptionsClass(void);
  41. void One_Time(void);
  42. void Process(void);
  43. void Fixup_Palette(void) const;
  44. void Set_Shuffle(int on);
  45. void Set_Repeat(int on);
  46. void Set_Score_Volume(fixed volume, bool feedback);
  47. void Set_Sound_Volume(fixed volume, bool feedback);
  48. void Set_Brightness(fixed brightness);
  49. fixed Get_Brightness(void) const;
  50. void Set_Saturation(fixed color);
  51. fixed Get_Saturation(void) const;
  52. void Set_Contrast(fixed contrast);
  53. fixed Get_Contrast(void) const;
  54. void Set_Tint(fixed tint);
  55. fixed Get_Tint(void) const;
  56. int Normalize_Delay(int delay) const;
  57. int Normalize_Volume(int volume) const;
  58. /*
  59. ** File I/O routines
  60. */
  61. void Load_Settings(void);
  62. void Save_Settings(void);
  63. void Set(void);
  64. /*
  65. ** This is actually the delay between game frames expressed as 1/60 of
  66. ** a second. The default value is 4 (1/15 second).
  67. */
  68. unsigned int GameSpeed;
  69. int ScrollRate; // Distance to scroll.
  70. fixed Volume; // Volume for sound effects.
  71. fixed ScoreVolume; // Volume for scores.
  72. #ifdef FIXIT_VERSION_3
  73. fixed MultiScoreVolume; // Volume for scores during multiplayer games.
  74. #endif
  75. fixed Brightness; // Brightness.
  76. fixed Tint; // Hue
  77. fixed Saturation; // Saturation
  78. fixed Contrast; // Value
  79. unsigned AutoScroll:1; // Does map autoscroll?
  80. unsigned IsScoreRepeat:1; // Score should repeat?
  81. unsigned IsScoreShuffle:1; // Score list should shuffle?
  82. unsigned IsPaletteScroll:1;// Allow palette scrolling?
  83. /*
  84. ** These are the hotkeys used for keyboard control.
  85. */
  86. KeyNumType KeyForceMove1;
  87. KeyNumType KeyForceMove2;
  88. KeyNumType KeyForceAttack1;
  89. KeyNumType KeyForceAttack2;
  90. KeyNumType KeySelect1;
  91. KeyNumType KeySelect2;
  92. KeyNumType KeyScatter;
  93. KeyNumType KeyStop;
  94. KeyNumType KeyGuard;
  95. KeyNumType KeyNext;
  96. KeyNumType KeyPrevious;
  97. KeyNumType KeyFormation;
  98. KeyNumType KeyHome1;
  99. KeyNumType KeyHome2;
  100. KeyNumType KeyBase;
  101. KeyNumType KeyResign;
  102. KeyNumType KeyAlliance;
  103. KeyNumType KeyBookmark1;
  104. KeyNumType KeyBookmark2;
  105. KeyNumType KeyBookmark3;
  106. KeyNumType KeyBookmark4;
  107. KeyNumType KeySelectView;
  108. KeyNumType KeyRepair;
  109. KeyNumType KeyRepairOn;
  110. KeyNumType KeyRepairOff;
  111. KeyNumType KeySell;
  112. KeyNumType KeySellOn;
  113. KeyNumType KeySellOff;
  114. KeyNumType KeyMap;
  115. KeyNumType KeySidebarUp;
  116. KeyNumType KeySidebarDown;
  117. KeyNumType KeyOption1;
  118. KeyNumType KeyOption2;
  119. KeyNumType KeyScrollLeft;
  120. KeyNumType KeyScrollRight;
  121. KeyNumType KeyScrollUp;
  122. KeyNumType KeyScrollDown;
  123. KeyNumType KeyQueueMove1;
  124. KeyNumType KeyQueueMove2;
  125. KeyNumType KeyTeam1;
  126. KeyNumType KeyTeam2;
  127. KeyNumType KeyTeam3;
  128. KeyNumType KeyTeam4;
  129. KeyNumType KeyTeam5;
  130. KeyNumType KeyTeam6;
  131. KeyNumType KeyTeam7;
  132. KeyNumType KeyTeam8;
  133. KeyNumType KeyTeam9;
  134. KeyNumType KeyTeam10;
  135. void Adjust_Palette(PaletteClass const & oldpal, PaletteClass & newpal, fixed brightness, fixed color, fixed tint, fixed contrast) const;
  136. protected:
  137. private:
  138. static char const * const HotkeyName;
  139. };
  140. #endif