コード例 #1
0
ファイル: dialog.c プロジェクト: AntonLanghoff/whitecatlib
int main()
{
	int ok;
	allegro_init();
	install_timer();

	do {
		set_color_depth(8);
		if (set_gfx_mode (GFX_AUTODETECT, 640, 480, 0, 0) < 0) {
			allegro_message ("Error setting plain graphics mode:\n%s\n", allegro_error);
			return -1;
		}
		
		install_allegro_gl();

		install_keyboard();
		install_mouse();
		ok = setup();
		remove_keyboard();
		remove_mouse();

		if (ok) run_demo();

		remove_allegro_gl();
	} while (ok);

	return 0;
}
コード例 #2
0
ファイル: linux-gui.c プロジェクト: SteveFosdick/b-em
void gui_enter()
{
        int x = 1;
        DIALOG_PLAYER *dp;       
        
        while (keypressed()) readkey();
        while (key[KEY_F11]) rest(100);

        gui_update();

        if (curtube != 3 && !mouse_amx) install_mouse();
        
        set_color_depth(dcol);
        show_mouse(screen);
        bemgui[0].x  = (windx / 2) - 36;
        bemgui[0].y  = windy - 8;
        bemgui[0].fg = makecol(255,255,255);
        dp=init_dialog(bemgui, 0);
        while (x && !key[KEY_F11] && !key[KEY_ESC])
        {
                x = update_dialog(dp);
        }
        shutdown_dialog(dp);
        show_mouse(NULL);
        set_color_depth(8);

        if (curtube != 3 && !mouse_amx) remove_mouse();
        
        while (key[KEY_F11]) rest(100);

        video_clearscreen();
}
コード例 #3
0
ファイル: main.c プロジェクト: hoglet67/b-em
void main_setmouse()
{
        if (curtube != 3)
        {
                if (mouse_amx) install_mouse();
                else           remove_mouse();
        }
}
コード例 #4
0
ファイル: msdos.cpp プロジェクト: alesegdia/snes-sdk
void S9xTextMode ()
{
    if (!in_text_mode)
    {
	set_color_depth (8);
	remove_keyboard ();
	remove_mouse ();
	set_gfx_mode (GFX_TEXT, 0, 0, 0, 0);
	in_text_mode = TRUE;
    }
}
コード例 #5
0
ファイル: NwLvlMak.cpp プロジェクト: Shaduck/OldGame01
void GameExit(void)
{

	remove_keyboard();
	remove_timer();
	remove_mouse();

	allegro_exit();

 	return;
}
コード例 #6
0
ファイル: cControls.cpp プロジェクト: jstty/OlderProjects
int cControls::Exit()
{
   if(!m_exited)
   {
      remove_keyboard();
      remove_joystick();
      remove_mouse();

      FreeAll();

      m_exited = true;
   }

   return 0;
}
コード例 #7
0
ファイル: wwnd.c プロジェクト: dodamn/pkg-allegro4.2
/* exit_window_modules:
 *  Removes the modules that depend upon the main window:
 *   - keyboard (DirectInput),
 *   - mouse (DirectInput),
 *   - joystick (DirectInput),
 *   - sound (DirectSound),
 *   - sound input (DirectSoundCapture).
 *  If WM is not NULL, record which modules are really removed.
 */
static void exit_window_modules(struct WINDOW_MODULES *wm)
{
   if (wm)
      memset(wm, 0, sizeof(*wm));

   if (_keyboard_installed) {
     if (wm)
         wm->keyboard = TRUE;

      remove_keyboard();
   }

   if (_mouse_installed) {
      if (wm)
         wm->mouse = TRUE;

      remove_mouse();
   }

   if (_joystick_installed) {
      if (wm) {
         wm->joystick = TRUE;
         wm->joy_type = _joy_type;
      }

      remove_joystick();
   }

   if (_sound_installed) {
      if (wm) {
         wm->sound = TRUE;
         wm->digi_card = digi_card;
         wm->midi_card = midi_card;
      }

      remove_sound();
   }

   if (_sound_input_installed) {
      if (wm) {
         wm->sound_input = TRUE;
         wm->digi_input_card = digi_input_card;
         wm->midi_input_card = midi_input_card;
      }

      remove_sound_input();
   }
}
コード例 #8
0
void Graphic::deinit()
{
    for (int i=0; i<MAX_SPRITE; i++)
    {
        imageDestroy(this->pSprites[i]);
    }
    for (int i=0; i<MAX_SPRITE_PLAYER; i++)
    {
        imageDestroy(this->pSpritesPlayer[i]);
    }

    imageDestroy(pBuffer);
    remove_mouse();
    remove_keyboard();
    allegro_exit();
}
コード例 #9
0
ファイル: main.c プロジェクト: hoglet67/b-em
void main_restart()
{
        bempause = 1;
        startblit();
        if (curtube == 3 || mouse_amx) remove_mouse();
        cmos_save(models[oldmodel]);
        oldmodel = curmodel;

        model_init();

        main_reset();

        if (curtube == 3 || mouse_amx) install_mouse();
        endblit();
        bempause = 0;
}
コード例 #10
0
ファイル: gui.cpp プロジェクト: Julien-B/aseprite
void exit_module_gui()
{
    save_gui_config();

    // destroy shortcuts
    ASSERT(shortcuts != NULL);
    for (Shortcut* shortcut : *shortcuts)
        delete shortcut;
    delete shortcuts;
    shortcuts = NULL;

    delete manager;

    // Now we can destroy theme
    CurrentTheme::set(NULL);
    delete ase_theme;

    remove_keyboard();
    remove_mouse();

    main_clipboard->dispose();
    main_display->dispose();
}
コード例 #11
0
optionsScreen::~optionsScreen()
{
	remove_mouse();
	disable_hardware_cursor();
}