Well-Actually War Trall Ishad Nha Posted January 1, 2011 Posted January 1, 2011 From Graphics.cpp: "It seems one of the terrain graphics sheets is covered up by (same resource number as) an editor graphic. So I had to copy that sheet into 3D editor graphics and make this horrible hack (in multiple places!)" This comment is found in four separate places in the source file. I deleted the mentioned hack from the Windows code and nothing seemed to be wrong with the display of the graphics from G701.bmp. Said hack is: ("if(a.which_sheet == 701) a.which_sheet = 4916;") Is this an artifact from the original Mac code? Apparently it is, for this is found in the Mac version of the same source file: "if (pattern_gworld == NULL) pattern_gworld = load_pict(701);//(850);" From what I can see, this is the Mac equivalent of Windows G4901.bmp. In Windows this graphic is never used by the game itself. I doubt that it would be used by the Mac game if it has the same number as the second floor graphics sheet. Hence it seems that Mac code should have Editor graphic 701 renamed to 4916 or whatever. This may take some doing with the antiquated format and lack of programs… Quote
Well-Actually War Trall Niemand Posted January 1, 2011 Posted January 1, 2011 I don't know about the details on the Windows side, but this relates to the (outdated) resource loading system used by the Mac editor and a number collision made by Jeff. Sheet 701 used by the game is of course a set of cave floor tiles. For the Mac version of the game it resides in the file Terrain Graphics. The Mac editor has an additional resource file containing graphics used by it but not by the game named Blades of Avernum Ed Graphics. This file holds various button images, and also an image containing the textures used for backgrounds in the editor. For whatever reason, Jeff assigned that texture image the number 701 as well. When the editor opens both resource files, there can be only one resource of type PICT and number 701, so the sheet in whichever file is opened later takes precedence. In the old, 2D editor this wasn't an issue, since the isometric floor and terrain images were never used. However, with Isaac's upgrade to allow 3D drawing, they are needed, and so the editor runs into the problem that it needs access to both of the sheets 701. Someone (Isaac, perhaps) duplicated the sheet 701 containing floors, and placed it among the editor resources with the new number 916. Then, whenever the editor needs to draw a terrain or floor whose sheet number is supposed to be 701, it uses the special case logic and fetches the graphics from sheet 916 instead. None of this matters to the game, since it never loads the Blades of Avernum Ed Graphics file. I'm not sure what the situation is for the Windows editor, since I've never looked closely into its resource loading and handling systems, so I'll leave it up to your judgement; just do whatever works, I'd say. Quote
Understated Ur-Drakon Celtic Minstrel Posted January 1, 2011 Posted January 1, 2011 Why didn't he just change the sheet number of the button images? Quote
Well-Actually War Trall Niemand Posted January 1, 2011 Posted January 1, 2011 That sheet is in a file which is distributed by Spiderweb; we can't change it. What we can do (and what I'm doing right now) is converting the necessary image resources to PNGs and storing them in the editor application's bundle so that we don't use the old file and its numbered sheets at all. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.