52 #ifndef AGS_ENGINE_AC_DYNOBJ_STATIC_ARRAY_H 53 #define AGS_ENGINE_AC_DYNOBJ_STATIC_ARRAY_H 55 #include "ags/engine/ac/dynobj/cc_ags_dynamic_object.h" 64 void Create(
IScriptObject *mgr,
size_t elem_script_size,
size_t elem_mem_size,
size_t elem_count = SIZE_MAX );
71 inline void *GetElementPtr(
void *address, intptr_t legacy_offset) {
72 return static_cast<uint8_t *
>(address) + (legacy_offset / _elemScriptSize) * _elemMemSize;
75 void *GetFieldPtr(
void *address, intptr_t offset)
override;
76 void Read(
void *address, intptr_t offset, uint8_t *dest,
size_t size)
override;
77 uint8_t ReadInt8(
void *address, intptr_t offset)
override;
78 int16_t ReadInt16(
void *address, intptr_t offset)
override;
79 int32_t ReadInt32(
void *address, intptr_t offset)
override;
80 float ReadFloat(
void *address, intptr_t offset)
override;
81 void Write(
void *address, intptr_t offset,
const uint8_t *src,
size_t size)
override;
82 void WriteInt8(
void *address, intptr_t offset, uint8_t val)
override;
83 void WriteInt16(
void *address, intptr_t offset, int16_t val)
override;
84 void WriteInt32(
void *address, intptr_t offset, int32_t val)
override;
85 void WriteFloat(
void *address, intptr_t offset,
float val)
override;
89 size_t _elemScriptSize = 0u;
90 size_t _elemMemSize = 0u;
91 size_t _elemCount = 0u;
Definition: cc_ags_dynamic_object.h:108
Definition: cc_script_object.h:60
Definition: cc_static_array.h:60