debug in console.c

网友投稿 473 2022-11-15

debug in console.c

debug in console.c

static int number_to_unicode[10] = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57 };static int height = 1; static void debug_in_console(int* number){int unicode = 100;int width = 400;if (*number < 10){unicode = number_to_unicode[*number];draw_eng_char((unsigned char*)unicode, width+10, height, WHITE_PIX);}else if (*number >= 10 && *number < 100){int shiwei = *number / 10;int gewei = *number % 10;draw_eng_char((unsigned char*)number_to_unicode[shiwei], width + 50, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[gewei], width + 60, height, WHITE_PIX);}else if (*number>=100&&*number<1000){int baiwei = *number / 100;int shiwei = *number % 100 / 10;int gewei = *number % 10;draw_eng_char((unsigned char*)number_to_unicode[baiwei], width + 100, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[shiwei], width + 110, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[gewei], width + 120, height, WHITE_PIX);}else if (*number >= 1000 && *number<10000){int qianwei = *number / 1000;int baiwei = *number % 1000 / 100;int shiwei = *number % 100 / 10;int gewei = *number % 10;draw_eng_char((unsigned char*)number_to_unicode[qianwei], width + 150, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[baiwei], width + 160, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[shiwei], width + 170, height, WHITE_PIX);draw_eng_char((unsigned char*)number_to_unicode[gewei], width + 180, height, WHITE_PIX);}else{draw_eng_char((unsigned char*)unicode, width -50, height, WHITE_PIX);}height += 10;if (height>500){height = 1;width = 600;} }

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:VoltDB概念
下一篇:compareToIgnoreSpaces(byte[] byteArray, char[] anotherCharArray) {
相关文章

 发表评论

暂时没有评论,来抢沙发吧~