CommonLibVR
Loading...
Searching...
No Matches
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
6namespace RE
7{
8 class TESObjectCELL;
9
10 class GridCellArray : public GridArray
11 {
12 public:
13 inline static constexpr auto RTTI = RTTI_GridCellArray;
14 inline static constexpr auto VTABLE = VTABLE_GridCellArray;
15
16 ~GridCellArray() override; // 00
17
18 // override (GridArray)
19 void KillAll() override; // 02
20 bool SetCenter(std::int32_t a_x, std::int32_t a_y) override; // 03
21 void Detach(std::uint32_t a_x, std::uint32_t a_y) override; // 05
22 void ClearItem(std::uint32_t a_x, std::uint32_t a_y) override; // 06
23 void MoveItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override; // 07
24 void SwapItem(std::uint32_t a_fromX, std::uint32_t a_fromY, std::uint32_t a_toX, std::uint32_t a_toY) override; // 08
25
26 [[nodiscard]] TESObjectCELL* GetCell(std::uint32_t a_x, std::uint32_t a_y) const noexcept
27 {
28 return (a_x < length && a_y < length) ?
29 cells[(a_x * length) + a_y] :
30 nullptr;
31 };
32
33 // members
34 TESObjectCELL** cells; // 18 - (memory allocated using 0x8 * numGrids * numGrids)
36 bool land3DAttached; // 2C
37 private:
39 };
40 static_assert(sizeof(GridCellArray) == 0x30);
41};
#define KEEP_FOR_RE()
Definition PCH.h:517
Definition GridArray.h:6
std::uint32_t length
Definition GridArray.h:26
Definition GridCellArray.h:11
TESObjectCELL * GetCell(std::uint32_t a_x, std::uint32_t a_y) const noexcept
Definition GridCellArray.h:26
NiPoint3 unk20
Definition GridCellArray.h:35
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
static constexpr auto VTABLE
Definition GridCellArray.h:14
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:36
void ClearItem(std::uint32_t a_x, std::uint32_t a_y) override
~GridCellArray() override
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:34
Definition NiPoint3.h:6
Definition TESObjectCELL.h:119
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_GridCellArray
Definition Offsets_VTABLE.h:11725
constexpr REL::ID RTTI_GridCellArray(static_cast< std::uint64_t >(684944))