source: GTP/trunk/App/Demos/Geom/Shark3D/clod_head_demo_win32/src/res/main/actor/main.s3d_actor @ 2236

Revision 2236, 6.0 KB checked in by gumbau, 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    active 1
47    // List of child actors of this group actor.
48    // Each child actor again is described by its type and parameters.
49    // See the actor reference in the programmer reference in the
50    // documentation. This reference contains a list of all actor types
51    // and its parameters.
52    child_array
53    {
54        ident "kit_base.dispatch"
55        param
56        {
57            name "dispatch_export"
58            entry_array
59            {
60                cmds "report_note" "res_refresh" "refresh_all_res"
61                targets "root"
62            }
63        }
64    }
65    {
66        // Actor managing the cfguration data from the cfguration file,
67        // for example from "run_win32.cfg".
68        ident "kit_snk.data"
69        param
70        {
71            name "cfg"
72            // The cfguration data from the cfg-file can be retrieved
73            // from the actor root:
74            src_actor "root"
75            src_cmd "get_cfg"
76        }
77    }
78    {
79        ident "kit_base.extern"
80        param
81        {
82            active 1
83            deleg_name "common"
84            res "main/actor/common.s3d_actor_run"
85        }
86    }
87    {
88        // Create a CAS access server is enabled.
89        ident "kit_snk.childif"
90        param
91        {
92            // Name of the actor containing the cfguration data.
93            extcfg_actor "cfg"
94            // Check for this entry of the cfguration file.
95            extcfg_entry_switch "cas.enabled"
96            // Type of the child actor.
97            // In this case, the child actor loads another dsc-file.
98            then_child_ident "kit_base.extern"
99            // Parameters of the child actor.
100            then_child_param
101            {
102                active 1
103                deleg_name "cas"
104                res "main/actor/cas.s3d_actor_run"
105            }
106        }
107    }
108    {
109        // Create a server is enabled. This actor only creates a child actor
110        // if a particular cfguration entry is present.
111        ident "kit_snk.childif"
112        param
113        {
114            // Name of the actor containing the cfguration data.
115            extcfg_actor "cfg"
116            // Check for this entry of the cfguration file.
117            extcfg_entry_switch "server.enabled"
118            // Type of the child actor.
119            // In this case, the child actor loads another dsc-file.
120            then_child_ident "kit_base.extern"
121            // Parameters of the child actor.
122            then_child_param
123            {
124                active 1
125                // Name of this extern actor.
126                name "server_extern"
127                // Name to send commands for the server to.
128                deleg_name "server"
129                // Name of the description file describing the server:
130                res "server/actor/server.s3d_actor_run"
131            }
132        }
133    }
134    {
135        // Create a client is enabled.
136        // Works in the same way as for the server.
137        ident "kit_snk.childif"
138        param
139        {
140            extcfg_actor "cfg"
141            extcfg_entry_switch "client.enabled"
142            then_child_ident "kit_base.extern"
143            then_child_param
144            {
145                active 1
146                // Name of this extern actor.
147                name "client_extern"
148                // Name to send commands for the client to.
149                deleg_name "client"
150                // Name of the description file describing the client:
151                res "client/actor/client.s3d_actor_run"
152            }
153        }
154    }
155    {
156        // Second client.
157        ident "kit_snk.childif"
158        param
159        {
160            extcfg_actor "cfg"
161            extcfg_entry_switch "client.enabled"
162            then_child_ident "kit_base.extern"
163            then_child_param
164            {
165                active 1
166                name "client_sec_extern"
167                deleg_name "client_sec"
168                res ""
169            }
170        }
171    }
172}
Note: See TracBrowser for help on using the repository browser.