litchie / exult-ios

Exult ( http://exult.sourceforge.net/ )
GNU General Public License v2.0
42 stars 8 forks source link

De-hardcode SDL2 changes #45

Closed DominusExult closed 6 years ago

DominusExult commented 8 years ago

There are some changes to the SDL 2.0.3 code done to make Exult work on iOS. Preferably these changes should be done in our code to make SDL just a drop in. AFAICT by looking at other projects it might be possible to do this via the SDLUIKitDelegate subclassing I added in 84c773210c7cc60581b6e3a70e7606261481332f. A good example is the iOS port of GemRB and their Cocoawrapper which also uses an SDLUIKITDelegate subclass. See https://github.com/gemrb/gemrb/tree/master/apple/CocoaWrapper/ios

DominusExult commented 7 years ago

Commits that changed SDL 2.0.3 code:

To make the 2.0.6 (and 2.0.7) SDL2 release work with Exult-ios you need to patch the Exult xcode project file with xcode_for_SDL2.0.6.diff (some frameworks needed to be added and rearranged). [xcode_for_SDL2.0.6.diff.txt](https://github.com/litchie/exult-ios/files/1374827/xcode_for_SDL2.0.6.diff.txt

With the above patch Exult for iOS compiles with a dropped in SDL 2.0.6 (dropped into SDL2-2.0.3 folder). But has two issues:

DominusExult commented 6 years ago

Partially fixed this in the commits on the November 25. The remaining changes to the SDL2 sources are in 785400f8747394ef59d114716c571ac368d342b3

I Exult's code we only need to change that Exult recognizes the high dpi sizes of iOS devices so we can use better scalers.

DominusExult commented 6 years ago

Closing this now. SDL2 is now a pure drop-in.

I still need to figure out how to run it in HighDPI but so far so good.