aliens

Author Topic: adding dependency  (Read 9578 times)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
adding dependency
« on: December 03, 2012, 06:20:43 am »
i'm intending to add the SDL_image library in my next addition, which is probably going to require a lot more work than i think.
for starters, the wiki pages will need updating, as will the pre-compiled dependencies, but i'm not sure what else needs updating.
can someone please give me a list of where these changes need to be documented?
and if anyone has the power to do so, could they please take appropriate action?

in case anyone wonders, the reason for the inclusion is for loading the .LBM images for the end sequence screens.
« Last Edit: December 03, 2012, 11:35:05 am by Warboy1982 »

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: adding dependency
« Reply #1 on: December 03, 2012, 10:05:57 am »
I'm sure this question was already asked, but what the hell :)

It's not an option to convert them to a PNG or similar? I mean to a format for which there is already support present.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: adding dependency
« Reply #2 on: December 03, 2012, 10:07:00 am »
not if we're intending on using the original game files, besides, even if we WERE to convert them, we'd need a way to read them in first :P

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: adding dependency
« Reply #3 on: December 03, 2012, 11:34:15 am »
Why you can't write lbm loader?

Also, STL_Image or SDL_Image?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: adding dependency
« Reply #4 on: December 03, 2012, 11:54:17 am »
typo, fixed.

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: adding dependency
« Reply #5 on: December 03, 2012, 12:16:36 pm »
Using sdl_image would give more possibility in future - in supporting normal image formats ;)

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: adding dependency
« Reply #6 on: December 03, 2012, 01:32:15 pm »
Besides, Warboy already provided a screenshot with a LBM loaded by OXC, so writing anything from scratch is kinda pointless

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: adding dependency
« Reply #7 on: December 03, 2012, 03:51:37 pm »
Adding SDL_image is probably better for long-term support anyways, because it supports loading a wide variety of image formats (so we avoid format wars later), and is already built for SDL (unlike lodepng).

Regarding adding a new dependency, basically you want nothing to break unexpectedly for anyone. As you said, you'll need to update the wiki documentation and pre-compiled dependencies, as well as the build files for various platforms (VS, Makefile, CMake, etc). You don't have to know all this yourself, but you should at least notify the people that do (eg. michal runs the Git builder) by contacting them or making a news post on the site or something (if you don't have access to news posts on the site just PM me and I'll set it up).

Offline kkmic

  • Commander
  • *****
  • Posts: 582
  • Undefined
    • View Profile
Re: adding dependency
« Reply #8 on: December 03, 2012, 06:16:27 pm »
Adding SDL_image is probably better for long-term support anyways, because it supports loading a wide variety of image formats (so we avoid format wars later), and is already built for SDL (unlike lodepng).
This means that from now on screenshots will be done using SDL_image?

Offline michal

  • Commander
  • *****
  • Posts: 629
    • View Profile
Re: adding dependency
« Reply #9 on: December 03, 2012, 08:59:12 pm »
Ok, i've managed to get git builder working again, with sdl_image (should support png). Can somebody test latest build? Does it run and works?

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: adding dependency
« Reply #10 on: December 03, 2012, 09:06:53 pm »
confirming openxcom_git_master_2012_12_03_1917.exe works as expected.

Offline moriarty

  • Commander
  • *****
  • Posts: 1421
    • View Profile
    • Luke's OX mod site
Re: adding dependency
« Reply #11 on: December 03, 2012, 11:38:57 pm »
yup, runs just fine. does that mean the code now supports .png image loading? or is that just the first step towards this goal?

Offline SupSuper

  • Lazy Developer
  • Administrator
  • Commander
  • *****
  • Posts: 2162
    • View Profile
Re: adding dependency
« Reply #12 on: December 04, 2012, 01:01:10 am »
This means that from now on screenshots will be done using SDL_image?
No, because for some reason SDL_image only supports loading, not saving, so we still need lodepng for that.

yup, runs just fine. does that mean the code now supports .png image loading? or is that just the first step towards this goal?
Not yet. ;)