예제 #1
0
void draw_hex8_value (uint8_t value)
{
    gdisp_put_char('0');
    gdisp_put_char('x');
    draw_nibble(value >> 4);
    draw_nibble(value & 0x0F);
}
예제 #2
0
void draw_hex16_value (uint16_t value)
{
    gdisp_put_char('0');
    gdisp_put_char('x');
    draw_nibble((value >> 12) & 0x000F);
    draw_nibble((value >> 8) & 0x000F);
    draw_nibble((value >> 4) & 0x000F);
    draw_nibble(value & 0x000F);
}
예제 #3
0
void do_frame(int full)
{

  /* Clear it out */
  memset(playground, PLAYGROUND_EMPTY, XUNITS * YUNITS);

  /* Fill the matrix */
  draw_border();
  draw_snake();

  draw_nibble();

  /* Only draw the score if we need to */
  /* draw_score(); */

  /* Draw it to the offscreen buffer */
  draw_screen(full);

  /* And finally, show it on the screen */
  show_buffer();
}