#include "classes.h" // 009e3450 uint8_t RoomGridPath::can_step(int fromIndex, int toIndex) { uint32_t dRow; uint32_t cellKind; uint32_t stepRow; uint32_t stepCol; uint32_t dCol; float *stepEntry; int iVar1; uint8_t cellType; iVar1 = *GHIDRA_CAST((*GHIDRA_CAST(this) + 0xc)); dRow = toIndex / iVar1 - fromIndex / iVar1; dCol = toIndex % iVar1 - fromIndex % iVar1; if (((((dRow ^ GHIDRA_INT(dRow) >> 0x1f) - (GHIDRA_INT(dRow) >> 0x1f)) + ((dCol ^ GHIDRA_INT(dCol) >> 0x1f) - (GHIDRA_INT(dCol) >> 0x1f)) == 1) && (GHIDRA_UINT(fromIndex) < 0x1c0)) && (cellType = *GHIDRA_CAST((fromIndex + 4 + GHIDRA_INT(this))), cellType != 0xff)) { iVar1 = 0; cellKind = cellType & 0xf; if (0 < *GHIDRA_CAST((&DAT_00c37610 + cellKind * 0x44))) { stepEntry = GHIDRA_CAST((&DAT_00c37614 + cellKind * 0x44)); do { if (*stepEntry == -13.0) { stepCol = 0xffffffff; } else { stepCol = 0; if (*stepEntry == 13.0) { stepCol = 1; } } if (stepEntry[1] == -13.0) { stepRow = 0xffffffff; } else { stepRow = 0; if (stepEntry[1] == 13.0) { stepRow = 1; } } if ((stepCol == dCol) && (stepRow == dRow)) { return 1; } iVar1 = iVar1 + 1; stepEntry = stepEntry + 2; } while (iVar1 < *GHIDRA_CAST((&DAT_00c37610 + cellKind * 0x44))); } } return 0; }