DatReader class heritage
Start Atlas maker class for generate atlas texture
This commit is contained in:
parent
7fb6345839
commit
18203c539f
6 changed files with 65 additions and 22 deletions
29
LandblockExtraction/AtlasMaker/AtlasMaker.cs
Normal file
29
LandblockExtraction/AtlasMaker/AtlasMaker.cs
Normal 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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue