Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

77 lines
2.0 KiB

  1. //===== Copyright � 2005-2006, Valve Corporation, All rights reserved. ======//
  2. //
  3. // Purpose: build a sheet data file and a large image out of multiple images
  4. //
  5. //===========================================================================//
  6. #include "materialobjects/dmesheetsequence.h"
  7. #include "datamodel/dmelementfactoryhelper.h"
  8. #include "tier0/dbg.h"
  9. // CDmeSheetImage
  10. //-----------------------------------------------------------------------------
  11. // Expose this class to the scene database
  12. //-----------------------------------------------------------------------------
  13. IMPLEMENT_ELEMENT_FACTORY( DmeSheetImage, CDmeSheetImage );
  14. void CDmeSheetImage::OnConstruction()
  15. {
  16. m_XCoord.Init( this, "xcoord" );
  17. m_YCoord.Init( this, "ycoord" );
  18. m_mapSequences.Init( this, "mapsequences" );
  19. }
  20. void CDmeSheetImage::OnDestruction()
  21. {
  22. }
  23. CDmeSheetSequence *CDmeSheetImage::FindSequence( int index )
  24. {
  25. if ( index < m_mapSequences.Count() )
  26. {
  27. return m_mapSequences[index];
  28. }
  29. return NULL;
  30. }
  31. // CDmeSheetSequenceFrame
  32. //-----------------------------------------------------------------------------
  33. // Expose this class to the scene database
  34. //-----------------------------------------------------------------------------
  35. IMPLEMENT_ELEMENT_FACTORY( DmeSheetSequenceFrame, CDmeSheetSequenceFrame );
  36. void CDmeSheetSequenceFrame::OnConstruction()
  37. {
  38. m_pSheetImages.Init( this, "sheetimages" );
  39. m_fDisplayTime.Init( this, "displaytime" );
  40. }
  41. void CDmeSheetSequenceFrame::OnDestruction()
  42. {
  43. }
  44. // CDmeSheetSequence
  45. //-----------------------------------------------------------------------------
  46. // Expose this class to the scene database
  47. //-----------------------------------------------------------------------------
  48. IMPLEMENT_ELEMENT_FACTORY( DmeSheetSequence, CDmeSheetSequence );
  49. void CDmeSheetSequence::OnConstruction()
  50. {
  51. m_nSequenceNumber.Init( this, "sequencenumber" );
  52. m_Clamp.Init( this, "clamp" );
  53. m_eMode.Init( this, "mode" );
  54. m_Frames.Init( this, "frames" );
  55. m_Clamp = true;
  56. m_eMode = SQM_RGBA;
  57. }
  58. void CDmeSheetSequence::OnDestruction()
  59. {
  60. }