Server Help

Bot Questions - FlagMover/SafeMiner/etc function question

Anonymous - Wed Jan 21, 2004 2:10 pm
Post subject: FlagMover/SafeMiner/etc function question
I understand this function here, how it works-->

Code: Show/Hide
bool FlagMatrix::BadFlagGrid(int x, int y)
{
   if (x < 0)      return false;
   if (y < 0)      return false;
   if (x >= MATRIX_DIAMETER)   return false;
   if (y >= MATRIX_DIAMETER)   return false;

   BYTE *b = map;

   if (bottomUp)
   {
      b += (1024 * (1023 - y)) + x;
   }
   else
   {
      b += 1024 * y + x;
   }

   return (*b == 255);
}


where 255 is, that's == white; but what if I wanted a different color... how would I go about (like is it only reading 1 color R? G? B?)... lets say i wanted to make it blue? RGB(0,0,192)...

thanks
Mine GO BOOM - Wed Jan 21, 2004 4:19 pm
Post subject:
Its actually the palette id. As I was the one whom started this trend, I choose the last palette, as it was not used in FACTs and other bmp <-> lvl programs.

If you want it a different color, you can either change the palette #255's color, or you can figure out which palette id is the color you want. Method A just requires you to edit the image file itself, but you'll need to do this for every image, as it isn't the 'standard' color in that slot. Method B requires you to change the source code, but you can use a standard color in a normal slot then.

Most image editing programs have some method of editing the palette, or atleast telling you that the color you choose is in palette slot #x, sometimes referred to as Index #.
Anonymous - Wed Jan 21, 2004 7:41 pm
Post subject:
yeah i noticed that after I looked at the palette ID # thing.. i was like DOH! and had posted 'nm' but never went through i guess.. meh.. thanks
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group