
Originally Posted by
masterBB
I think so, but what kind of commands/uses do you have in mind for this thread?
E: I don't believe it's possible to tell the thread to do things like search for colors and such, since that is written in pascal.
Source itself is in Smart.. and it definitely is C++ not pascal.. I believe wrappers or an interpreter was used to make simba tell smart to find colours..
Smart's Colour.Cpp file..
Code:
//Finds a color and returns the position --- historical
bool findColor(int& x, int& y, int color, int sx, int sy, int ex, int ey) {
sy *= width;
ey *= width;
for (int offset = sy; offset <= ey; offset += width) {
int end = ex + offset;
for (int i = sx + offset; i <= end; i++) {
if (target[i].color == color) {
x = i % width;
y = i / width;
return true;
}
}
}
x = -1;
y = -1;
return false;
}
//Finds a color given a tolerance and returns the position --- historical
bool findColorTol(int& x, int& y, int color, int sx, int sy, int ex, int ey, int tol) {
RGB find;
find.color = color;
sy *= width;
ey *= width;
for (int offset = sy; offset <= ey; offset += width) {
int end = ex + offset;
for (int i = sx + offset; i <= end; i++) {
if (cmpColors(target[i], find, tol)) {
x = i % width;
y = i / width;
return true;
}
}
}
x = -1;
y = -1;
return false;
}