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
|
|
@ -1,17 +1,14 @@
|
|||
using AC2RE.Definitions;
|
||||
|
||||
namespace LandblockExtraction.DatEngine {
|
||||
public class CellEngine {
|
||||
private DatReader cellReader;
|
||||
public class CellEngine : DatEngine {
|
||||
|
||||
public CellEngine() {
|
||||
cellReader = new(@"X:\DatFiles\cell_1.dat");
|
||||
}
|
||||
public CellEngine() : base(@"X:\DatFiles\cell_1.dat") { }
|
||||
|
||||
public CLandBlockData? GetLandBlockData(uint id) {
|
||||
DataId dataId = new DataId(id);
|
||||
if (!cellReader.contains(dataId)) return null;
|
||||
using (var data = cellReader.getFileReader(dataId)) {
|
||||
if (!datReader.contains(dataId)) return null;
|
||||
using (var data = datReader.getFileReader(dataId)) {
|
||||
CLandBlockData cLandBlockData = new(data);
|
||||
return cLandBlockData;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue