cleanup: remove Godot-era test data, formats/, dead proto reader and duplicates
- test/: bgfx/Godot render goldens and compare shots nothing reads any more; the Granny oracle result m2-numeric.json moves to oracle/ - formats/: only the .spt sniffer was still linked; it moves into platform/SpeedTreeLib, the rest and tools/map_probe go - bgm/ duplicated Client/BGM byte for byte; tools/root archived root scripts that root.epk already holds; extension/src/proto had no build reference - GEMINI.md duplicated AGENTS.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
0137f852d3
commit
70710477cf
@@ -1,44 +0,0 @@
|
||||
// 区块二进制:height.raw / tile.raw / attr.atr / water.wtr。
|
||||
// 真值来源:PRTerrainLib/Terrain.cpp(LoadHeightMap / RAW_LoadTileMap / LoadAttrMap /
|
||||
// LoadWaterMapFile)+ Terrain.h / TerrainType.h 常量。SHINSOO §5.3。
|
||||
//
|
||||
// XSIZE = 128
|
||||
// height.raw : 无头,u16 LE [131*131] (HEIGHTMAP_RAW = XSIZE+3)
|
||||
// tile.raw : 无头,u8 [258*258] (TILEMAP_RAW = XSIZE*2+2)
|
||||
// attr.atr : 6B 头 {u16 magic=2634, u16 w=256, u16 h=256} + u8 [256*256]
|
||||
// water.wtr : 7B 头 {u16 magic=5426, u16 w=128, u16 h=128, u8 layers}
|
||||
// + u8 [128*128] + layers×(u16 或 u32) 层高
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace fmt {
|
||||
|
||||
constexpr int HEIGHTMAP_RAW_XY = 131; // 128+3
|
||||
constexpr int TILEMAP_RAW_XY = 258; // 128*2+2
|
||||
constexpr int ATTRMAP_XY = 256; // 128*2
|
||||
constexpr int WATERMAP_XY = 128;
|
||||
constexpr uint16_t ATTR_MAGIC = 2634;
|
||||
constexpr uint16_t WATER_MAGIC = 5426;
|
||||
|
||||
struct HeightMap {
|
||||
std::vector<uint16_t> raw; // 131*131, 行主序(含 1 圈边界样本)
|
||||
uint16_t at(int sx, int sy) const { // 与 Terrain.h GetHeight 一致:+1 偏移
|
||||
return raw[(sy + 1) * HEIGHTMAP_RAW_XY + (sx + 1)];
|
||||
}
|
||||
};
|
||||
struct TileMap { std::vector<uint8_t> raw; }; // 258*258
|
||||
struct AttrMap { std::vector<uint8_t> data; }; // 256*256(去头)
|
||||
struct WaterMap {
|
||||
uint8_t layer_count = 0;
|
||||
std::vector<uint8_t> ids; // 128*128;0xFF = 无水
|
||||
std::vector<int32_t> heights; // layer_count 个
|
||||
};
|
||||
|
||||
bool load_height_map(const std::string& path, HeightMap& out, std::string* err);
|
||||
bool load_tile_map(const std::string& path, TileMap& out, std::string* err);
|
||||
bool load_attr_map(const std::string& path, AttrMap& out, std::string* err);
|
||||
bool load_water_map(const std::string& path, WaterMap& out, std::string* err);
|
||||
|
||||
} // namespace fmt
|
||||
Reference in New Issue
Block a user