here is what i want to change from pixy.h:
struct Block
{
void print(char *buf)
{
int i, j;
char sig[6], d;
bool flag;
if (type==PIXY_BLOCKTYPE_COLOR_CODE)
{
// convert signature number to an octal string
for (i=12, j=0, flag=false; i>=0; i-=3)
{
d = (signature>>i)&0x07;
if (d>0 && !flag)
flag = true;
if (flag)
sig[j++] = d + ‘0’;
}
sig[j] = ‘\0’;
sprintf(buf, “CC block! sig: %s (%d decimal) x: %d y: %d width: %d height: %d angle %d”, sig, signature, x, y, width, height, angle);
}
else // regular block. Note, angle is always zero, so no need to print
sprintf(buf, “sig: %d x: %d y: %d width: %d height: %d”, signature, x, y, width, height);
}
to this function i want to add something but too complicated to send it so let just say for X reason i just want the “x” and the"y" of the block.
What i will do is simply in the the pixy.h ,i will change : sprintf(buf, “sig: %d x: %d y: %d width: %d height: %d”, signature, x, y, width, height);
to sprintf(buf, "sig: %d x: %d y: %d);
I know it stupid, but it just an example,and doing that doesn’t change a thing. When i compile (make) and launch hello_pixy it will still write the “x”, “y”,“width”,“height”… which i don’t want.
An other way to solve my problem that will allow me not to touch the pixy.h but only pixy.cpp which works perfectly is: is there a function in pixy.h that i can call in pixy.cpp that returns the “x” and the “y” of the block.