Update Atlas system
This commit is contained in:
parent
18203c539f
commit
e7cf3bdf5a
3 changed files with 45 additions and 12 deletions
26
LandblockExtraction/AtlasMaker/AtlasBuilder.cs
Normal file
26
LandblockExtraction/AtlasMaker/AtlasBuilder.cs
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
using AC2RE.Definitions;
|
||||
using ImageMagick;
|
||||
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 AtlasBuilder {
|
||||
private readonly int TEXTURESIZE = 64;
|
||||
|
||||
private TexturesImage texturesImage;
|
||||
private List<MagickImage> textures;
|
||||
|
||||
public AtlasBuilder(PortalEngine portalEngine) {
|
||||
textures = new();
|
||||
texturesImage = new TexturesImage(portalEngine);
|
||||
}
|
||||
|
||||
public AddTexture(DataId vdesc) {
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -7,23 +7,13 @@ using System.Text;
|
|||
using System.Threading.Tasks;
|
||||
|
||||
namespace LandblockExtraction.AtlasMaker;
|
||||
public class AtlasMaker {
|
||||
private readonly int TEXTURESIZE = 64;
|
||||
public class TerrainAtlasManager {
|
||||
private PortalEngine portalEngine;
|
||||
|
||||
public Dictionary<uint, Vector2> textureCoord;
|
||||
|
||||
public AtlasMaker(PortalEngine portalEngine) {
|
||||
public TerrainAtlasManager(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);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
17
LandblockExtraction/AtlasMaker/TexturesImage.cs
Normal file
17
LandblockExtraction/AtlasMaker/TexturesImage.cs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
using LandblockExtraction.DatEngine;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace LandblockExtraction.AtlasMaker;
|
||||
public class TexturesImage {
|
||||
private PortalEngine portalEngine;
|
||||
private TextureEngine textureEngine;
|
||||
|
||||
public TexturesImage(PortalEngine portalEngine) {
|
||||
this.portalEngine = portalEngine;
|
||||
this.textureEngine = new();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue