X-Git-Url: https://plomlompom.com/repos/index.html?a=blobdiff_plain;f=src%2Fcontrol.h;h=492b80b1688f8ad176dd57adc7397cac11d86661;hb=89c4ab4e0d6d7bb9d51d6714afae52603b465fc0;hp=79e5976e7b5010019df474c994ac4fa25dea2e91;hpb=4ca4f2fc97bd592bcbbef5ed2b21b320c7336425;p=plomrogue
diff --git a/src/control.h b/src/control.h
index 79e5976..492b80b 100644
--- a/src/control.h
+++ b/src/control.h
@@ -6,25 +6,27 @@
#ifndef CONTROL_H
#define CONTROL_H
-
-
#include /* for uint8_t */
-struct World;
-/* Control the player character, either via recorded "action" or pressed "key".
- */
-extern void record_control(int action, struct World * world);
-extern uint8_t player_control(int key, struct World * world);
+/* Return keycode to action of "name" if available in current window config. */
+extern uint16_t get_available_keycode_to_action(char * name);
+/* Control the player character, either via action id "action" or pressed "key".
+ * Return 1 on success, 0 if no appropriate action to trigger was found.
+ */
+extern uint8_t player_control_by_key(int key);
+extern uint8_t player_control_by_id(int action);
+/* Control via "key" active window's config view's geometry / keybindings. */
+extern uint8_t wingeom_control(int key);
+extern uint8_t winkeyb_control(int key);
-/* Call by "key" game / window management actions that don't influence the
- * player character. If the "quit" action is called, return 1 (instead of
- * exiting directly).
+/* Call via "key" further game/window management actions not influencing the
+ * player character. If "quit" is called, return 1, else 0.
*/
-extern uint8_t meta_control(int key, struct World * world);
+extern uint8_t meta_control(int key);