Page 1 of 1

Scale down a high res HUD weapon sprite?

Posted: Tue Mar 20, 2012 7:11 am
by Nash
I have a first person weapon sprite which is 2 times larger than the vanilla Doom sprite resolution (it fills a 640 x 400) screen and I want to scale it down.

I tried putting "Scale 0.5" in the weapon definition in DECORATE but it's not scaling down.

Help?

Re: Scale down a high res HUD weapon sprite?

Posted: Tue Mar 20, 2012 7:23 am
by Gez
That'll only scale the world sprites (the weapon pickup), not the HUD sprites...

You'll have to use [wiki]TEXTURES[/wiki] to resize these sprites.

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 2:43 pm
by Jekyll Grim Payne
Nash wrote:I have a first person weapon sprite which is 2 times larger than the vanilla Doom sprite resolution (it fills a 640 x 400) screen and I want to scale it down.

I tried putting "Scale 0.5" in the weapon definition in DECORATE but it's not scaling down.

Help?
It's possible, but not via scale command. You have to create a TEXTURES lump and define EVERY sprite used like this:

Code: Select all

sprite RPGFD0, 640, 480
{
xscale 2
yscale 2
offset -9,71 //or what you need
patch RPGFA0, 0, 0 //simply the name of the sprite
}
Also mind you that a doom screen is not 320x200, it's 320x168 (minus 32 pixels for a status bar), so a dual scale sprite would be actually 640x336. I did this in one of my mods: http://www.doomworld.com/idgames/index.php?id=16336

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 2:47 pm
by Nash
I'm using 320 x 200 because my game has no HUD.

Also, it's a shame that offsets on the sprite lump itself are ignored when defining high res sprites this way.

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 2:57 pm
by Gez
You have the possibly simpler alternative of using placeholder sprites in the sprites [wiki]namespace[/wiki], and the real ones in the hires namespace. Then the scaling is done automatically without having to create a TEXTURE lump.

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 2:59 pm
by Enjay
Personally I think that its a shame that TEXTURES and DECORATE use different logic for their scaling factors. DECORATE using 0.5 to make something half its size and TEXTURES using 2 just seems odd to me. I wonder why it was done that way?

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 3:03 pm
by Gez
To say nothing about [wiki]TEXTUREx[/wiki] scaling which works in a third different way....

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 3:11 pm
by Enjay
True but isn't that something to do with the way the data needs to be stored in the TEXTUREx lump? I always assumed as much but now that you bring it up I realise that I have no sound reason for thinking that.

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 3:22 pm
by Gez
Well, it's an integer value, so it made sense to use a base other than 1 for 1.0 so as to allow scalings like 2.5 (20); or in the other direction for a scale of 0.25 (2).

Re: Scale down a high res HUD weapon sprite?

Posted: Wed Mar 21, 2012 3:34 pm
by NeuralStunner
It would be nice to have new scaling properties and have the old ones deprecated. I hate the ass-backwards system.

Re: Scale down a high res HUD weapon sprite?

Posted: Sun Oct 22, 2017 7:23 pm
by GraveUypo
Gez wrote:You have the possibly simpler alternative of using placeholder sprites in the sprites [wiki]namespace[/wiki], and the real ones in the hires namespace. Then the scaling is done automatically without having to create a TEXTURE lump.
i love you. seriously this is so easy and solves the problem i was having perfectly, i had to login to thank this post.
if anyone googling for a solution and end ups here: it's this one.