view 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
line wrap: on
line source

Event input status and callbacks are differentiated via IDs of type Input.inputID (currently uint).

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 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).

Bit:	31		   4  3		0
	[ engine subsystem ]  [subsystem]


Subsystem values:
0	Direct engine commands:
		Main commands handled by mde.mde (may be moved), e.g. direct quit
1	GUI/User interface:
		Interface commands, including quit dialog box
2	Physics system:
		Direct control of thrusters, etc (control also possible via scripts)
3	Scripting system:
		Indirect control of thrusters, etc. from physics objects
		Other game-world interaction & scripting uses
4-F	Unassigned


This is not enforced by the engine (except perhaps for scripts?), but simply followed.



Subsystem 0:
xx_xx_xx_00	Quitting:
00_00_00_00		End main loop normally
xx_xx_xx_E0	Debug dumps/commands
xx_xx_xx_F0	Test events




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.

Categorisation:

1*_**	Output as event
2*_**	Adjustments, keeping same output type
3*_**	Adjustments with a different output type
F*_**	Debug types
    *
2X_**	Adjustments:
	OR'd flags for X:
	1	uses timers
	2	uses other events from same button/axis/etc.
	4	uses other events from different button/axis/etc.
	8	no output, only sets values for use by other adjusters
    *
3X_**	Adjustments with different output types (e.g. axis -> button):
	OR'd flags as for 2X_**

F*_**	Debug outputs:
	F0_00	No output, doesn't do anything
	F1_**	Logs output, passing event on

Actual codes, with config values used:

1000	Standard output functions
		Use 1 config value for output ID
2000	Reverse value (axes only)
		No config values