
#include <iostream>
#include <exception>
#include <string>
#include <windows.h>

#include <allegro5/allegro.h>
#include <allegro5/allegro_physfs.h>

using namespace std;

int main(int argc, char* argv[])
{
    try
    {
        if(not al_init()){ throw string("Could not initialize Allegro engine."); }

        al_set_physfs_file_interface();
    }
    catch(string& s)
    {
        MessageBox(NULL, s.c_str(), "Engine Error", MB_OK | MB_ICONERROR);
        return -1;
    }

    ALLEGRO_CONFIG* config = al_create_config();

    al_add_config_section(config, "SCREEN");
    al_add_config_comment(config, "SCREEN", "Screen Attributes");

    al_set_config_value(config, "SCREEN", "width", "800");
    al_set_config_value(config, "SCREEN", "height", "640");

    if(not al_save_config_file("config.cfg", config))
    {
        MessageBox(NULL, "Could not save configuration file.", "File Error", MB_OK | MB_ICONERROR);
    }

    al_destroy_config(config);

    return 0x000;
}












