source: GTP/trunk/App/Demos/Illum/Shark3D/version164x12u/IllumDemo/src/res/main/actor/main.s3d_actor @ 2196

Revision 2196, 6.3 KB checked in by szirmay, 17 years ago (diff)
Line 
1///////////////////////////////////////////////////////////////////////////////
2//
3//      ##  ######
4//       ######  ###
5//  ## ###############        Shark 3D Engine (www.shark3d.com)
6//   ########## # # #
7//    ########                Copyright (c) 1996-2006 Spinor GmbH.
8//   ######### # # #          All rights reserved.
9//  ##   ##########
10//      ##
11//
12///////////////////////////////////////////////////////////////////////////////
13
14// Startup file.
15//
16// This file is the first resource file loaded by the Shark 3D player.
17// Job of this file is to define global components which are used both
18// by the server and client, and to define the server and client actors.
19// The server is loaded from "server/actor/server.s3d_actor_run",
20// the client is loaded from "client/actor/client.s3d_actor_run".
21
22// Scope name of the global namespace.
23// This name is used to display error messages if an actor is not found.
24scope "root"
25// Name of the root actor. See in the docu for the actor ident "kit.root".
26// This actor can perform commands like "quit".
27name "root"
28// Name of the actor delegating commands to.
29// This can be used if C++ components outside the actor tree
30// want to send commands to the actor tree,
31// for example from a script within a HTML page.
32deleg_target "dispatch_export"
33// Type of the child actor.
34// In this case, the root actor is a group actor, containing several
35// child actors. The ident "kit_base.group" means to search the actor
36// of ident "group" in the DLL which was registered under the name "core",
37// see "example.cfg".
38child_ident "kit_base.group"   
39// Parameters of the child actor. The kind of parameters which are understood
40// depends on the type of the actor. In this case the type of the actor
41// is "kit_base.group", which understands the parameter "child_array".
42// See the actor reference in the programmer reference in the documentation.
43// This reference contains a list of all actor types and its parameters.
44child_param
45{
46    // Delegate action calls to the children.
47    active 1
48    // List of child actors of this group actor.
49    // Each child actor again is described by its type and parameters.
50    // See the actor reference in the programmer reference in the
51    // documentation. This reference contains a list of all actor types
52    // and its parameters.
53    child_array
54    {
55        ident "kit_base.dispatch"
56        param
57        {
58            name "dispatch_export"
59            entry_array
60            {
61                cmds "report_note" "res_refresh" "res_refresh_all"
62                targets "root"
63            }
64        }
65    }
66    {
67        // Actor managing the cfguration data from the cfguration file,
68        // for example from "run_win32.cfg".
69        ident "kit_snk.data"
70        param
71        {
72            name "cfg"
73            // The cfguration data from the cfg-file can be retrieved
74            // from the actor root:
75            src_actor "root"
76            src_cmd "get_cfg"
77        }
78    }
79    {
80        ident "kit_base.extern"
81        param
82        {
83            // Delegate action calls to the child:
84            active 1
85            deleg_name "common"
86            res "main/actor/common.s3d_actor_run"
87        }
88    }
89    {
90        // Create a CAS access server is enabled.
91        ident "kit_snk.childif"
92        param
93        {
94            // Name of the actor containing the cfguration data.
95            extcfg_actor "cfg"
96            // Check for this entry of the cfguration file.
97            extcfg_entry_switch "cas.enabled"
98            // Type of the child actor.
99            // In this case, the child actor loads another dsc-file.
100            then_child_ident "kit_base.extern"
101            // Parameters of the child actor.
102            then_child_param
103            {
104                // Delegate action calls to the child:
105                active 1
106                deleg_name "cas"
107                res "main/actor/cas.s3d_actor_run"
108            }
109        }
110    }
111    {
112        // Create a server is enabled. This actor only creates a child actor
113        // if a particular cfguration entry is present.
114        ident "kit_snk.childif"
115        param
116        {
117            // Name of the actor containing the cfguration data.
118            extcfg_actor "cfg"
119            // Check for this entry of the cfguration file.
120            extcfg_entry_switch "server.enabled"
121            // Type of the child actor.
122            // In this case, the child actor loads another dsc-file.
123            then_child_ident "kit_base.extern"
124            // Parameters of the child actor.
125            then_child_param
126            {
127                // Delegate action calls to the child:
128                active 1
129                // Name of this extern actor.
130                name "server_extern"
131                // Name to send commands for the server to.
132                deleg_name "server"
133                // Name of the description file describing the server:
134                res "server/actor/server.s3d_actor_run"
135            }
136        }
137    }
138    {
139        // Create a client is enabled.
140        // Works in the same way as for the server.
141        ident "kit_snk.childif"
142        param
143        {
144            extcfg_actor "cfg"
145            extcfg_entry_switch "client.enabled"
146            then_child_ident "kit_base.extern"
147            then_child_param
148            {
149                // Delegate action calls to the child:
150                active 1
151                // Name of this extern actor.
152                name "client_extern"
153                // Name to send commands for the client to.
154                deleg_name "client"
155                // Name of the description file describing the client:
156                res "client/actor/client.s3d_actor_run"
157            }
158        }
159    }
160    {
161        // Second client.
162        ident "kit_snk.childif"
163        param
164        {
165            extcfg_actor "cfg"
166            extcfg_entry_switch "client.enabled"
167            then_child_ident "kit_base.extern"
168            then_child_param
169            {
170                // Delegate action calls to the child:
171                active 1
172                name "client_sec_extern"
173                deleg_name "client_sec"
174                res ""
175            }
176        }
177    }
178}
Note: See TracBrowser for help on using the repository browser.