CommonLibSSE NG
GridCellArray.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/G/GridArray.h"
4 #include "RE/N/NiPoint3.h"
5 
6 namespace RE
7 {
8  class TESObjectCELL;
9 
10  class GridCellArray : public GridArray
11  {
12  public:
13  inline static constexpr auto RTTI = RTTI_GridCellArray;
14 
15  ~GridCellArray() override; // 00
16 
17  // override (GridArray)
18  void KillAll() override; // 02
19  bool SetCenter(std::int32_t a_x, std::int32_t a_y) override; // 03
20  void Detach(std::uint32_t a_x, std::uint32_t a_y) override; // 05
21  void ClearItem(std::uint32_t a_x, std::uint32_t a_y) override; // 06
22  void MoveItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override; // 07
23  void SwapItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override; // 08
24 
25  [[nodiscard]] TESObjectCELL* GetCell(std::uint32_t a_x, std::uint32_t a_y) const noexcept
26  {
27  return (a_x < length && a_y < length) ?
28  cells[(a_x * length) + a_y] :
29  nullptr;
30  };
31 
32  // members
33  TESObjectCELL** cells; // 18 - (memory allocated using 0x8 * numGrids * numGrids)
34  NiPoint3 unk20; // 20
35  bool land3DAttached; // 2C
36  };
37  static_assert(sizeof(GridCellArray) == 0x30);
38 };
Definition: GridArray.h:6
std::uint32_t length
Definition: GridArray.h:25
Definition: GridCellArray.h:11
NiPoint3 unk20
Definition: GridCellArray.h:34
void KillAll() override
void MoveItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override
void Detach(std::uint32_t a_x, std::uint32_t a_y) override
void SwapItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override
bool land3DAttached
Definition: GridCellArray.h:35
void ClearItem(std::uint32_t a_x, std::uint32_t a_y) override
~GridCellArray() override
TESObjectCELL * GetCell(std::uint32_t a_x, std::uint32_t a_y) const noexcept
Definition: GridCellArray.h:25
static constexpr auto RTTI
Definition: GridCellArray.h:13
bool SetCenter(std::int32_t a_x, std::int32_t a_y) override
TESObjectCELL ** cells
Definition: GridCellArray.h:30
Definition: NiPoint3.h:6
Definition: TESObjectCELL.h:116
Definition: AbsorbEffect.h:6
constexpr REL::VariantID RTTI_GridCellArray(684944, 392681, 0x1edca78)