2020-05-24 05:58:56 +00:00
|
|
|
#pragma once
|
|
|
|
|
2020-09-14 23:21:17 +00:00
|
|
|
#include <limits.h>
|
2020-05-24 05:58:56 +00:00
|
|
|
#include "textures.h"
|
2020-04-10 16:17:26 +00:00
|
|
|
#include "image.h"
|
2020-05-24 17:12:22 +00:00
|
|
|
#include "i_time.h"
|
2020-06-20 16:17:49 +00:00
|
|
|
#include "intvec.h"
|
2022-01-23 20:30:00 +00:00
|
|
|
#include "name.h"
|
2022-12-07 16:10:27 +00:00
|
|
|
#include "tiletexture.h"
|
|
|
|
#include "maptypes.h"
|
|
|
|
#include "texinfo.h"
|
|
|
|
#include "texturemanager.h"
|
2020-05-24 11:53:27 +00:00
|
|
|
|
2022-12-07 16:10:27 +00:00
|
|
|
// all that's left here is the wrappers that need to go away.
|
2020-05-24 11:53:27 +00:00
|
|
|
|
2020-05-24 05:58:56 +00:00
|
|
|
|
2022-12-07 16:10:27 +00:00
|
|
|
inline const FTextureID spritetypebase::spritetexture() const
|
2020-05-24 05:58:56 +00:00
|
|
|
{
|
2022-12-07 16:10:27 +00:00
|
|
|
return tileGetTextureID(picnum);
|
|
|
|
}
|
2020-05-24 05:58:56 +00:00
|
|
|
|
2022-12-10 19:14:39 +00:00
|
|
|
inline void spritetypebase::setspritetexture(FTextureID tex)
|
|
|
|
{
|
|
|
|
picnum = legacyTileNum(tex);
|
|
|
|
}
|
|
|
|
|
2022-12-07 16:10:27 +00:00
|
|
|
//[[deprecated]]
|
2020-05-24 05:58:56 +00:00
|
|
|
inline int tileWidth(int num)
|
|
|
|
{
|
2022-12-07 16:10:27 +00:00
|
|
|
auto texid = tileGetTextureID(num);
|
|
|
|
if (!texid.isValid()) return 1;
|
|
|
|
else return (int)TexMan.GetGameTexture(texid)->GetDisplayWidth();
|
2020-05-24 05:58:56 +00:00
|
|
|
}
|
|
|
|
|
2022-12-07 16:10:27 +00:00
|
|
|
//[[deprecated]]
|
2020-05-24 05:58:56 +00:00
|
|
|
inline int tileHeight(int num)
|
|
|
|
{
|
2022-12-07 16:10:27 +00:00
|
|
|
auto texid = tileGetTextureID(num);
|
|
|
|
if (!texid.isValid()) return 1;
|
|
|
|
else return (int)TexMan.GetGameTexture(texid)->GetDisplayHeight();
|
2022-08-05 16:47:35 +00:00
|
|
|
}
|
|
|
|
|
2020-06-28 19:38:25 +00:00
|
|
|
|
2022-12-07 16:10:27 +00:00
|
|
|
//[[deprecated]]
|
2020-06-28 19:38:25 +00:00
|
|
|
inline FGameTexture* tileGetTexture(int tile, bool animate = false)
|
2020-05-24 10:31:38 +00:00
|
|
|
{
|
2022-12-07 16:10:27 +00:00
|
|
|
auto texid = tileGetTextureID(tile);
|
|
|
|
if (animate) tileUpdatePicnum(texid);
|
|
|
|
return TexMan.GetGameTexture(texid);
|
2020-05-29 21:33:26 +00:00
|
|
|
}
|