一開始的想法是先寫一個 draw_block函式, 只需要輸入 畫布陣列 、 圖像陣列 、 X,Y 座標即可印出整個16X16宮格。 p.s.請記得置於副函式歐同學 //繪圖函式16X16像素 //畫布陣列,主角陣列X座標,Y座標 void draw_block(unsigned char *buffer, unsigned char *pic_buffer, unsigned char *pic_buffer2, int x, int y ){ //清空九宮格大小的方塊 clr_part_pannal(buffer, 0, 60, 0, 7); //畫16x16格線 LineBresenham(buffer, 0, 0, 60, 0, 1); LineBresenham(buffer, 0, 0, 0, 60, 1); LineBresenham(buffer, 60, 60, 0, 60, 1); LineBresenham(buffer, 60, 60, 60, 0, 1); LineBresenham(buffer, 0, 15, 60, 15, 1); LineBresenham(buffer, 0, 30, 60, 30, 1); LineBresenham(buffer, 0, 45, 60, 45, 1); LineBresenham(buffer, 15, 0, 15, 60, 1); LineBresenham(buffer, 30, 0, 30, 60, 1); LineBresenham(buffer, 45, 0, 45, 60, 1); //將主角輸入至畫布上 create_picture(buffer, 15*x, 15*y, pic_buffer, 16, 16); //將地雷輸入至畫布上 create_picture(buffer, 15, 15, pic_buffer2, 16, 16); create_picture(buffer, 30, 45, pic_buffer2, 16, 16); //將畫布輸出 draw_part_LCD(buffer, 0, 60, 0, 7); } 然後開始著手主程式6 S...