Page 1 of 1

d Texture scaling

Posted: Sat Apr 23, 2016 5:57 pm
by Zeberpal
Hello Zandronum!

Is there a way to have 1 base texture and to make variations of it?

For example, here I have a texture named ASDFJKL 128*128. And I want to have it's 512*512 copy. But I don't want manually resizing it via Photoshop and add it as a standalone texture, I want it to be a dummy of original!
I believe there is a way via TEXTURES lump, and ofcourse I zdoomwikied it before posting my problem here. There is something like PATCH thing that is supposedly acts like addon, but i'm really lost in synthaxis of explanation. Actually I'm drunk at the moment and don't savvy, but I'm sure I would not understand what are they saying in wiki even if I wasn't, heh. Please help a poor drunk russian guy to find his home :neutral:

Re: d Texture scaling

Posted: Sat Apr 23, 2016 9:44 pm
by SwordGrunt
I was kind of confused by TEXTURES when I first saw it too, but it's pretty simple, especially if all you want to do is resize textures. If your texture is named ASDFJKL (128x128) and you want to create a 512x512 version of it named ASDFBIG, here's what you'd need in TEXTURES.txt:

Code: Select all

texture ASDFBIG, 128, 128	// original graphic dimensions
{
	xscale 0.25
	yscale 0.25
	patch ASDFJKL, 0, 0		// no offset needed
}
Scales are inverted, so 0.25 scales up to four times the size, while 2 would halve the texture's dimensions.

You can use TEXTURES not only for creating/modifying textures, but any graphic in the game (including sprites and menu graphics). Patches need not be actual patches either, they can be any graphic (in this case, a texture).

Re: d Texture scaling

Posted: Sun Apr 24, 2016 7:36 am
by Zeberpal
Oh I got it working now! Thank you SwordGrunt :biggrin: