ImageInfo.cpp 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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. // FILE: ImageInfo.cpp ////////////////////////////////////////////////////////
  19. //-----------------------------------------------------------------------------
  20. //
  21. // Westwood Studios Pacific.
  22. //
  23. // Confidential Information
  24. // Copyright (C) 2001 - All Rights Reserved
  25. //
  26. //-----------------------------------------------------------------------------
  27. //
  28. // Project: ImagePacker
  29. //
  30. // File name: ImageInfo.cpp
  31. //
  32. // Created: Colin Day, August 2001
  33. //
  34. // Desc: Image information struct for images to pack into
  35. // the texture pages
  36. //
  37. //-----------------------------------------------------------------------------
  38. ///////////////////////////////////////////////////////////////////////////////
  39. // SYSTEM INCLUDES ////////////////////////////////////////////////////////////
  40. #include <stdlib.h>
  41. // USER INCLUDES //////////////////////////////////////////////////////////////
  42. #include "ImageInfo.h"
  43. // DEFINES ////////////////////////////////////////////////////////////////////
  44. // PRIVATE TYPES //////////////////////////////////////////////////////////////
  45. // PRIVATE DATA ///////////////////////////////////////////////////////////////
  46. // PUBLIC DATA ////////////////////////////////////////////////////////////////
  47. // PRIVATE PROTOTYPES /////////////////////////////////////////////////////////
  48. // PRIVATE FUNCTIONS //////////////////////////////////////////////////////////
  49. ///////////////////////////////////////////////////////////////////////////////
  50. // PUBLIC FUNCTIONS ///////////////////////////////////////////////////////////
  51. ///////////////////////////////////////////////////////////////////////////////
  52. // ImageInfo::ImageInfo =======================================================
  53. /** */
  54. //=============================================================================
  55. ImageInfo::ImageInfo( void )
  56. {
  57. m_area = 0;
  58. m_colorDepth = 0;
  59. m_size.x = 0;
  60. m_size.y = 0;
  61. m_path = NULL;
  62. m_filenameOnly = NULL;
  63. m_filenameOnlyNoExt = NULL;
  64. m_status = UNPACKED;
  65. m_page = NULL;
  66. m_nextPageImage = NULL;
  67. m_prevPageImage = NULL;
  68. m_pagePos.lo.x = 0;
  69. m_pagePos.lo.y = 0;
  70. m_pagePos.hi.x = 0;
  71. m_pagePos.hi.y = 0;
  72. m_fitBits = 0;
  73. m_gutterUsed.x = 0;
  74. m_gutterUsed.y = 0;
  75. } // end ImageInfo
  76. // ImageInfo::~ImageInfo ======================================================
  77. /** */
  78. //=============================================================================
  79. ImageInfo::~ImageInfo( void )
  80. {
  81. // delete path name
  82. if( m_path )
  83. delete [] m_path;
  84. if( m_filenameOnly )
  85. delete [] m_filenameOnly;
  86. if( m_filenameOnlyNoExt )
  87. delete [] m_filenameOnlyNoExt;
  88. } // end ~ImageInfo