Beispiel #1
0
        static int Main()
        {
            allegro_init();

            install_keyboard();
            install_timer();

            //srand(time(NULL));
            LOCK_VARIABLE(counter);
            LOCK_FUNCTION(t_my_timer_handler);

            if (set_gfx_mode(GFX_AUTODETECT, 1024, 768, 0, 0) != 0)
            {
                set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);
                allegro_message(string.Format("Error setting graphics mode\n{0}\n", allegro_error));
                return(1);
            }

            world game = new world();  /* America! America! */

            game.loop();
            //delete game;

            return(0);
        }