Saturday, April 10, 2010

libtcod -> swig -> magecrawl -> true

Today I finally got magecrawl working with the SWIGed wrappers. It was a 2800 or so line diff, but much if that is how noisy diff can get when you change only one line in a file. Much of these changes can be traced to the printLine changes that are inbound for the newest libtcod.

Beyond tracking down some bugs in libtcod (joys of living in bleeding edge svn), the changes where very mechanical. Find and replace will get users of libtcod-net 90% of the way there. For theses pains, they will receive APIs previously unwrapped (height map), new APIs as soon as they are released (the new textbox module hopefully), and much faster turnaround for new releases.

I will get together a C# and a lua demo zip later this evening, so people can tests things out if they want.

The obligatory magecrawl screenshot

6 comments:

Humboldt said...

Hi, I think I may have found a bug in TCODConsole.setCustomFont().
It gives the same output with both TCODFontFlags.LayoutAsciiInRow and TCODFontFlags.LayoutAsciiInColumn.

TCODConsole.setCustomFont("terminal8x8_gs_ro.png", (int)TCODFontFlags.LayoutAsciiInRow, 16, 16);
and
TCODConsole.setCustomFont("terminal8x8_gs_ro.png", (int)TCODFontFlags.LayoutAsciiInColumn, 16, 16);
do the same thing.

donblas said...

Can you send me an example program that shows this. The wrapper just passes the numbers (1 and 2 in this case) down to libtcod. Are you calling setCustomFont before or after you init the console?

Humboldt said...

I call setCustomFont before initroot.
What is your email address?

donblas said...

chris dot hamons at gmail dot com

Humboldt said...

Ok, I've found the problem.
Well, Jice did actually.

http://doryen.eptalys.net/bugs/index.php?do=details&task_id=16

I switched to the opengl renderer and now it works.

Sorry for the false alarm.

donblas said...

Awesome. I hadn't even gotten around to look yet, and it's already bugged. :)