Exemplo n.º 1
0
int main(int argc, char **argv)
{
    tintin_exec=argv[0];
    init_locale();
    user_setdriver(isatty(0)?1:0);
    parse_options(argc, argv);
    init_bind();
    hist_num=-1;
    init_parse();
    strcpy(status, EMPTY_LINE);
    user_init();
    /*  read_complete();            no tab-completion */
    srand((getpid()*0x10001)^time0);
    lastdraft=0;

    if (ui_own_output || tty)
    {
/*
    Legal crap does _not_ belong here.  Anyone interested in the license
can check the files accompanying KBtin, without any need of being spammed
every time.  It is not GNU bc or something similar, we don't want half
a screenful of all-uppercase (cAPS kEY IS STUCK AGAIN?) text that no one
ever wants to read -- that is what docs are for.
*/
        tintin_printf(0, "~2~##########################################################");
        tintin_printf(0, "#~7~               ~12~K B ~3~t i n~7~    v %-25s ~2~#", VERSION);
        tintin_printf(0, "#                                                        #");
        tintin_printf(0, "#~7~ current developer: ~9~Adam Borowski ([email protected]~7~) ~2~#");
        tintin_printf(0, "#                                                        #");
        tintin_printf(0, "#~7~ based on ~12~tintin++~7~ v 2.1.9 by Peter Unold, Bill Reiss,  ~2~#");
        tintin_printf(0, "#~7~   David A. Wagner, Joann Ellsworth, Jeremy C. Jack,    ~2~#");
        tintin_printf(0, "#~7~          Ulan@GrimneMUD and Jakub Narębski             ~2~#");
        tintin_printf(0, "##########################################################~7~");
        tintin_printf(0, "~15~#session <name> <host> <port> ~7~to connect to a remote server");
        tintin_printf(0, "                              ~8~#ses t2t t2tmud.org 9999");
        tintin_printf(0, "~15~#run <name> <command>         ~7~to run a local command");
        tintin_printf(0, "                              ~8~#run advent adventure");
        tintin_printf(0, "                              ~8~#run sql mysql");
        tintin_printf(0, "~15~#help                         ~7~to get the help index");
    }
    user_mark_greeting();

    setup_signals();
#ifdef PROFILING
    setup_prof();
#endif
    PROF("initializing");
    setup_ulimit();
    init_nullses();
    PROF("other");
    apply_options();
    tintin();
    return 0;
}
Exemplo n.º 2
0
bool Texture::load() {
	try {
		image = new Magick::Image(file_name);
		image->write(&blob, "RGBA");
	} catch (Magick::Error& error) {
		fprintf(stderr, "Error while loading texture '%s': %s\n", file_name.c_str(), error.what());
		return false;
	}

	init_bind();
	
	return true;
}