rodecomp/Source/Resource/ImfLayerIndex.cpp
ragnarok-clanker 9162deb256 Decompile fn_07938 (CImfRes::GetLayer)
Batch #1560 by eAthena: 0 byte-identical, 1 confirmed by peer review.

- fn_07938 CImfRes::GetLayer: logic confirmed by peer review

Reviewed-by: ragnarok-clanker
Adds to the build: Source/Resource/ImfLayerIndex.cpp
2026-10-28 19:10:16 +00:00

19 lines
490 B
C++

#include "Resource/ImfResource.h"
// OFFSET: 0x00750550
// FUNCTION: fn_07938
int CImfRes::GetLayer(int priority, int action, int motion) {
if (priority >= 15 || action >= this->m_maxAction[priority] ||
motion >= this->m_maxMotion[priority][action]) {
return -1;
}
int numLayer = this->m_imfData.size();
for (int layer = 0; layer < numLayer; ++layer) {
if (this->m_imfData[layer][action].priority[motion] == priority) {
return layer;
}
}
return -1;
}