Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
FlagMover/SafeMiner/etc function question

 
Post new topic   Reply to topic Printable version
 View previous topic  Text Plugin Post :: Post Can Merv get responces from server?  View next topic  
Author Message
cyph
Guest


Offline

PostPosted: Wed Jan 21, 2004 2:10 pm    Post subject: FlagMover/SafeMiner/etc function question Reply to topic Reply with quote

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
Back to top
Mine GO BOOM
Hunch Hunch
What What
Hunch Hunch<br>What What


Age:41
Gender:Gender:Male
Joined: Aug 01 2002
Posts: 3615
Location: Las Vegas
Offline

PostPosted: Wed Jan 21, 2004 4:19 pm    Post subject: Reply to topic Reply with quote

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 #.
Back to top
View users profile Send private message Add User to Ignore List Send email
cyph
Guest


Offline

PostPosted: Wed Jan 21, 2004 7:41 pm    Post subject: Reply to topic Reply with quote

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
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 121 page(s) served in previous 5 minutes.

phpBB Created this page in 0.449876 seconds : 27 queries executed (94.1%): GZIP compression disabled