What is the actual content of the sprite table? The following is from the modkeen document, which does not agree with what is posted on the main page of this artice. It would suggest that the "shifts" are stored in here as well? Are they stored somewhere else?
Episodes 4, 5, and 6 only: This file contains extra information about each sprite. Each line in the file has the sprite number, followed by the four clipping rectangle co-ordinates in square brackets [top, left, bottom, right], followed by the sprite origin in square brackets [top, left], followed by the number of shifts the sprite uses. The origin of the sprite image is the point from which its location is calculated. For example, the hand sprite in Keen 5 (5SPR0291.BMP) has several images. The origin for each of these images is in the centre of the "eye", so that as the hand rotates, the different sprite images all appear to rotate about the eye. The origin coordinates are given in pixels from the top-left corner of the sprite image. The shifts is the number of different copies of the sprite image that are stored in memory, and can be 1, 2, or 4. As a general rule, the more shifts a sprite has, the smoother it moves, but the more memory it takes up. If you are making a very large sprite, you can reduce the number of shifts to save memory. But if you have a small sprite and want it to move more smoothly, increase the number of shifts.
Also from modkeen source:
unsigned short Width;
unsigned short Height;
signed short OrgX;
signed short OrgY;
signed short Rx1, Ry1;
signed short Rx2, Ry2;
unsigned short Shifts;
Which would make a 9-word structure.
20:16, 3 September 2010 (GMT)
- Well from studying Keen 1-3 type games, my guess would be two words of height / 8 and width, four words giving hitbox co-ords and two words giving h\v offsets. However Keen 4-6 is more complex so I'll have to investigate this later on when I work with those files --Endian? What are you on about? 04:40, 16 September 2010 (GMT)
- I can confirm that each entry is 9 words (or 18 bytes) long and matches the above structure. And the last value (shifts) is actually the same value that you can see at the end of each line in the xSPRITES.TXT file. --K1n9 Duk3 00:30, 7 February 2011 (GMT)
Almost everything in this article seems to apply to the CGA graphics resources as well. There are two main differences: the fonts are stored in version 1 of the EGA Font format, and dividing by 8 for EGA dimensions is equivalent to dividing by 4 in CGA. (Generalization: divide by [bpp * 2].) Keep in mind that both CGA and EGA always store the mask before the actual image. --Fleexy (talk) 19:34, 20 June 2015 (UTC)