Debian Codegraph @

src/doc/event.txt

raw
1 Angband's event system
2 ======================
3
4 XXX This is an unfinished but maybe useful document!
5
6
7 State of play
8 -------------
9
10 The Angband event system, first introduced in 2007, is presently underutilised though it has great potential.
11
12 We can use the event system for:
13 * Producing sound
14 * Messages to the player
15 * Sending
16 * Tracking an object
17
18 At the moment, generally only simple messages with no parameters are used.
19
20 Vague plan
21 ----------
22
23 Split out the argument system from cmd-core.c and re-use it for events.
24
25 Convert msg() into an event, msg_print() etc into message handlers.
26
27 Convert sound() into an event, sound() into a message handler (or the snd-*/main-* file handling it).
28
29
30
31 New events needed
32 -----------------
33
34 'Path animation' type
35
36 Used: project(), attack.c
37
38 What it needs to do: Act as a buffer between the core code that works out what path things take, the UI which displays the paths.
39
40
41
42 Core UI split notes
43 -------------------
44
45 obj-list.c - last two functions are textui specific, otherwise fine
46 obj-util.c - has display_object_recall() & two below, otherwise fine
47 obj-ui.c - 100% UI functions
48 other object files fine
49
50 target.c - half to be moved into cmd-cave, UI bit to become ui-target.c?