From 428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7 Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 21 Nov 2004 16:44:36 +0000 Subject: Auto detect keyboard WIN32 --- src/game.cpp | 12 ++++++++++++ src/main.cpp | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/game.cpp b/src/game.cpp index 84aa85d3..a1fb7a54 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -49,6 +49,7 @@ unsigned char keyb_state; volatile int tick_time; volatile bool refresh = false, action_time = false; int current_npc, server_tick; +extern unsigned char screen_mode; #define MAX_TIME 10000 @@ -228,6 +229,17 @@ void do_input() { action_time = false; //alert("","","","","",0,0); } + if(key[KEY_F12] && action_time==true) { + if(screen_mode==2) { + screen_mode = 1; + } else { + screen_mode = 2; + } + if(set_gfx_mode(screen_mode, 800, 600, 0, 0)) { + error(allegro_error); + } + action_time = false; + } if(key[KEY_ENTER]) { if(strcmp(speech, "")!=0) { diff --git a/src/main.cpp b/src/main.cpp index f354a435..b9c501d3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -90,7 +90,7 @@ unsigned char state; unsigned short x, y; unsigned char direction; //unsigned short job, hair, hair_color; -unsigned char stretch_mode; +unsigned char stretch_mode, screen_mode; // new sound-engine /- kth5 TmwSound sound; -- cgit v1.2.3-70-g09d2