void clear_playfield(void) { register byte x, y; for (y = PLAYF_Y; y < PLAYF_Y + PLAYF_HEIGHT * BLOCK_SIZE; y++) for (x = PLAYF_X; x < PLAYF_X + PLAYF_WIDTH * BLOCK_SIZE; x++) clearpixel(x, y); }
void clear_next_part(void) { byte x, y; for (x = PREVIEW_X + 5; x < PREVIEW_X + 25; x++) { for (y = PREVIEW_Y + 5; y < PREVIEW_Y + 25; y++) clearpixel(x, y); } }
void set_cursor(cursor* cur, pixel p){ cur->pos = p; switch (cur->mode){ case clear: clearpixel(p); break; case set: setpixel(p,3); break; } }
void clear_block(char x, char y) { byte x1; byte x_start; byte y1; register byte xc, yc; x_start = PLAYF_X + BLOCK_SIZE * x; y1 = PLAYF_Y + BLOCK_SIZE * y; for (yc = 0; yc < BLOCK_SIZE; yc++) { x1 = x_start; for (xc = 0; xc < BLOCK_SIZE; xc++) { clearpixel(x1, y1); x1++; } y1++; } }
void vputnum(byte x, byte y, byte num) { byte *p; register byte rowx; register byte xc, yc; p = &num_small[num][0]; for (yc = 0; yc < 5; yc++) { rowx = x; for (xc = 0; xc < 3; xc++) { if (*p) setpixel(rowx, y); else clearpixel(rowx, y); rowx++; p++; } y++; } }