X-Git-Url: https://plomlompom.com/repos/?a=blobdiff_plain;f=src%2Fcontrol.h;h=8c44cc0a423a64fff73fa624479f49e1c51459bc;hb=67bcb0339e09a67fe1685cf81e35ccac18eba0c5;hp=889bdbfd366394f1d7a44e29eed7853b8fde05c4;hpb=7290dec4219eaa2325aa00ef6139f715743dba3a;p=plomrogue diff --git a/src/control.h b/src/control.h index 889bdbf..8c44cc0 100644 --- a/src/control.h +++ b/src/control.h @@ -13,14 +13,11 @@ /* 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 recorded "action" or pressed "key". +/* 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 void record_control(int action); -extern uint8_t player_control(int key); - - +extern uint8_t player_control_by_key(int key); +extern uint8_t player_control_by_id(int action); /* Control via "key" active window's geometry / keybindings in respective config * view. @@ -28,8 +25,6 @@ extern uint8_t player_control(int key); extern uint8_t wingeom_control(int key); extern uint8_t winkeyb_control(int key); - - /* Call by "key" further game / window management actions that don't influence * the player character. If the "quit" action is called, return 1 (instead of * exiting directly).