View Single Post
Old May 1, 2013, 23:11   #96
Hajo's Avatar
Join Date: Aug 2010
Posts: 142
Hajo is on a distinguished road
Last post here was 2 and half a year ago ... it's hard to believe how fast time passes. I've been ill, been busy with other projects, distracted, well and when I finally thought it would be fine to work on Iso-Angband some more, I had to see that the world has changed again. Much.

Angband has gotten a much advanced main-sdl.c now, new and better tile sets, and I'm even no longer sure if isometric display is a good idea. But to get a start, I've downloaded Angband 3.4.1 sources and tried to learn how the new main-sdl.c works. I've manged to compile it, run it, and replace a few routines in the main-sdl.c to see ho a graphical display could be linked to it, and it seems to work all fine now. It's just been very slow progress the past days, because so much is new and I'm slow in reading code, and finding out how everything is supposed to work.

To avoid loss of code, screenshots and all that again, this time I've registered a project on SourceForge:

There isn't anything to show or see yet, since I'm just starting again. Still with the idea of nice and easily readable graphics in mind, but better integrated with Angband than the former display was. I hope I'll have something to show in a few days.

PS: Angband 3.4.1 can't read it's own pref-file dumps for objects, since it expects object names in a slightly different format than the one that it writes.

I have no idea if my fix was right, I changed the dump routine to produce the same object name format which the parsing routine uses when it compares object names with the names read from the pref file.

--- a/yanovatar_source/trunk/src/prefs.c
+++ b/yanovatar_source/trunk/src/prefs.c
@@ -239,13 +239,16 @@
 		object_kind *k_ptr = &k_info[i];
 		const char *name = k_ptr->name;
+                char buf_name[1024];
 		if (!name) continue;
-		if (name[0] == '&' && name[1] == ' ')
-			name += 2;
+		// if (name[0] == '&' && name[1] == ' ')
+		//	name += 2;
+                obj_desc_name_format(buf_name, sizeof buf_name, 0, name, 0, FALSE);
 		file_putf(fff, "K:%s:%s:%d:%d\n", tval_find_name(k_ptr->tval),
-				name, k_ptr->x_attr, k_ptr->x_char);
+				buf_name, k_ptr->x_attr, k_ptr->x_char);
I have a project problem? I have no project problem. I start a project, I work on it, it fails. No problem
Hajo is offline   Reply With Quote