Flipping sprites and the offset property

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Xtyfe
Posts: 1490
Joined: Fri Dec 14, 2007 6:29 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: nVidia with Vulkan support

Flipping sprites and the offset property

Post by Xtyfe »

I have some fist sprites that I want to flip to make right handed, however the actor definition uses offsets to smooth it. I know I will have to change the offset values as well due to flipping but I'm not sure where to start.

Is there some sort fancy math I can do to work this out?
User avatar
Professor Pants
Posts: 30
Joined: Fri Jan 20, 2012 3:43 pm
Contact:

Re: Flipping sprites and the offset property

Post by Professor Pants »

I made a wad using TEXTURES which flips the original Doom pistol and fist on the Y axis. It might work right away. If not, adjust accordingly. (Not sure how the DECORATE offset works, only used it once.)

righthanded.wad

Also, here's the code:
Spoiler: Code
Oh, and here's a screenshot:
Spoiler: Screenshot
Also, if you need to change the code at all, here's where I got all those numbers:
Spoiler: Formula
User avatar
jpalomo
Posts: 772
Joined: Mon May 17, 2010 9:45 am

Re: Flipping sprites and the offset property

Post by jpalomo »

I'm not sure how offset (decorate) affects offset (textures). I think it only modifies the position based on the offset set by textures. If so, you will probably only need to modify the x values in decorate. The number to add depends on how large the sprites are. I don't know of any easy way to figure it out so you might have to experiment.
Locked

Return to “Editing (Archive)”