ToME 2 maintenance

Everything about ToME 2.x.x. No spoilers, please

Moderator: Moderator

Message
Author
AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#121 Post by AnonymousHero »

I've pushed a set of massive updates to the quest handling. The old process_hooks() nonsense is now completely gone.
This has probably introduced a few bugs, but it also fixed the long-standing "game cannot load if you save during the Thieves quest" bug! :)

I still haven't reimplemented an Automatizer alternative, but I'll see if I get time this weekend.

I'd appreciate it if people could try to give this a whirl. Even a compile failure is valuable information -- hopefully we'll get those fixed in due course.

LordEstraven, I've also tried to fix the min/max stuff properly, so I'd appreciate if you gave the current 'cpp-porting' a compile.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#122 Post by Lord Estraven »

Okay let's see...

gods.cc compiles now, that's good...

And as far as I can tell the game compiles and runs perfectly. Awesome. :D

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#123 Post by Lord Estraven »

As of the current revision (d05ee40) it throws an error when linking the binary:

Code: Select all

CMakeFiles/tome.dir/cmd5.cc.o: In function `get_level_school(tome::spell const*, int, int)':
cmd5.cc:(.text+0x42b5): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
CMakeFiles/tome.dir/casting_context.cc.o: In function `tome::device_casting_context::scaled_effective_level(tome::spell const*, int, int) const':
casting_context.cc:(.text+0x393): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
collect2: ld returned 1 exit status
make[2]: *** [src/tome] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#124 Post by AnonymousHero »

That doesn't make any sense in terms of any of the changes I've been making.

Are you absolutely 100% positively sure that you're compiling with a fresh checkout, the lastest master, etc. etc.?

EDIT: Well, I can see from the commit ID that you've certainly got the latest source.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#125 Post by Lord Estraven »

Oh hmm. Maybe it was the changes I made? Shouldn't be, but I'll check. Sry.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#126 Post by Lord Estraven »

Sorry for the delay... No, the error has nothing to do with my changes. On linking completely unaltered T2 from cpp-porting I get

Code: Select all

CMakeFiles/tome.dir/cmd5.cc.o: In function `get_level_school(tome::spell const*, int, int)':
cmd5.cc:(.text+0x42b5): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
CMakeFiles/tome.dir/casting_context.cc.o: In function `tome::device_casting_context::scaled_effective_level(tome::spell const*, int, int) const':
casting_context.cc:(.text+0x393): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
collect2: ld returned 1 exit status
make[2]: *** [src/tome] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#127 Post by AnonymousHero »

Oh, hang on. You're compiling on 32-bit right?

I think the problem happens because "s32b" != "int" on your platform. Try changing the "lua_get_level" prototype in cmd5.hpp or cmd5.cc to use s32b instead of int to see if that helps.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#128 Post by Lord Estraven »

It doesn't, there is no s32b type.

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#129 Post by AnonymousHero »

?

s32b is defined in "h-type.h" (in the src/ directory).

You'd need to include "h-type.h" at the top of cmd5.hpp.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#130 Post by Lord Estraven »

You're right, sorry about that. :oops: Unfortunately switching it to s32b still results in the same error on linking.

jtwadsworth
Wayist
Posts: 15
Joined: Wed Jan 06, 2010 1:51 am

Re: ToME 2 maintenance

#131 Post by jtwadsworth »

Any chance of getting an OS X compile to an .app package?

I am happy to help if I can with this. The current version of Angband (3.2.0) compiles very nicely into a .app using make. We should be able to get the same from the git code for ToME 2.x.x

jtw

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#132 Post by AnonymousHero »

Some of you may have noticed that I haven't really pushed anything new in a little while.

I've been having a devil of a time with a weird memory-corrupting bug in code that seems completely unrelated to the commit at which the error starts appearing. (That is, git bisect finds a commit which breaks the game start completely, but any of the code changes there don't seem relevant to the actual crash stack trace -- it's just moving a few function definitions to a separate header and namespace.).

I'm also a bit dissappointed by the amount of code that actually needs to be written to write C++ safely (i.e. stuff like the "rule of three", etc.). I've written C++ professionally before, but I think I'd sort of "forgotten" the amount of actual effort needed to write C++ safely/properly. There also don't seem to be a lot of tools out there for checking C++ code for common errors-that-will-bite-you-later (for example: "static initialization fiasco") -- or maybe I just don't know how to find them. This also makes things more difficult than they should be (see above about breakage "unrelated" to code changes).

It's not all bad though, C++0x "auto" seems to be a huge boon and generalized initializers seem very nice.

There is also the whole issue of licensing which prevents use of GPL libraries and complicates things for distribution packaging.

Given these issues, I'm reevaluating the whole enterprise.

On the more positive side I am (and have been) working on a roguelike written in Haskell. It's not really ready for general consumption at this point in time, but the real basics (movement, attacking in melee ) are working -- no LoS right now though. For content (monsters, etc.) I'm thinking of having a loader which reads vanilla Angband edit files. Monster.txt loading is already implemented and I'm working on making monster spells/breaths work properly. Right now it's just one dungeon (boring with a bad level generator), but I've been thinking of loading ToME data files for overhead map, etc. The ToME-derived data files would be "encumbered" by the old Angband license which is GPL incompatible, but distributing them separately from the GPLed game itself should be fine.)

AnonymousHero
Spiderkin
Posts: 482
Joined: Sat Mar 18, 2006 12:48 pm

Re: ToME 2 maintenance

#133 Post by AnonymousHero »

@jtwadsworth: What would be needed to produce an .app package? Is there documentation for this, does it need any OS X native tools, etc. etc.?

If you can figure out what Angband 3.2.x does, that would be helpful.

jtwadsworth
Wayist
Posts: 15
Joined: Wed Jan 06, 2010 1:51 am

Re: ToME 2 maintenance

#134 Post by jtwadsworth »

@AnonymousHero - well I'd think the place to start would be the Makefile.osx from Angband 3.2.0 and see how it builds the .app? I don't think anything in particular is needed other than the instructions to make on how to build the .app from the complied executable.

jtw

Been hanging out in Angband IRC. As I look through the ToME source, it seems all the pieces are there for an OS X specific build, including the handling of the UI (main-crb.c), icons, etc; which makes sense since DG posted long ago an OS X .app build (which I still play) but I never had the source for it. I can possibly take the Makefile.osx from Angband and adapt it to ToME. But we are using Cmake now instead of make which confuses me a bit since there are no makefiles.

The 2.3.5 source compiles nicely with make into an OS X .app package perfectly. The problem is when we switched to cmake, that capability was not added as well.

Lord Estraven
Uruivellas
Posts: 718
Joined: Tue Dec 13, 2005 12:35 am

Re: ToME 2 maintenance

#135 Post by Lord Estraven »

Gah. Still getting

Code: Select all

cmd5.cc:(.text+0x42b5): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
CMakeFiles/tome.dir/casting_context.cc.o: In function `tome::device_casting_context::scaled_effective_level(tome::spell const*, int, int) const':
casting_context.cc:(.text+0x393): undefined reference to `lua_get_level(tome::spell const*, int, int, int, int)'
collect2: ld returned 1 exit status
make[2]: *** [src/tome] Error 1
make[1]: *** [src/CMakeFiles/tome.dir/all] Error 2
make: *** [all] Error 2
with a clean compile. No idea what's going on.

Post Reply