TFT の定義済みの場所にメニュー名を印刷しようとしていますが、これらの名前を TFT に印刷できます。しかし、コンソール出力を使用してDev-C++コンパイラでこのコードを試したところ、コンソールウィンドウで結果が印刷されましたが、program.exeが機能しなくなったというメッセージが表示されましたか? 私は混乱しています、私を助けてください.!
#include <stdio.h>
#include <Windows.h>
//defind a struct with icon details
typedef struct
{
unsigned int icon_num;
unsigned char* first_name;
unsigned char* last_name;
unsigned int name_pos1;
unsigned int name_pos2;
}xIcon_Info;
// A structure variable for xIcon_info
xIcon_Info MainIcons_Info[]=
{
{0, "FName_1","LName_1", 11,15},
{1, "FName_2","LName_2", 80,76},
{2, "FName_3","LName_3", 148,142},
{3, "FName_4","LName_4", 208,202},
{4, "FName_5","LName_5", 258,255},
{5, "FName_6","LName_6", 10,10},
{6, "FName_7","LName_7", 93,78},
{7, "FName_8","LName_8", 138,131},
{8, "FName_9","LName_9", 202,202},
{9, "FName_10","LName_10", 255,258},
{10, "FName_11","LName_11", 21,10},
{11, "FName_12","LName_12", 78,72},
{12, "FName_13","LName_13", 135,132},
{13, "FName_14","LName_14", 198,195},
{14, "FName_15","LName_15", 255,255}
};
//defined a structure with screen details
typedef struct
{
unsigned int no_of_icons;
unsigned int level;
unsigned int current_icon;
xIcon_Info* icons_info;
unsigned int name_pos1;
unsigned char screen_image_base;
}xScreen_Info;
//defind a structer variable with init for xScreen_Info
xScreen_Info MainScreen =
{
15,
1,
0,
&MainIcons_Info[0],
//(unsigned char *)0xa0196001, // Starting imgaes
};
xScreen_Info* xpCurrent_Screen = &MainScreen;
int main(void)
{
int i = 0;
for(i=0; i<=(xpCurrent_Screen->no_of_icons); i++)
{
printf("First name: %s\t",(((xpCurrent_Screen->icons_info)+i)->first_name));
printf("Last Name: %s\n",(((xpCurrent_Screen->icons_info)+i)->last_name));
}
system("PAUSE");
return 0;
}