コード例 #1
0
ファイル: video.c プロジェクト: NoSuchProcess/phantomuserland
static void video_post_start()
{

    scr_zbuf_init();
    drv_video_init_windows();

    // Have VESA driver, add companion accelerator if possible
    if( was_enforced )
        select_accel_driver();

    SHOW_FLOW0( 3, "Video console init" );
    phantom_init_console_window();

    SHOW_FLOW0( 3, "Video mouse cursor init" );
    scr_mouse_set_cursor(drv_video_get_default_mouse_bmp());
}
コード例 #2
0
int main(int argc, char* argv[])
{
    printf("\n\n\n\n----- Phantom exec test v. 0.5\n\n");


    run_init_functions( INIT_LEVEL_PREPARE );
    run_init_functions( INIT_LEVEL_INIT ); // before video

    //drv_video_win32.mouse = mouse_callback;
    //video_drv = &drv_video_win32;
    //video_drv = &drv_video_x11;

    args(argc,argv);

    pvm_bulk_init( bulk_seek_f, bulk_read_f );

    pvm_video_init();
    video_drv->mouse = mouse_callback;

    drv_video_init_windows();
    init_main_event_q();
    init_new_windows();

    scr_mouse_set_cursor(drv_video_get_default_mouse_bmp());


    mem = malloc(size+1024*10);
    setDiffMem( mem, malloc(size+1024*10), size );

    hal_init( mem, size );
    //pvm_alloc_threaded_init(); // no threads yet - no lock

    run_init_functions( INIT_LEVEL_LATE );

#if 0
    videotest();
    //getchar();
    exit(0);
#endif

#if 0
    new_videotest();
    getchar();
    exit(0);
#endif


    char *dir = getenv("PHANTOM_HOME");
    char *rest = "plib/bin/classes";

    if( dir == NULL )
    {
        dir = "pcode";
        rest = "classes";
    }

    char fn[1024];
    snprintf( fn, 1024, "%s/%s", dir, rest );

    if( load_code( &bulk_code, &bulk_size, fn ) ) //"pcode/classes") )
    {
        printf("No bulk classes file '%s'\n", fn );
        exit(22);
    }
    bulk_read_pos = bulk_code;


    pvm_root_init();


    // TODO use stray catcher in pvm_test too
    //stray();

#if 0
//ui_loop( argc, argv, "test");
    printf("\nPhantom code finished\n" );
    //getchar();
    //{ char c; read( 0, &c, 1 ); }
	sleep(100);
#else
    dbg_init();
    kernel_debugger();
#endif

#if 0
    pvm_memcheck();

    printf("will run GC\n" );
    run_gc();

    printf("press enter\n" );
//    getchar();

    pvm_memcheck();

    save_mem(mem, size);
#endif
    return 0;
}