mirror of
https://github.com/ZDoom/Raze.git
synced 2024-12-02 09:02:18 +00:00
d064706f93
All map geometry npw uses texture IDs and no longer depends on Build's tile system. (What's missing is a new map format, though, but this was a necessary prerequisite to make that worthwile...)
58 lines
1.3 KiB
C
58 lines
1.3 KiB
C
#pragma once
|
|
|
|
#include <limits.h>
|
|
#include "textures.h"
|
|
#include "image.h"
|
|
#include "i_time.h"
|
|
#include "intvec.h"
|
|
#include "name.h"
|
|
#include "tiletexture.h"
|
|
#include "maptypes.h"
|
|
#include "texinfo.h"
|
|
#include "texturemanager.h"
|
|
|
|
// all that's left here is the wrappers that need to go away.
|
|
|
|
|
|
inline const FTextureID spritetypebase::spritetexture() const
|
|
{
|
|
return tileGetTextureID(picnum);
|
|
}
|
|
|
|
inline void spritetypebase::setspritetexture(FTextureID tex)
|
|
{
|
|
picnum = legacyTileNum(tex);
|
|
}
|
|
|
|
//[[deprecated]]
|
|
inline int tileForName(const char* name)
|
|
{
|
|
auto texid = TexMan.CheckForTexture(name, ETextureType::Any, FTextureManager::TEXMAN_TryAny | FTextureManager::TEXMAN_ReturnAll);
|
|
if (!texid.isValid()) return -1;
|
|
return legacyTileNum(texid);
|
|
}
|
|
|
|
//[[deprecated]]
|
|
inline int tileWidth(int num)
|
|
{
|
|
auto texid = tileGetTextureID(num);
|
|
if (!texid.isValid()) return 1;
|
|
else return (int)TexMan.GetGameTexture(texid)->GetDisplayWidth();
|
|
}
|
|
|
|
//[[deprecated]]
|
|
inline int tileHeight(int num)
|
|
{
|
|
auto texid = tileGetTextureID(num);
|
|
if (!texid.isValid()) return 1;
|
|
else return (int)TexMan.GetGameTexture(texid)->GetDisplayHeight();
|
|
}
|
|
|
|
|
|
//[[deprecated]]
|
|
inline FGameTexture* tileGetTexture(int tile, bool animate = false)
|
|
{
|
|
auto texid = tileGetTextureID(tile);
|
|
if (animate) tileUpdatePicnum(texid);
|
|
return TexMan.GetGameTexture(texid);
|
|
}
|