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?
Scale down a high res HUD weapon sprite?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
-
-
- Posts: 17360
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
-
-
- Posts: 17752
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Scale down a high res HUD weapon sprite?
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.
You'll have to use [wiki]TEXTURES[/wiki] to resize these sprites.
-
-
- Posts: 950
- Joined: Mon Jul 21, 2008 4:08 am
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia (Modern GZDoom)
Re: Scale down a high res HUD weapon sprite?
It's possible, but not via scale command. You have to create a TEXTURES lump and define EVERY sprite used like this: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?
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
}
-
-
- Posts: 17360
- Joined: Mon Oct 27, 2003 12:07 am
- Location: Kuala Lumpur, Malaysia
Re: Scale down a high res HUD weapon sprite?
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.
Also, it's a shame that offsets on the sprite lump itself are ignored when defining high res sprites this way.
-
-
- Posts: 17752
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Scale down a high res HUD weapon sprite?
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.
-
-
- Posts: 26446
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Scale down a high res HUD weapon sprite?
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?
-
-
- Posts: 17752
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Scale down a high res HUD weapon sprite?
To say nothing about [wiki]TEXTUREx[/wiki] scaling which works in a third different way....
-
-
- Posts: 26446
- Joined: Tue Jul 15, 2003 4:58 pm
- Location: Scotland
Re: Scale down a high res HUD weapon sprite?
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.
-
-
- Posts: 17752
- Joined: Fri Jul 06, 2007 3:22 pm
Re: Scale down a high res HUD weapon sprite?
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).
-
-
- Posts: 12306
- Joined: Tue Jul 21, 2009 12:04 pm
- Preferred Pronouns: He/Him
- Graphics Processor: nVidia with Vulkan support
- Location: capital N, capital S, no space
Re: Scale down a high res HUD weapon sprite?
It would be nice to have new scaling properties and have the old ones deprecated. I hate the ass-backwards system.
-
- Posts: 11
- Joined: Sat Jun 03, 2017 6:20 pm
Re: Scale down a high res HUD weapon sprite?
i love you. seriously this is so easy and solves the problem i was having perfectly, i had to login to thank this post.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.
if anyone googling for a solution and end ups here: it's this one.