Batch #14681 by ragnarok-clanker: forced by an admin (6 lower score(s), 70 changed function(s)); checked with 555 compiled unit(s), including every includer of Source/Client/Mode/CLoginMode.h, Source/Client/Session.h, Source/Contents/Actors/GameActor.h, Source/Contents/Actors/GrannyGameActor.h, Source/Contents/Actors/Pc.h, Source/Contents/Actors/RenderObject.h, Source/Contents/EffectResourceSwitcher.h, Source/Contents/Effects/CartCannon.h, Source/Contents/Effects/EZ2STREffectEx.h, Source/Contents/Effects/EffectActor.h, Source/Contents/Effects/MonsterSkillEffects.h, Source/Contents/Effects/RagEffect.h, Source/Contents/Effects/RectUpEffect.h, Source/Contents/Ground/GroundGeometry.h, Source/Network/Connection/Connection.h, Source/Resource/Audio/WaveResource.h, Source/Resource/Bitmap/BitmapResource.h, Source/Resource/EZeffectResource.h, Source/Resource/EmblemResource.h, Source/Resource/GifResource.h, Source/Resource/ImfResource.h, Source/Resource/Models/AnimatedModelResource.h, Source/Resource/Models/GrannyModelResource.h, Source/Resource/Models/ModelResource.h, Source/Resource/PaletteResource.h, Source/Resource/RmaResource.h, Source/Resource/Sprites/ActionResource.h, Source/Resource/Sprites/SpriteResource.h, Source/Resource/World/GroundResource.h, Source/Resource/World/TerrainResource.h, Source/Resource/World/WorldResource.h, Source/UI/Buttons/UIBmpRadioBtn.h, Source/UI/Buttons/UITextButton.h, Source/UI/Item/UIItemPurchaseWnd.h, Source/UI/Item/UIItemSellWnd.h, Source/UI/Item/UIItemSellWnd2.h, Source/UI/Item/UIItemStoreWnd.h, Source/UI/Item/UIItemWnd.h, Source/UI/Item/UIParaItemShopWnd.h, Source/UI/Items/UIItemRepairWnd.h, Source/UI/Items/UIMakeTargetListWnd.h, Source/UI/Items/UIMakeTargetProcessWnd.h, Source/UI/Items/UIWeaponRefineWnd.h, Source/UI/Rodex/UIRodexInboxWnd.h, Source/UI/Shop/UIMerchantItemShopWnd.h, Source/UI/Shop/UIMerchantMirrorItemWnd.h, Source/UI/Shop/UIMerchantShopMakeWnd.h, Source/UI/StylingShop/UIStylingShopWnd.h, Source/UI/UIChangeMaterialWnd.h, Source/UI/UIIngredientInfoWnd.h, Source/UI/UIItemReformWnd.h, Source/UI/UILapineScrollBar.h, Source/UI/Window/UIHotKeyWnd.h, Source/UI/Window/UINewSelectCharWnd.h.
76 lines
2 KiB
C++
76 lines
2 KiB
C++
#ifndef RAGNAROK_SOURCE_RESOURCE_WORLD_GROUNDRESOURCE_H
|
|
#define RAGNAROK_SOURCE_RESOURCE_WORLD_GROUNDRESOURCE_H
|
|
|
|
#include "File/File.h"
|
|
#include "Resource/Resource.h"
|
|
|
|
#include <vector>
|
|
|
|
struct GroundWaterParameters {
|
|
/* 0000 */ float level;
|
|
/* 0004 */ int type;
|
|
/* 0008 */ float height;
|
|
/* 000C */ float speed;
|
|
/* 0010 */ float pitch;
|
|
/* 0014 */ int animation;
|
|
};
|
|
|
|
struct GroundWater {
|
|
/* 0000 */ GroundWaterParameters parameters;
|
|
/* 0018 */ std::uint32_t unknown_0018[3];
|
|
};
|
|
|
|
struct GroundLegacyLightmap {
|
|
/* 0000 */ unsigned char bits[40];
|
|
|
|
void Decode(unsigned char* output) const;
|
|
};
|
|
|
|
class CGndRes : public CRes {
|
|
public:
|
|
CGndRes();
|
|
CGndRes(const char* extension, const char* prefix);
|
|
~CGndRes() override;
|
|
CGndRes* Create() override;
|
|
bool Load(const char* name) override;
|
|
void Unload() override;
|
|
void Lightmap(int index, unsigned char* output) const;
|
|
|
|
/* 0110 */ int loaded;
|
|
/* 0114 */ unsigned char major;
|
|
/* 0115 */ unsigned char minor;
|
|
/* 0116 */ unsigned char unknown_0116[2];
|
|
/* 0118 */ int width;
|
|
/* 011C */ int height;
|
|
/* 0120 */ float cellSize;
|
|
/* 0124 */ int textureCount;
|
|
/* 0128 */ int tileCount;
|
|
/* 012C */ int lightmapCount;
|
|
/* 0130 */ GroundWaterParameters waterDefault;
|
|
/* 0148 */ int waterWidth;
|
|
/* 014C */ int waterHeight;
|
|
/* 0150 */ std::vector<float> waterHeights;
|
|
/* 015C */ std::vector<GroundWater> water;
|
|
/* 0168 */ std::vector<const char*> textureNames;
|
|
/* 0174 */ const unsigned char* lightmaps;
|
|
/* 0178 */ const std::uint32_t* legacyLightmapIndices;
|
|
/* 017C */ const GroundLegacyLightmap* legacyLightmaps;
|
|
/* 0180 */ const unsigned char* tiles;
|
|
/* 0184 */ const unsigned char* cells;
|
|
|
|
private:
|
|
bool Parse();
|
|
void ReadWater();
|
|
|
|
/* 0188 */ CFile m_file;
|
|
};
|
|
|
|
static_assert(sizeof(GroundWaterParameters) == 24);
|
|
static_assert(sizeof(GroundWater) == 36);
|
|
static_assert(sizeof(GroundLegacyLightmap) == 40);
|
|
|
|
#if defined(_WIN32) && !defined(_WIN64)
|
|
static_assert(sizeof(CGndRes) == 0x01B4);
|
|
#endif
|
|
|
|
#endif
|