DatReader class heritage

Start Atlas maker class for generate atlas texture
This commit is contained in:
Troispoils 2024-02-26 17:06:03 +01:00
parent 7fb6345839
commit 18203c539f
6 changed files with 65 additions and 22 deletions

View file

@ -0,0 +1,29 @@
using LandblockExtraction.DatEngine;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;
namespace LandblockExtraction.AtlasMaker;
public class AtlasMaker {
private readonly int TEXTURESIZE = 64;
private PortalEngine portalEngine;
public Dictionary<uint, Vector2> textureCoord;
public AtlasMaker(PortalEngine portalEngine) {
this.portalEngine = portalEngine;
textureCoord = new Dictionary<uint, Vector2>();
}
public void InitTerrainWithTexture() {
Dictionary<uint, uint> TerrainAndSurfaceIndex = new Dictionary<uint, uint>();
foreach(var terrain in portalEngine.cTerrainDesc.terrains) {
TerrainAndSurfaceIndex.Add(terrain.terrainIndex, terrain.surfaceInfo);
}
}
}