This repository has been archived on 2025-02-27. You can view files and clone it, but cannot push or open issues or pull requests.
CnC_Renegade/Code/Tools/max2w3d/GameMtlForm.cpp

168 lines
10 KiB
C++

/*
** Command & Conquer Renegade(tm)
** Copyright 2025 Electronic Arts Inc.
**
** This program is free software: you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation, either version 3 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/***********************************************************************************************
*** 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 ***
***********************************************************************************************
* *
* Project Name : Max2W3d *
* *
* $Archive:: /Commando/Code/Tools/max2w3d/GameMtlForm.cpp $*
* *
* Author:: Greg Hjelstrom *
* *
* $Modtime:: 1/09/02 5:29p $*
* *
* $Revision:: 4 $*
* *
*---------------------------------------------------------------------------------------------*
* Functions: *
* GameMtlFormClass::GameMtlFormClass -- constructor *
* GameMtlFormClass::SetThing -- Set the material being edited by this form *
* GameMtlFormClass::GetThing -- get the material being edited by this form *
* GameMtlFormClass::DeleteThis -- delete myself *
* GameMtlFormClass::ClassID -- returns the classID of the object being edited *
* GameMtlFormClass::SetTime -- set the current time *
* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#include "GameMtlForm.h"
#include "GameMtl.h"
/***********************************************************************************************
* GameMtlFormClass::GameMtlFormClass -- constructor *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
GameMtlFormClass::GameMtlFormClass
(
IMtlParams * imtl_params,
GameMtl * mtl,
int pass
)
{
#if !defined W3D_GMAXDEV
IParams = imtl_params;
#else
IParams = new FakeIMtlParams;
#endif
TheMtl = mtl;
PassIndex = pass;
}
/***********************************************************************************************
* GameMtlFormClass::SetThing -- Set the material being edited by this form *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
void GameMtlFormClass::SetThing(ReferenceTarget * target)
{
assert (target->SuperClassID()==MATERIAL_CLASS_ID);
assert (target->ClassID()==GameMaterialClassID);
TheMtl = (GameMtl *)target;
}
/***********************************************************************************************
* GameMtlFormClass::GetThing -- get the material being edited by this form *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
ReferenceTarget * GameMtlFormClass::GetThing(void)
{
return (ReferenceTarget*)TheMtl;
}
/***********************************************************************************************
* GameMtlFormClass::DeleteThis -- delete myself *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
void GameMtlFormClass::DeleteThis(void)
{
delete this;
}
/***********************************************************************************************
* GameMtlFormClass::ClassID -- returns the classID of the object being edited *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
Class_ID GameMtlFormClass::ClassID()
{
return GameMaterialClassID;
}
/***********************************************************************************************
* GameMtlFormClass::SetTime -- set the current time *
* *
* INPUT: *
* *
* OUTPUT: *
* *
* WARNINGS: *
* *
* HISTORY: *
* 11/23/98 GTH : Created. *
*=============================================================================================*/
void GameMtlFormClass::SetTime(TimeValue t)
{
// child dialog classes don't have to support
// the SetTime function.
}