Decompile 7 functions in Source/Contents/Actors/RenderObject.cpp, Source/Contents/Actors/RenderObject.h, ...
Batch #1129 by eAthena: 0 byte-identical, 7 confirmed by peer review. - fn_21116 CRenderObject::SetActionName: logic confirmed by peer review - fn_21125 CGameActor::SetUnknown0305: logic confirmed by peer review - fn_21127 CGameActor::RaiseUnknown03C8: logic confirmed by peer review - fn_21134 CGameActor::SetUnknown02E4: logic confirmed by peer review - fn_21142 CGameActor::SetUnknown02C8: logic confirmed by peer review - fn_21146 CGameActor::SetUnknown0260: logic confirmed by peer review - fn_21151 CRenderObject::SetSpriteName: logic confirmed by peer review Reviewed-by: ragnarok-clanker
This commit is contained in:
parent
e44193df72
commit
f14ab7ea91
3 changed files with 105 additions and 0 deletions
39
Source/Contents/Actors/GameActor.h
Normal file
39
Source/Contents/Actors/GameActor.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef RAGNAROK_SOURCE_CONTENTS_ACTORS_GAMEACTOR_H
|
||||
#define RAGNAROK_SOURCE_CONTENTS_ACTORS_GAMEACTOR_H
|
||||
|
||||
#include "Contents/Actors/RenderObject.h"
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
class CGameActor : public CRenderObject {
|
||||
public:
|
||||
/* 0138 */ unsigned char unknown_0138[0x128];
|
||||
/* 0260 */ int unknown_0260;
|
||||
/* 0264 */ unsigned char unknown_0264[0x64];
|
||||
/* 02C8 */ int unknown_02C8;
|
||||
/* 02CC */ unsigned char unknown_02CC[0x18];
|
||||
/* 02E4 */ int unknown_02E4;
|
||||
/* 02E8 */ unsigned char unknown_02E8[0x1D];
|
||||
/* 0305 */ unsigned char unknown_0305;
|
||||
/* 0306 */ unsigned char unknown_0306[2];
|
||||
/* 0308 */ int unknown_0308;
|
||||
/* 030C */ unsigned char unknown_030C[0xBC];
|
||||
/* 03C8 */ int unknown_03C8;
|
||||
|
||||
void SetUnknown0305(unsigned char value, int extra);
|
||||
void RaiseUnknown03C8(int value);
|
||||
void SetUnknown02E4(int value);
|
||||
void SetUnknown02C8(int value);
|
||||
void SetUnknown0260(int value);
|
||||
};
|
||||
|
||||
#if defined(_WIN32) && !defined(_WIN64)
|
||||
static_assert(offsetof(CGameActor, unknown_0260) == 0x260);
|
||||
static_assert(offsetof(CGameActor, unknown_02C8) == 0x2C8);
|
||||
static_assert(offsetof(CGameActor, unknown_02E4) == 0x2E4);
|
||||
static_assert(offsetof(CGameActor, unknown_0305) == 0x305);
|
||||
static_assert(offsetof(CGameActor, unknown_0308) == 0x308);
|
||||
static_assert(offsetof(CGameActor, unknown_03C8) == 0x3C8);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -1,7 +1,10 @@
|
|||
#include "Contents/Actors/RenderObject.h"
|
||||
|
||||
#include "Client/Replay.h"
|
||||
#include "Contents/Actors/GameActor.h"
|
||||
#include "Resource/ResourceMgr.h"
|
||||
#include "Resource/Sprites/ActionResource.h"
|
||||
#include "Resource/Sprites/SpriteResource.h"
|
||||
#include "Utility/Math/ScalarConversion.h"
|
||||
|
||||
#include <windows.h>
|
||||
|
|
@ -27,11 +30,45 @@ bool CRenderObject::Update() {
|
|||
void CRenderObject::SendObjectMessage(CGameObject*, int, int, int, int, int, int, int, int, int, int, int, int, int, int) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CBF930
|
||||
// FUNCTION: fn_21116
|
||||
void CRenderObject::SetActionName(ResourceMgr& resources, const char* name) {
|
||||
if (this->render.action) {
|
||||
this->render.action->Release();
|
||||
}
|
||||
|
||||
this->render.action = static_cast<CActRes*>(resources.Load(name));
|
||||
|
||||
if (this->render.action) {
|
||||
this->render.action->AddRef();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2D40
|
||||
// FUNCTION: fn_21144
|
||||
void CRenderObject::SetScreenBounds(const float*, float, float) {
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2DA0
|
||||
// FUNCTION: fn_21146
|
||||
void CGameActor::SetUnknown0260(int value) {
|
||||
this->unknown_0260 = value & 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2E00
|
||||
// FUNCTION: fn_21151
|
||||
void CRenderObject::SetSpriteName(ResourceMgr& resources, const char* name) {
|
||||
if (this->render.sprite) {
|
||||
this->render.sprite->Release();
|
||||
}
|
||||
|
||||
this->render.sprite = static_cast<CSprRes*>(resources.Load(name));
|
||||
|
||||
if (this->render.sprite) {
|
||||
this->render.sprite->AddRef();
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC3DC0
|
||||
// FUNCTION: fn_21154
|
||||
void CRenderObject::SetScreenPosition(float x, float y) {
|
||||
|
|
@ -96,6 +133,21 @@ void CRenderObject::SetColor(int alpha, int red, int green, int blue) {
|
|||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC1C20
|
||||
// FUNCTION: fn_21125
|
||||
void CGameActor::SetUnknown0305(unsigned char value, int extra) {
|
||||
this->unknown_0305 = value;
|
||||
this->unknown_0308 = extra;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC1D20
|
||||
// FUNCTION: fn_21127
|
||||
void CGameActor::RaiseUnknown03C8(int value) {
|
||||
if (value > 0 && this->unknown_03C8 < value) {
|
||||
this->unknown_03C8 = value;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC1E70
|
||||
// FUNCTION: fn_21130
|
||||
void CRenderObject::SetSequenceDeadline(std::uint32_t duration) {
|
||||
|
|
@ -161,6 +213,12 @@ void CRenderObject::SetFrameSequence(
|
|||
this->render.sequenceTick = 1;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2050
|
||||
// FUNCTION: fn_21134
|
||||
void CGameActor::SetUnknown02E4(int value) {
|
||||
this->unknown_02E4 = value;
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2780
|
||||
// FUNCTION: fn_21140
|
||||
void CRenderObject::SetAnimationSpeed(float speed) {
|
||||
|
|
@ -171,3 +229,9 @@ void CRenderObject::SetAnimationSpeed(float speed) {
|
|||
this->render.speed = speed;
|
||||
}
|
||||
}
|
||||
|
||||
// OFFSET: 0x00CC2810
|
||||
// FUNCTION: fn_21142
|
||||
void CGameActor::SetUnknown02C8(int value) {
|
||||
this->unknown_02C8 = value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,8 @@ public:
|
|||
float HorizontalDistance(float x, float z) const;
|
||||
float Distance(float x, float y, float z) const;
|
||||
void SetAnimationSpeed(float speed);
|
||||
void SetActionName(ResourceMgr& resources, const char* name);
|
||||
void SetSpriteName(ResourceMgr& resources, const char* name);
|
||||
void SetColor(int alpha, int red, int green, int blue);
|
||||
void SetSequenceDeadline(std::uint32_t duration);
|
||||
void SetSequenceInterval(unsigned char interval);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue