minetypeigc.cpp 968 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. ** Copyright (C) 1996, 1997 Microsoft Corporation. All Rights Reserved.
  3. **
  4. ** File: mineTypeIGC.cpp
  5. **
  6. ** Author:
  7. **
  8. ** Description:
  9. ** Implementation of the CmineTypeIGC class. This file was initially created by
  10. ** the ATL wizard for the core object.
  11. **
  12. ** History:
  13. */
  14. // mineTypeIGC.cpp : Implementation of CmineTypeIGC
  15. #include "pch.h"
  16. #include "mineTypeIGC.h"
  17. /////////////////////////////////////////////////////////////////////////////
  18. // CmineTypeIGC
  19. HRESULT CmineTypeIGC::Initialize(ImissionIGC* pMission, Time now, const void* data, int dataSize)
  20. {
  21. assert (pMission);
  22. m_pMission = pMission;
  23. ZRetailAssert (data && (dataSize == sizeof(DataMineTypeIGC)));
  24. {
  25. m_data = *((DataMineTypeIGC*)data);
  26. pMission->AddExpendableType(this);
  27. }
  28. return S_OK;
  29. }
  30. int CmineTypeIGC::Export(void* data) const
  31. {
  32. if (data)
  33. *((DataMineTypeIGC*)data) = m_data;
  34. return sizeof(DataMineTypeIGC);
  35. }