View Single Post
Old September 20, 2018, 15:34   #11
shirish
Rookie
 
Join Date: Aug 2018
Posts: 22
shirish is on a distinguished road
Quote:
Originally Posted by t4nk View Post
Yeah, in principle, it should be simple enough. Replace main-sdl.c (SDL1 version) with main-sdl2.c, replace all references to main-sdl.c with references to main-sdl2.c in autogen stuff, link with SDL2 instead of SDL1, and then it should work. I just don't know how to do it
Code:
/usr/lib/x86_64-linux-gnu/libSDL2.so
/usr/lib/x86_64-linux-gnu/libSDL2_mixer.so
You'll also need libSDL2_ttf.so (for loading fonts) and libSDL2_image.so (for loading tiles).
All of these I have -

Code:
/usr/lib/x86_64-linux-gnu/libSDL2_ttf.so 
/usr/lib/x86_64-linux-gnu/libSDL2_image.so
As far main-sdl.c I didn't find any changes to do apart from the comments -

Code:
~/games/takkaria-angband/src$ cat main-sdl.c | grep endif
#endif
#endif
#endif /* USE_SDL2 */
Code:
games/takkaria-angband/src$ cat main-sdl.c | grep ifdef
#ifdef USE_SDL2
Quote:
Originally Posted by t4nk View Post
Well, if you're serious about it, I'll write the Makefile. It'll be simpler than trying to figure out autoconf The only problem with that is I now have a new hobby , which is writing a roguelike, loosely inspired by (among other things) Angband. And I'm not using C or Make for that, so it'll cause me some moral suffering to go back to those, and I need to muster my strength first
There might be other things which might be contributing to the complexity -

My tooling -

Code:
$ libtool --version
libtool (GNU libtool) 2.4.6
Written by Gordon Matzigkeit, 1996

Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Code:
$ autoconf --version
autoconf (GNU Autoconf) 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<http://gnu.org/licenses/gpl.html>, <http://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David J. MacKenzie and Akim Demaille.
Code:
$ automake --version
automake (GNU automake) 1.16.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Tom Tromey <tromey@redhat.com>
       and Alexandre Duret-Lutz <adl@gnu.org>.
Code:
$ gcc --version
gcc (Debian 8.2.0-6) 8.2.0
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
so it's possible there might be bug-fixes, regressions etc. that I do not know about . As shared before I'm not a developer so don't know anything about C.

I personally like cmake for compiling as things are lot smoother and it's easier to debug, give feedback to developers etc. but it is what it is
shirish is offline   Reply With Quote