I am trying to modify the software pendant but I do not understand the next step
a = pgm_read_byte(ptr++); // New frame X1/Y1
if(a >= 0x90) { // EOD marker? (valid X1 never exceeds 8)
ptr = anim; // Reset animation data pointer to start
a = pgm_read_byte(ptr++); // and take first value
}
x1 = a >> 4; // X1 = high 4 bits
y1 = a & 0x0F; // Y1 = low 4 bits
a = pgm_read_byte(ptr++); // New frame X2/Y2
x2 = a >> 4; // X2 = high 4 bits
y2 = a & 0x0F; // Y2 = low 4 bits
// Read rectangle of data from anim[] into portion of img[] buffer
for(x=x1; x<=x2; x++) { // Column-major
for(y=y1; y<=y2; y++) img[(x << 4) + y] = pgm_read_byte(ptr++);
}
anim[] is a array 23086 byte long and img[] is a array 144 byte long
who explains it to me?