ShaderInfo.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*
  2. ===========================================================================
  3. Copyright (C) 1999-2005 Id Software, Inc.
  4. This file is part of Quake III Arena source code.
  5. Quake III Arena source code is free software; you can redistribute it
  6. and/or modify it under the terms of the GNU General Public License as
  7. published by the Free Software Foundation; either version 2 of the License,
  8. or (at your option) any later version.
  9. Quake III Arena source code is distributed in the hope that it will be
  10. useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with Foobar; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  16. ===========================================================================
  17. */
  18. // ShaderInfo.cpp: implementation of the CShaderInfo class.
  19. //
  20. //////////////////////////////////////////////////////////////////////
  21. #include "stdafx.h"
  22. #include "Radiant.h"
  23. #include "ShaderInfo.h"
  24. #ifdef _DEBUG
  25. #undef THIS_FILE
  26. static char THIS_FILE[]=__FILE__;
  27. #define new DEBUG_NEW
  28. #endif
  29. //////////////////////////////////////////////////////////////////////
  30. // Construction/Destruction
  31. //////////////////////////////////////////////////////////////////////
  32. CShaderInfo::CShaderInfo()
  33. {
  34. m_fTransValue = 1.0;
  35. m_nFlags = 0;
  36. m_pQTexture = NULL;
  37. }
  38. CShaderInfo::~CShaderInfo()
  39. {
  40. }
  41. void CShaderInfo::Parse(const char *pName)
  42. {
  43. }
  44. void CShaderInfo::setName(char *pName)
  45. {
  46. //--char path[1024];
  47. //--strcpy(path, pName);
  48. //--DefaultExtension(path, ".tga");
  49. m_strName = pName;
  50. m_strName.MakeLower();
  51. if (m_strName.Find("textures") == 0)
  52. {
  53. CString s = m_strName.Right(m_strName.GetLength() - strlen("textures") - 1);
  54. m_strName = s;
  55. }
  56. }