Can anybody comment on when can we expect an SDL 2 port , not SDL 1.2 but SDL2 port.
SDL2 port when ?
Collapse
X
-
Hahaha... oh wow
So far as I'm aware, nobody has expressed any interest in doing that yet.
You'd be more than welcome to take a stab at it yourself though.Comment
-
Comment
-
No problem. I think everyone just forgot about it after this story with rewriting the UI... I also forgot (hence my "oh wow" ). So now that I remembered, I wonder what happened with this code? I don't have it, I only have textui2, cloned from Takkaria's repo (which also doesn't seem to have it)... Maybe it's lost forever. Meh, whatever...Comment
-
Code:~/games/takkaria-angband$ git-info ## Remote URLs: origin https://github.com/takkaria/angband.git (fetch) origin https://github.com/takkaria/angband.git (push) ## Remote Branches: origin/HEAD -> origin/master origin/avg-dmg origin/los-searching origin/master origin/pr-auto-books origin/pr-heal-other origin/pr-slot-sizes origin/text-out-cleanup origin/wip-textui2 ## Local Branches: * master ## Most Recent Commit: commit 6a5df0b662caca9fff9d332c1ec6b21e7b36e595 Author: Nick McConnell <nckmccnnll@gmail.com> Remove trap, door and stair detection Type 'git log' for more commits, or 'git show <commit id>' for full commit details. ## Configuration (.git/config): user.name=shirish agarwal user.email=xxxxxxxxxxxx core.repositoryformatversion=0 core.filemode=true core.bare=false core.logallrefupdates=true remote.origin.url=https://github.com/takkaria/angband.git remote.origin.fetch=+refs/heads/*:refs/remotes/origin/* branch.master.remote=origin branch.master.merge=refs/heads/master
The compilation fails as it looks for libsdl1.2 config
The relevant bits -
Code:checking for sdl-config... no checking for SDL - version >= 1.2.10... no *** The sdl-config script installed by SDL could not be found *** If SDL was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the SDL_CONFIG environment variable to the *** full path to sdl-config. checking for Mix_OpenAudio in -lSDL_mixer... no
Code:$ sdl2-config --version 2.0.8
The first one is an all encompassing one, the second one is supposedly more narrower in scope.
I am no developer but can help with compiling and telling what seems to come up short.Comment
-
I tried it actually :-
The compilation fails as it looks for libsdl1.2 config
I am no developer but can help with compiling and telling what seems to come up short.Comment
-
Indeed, since it was never incorporated into Angband. I recall you need to run autoconf with "--disable-sdl" actually (which disables SDL1), and then manually hack the Makefile.std (that's what I did back then)...
You can try to go back futher in this branch and look for something like Makefile.sdl2... although it probably shouldn't be there. If not, I can write the Makefile, but not right now, maybe in several days (also, I still don't know how autoconf works )
It actually uses autogen.sh .
When I run ./autogen.sh the following takes place -
Code:~/games/takkaria-angband$ ./autogen.sh *info* running aclocal (-I m4) *info* running autoheader *info* running autoconf
The Makefile is generated when the .configure script is taken care of . Once it is complete, you get a makefile.
If I just do -
Code:~/games/takkaria-angband$ ./configure --with-no-install
There is a Makefile though but that's in -
Code:~/games/takkaria-angband/src$ cat Makefile.src | grep sdl SDLMAINFILES = main-sdl.o SNDSDLFILES = snd-sdl.o
I'm currently doing some C programming and I actually want to use the SDL library. I want to build a Small 2D game in C on Linux to sharp my skills a bit. My issue is I'm not a super Makefile user...
Reading it few times it seems it needs the following info. -
Code:/usr/bin/sdl2-config /usr/include/SDL2/SDL.h /usr/lib/x86_64-linux-gnu/libSDL2.so
Code:/usr/include/SDL2/SDL_mixer /usr/lib/x86_64-linux-gnu/libSDL2_mixer.so
from https://wiki.libsdl.org/FAQLinux#How..._my_project.3F
it seems acinclude.m4 is what needs to be fixed -
it needs https://hg.libsdl.org/SDL/file/default/sdl2.m4
I did try to do a copy and replace but didn't get far.
This is what I did with acinclude.m4
I get the following errors when I try to ./autogen.sh it -
Code:~/games/takkaria-angband$ ./autogen.sh *info* running aclocal (-I m4) acinclude.m4:157: warning: the serial number must appear before any macro definition configure.ac:269: warning: macro 'AM_PATH_SDL' not found in library *info* running autoheader *info* running autoconf configure.ac:269: error: possibly undefined macro: AM_PATH_SDL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. *error* autoconf failed. (exit code = 1)
Last edited by shirish; September 20, 2018, 14:50.Comment
-
Hi,
It actually uses autogen.sh .
When I run ./autogen.sh the following takes place -
Code:~/games/takkaria-angband$ ./autogen.sh *info* running aclocal (-I m4) *info* running autoheader *info* running autoconf
The Makefile is generated when the .configure script is taken care of . Once it is complete, you get a makefile.
Code:/usr/lib/x86_64-linux-gnu/libSDL2.so /usr/lib/x86_64-linux-gnu/libSDL2_mixer.so
I get the following errors when I try to ./autogen.sh it -
Code:~/games/takkaria-angband$ ./autogen.sh *info* running aclocal (-I m4) acinclude.m4:157: warning: the serial number must appear before any macro definition configure.ac:269: warning: macro 'AM_PATH_SDL' not found in library *info* running autoheader *info* running autoconf configure.ac:269: error: possibly undefined macro: AM_PATH_SDL If this token and others are legitimate, please use m4_pattern_allow. See the Autoconf documentation. *error* autoconf failed. (exit code = 1)
Comment
-
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
Code:/usr/lib/x86_64-linux-gnu/libSDL2_ttf.so /usr/lib/x86_64-linux-gnu/libSDL2_image.so
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
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
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.
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 isComment
-
OK, shirish, tell you what. When I'll have some free time and gather some strength (hopefully in the next several days) I'll fork Angband's repo on github, add SDL2 frontend to it, and post compilation instructions here (in this forum). Who knows, maybe I'll even make pull request to the upstream again... SDL1 is really getting obsolete... but then, so is AngbandComment
-
So I guess the only thing to do is to add the module to the list in main.c...
Now the problem is remembering how Github works. And that also reminds me that Github was bought by the oligarchs from Microsoft. Argh! Well, life is cruel and unfair... I'll see what I can do In a couple of days, maybe?Comment
-
Interestingly, it's actually there: https://github.com/takkaria/angband/.../Makefile.sdl2
So I guess the only thing to do is to add the module to the list in main.c...
Now the problem is remembering how Github works. And that also reminds me that Github was bought by the oligarchs from Microsoft. Argh! Well, life is cruel and unfair... I'll see what I can do In a couple of days, maybe?
If you can't stand github.com I could put the takkaria's port on salsa.debian.org . I have access there. It's a gitlab instance. We could also use gitlab's own instance as well.
Comment
-
If you can't stand github.com I could put the takkaria's port on salsa.debian.org . I have access there. It's a gitlab instance. We could also use gitlab's own instance as well.
https://about.gitlab.com/
After writing the SDL2 port I decided that Angband's entire UI is outdated and has too many hacks (accumulated over decades) and needs to be rewritten. So I did rewrite the UI and it turned out pretty good (opinion ). However, Angband's UI is large (about 1/3 of the whole program) and it was never pulled into the official repo. Currently, Angband's devteam seems to consist of one person who has limited time to work on it and there are just no resources for such a massive disruption. Meanwhile, everyone's forgotten that there is, in fact, a complete and working SDL2 frontend...
So... question to the maintainer:
NIck, let's be realistic here, textui2 will never make it into Angband. However, main-sdl2.c is a plausible addition to the game. It's just another frontend, after all. SDL1 is an obsolete library, and SDL2 port, as you know, has more and better functionality. I can register on Github again and send a pull request. What do you say?
If not, I'd rather go with shirish's suggestion and use Gitlab.Last edited by t4nk; September 21, 2018, 14:17.Comment
Comment