2019-10-05 17:28:05 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "textures.h"
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This is not a real texture but will be added to the texture manager
|
|
|
|
// so that it can be handled like any other sky.
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
class FSkyBox : public FTexture
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2020-05-24 19:19:33 +00:00
|
|
|
FTexture *previous;
|
|
|
|
FTexture * faces[6];
|
2019-10-05 17:28:05 +00:00
|
|
|
bool fliptop;
|
|
|
|
|
|
|
|
FSkyBox(const char *name);
|
2020-05-24 19:19:33 +00:00
|
|
|
TArray<uint8_t> Get8BitPixels(bool alphatex);
|
2019-10-18 17:06:57 +00:00
|
|
|
FBitmap GetBgraBitmap(const PalEntry *, int *trans) override;
|
2019-10-05 17:28:05 +00:00
|
|
|
FImageSource *GetImage() const override;
|
|
|
|
|
|
|
|
|
|
|
|
void SetSize()
|
|
|
|
{
|
2020-05-24 19:19:33 +00:00
|
|
|
if (!previous && faces[0]) previous = faces[0];
|
|
|
|
if (previous)
|
|
|
|
{
|
|
|
|
CopySize(previous);
|
|
|
|
}
|
2019-10-05 17:28:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bool Is3Face() const
|
|
|
|
{
|
|
|
|
return faces[5] == nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool IsFlipped() const
|
|
|
|
{
|
|
|
|
return fliptop;
|
|
|
|
}
|
|
|
|
};
|