structs.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /*
  2. FinalSun/FinalAlert 2 Mission Editor
  3. Copyright (C) 1999-2024 Electronic Arts, Inc.
  4. Authored by Matthias Wagner
  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. This program is distributed in the hope that it will be useful,
  10. 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 this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. #include "StdAfx.h"
  17. #include "Structs.h"
  18. #include "functions.h"
  19. #include "MapTool.h"
  20. ACTIONDATA::~ACTIONDATA()
  21. {
  22. }
  23. void ACTIONDATA::reset() {
  24. mode = 0;
  25. type = 0;
  26. data = 0;
  27. data2 = 0;
  28. data3 = 0;
  29. z_data = 0;
  30. data_s = "";
  31. tool.reset();
  32. }
  33. void PICDATA::createVBorder()
  34. {
  35. ASSERT(!vborder);
  36. ASSERT(pic && bType != PICDATA_TYPE_BMP);
  37. _vBorder = std::make_shared<std::vector<VBORDER>>(wMaxHeight);
  38. vborder = _vBorder->data();
  39. int k;
  40. for (k = 0;k < wMaxHeight;k++)
  41. {
  42. int l, r;
  43. GetDrawBorder(static_cast<BYTE*>(pic), wMaxWidth, k, l, r, 0);
  44. vborder[k].left = l;
  45. vborder[k].right = r;
  46. }
  47. }