GameMtlForm.cpp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** 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 ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Max2W3d *
  23. * *
  24. * $Archive:: /Commando/Code/Tools/max2w3d/GameMtlForm.cpp $*
  25. * *
  26. * Author:: Greg Hjelstrom *
  27. * *
  28. * $Modtime:: 1/09/02 5:29p $*
  29. * *
  30. * $Revision:: 4 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * GameMtlFormClass::GameMtlFormClass -- constructor *
  35. * GameMtlFormClass::SetThing -- Set the material being edited by this form *
  36. * GameMtlFormClass::GetThing -- get the material being edited by this form *
  37. * GameMtlFormClass::DeleteThis -- delete myself *
  38. * GameMtlFormClass::ClassID -- returns the classID of the object being edited *
  39. * GameMtlFormClass::SetTime -- set the current time *
  40. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  41. #include "GameMtlForm.h"
  42. #include "GameMtl.h"
  43. /***********************************************************************************************
  44. * GameMtlFormClass::GameMtlFormClass -- constructor *
  45. * *
  46. * INPUT: *
  47. * *
  48. * OUTPUT: *
  49. * *
  50. * WARNINGS: *
  51. * *
  52. * HISTORY: *
  53. * 11/23/98 GTH : Created. *
  54. *=============================================================================================*/
  55. GameMtlFormClass::GameMtlFormClass
  56. (
  57. IMtlParams * imtl_params,
  58. GameMtl * mtl,
  59. int pass
  60. )
  61. {
  62. #if !defined W3D_GMAXDEV
  63. IParams = imtl_params;
  64. #else
  65. IParams = new FakeIMtlParams;
  66. #endif
  67. TheMtl = mtl;
  68. PassIndex = pass;
  69. }
  70. /***********************************************************************************************
  71. * GameMtlFormClass::SetThing -- Set the material being edited by this form *
  72. * *
  73. * INPUT: *
  74. * *
  75. * OUTPUT: *
  76. * *
  77. * WARNINGS: *
  78. * *
  79. * HISTORY: *
  80. * 11/23/98 GTH : Created. *
  81. *=============================================================================================*/
  82. void GameMtlFormClass::SetThing(ReferenceTarget * target)
  83. {
  84. assert (target->SuperClassID()==MATERIAL_CLASS_ID);
  85. assert (target->ClassID()==GameMaterialClassID);
  86. TheMtl = (GameMtl *)target;
  87. }
  88. /***********************************************************************************************
  89. * GameMtlFormClass::GetThing -- get the material being edited by this form *
  90. * *
  91. * INPUT: *
  92. * *
  93. * OUTPUT: *
  94. * *
  95. * WARNINGS: *
  96. * *
  97. * HISTORY: *
  98. * 11/23/98 GTH : Created. *
  99. *=============================================================================================*/
  100. ReferenceTarget * GameMtlFormClass::GetThing(void)
  101. {
  102. return (ReferenceTarget*)TheMtl;
  103. }
  104. /***********************************************************************************************
  105. * GameMtlFormClass::DeleteThis -- delete myself *
  106. * *
  107. * INPUT: *
  108. * *
  109. * OUTPUT: *
  110. * *
  111. * WARNINGS: *
  112. * *
  113. * HISTORY: *
  114. * 11/23/98 GTH : Created. *
  115. *=============================================================================================*/
  116. void GameMtlFormClass::DeleteThis(void)
  117. {
  118. delete this;
  119. }
  120. /***********************************************************************************************
  121. * GameMtlFormClass::ClassID -- returns the classID of the object being edited *
  122. * *
  123. * INPUT: *
  124. * *
  125. * OUTPUT: *
  126. * *
  127. * WARNINGS: *
  128. * *
  129. * HISTORY: *
  130. * 11/23/98 GTH : Created. *
  131. *=============================================================================================*/
  132. Class_ID GameMtlFormClass::ClassID()
  133. {
  134. return GameMaterialClassID;
  135. }
  136. /***********************************************************************************************
  137. * GameMtlFormClass::SetTime -- set the current time *
  138. * *
  139. * INPUT: *
  140. * *
  141. * OUTPUT: *
  142. * *
  143. * WARNINGS: *
  144. * *
  145. * HISTORY: *
  146. * 11/23/98 GTH : Created. *
  147. *=============================================================================================*/
  148. void GameMtlFormClass::SetTime(TimeValue t)
  149. {
  150. // child dialog classes don't have to support
  151. // the SetTime function.
  152. }