﻿#include "DxLib.h"

#include "Game.h"

// ゲームのエントリーポイント
int WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
{
    ChangeWindowMode(TRUE);
    SetGraphMode(640, 480, 32);

    if (DxLib_Init() == -1)
        return -1;

    SetDrawScreen(DX_SCREEN_BACK);

    int result = 0;

    {
        // ImageManagerをDxLib_Endより前に破棄する
        Game game;
        if (!game.Initialize())
        {
            result = -1;
        }
        else
        {
            game.MainLoop();
        }
    }

    DxLib_End();
    return result;
}
