home
·
contact
·
privacy
projects
/
plomrogue
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Changed way world.map_obj_count is transmitted; also re-factoring of map_objects...
[plomrogue]
/
src
/
control.h
diff --git
a/src/control.h
b/src/control.h
index 470b026cb74c154b2ea22b3120f932346429602e..8c44cc0a423a64fff73fa624479f49e1c51459bc 100644
(file)
--- a/
src/control.h
+++ b/
src/control.h
@@
-6,39
+6,30
@@
#ifndef CONTROL_H
#define CONTROL_H
#ifndef CONTROL_H
#define CONTROL_H
-
-
#include <stdint.h> /* for uint8_t */
#include <stdint.h> /* for uint8_t */
-struct World;
/* Return keycode to action of "name" if available in current window config. */
/* Return keycode to action of "name" if available in current window config. */
-extern uint16_t get_available_keycode_to_action(struct World * world,
- char * name);
-
-
+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, struct World * world);
-extern uint8_t player_control(int key, struct World * world);
-
-
+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.
*/
/* Control via "key" active window's geometry / keybindings in respective config
* view.
*/
-extern uint8_t wingeom_control(int key, struct World * world);
-extern uint8_t winkeyb_control(int key, struct World * world);
-
-
+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).
*/
/* 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).
*/
-extern uint8_t meta_control(int key
, struct World * world
);
+extern uint8_t meta_control(int key);