ES: origin(x,y) and rings

NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Forum rules
NOTICE: This forum is archived as read only.
Please use the Github Discussions at https://github.com/exult/exult/discussions
Locked
TMNM Dragon

ES: origin(x,y) and rings

Post by TMNM Dragon »

In BG the 3 rings (296-invisibility,297-protection,298-regeneration) are at different offsets. When I check their shape info, their origins are 0,0.
Am I missing something, or is this hardcoded for those shape numbers?
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: ES: origin(x,y) and rings

Post by drcode »

I don't believe any shape offsets are hard-coded. They should come from data in shapes.vga. You could either be seeing a bug in ES, or the (0,0) offsets could be correct.
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: ES: origin(x,y) and rings

Post by wjp »

The rings definitely do not have (0,0) offsets.
TMNM Dragon

Re: ES: origin(x,y) and rings

Post by TMNM Dragon »

If you place all three rings on the ground you can see that they all have different offsets. In Shape Info, there is nothing different about the rings except that the ring of protection has armor(2 points).
Also if you create a new shape at a differnet location and import any of the ring graphics into it, it will be at the same offset as the ring of invisibility(which apears to be 0,0). So how come the other 2 rings have an offset which doesn't show up in shape info?
TMNM Dragon

Re: ES: origin(x,y) and rings

Post by TMNM Dragon »

I see that in #exult@irc.freenode.net, wjp says that it is the actual graphic that causes this, I exported the graphics and looked at them with photoshop at 800% and they appear to be the same (except for the colour). There are no transparent spaces outside the ring on any side. Could this be a bug in the export built into ES?
wjp
Site Admin
Posts: 1708
Joined: Thu May 14, 2020 1:34 pm

Re: ES: origin(x,y) and rings

Post by wjp »

Does PNG have any facilities for the origin information to be stored in it in such a way that you can see the origin in photoshop or any other image editor?

As an aside, the GIMP plugin for .shp files shows the origin by putting rulers at that pixel. I'm fairly sure that the PSP/Photoshop plugin for .shp files I wrote a couple of years ago also uses rulers.
TMNM Dragon

Re: ES: origin(x,y) and rings

Post by TMNM Dragon »

Ok I got it, I had to use expack to get the .shp then open it up in photoshop. The .png that I got from exporting from ES does not seem to contain this info (maybe it's a problem with photoshop).
Well anyways, problem solved.
Thanks for your help.
drcode
Site Admin
Posts: 2267
Joined: Thu May 14, 2020 1:34 pm

Re: ES: origin(x,y) and rings

Post by drcode »

The png's exported by ES are supposed to have the offset set. This is done in "shapes/pngio.cc".
Colourless
Site Admin
Posts: 731
Joined: Thu May 14, 2020 1:34 pm

Re: ES: origin(x,y) and rings

Post by Colourless »

The PNG format has quite a lot of features.
Locked