22 #ifndef AGS_ENGINE_AC_DYNOBJ_CC_DYNAMICARRAY_H 23 #define AGS_ENGINE_AC_DYNOBJ_CC_DYNAMICARRAY_H 25 #include "common/std/vector.h" 26 #include "ags/engine/ac/dynobj/cc_ags_dynamic_object.h" 27 #include "ags/shared/util/stream.h" 31 #define ARRAY_MANAGED_TYPE_FLAG 0x80000000 35 static const char *TypeName;
39 uint32_t ElemCount = 0u;
41 uint32_t TotalSize = 0u;
47 inline static const Header &GetHeader(
const void *address) {
48 return reinterpret_cast<const Header &
>(*(
static_cast<const uint8_t *
>(address) - MemHeaderSz));
52 static DynObjectRef Create(
int numElements,
int elementSize,
bool isManagedType);
55 const char *GetType()
override;
56 int Dispose(
void *address,
bool force)
override;
61 static const size_t MemHeaderSz =
sizeof(
Header);
63 static const size_t FileHeaderSz =
sizeof(uint32_t) * 2;
67 size_t CalcSerializeSize(
const void *address)
override;
73 namespace DynamicArrayHelpers {
Definition: cc_dynamic_array.h:33
Definition: cc_script_object.h:50
Definition: cc_ags_dynamic_object.h:88