#include "classes.h" // 00417510 void EntityList_EL::constructor(EntityList_EL *source) { *GHIDRA_CAST(this) = 1; *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4)))) = *GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((source)) + 0x4)))); this->_capacity = source->_capacity; this->_size = source->_size; return; } // 00417630 void EntityList_EL::push_back(Entity *entity) { int count; count = this->_size; if (GHIDRA_UINT(this->_capacity) < count + 1U) { KAGE_LogMessage(0x10,GHIDRA_CAST("EL: not enough space for push_back\n")); count = this->_size; } *GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4)))) + count * 4)) = entity; this->_size = this->_size + 1; return; } // 00417670 void EntityList_EL::remove(Entity *entity) { uint32_t shiftIndex; uint32_t size; uint32_t uVar1; uint32_t *slotPtr; uVar1 = 0; size = this->_size; if (size != 0) { do { if (*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4)))) + uVar1 * 4)) == entity) { while ((uVar1 < size && (*GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4)))) + uVar1 * 4)) == entity))) { if (size <= uVar1) { KAGE_LogMessage(0x10,GHIDRA_CAST("EL: invalid index for remove\n")); size = this->_size; } shiftIndex = uVar1; if (uVar1 < size - 1) { do { slotPtr = GHIDRA_CAST((*GHIDRA_CAST(&(*GHIDRA_CAST((GHIDRA_CAST((this)) + 0x4)))) + shiftIndex * 4)); shiftIndex = shiftIndex + 1; *slotPtr = slotPtr[1]; size = this->_size; } while (shiftIndex < size - 1); } size = size - 1; this->_size = size; } } else { uVar1 = uVar1 + 1; } } while (uVar1 < size); } return; }