From: jeppe@iesd.auc.dk (Jeppe Sommer)
Newsgroups: rec.games.xtank.programmer
Subject: Re: more xtank bitmaps
Date: 28 Sep 92 10:15:51 GMT
Organization: Mathematics and Computer Science, Aalborg University


>>>> On 22 Sep 92 15:23:15 GMT, Simon.N.Smith@cm.cf.ac.uk (Simon N Smith) said:

> Well I don't know about anyone else, but I for one liked the sound of having
> twice as many bitmaps and hence smother looking turns for the tanks.  I think
> I'm going to have a go at creating some extra bitmaps for some of the tanks,
> but I can see two problems:

> 1.  I lost the article from the poster saying how he did this - if you are 
>     out there, could you either repost or mail the article to me?  Thanks.

> 2.  If anyone else decides to do this too, we might do the same tank several
>     times.

> As a solution to 2., if you decide you want to take on providing bitmaps for
> a certain tank, why not post an article saying which you are doing - this way
> we'll hopefully cut down on duplicated effort.

1. See below. Btw, the exact procedure I used was (after extracting the bitmaps
from the .obj file) :

  1. open X11 bitmap editor with body-name0 (the 0 degree bitmap, e.g., lightc0)
  2. Take a snapshot of the 'true size' icon (white background version).
  3. Save snapshot as PostScript.
  4. Import snapshot into IslandDraw.
  5. Make 7 duplicates (clones) of the snapshot (so that you have 8).
  6. Rotate the 7 duplicates by -11.25, -22.5, -33.75, ... degrees.
  7. Adjust the screen resolution of IslandDraw (may have drifted), so that 
     bitmap #0 looks exactly like the original.
  8. Take one snapshot of all 8 bitmaps, and save as PostScript.
  9. Import new snapshot into IslandDraw.
 10. Export snapshot to IslandPaint ('edit graphic' command).
 11. Cut out each of the 8 bitmaps in IslandPaint and save in X11 bitmap 
     format. Name these files body-name0, body-name1, etc.
 12. Adjust the individual bitmaps with the X11 bitmap editor (this is where
     the artist in you wakes up).
 13. Create/extract a .info file descriping number of turrets, their position,
     and the line segments surrounding the body (take a look at trike.info or 
     panzy.info).
 14. run the patched objcreate with body-name as argument.


2. I think I'm going to make bitmaps for Malice in the near future, and I'm
working on trike - it would surely be a good idea to do coordinate this work.
Posting to rec.games.xtank.programmer - as you suggest - should do the job.

And now for the article I posted on September 16:

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
One of the things that annoyed me when I first played xtank (some 6 months ago)
was the "jumpy" appearance of turning vehicles, caused by the small number of
available bitmaps. 

In the official release there are 4 bitmaps per vehicle which are rotated to
obtain 16 in all. This gives a distance of 22.5 degrees between each bitmap,
which I think is too much.

Since xtank in general has a limit of 32 bitmaps (xtanklimits.h), I decided to
try to increase the number of vehicle bitmaps to the same number. This gives a
distance of 11.25 degrees between bitmaps, which is somewhat closer to
"cheating the eye".

The necessary changes turned out to be very few and small (patch to objects.c
included below). 

The main work is of course to generate the new "odd" angled bitmaps for each
vehicle. By a bit of reverse engineering, extensive use of IslandDraw,
IslandPaint, and 'bitmap' I created a ".info" file and 8 bitmaps for the
lightcycle body. I then patched Util/objcreate.c to handle vehicle bodies with
8 bibmaps, and voila: A smoother xtank. 

There seams to be no problem with co-existing 16 and 32 bitmap vehicles, so it
is possible to gradually upgrade individual bodies. 

Knowns problems:

 - The Help:Pictures screen checks the first vehicle body for the number of
bitmaps. Since this is lightcycle, xtank will assume that any body has 32
bitmaps. Hardcode this number to 16 if you like (this is not a fatal error -
ie. no segmentation faults or the like).

Any comments are welcome.

-Jeppe


Contents of the following: 
  1. Patch to objects.c to also allow 32 viewed vehicles  (line 46)
  2. New .obj file for the lightcycle body                (line 102)
Files needed if you want to change lightcycle (or other) bodies:
  3. Patch to objcreate.c to also allow vehicle bodies with 8 bitmaps (line 372)
  4. lightc.info - info file for the lightcycle body      (line 480)
  5 - 13. X11 bitmaps for lightcycle                      (line 488)


---------------------------- Patch to objects.c -----------------------------
*** objects.c.orig	Sun Aug 30 23:15:17 1992
--- objects.c	Wed Sep 16 12:23:06 1992
***************
*** 289,299 ****
  	Picture *pic, *rot_pic;
  	Bits *rotate_pic_90(), *rotate_pic_180();
  	int dest, source;
  
  	/* Create next 4 pictures by rotating the first 4 by 90 degrees */
