From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21975 invoked by alias); 8 Aug 2004 00:34:47 -0000 Mailing-List: contact xconq7-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: xconq7-owner@sources.redhat.com Received: (qmail 21967 invoked from network); 8 Aug 2004 00:34:46 -0000 Received: from unknown (HELO av15-1-sn4.m-sp.skanova.net) (81.228.10.102) by sourceware.org with SMTP; 8 Aug 2004 00:34:46 -0000 Received: by av15-1-sn4.m-sp.skanova.net (Postfix, from userid 502) id 379EE37E43; Sun, 8 Aug 2004 02:34:46 +0200 (CEST) Received: from smtp4-1-sn4.m-sp.skanova.net (smtp4-1-sn4.m-sp.skanova.net [81.228.10.181]) by av15-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id 240DF37E42; Sun, 8 Aug 2004 02:34:46 +0200 (CEST) Received: from [212.181.162.155] (h155n1fls24o1048.bredband.comhem.se [212.181.162.155]) by smtp4-1-sn4.m-sp.skanova.net (Postfix) with ESMTP id DA62937E42; Sun, 8 Aug 2004 02:34:44 +0200 (CEST) X-Sender: u22611592@m1.226.comhem.se Message-Id: In-Reply-To: <41155471.5020603@phy.cmich.edu> References: <200408051452.i75Eqlg06099@panix5.panix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Date: Sun, 08 Aug 2004 01:02:00 -0000 To: Eric McDonald From: Hans Ronne Subject: Re: IMFApp Office Cc: xconq7@sources.redhat.com X-SW-Source: 2004/txt/msg00849.txt.bz2 >With the Linux/X11 Imfapp, the images from 'wreckreation.imf' appear >strangely in the 32x32 menu tiles, but the closeup views seem to be >fine. Any idea why that might be? This is because your images have non-standard sizes. Xconq assumes by default that images fit within a 32x32 box (the "unit" box). I found that rather restrictive a few years ago, when I added the images for the advances and lord-rings games. These images were from various Civ2 scenarios, and all fit within a 44x48 box (or to be more precise, I made sure that they would fit within a hexagon of that size, which is what the basic Xconq cell is. The point of staying within one cell is that it makes the graphics much more complicated (and time-consuming) if an image covers adjacent cells, since these adjacent cells also must be redrawn when the unit moves. To handle these bigger 44x48 images, I hacked the interface code, and added a global flag big_unit_images, which is set to true if any image in the game has a width of more than 32 pixels. Now, what you have in wreckreation.gif are two images with completely non-standard sizes: 38x64 and 30x64. There is no support for this in the current interface code. The first image is wider than 32 pixels, and would therefore be interpreted as a 44x48 images and set the big_unit_images flag. the second image would be interpreted as a 32x32 image. However, a further complication is during actual drawing, when best_image checks that no image is greater than 32x32 (or 44x48) and scales the image in that is the case. Your images, if used in Xconq, would therefore be cut to half-size before they are drawn. In practice, this happens only to the wider of the two images in the tcltk interface, but to both of them in the Mac interface. In IMFApp, the initial drawing just uses the real size of the images without any scaling. After an image has been selected, however, all image sizes have been inited, and the code then uses the "best" of them. You may have noticed that some B/W emblems are initially drawn at their correct (small) size but at twice that size after being cliked on. What you now see is essentially the reverse of this, and indeed, if you click on one of the images, click on the other, and then click on the first one, it is redrawn at a smaller size which will fit within the 32x32 box. My advice would be to try to keep images within the bounds Xconq expect, i.e. either 32x32 or 44x48. I always scale images to that size when I make gifs. In addititon, it is a good idea to keep the 44x48 images within a hexagon. I use this magenta/green background grid that you may have noticed in my gifs to ensure that this is the case. Hans P.S. Another strange thing that you may have noticed is that your new gif appears (distorted) when you select wreckreation in the new game list. The same thing also happens with Elijah's "cil" game. This is because of a hidden but fully functional feature that I added last year (ported from the mac interface), which makes it possible to have preview images for each game. Right now, all of them load the same image, which is the old popup screen. However if you give a gif the same name as a game, that gif is loaded instead. I have prepared gifs for a number of the games but have not had time to finish the job yet. So it is also a good idea not to name gifs exactly as an existing game (unless you do want that gif to appear in the preview window, of course). P.P.S. Preview gifs should be exactly 240 x 160 pixels. That is why your iamge is distorted.