/////////////////////////////////////////////////////////////////////////////// // // ## ###### // ###### ### // ## ############### Shark 3D Engine (www.shark3d.com) // ########## # # # // ######## Copyright (c) 1996-2006 Spinor GmbH. // ######### # # # All rights reserved. // ## ########## // ## // /////////////////////////////////////////////////////////////////////////////// // Definition of the input and output. // The client root actor is a capsule, defining an own local namespace. actor_ident "kit_base.capsule" actor_param { // Delegate the action calls to all children: active 1 // Scope name. Used in error messages. scope "io" // Name of the capsule actor within its own namespace. // Actors within the capsule can access the capsule // actor itself by this name. local_name "capsule" // Delegate commands from outside to the correct dispatcher. deleg_target "dispatch_export" // The capsule actor contains a group of actors: child_ident "kit_base.group" child_param { // Delegate action calls to the children. active 1 child_array { // Dispatcher for commands from outside the client capsule. ident "kit_base.dispatch" param { name "dispatch_export" entry_array { cmds "set_sndmgr_level" "set_state_world" "set_state_sky" targets "snd" } { // Assign a 3D state image. cmds "set_camera_transf" targets "extratransf" newcmd "set_transf" } { // Commands for gfx: cmds "set_gfxmgr_level" "set_state_world" "set_state_sky" "set_sim_world" "set_noise_world" "set_sensorstate_world" "set_cursor_x" "set_cursor_y" "move_cursor_x" "move_cursor_y" "toggle_showgfxbound" "toggle_showgfxmesh" "toggle_showgfxwire" "toggle_showgfxocclmesh" "toggle_showgfxocclwire" "toggle_showphysbound" "toggle_showphysgeo" "toggle_showphyscontact" "toggle_shownoise" "toggle_showsensorgeo" "toggle_showsensorbound" "store_screenshot" "reset_msg" "toggle_frmtime" "toggle_stat" "reset_stat" "toggle_fullscreen" "set_playerbody" targets "gfx" } { cmds "toggle_catch_mouse" targets "toggle_catch_mouse" newcmd "perform" } // Update output: { // Render the gfxports: cmds "perform_output" targets "gfx" newcmd "paint" } { // Update snd: cmds "perform_output" targets "snd" newcmd "update" } { // Update snd: cmds "suspend_output" targets "snd" newcmd "suspend" } // Update input: { cmds "perform_input" targets "input" newcmd "update" } } } { // Dispatcher for commands from outside the client capsule. ident "kit_base.dispatch" param { name "dispatch" entry_array { // Assign a 3D state image. cmds "set_camera_efftransf" targets "gfx" "snd" } { cmds "input_dev_found" targets "inputcfg" newcmd "configure_dev" } { cmds "input_dev_lost" targets } } } { ident "kit_engbase.extratransf" param { name "extratransf" transf_target "dispatch" transf_cmd "set_camera_efftransf" extcfg_actor "^^cfg" extcfg_entry_extratransf "client.extratransf" } } { // Create the context object. // The context is the glue managing input and output. // Other IO-actors like input or gfx refer this context actor: ident "kit_io.ctx" param { name "ctx" active 1 src_actor "^^root" src_cmd "get_ctx" extcfg_actor "^^cfg" extcfg_entry_param "context" given_array { item "^^env" given_ident "env" } } } { // Include the graphics output definitions. ident "kit_base.extern" param { // Delegate action calls to the child: deleg_name "gfx" res "client/actor/gfx.s3d_actor_run" watch_target "^io_extern" watch_cmd "load_current" active 1 } } { ident "kit_base.extern" param { // Delegate action calls to the child: deleg_name "snd" res "client/actor/snd.s3d_actor_run" watch_target "^io_extern" watch_cmd "load_current" active 1 } } { // Input actor. ident "kit_io.input" param { name "input" ctx "ctx" extcfg_actor "^^cfg" extcfg_entry "input.mgr" found_target "dispatch" found_cmd "input_dev_found" lost_target "dispatch" lost_cmd "input_dev_lost" char_target "^dispatch_input" char_cmd "handle_char" given_array { item "^^env" given_ident "env" } { item "ctx" given_ident "ctx" } } } { // Simple default input configuration. // This actor sends input configuration commands // to the input actor. ident "kit_io.inputcfg" param { name "inputcfg" input "input" // The input actor to cfgurate. target "^dispatch_input" // Target of input commands. extcfg_actor "^^cfg" extcfg_entry_mapping "input.mapping" } } { ident "kit_base.paramstr" param { name "toggle_catch_mouse" target "input" cmd "userfunc_all" param "toggle_catch_mouse" } } } }