Wintermute Engine > Development

Using more SDL projects?

(1/2) > >>

HCDaniel:
I'm wondering why wmelite uses "separate" libraries for font rendering, image loading and audio processing, and not "SDL_ttf", "SDL_image" and "SDL_mixer".

It surely makes no sense to change the first two now, as they work fine on all platforms. I wonder whether it would make sense to have SDL_mixer as replacement for BASS, allowing packages for several Linux distributions to be built (and accepted).

Mnemonic, do you have any insights how difficult the BASS replacement might be?

Mnemonic:
Unfortunately, I know next to nothing about SDL mixer. I will have to take a look one of those days.

HCDaniel:
Ok, I'll look into it and see if I can get it to work somehow.

HCDaniel:
I put all my changes into this repo:

https://bitbucket.org/hardcoredaniel/freewmelite

It requires a modified SDL_mixer from here:

https://bitbucket.org/hardcoredaniel/wmelite-dependencies-for-linux-and-android

The other dependencies are unchanged.

The WME touch demo seems to work. Bigger projects start behaving funny when the mixer channels are all used up. So this will require some more work until it is usable.

HCDaniel:
Hi Mnemonic,

I want to integrate the SDL_mixer variant into regular wmelite. It does not make sense to keep the fork around if there are in fact just 2 files "replaced".

Here's my idea for integration, please let me know what you think:

1) Add dedicated macros for LOBYTE/HIWORD/MAKEWORD... into BPersistMgr.cpp. Currently the #defines from BASS are used, but the non-bass version should not depend on that. The Macro's names should be different to not be redefinitions in case bass.h is there. Once that is done, wmelite is prepared to cope with different sound system implementations :)

2) Move the BSoundBuffer.* and BSoundMgr.* files into a "BASS" subdirectory, and place the "SDL_mixer" counterparts into its dedicated subdirectory as well. Regular wmelite now includes the former, the SDL_mixer based implementation uses the latter sources and header files.

As a result, every platform would now have a "default" build target (BASS) after some small path adaptations. For those who want SDL_mixer, a separate build target/Makefile/whatever would be required.

I hope that with this approach it will be possible to package wmelite for Linux distributions (without BASS), up to the point where a distribution might decide to add it to their official repositories (sometime in the distant future). There's still a lot of work to be done before the implementation is ready though.

What is your opinion on that?

Navigation

[0] Message Index

[#] Next page

Go to full version