]> de.git.xonotic.org Git - xonotic/netradiant.git/blob - libs/synapse/doc/runtime.txt
* fixed missing string for error output
[xonotic/netradiant.git] / libs / synapse / doc / runtime.txt
1 XML config files for customized synapse initialization at runtime
2 -----------------------------------------------------------------
3
4 Objective:
5 ----------
6
7 We have to assign the minors of the APIs to function tables 
8 (and possibly to the API managers) at runtime from some config files.
9
10 For instance in Q3 or RTCW mode, we will want to fill in 
11 g_FileSystemTable and g_ShadersTable with the "quake3" minor. Whereas
12 those tables will be filled in with a different minor for HL mode.
13
14 This affects SYN_REQUIRE for all the clients of the system, so that
15 config will need to be global and passed around to the clients.
16
17 Implementation:
18 ---------------
19
20 an XML hierarchy to describe the APIs:
21 <client name="CORE">
22   <api name="vfs">
23     quake3
24   </api>
25   <api name="shaders">
26     quake3
27   </api>
28   ..
29 </client>
30 <client name="SHADERS">
31   
32 </client>
33
34 Each client will have to be identified by a specific name, if a name in the
35 config is not found in the client list, the init should fail. A client can
36 still be hardcoded and not appear in this list though.
37 (a GetName() function to synapse client)
38
39 SYN_REQUIRE_ANY support will work for strict API lists. Just the same way 
40 we do the simple SYN_REQUIRE
41
42 Discussion:
43 -----------
44
45 We only deal with SYN_REQUIRE. It is possible that at some point we will want
46 to customize the SYN_PROVIDE too. For instance depending on the game mode, a
47 same module could provide two different minors. Couldn't provide the two minors
48 at the same time though, only one.
49
50 Implementation:
51 ---------------
52
53 Default config file will be synapse.config in the gametools path. We can override
54 this later with a custom line in the .game file. Should Synapse be able to operate
55 without this config file though, as it is looked up by the main program and handed
56 over to synapse before init? Possibly .. we'll just pass a NULL config node ptr
57
58 Add the config file path to CSynpaseServer::Initialize, pass the loaded XML file to
59 the clients. Do we need to wrap in an object with some convenience functions?