意味がわからないのですが、どこをどう直せばいいのですか?
ライブラリはDXライブラリを使用しています。
このままだと文字が全て重なってしまいますが、後で直すので気にしないでください
#include "DxLib.h"
int WINAPI WinMain(HINSTANCE,HINSTANCE,LPSTR,int)
{
ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen( DX_SCREEN_BACK ); //ウィンドウモード変更と初期化と裏画面設定
while( ScreenFlip()==0 && ProcessMessage()==0 && ClearDrawScreen()==0 )
{
ProcessMessage();
int a=0;
int b=0;
int c=0;
int d=0;
DrawFormatString( 0, 0, GetColor(255,255,255), "気付いたらあなたは白い部屋の中にいた。");
DrawFormatString( 0, 0, GetColor(255,255,255), "目の前には扉があるが開かない。窓もない。扉には北と書いてある。");
DrawFormatString( 0, 0, GetColor(255,255,255), "地面にはリンゴが一つ落ちている。食べますか?");
DrawFormatString( 0, 0, GetColor(255,255,255), "1で食べる 2で食べない");
if( CheckHitKey(KEY_INPUT_2 )
{
//食べない
DrawFormatString( 0, 0, GetColor(255,255,255),"リンゴを拾ってみると地面には「生まれる太陽に死を」と書かれていた。");
DrawFormatString( 0, 0, GetColor(255,255,255),"後ろには何もない。");
DrawFormatString( 0, 0, GetColor(255,255,255),"左右どちらに行って調べる?");
DrawFormatString( 0, 0, GetColor(255,255,255),"1で左 2で右");
if( CheckHitKey(KEY_INPUT_1 )
{
//左
DrawFormatString( 0, 0, GetColor(255,255,255),"左に進むと宝箱を見つけた。");
DrawFormatString( 0, 0, GetColor(255,255,255),"宝箱に「扉は0=360 僕は?」と書かれている。");
DrawFormatString( 0, 0, GetColor(255,255,255),"宝箱には鍵がかかっている。");
DrawFormatString( 0, 0, GetColor(255,255,255),"宝箱のパスワードは?");
//ここ未完成
if( b == 3 && c == 6 && d == 0 )
{
//正解
DrawFormatString( 0, 0, GetColor(255,255,255),"宝箱が開き、中には鍵が入っていた。");
DrawFormatString( 0, 0, GetColor(255,255,255),"鍵を使って扉を開け、あなたは脱出した。~END~");
DrawFormatString( 0, 0, GetColor(255,255,255),"3キーで終了します。");
if( CheckHitKey(KEY_INPUT_3 )
{
break;
}
}
else
{
//ハズレ
DrawFormatString( 0, 0, GetColor(255,255,255),"パスワードが間違っていたようだ。");
DrawFormatString( 0, 0, GetColor(255,255,255),"天井から何かが降って来てあなたは死んだ。~GAME OVER~");
DrawFormatString( 0, 0, GetColor(255,255,255),"3キーで終了します。");
if( CheckHitKey(KEY_INPUT_3 )
{
break;
}
}
}
else if( CheckHitKey(KEY_INPUT_2 )
{
//右
DrawFormatString( 0, 0, GetColor(255,255,255),"右に進むとあなたは落とし穴に落ちてしまった。~GAME OVER~");
DrawFormatString( 0, 0, GetColor(255,255,255),"3キーで終了します。");
if( CheckHitKey(KEY_INPUT_3 )
{
break;
}
}
}
else if( CheckHitKey(KEY_INPUT_2 )
{
//食べる
DrawFormatString( 0, 0, GetColor(255,255,255), "リンゴには毒が入っていてあなたは死んでしまった。~GAME OVER~");
DrawFormatString( 0, 0, GetColor(255,255,255), "3キーで終了します。");
if( CheckHitKey(KEY_INPUT_3 )
{
break;
}
}
}
DxLib_End();
return 0;
}