void logotest(void) { int h; void *scaled; /* Set logo palette. */ setcustompalette(); /* Create logo bitmap */ logobitmap = alloca(LOGOWIDTH * LOGOHEIGHT); loadbitmap("linuxlogo.bmp", logobitmap); /* Allocate buffer for scaled bitmap. */ scaled = alloca(WIDTH * HEIGHT); gl_clearscreen(0); /* Stretch vertically. */ for (h = 0; h <= LOGOHEIGHT; h++) { gl_scalebox(LOGOWIDTH, LOGOHEIGHT, logobitmap, LOGOWIDTH, h, scaled); gl_putbox(0, 0, LOGOWIDTH, h, scaled); if (VIRTUAL) gl_copyscreen(physicalscreen); } gl_clearscreen(0); /* Scale to screen resolution. */ gl_scalebox(LOGOWIDTH, LOGOHEIGHT, logobitmap, WIDTH, HEIGHT, scaled); gl_putbox(0, 0, WIDTH, HEIGHT, scaled); gl_copyscreen(physicalscreen); }
int lincity_main (int argc, char *argv[]) { #if defined (LC_X11) char *geometry = NULL; #endif #if defined (SVGALIB) int q; vga_init (); #endif #if !defined (WIN32) signal (SIGPIPE, SIG_IGN); /* broken pipes are ignored. */ #endif /* Initialize some global variables */ make_dir_ok_flag = 1; main_screen_originx = 1; main_screen_originy = 1; given_scene[0] = 0; quit_flag = network_flag = load_flag = save_flag = prefs_flag = cheat_flag = monument_bul_flag = river_bul_flag = shanty_bul_flag; prefs_drawn_flag = 0; kmouse_val = 8; #ifdef LC_X11 borderx = 0; bordery = 0; parse_xargs (argc, argv, &geometry); #endif /* I18n */ lincity_set_locale (); /* Set up the paths to certain files and directories */ init_path_strings (); /* Make sure that things are installed where they should be */ verify_package (); /* Make sure the save directory exists */ check_savedir (); /* Load preferences */ load_lincityrc (); #ifndef CS_PROFILE #ifdef SEED_RAND srand (time (0)); #endif #endif #ifdef LC_X11 #if defined (commentout) borderx = 0; bordery = 0; parse_xargs (argc, argv, &geometry); #endif Create_Window (geometry); pirate_cursor = XCreateFontCursor (display.dpy, XC_pirate); #elif defined (WIN32) /* Deal with all outstanding messages */ ProcessPendingEvents (); #else parse_args (argc, argv); q = vga_setmode (G640x480x256); gl_setcontextvga (G640x480x256); #endif #if defined (WIN32) || defined (LC_X11) initialize_pixmap (); #endif init_fonts (); #if defined (SKIP_OPENING_SCENE) skip_splash_screen = 1; #endif if (!skip_splash_screen) { load_start_image (); } #ifdef LC_X11 unlock_window_size (); #endif Fgl_setfont (8, 8, main_font); Fgl_setfontcolors (TEXT_BG_COLOUR, TEXT_FG_COLOUR); initialize_geometry (&scr); #if defined (SVGALIB) set_vga_mode (); #endif initialize_monthgraph (); init_mouse_registry (); init_mini_map_mouse (); #ifdef LC_X11 x_key_value = 0; #elif defined (WIN32) RefreshScreen (); #endif setcustompalette (); draw_background (); prog_box (_("Loading the game"), 1); init_types (); init_modules(); init_mappoint_array (); initialize_tax_rates (); prog_box ("", 95); mouse_hide_count = 0; suppress_ok_buttons = 0; prog_box ("", 100); #ifdef USE_PIXMAPS prog_box (_("Creating pixmaps"), 1); init_pixmaps (); prog_box ("", 100); #endif //draw_normal_mouse (1, 1); #if defined (LC_X11) init_x_mouse (); #endif init_timer_buttons(); mouse_initialized = 1; //set_selected_module (CST_TRACK_LR); screen_setup (); /* Main loop! */ client_main_loop (); #if defined (SVGALIB) mouse_close (); vga_setmode (TEXT); #endif print_results (); #if defined (WIN32) || defined (LC_X11) free_pixmap (); #endif #if defined (WIN32) return 0; #else exit (0); #endif }