Another question--how do you get graphics working for MacOS X. I was able to get it working for Angband, and chased down some bugs in it as well.
HarryErwin: OK, I've been walking through the code in V and T.o.M.E., and most of the code looks identical. I've dug out the latest versions of 32x32.png and graf-dvg.prf and have discovered that they don't work with T.o.M.E., which suggests that get_resource_spec() or create_gworld_from_spec() is throwing up in globe_init(). On the other hand, globe_init() is not returning an error, so it is more likely that graf-dvg.prf is not being found. OK, checking graf-mac.prf, I see where graf-dvg.prf gets loaded. That means I can probably hack T.o.M.E. to do 32x32 graphics by playing around with the preferences files. Why hasn't anyone done this before?
HarryErwin: That was certainly easy. All I had to do was move the dvg files from V into the prefs directory and add the david case to graf-mac.prf. It looks like most of the tiles are already correctly mapped. I know from the bugfix work for V how to edit the .prf files, so now it's simply a question of finding the time to do the editting. Off we go...
Anyone else want the 32x32 graphics?
TheFalcon: Would that work for Windows?
HarryErwin: I think so. The .prf files can be the same; a .bmp file has to be used instead of a .png file for the tiles themselves.
HarryErwin: It's a bit messy... I've been experimenting with Tile Assigner, and it looks like I might be better off writing my own in Java to load both the 32x32 graphics and the 16x16 graphics. I would then use the 16x16 tile to choose an appropriate 32x32 tile. Eventually, I would write the appropriate pref file out based on my selections. Actually this approach might allow me to assemble graphics and pref files to order. That will have to wait until I'm past the current big push (an intensive course in MATLAB to teach next week and a programme approval event the following week for the Information Systems Security MSc that I'm in charge of). I suppose some Java graphics programming might help me keep my sanity through that. Watch this space.
TheFalcon: Hmm. I can't quite figure this out. I've been looking at the pref files, and each one has its index value in the edit file, followed by a code 0x../0x.. That looks like hexadecimal, but when I translate the values, I can't see what they refer to. I would have expected the x,y coordinates of the tile, either in pixels or groups of 16 pixels, but that doesn't seem to work. I'm probably missing something very obvious here...
Hang on, am I looking at the right files?... Yes, I am!
HarryErwin: The format of the prf files is fairly simple. They're text files. Blank lines are ignored and comments begin with #. ? is used for tests, and % includes other files. That's how the correct prf file gets pulled in with no obvious source code involved. The lines that start with a letter describe various symbols. Their format is
Type:Value:hex1:hex2
hex1:hex2 identifies a specific tile in the graphics that gets loaded. Unfortunately the 16x16 and 32x32 graphics have different layouts, so going from the former to the latter involves remapping. I've written a Java programme to load in the various Angband prf files for each type of graphics and work out the mapping between the two sets of locations. Unfortunately, T.o.M.E. has renumbered the values of various symbols and makes use of a variant line
Type:Subtype:Value:hex1:hex2,
so I have to work out the correspondence for Angband and then use the Tome 16x16 tile locations to find up the corresponding 32x32 tile in Angband. That doesn't cover all the symbols, but it looks like it's good for a lot. To reassign the remainder, I plan to use Koch's Tile Assigner with a half-scale image of the 32x32 tiles.
I'm currently trying to sort out a Java bug because some of the fields are not indexing correctly in a Java HashMap. I've come down with a cold, and that's not helping, either.
TheFalcon: Thanks, I think I understand that now. It's just the hex code itself that was confusing me: if I'm right, they are all at least 0x80/0x80 (except for one). This was throwing me out in terms of trying to work out which tile was assigned to which feature, as I was trying to get out the position directly, rather than (as I now hope is correct) using 0x80 as a base. So effectively AFAICT, a feature of 0x82/0x87 is at y=2, x=7?
However, this effectively means that 32x32 tiles will work for modules without any source changes, and with just a few tweaks in pref files, the only difficulty being reassigning the tiles?
HarryErwin: Yes. In fact, I've done half the job of reassigning the tiles. See the following link http://scat-he-g4.sunderland.ac.uk/~harryerw/mirror/Software/. Note the last five links on the page. The fifth from the bottom is a 16x16 .bmp file made from 32x32.bmp. You can use that file with Tile Assigner to finish the reassignments. The unassigned tiles are fairly obvious--they point to blank. The file graf-mac.prf shows how to add a link to the 32x32 bit graphics. The files 32x32.bmp and 32x32.png for Vanilla Angband 3.0.6 are suitable, although Mac users need to know how to open the .app packages to find the Resources subdirectory where the .png files need to go.
TheFalcon: From digging through the old idea archive on the forum, it looked like 32x32 was discussed some time ago, and then just stopped...
Here's the (main) thread: http://forum.t-o-m-e.net/viewtopic.php?t=1474
and another one: http://forum.t-o-m-e.net/viewtopic.php?t=3369
ooh look, and another from way back in '02: http://forum.t-o-m-e.net/viewtopic.php?t=921
and another, though less developed...: http://forum.t-o-m-e.net/viewtopic.php?t=653
and here's the ToMETiK website: http://pousse.rapiere.free.fr/tome/
Just thought you might be interested.
ShrikeDeCil: What's the current state of the graphics w/Mac OS X? Is this something easy to turn on via a couple lines of preferences or not?
HarryErwin: I didn't have the time to do the grunt-work to make 32x32 graphics work, but I play with 16x16 graphics in Mac OS X 10.4.10 on a MacBook Pro.
ShrikeDeCil: Was getting 16x working easy? Or can you post your edits somewhere? And is getting 32x working something that requires a lot of knowledge - or just a lot of patience?
ToME Wiki