Decompile 5 functions in Source/Resource/Models/ModelResource.cpp, Source/Resource/Models/ModelResource.h, ...
Batch #1850 by Yommy: 2 byte-identical, 3 confirmed by peer review. - fn_08014 C3dModelRes::ForEachRootName: logic confirmed by peer review - fn_08015 C3dGrannyModelRes::GetTriangleCount: logic confirmed by peer review - fn_08016 C3dGrannyModelRes::GetRigidVertices: logic confirmed by peer review - fn_08017 GrannyAnimationLibrary::Initialize: byte-identical - fn_08018 C3dModelRes::Load: byte-identical Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
6f1a245675
commit
b68718f749
3 changed files with 41 additions and 0 deletions
|
|
@ -143,6 +143,7 @@ struct GrannyModelInstance {
|
|||
class GrannyAnimationLibrary {
|
||||
public:
|
||||
bool Load(const char* name, int job, int action);
|
||||
void Initialize();
|
||||
void FreeInstance();
|
||||
granny_file* ReadAnimationFile(const char* name, const char* suffix);
|
||||
|
||||
|
|
@ -170,6 +171,8 @@ public:
|
|||
void FreeControl(granny_control* control);
|
||||
granny_control* PlayAnimation(unsigned action, granny_model_instance* instance, granny_control* control, int loopCount);
|
||||
bool ProjectBounds(float* rect, const AffineMatrix& view, const AffineMatrix& world, const float* eye) const;
|
||||
int GetTriangleCount(int mesh) const;
|
||||
unsigned char* GetRigidVertices(int mesh) const;
|
||||
|
||||
/* 0110 */ unsigned char unknown_0110[0x150];
|
||||
/* 0260 */ void* file;
|
||||
|
|
|
|||
|
|
@ -501,6 +501,41 @@ void GrannyAnimationLibrary::FreeInstance() {
|
|||
this->instance = nullptr;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00759550
|
||||
// FUNCTION: fn_08014
|
||||
void C3dModelRes::ForEachRootName(std::function<void(const std::string&)> callback) const {
|
||||
std::for_each(this->rootNames.begin(), this->rootNames.end(), callback);
|
||||
}
|
||||
|
||||
// OFFSET: 0x007597A0
|
||||
// FUNCTION: fn_08015
|
||||
int C3dGrannyModelRes::GetTriangleCount(int mesh) const {
|
||||
return GrannyGetMeshIndexCount(this->instance->meshes[mesh].mesh) / 3;
|
||||
}
|
||||
|
||||
// OFFSET: 0x007597E0
|
||||
// FUNCTION: fn_08016
|
||||
unsigned char* C3dGrannyModelRes::GetRigidVertices(int mesh) const {
|
||||
const GrannyMeshEntry& entry = this->instance->meshes[mesh];
|
||||
|
||||
if (!GrannyMeshIsRigid(entry.mesh)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return entry.vertices;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00759820
|
||||
// FUNCTION: fn_08017
|
||||
void GrannyAnimationLibrary::Initialize() {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00759830
|
||||
// FUNCTION: fn_08018
|
||||
bool C3dModelRes::Load(const char*) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00757390
|
||||
// FUNCTION: fn_08005
|
||||
bool GrannyAnimationLibrary::Load(const char* name, int job, int action) {
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
#include "Resource/Models/ModelMesh.h"
|
||||
#include "Resource/Resource.h"
|
||||
|
||||
#include <functional>
|
||||
#include <list>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
|
@ -103,8 +104,10 @@ class C3dModelRes : public CRes {
|
|||
public:
|
||||
explicit C3dModelRes(ModelResourceContext& context);
|
||||
~C3dModelRes() override;
|
||||
bool Load(const char* name) override;
|
||||
void Unload() override;
|
||||
ModelNode* FindNode(const char* name) const;
|
||||
void ForEachRootName(std::function<void(const std::string&)> callback) const;
|
||||
void RegisterMovies(class BinkMovies& movies, const float* position) const;
|
||||
|
||||
/* 0110 */ int major;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue