comparison codeDoc/input/inputIDs.txt @ 15:4608be19ebe2

Use OS paths (linux only for now), merging multiple paths. Init changes regarding options. Reorganised policies.txt a little. Implemented mde.resource.paths to read config from appropriate paths (currently linux only). Changed Init to load options before all other delegates are run and set logging level from options. committer: Diggory Hardy <diggory.hardy@gmail.com>
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 14 Mar 2008 11:39:45 +0000
parents
children 5f90774ea1ef
comparison
equal deleted inserted replaced
14:0047b364b6d9 15:4608be19ebe2
1 Event input status and callbacks are differentiated via IDs of type Input.inputID (currently uint).
2
3 Multi-user support requiers some way to make these specific to particular users; this is intended to be implemented via each user having their own Input class object; user-common callbacks are added by each user's class, thus enabling these to have extra user-specific functionality added later. Thus inputIDs don't need to contain a user ID.
4
5 4 bytes are available; of this the lowest 4 bits specifies which part of the engine uses these IDs, the rest is available for the engine part to use as it wants. The reason the lowest 4 bits are used for the engine part is so that if the inputID type is changed to a different sized integer, these 4 bits remain at the end of the block (i.e. the IDs available for the subsystem are still in one block).
6
7 Bit: 31 4 3 0
8 [ engine subsystem ] [subsystem]
9
10
11 Subsystem values:
12 0 Direct engine commands:
13 Main commands handled by mde.mde (may be moved), e.g. direct quit
14 1 GUI/User interface:
15 Interface commands, including quit dialog box
16 2 Physics system:
17 Direct control of thrusters, etc (control also possible via scripts)
18 3 Scripting system:
19 Indirect control of thrusters, etc. from physics objects
20 Other game-world interaction & scripting uses
21 4-F Unassigned
22
23
24 This is not enforced by the engine (except perhaps for scripts?), but simply followed.
25
26
27
28 Subsystem 0:
29 xx_xx_xx_00 Quitting:
30 00_00_00_00 End main loop normally
31 xx_xx_xx_E0 Debug dumps/commands
32 xx_xx_xx_F0 Test events
33
34
35
36
37 For stream functions, codes are used as follows. Only the last (lowest) two bytes are used; of this the highest 4 bits categorise the rough type of the stream function, and the next 4 bits subdivide this. The lowest byte has no meaning but is just a number.
38
39 Categorisation:
40
41 1*_** Output as event
42 2*_** Adjustments, keeping same output type
43 3*_** Adjustments with a different output type
44 F*_** Debug types
45 *
46 2X_** Adjustments:
47 OR'd flags for X:
48 1 uses timers
49 2 uses other events from same button/axis/etc.
50 4 uses other events from different button/axis/etc.
51 8 no output, only sets values for use by other adjusters
52 *
53 3X_** Adjustments with different output types (e.g. axis -> button):
54 OR'd flags as for 2X_**
55
56 F*_** Debug outputs:
57 F0_00 No output, doesn't do anything
58 F1_** Logs output, passing event on
59
60 Actual codes, with config values used:
61
62 1000 Standard output functions
63 Use 1 config value for output ID
64 2000 Reverse value (axes only)
65 No config values