#include "classes.h" // 0082d290 void * Spawn::PickEntry(float value) { uint8_t entryIndex; float weightSum; entryIndex = 0; weightSum = 0.0; if (*GHIDRA_CAST((GHIDRA_CAST(this) + 8)) != 0) { do { weightSum = weightSum + *GHIDRA_CAST((*GHIDRA_CAST((GHIDRA_CAST(this) + 4)) + 8 + GHIDRA_UINT(entryIndex) * 0xc)); if (value * *GHIDRA_CAST((GHIDRA_CAST(this) + 0xc)) < weightSum) { return (void *)(*GHIDRA_CAST((GHIDRA_CAST(this) + 4)) + GHIDRA_UINT(entryIndex) * 0xc); } entryIndex = entryIndex + 1; } while (entryIndex < *GHIDRA_CAST((GHIDRA_CAST(this) + 8))); } KAGE_LogMessage(1,(uint8_t *) "[warn] RoomConfig::Spawn::PickEntry did not terminate properly. Picking first entry: (%d, %d, %d, %f)\n" ); return *(void **)(GHIDRA_CAST(this) + 4); } // 00872000 void Spawn::Entries(uint32_t *param_1, int param_2) { *param_1 = GHIDRA_UINT(*GHIDRA_CAST((param_2 + 8))); param_1[1] = *GHIDRA_CAST((param_2 + 4)); return; }