This is the mail archive of the xconq7@sources.redhat.com mailing list for the Xconq project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Tue, 23 Nov 2004, Eric McDonald wrote: > > black. As far as I can tell, for some reason the automatic scale-down > > code isn't running. Isn't it supposed to? > > Yes, I thought so. I think it does with unit images. The bug may not be in the scale-down code, it turns out (althogh, as I said, there *are* plenty of problems with the scale-down code... this just might not be one of them). It seems to be in the TK stuff, and I'm probably going to be able to find and fix it myself. The general idea seems to be that there is an extra step that needs to happen to convert an XConq "image" structure into a "TkImage". I'm not sure exactly *when* that happens, because I've found the code that does it but not the code that calls that code, but the overall result seems to be that the conversion happens for explicitly specified cell-terrain images but not for ones generated by scaling. As a result, the code in tkmap.c gets all the way to the bottom, where it's about to draw the cell terrain, and then aborts (leaving black space) because the TkImage pointer is null. There is some kind of callback that gets set for doing the image-to-Tk (or, hypothetically, image-to-someotherinterface) conversion, so it may be that the scale-down code isn't calling that callback when it should, but the scale-down code *seems* to be calling it, so I think the problem may really be that the callback isn't doing its job when called; possibly because it's already been called before, when the explicit images were loaded, and it sets some kind of flag incorrectly telling itself "I don't need to run again" - but that's only a guess as to what's going on. > I played around with 'maptest.g' for a little while. If you reduce the > image cutout size down to 44x48 and change the subimage selection > offsets to 44, then the subimages show up at normal resolution. It does > not appear to matter whether the 'terrain' keyword is used or not. Yes, and the scaled-*up* images (88x96 generated when you only specify 44x48) seem to work, so the problem seems to be specific to scaling *down*. -- Matthew Skala mskala@ansuz.sooke.bc.ca Embrace and defend. http://ansuz.sooke.bc.ca/
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |