mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +00:00
- make upscaling of sky textures depend on the single tile size, not the entire composite texture.
This commit is contained in:
parent
7d3b604361
commit
793aaf242c
3 changed files with 9 additions and 4 deletions
|
@ -136,8 +136,12 @@ public:
|
|||
void SetSpriteRect();
|
||||
|
||||
ETextureType GetUseType() const { return UseType; }
|
||||
void SetUpscaleFlag(int what) { shouldUpscaleFlag = what; }
|
||||
int GetUpscaleFlag() { return shouldUpscaleFlag == 1; }
|
||||
void SetUpscaleFlag(int what, bool manual = false)
|
||||
{
|
||||
if ((shouldUpscaleFlag & 2) && !manual) return; // if set manually this may not be reset.
|
||||
shouldUpscaleFlag = what | (manual? 2 : 0);
|
||||
}
|
||||
int GetUpscaleFlag() { return shouldUpscaleFlag & 1; }
|
||||
|
||||
FTexture* GetTexture() { return Base.get(); }
|
||||
int GetSourceLump() const { return Base->GetSourceLump(); }
|
||||
|
|
|
@ -1190,10 +1190,10 @@ void FTextureManager::Init(void (*progressFunc_)(), void (*checkForHacks)(BuildI
|
|||
AddGameTexture(CreateShaderTexture(true, true));
|
||||
// Add two animtexture entries so that movie playback can call functions using texture IDs.
|
||||
auto mt = MakeGameTexture(new AnimTexture(), "AnimTextureFrame1", ETextureType::Override);
|
||||
mt->SetUpscaleFlag(false);
|
||||
mt->SetUpscaleFlag(false, true);
|
||||
AddGameTexture(mt);
|
||||
mt = MakeGameTexture(new AnimTexture(), "AnimTextureFrame2", ETextureType::Override);
|
||||
mt->SetUpscaleFlag(false);
|
||||
mt->SetUpscaleFlag(false, true);
|
||||
AddGameTexture(mt);
|
||||
|
||||
int wadcnt = fileSystem.GetNumWads();
|
||||
|
|
|
@ -72,6 +72,7 @@ FGameTexture* GetSkyTexture(int basetile, int lognumtiles, const int16_t *tilema
|
|||
build[i].Translation = GPalette.GetTranslation(GetTranslationType(remap), GetTranslationIndex(remap));
|
||||
}
|
||||
auto tt = MakeGameTexture(new FImageTexture(new FMultiPatchTexture(tilewidth*numtiles, tileHeight(basetile), build, false, false)), synthname, ETextureType::Override);
|
||||
tt->SetUpscaleFlag(tileGetTexture(basetile)->GetUpscaleFlag(), true);
|
||||
TexMan.AddGameTexture(tt, true);
|
||||
return tt;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue