summaryrefslogtreecommitdiff
path: root/src/base/arena.c
diff options
context:
space:
mode:
authororoborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-23 11:44:09 +0000
committeroroborus <oroborus@0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e>2008-08-23 11:44:09 +0000
commitc30b18c500bd0abb3362df66448febda36ff80d0 (patch)
tree10d762326878e5991eac9d7c788cde2f3b0d0fd2 /src/base/arena.c
parent9c72004fada0af13e4c9b4682c733056a777dc59 (diff)
- hotKey API
- screen-split sa da prepinat klavesou [F3] - TCP pouziva v setsockopt parameter SO_REUSEADDR git-svn-id: http://opensvn.csie.org/tuxanci_ng@243 0ee4d065-81f0-4d1e-b06c-ff20ad07cc3e
Diffstat (limited to 'src/base/arena.c')
-rw-r--r--src/base/arena.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/base/arena.c b/src/base/arena.c
index 3a72eba..bab0ad3 100644
--- a/src/base/arena.c
+++ b/src/base/arena.c
@@ -11,6 +11,7 @@
#include "item.h"
#include "myTimer.h"
#include "modules.h"
+#include "hotKey.h"
#ifndef PUBLIC_SERVER
#include "screen_world.h"
@@ -30,6 +31,18 @@ arena_t* getCurrentArena()
return currentArena;
}
+void hotkey_splitArena()
+{
+ if( splitType == SCREEN_SPLIT_VERTICAL )
+ {
+ splitType = SCREEN_SPLIT_HORIZONTAL;
+ }
+ else
+ {
+ splitType = SCREEN_SPLIT_VERTICAL;
+ }
+}
+
void initArena()
{
splitType = SCREEN_SPLIT_VERTICAL;
@@ -45,6 +58,13 @@ void initArena()
splitType = SCREEN_SPLIT_HORIZONTAL;
printf("SCREEN_SPLIT_HORIZONTAL\n");
}
+
+ registerHotKey(SDLK_F3, hotkey_splitArena);
+}
+
+void quitArena()
+{
+ unregisterHotKey(SDLK_F3);
}
arena_t* newArena(int w, int h)