コードは以下の通りです。
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int){
ChangeWindowMode(TRUE), DxLib_Init(), SetDrawScreen(DX_SCREEN_BACK);
fileload();
while (ScreenFlip() == 0 && ProcessMessage() == 0 && ClearDrawScreen() == 0 && GetHitKeyStateAll(key) == 0){
draw_map();
DrawGraph(s_pos_x * 32, s_pos_y * 32, chara_chip[0][s_vector], TRUE);
if (key[KEY_INPUT_RETURN] == 1){
while (CheckHitKey(KEY_INPUT_RETURN) == 1);
}
else{
if (key[KEY_INPUT_UP] == 1){
if (s_pos_y > 0){
s_pos_y -= 1;
vector_up();
}
else{
vector_up();
map_check();
}
}
if (key[KEY_INPUT_DOWN] == 1){
if (s_pos_y < 14){
s_pos_y += 1;
vector_down();
}
else{
vector_down();
map_check();
}
}
if (key[KEY_INPUT_RIGHT] == 1){
if (s_pos_x < 19){
s_pos_x += 1;
vector_right();
}
else{
vector_right();
map_check();
}
}
if (key[KEY_INPUT_LEFT] == 1){
if (s_pos_x > 0){
s_pos_x -= 1;
vector_left();
}
else{
vector_left();
map_check();
}
}
WaitTimer(40);
}
DxLib_End();
return 0;
}
}
>c:\users\lactis\documents\visual studio 2013\projects\dxsample\main.cpp(63): warning C4715: 'WinMain' : 値を返さないコントロール パスがあります。
1> Dxsample.vcxproj -> C:\Users\lactis\Documents\Visual Studio 2013\Projects\Dxsample\Debug\Dxsample.exe
========== ビルド: 1 正常終了、0 失敗、0 更新不要、0 スキップ ==========
63行目に問題があるのだと推測されますが、他の人の例にあった、return 0というのは書いてあるんですよね……。
ここの関数の中身が覗きたいという場合は仰って下さい。宜しければお願いします