SDL2 port

SDL2 port

Postby oln » 30 Mar 2018, 14:50

So I worked porting to SDL2 a while ago, and I think I mostly finished it. I may look into ironing out the rest of the problems, but I thought I leave it out here in case anyone else is interested.

Bugs/changes in the port I had noted down:

{l Code}: {l Select All Code}
Up scroll button not working properly.
Need to test guiWindow and addons thing to see if they work properly.
some minor graphical bug when scrolling all the way down on achievments.
Play symbol image seems a bit off.
Changed stats display slightly. (Don't show 2 in one row.)
Text box is a bit bugged.
Missing some borders on the achievent popup


Also just noticed now that changing controls seemed to be broken.

Haven't tested on android so that may be broken.
Joystick support is not implemented yet as the API changed radically in SDL2.
Possibly slightly increased performance due to hardware acceleration in SDL2 and avoiding regenerating some textures on each frame.

https://github.com/oyvindln/meandmyshadow

I can probably create some linux and/or windows binaries if anyone is interested in testing.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: SDL2 port

Postby acme_pjz » 01 Apr 2018, 17:12

Hi,

I'll take a look in next some days.

By the way, recently I found that
{l Code}: {l Select All Code}
#include <SDL_xxx/SDL_yyy.h>
is incorrect (it won't compile under OSX and Windows), the correct one should be
{l Code}: {l Select All Code}
#include <SDL_yyy.h>
(without the SDL directory name). The CMake will find the correct include path. I already fix the code in my branch. Could you fix this in your code before submitting pull request?
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: SDL2 port

Postby oln » 01 Apr 2018, 23:35

I think that is sorted on my branch, or at least I managed to compile it in visual studio, but I'll look over it in any case.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: SDL2 port

Postby acme_pjz » 03 Apr 2018, 06:59

I'm compiling SDL2 dependencies using buildbot. Are you going to create a pull request later? Or should I create a new branch based on your work (not sure how to do this)?

[EDIT] Personally, I'm not quite convinced by the C++11 stuff, especially unique_ptr and shared_ptr. The code in LevelSelect.h is refused to compile, at least on VS2013, since the class Number has a unique_ptr member
{l Code}: {l Select All Code}
   //The (text) image of the number.
   TexturePtr image;
and the compiler complains that Number can't be copy-constructed, since there is a
{l Code}: {l Select All Code}
std::vector<Number> numbers;
change TexturePtr to SharedTexture fixes the compile error, but I don't know if it will cause bugs :|
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: SDL2 port

Postby oln » 05 Apr 2018, 18:42

Ah it's possible VS2013 didn't fully implement moves. Using shared_ptr should be okay though.
I will create a PR once I've fixed a few more things.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: SDL2 port

Postby acme_pjz » 15 Apr 2018, 16:29

oln {l Wrote}:Ah it's possible VS2013 didn't fully implement moves. Using shared_ptr should be okay though.
I will create a PR once I've fixed a few more things.


How is it going on?
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Re: SDL2 port

Postby oln » 16 Apr 2018, 17:38

I've been very busy with work lately, had to work extra due to people being ill, so I haven't had the time to look at it yet, but I will try maybe during this weekend or something.
User avatar
oln
 
Posts: 1020
Joined: 26 Oct 2010, 22:16
Location: Norway

Re: SDL2 port

Postby acme_pjz » 09 Jun 2018, 11:51

OK I think now the SDL2 port is mostly done :)
Some of my open source games on GitHub
User avatar
acme_pjz
 
Posts: 665
Joined: 10 Dec 2009, 15:32
Location: PeeKing, China

Who is online

Users browsing this forum: No registered users and 0 guests