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
This commit is contained in:
parent
2d539a1d3a
commit
9162deb256
3 changed files with 22 additions and 0 deletions
19
Source/Resource/ImfLayerIndex.cpp
Normal file
19
Source/Resource/ImfLayerIndex.cpp
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#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;
|
||||
}
|
||||
|
|
@ -15,6 +15,8 @@ class CImfRes : public CRes {
|
|||
public:
|
||||
bool Load(const char* name) override;
|
||||
|
||||
int GetLayer(int priority, int action, int motion);
|
||||
|
||||
private:
|
||||
/* 0110 */ std::vector<std::vector<ImfData>> m_imfData;
|
||||
/* 011C */ int m_maxAction[15];
|
||||
|
|
|
|||
|
|
@ -532,6 +532,7 @@
|
|||
"Source/Resource/EZeffectResource.cpp": 3,
|
||||
"Source/Resource/GifLzw.cpp": 3,
|
||||
"Source/Resource/GifResource.cpp": 3,
|
||||
"Source/Resource/ImfLayerIndex.cpp": 3,
|
||||
"Source/Resource/ImfResource.cpp": 3,
|
||||
"Source/Resource/Models/AnimatedModelResource.cpp": 3,
|
||||
"Source/Resource/Models/ModelMesh.cpp": 3,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue