DXライブラリでの改行
Posted: 2012年4月29日(日) 11:45
DXライブラリで改行するにはどうすれば良いのですか?
#include "DxLib.h"
#include "stdio.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ){
if(DxLib_Init()==-1){
return -1;
}
int a[10][15]={
{1, 1, 1, 1 ,2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4}, //
{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
};
int x=0;
int y=0;
int Cr=GetColor(255, 255, 255);
for(x=0; x<10; x++){
for(y=0; y<15; y++){
DrawFormatString("%d", "%d", Cr, "%d\n",250+1*x ,240-32*y ,a[x][y]) ; //①
}
printf("\n");
}
WaitKey();
DxLib_End() ;
return 0 ;
}
#include "DxLib.h"
#include "stdio.h"
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow ){
if(DxLib_Init()==-1){
return -1;
}
int a[10][15]={
{1, 1, 1, 1 ,2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4}, //
{1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}, //
};
int x=0;
int y=0;
int Cr=GetColor(255, 255, 255);
for(x=0; x<10; x++){
for(y=0; y<15; y++){
DrawFormatString(250+1 * x,240-32 * y, Cr, "%d", a[x][y]) ; //①
}
}
WaitKey();
DxLib_End() ;
return 0 ;
}
解決したのでしょうか?解決のチェックマークをお願いします。あーけお さんが書きました:ありがとうございました
ご本人に残った疑問/問題点を質問してもらわないと、どういう問題が残っているか分かりませんのでお願いします。あーけお さんが書きました:いいえ未解決です