--check: 938/3256 method bodies compile for x86_64 (28.8%), 32-bit layout asserts hold; boot path 3/626 curated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
54 lines
1.5 KiB
C++
54 lines
1.5 KiB
C++
#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<int *>((*GHIDRA_CAST<int *>(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<uint8_t *>((fromIndex + 4 + GHIDRA_INT(this))), cellType != 0xff)) {
|
|
iVar1 = 0;
|
|
cellKind = cellType & 0xf;
|
|
if (0 < *GHIDRA_CAST<int *>((&DAT_00c37610 + cellKind * 0x44))) {
|
|
stepEntry = GHIDRA_CAST<float *>((&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<int *>((&DAT_00c37610 + cellKind * 0x44)));
|
|
}
|
|
}
|
|
return 0;
|
|
}
|