source: GTP/trunk/App/Demos/Geom/Shark3D/clod_head_demo_win32/src/res/universe/actor/universe.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// Universe definition.
15// The universe contains the game state.
16
17actor_ident "kit_base.capsule"
18actor_param
19{
20    active 1
21    scope "universe"
22    local_name "capsule"
23    deleg_target "dispatch_export"
24    child_ident "kit_base.group"
25    child_param
26    {
27        active 1
28        child_array
29        {
30            ident "kit_base.dispatch"
31            param
32            {
33                name "dispatch_export"
34                entry_array
35                {
36                    cmds "produce_player"
37                    targets "player_netproducer"
38                    newcmd "produce"
39                }
40                {
41                    cmds "net_traverse"
42                    targets
43                        "setting_serroot"
44                }
45                {
46                    cmds "net_traverse"
47                    targets
48                        "player_netproducer"
49                        "player_netappear"
50                    newcmd "traverse"
51                }
52            }
53        }
54        {
55            // Dispatcher handling messages from the universe,
56            // which contains the game state.
57            ident "kit_base.dispatch"
58            param
59            {
60                name "dispatch_serialize"
61                entry_array
62                {
63                    cmds "store_pre" "store_post" "load_post"
64                    targets "player_set"
65                }
66                {
67                    // Handle every command to avoid error:
68                    cmds "delete_pre" "delete_post"
69                        "store_pre" "store_post"
70                        "load_pre" "load_post"
71                    targets
72                }
73            }
74        }
75        {
76            ident "kit_base.dispatch"
77            param
78            {
79                name "dispatch_setting"
80                entry_array
81                {
82                    cmds
83                        "get_basesuppl"
84                        "ignore_frmtime"
85                        "cfg_access_int_info"
86                        "cfg_access_float_info"
87                        "cfg_access_str_info"
88                        "cfg_access_chunk_info"
89                        "universe_cfg_access_int_info"
90                        "universe_cfg_access_float_info"
91                        "universe_cfg_access_str_info"
92                        "universe_cfg_access_chunk_info"
93                    targets "^dispatch_universe"
94                }
95                {
96                    cmds
97                        "notice_level_load_pre"
98                        "notice_level_load_post"
99                    targets "player_set"
100                }
101            }
102        }
103        {
104            // Define a serialization actor.
105            // This actor can store and load its child into and from a file.
106            // Important! This actor defines a local namespace.
107            // It is not possible to access actors outside this namespace.
108            // Instead, you can send commands to the "outside" actor.
109            ident "kit_base.serroot"
110            param
111            {
112                active 1
113                // Scope of the local namespace.
114                scope "setting"
115                // Actor name from outside.
116                export_name "setting"
117                // Name to delegate commands inside the universe to.
118                export_deleg_name "setting_serroot"
119                // Name to send commands for outside the universe to.
120                deleg_target "dispatch_export"
121                // Target to send commands outside the universe to.
122                local_outside_name "outside"
123                //
124                outside_target "dispatch_setting"
125                // Objects outside the universe referenced from inside,
126                // fetched from the outside actor:
127                known_cmds "get_basesuppl"
128                // Header identifier for the state files.
129                ident "std"
130                // Notification commands about loading and saving.
131                notify_target "dispatch_serialize"
132                notify_pre_delete_cmd "delete_pre"
133                notify_post_delete_cmd "delete_post"
134                notify_pre_store_cmd "store_pre"
135                notify_post_store_cmd "store_post"
136                notify_pre_load_cmd "load_pre"
137                notify_post_load_cmd "load_post"
138                // The level root has an own namespace:
139                child_ident "kit_base.extern"
140                child_param
141                {
142                    active 1
143                    res "universe/actor/setting.s3d_actor_run"
144                }
145            }
146        }
147        {
148            // External file describing the structure of each player:
149            ident "kit_base.extern"
150            param
151            {
152                active 1
153                res "universe/actor/universeplayer.s3d_actor_run"
154            }
155        }
156        {
157            ident "kit_engbase.netproducer"
158            param
159            {
160                name "player_netproducer"
161                produce_target "player_rawproducer"
162                produce_cmd "produce"
163                net_traverse_cmd "net_traverse"
164                created_local_cmd "created_local"
165                created_net_cmd "created_net"
166            }
167        }
168        {
169            ident "kit_engbase.netappear"
170            param
171            {
172                name "player_netappear"
173                appear_target "player_set"
174                appear_cmd "net_appear"
175            }
176        }
177    }
178}
Note: See TracBrowser for help on using the repository browser.