Author Topic: Graphic Format Standardization  (Read 3382 times)

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Graphic Format Standardization
« on: April 01, 2015, 04:18:45 am »
Not sure exactly why this is the case, but at least on OSX all battlescape items should be PNG's with the first index color set to something that's not used. I'm using green at 255 personally. But basebits set to this generate corrupted GFX, but transparent GIF files do not. Not sure why one format works in one context but not the other and vice-versa. What I'm seeing with the PNG is what I usually see with GIF files on OSX.

Of course maybe this isn't possible because of some of the original xcom limitations?

EDIT, clarification. PNG still works, but background must be transparent, not green 255 in order to work.
« Last Edit: April 01, 2015, 04:25:48 am by jackstraw2323 »

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: Graphic Format Standardization
« Reply #1 on: April 01, 2015, 04:57:12 am »
Additional addendum, it seems a non indexed PNG with transparency works, which is unique behavior as most everything else seems to require the index to match up. I haven't tested with non standard colors, but it seems to be failing gracefully based on my preliminary test.

EDIT. Let me know if I'm wrong please, but now that I think about it, there's not a pallet for the base specifically, unless it's using battlescape? maybe it's looser than all the other sprite requirements? I'd just gotten in the habit of using the battle pallet set for most of this stuff since I've not touched UFO pedia or other items much yet.
« Last Edit: April 01, 2015, 05:14:23 am by jackstraw2323 »

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Graphic Format Standardization
« Reply #2 on: April 01, 2015, 08:48:16 am »
it's all down to how sdl handles the image format in your environment. it differs greatly between operating systems. as such it is very hard to prescribe a "standard". there are a few palettes floating around in the various discussions on the topic. try some of those and stick with the file format/palette combination that works best for you.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: Graphic Format Standardization
« Reply #3 on: April 01, 2015, 01:44:27 pm »
Thanks for the response, what I meant though was that it seems like the behavior of the format is different on basebits vs everything else, which seems strange to me, but maybe transparency/index is handled differently on basebits than bigobs, handobs, etc?

Offline yrizoud

  • Commander
  • *****
  • Posts: 1014
    • View Profile
Re: Graphic Format Standardization
« Reply #4 on: April 01, 2015, 03:34:31 pm »
Let me know if I'm wrong please, but now that I think about it, there's not a pallet for the base specifically, unless it's using battlescape?
There is a dedicated "basescape" palette
https://www.ufopaedia.org/index.php?title=PALETTES.DAT#UFO
It has a lot of colors in common with battlescape, so you may have been lucky so far.

Offline jackstraw2323

  • Colonel
  • ****
  • Posts: 206
    • View Profile
Re: Graphic Format Standardization
« Reply #5 on: April 01, 2015, 03:41:21 pm »
Thanks, that helps. Strange that sometimes transparent index 1 works and sometimes it doesn't on OS X.