mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-29 23:42:08 +00:00
c34756e5f2
The voxreserve array was never properly set up so it is gone now. nextvoxid now gets set right before loading .def files.
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include "texinfo.h"
|
|
|
|
struct TileBuildDesc
|
|
{
|
|
// persistent data that will be present for the entire run of the game.
|
|
TexExtInfo extinfo;
|
|
|
|
// work data
|
|
FImageSource* orgimage; // this is the original tile image, not connected to a FTexture yet.
|
|
FImageSource* tileimage; // this is the current tile image, it may be connected to 'imported'. Used for convenient access.
|
|
FGameTexture* imported; // imported replacement from the texture manager;
|
|
|
|
// info that will be copied into the final texture object
|
|
float alphathreshold;
|
|
int leftOffset, topOffset; // overrides for imported textures.
|
|
};
|
|
|
|
struct TilesetBuildInfo
|
|
{
|
|
TArray<TileBuildDesc> tile;
|
|
unsigned maxtileofart;
|
|
TArray <std::pair<FName, int>> aliases;
|
|
int32_t nextvoxid;
|
|
void addName(const char* name, int index)
|
|
{
|
|
aliases.Push(std::make_pair(name, index));
|
|
}
|
|
|
|
void Delete(int tileno)
|
|
{
|
|
tile[tileno].tileimage = nullptr;
|
|
tile[tileno].imported = nullptr;
|
|
}
|
|
|
|
void MakeWritable(int tile);
|
|
void CreateWritable(int tile, int w, int h);
|
|
void MakeCanvas(int tilenum, int width, int height);
|
|
|
|
};
|
|
|
|
void ConstructTileset();
|
|
int32_t tileGetCRC32(FImageSource* image);
|
|
|