! 	for (source = 0; source < 4; source++)
  	{
! 		dest = source + 4;
  		pic = &obj->pic[source];
  		rot_pic = &obj->pic[dest];
  		bitmap[dest] = (Bits *) rotate_pic_90(pic, rot_pic, bitmap[source]);
--- 289,300 ----
  	Picture *pic, *rot_pic;
  	Bits *rotate_pic_90(), *rotate_pic_180();
  	int dest, source;
+ 	int num_src_pics = obj->num_pics / 4; 
  
  	/* Create next 4 pictures by rotating the first 4 by 90 degrees */
! 	for (source = 0; source < num_src_pics; source++)
  	{
! 		dest = source + num_src_pics;
  		pic = &obj->pic[source];
  		rot_pic = &obj->pic[dest];
  		bitmap[dest] = (Bits *) rotate_pic_90(pic, rot_pic, bitmap[source]);
***************
*** 300,308 ****
  	}
  
  	/* Create last 8 pictures by rotating the first 8 by 180 degrees */
! 	for (source = 0; source < 8; source++)
  	{
! 		dest = source + 8;
  		pic = &obj->pic[source];
  		rot_pic = &obj->pic[dest];
  		bitmap[dest] = (Bits *) rotate_pic_180(pic, rot_pic, bitmap[source]);
--- 301,310 ----
  	}
  
  	/* Create last 8 pictures by rotating the first 8 by 180 degrees */
! 	num_src_pics = obj->num_pics / 2;
! 	for (source = 0; source < num_src_pics; source++)
  	{
! 		dest = source + num_src_pics;
  		pic = &obj->pic[source];
  		rot_pic = &obj->pic[dest];
  		bitmap[dest] = (Bits *) rotate_pic_180(pic, rot_pic, bitmap[source]);




---------------------------------- lightc.obj ----------------------------------
/*
** Information about the lightc object
*/

#define lightc_views 32

Picinfo lightc_picinfo[lightc_views] = {
	{ { {0,0} },
	  { {-15,0,7,-7,22,-7,-0.318182,-4,-15,-7,7,0},
	    {7,-7,14,0,7,7,1.000000,-14,7,-7,14,0},
	    {14,0,7,7,-7,7,-1.000000,14,7,0,14,7},
	    {7,7,-15,0,-22,-7,0.318182,4,-15,0,7,7} } },
	{ { {0,0} },
	  { {-15,-3,8,-5,23,-2,-0.086957,-4,-15,-5,8,-3},
	    {8,-5,14,3,6,8,1.333333,-15,8,-5,14,3},
	    {14,3,5,8,-9,5,-0.555556,10,5,3,14,8},
	    {5,8,-15,-3,-20,-11,0.550000,5,-15,-3,5,8} } },
	{ { {0,0} },
	  { {-14,-6,9,-4,23,2,0.086957,-4,-14,-6,9,-4},
	    {9,-4,13,5,4,9,2.250000,-24,9,-4,13,5},
	    {13,5,4,9,-9,4,-0.444444,10,4,5,13,9},
	    {4,9,-14,-6,-18,-15,0.833333,5,-14,-6,4,9} } },
	{ { {0,0} },
	  { {-12,-8,10,-2,22,6,0.272727,-4,-12,-8,10,-2},
	    {10,-2,12,8,2,10,5.000000,-52,10,-2,12,8},
	    {12,8,2,10,-10,2,-0.200000,10,2,8,12,10},
	    {2,10,-12,-8,-14,-18,1.285714,7,-12,-8,2,10} } },
	{ { {0,0} },
	  { {-11,-11,10,0,21,11,0.523810,-5,-11,-11,10,0},
	    {10,0,10,10,0,10,9999999.000000,-99999992,10,0,10,10},
	    {10,10,0,10,-10,0,-0.000000,10,0,10,10,10},
	    {0,10,-11,-11,-11,-21,1.909091,10,-11,-11,0,10} } },
	{ { {0,0} },
	  { {-8,-12,10,2,18,14,0.777778,-5,-8,-12,10,2},
	    {10,2,8,12,-2,10,-5.000000,52,8,2,10,12},
	    {8,12,-2,10,-10,-2,0.200000,10,-2,10,8,12},
	    {-2,10,-8,-12,-6,-22,3.666667,17,-8,-12,-2,10} } },
	{ { {0,0} },
	  { {-6,-14,9,4,15,18,1.200000,-6,-6,-14,9,4},
	    {9,4,5,13,-4,9,-2.250000,24,5,4,9,13},
	    {5,13,-4,9,-9,-4,0.444444,10,-4,9,5,13},
	    {-4,9,-6,-14,-2,-23,11.500000,55,-6,-14,-4,9} } },
	{ { {0,0} },
	  { {-3,-15,8,5,11,20,1.818182,-9,-3,-15,8,5},
	    {8,5,3,14,-5,9,-1.800000,19,3,5,8,14},
	    {3,14,-5,8,-8,-6,0.750000,11,-5,8,3,14},
	    {-5,8,-3,-15,2,-23,-11.500000,-49,-5,-15,-3,8} } },
	{ { {0,0} },
	  { {0,-15,7,7,7,22,3.142857,-15,0,-15,7,7},
	    {7,7,0,14,-7,7,-1.000000,14,0,7,7,14},
	    {0,14,-7,7,-7,-7,1.000000,14,-7,7,0,14},
	    {-7,7,0,-15,7,-22,-3.142857,-15,-7,-15,0,7} } },
	{ { {0,0} },
	  { {3,-15,5,8,2,23,11.500000,-49,3,-15,5,8},
	    {5,8,-3,14,-8,6,-0.750000,11,-3,8,5,14},
	    {-3,14,-8,5,-5,-9,1.800000,19,-8,5,-3,14},
	    {-8,5,3,-15,11,-20,-1.818182,-9,-8,-15,3,5} } },
	{ { {0,0} },
	  { {6,-14,4,9,-2,23,-11.500000,55,4,-14,6,9},
	    {4,9,-5,13,-9,4,-0.444444,10,-5,9,4,13},
	    {-5,13,-9,4,-4,-9,2.250000,24,-9,4,-5,13},
	    {-9,4,6,-14,15,-18,-1.200000,-6,-9,-14,6,4} } },
	{ { {0,0} },
	  { {8,-12,2,10,-6,22,-3.666667,17,2,-12,8,10},
	    {2,10,-8,12,-10,2,-0.200000,10,-8,10,2,12},
	    {-8,12,-10,2,-2,-10,5.000000,52,-10,2,-8,12},
	    {-10,2,8,-12,18,-14,-0.777778,-5,-10,-12,8,2} } },
	{ { {0,0} },
	  { {11,-11,0,10,-11,21,-1.909091,10,0,-11,11,10},
	    {0,10,-10,10,-10,0,-0.000000,10,-10,10,0,10},
	    {-10,10,-10,0,0,-10,-9999999.000000,-99999984,-10,0,-10,10},
	    {-10,0,11,-11,21,-11,-0.523810,-5,-10,-11,11,0} } },
	{ { {0,0} },
	  { {12,-8,-2,10,-14,18,-1.285714,7,-2,-8,12,10},
	    {-2,10,-12,8,-10,-2,0.200000,10,-12,8,-2,10},
	    {-12,8,-10,-2,2,-10,-5.000000,-52,-12,-2,-10,8},
	    {-10,-2,12,-8,22,-6,-0.272727,-4,-10,-8,12,-2} } },
	{ { {0,0} },
	  { {14,-6,-4,9,-18,15,-0.833333,5,-4,-6,14,9},
	    {-4,9,-13,5,-9,-4,0.444444,10,-13,5,-4,9},
	    {-13,5,-9,-4,4,-9,-2.250000,-24,-13,-4,-9,5},
	    {-9,-4,14,-6,23,-2,-0.086957,-4,-9,-6,14,-4} } },
	{ { {0,0} },
	  { {15,-3,-5,8,-20,11,-0.550000,5,-5,-3,15,8},
	    {-5,8,-14,3,-9,-5,0.555556,10,-14,3,-5,8},
	    {-14,3,-8,-5,6,-8,-1.333333,-15,-14,-5,-8,3},
	    {-8,-5,15,-3,23,2,0.086957,-4,-8,-5,15,-3} } },
	{ { {0,0} },
	  { {15,0,-7,7,-22,7,-0.318182,4,-7,0,15,7},
	    {-7,7,-14,0,-7,-7,1.000000,14,-14,0,-7,7},
	    {-14,0,-7,-7,7,-7,-1.000000,-14,-14,-7,-7,0},
	    {-7,-7,15,0,22,7,0.318182,-4,-7,-7,15,0} } },
	{ { {0,0} },
	  { {15,3,-8,5,-23,2,-0.086957,4,-8,3,15,5},
	    {-8,5,-14,-3,-6,-8,1.333333,15,-14,-3,-8,5},
	    {-14,-3,-5,-8,9,-5,-0.555556,-10,-14,-8,-5,-3},
	    {-5,-8,15,3,20,11,0.550000,-5,-5,-8,15,3} } },
	{ { {0,0} },
	  { {14,6,-9,4,-23,-2,0.086957,4,-9,4,14,6},
	    {-9,4,-13,-5,-4,-9,2.250000,24,-13,-5,-9,4},
	    {-13,-5,-4,-9,9,-4,-0.444444,-10,-13,-9,-4,-5},
	    {-4,-9,14,6,18,15,0.833333,-5,-4,-9,14,6} } },
	{ { {0,0} },
	  { {12,8,-10,2,-22,-6,0.272727,4,-10,2,12,8},
	    {-10,2,-12,-8,-2,-10,5.000000,52,-12,-8,-10,2},
	    {-12,-8,-2,-10,10,-2,-0.200000,-10,-12,-10,-2,-8},
	    {-2,-10,12,8,14,18,1.285714,-7,-2,-10,12,8} } },
	{ { {0,0} },
	  { {11,11,-10,0,-21,-11,0.523810,5,-10,0,11,11},
	    {-10,0,-10,-10,0,-10,-9999999.000000,-99999992,-10,-10,-10,0},
	    {-10,-10,0,-10,10,0,0.000000,-10,-10,-10,0,-10},
	    {0,-10,11,11,11,21,1.909091,-10,0,-10,11,11} } },
	{ { {0,0} },
	  { {8,12,-10,-2,-18,-14,0.777778,5,-10,-2,8,12},
	    {-10,-2,-8,-12,2,-10,-5.000000,-52,-10,-12,-8,-2},
	    {-8,-12,2,-10,10,2,0.200000,-10,-8,-12,2,-10},
	    {2,-10,8,12,6,22,3.666667,-17,2,-10,8,12} } },
	{ { {0,0} },
	  { {6,14,-9,-4,-15,-18,1.200000,6,-9,-4,6,14},
	    {-9,-4,-5,-13,4,-9,-2.250000,-24,-9,-13,-5,-4},
	    {-5,-13,4,-9,9,4,0.444444,-10,-5,-13,4,-9},
	    {4,-9,6,14,2,23,11.500000,-55,4,-9,6,14} } },
	{ { {0,0} },
	  { {3,15,-8,-5,-11,-20,1.818182,9,-8,-5,3,15},
	    {-8,-5,-3,-14,5,-9,-1.800000,-19,-8,-14,-3,-5},
	    {-3,-14,5,-8,8,6,0.750000,-11,-3,-14,5,-8},
	    {5,-8,3,15,-2,23,-11.500000,49,3,-8,5,15} } },
	{ { {0,0} },
	  { {0,15,-7,-7,-7,-22,3.142857,15,-7,-7,0,15},
	    {-7,-7,0,-14,7,-7,-1.000000,-14,-7,-14,0,-7},
	    {0,-14,7,-7,7,7,1.000000,-14,0,-14,7,-7},
	    {7,-7,0,15,-7,22,-3.142857,15,0,-7,7,15} } },
	{ { {0,0} },
	  { {-3,15,-5,-8,-2,-23,11.500000,49,-5,-8,-3,15},
	    {-5,-8,3,-14,8,-6,-0.750000,-11,-5,-14,3,-8},
	    {3,-14,8,-5,5,9,1.800000,-19,3,-14,8,-5},
	    {8,-5,-3,15,-11,20,-1.818182,9,-3,-5,8,15} } },
	{ { {0,0} },
	  { {-6,14,-4,-9,2,-23,-11.500000,-55,-6,-9,-4,14},
	    {-4,-9,5,-13,9,-4,-0.444444,-10,-4,-13,5,-9},
	    {5,-13,9,-4,4,9,2.250000,-24,5,-13,9,-4},
	    {9,-4,-6,14,-15,18,-1.200000,6,-6,-4,9,14} } },
	{ { {0,0} },
	  { {-8,12,-2,-10,6,-22,-3.666667,-17,-8,-10,-2,12},
	    {-2,-10,8,-12,10,-2,-0.200000,-10,-2,-12,8,-10},
	    {8,-12,10,-2,2,10,5.000000,-52,8,-12,10,-2},
	    {10,-2,-8,12,-18,14,-0.777778,5,-8,-2,10,12} } },
	{ { {0,0} },
	  { {-11,11,0,-10,11,-21,-1.909091,-10,-11,-10,0,11},
	    {0,-10,10,-10,10,0,0.000000,-10,0,-10,10,-10},
	    {10,-10,10,0,0,10,9999999.000000,-100000000,10,-10,10,0},
	    {10,0,-11,11,-21,11,-0.523810,5,-11,0,10,11} } },
	{ { {0,0} },
	  { {-12,8,2,-10,14,-18,-1.285714,-7,-12,-10,2,8},
	    {2,-10,12,-8,10,2,0.200000,-10,2,-10,12,-8},
	    {12,-8,10,2,-2,10,-5.000000,52,10,-8,12,2},
	    {10,2,-12,8,-22,6,-0.272727,4,-12,2,10,8} } },
	{ { {0,0} },
	  { {-14,6,4,-9,18,-15,-0.833333,-5,-14,-9,4,6},
	    {4,-9,13,-5,9,4,0.444444,-10,4,-9,13,-5},
	    {13,-5,9,4,-4,9,-2.250000,24,9,-5,13,4},
	    {9,4,-14,6,-23,2,-0.086957,4,-14,4,9,6} } },
	{ { {0,0} },
	  { {-15,3,5,-8,20,-11,-0.550000,-5,-15,-8,5,3},
	    {5,-8,14,-3,9,5,0.555556,-10,5,-8,14,-3},
	    {14,-3,8,5,-6,8,-1.333333,15,8,-3,14,5},
	    {8,5,-15,3,-23,-2,0.086957,4,-15,3,8,5} } }
};

Picture lightc_pic[lightc_views] = {
	{ 29, 13, 14, 6 },
	{ 30, 13, 15, 6 },
	{ 26, 15, 13, 7 },
	{ 24, 18, 12, 9 },
	{ 21, 21, 10, 10 },
	{ 18, 24, 9, 12 },
	{ 15, 26, 7, 13 },
	{ 14, 28, 7, 14 }
};

Object lightc_obj = {
	"lightc",
	lightc_views,
	lightc_pic,
	0,			/* num_turrets */
	4,			/* num_segs */
	lightc_picinfo
};

static unsigned char lightc0_bits[] = {
    0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xd0, 0x00, 
    0x00, 0xe0, 0x1f, 0x01, 0x00, 0x7f, 0x78, 0x02, 
    0xf8, 0x07, 0x9e, 0x05, 0x7e, 0x78, 0x38, 0x0b, 
    0x87, 0x5f, 0x30, 0x1e, 0x7e, 0x78, 0x38, 0x0b, 
    0xf8, 0x07, 0x9e, 0x05, 0x00, 0x7f, 0x78, 0x02, 
    0x00, 0xe0, 0x1f, 0x01, 0x00, 0x00, 0xd0, 0x00, 
    0x00, 0x00, 0x3e, 0x00};

static unsigned char lightc1_bits[] = {
   0x00, 0x00, 0xf8, 0x00, 0xe0, 0x9c, 0xc3, 0x00, 0xfe, 0xff, 0x7d, 0x03,
   0x8c, 0x00, 0x60, 0x04, 0x7c, 0xff, 0xf8, 0x09, 0xf0, 0xb0, 0x70, 0x16,
   0x80, 0xf7, 0x60, 0x16, 0x00, 0x0e, 0x70, 0x1c, 0x00, 0xf0, 0x7c, 0x36,
   0x00, 0xe0, 0x31, 0x1b, 0x00, 0x00, 0xde, 0x0c, 0x00, 0x00, 0x10, 0x03,
   0x00, 0x00, 0xfe, 0x00};

static unsigned char lightc2_bits[] = {
    0x3f, 0x00, 0x00, 0x00, 0xfb, 0x07, 0x00, 0x00, 
    0x26, 0x7f, 0x18, 0x00, 0xdc, 0xe0, 0x23, 0x00, 
    0x38, 0x03, 0x7e, 0x00, 0x60, 0x3c, 0xb0, 0x00, 
    0xc0, 0x28, 0x3e, 0x01, 0x80, 0x39, 0x5c, 0x01, 
    0x00, 0x07, 0x58, 0x02, 0x00, 0x0c, 0x9f, 0x02, 
    0x00, 0x38, 0x8e, 0x02, 0x00, 0xe0, 0x67, 0x02, 
    0x00, 0x00, 0x1f, 0x03, 0x00, 0x60, 0xc3, 0x00, 
    0x00, 0x80, 0x3f, 0x00};

static unsigned char lightc3_bits[] = {
   0x0f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xf2, 0x01, 0x00, 0xae, 0x07, 0x00,
   0x7c, 0x38, 0x02, 0x98, 0xf2, 0x04, 0x30, 0xaf, 0x19, 0x70, 0x1b, 0x16,
   0x40, 0x8e, 0x2e, 0x80, 0x09, 0x4f, 0x00, 0x03, 0x5b, 0x00, 0x63, 0x53,
   0x00, 0xcc, 0x53, 0x00, 0xd8, 0xb0, 0x00, 0xe0, 0xb8, 0x00, 0xc8, 0xcf,
   0x00, 0x30, 0xf0, 0x00, 0xc0, 0x0f};

static unsigned char lightc4_bits[] = {
    0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3b, 0x00, 
    0x00, 0xf6, 0x00, 0x00, 0x8e, 0x01, 0x00, 0x2c, 
    0x03, 0x00, 0x48, 0x1e, 0x00, 0x98, 0x39, 0x00, 
    0xb0, 0x77, 0x03, 0x60, 0xc5, 0x06, 0x40, 0x87, 
    0x0d, 0xc0, 0x40, 0x0f, 0xc0, 0xc1, 0x0b, 0x80, 
    0x81, 0x13, 0x00, 0xdb, 0x15, 0x00, 0xf6, 0x14, 
    0x00, 0x7d, 0x14, 0x00, 0x3b, 0x16, 0x00, 0xce, 
    0x13, 0x00, 0x1c, 0x18, 0x00, 0xe0, 0x1f};

static unsigned char lightc5_bits[] = {
   0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x3a, 0x00, 0x00,
   0x76, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x94, 0x01, 0x00, 0xac, 0x03, 0x00,
   0x6c, 0x06, 0x00, 0xd8, 0x0c, 0x00, 0xd8, 0x1b, 0x00, 0xd0, 0xb2, 0x00,
   0xb0, 0x23, 0x01, 0x30, 0x58, 0x03, 0x20, 0xf0, 0x03, 0x60, 0xf1, 0x02,
   0x40, 0xb6, 0x02, 0xa0, 0xbe, 0x02, 0xa0, 0x9f, 0x02, 0x40, 0x87, 0x02,
   0xc0, 0x9c, 0x02, 0x80, 0xf3, 0x02, 0x00, 0x8e, 0x03, 0x00, 0xf0, 0x01};

static unsigned char lightc6_bits[] = {
    0x03, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x1b, 0x00, 
    0x1b, 0x00, 0x37, 0x00, 0x6a, 0x00, 0xca, 0x00, 
    0x96, 0x01, 0x16, 0x01, 0x26, 0x03, 0xe4, 0x06, 
    0xa4, 0x04, 0xec, 0x2c, 0x0c, 0x28, 0x08, 0x48, 
    0x08, 0x7a, 0x58, 0x7e, 0xd0, 0x5e, 0xd4, 0x57, 
    0xf4, 0x53, 0x78, 0x48, 0x90, 0x29, 0x20, 0x26, 
    0xc0, 0x10, 0x00, 0x1f};

static unsigned char lightc7_bits[] = {
   0x18, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x34, 0x00, 0x6c, 0x00, 0x6c, 0x00,
   0x4c, 0x00, 0xd4, 0x00, 0xd4, 0x00, 0xb4, 0x01, 0x26, 0x01, 0x74, 0x01,
   0x74, 0x03, 0x56, 0x03, 0x76, 0x04, 0x04, 0x14, 0x04, 0x15, 0x14, 0x15,
   0x95, 0x17, 0xbd, 0x2f, 0xfd, 0x15, 0x52, 0x14, 0x12, 0x12, 0x24, 0x0b,
   0xc8, 0x09, 0xb0, 0x05, 0xc0, 0x03, 0x00, 0x01};

unsigned char *lightc_bitmap[lightc_views] = {
	lightc0_bits,
	lightc1_bits,
	lightc2_bits,
	lightc3_bits,
	lightc4_bits,
	lightc5_bits,
	lightc6_bits,
	lightc7_bits
};


-------------------------- Patch to objcreate.c ------------------------------
*** objcreate.c.orig	Wed Sep 16 11:23:19 1992
--- objcreate.c	Wed Sep 16 11:48:28 1992
***************
*** 116,124 ****
  
      if (yn == 'y') {
  	body = TRUE;
- 	num_bitmaps = BODY_BITMAPS;
- 	num_views = BODY_VIEWS;
  
  	/* Object is a vehicle, so read info from info file */
  	strcpy(filename, name);
  	strcat(filename, ".info");
--- 116,130 ----
  
      if (yn == 'y') {
  	body = TRUE;
  
+ /*	num_bitmaps = BODY_BITMAPS;
+ 	num_views = BODY_VIEWS; 
+ */
+ 
+ 	printf("Enter number of bitmaps in object (4 or 8): ");
+ 	scanf("%d", &num_bitmaps);
+ 	num_views = num_bitmaps * 4;
+ 
  	/* Object is a vehicle, so read info from info file */
  	strcpy(filename, name);
  	strcat(filename, ".info");
***************
*** 182,188 ****
  		fprintf(object_file, "{0,0}");
  	    } else {
  		for (j = 0; j < num_turrets; j++) {
! 		    rotate_point(turret[j].x, turret[j].y, &x, &y, (double) (2 * PI * i) / num_views);
  		    fprintf(object_file, "{%d,%d}", x, y);
  		    if (j != num_turrets - 1)
  			fprintf(object_file, ", ");
--- 188,195 ----
  		fprintf(object_file, "{0,0}");
  	    } else {
  		for (j = 0; j < num_turrets; j++) {
! 		    rotate_point(turret[j].x, turret[j].y, &x, &y, 
! 				 (double) (2 * PI * i) / num_views);
  		    fprintf(object_file, "{%d,%d}", x, y);
  		    if (j != num_turrets - 1)
  			fprintf(object_file, ", ");
***************
*** 192,200 ****
  
  	    fprintf(object_file, "\t  { ");
  	    for (j = 0; j < num_segs; j++) {
! 		rotate_point(segment[j].x1, segment[j].y1, &x1, &y1, 2 * PI * i / num_views);
  		k = (j + 1) % num_segs;
! 		rotate_point(segment[k].x1, segment[k].y1, &x2, &y2, 2 * PI * i / num_views);
  		make_segment(&seg, x1, y1, x2, y2);
  		fprintf(object_file, "{%d,%d,%d,%d,%d,%d,%f,%d,%d,%d,%d,%d}",
  		   seg.x1, seg.y1, seg.x2, seg.y2, seg.dx, seg.dy, seg.slope,
--- 199,209 ----
  
  	    fprintf(object_file, "\t  { ");
  	    for (j = 0; j < num_segs; j++) {
! 		rotate_point(segment[j].x1, segment[j].y1, &x1, &y1, 2 * PI * 
! 			     i / num_views);
  		k = (j + 1) % num_segs;
! 		rotate_point(segment[k].x1, segment[k].y1, &x2, &y2, 2 * PI * 
! 			     i / num_views);
  		make_segment(&seg, x1, y1, x2, y2);
  		fprintf(object_file, "{%d,%d,%d,%d,%d,%d,%f,%d,%d,%d,%d,%d}",
  		   seg.x1, seg.y1, seg.x2, seg.y2, seg.dx, seg.dy, seg.slope,
***************
*** 216,222 ****
  	sprintf(ending, "%d", i);
  	strcat(filename, ending);
  	if ((bitmap_file = fopen(filename, "r")) == NULL) {
! 	    fprintf("Could not open bitmap file %s.\n", filename);
  	    exit(1);
  	}
  	fgets(line, 80, bitmap_file);	/* width line */
--- 225,231 ----
  	sprintf(ending, "%d", i);
  	strcat(filename, ending);
  	if ((bitmap_file = fopen(filename, "r")) == NULL) {
! 	    fprintf(stderr, "Could not open bitmap file %s.\n", filename);
  	    exit(1);
  	}
  	fgets(line, 80, bitmap_file);	/* width line */
***************
*** 260,266 ****
  	sprintf(ending, "%d", i);
  	strcat(filename, ending);
  	if ((bitmap_file = fopen(filename, "r")) == NULL) {
! 	    fprintf("Could not open bitmap file %s.\n", filename);
  	    exit(1);
  	}
  	fgets(line, 80, bitmap_file);	/* width line */
--- 269,275 ----
  	sprintf(ending, "%d", i);
  	strcat(filename, ending);
  	if ((bitmap_file = fopen(filename, "r")) == NULL) {
! 	    fprintf(stderr, "Could not open bitmap file %s.\n", filename);
  	    exit(1);
  	}
  	fgets(line, 80, bitmap_file);	/* width line */



------------------------------- lightc.info -------------------------------
0
4
-15 0
7 -7
14 0
7 7
------------------------------- lightc0 ------------------------------------
#define lightc_width 29
#define lightc_height 13
static char lightc_bits[] = {
    0x00, 0x00, 0x3e, 0x00, 0x00, 0x00, 0xd0, 0x00, 
    0x00, 0xe0, 0x1f, 0x01, 0x00, 0x7f, 0x78, 0x02, 
    0xf8, 0x07, 0x9e, 0x05, 0x7e, 0x78, 0x38, 0x0b, 
    0x87, 0x5f, 0x30, 0x1e, 0x7e, 0x78, 0x38, 0x0b, 
    0xf8, 0x07, 0x9e, 0x05, 0x00, 0x7f, 0x78, 0x02, 
    0x00, 0xe0, 0x1f, 0x01, 0x00, 0x00, 0xd0, 0x00, 
    0x00, 0x00, 0x3e, 0x00};
------------------------------- lightc1 ------------------------------------
#define lightc1_width 30
#define lightc1_height 13
static char lightc1_bits[] = {
   0x00, 0x00, 0xf8, 0x00, 0xe0, 0x9c, 0xc3, 0x00, 0xfe, 0xff, 0x7d, 0x03,
   0x8c, 0x00, 0x60, 0x04, 0x7c, 0xff, 0xf8, 0x09, 0xf0, 0xb0, 0x70, 0x16,
   0x80, 0xf7, 0x60, 0x16, 0x00, 0x0e, 0x70, 0x1c, 0x00, 0xf0, 0x7c, 0x36,
   0x00, 0xe0, 0x31, 0x1b, 0x00, 0x00, 0xde, 0x0c, 0x00, 0x00, 0x10, 0x03,
   0x00, 0x00, 0xfe, 0x00};
------------------------------- lightc2 ------------------------------------
#define lightc_width 26
#define lightc_height 15
static char lightc_bits[] = {
    0x3f, 0x00, 0x00, 0x00, 0xfb, 0x07, 0x00, 0x00, 
    0x26, 0x7f, 0x18, 0x00, 0xdc, 0xe0, 0x23, 0x00, 
    0x38, 0x03, 0x7e, 0x00, 0x60, 0x3c, 0xb0, 0x00, 
    0xc0, 0x28, 0x3e, 0x01, 0x80, 0x39, 0x5c, 0x01, 
    0x00, 0x07, 0x58, 0x02, 0x00, 0x0c, 0x9f, 0x02, 
    0x00, 0x38, 0x8e, 0x02, 0x00, 0xe0, 0x67, 0x02, 
    0x00, 0x00, 0x1f, 0x03, 0x00, 0x60, 0xc3, 0x00, 
    0x00, 0x80, 0x3f, 0x00};
------------------------------- lightc3 ------------------------------------
#define lightc3_width 24
#define lightc3_height 18
static char lightc3_bits[] = {
   0x0f, 0x00, 0x00, 0x3f, 0x00, 0x00, 0xf2, 0x01, 0x00, 0xae, 0x07, 0x00,
   0x7c, 0x38, 0x02, 0x98, 0xf2, 0x04, 0x30, 0xaf, 0x19, 0x70, 0x1b, 0x16,
   0x40, 0x8e, 0x2e, 0x80, 0x09, 0x4f, 0x00, 0x03, 0x5b, 0x00, 0x63, 0x53,
   0x00, 0xcc, 0x53, 0x00, 0xd8, 0xb0, 0x00, 0xe0, 0xb8, 0x00, 0xc8, 0xcf,
   0x00, 0x30, 0xf0, 0x00, 0xc0, 0x0f};
------------------------------- lightc4 ------------------------------------
#define lightc_width 21
#define lightc_height 21
static char lightc_bits[] = {
    0x07, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x3b, 0x00, 
    0x00, 0xf6, 0x00, 0x00, 0x8e, 0x01, 0x00, 0x2c, 
    0x03, 0x00, 0x48, 0x1e, 0x00, 0x98, 0x39, 0x00, 
    0xb0, 0x77, 0x03, 0x60, 0xc5, 0x06, 0x40, 0x87, 
    0x0d, 0xc0, 0x40, 0x0f, 0xc0, 0xc1, 0x0b, 0x80, 
    0x81, 0x13, 0x00, 0xdb, 0x15, 0x00, 0xf6, 0x14, 
    0x00, 0x7d, 0x14, 0x00, 0x3b, 0x16, 0x00, 0xce, 
    0x13, 0x00, 0x1c, 0x18, 0x00, 0xe0, 0x1f};
------------------------------- lightc5 ------------------------------------
#define lightc5_width 18
#define lightc5_height 24
static char lightc5_bits[] = {
   0x07, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x3a, 0x00, 0x00,
   0x76, 0x00, 0x00, 0xc6, 0x00, 0x00, 0x94, 0x01, 0x00, 0xac, 0x03, 0x00,
   0x6c, 0x06, 0x00, 0xd8, 0x0c, 0x00, 0xd8, 0x1b, 0x00, 0xd0, 0xb2, 0x00,
   0xb0, 0x23, 0x01, 0x30, 0x58, 0x03, 0x20, 0xf0, 0x03, 0x60, 0xf1, 0x02,
   0x40, 0xb6, 0x02, 0xa0, 0xbe, 0x02, 0xa0, 0x9f, 0x02, 0x40, 0x87, 0x02,
   0xc0, 0x9c, 0x02, 0x80, 0xf3, 0x02, 0x00, 0x8e, 0x03, 0x00, 0xf0, 0x01};
------------------------------- lightc6 ------------------------------------
#define lightc_width 15
#define lightc_height 26
static char lightc_bits[] = {
    0x03, 0x00, 0x07, 0x00, 0x0d, 0x00, 0x1b, 0x00, 
    0x1b, 0x00, 0x37, 0x00, 0x6a, 0x00, 0xca, 0x00, 
    0x96, 0x01, 0x16, 0x01, 0x26, 0x03, 0xe4, 0x06, 
    0xa4, 0x04, 0xec, 0x2c, 0x0c, 0x28, 0x08, 0x48, 
    0x08, 0x7a, 0x58, 0x7e, 0xd0, 0x5e, 0xd4, 0x57, 
    0xf4, 0x53, 0x78, 0x48, 0x90, 0x29, 0x20, 0x26, 
    0xc0, 0x10, 0x00, 0x1f};
------------------------------- lightc7 ------------------------------------
#define lightc7_width 14
#define lightc7_height 28
static char lightc7_bits[] = {
   0x18, 0x00, 0x1c, 0x00, 0x3c, 0x00, 0x34, 0x00, 0x6c, 0x00, 0x6c, 0x00,
   0x4c, 0x00, 0xd4, 0x00, 0xd4, 0x00, 0xb4, 0x01, 0x26, 0x01, 0x74, 0x01,
   0x74, 0x03, 0x56, 0x03, 0x76, 0x04, 0x04, 0x14, 0x04, 0x15, 0x14, 0x15,
   0x95, 0x17, 0xbd, 0x2f, 0xfd, 0x15, 0x52, 0x14, 0x12, 0x12, 0x24, 0x0b,
   0xc8, 0x09, 0xb0, 0x05, 0xc0, 0x03, 0x00, 0x01};

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
--

       Jeppe Sommer         |     Aalborg University   
                            |      Fredrik Bajersvej 7   
  email: jeppe@iesd.auc.dk  |       DK-9220 Aalborg {\O}st
____________________________|________Denmark______________
Newsgroups: rec.games.xtank.programmer