Batch #15141 by ragnarok-clanker: no function's compiled code changes; checked with 537 compiled unit(s), including every includer of Source/Client/Input/LanguageTC.h, Source/Client/Mode/CGameMode.h, Source/Client/Mode/CLoginMode.h, Source/Client/Replay.h, Source/Client/Session.h, Source/Contents/AchievementMgr.h, Source/Contents/Actors/CharacterRender.h, Source/Contents/Actors/EffectActors.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/EnchantMgr.h, Source/Contents/GuildInfo.h, Source/Contents/Messenger/MessengerWindows.h, Source/Contents/Schedule/TimeScheduler.h, Source/Contents/Sound/SoundMgr.h, Source/Contents/SpriteLayerDrawing.h, Source/Contents/TableMng.h, Source/Contents/World/SkyBox.h, Source/UI/Chat/UINewChatWnd.h, Source/UI/Text/CreateLineInfo.h, Source/UI/UIGradeEnchantWnd.h, Source/UI/Window/UINewSelectCharWnd.h, Source/UI/Window/UINewSkillListWnd.h, Source/UI/Window/UIPetInfoWnd.h, Source/UI/Window/UIReplayRECControlWnd.h, Source/UI/Window/UIWindowMgr.h, Source/UI/Window/UIWindowMgr.inl.
105 lines
2.5 KiB
C++
105 lines
2.5 KiB
C++
#ifndef RAGNAROK_SOURCE_CONTENTS_WORLD_SKYBOX_H
|
|
#define RAGNAROK_SOURCE_CONTENTS_WORLD_SKYBOX_H
|
|
|
|
#include "Render/Primitives/RenderPrimitive.h"
|
|
#include "Utility/Math/Vector3d.h"
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
|
|
class C3dActor;
|
|
class CRes;
|
|
|
|
struct FlareElement {
|
|
FlareElement();
|
|
FlareElement(int type, float distance, float size, float red, float green, float blue)
|
|
: type(type), distance(distance), size(size), red(red), green(green), blue(blue), position{0.0f, 0.0f, 0.0f} {
|
|
}
|
|
|
|
FlareElement& operator=(const FlareElement& other) {
|
|
this->type = other.type;
|
|
this->distance = other.distance;
|
|
this->size = other.size;
|
|
this->red = other.red;
|
|
this->green = other.green;
|
|
this->blue = other.blue;
|
|
this->position = other.position;
|
|
this->scaledSize = other.scaledSize;
|
|
return *this;
|
|
}
|
|
|
|
/* 0000 */ int type;
|
|
/* 0004 */ float distance;
|
|
/* 0008 */ float size;
|
|
/* 000C */ float red;
|
|
/* 0010 */ float green;
|
|
/* 0014 */ float blue;
|
|
/* 0018 */ vector3d position;
|
|
/* 0024 */ float scaledSize;
|
|
};
|
|
|
|
class CLensFlare {
|
|
public:
|
|
__declspec(noinline) CLensFlare();
|
|
|
|
void Init();
|
|
void Update(const float* matrix, vector3d eye, vector3d target);
|
|
void Render(const float* matrix, vector3d eye, vector3d target);
|
|
|
|
/* 0000 */ FlareElement m_elements[12];
|
|
/* 01E0 */ std::uint32_t m_colors[12];
|
|
/* 0210 */ char m_textureName[260];
|
|
/* 0314 */ vector3d m_position;
|
|
};
|
|
|
|
struct SkyCubeVertex : RenderVertex {
|
|
SkyCubeVertex() {
|
|
this->x = 0;
|
|
this->y = 0;
|
|
this->z = 0;
|
|
this->rhw = 0;
|
|
this->diffuse = 0;
|
|
this->specular = 0xFF000000;
|
|
this->u = 0;
|
|
this->v = 0;
|
|
}
|
|
};
|
|
|
|
class CSkyCube {
|
|
public:
|
|
CSkyCube();
|
|
|
|
/* 0000 */ SkyCubeVertex m_vertices[10];
|
|
/* 0140 */ int m_loopRotationY;
|
|
/* 0144 */ CLensFlare m_flare;
|
|
};
|
|
|
|
struct SkyBoxVertex {
|
|
SkyBoxVertex();
|
|
~SkyBoxVertex();
|
|
|
|
/* 0000 */ RenderVertex vertex;
|
|
};
|
|
|
|
class CSkyBox {
|
|
public:
|
|
~CSkyBox();
|
|
|
|
/* 0000 */ CRes* m_model;
|
|
/* 0004 */ C3dActor* m_actor;
|
|
/* 0008 */ int m_loopRotationX;
|
|
/* 000C */ CLensFlare m_flare;
|
|
};
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(FlareElement) == 0x28);
|
|
static_assert(offsetof(FlareElement, position) == 0x18);
|
|
static_assert(sizeof(CLensFlare) == 0x320);
|
|
static_assert(offsetof(CLensFlare, m_colors) == 0x1E0);
|
|
static_assert(offsetof(CLensFlare, m_textureName) == 0x210);
|
|
static_assert(offsetof(CLensFlare, m_position) == 0x314);
|
|
static_assert(offsetof(CSkyCube, m_flare) == 0x144);
|
|
static_assert(sizeof(CSkyBox) == 0x32C);
|
|
#endif
|
|
|
|
#endif
|