summaryrefslogtreecommitdiff
path: root/src/game.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-11-21 16:44:36 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-11-21 16:44:36 +0000
commit428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7 (patch)
tree81de9ddd8724a5c8f1be6d9a965e3973b8bc73a2 /src/game.cpp
parentf5e77458a8e34e33fba6af1b04aa5bfefe51149a (diff)
downloadmana-428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7.tar.gz
mana-428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7.tar.bz2
mana-428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7.tar.xz
mana-428c4cc8bba2e8a385a6f51d3788b7ab3c9ce4c7.zip
Auto detect keyboard WIN32
Diffstat (limited to 'src/game.cpp')
-rw-r--r--src/game.cpp12
1 files changed, 12 insertions, 0 deletions
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) {