OpenXcom Forum

Contributions => Programming => Topic started by: Warboy1982 on December 03, 2012, 06:20:43 am

Title: adding dependency
Post by: Warboy1982 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.
Title: Re: adding dependency
Post by: kkmic 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.
Title: Re: adding dependency
Post by: Warboy1982 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
Title: Re: adding dependency
Post by: michal on December 03, 2012, 11:34:15 am
Why you can't write lbm loader?

Also, STL_Image or SDL_Image?
Title: Re: adding dependency
Post by: Warboy1982 on December 03, 2012, 11:54:17 am
typo, fixed.
Title: Re: adding dependency
Post by: michal on December 03, 2012, 12:16:36 pm
Using sdl_image would give more possibility in future - in supporting normal image formats ;)
Title: Re: adding dependency
Post by: kkmic 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
Title: Re: adding dependency
Post by: SupSuper 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).
Title: Re: adding dependency
Post by: kkmic 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?
Title: Re: adding dependency
Post by: michal 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?
Title: Re: adding dependency
Post by: Warboy1982 on December 03, 2012, 09:06:53 pm
confirming openxcom_git_master_2012_12_03_1917.exe works as expected.
Title: Re: adding dependency
Post by: moriarty 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?
Title: Re: adding dependency
Post by: SupSuper 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. ;)