From e03ad4cc6b19de05194ef5abec9194f6ef5b6a50 Mon Sep 17 00:00:00 2001 From: "n.savitchev" Date: Wed, 6 Nov 2024 18:15:41 +0300 Subject: [PATCH] updated from internal repo on 2024/11/06, rev 3d88ac71b14c53f13993848988e2531e13355879 --- DagorEngine.rev.txt | 2 +- .../assets/all-about-blk/application_blk.md | 44 +- .../assets/lighting/flickering_lights.md | 2 +- _docs/source/assets/lighting/lights.md | 9 +- .../assets/lighting/lights_creation_guide.md | 6 +- .../daScript/daslib/das_source_formatter.das | 5 + .../daScript/include/daScript/ast/ast.h | 1 + .../include/daScript/ast/ast_expressions.h | 1 + .../include/daScript/simulate/runtime_array.h | 296 ++ .../include/daScript/simulate/runtime_range.h | 137 +- .../include/daScript/simulate/simulate.h | 39 +- .../daScript/simulate/simulate_nodes.h | 152 +- .../daScript/src/ast/ast_parse.cpp | 68 +- .../daScript/src/ast/ast_simulate.cpp | 196 +- .../builtin/module_builtin_ast_serialize.cpp | 3 +- .../src/builtin/module_builtin_rtti.cpp | 1 + .../daScript/src/parser/ds2_lexer.cpp | 1719 +++--- .../daScript/src/parser/ds2_lexer.lpp | 1 + .../daScript/src/parser/ds2_parser.cpp | 4686 ++++++++--------- .../daScript/src/parser/ds2_parser.ypp | 2 +- .../daScript/src/simulate/simulate.cpp | 90 +- .../daScript/src/simulate/simulate_visit.cpp | 11 + .../Detour/Include/detourTileCache.h | 4 + .../ImGuiColorTextEdit/TextEditor.cpp | 2 +- prog/daNetGame/game/gameEvents.h | 2 +- prog/daNetGame/game/riDestrES.cpp.inl | 4 +- prog/daNetGame/main/appProfile.h | 1 + prog/daNetGame/main/appProfileES.cpp.inl | 7 +- prog/daNetGame/main/watchdogES.cpp.inl | 2 +- prog/daNetGame/net/dedicated/matching.cpp | 15 +- prog/daNetGame/net/userid.cpp | 6 +- .../world/frameGraphNodes/gbufferNodes.cpp | 6 +- .../world/frameGraphNodes/lightingNodes.cpp | 1 + .../render/world/private_worldRenderer.h | 7 +- .../daNetGame/render/world/shadowsManager.cpp | 8 + prog/daNetGame/render/world/shadowsManager.h | 2 + .../world/shadowsManagerES.cpp.gen.es.cpp | 31 + .../render/world/shadowsManagerES.cpp.inl | 15 +- prog/daNetGame/render/world/worldRenderer.cpp | 29 +- prog/daNetGame/render/world/wrDispatcher.h | 1 + prog/daNetGame/scripts/stubs/gameevents | 4 +- prog/daNetGame/shaders/_build/raytracing.blk | 1 + .../shaders/_build/shaders_tools11.blk | 1 + prog/daNetGame/shaders/contact_shadows.dshl | 1 + .../deferred_shadow_classify_tiles.dshl | 5 +- .../shaders/draw_indirect_buffer_layout.dshl | 34 + prog/daNetGame/shaders/film_grain_inc.dshl | 4 + prog/daNetGame/shaders/heightmap.dshl | 6 +- prog/daNetGame/shaders/land_aces.dshl | 6 +- prog/daNetGame/shaders/postfx.dshl | 16 +- prog/daNetGame/shaders/rendinst_clipmap.dshl | 4 +- .../shaders/rendinst_simple_inc.dshl | 10 +- .../shaders/rendinst_tree_perlin_layered.dshl | 10 +- prog/daNetGame/shaders/shader_global.dshl | 2 + prog/daNetGame/shaders/water_3d_ssr.dshl | 31 + .../private/shaders/blood_puddles.dshl | 6 +- .../animation/animation_clip.h | 4 +- .../animation/animation_sampling.cpp | 12 +- .../animation/inertial_blending.cpp | 34 +- .../animation/load_animation_data_base.cpp | 65 +- .../animation/motion_matching_controller.cpp | 27 +- .../es/debugAnimationES.cpp.inl | 12 +- .../es/playAnimationES.cpp.gen.es.cpp | 4 +- .../es/playAnimationES.cpp.inl | 4 +- .../environment_sounds/es/spline_sound.das | 2 +- prog/dagorInclude/anim/dag_animBlend.h | 19 +- prog/dagorInclude/anim/dag_animChannels.h | 201 +- prog/dagorInclude/anim/dag_animDecl.h | 4 - prog/dagorInclude/anim/dag_animKeyInterp.h | 628 +++ .../dagorInclude/anim/dag_animPostBlendCtrl.h | 3 +- prog/dagorInclude/anim/dag_simpleNodeAnim.h | 8 +- prog/dagorInclude/math/dag_lsbVisitor.h | 1 + prog/dagorInclude/shaders/dag_shaders.h | 3 + prog/engine/anim/animChannels.cpp | 113 +- prog/engine/anim/animGraph.cpp | 287 +- prog/engine/anim/animGraphDbg.cpp | 6 +- prog/engine/anim/animPostBlendCtrl.cpp | 38 +- prog/engine/anim/simpleNodeAnim.cpp | 49 +- prog/engine/animChar/animate2ndPass.cpp | 5 +- prog/engine/drv/drv3d_DX11/buffers.cpp | 12 - prog/engine/drv/drv3d_DX11/genericBuffer.cpp | 4 +- prog/engine/drv/drv3d_DX11/init.cpp | 6 +- prog/engine/drv/drv3d_DX11/states.cpp | 1 - prog/engine/drv/drv3d_DX11/texture.cpp | 41 - .../engine/drv/drv3d_DX12/debug/break_point.h | 2 +- .../debug/call_stack_return_address.h | 4 +- .../drv/drv3d_DX12/debug/command_list_trace.h | 12 +- .../debug/device_context_state_null.h | 10 +- .../debug/device_context_state_pc.h | 12 +- .../drv/drv3d_DX12/debug/device_state_pc.cpp | 9 +- .../drv/drv3d_DX12/debug/device_state_pc.h | 12 +- .../drv/drv3d_DX12/debug/global_state.cpp | 1 + .../drv/drv3d_DX12/debug/gpu_capture.cpp | 1 + .../drv/drv3d_DX12/debug/gpu_postmortem.h | 12 +- .../debug/gpu_postmortem_ags_trace.h | 10 +- .../debug/gpu_postmortem_dagor_trace.cpp | 10 +- .../debug/gpu_postmortem_dagor_trace.h | 10 +- .../debug/gpu_postmortem_microsoft_dred.cpp | 9 +- .../debug/gpu_postmortem_microsoft_dred.h | 12 +- .../debug/gpu_postmortem_null_trace.h | 10 +- .../debug/gpu_postmortem_nvidia_aftermath.cpp | 11 +- .../debug/gpu_postmortem_nvidia_aftermath.h | 12 +- .../debug/pipeline_resource_reporter.cpp | 1 + prog/engine/drv/drv3d_DX12/descriptor_heap.h | 4 +- prog/engine/drv/drv3d_DX12/device_context.cpp | 3 +- prog/engine/drv/drv3d_DX12/shader.h | 3 + prog/engine/drv/drv3d_DX12/swapchain.h | 2 +- .../drv/drv3d_commonCode/amdFsr3Helpers.h | 1 + .../drv/drv3d_commonCode/free_list_utils.h | 3 +- .../genericSbufferImplementation.h | 11 +- prog/engine/drv/drv3d_vulkan/bindless.h | 2 +- prog/engine/drv/drv3d_vulkan/buffer.h | 2 +- .../engine/drv/drv3d_vulkan/driver_config.cpp | 4 +- .../drv/drv3d_vulkan/execution_sync.cpp | 5 +- prog/engine/drv/drv3d_vulkan/fence_manager.h | 11 +- prog/engine/drv/drv3d_vulkan/format_store.h | 2 +- .../drv/drv3d_vulkan/image_view_state.h | 2 +- .../drv/drv3d_vulkan/physical_device_set.h | 24 + .../drv/drv3d_vulkan/util/value_range.h | 190 - prog/engine/drv/drv3d_vulkan/vulkan_device.h | 12 + prog/engine/lib3d/texPackMgr2.cpp | 69 +- prog/engine/osApiWrappers/syncFileIo.cpp | 2 +- prog/engine/shaders/shAssert.cpp | 4 +- prog/engine/shaders/shadersCon.cpp | 15 +- prog/gameLibs/bvh/bvh.cpp | 61 +- prog/gameLibs/bvh/shaders/bvh.dshl | 20 +- .../daSkies2/shaders/brunetonSky.dshl | 4 +- .../dasModules/common/scriptsLoader.cpp | 7 +- prog/gameLibs/ecs/gameres/gameResES.cpp.inl | 10 +- .../ecs/rendInst/rendinstES.cpp.gen.es.cpp | 33 +- prog/gameLibs/ecs/rendInst/rendinstES.cpp.inl | 23 +- prog/gameLibs/ecs/scripts/das/das_es.cpp | 21 +- prog/gameLibs/fftWater/waterRender.cpp | 2 +- prog/gameLibs/folders/jamfile | 10 +- .../phys/destrRender/destructablesRender.cpp | 3 +- .../gamePhys/phys/destructableObject.cpp | 113 +- prog/gameLibs/gamePhys/phys/rendinstDestr.cpp | 65 +- .../gpuObjects/volumePlacerES.cpp.gen.es.cpp | 23 +- .../gpuObjects/volumePlacerES.cpp.inl | 32 +- .../pathFinder/tileCache/tileCache.cpp | 2 +- prog/gameLibs/publicInclude/bvh/bvh.h | 52 +- .../gamePhys/phys/destructableObject.h | 21 +- .../gamePhys/phys/destructableRendObject.h | 2 +- .../gamePhys/phys/rendinstDestr.h | 5 +- .../publicInclude/rendInst/rendInstDesc.h | 1 - .../rendInst/rendInstExtraAccess.h | 3 +- .../publicInclude/render/debugGbuffer.h | 4 +- .../publicInclude/render/deferredRenderer.h | 1 + prog/gameLibs/publicInclude/render/texDebug.h | 1 + prog/gameLibs/rendInst/rendInstDesc.cpp | 8 - .../gameLibs/rendInst/rendInstExtraAccess.cpp | 11 +- prog/gameLibs/rendInst/rendInstGenDebris.cpp | 9 +- prog/gameLibs/rendInst/rendInstGenExtra.cpp | 8 +- prog/gameLibs/rendInst/riGen/riExtraPool.h | 3 +- prog/gameLibs/render/clusteredLights.cpp | 2 +- prog/gameLibs/render/debugGbuffer.cpp | 16 +- prog/gameLibs/render/deferredRenderer.cpp | 8 +- prog/gameLibs/render/denoiser/denoiser.cpp | 4 + .../denoiser/shaders/denoiser_prepare.dshl | 2 +- .../objectMotionBlur/objectMotionBlur.cpp | 4 +- prog/gameLibs/render/rtao/shaders/rtao.dshl | 8 +- .../render/rtao/shaders/rtao_use.dshl | 15 +- prog/gameLibs/render/rtr/shaders/rtr.dshl | 30 +- prog/gameLibs/render/rtr/shaders/rtr_use.dshl | 23 +- prog/gameLibs/render/rtsm/shaders/rtsm.dshl | 10 +- .../render/rtsm/shaders/rtsm_use.dshl | 2 +- prog/gameLibs/render/shaders/gtao.dshl | 6 +- .../render/shaders/pn_triangulation.dshl | 105 +- prog/gameLibs/render/shaders/puddles_inc.dshl | 10 + prog/gameLibs/render/shaders/ssr_common.hlsl | 51 +- prog/gameLibs/render/shaders/ssr_compute.dshl | 19 +- .../render/shaders/water_ripples.dshl | 17 +- prog/gameLibs/render/shaders/wetness_inc.dshl | 2 +- prog/gameLibs/render/texDebug/texDebug.cpp | 29 +- .../render/texDebug/texDebug_stub.cpp | 1 + .../commonShaders/contact_shadows.dshl | 1 + prog/scripts/sq/std/string.nut | 4 +- .../localization_tools/debug_run_wild.bat | 3 + .../localization_tools/langs_validation.nut | 5 +- prog/tools/AssetViewer/A2d/a2d.cpp | 34 +- prog/tools/AssetViewer/A2d/a2d.h | 4 - prog/tools/AssetViewer/animTree/animTree.cpp | 2 +- .../animTree/controllers/ctrlChildsDialog.cpp | 166 +- .../animTree/controllers/ctrlChildsDialog.h | 18 +- .../animTree/controllers/linearPoly.cpp | 5 + .../animTree/controllers/linearPoly.h | 2 + .../animTree/controllers/paramSwitch.cpp | 6 + .../animTree/controllers/paramSwitch.h | 1 + .../animTree/controllers/randomSwitch.cpp | 12 + .../animTree/controllers/randomSwitch.h | 2 + prog/tools/ShaderCompiler2/_colorer4/dshl.hrc | 1 + prog/tools/ShaderCompiler2/assemblyShader.cpp | 2 + prog/tools/ShaderCompiler2/shlex.dlp | 2 + prog/tools/ShaderCompiler2/shsyn.whl | 3 +- .../libTools/assetMgrHlp/texConvCache.cpp | 2 +- .../assetsGui/av_assetTypeFilterControl.h | 68 + .../libTools/assetsGui/av_favoritesTab.h | 43 +- .../libTools/assetsGui/av_favoritesTree.h | 17 +- .../libTools/assetsGui/av_recentlyUsedTab.h | 78 +- .../tools/libTools/assetsGui/av_selObjDlg.cpp | 74 +- prog/tools/libTools/propPanel/imguiHelper.cpp | 36 + prog/tools/libTools/propPanel/propPanel.cpp | 7 +- .../tools/sceneTools/assetExp/assetExport.cpp | 2 +- prog/tools/sceneTools/assetExp/resExport.cpp | 2 +- .../sharedInclude/assetsGui/av_selObjDlg.h | 10 +- prog/tools/sharedInclude/assetsGui/av_view.h | 1 + .../sharedInclude/propPanel/imguiHelper.h | 12 +- .../prog/shaders/shaders_metal.blk | 3 +- 208 files changed, 6772 insertions(+), 4657 deletions(-) create mode 100644 prog/daNetGame/shaders/draw_indirect_buffer_layout.dshl delete mode 100644 prog/engine/drv/drv3d_vulkan/util/value_range.h create mode 100644 prog/tools/libTools/assetsGui/av_assetTypeFilterControl.h diff --git a/DagorEngine.rev.txt b/DagorEngine.rev.txt index 9d1f025de..b391297f2 100644 --- a/DagorEngine.rev.txt +++ b/DagorEngine.rev.txt @@ -1 +1 @@ -fb616496d5090185ad0a3bf434e410a55f015cf1 +3d88ac71b14c53f13993848988e2531e13355879 diff --git a/_docs/source/assets/all-about-blk/application_blk.md b/_docs/source/assets/all-about-blk/application_blk.md index 68fcacc7f..2ae0d431b 100644 --- a/_docs/source/assets/all-about-blk/application_blk.md +++ b/_docs/source/assets/all-about-blk/application_blk.md @@ -8,13 +8,13 @@ multiple blocks, each dedicated to specific functions and settings. Below is a description of each block within the `application.blk` file: -## **Root Level Parameters** +## Root Level Parameters - **collision**: Specifies the collision detection system to be used. - **shaders**: Defines the path to the shaders. - **useDynrend**: A boolean flag to enable or disable dynamic rendering. -## **dynamicDeferred{} Block** +## dynamicDeferred{} Block This block configures settings for the dynamic deferred rendering system, including supported options, default rendering options, debug display options, @@ -69,7 +69,7 @@ and various rendering formats. - **hdrMode, postfx, vsmAllowed, grassTranslucency**: Configures high dynamic range mode, post-processing effects, VSM allowance, and grass translucency. -## **clipmap{} Block** +## clipmap{} Block Configures settings for clipmap rendering, which is typically used for large terrains. @@ -82,13 +82,13 @@ terrains. - **useUAVFeedback, useToroidalHeightmap**: Enables UAV feedback and toroidal heightmap usage. -## **hdr_mode{} Block** +## hdr_mode{} Block Specifies the high dynamic range mode settings. - **ps3, real**: Enables specific HDR modes. -## **SDK{} Block** +## SDK{} Block Defines settings related to the SDK (Software Development Kit). @@ -102,7 +102,7 @@ Defines settings related to the SDK (Software Development Kit). or asset that is included in the level export process. - **tag**: Defines a certain tag. -## **game{} Block** +## game{} Block Contains game-specific settings and paths. @@ -113,14 +113,14 @@ Contains game-specific settings and paths. - **texStreamingFile, texStreamingBlock, navmesh_layers**: Paths and settings related to texture streaming and navigation mesh layers. -## **levelsBlkPrefix{} Block** +## levelsBlkPrefix{} Block Configures prefix settings for level blocks. - **useExportBinPath**: Enables the use of export binary path. - **try**: Path to try for level export. -## **assets{} Block** +## assets{} Block Defines the parameters and settings related to the handling of game assets, including their types, base paths, export settings, impostor rendering @@ -364,7 +364,7 @@ parameters, and build configurations. - **writeDdsxTexPackVer**: Sets the version for writing DDS texture packs. - **writeGameResPackVer**: Sets the version for writing game resource packs. -## **level_metrics{} Block** +## level_metrics{} Block Defines metrics for levels and plugins. @@ -394,25 +394,25 @@ Defines metrics for levels and plugins. - **z_ratio_max**: Maximum ratio of the distance between far and near clipping planes to the near clipping plane. -## **genObjTypes{} Block** +## genObjTypes{} Block Lists general object types. - **type**: Various object types used by the tools. -## **dagored_visibility_tags{} Block** +## dagored_visibility_tags{} Block Configures visibility tags for different plugins. - **plugin{} Block**: Names of plugins and their associated tags for visibility. -## **dagored_disabled_plugins{} Block** +## dagored_disabled_plugins{} Block Lists plugins that are disabled. - **disable**: Names of plugins that are disabled in the editor. -## **daEditorExportOrder{} Block** +## daEditorExportOrder{} Block Defines the order in which various game elements and assets are exported by the editor. This ensures that dependencies are resolved and that assets are @@ -420,7 +420,7 @@ processed in the correct sequence. - **plugin**: Specifies the plugins used by the editor in a specific sequence. -## **lightmap{} Block** +## lightmap{} Block Configures settings for generating lightmaps, which are precomputed lighting information used for static objects. @@ -434,7 +434,7 @@ information used for static objects. the resolution of the lightmaps used. - **size**: Size of the lightmap texture. -## **projectDefaults{} Block** +## projectDefaults{} Block Defines default project-wide settings. @@ -484,7 +484,7 @@ Defines default project-wide settings. - **preferZSTD**: Enables a preference for ZSTD compression algorithm. - **preferZLIB**: Enables a preference for ZLIB compression algorithm. -## **shader_glob_vars_scheme{} Block** +## shader_glob_vars_scheme{} Block Global shader variables configuration. @@ -495,7 +495,7 @@ Global shader variables configuration. Viewer*. - **show_no_aa**: Controls the display of assets without anti-aliasing. -## **heightMap{} Block** +## heightMap{} Block Configures settings for heightmaps, which define terrain elevation and other surface details. @@ -526,20 +526,20 @@ surface details. - **gamma**: The gamma correction value. - **iOS{} Block**, **and{} Block**: Platform-specific format settings. -## **additional_platforms{} Block** +## additional_platforms{} Block Lists additional platforms for which the tools are configured. - **platform**: Specifies the platform. -## **parameters{} Block** +## parameters{} Block Defines general parameters for the tools. - **maxTraceDistance**: Maximum distance for tracing operations, such as ray casting. -## **AssetLight{} Block** +## AssetLight{} Block Configures lighting assets, including dynamic cube textures and level of detail (LOD) settings. @@ -548,7 +548,7 @@ Configures lighting assets, including dynamic cube textures and level of detail - **blur_lods**: Enables LOD blurring. - **bound_with_camera**: Enables binding the lighting to the camera. -## **defProjectLocal{} Block** +## defProjectLocal{} Block Defines local project settings, particularly camera control settings for different types of camera modes. @@ -566,7 +566,7 @@ different types of camera modes. - **control_multiplier**: The multiplier for camera control, offering more fine-grained control compared to the `freeCamera` settings. -## **animCharView{} Block** +## animCharView{} Block Defines variables and first-person shooter (FPS) views for character animation. diff --git a/_docs/source/assets/lighting/flickering_lights.md b/_docs/source/assets/lighting/flickering_lights.md index e4df739b7..a38ab8e28 100644 --- a/_docs/source/assets/lighting/flickering_lights.md +++ b/_docs/source/assets/lighting/flickering_lights.md @@ -445,7 +445,7 @@ required. ### GameObjects -[Game Objects](../../dagor-tools/gameobj/gameobjects.md) are essentially +[*Game Objects*](../about-assets/gameobjects/gameobjects.md) are essentially placeholders, containers, or dummies with the same name as the related template. They are used to position objects in the environment or to add them to template composites. GameObjects provide the matrix information needed to trigger effects diff --git a/_docs/source/assets/lighting/lights.md b/_docs/source/assets/lighting/lights.md index 100590ad7..d18e07b51 100644 --- a/_docs/source/assets/lighting/lights.md +++ b/_docs/source/assets/lighting/lights.md @@ -185,9 +185,12 @@ negatively impact gameplay. Adjust emission to be as subtle as possible. To add a light source to a composite object, create a gameObject for it and place it in `*/develop/assets/common/gameRes/gameObjects` directory. Name the -file: `template_name.gameObj.blk`. For more information on what a -[gameObj](../../dagor-tools/gameobj/gameobjects.md) is, refer to the relevant -documentation. +file: `template_name.gameObj.blk`. + +```{seealso} +For more information, see +[gameObjects](../about-assets/gameobjects/gameobjects.md). +``` If the light source is used with a dynamic model (which cannot be drawn in *daEditor*), you can add the following line to the `gameObj` to display the diff --git a/_docs/source/assets/lighting/lights_creation_guide.md b/_docs/source/assets/lighting/lights_creation_guide.md index 47474782f..4562edbb5 100644 --- a/_docs/source/assets/lighting/lights_creation_guide.md +++ b/_docs/source/assets/lighting/lights_creation_guide.md @@ -103,8 +103,10 @@ article](../shaders/dng-shaders/rendinst_emissive.md). ## GameObj -For more information on gameObj, see the -[GameObj](../../dagor-tools/gameobj/gameobjects.md) article. +```{seealso} +For more information, see +[gameObjects](../about-assets/gameobjects/gameobjects.md). +``` Create a gameObj for both the light source and the dynamic visual model. In *daNetGame*-based projects, for example, they are located here: diff --git a/prog/1stPartyLibs/daScript/daslib/das_source_formatter.das b/prog/1stPartyLibs/daScript/daslib/das_source_formatter.das index 4c9297b32..f1d2b1b77 100644 --- a/prog/1stPartyLibs/daScript/daslib/das_source_formatter.das +++ b/prog/1stPartyLibs/daScript/daslib/das_source_formatter.das @@ -702,6 +702,11 @@ def need_spaces_around(ctx: FormatterCtx; index: int): bool return false if t.isInType && (t.str == ":" || t.str == "<" || t.str == ">" || t.str == ">>" || t.str == ">>>" || empty(t.str)) return false + if index < length(ctx.tokens) - 1 + assume next = ctx.tokens[index + 1] + if t.str == "@" && next.tokenType == TokenType KEYWORD_OR_IDENTIFIER + return false + return true diff --git a/prog/1stPartyLibs/daScript/include/daScript/ast/ast.h b/prog/1stPartyLibs/daScript/include/daScript/ast/ast.h index 6da6776a4..bec3a30aa 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/ast/ast.h +++ b/prog/1stPartyLibs/daScript/include/daScript/ast/ast.h @@ -1394,6 +1394,7 @@ namespace das bool completion = false; // this code is being compiled for 'completion' mode bool export_all = false; // when user compiles, export all (public?) functions bool serialize_main_module = true; // if false, then we recompile main module each time + bool keep_alive = false; // produce keep-alive noodes // error reporting int32_t always_report_candidates_threshold = 6; // always report candidates if there are less than this number // infer passes diff --git a/prog/1stPartyLibs/daScript/include/daScript/ast/ast_expressions.h b/prog/1stPartyLibs/daScript/include/daScript/ast/ast_expressions.h index 633207f36..631718d70 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/ast/ast_expressions.h +++ b/prog/1stPartyLibs/daScript/include/daScript/ast/ast_expressions.h @@ -381,6 +381,7 @@ namespace das virtual ExpressionPtr clone( const ExpressionPtr & expr = nullptr ) const override; void autoDereference(); virtual SimNode * simulate (Context &) const override { return nullptr; } + SimNode * keepAlive ( Context &, SimNode * result ) const; virtual ExpressionPtr visit(Visitor & vis) override; virtual string describe() const; virtual bool rtti_isCallLikeExpr() const override { return true; } diff --git a/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_array.h b/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_array.h index 2caad9708..dac3be575 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_array.h +++ b/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_array.h @@ -304,6 +304,166 @@ namespace das } }; + ////////////////////////////// + // FOR GOOD ARRAY (KEEP ALIVE) + ////////////////////////////// + +#if DAS_ENABLE_KEEPALIVE + + template + struct SimNodeKeepAlive_ForGoodArray : public SimNode_ForGoodArray { + SimNodeKeepAlive_ForGoodArray ( const LineInfo & at ) : SimNode_ForGoodArray(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + Array * __restrict pha[totalCount]; + char * __restrict ph[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + pha[t] = cast::to(this->sources[t]->eval(context)); + array_lock(context, *pha[t], &this->debugInfo); + ph[t] = pha[t]->data; + } + char ** __restrict pi[totalCount]; + int szz = INT_MAX; + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = (char **)(context.stack.sp() + this->stackTop[t]); + szz = das::min(szz, int(pha[t]->size)); + } + SimNode ** __restrict tail = this->list + this->total; + for (int i = 0; i!=szz; ++i) { + for (int t = 0; t != totalCount; ++t) { + *pi[t] = ph[t]; + ph[t] += this->strides[t]; + } + SimNode ** __restrict body = this->list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } + loopend:; + for ( int t=0; t!=totalCount; ++t ) { + array_unlock(context, *pha[t], &this->debugInfo); + } + this->evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template <> + struct SimNodeKeepAlive_ForGoodArray<0> : public SimNode_ForGoodArray<0> { + SimNodeKeepAlive_ForGoodArray ( const LineInfo & at ) : SimNode_ForGoodArray<0>(at) {} + }; + + template <> + struct SimNodeKeepAlive_ForGoodArray<1> : public SimNode_ForGoodArray<1> { + SimNodeKeepAlive_ForGoodArray ( const LineInfo & at ) : SimNode_ForGoodArray<1>(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + Array * __restrict pha; + char * __restrict ph; + pha = cast::to(sources[0]->eval(context)); + array_lock(context, *pha, &this->debugInfo); + ph = pha->data; + char ** __restrict pi; + int szz = int(pha->size); + pi = (char **)(context.stack.sp() + stackTop[0]); + auto stride = strides[0]; + SimNode ** __restrict tail = list + total; + for (int i = 0; i!=szz; ++i) { + *pi = ph; + ph += stride; + SimNode ** __restrict body = list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } + loopend:; + evalFinal(context); + array_unlock(context, *pha, &this->debugInfo); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template + struct SimNodeKeepAlive_ForGoodArray1 : public SimNode_ForGoodArray1 { + SimNodeKeepAlive_ForGoodArray1 ( const LineInfo & at ) : SimNode_ForGoodArray1(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + Array * __restrict pha[totalCount]; + char * __restrict ph[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + pha[t] = cast::to(this->sources[t]->eval(context)); + array_lock(context, *pha[t], &this->debugInfo); + ph[t] = pha[t]->data; + } + char ** __restrict pi[totalCount]; + int szz = INT_MAX; + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = (char **)(context.stack.sp() + this->stackTop[t]); + szz = das::min(szz, int(pha[t]->size)); + } + SimNode * __restrict body = this->list[0]; + for (int i = 0; i!=szz && !context.stopFlags; ++i) { + for (int t = 0; t != totalCount; ++t) { + *pi[t] = ph[t]; + ph[t] += this->strides[t]; + } + body->eval(context); + DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue); + } + loopend:; + this->evalFinal(context); + for ( int t=0; t!=totalCount; ++t ) { + array_unlock(context, *pha[t], &this->debugInfo); + } + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template <> + struct SimNodeKeepAlive_ForGoodArray1<0> : public SimNode_ForGoodArray1<0> { + SimNodeKeepAlive_ForGoodArray1 ( const LineInfo & at ) : SimNode_ForGoodArray1<0>(at) {} + }; + + template <> + struct SimNodeKeepAlive_ForGoodArray1<1> : public SimNode_ForGoodArray1<1> { + SimNodeKeepAlive_ForGoodArray1 ( const LineInfo & at ) : SimNode_ForGoodArray1<1>(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + Array * __restrict pha; + char * __restrict ph; + pha = cast::to(sources[0]->eval(context)); + array_lock(context, *pha, &this->debugInfo); + ph = pha->data; + char ** __restrict pi; + int szz = int(pha->size); + pi = (char **)(context.stack.sp() + stackTop[0]); + auto stride = strides[0]; + SimNode * __restrict body = list[0]; + for (int i = 0; i!=szz && !context.stopFlags; ++i) { + *pi = ph; + ph += stride; + body->eval(context); + DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue); + } + loopend:; + evalFinal(context); + array_unlock(context, *pha, &this->debugInfo); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + +#endif + /////////////////////// // FOR GOOD ARRAY DEBUG /////////////////////// @@ -626,6 +786,142 @@ namespace das } }; +#if DAS_ENABLE_KEEPALIVE + + //////////////////////////// + // FOR FIXED ARRAY KEEPALIVE + //////////////////////////// + + // FOR + template + struct SimNodeKeepAlive_ForFixedArray : SimNode_ForFixedArray { + SimNodeKeepAlive_ForFixedArray ( const LineInfo & at ) : SimNode_ForFixedArray(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * __restrict ph[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + ph[t] = cast::to(this->sources[t]->eval(context)); + } + char ** __restrict pi[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = (char **)(context.stack.sp() + this->stackTop[t]); + } + SimNode ** __restrict tail = this->list + this->total; + for (uint32_t i=0, is=this->size; i!=is; ++i) { + for (int t = 0; t != totalCount; ++t) { + *pi[t] = ph[t]; + ph[t] += this->strides[t]; + } + SimNode ** __restrict body = this->list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template <> + struct SimNodeKeepAlive_ForFixedArray<0> : SimNode_ForFixedArray<0> { + SimNodeKeepAlive_ForFixedArray ( const LineInfo & at ) : SimNode_ForFixedArray<0>(at) {} + }; + + template <> + struct SimNodeKeepAlive_ForFixedArray<1> : SimNode_ForFixedArray<1> { + SimNodeKeepAlive_ForFixedArray ( const LineInfo & at ) : SimNode_ForFixedArray<1>(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * __restrict ph = cast::to(sources[0]->eval(context)); + char ** __restrict pi = (char **)(context.stack.sp() + stackTop[0]); + auto stride = strides[0]; + SimNode ** __restrict tail = list + total; + for (uint32_t i=0, is=size; i!=is; ++i) { + *pi = ph; + ph += stride; + SimNode ** __restrict body = list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } + loopend:; + evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + // FOR + template + struct SimNodeKeepAlive_ForFixedArray1 : SimNode_ForFixedArray1 { + SimNodeKeepAlive_ForFixedArray1 ( const LineInfo & at ) : SimNode_ForFixedArray1(at) {} + virtual SimNode * visit ( SimVisitor & vis ) override { + return this->visitFor(vis, totalCount, "ForFixedArray1"); + } + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * __restrict ph[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + ph[t] = cast::to(this->sources[t]->eval(context)); + } + char ** __restrict pi[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = (char **)(context.stack.sp() + this->stackTop[t]); + } + SimNode * __restrict body = this->list[0]; + for (uint32_t i=0, is=this->size; i!=is && !context.stopFlags; ++i) { + for (int t = 0; t != totalCount; ++t) { + *pi[t] = ph[t]; + ph[t] += this->strides[t]; + } + body->eval(context); + DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue); + } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template <> + struct SimNodeKeepAlive_ForFixedArray1<0> : SimNode_ForFixedArray1<0> { + SimNodeKeepAlive_ForFixedArray1 ( const LineInfo & at ) : SimNode_ForFixedArray1<0>(at) {} + }; + + template <> + struct SimNodeKeepAlive_ForFixedArray1<1> : SimNode_ForFixedArray1<1> { + SimNodeKeepAlive_ForFixedArray1 ( const LineInfo & at ) : SimNode_ForFixedArray1<1>(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * __restrict ph = cast::to(sources[0]->eval(context)); + char ** __restrict pi = (char **)(context.stack.sp() + stackTop[0]); + auto stride = strides[0]; + SimNode * __restrict body = list[0]; + for (uint32_t i=0, is=size; i!=is && !context.stopFlags; ++i) { + *pi = ph; + ph += stride; + body->eval(context); + DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue); + } + loopend:; + evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + +#endif + //////////////////////// // FOR FIXED ARRAY DEBUG //////////////////////// diff --git a/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_range.h b/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_range.h index c75576618..1f9b985a1 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_range.h +++ b/prog/1stPartyLibs/daScript/include/daScript/simulate/runtime_range.h @@ -87,6 +87,42 @@ namespace das DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; }; + ////////////////// + // FOR RANGE KEEPALIVE + ////////////////// + +#if DAS_ENABLE_KEEPALIVE + + template + struct SimNodeKeepAlive_ForRange : SimNode_ForRange { + SimNodeKeepAlive_ForRange ( const LineInfo & at ) + : SimNode_ForRange(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + + template + struct SimNodeKeepAlive_ForRangeNF : SimNode_ForRangeNF { + SimNodeKeepAlive_ForRangeNF ( const LineInfo & at ) + : SimNode_ForRangeNF(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + + template + struct SimNodeKeepAlive_ForRange1 : SimNode_ForRange1 { + SimNodeKeepAlive_ForRange1 ( const LineInfo & at ) + : SimNode_ForRange1(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + + template + struct SimNodeKeepAlive_ForRangeNF1 : SimNode_ForRangeNF1 { + SimNodeKeepAlive_ForRangeNF1 ( const LineInfo & at ) + : SimNode_ForRangeNF1(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + +#endif + ////////////////// // FOR RANGE DEBUG ////////////////// @@ -166,7 +202,6 @@ namespace das *pi = i; for (SimNode ** __restrict body = this->list; body!=tail; ++body) { (*body)->eval(context); - DAS_KEEPALIVE_LOOP(&context); } } } loopend:; @@ -209,7 +244,61 @@ namespace das for (baseType i = r.from; i != r_to; ++i) { *pi = i; pbody->eval(context); + } } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~(EvalFlags::stopForBreak | EvalFlags::stopForContinue); + return v_zero(); + } + + //////////// + // FOR RANGE + //////////// + +#if DAS_ENABLE_KEEPALIVE + + template + vec4f SimNodeKeepAlive_ForRange::eval ( Context & context ) { + using baseType = typename TRange::baseType; + DAS_PROFILE_NODE + vec4f ll = this->sources[0]->eval(context); + TRange r = cast::to(ll); + baseType * pi = (baseType *)(context.stack.sp() + this->stackTop[0]); + baseType r_to = r.to; + if ( r.from >= r_to ) goto loopend; + { SimNode ** __restrict tail = this->list + this->total; + for (baseType i = r.from; i != r_to; ++i) { + *pi = i; + SimNode ** __restrict body = this->list; + loopbegin:; DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + + template + vec4f SimNodeKeepAlive_ForRangeNF::eval ( Context & context ) { + using baseType = typename TRange::baseType; + DAS_PROFILE_NODE + vec4f ll = this->sources[0]->eval(context); + TRange r = cast::to(ll); + baseType * pi = (baseType *)(context.stack.sp() + this->stackTop[0]); + baseType r_to = r.to; + if ( r.from >= r_to ) goto loopend; + { SimNode ** __restrict tail = this->list + this->total; + for (baseType i = r.from; i != r_to; ++i) { + DAS_KEEPALIVE_LOOP(&context); + *pi = i; + for (SimNode ** __restrict body = this->list; body!=tail; ++body) { + (*body)->eval(context); + } } } loopend:; this->evalFinal(context); @@ -217,6 +306,50 @@ namespace das return v_zero(); } + template + vec4f SimNodeKeepAlive_ForRange1::eval ( Context & context ) { + using baseType = typename TRange::baseType; + DAS_PROFILE_NODE + vec4f ll = this->sources[0]->eval(context); + TRange r = cast::to(ll); + baseType * pi = (baseType *)(context.stack.sp() + this->stackTop[0]); + baseType r_to = r.to; + if ( r.from >= r_to ) goto loopend; + { SimNode * __restrict pbody = this->list[0]; + for (baseType i = r.from; i != r_to; ++i) { + *pi = i; + pbody->eval(context); + DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(continue); + } } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~(EvalFlags::stopForBreak | EvalFlags::stopForContinue); + return v_zero(); + } + + template + vec4f SimNodeKeepAlive_ForRangeNF1::eval ( Context & context ) { + using baseType = typename TRange::baseType; + DAS_PROFILE_NODE + vec4f ll = this->sources[0]->eval(context); + TRange r = cast::to(ll); + baseType * pi = (baseType *)(context.stack.sp() + this->stackTop[0]); + baseType r_to = r.to; + if ( r.from >= r_to ) goto loopend; + { SimNode * __restrict pbody = this->list[0]; + for (baseType i = r.from; i != r_to; ++i) { + *pi = i; + pbody->eval(context); + DAS_KEEPALIVE_LOOP(&context); + } } + loopend:; + this->evalFinal(context); + context.stopFlags &= ~(EvalFlags::stopForBreak | EvalFlags::stopForContinue); + return v_zero(); + } + +#endif + #if DAS_DEBUGGER ////////////////// @@ -264,7 +397,6 @@ namespace das for (SimNode ** __restrict body = this->list; body!=tail; ++body) { DAS_SINGLE_STEP(context,(*body)->debugInfo,true); (*body)->eval(context); - DAS_KEEPALIVE_LOOP(&context); } } } loopend:; @@ -311,7 +443,6 @@ namespace das SimNode * pbody = this->list[0]; // note: instruments DAS_SINGLE_STEP(context,pbody->debugInfo,true); pbody->eval(context); - DAS_KEEPALIVE_LOOP(&context); } } loopend:; this->evalFinal(context); diff --git a/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate.h b/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate.h index 4f90017ae..44441af80 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate.h +++ b/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate.h @@ -122,6 +122,8 @@ namespace das virtual bool rtti_node_isInstrument() const { return false; } virtual bool rtti_node_isInstrumentFunction() const { return false; } virtual bool rtti_node_isJit() const { return false; } + virtual bool rtti_node_isKeepAlive() const { return false; } + virtual bool rtti_node_isCallBase() const { return false; } protected: virtual ~SimNode() {} }; @@ -168,8 +170,7 @@ namespace das }; #define DAS_PROCESS_LOOP_FLAGS(howtocontinue) \ - { DAS_KEEPALIVE_LOOP(&context); \ - if (context.stopFlags) { \ + { if (context.stopFlags) { \ if (context.stopFlags & EvalFlags::stopForContinue) { \ context.stopFlags &= ~EvalFlags::stopForContinue; \ howtocontinue; \ @@ -183,6 +184,15 @@ namespace das } } #define DAS_PROCESS_LOOP1_FLAGS(howtocontinue) \ + { if (context.stopFlags) { \ + if (context.stopFlags & EvalFlags::stopForContinue) { \ + context.stopFlags &= ~EvalFlags::stopForContinue; \ + howtocontinue; \ + } \ + goto loopend; \ + } } + +#define DAS_PROCESS_KEEPALIVE_LOOP1_FLAGS(howtocontinue) \ { DAS_KEEPALIVE_LOOP(&context); \ if (context.stopFlags) { \ if (context.stopFlags & EvalFlags::stopForContinue) { \ @@ -974,9 +984,34 @@ __forceinline void profileNode ( SimNode * node ) { struct EvalTT { static __forceinline char * eval ( Context & context, SimNode * node ) { return node->evalPtr(context); }}; + // any kind of keep-alive + +#if DAS_ENABLE_KEEPALIVE + + struct SimNode_KeepAlive : SimNode { + SimNode_KeepAlive ( const LineInfo & at, SimNode * res ) : SimNode(at), value(res) {} + virtual bool rtti_node_isKeepAlive() const override { return true; } + virtual SimNode * visit ( SimVisitor & vis ) override; +#define EVAL_NODE(TYPE,CTYPE)\ + virtual CTYPE eval##TYPE ( Context & context ) override { \ + DAS_KEEPALIVE_CALL(&context); \ + return value->eval##TYPE(context); \ + } + DAS_EVAL_NODE +#undef EVAL_NODE + DAS_EVAL_ABI virtual vec4f eval ( das::Context & context ) override { + DAS_KEEPALIVE_CALL(&context); + return value->eval(context); + } + SimNode * value = nullptr; + }; + +#endif + // FUNCTION CALL struct SimNode_CallBase : SimNode { SimNode_CallBase ( const LineInfo & at ) : SimNode(at) {} + virtual bool rtti_node_isCallBase() const override { return true; } virtual SimNode * copyNode ( Context & context, NodeAllocator * code ) override; void visitCall ( SimVisitor & vis ); __forceinline void evalArgs ( Context & context, vec4f * argValues ) { diff --git a/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate_nodes.h b/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate_nodes.h index ef612f00a..4bd7360a8 100644 --- a/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate_nodes.h +++ b/prog/1stPartyLibs/daScript/include/daScript/simulate/simulate_nodes.h @@ -1033,7 +1033,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_FastCall ( const LineInfo & at ) : SimNode_FastCallAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); auto aa = context.abiArg; @@ -1046,7 +1045,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE)\ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ auto aa = context.abiArg; \ @@ -1065,7 +1063,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_FastCall(const LineInfo& at) : SimNode_FastCallAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); auto aa = context.abiArg; @@ -1078,7 +1075,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE)\ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ auto aa = context.abiArg; \ @@ -1104,7 +1100,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_Call ( const LineInfo & at ) : SimNode_CallAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); return context.call(fnPtr, argValues, &debugInfo); @@ -1112,7 +1107,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE)\ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ return cast::to(context.call(fnPtr, argValues, &debugInfo)); \ @@ -1126,7 +1120,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_Call ( const LineInfo & at ) : SimNode_CallAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); return context.call(fnPtr, argValues, &debugInfo); @@ -1134,7 +1127,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ return cast::to(context.call(fnPtr, argValues, &debugInfo)); \ @@ -1156,7 +1148,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_CallAndCopyOrMove ( const LineInfo & at ) : SimNode_CallAndCopyOrMoveAny(at) {} __forceinline char * compute ( Context & context ) { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); @@ -1170,7 +1161,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_CallAndCopyOrMove(const LineInfo& at) : SimNode_CallAndCopyOrMoveAny(at) {} __forceinline char* compute(Context& context) { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); @@ -1191,7 +1181,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); Block * block = cast::to(argValues[0]); @@ -1204,7 +1193,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ Block * block = cast::to(argValues[0]); \ @@ -1224,7 +1212,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); Block* block = cast::to(argValues[0]); @@ -1233,7 +1220,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ Block * block = cast::to(argValues[0]); \ @@ -1256,7 +1242,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAndCopyOrMoveAny(at) { cmresEval = spCMRES; } DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); @@ -1270,7 +1255,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ @@ -1293,7 +1277,6 @@ SIM_NODE_AT_VECTOR(Float, float) } DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); @@ -1303,7 +1286,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ @@ -1326,7 +1308,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeFn ( const LineInfo & at ) : SimNode_InvokeFnAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); SimFunction * simFunc = cast::to(argValues[0]).PTR; @@ -1340,7 +1321,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ SimFunction * simFunc = cast::to(argValues[0]).PTR; \ @@ -1360,7 +1340,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeFn(const LineInfo& at) : SimNode_InvokeFnAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); SimFunction* simFunc = cast::to(argValues[0]).PTR; @@ -1370,7 +1349,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ SimFunction * simFunc = cast::to(argValues[0]).PTR; \ @@ -1394,7 +1372,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeMethod ( const LineInfo & at ) : SimNode_InvokeMethodAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); char * classPtr = cast::to(argValues[0]); @@ -1405,7 +1382,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ char * classPtr = cast::to(argValues[0]); \ @@ -1422,7 +1398,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeMethod(const LineInfo& at) : SimNode_InvokeMethodAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); char * classPtr = cast::to(argValues[0]); @@ -1433,7 +1408,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ char * classPtr = cast::to(argValues[0]); \ @@ -1457,7 +1431,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeFnByName ( const LineInfo & at ) : SimNode_InvokeFnByNameAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); bool unique = false; @@ -1477,7 +1450,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ bool unique = false; \ @@ -1503,7 +1475,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeFnByName(const LineInfo& at) : SimNode_InvokeFnByNameAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); bool unique = false; @@ -1519,7 +1490,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ bool unique = false; \ @@ -1549,7 +1519,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeLambda ( const LineInfo & at ) : SimNode_InvokeLambdaAny(at) {} DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); SimFunction ** funMnh = cast::to(argValues[0]); @@ -1561,7 +1530,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ SimFunction ** funMnh = cast::to(argValues[0]); \ @@ -1579,7 +1547,6 @@ SIM_NODE_AT_VECTOR(Float, float) SimNode_InvokeLambda(const LineInfo& at) : SimNode_InvokeLambdaAny(at) {} DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); SimFunction ** funMnh = cast::to(argValues[0]); @@ -1591,7 +1558,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ SimFunction ** funMnh = cast::to(argValues[0]); \ @@ -1618,7 +1584,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAndCopyOrMoveFnAny(at) { cmresEval = spEval; } DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); @@ -1633,7 +1598,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ @@ -1657,7 +1621,6 @@ SIM_NODE_AT_VECTOR(Float, float) } DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); @@ -1668,7 +1631,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ @@ -1694,7 +1656,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAndCopyOrMoveMethodAny(at) { cmresEval = spEval; } DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); @@ -1706,7 +1667,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ @@ -1727,7 +1687,6 @@ SIM_NODE_AT_VECTOR(Float, float) } DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); @@ -1739,7 +1698,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ @@ -1765,7 +1723,6 @@ SIM_NODE_AT_VECTOR(Float, float) : SimNode_InvokeAndCopyOrMoveLambdaAny(at) { cmresEval = spEval; } DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[argCount ? argCount : 1]; EvalBlock::eval(context, arguments, argValues); @@ -1778,7 +1735,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[argCount ? argCount : 1]; \ EvalBlock::eval(context, arguments, argValues); \ @@ -1800,7 +1756,6 @@ SIM_NODE_AT_VECTOR(Float, float) } DAS_EVAL_ABI virtual vec4f eval(Context& context) override { DAS_PROFILE_NODE - DAS_KEEPALIVE_CALL(&context); auto cmres = cmresEval->evalPtr(context); vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; evalArgs(context, argValues); @@ -1813,7 +1768,6 @@ SIM_NODE_AT_VECTOR(Float, float) #define EVAL_NODE(TYPE,CTYPE) \ virtual CTYPE eval##TYPE ( Context & context ) override { \ DAS_PROFILE_NODE \ - DAS_KEEPALIVE_CALL(&context); \ auto cmres = cmresEval->evalPtr(context); \ vec4f argValues[DAS_MAX_FUNCTION_ARGUMENTS]; \ evalArgs(context, argValues); \ @@ -3499,6 +3453,12 @@ SIM_NODE_AT_VECTOR(Float, float) #endif + struct SimNodeKeepAlive_While : SimNode_While { + SimNodeKeepAlive_While ( const LineInfo & at, SimNode * c ) + : SimNode_While(at,c) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + struct SimNode_ForWithIteratorBase : SimNode_Block { SimNode_ForWithIteratorBase ( const LineInfo & at ) : SimNode_Block(at) { } @@ -3618,6 +3578,106 @@ SIM_NODE_AT_VECTOR(Float, float) } }; +#if DAS_ENABLE_KEEPALIVE + + struct SimNodeKeepAlive_ForWithIteratorBase : SimNode_ForWithIteratorBase { + SimNodeKeepAlive_ForWithIteratorBase ( const LineInfo & at ) + : SimNode_ForWithIteratorBase(at) { } + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override; + }; + + //////////////////// + // FOR WITH ITERATOR + //////////////////// + + template + struct SimNodeKeepAlive_ForWithIterator : SimNode_ForWithIterator { + SimNodeKeepAlive_ForWithIterator ( const LineInfo & at ) + : SimNode_ForWithIterator(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * pi[totalCount]; + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = context.stack.sp() + this->stackTop[t]; + } + Iterator * sources[totalCount] = {}; + for ( int t=0; t!=totalCount; ++t ) { + vec4f ll = this->source_iterators[t]->eval(context); + sources[t] = cast::to(ll); + } + bool needLoop = true; + SimNode ** __restrict tail = this->list + this->total; + for ( int t=0; t!=totalCount; ++t ) { + sources[t]->isOpen = true; + needLoop = sources[t]->first(context, pi[t]) && needLoop; + if ( context.stopFlags ) goto loopend; + } + if ( !needLoop ) goto loopend; + while ( !context.stopFlags ) { + SimNode ** __restrict body = this->list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + for ( int t=0; t!=totalCount; ++t ){ + if ( !sources[t]->next(context, pi[t]) ) goto loopend; + if ( context.stopFlags ) goto loopend; + } + } + loopend: + this->evalFinal(context); + for ( int t=0; t!=totalCount; ++t ) { + sources[t]->close(context, pi[t]); + } + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + + template <> + struct SimNodeKeepAlive_ForWithIterator<0> : SimNode_ForWithIterator<0> { + SimNodeKeepAlive_ForWithIterator ( const LineInfo & at ) + : SimNode_ForWithIterator<0>(at) {} + }; + + template <> + struct SimNodeKeepAlive_ForWithIterator<1> : SimNode_ForWithIterator<1> { + SimNodeKeepAlive_ForWithIterator ( const LineInfo & at ) + : SimNode_ForWithIterator<1>(at) {} + DAS_EVAL_ABI virtual vec4f eval ( Context & context ) override { + DAS_PROFILE_NODE + char * pi = (context.stack.sp() + stackTop[0]); + Iterator * sources; + vec4f ll = source_iterators[0]->eval(context); + sources = cast::to(ll); + bool needLoop = true; + SimNode ** __restrict tail = list + total; + sources->isOpen = true; + needLoop = sources->first(context, pi) && needLoop; + if ( context.stopFlags || !needLoop) goto loopend; + while ( !context.stopFlags ) { + SimNode ** __restrict body = list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + if ( !sources->next(context, pi) ) goto loopend; + if ( context.stopFlags ) goto loopend; + } + loopend: + evalFinal(context); + sources->close(context, pi); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + }; + +#endif + #if DAS_DEBUGGER ////////////////////////// diff --git a/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp b/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp index c9ec1d4e4..42f3dc3ab 100644 --- a/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp +++ b/prog/1stPartyLibs/daScript/src/ast/ast_parse.cpp @@ -380,6 +380,43 @@ namespace das { return true; } + bool detectGen2Syntax ( const char * text, uint32_t length ) { + // we search for #gen2#, and return true if its there + // we skip /* */ and // comments + bool in_single_line_comment = false; + bool in_multi_line_comment = false; + for (uint32_t i = 0; i < length; ++i) { + if (in_single_line_comment) { + if (text[i] == '\n') { + in_single_line_comment = false; + } + continue; + } + if (in_multi_line_comment) { + if (text[i] == '*' && i + 1 < length && text[i + 1] == '/') { + in_multi_line_comment = false; + ++i; + } + continue; + } + if (text[i] == '/' && i + 1 < length) { + if (text[i + 1] == '/') { + in_single_line_comment = true; + ++i; + continue; + } else if (text[i + 1] == '*') { + in_multi_line_comment = true; + ++i; + continue; + } + } + if (text[i] == '#' && i + 5 < length && text[i + 1] == 'g' && text[i + 2] == 'e' && text[i + 3] == 'n' && text[i + 4] == '2' && text[i + 5] == '#') { + return true; + } + } + return false; + } + ProgramPtr parseDaScript ( const string & fileName, const string & moduleName, const FileAccessPtr & access, @@ -417,30 +454,38 @@ namespace das { parserState.das_def_tab_size = daScriptEnvironment::bound->das_def_tab_size; parserState.das_gen2_make_syntax = policies.gen2_make_syntax; yyscan_t scanner = nullptr; - if ( policies.version_2_syntax ) { - das2_yylex_init_extra(&parserState, &scanner); - } else { - das_yylex_init_extra(&parserState, &scanner); - } int64_t file_mtime = access->getFileMtime(fileName.c_str()); if ( auto fi = access->getFileInfo(fileName) ) { parserState.g_FileAccessStack.push_back(fi); const char * src = nullptr; uint32_t len = 0; fi->getSourceAndLength(src,len); - if (isUtf8Text(src, len)) { - if ( policies.version_2_syntax ) { + bool gen2 = policies.version_2_syntax || detectGen2Syntax(src, len); + if ( gen2 ) { + das2_yylex_init_extra(&parserState, &scanner); + } else { + das_yylex_init_extra(&parserState, &scanner); + } + if ( isUtf8Text(src, len) ) { + if ( gen2 ) { das2_yybegin(src + 3, len-3, scanner); } else { das_yybegin(src + 3, len-3, scanner); } } else { - if ( policies.version_2_syntax ) { + if ( gen2 ) { das2_yybegin(src, len, scanner); } else { das_yybegin(src, len, scanner); } } + if ( gen2 ) { + err = das2_yyparse(scanner); + das2_yylex_destroy(scanner); + } else { + err = das_yyparse(scanner); + das_yylex_destroy(scanner); + } libGroup.foreach([&](Module * mod){ if ( mod->commentReader ) { parserState.g_CommentReaders.push_back(mod->commentReader.get()); @@ -454,13 +499,6 @@ namespace das { daScriptEnvironment::bound->g_compilerLog = nullptr; return program; } - if ( policies.version_2_syntax ) { - err = das2_yyparse(scanner); - das2_yylex_destroy(scanner); - } else { - err = das_yyparse(scanner); - das_yylex_destroy(scanner); - } parserState = DasParserState(); totParse += get_time_usec(time0); if ( err || program->failed() ) { diff --git a/prog/1stPartyLibs/daScript/src/ast/ast_simulate.cpp b/prog/1stPartyLibs/daScript/src/ast/ast_simulate.cpp index c7ad24206..196f83f56 100644 --- a/prog/1stPartyLibs/daScript/src/ast/ast_simulate.cpp +++ b/prog/1stPartyLibs/daScript/src/ast/ast_simulate.cpp @@ -114,14 +114,26 @@ namespace das // common for move and copy + SimNode_CallBase * getCallBase ( SimNode * node ) { +#if DAS_ENABLE_KEEPALIVE + if ( node->rtti_node_isKeepAlive() ) { + SimNode_KeepAlive * ka = static_cast(node); + node = ka->value; + } +#endif + DAS_ASSERTF(node->rtti_node_isCallBase(),"we are calling getCallBase on a node, which is not a call base node." + "we should not be here, script compiler should have caught this during compilation."); + return static_cast(node); + } + SimNode * makeLocalCMResMove (const LineInfo & at, Context & context, uint32_t offset, const ExpressionPtr & rE ) { const auto & rightType = *rE->type; // now, call with CMRES if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, offset); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, offset); return right; } } @@ -129,8 +141,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, offset); + auto * right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, offset); return right; } } @@ -155,18 +167,16 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * rightC = (SimNode_CallBase *) right; - rightC->cmresEval = context.code->makeNode(rE->at, offset); - return rightC; + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, offset); + return right; } } // now, invoke with CMRES if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * rightC = (SimNode_CallBase *) right; - rightC->cmresEval = context.code->makeNode(rE->at, offset); - return rightC; + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, offset); + return right; } } // wo standard path @@ -192,8 +202,8 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop, offset); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop, offset); return right; } } @@ -201,8 +211,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop, offset); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop, offset); return right; } } @@ -227,18 +237,16 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * rightC = (SimNode_CallBase *) right; - rightC->cmresEval = context.code->makeNode(rE->at, stackTop, offset); - return rightC; + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop, offset); + return right; } } // now, invoke with CMRES if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * rightC = (SimNode_CallBase *) right; - rightC->cmresEval = context.code->makeNode(rE->at, stackTop, offset); - return rightC; + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop, offset); + return right; } } // wo standard path @@ -264,8 +272,8 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop); return right; } } @@ -273,8 +281,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop); return right; } } @@ -298,8 +306,8 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop); return right; } } @@ -307,8 +315,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = context.code->makeNode(rE->at, stackTop); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = context.code->makeNode(rE->at, stackTop); return right; } } @@ -340,8 +348,8 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = lE->simulate(context); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = lE->simulate(context); return right; } } @@ -349,8 +357,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = lE->simulate(context); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = lE->simulate(context); return right; } } @@ -378,8 +386,8 @@ namespace das if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = lE->simulate(context); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = lE->simulate(context); return right; } } @@ -387,8 +395,8 @@ namespace das if ( rE->rtti_isInvoke() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - SimNode_CallBase * right = (SimNode_CallBase *) rE->simulate(context); - right->cmresEval = lE->simulate(context); + auto right = rE->simulate(context); + getCallBase(right)->cmresEval = lE->simulate(context); return right; } } @@ -413,14 +421,12 @@ namespace das } SimNode * Function::makeSimNode ( Context & context, const vector & ) { - { - if ( copyOnReturn || moveOnReturn ) { - return context.code->makeNodeUnrollAny(int(arguments.size()), at); - } else if ( fastCall ) { - return context.code->makeNodeUnrollAny(int(arguments.size()), at); - } else { - return context.code->makeNodeUnrollAny(int(arguments.size()), at); - } + if ( copyOnReturn || moveOnReturn ) { + return context.code->makeNodeUnrollAny(int(arguments.size()), at); + } else if ( fastCall ) { + return context.code->makeNodeUnrollAny(int(arguments.size()), at); + } else { + return context.code->makeNodeUnrollAny(int(arguments.size()), at); } } @@ -1350,7 +1356,7 @@ namespace das pInvoke->arguments = nullptr; pInvoke->nArguments = 0; } - return pInvoke; + return keepAlive(context,pInvoke); } SimNode * ExprErase::simulate (Context & context) const { @@ -2465,8 +2471,7 @@ namespace das } else if ( returnInBlock ) { if ( returnCallCMRES ) { DAS_VERIFYF(simSubE, "internal error. can't be zero"); - SimNode_CallBase * simRet = (SimNode_CallBase *) simSubE; - simRet->cmresEval = context.code->makeNode(at,0,stackTop); + getCallBase(simSubE)->cmresEval = context.code->makeNode(at,0,stackTop); return context.code->makeNode(at, simSubE); } else if ( takeOverRightStack ) { DAS_VERIFYF(simSubE, "internal error. can't be zero"); @@ -2484,8 +2489,7 @@ namespace das } else if ( subexpr ) { if ( returnCallCMRES ) { DAS_VERIFYF(simSubE, "internal error. can't be zero"); - SimNode_CallBase * simRet = (SimNode_CallBase *) simSubE; - simRet->cmresEval = context.code->makeNode(at,0); + getCallBase(simSubE)->cmresEval = context.code->makeNode(at,0); return context.code->makeNode(at, simSubE); } else if ( returnCMRES ) { // ReturnLocalCMRes @@ -2632,18 +2636,22 @@ namespace das } SimNode * ExprWhile::simulate (Context & context) const { + SimNode_Block * whileNode = nullptr; #if DAS_DEBUGGER if ( context.thisProgram->getDebugger() ) { - auto node = context.code->makeNode(at, cond->simulate(context)); - simulateFinal(context, body, node); - return node; + whileNode = context.code->makeNode(at, cond->simulate(context)); + } else +#endif +#if DAS_ENABLE_KEEPALIVE + if ( context.thisProgram->policies.keep_alive ) { + whileNode = context.code->makeNode(at, cond->simulate(context)); } else #endif { - auto node = context.code->makeNode(at, cond->simulate(context)); - simulateFinal(context, body, node); - return node; + whileNode = context.code->makeNode(at, cond->simulate(context)); } + simulateFinal(context, body, whileNode); + return whileNode; } SimNode * ExprUnsafe::simulate (Context & context) const { @@ -2689,6 +2697,15 @@ namespace das result = (SimNode_ForWithIteratorBase *) context.code->makeNodeUnrollNZ_FOR(total, at); } } else +#endif +#if DAS_ENABLE_KEEPALIVE + if ( context.thisProgram->policies.keep_alive ) { + if ( total>MAX_FOR_UNROLL ) { + result = (SimNode_ForWithIteratorBase *) context.code->makeNode(at); + } else { + result = (SimNode_ForWithIteratorBase *) context.code->makeNodeUnrollNZ_FOR(total, at); + } + } else #endif { if ( total>MAX_FOR_UNROLL ) { @@ -2784,6 +2801,42 @@ namespace das return nullptr; } } else +#endif +#if DAS_ENABLE_KEEPALIVE + if ( context.thisProgram->policies.keep_alive ) { + if ( dynamicArrays ) { + if (loop1) { + result = (SimNode_ForBase *) context.code->makeNodeUnrollNZ_FOR(total, at); + } else { + result = (SimNode_ForBase *) context.code->makeNodeUnrollNZ_FOR(total, at); + } + } else if ( fixedArrays ) { + if (loop1) { + result = (SimNode_ForBase *)context.code->makeNodeUnrollNZ_FOR(total, at); + } else { + result = (SimNode_ForBase *)context.code->makeNodeUnrollNZ_FOR(total, at); + } + } else if ( rangeBase ) { + DAS_ASSERT(total==1 && "simple range on 1 loop only"); + if ( NF ) { + if (loop1) { + result = (SimNode_ForBase *)context.code->makeRangeNode(sources[0]->type->baseType,at); + } else { + result = (SimNode_ForBase *)context.code->makeRangeNode(sources[0]->type->baseType,at); + } + } else { + if (loop1) { + result = (SimNode_ForBase *)context.code->makeRangeNode(sources[0]->type->baseType,at); + } else { + result = (SimNode_ForBase *)context.code->makeRangeNode(sources[0]->type->baseType,at); + } + } + } else { + DAS_ASSERTF(0, "we should not be here yet. logic above assumes optimized for path of some kind."); + context.thisProgram->error("internal compilation error, generating for", "", "", at); + return nullptr; + } + } else #endif { if ( dynamicArrays ) { @@ -2913,13 +2966,13 @@ namespace das varExpr->variable = var; varExpr->local = local; varExpr->type = make_smart(*var->type); - SimNode_CallBase * retN = nullptr; // it has to be CALL with CMRES + SimNode * retN = nullptr; // it has to be CALL with CMRES const auto & rE = var->init; if ( rE->rtti_isCall() ) { auto cll = static_pointer_cast(rE); if ( cll->allowCmresSkip() ) { - retN = (SimNode_CallBase *) rE->simulate(context); - retN->cmresEval = varExpr->simulate(context); + retN = rE->simulate(context); + getCallBase(retN)->cmresEval = varExpr->simulate(context); } } if ( !retN ) { @@ -2941,6 +2994,17 @@ namespace das return let; } + SimNode * ExprLooksLikeCall::keepAlive ( Context & context, SimNode * result ) const { +#if DAS_ENABLE_KEEPALIVE + if ( context.thisProgram->policies.keep_alive ) { + return context.code->makeNode(at,result); + } else +#endif + { + return result; + } + } + SimNode_CallBase * ExprCall::simulateCall (const FunctionPtr & func, const ExprLooksLikeCall * expr, Context & context, @@ -2991,7 +3055,13 @@ namespace das if ( !doesNotNeedSp && stackTop ) { pCall->cmresEval = context.code->makeNode(at,stackTop); } - return pCall; + if ( func->builtIn ) { + // TODO: we need to determine, if we need keep-alive for the func + // basic function which is not recursive in any shape or form may not need one + return pCall; // we don't need keep-alive for the built-in functions + } else { + return keepAlive(context,pCall); + } } SimNode * ExprNamedCall::simulate (Context &) const { @@ -2999,7 +3069,7 @@ namespace das return nullptr; } -void Program::buildGMNLookup ( Context & context, TextWriter & logs ) { + void Program::buildGMNLookup ( Context & context, TextWriter & logs ) { context.tabGMnLookup = make_shared>(); context.tabGMnLookup->clear(); for ( int i=0, is=context.totalVariables; i!=is; ++i ) { @@ -3102,6 +3172,12 @@ void Program::buildGMNLookup ( Context & context, TextWriter & logs ) { bool Program::simulate ( Context & context, TextWriter & logs, StackAllocator * sharedStack ) { auto time0 = ref_time_ticks(); + #if !(DAS_ENABLE_KEEPALIVE) + if ( policies.keep_alive ) { + error("keep_alive is not enabled in this build. Modify DAS_ENABLE_KEEPALIVE first", "", "", LineInfo()); + return false; + } + #endif isSimulating = true; context.failed = true; astTypeInfo.clear(); // this is to be filled via typeinfo(ast_typedecl and such) diff --git a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp index 16842ab66..b2925aa72 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp +++ b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_ast_serialize.cpp @@ -2103,6 +2103,7 @@ namespace das { << value.profiler << value.profile_module << value.jit + << value.keep_alive << value.threadlock_context; return *this; } @@ -2194,7 +2195,7 @@ namespace das { } uint32_t AstSerializer::getVersion () { - static constexpr uint32_t currentVersion = 46; + static constexpr uint32_t currentVersion = 48; return currentVersion; } diff --git a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_rtti.cpp b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_rtti.cpp index a3a99a2f1..1faab4341 100644 --- a/prog/1stPartyLibs/daScript/src/builtin/module_builtin_rtti.cpp +++ b/prog/1stPartyLibs/daScript/src/builtin/module_builtin_rtti.cpp @@ -696,6 +696,7 @@ namespace das { addField("completion"); addField("export_all"); addField("serialize_main_module"); + addField("keep_alive"); // reporting addField("always_report_candidates_threshold"); // infer passes diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.cpp b/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.cpp index 0a6c2531e..d6e4805c6 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.cpp @@ -580,8 +580,8 @@ static void yynoreturn yy_fatal_error ( const char* msg , yyscan_t yyscanner ); yyg->yy_hold_char = *yy_cp; \ *yy_cp = '\0'; \ yyg->yy_c_buf_p = yy_cp; -#define YY_NUM_RULES 234 -#define YY_END_OF_BUFFER 235 +#define YY_NUM_RULES 235 +#define YY_END_OF_BUFFER 236 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info @@ -589,83 +589,83 @@ struct yy_trans_info flex_int32_t yy_verify; flex_int32_t yy_nxt; }; -static const flex_int16_t yy_accept[682] = +static const flex_int16_t yy_accept[687] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 21, 21, 0, 0, 235, 234, 233, 225, 232, 233, - 130, 233, 233, 233, 233, 233, 171, 170, 233, 233, - 233, 233, 233, 233, 157, 157, 233, 233, 233, 233, - 233, 233, 129, 173, 233, 172, 233, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 175, 233, 174, - 20, 19, 18, 17, 13, 20, 14, 9, 10, 9, - 9, 9, 6, 5, 22, 21, 12, 11, 215, 0, - 181, 0, 0, 0, 0, 0, 0, 0, 0, 200, - - 204, 207, 0, 0, 2, 199, 210, 196, 0, 0, - 0, 0, 211, 197, 194, 178, 162, 3, 4, 198, - 163, 157, 0, 164, 153, 155, 0, 157, 168, 153, - 155, 176, 193, 0, 0, 0, 0, 195, 219, 212, - 180, 214, 224, 213, 217, 192, 190, 191, 129, 0, - 231, 209, 206, 129, 129, 129, 129, 87, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 27, 129, - 78, 88, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 208, 179, 205, 16, 15, 8, 7, 22, - 21, 0, 186, 185, 188, 182, 189, 183, 187, 184, - 201, 151, 0, 0, 0, 0, 0, 0, 0, 0, - 230, 228, 177, 0, 162, 166, 0, 0, 232, 0, - 156, 162, 0, 163, 167, 0, 0, 165, 154, 152, - 161, 0, 0, 0, 229, 227, 226, 218, 221, 220, - 216, 203, 129, 129, 35, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 33, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 25, 129, - - 129, 129, 129, 129, 129, 109, 129, 129, 129, 38, - 129, 97, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 45, 129, 129, 129, 129, 129, 129, 129, 41, - 129, 129, 129, 129, 129, 202, 0, 144, 144, 150, - 145, 148, 147, 149, 146, 0, 0, 0, 0, 0, - 162, 0, 0, 162, 166, 0, 0, 163, 165, 169, - 0, 161, 159, 160, 160, 0, 0, 0, 0, 223, - 222, 129, 90, 129, 129, 101, 129, 129, 102, 129, - 129, 65, 129, 129, 129, 129, 129, 129, 129, 29, - - 31, 44, 129, 129, 129, 129, 129, 129, 129, 129, - 50, 129, 129, 129, 129, 113, 114, 115, 129, 110, - 129, 129, 129, 0, 0, 129, 91, 129, 129, 129, - 67, 129, 129, 129, 129, 129, 129, 129, 129, 129, - 129, 129, 129, 129, 129, 99, 129, 96, 116, 129, - 129, 129, 129, 0, 0, 129, 103, 129, 129, 34, - 129, 0, 137, 143, 143, 138, 138, 141, 141, 140, - 140, 142, 142, 139, 139, 0, 0, 162, 160, 158, - 0, 129, 74, 129, 129, 56, 94, 129, 43, 62, - 129, 129, 129, 89, 129, 129, 129, 100, 129, 129, - - 125, 129, 129, 129, 129, 129, 111, 112, 129, 49, - 129, 0, 129, 129, 129, 129, 129, 129, 107, 129, - 129, 129, 129, 129, 129, 129, 129, 129, 129, 73, - 60, 129, 129, 129, 121, 122, 123, 129, 118, 129, - 129, 129, 129, 0, 129, 64, 26, 93, 0, 136, - 131, 134, 133, 135, 132, 0, 0, 0, 0, 129, - 36, 129, 129, 129, 129, 98, 124, 72, 129, 129, - 129, 126, 127, 128, 129, 129, 129, 129, 129, 129, - 58, 0, 37, 51, 129, 129, 129, 129, 52, 129, - 129, 129, 129, 92, 70, 81, 129, 86, 104, 42, - - 129, 129, 119, 120, 129, 84, 66, 108, 0, 39, - 129, 0, 129, 129, 24, 129, 76, 129, 32, 129, - 129, 129, 129, 23, 85, 129, 129, 53, 129, 82, - 105, 46, 129, 55, 129, 129, 129, 47, 129, 129, - 129, 61, 0, 71, 117, 63, 80, 129, 57, 129, - 79, 77, 54, 69, 129, 129, 129, 129, 48, 95, - 129, 106, 1, 129, 59, 129, 83, 129, 28, 129, - 129, 129, 129, 129, 75, 68, 30, 129, 129, 40, - 0 + 22, 22, 0, 0, 236, 235, 234, 226, 233, 234, + 131, 234, 234, 234, 234, 234, 172, 171, 234, 234, + 234, 234, 234, 234, 158, 158, 234, 234, 234, 234, + 234, 234, 130, 174, 234, 173, 234, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 176, 234, 175, + 21, 20, 19, 18, 14, 21, 15, 10, 11, 10, + 10, 10, 7, 6, 23, 22, 13, 12, 216, 0, + 0, 182, 0, 0, 0, 0, 0, 0, 0, 0, + + 201, 205, 208, 0, 0, 3, 200, 211, 197, 0, + 0, 0, 0, 212, 198, 195, 179, 163, 4, 5, + 199, 164, 158, 0, 165, 154, 156, 0, 158, 169, + 154, 156, 177, 194, 0, 0, 0, 0, 196, 220, + 213, 181, 215, 225, 214, 218, 193, 191, 192, 130, + 0, 232, 210, 207, 130, 130, 130, 130, 88, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 28, + 130, 79, 89, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 209, 180, 206, 17, 16, 9, 8, + 23, 22, 0, 0, 187, 186, 189, 183, 190, 184, + 188, 185, 202, 152, 0, 0, 0, 0, 0, 0, + 0, 0, 231, 229, 178, 0, 163, 167, 0, 0, + 233, 0, 157, 163, 0, 164, 168, 0, 0, 166, + 155, 153, 162, 0, 0, 0, 230, 228, 227, 219, + 222, 221, 217, 204, 130, 130, 36, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 34, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + + 26, 130, 130, 130, 130, 130, 130, 110, 130, 130, + 130, 39, 130, 98, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 46, 130, 130, 130, 130, 130, 130, + 130, 42, 130, 130, 130, 130, 130, 203, 0, 0, + 145, 145, 151, 146, 149, 148, 150, 147, 0, 0, + 0, 0, 0, 163, 0, 0, 163, 167, 0, 0, + 164, 166, 170, 0, 162, 160, 161, 161, 0, 0, + 0, 0, 224, 223, 130, 91, 130, 130, 102, 130, + 130, 103, 130, 130, 66, 130, 130, 130, 130, 130, + + 130, 130, 30, 32, 45, 130, 130, 130, 130, 130, + 130, 130, 130, 51, 130, 130, 130, 130, 114, 115, + 116, 130, 111, 130, 130, 130, 0, 0, 130, 92, + 130, 130, 130, 68, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 130, 130, 130, 130, 130, 100, 130, + 97, 117, 130, 130, 130, 130, 0, 0, 130, 104, + 130, 130, 35, 130, 0, 0, 138, 144, 144, 139, + 139, 142, 142, 141, 141, 143, 143, 140, 140, 0, + 0, 163, 161, 159, 0, 130, 75, 130, 130, 57, + 95, 130, 44, 63, 130, 130, 130, 90, 130, 130, + + 130, 101, 130, 130, 126, 130, 130, 130, 130, 130, + 112, 113, 130, 50, 130, 0, 130, 130, 130, 130, + 130, 130, 108, 130, 130, 130, 130, 130, 130, 130, + 130, 130, 130, 74, 61, 130, 130, 130, 122, 123, + 124, 130, 119, 130, 130, 130, 130, 0, 130, 65, + 27, 94, 0, 1, 137, 132, 135, 134, 136, 133, + 0, 0, 0, 0, 130, 37, 130, 130, 130, 130, + 99, 125, 73, 130, 130, 130, 127, 128, 129, 130, + 130, 130, 130, 130, 130, 59, 0, 38, 52, 130, + 130, 130, 130, 53, 130, 130, 130, 130, 93, 71, + + 82, 130, 87, 105, 43, 130, 130, 120, 121, 130, + 85, 67, 109, 0, 40, 130, 0, 130, 130, 25, + 130, 77, 130, 33, 130, 130, 130, 130, 24, 86, + 130, 130, 54, 130, 83, 106, 47, 130, 56, 130, + 130, 130, 48, 130, 130, 130, 62, 0, 72, 118, + 64, 81, 130, 58, 130, 80, 78, 55, 70, 130, + 130, 130, 130, 49, 96, 130, 107, 2, 130, 60, + 130, 84, 130, 29, 130, 130, 130, 130, 130, 76, + 69, 31, 130, 130, 41, 0 } ; static const YY_CHAR yy_ec[256] = @@ -712,173 +712,175 @@ static const YY_CHAR yy_meta[76] = 9, 9, 1, 1, 1 } ; -static const flex_int16_t yy_base[718] = +static const flex_int16_t yy_base[723] = { 0, - 0, 0, 0, 0, 74, 80, 76, 82, 1246, 1245, - 90, 96, 1244, 1243, 1245, 1250, 1250, 1250, 1250, 1212, - 1250, 82, 80, 1211, 79, 1199, 1250, 1250, 92, 99, - 117, 107, 141, 123, 174, 72, 112, 168, 159, 94, - 102, 140, 0, 1250, 147, 1250, 113, 172, 120, 146, - 128, 148, 161, 179, 189, 66, 1180, 178, 117, 186, - 135, 204, 198, 204, 155, 101, 1184, 1250, 219, 1250, - 1250, 1250, 1250, 1250, 1250, 228, 1250, 1250, 1250, 1250, - 1219, 1223, 1250, 1250, 0, 256, 1250, 1250, 1250, 255, - 1250, 0, 0, 0, 0, 0, 0, 0, 0, 1250, - - 1205, 1250, 1224, 245, 1250, 1250, 1250, 1250, 282, 275, - 1191, 1190, 1250, 1250, 1250, 1214, 337, 1250, 271, 1250, - 377, 197, 292, 1250, 1250, 147, 0, 285, 1250, 1179, - 284, 1250, 1250, 331, 277, 1187, 231, 1250, 268, 1250, - 1250, 1250, 1250, 1250, 289, 1250, 1250, 1250, 0, 325, - 1250, 1250, 1198, 1164, 1177, 1179, 1162, 1160, 1158, 1157, - 1161, 1160, 1168, 275, 1171, 1158, 286, 1150, 276, 1149, - 1153, 1156, 278, 1152, 1148, 1151, 1150, 1143, 0, 1146, - 281, 0, 1155, 296, 1140, 1154, 1135, 1145, 301, 1150, - 1136, 1144, 1150, 1138, 316, 1149, 1148, 1147, 225, 1145, - - 309, 1131, 1130, 1131, 312, 1140, 1141, 1124, 1131, 329, - 1120, 1133, 1250, 1250, 1152, 1250, 1250, 1250, 1250, 0, - 381, 394, 1250, 1250, 1250, 1250, 1250, 1250, 1250, 1250, - 1250, 330, 1171, 1170, 1169, 1168, 1167, 1166, 1162, 1173, - 1250, 1250, 1250, 415, 1250, 1250, 1122, 351, 1250, 388, - 1250, 374, 428, 1250, 1250, 1121, 436, 428, 1250, 1250, - 408, 1154, 1157, 1168, 1250, 1250, 1250, 1138, 1250, 1250, - 1137, 1250, 1102, 1103, 0, 1118, 1098, 1103, 1110, 1112, - 1103, 1112, 1093, 1092, 1092, 358, 1108, 1103, 1102, 1104, - 1099, 1099, 1091, 326, 1084, 1100, 1095, 1098, 0, 1095, - - 1092, 1082, 1084, 1083, 1090, 445, 1075, 1086, 1088, 472, - 1069, 0, 1077, 1070, 1077, 1068, 1066, 1062, 1071, 1074, - 1066, 1066, 1058, 1057, 1065, 1058, 1057, 1054, 240, 1061, - 1066, 0, 1059, 1064, 1049, 1054, 1065, 1064, 1051, 478, - 1059, 1045, 1050, 1052, 1048, 1250, 478, 1077, 1076, 367, - 444, 445, 447, 448, 449, 1088, 372, 1099, 505, 496, - 489, 493, 530, 1250, 1250, 1048, 538, 492, 1250, 1250, - 1047, 528, 1250, 542, 543, 1084, 512, 1095, 570, 1250, - 1250, 1033, 0, 1025, 1036, 0, 1038, 1036, 0, 1035, - 1024, 0, 1025, 1023, 1032, 1020, 1020, 1032, 1026, 0, - - 0, 0, 1033, 1026, 1029, 1022, 1028, 1012, 1011, 1012, - 0, 1019, 1007, 1012, 1045, 0, 0, 0, 1046, 0, - 1022, 1011, 1017, 574, 1047, 1008, 0, 1017, 1003, 999, - 0, 1014, 1005, 1008, 991, 992, 1001, 992, 1003, 1002, - 987, 996, 991, 1000, 997, 0, 996, 477, 580, 991, - 993, 980, 990, 607, 1023, 994, 0, 989, 988, 0, - 988, 1031, 1250, 1009, 1008, 1007, 1006, 1005, 1004, 1003, - 1002, 1001, 1000, 999, 990, 962, 594, 540, 1250, 1250, - 961, 927, 0, 921, 894, 0, 0, 881, 0, 0, - 884, 884, 887, 0, 886, 871, 885, 0, 838, 848, - - 512, 833, 840, 837, 834, 796, 0, 0, 790, 0, - 807, 851, 783, 768, 773, 776, 765, 774, 796, 770, - 769, 756, 753, 761, 760, 764, 759, 748, 735, 0, - 0, 748, 739, 771, 0, 0, 0, 766, 0, 724, - 737, 722, 735, 777, 719, 0, 0, 0, 0, 1250, - 1250, 1250, 1250, 1250, 1250, 763, 524, 762, 568, 726, - 0, 711, 716, 700, 700, 0, 0, 0, 709, 687, - 709, 0, 0, 0, 695, 689, 698, 687, 686, 659, - 0, 641, 1250, 0, 582, 577, 590, 588, 0, 614, - 574, 573, 584, 0, 0, 0, 573, 588, 0, 0, - - 359, 580, 0, 0, 576, 0, 0, 604, 627, 1250, - 563, 621, 560, 574, 0, 572, 0, 557, 0, 549, - 550, 545, 533, 0, 0, 533, 532, 0, 540, 0, - 0, 0, 527, 0, 521, 438, 527, 0, 523, 521, - 516, 0, 530, 0, 0, 0, 0, 467, 0, 466, - 0, 0, 0, 0, 433, 429, 433, 425, 0, 0, - 413, 0, 1250, 397, 0, 342, 0, 313, 0, 300, - 278, 181, 171, 82, 0, 0, 0, 64, 37, 0, - 1250, 645, 657, 669, 681, 693, 705, 717, 724, 736, - 748, 759, 770, 781, 792, 803, 814, 825, 836, 843, - - 847, 859, 871, 878, 885, 897, 909, 921, 928, 935, - 947, 959, 966, 978, 990, 1002, 1014 + 0, 0, 0, 0, 74, 80, 76, 82, 1251, 1250, + 90, 96, 1249, 1248, 1250, 1255, 1255, 1255, 1255, 1217, + 1255, 82, 102, 1216, 101, 1204, 1255, 1255, 93, 98, + 117, 106, 150, 111, 174, 48, 100, 160, 109, 83, + 102, 125, 0, 1255, 182, 1255, 134, 172, 182, 133, + 96, 147, 194, 151, 194, 94, 1185, 93, 120, 142, + 170, 210, 200, 210, 197, 175, 1189, 1255, 201, 1255, + 1255, 1255, 1255, 1255, 1255, 242, 1255, 1255, 1255, 1255, + 1224, 1228, 1255, 1255, 0, 214, 1255, 1255, 1255, 256, + 1190, 1255, 0, 0, 0, 0, 0, 0, 0, 0, + + 1255, 1209, 1255, 1228, 244, 1255, 1255, 1255, 1255, 286, + 248, 1195, 1194, 1255, 1255, 1255, 1218, 341, 1255, 283, + 1255, 381, 187, 298, 1255, 1255, 270, 0, 273, 1255, + 1183, 279, 1255, 1255, 339, 279, 1191, 252, 1255, 269, + 1255, 1255, 1255, 1255, 1255, 300, 1255, 1255, 1255, 0, + 343, 1255, 1255, 1202, 1168, 1181, 1183, 1166, 1164, 1162, + 1161, 1165, 1164, 1172, 240, 1175, 1162, 296, 1154, 273, + 1153, 1157, 1160, 310, 1156, 1152, 1155, 1154, 1147, 0, + 1150, 285, 0, 1159, 322, 1144, 1158, 1139, 1149, 287, + 1154, 1140, 1148, 1154, 1142, 323, 1153, 1152, 1151, 160, + + 1149, 285, 1135, 1134, 1135, 319, 1144, 1145, 1128, 1135, + 320, 1124, 1137, 1255, 1255, 1156, 1255, 1255, 1255, 1255, + 0, 353, 398, 1127, 1255, 1255, 1255, 1255, 1255, 1255, + 1255, 1255, 1255, 334, 1174, 1173, 1172, 1171, 1170, 1169, + 1165, 1176, 1255, 1255, 1255, 419, 1255, 1255, 1125, 392, + 1255, 393, 1255, 412, 434, 1255, 1255, 1124, 450, 429, + 1255, 1255, 371, 1157, 1160, 1171, 1255, 1255, 1255, 1141, + 1255, 1255, 1140, 1255, 1105, 1106, 0, 1121, 1101, 1106, + 1113, 1115, 1106, 1115, 1096, 1095, 1095, 322, 1111, 1106, + 1105, 1107, 1102, 1102, 1094, 333, 1087, 1103, 1098, 1101, + + 0, 1098, 1095, 1085, 1087, 1086, 1093, 461, 1078, 1089, + 1091, 449, 1072, 0, 1080, 1073, 1080, 1071, 1069, 1065, + 1074, 1077, 1069, 1069, 1061, 1060, 1068, 1061, 1060, 1057, + 360, 1064, 1069, 0, 1062, 1067, 1052, 1057, 1068, 1067, + 1054, 488, 1062, 1048, 1053, 1055, 1051, 1255, 474, 1085, + 1079, 1078, 427, 439, 463, 464, 465, 467, 1090, 494, + 1101, 508, 494, 487, 395, 532, 1255, 1255, 1050, 540, + 488, 1255, 1255, 1049, 530, 1255, 543, 545, 1086, 522, + 1097, 572, 1255, 1255, 1035, 0, 1027, 1038, 0, 1040, + 1038, 0, 1037, 1026, 0, 1027, 1025, 1034, 1022, 1022, + + 1034, 1028, 0, 0, 0, 1035, 1028, 1031, 1024, 1030, + 1014, 1013, 1014, 0, 1021, 1009, 1014, 1047, 0, 0, + 0, 1048, 0, 1024, 1013, 1019, 531, 1049, 1010, 0, + 1019, 1005, 1001, 0, 1016, 1007, 1010, 993, 994, 1003, + 994, 1005, 1004, 989, 998, 993, 1002, 999, 0, 998, + 529, 571, 993, 995, 982, 992, 585, 1025, 996, 0, + 991, 990, 0, 990, 1033, 1031, 1255, 1010, 1009, 1008, + 1007, 1006, 1005, 1004, 1003, 1002, 1001, 992, 951, 963, + 585, 567, 1255, 1255, 962, 927, 0, 896, 895, 0, + 0, 882, 0, 0, 884, 883, 888, 0, 887, 871, + + 848, 0, 838, 845, 598, 834, 841, 837, 809, 796, + 0, 0, 791, 0, 808, 834, 784, 769, 774, 777, + 760, 775, 797, 771, 770, 751, 754, 762, 761, 765, + 754, 749, 736, 0, 0, 749, 740, 766, 0, 0, + 0, 767, 0, 725, 738, 723, 730, 778, 720, 0, + 0, 0, 0, 1255, 1255, 1255, 1255, 1255, 1255, 1255, + 764, 566, 763, 599, 721, 0, 712, 717, 701, 701, + 0, 0, 0, 704, 688, 710, 0, 0, 0, 696, + 690, 685, 688, 670, 585, 0, 642, 1255, 0, 583, + 578, 591, 589, 0, 615, 575, 574, 585, 0, 0, + + 0, 574, 589, 0, 0, 473, 581, 0, 0, 577, + 0, 0, 605, 628, 1255, 564, 622, 562, 576, 0, + 574, 0, 558, 0, 553, 555, 541, 534, 0, 0, + 527, 515, 0, 526, 0, 0, 0, 510, 0, 483, + 491, 471, 0, 466, 433, 443, 0, 428, 0, 0, + 0, 0, 366, 0, 364, 0, 0, 0, 0, 333, + 326, 324, 304, 0, 0, 278, 0, 1255, 286, 0, + 259, 0, 239, 0, 195, 118, 90, 96, 56, 0, + 0, 0, 38, 37, 0, 1255, 647, 659, 671, 683, + 695, 707, 719, 726, 738, 750, 761, 772, 783, 794, + + 805, 816, 827, 838, 845, 849, 861, 873, 880, 887, + 899, 911, 923, 930, 937, 949, 961, 968, 980, 992, + 1004, 1016 } ; -static const flex_int16_t yy_def[718] = +static const flex_int16_t yy_def[723] = { 0, - 682, 682, 681, 3, 683, 683, 684, 684, 685, 685, - 686, 686, 687, 687, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 688, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 35, 681, 681, 681, 681, - 681, 681, 689, 681, 681, 681, 681, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 690, 681, 681, 681, 681, 681, - 681, 691, 692, 693, 694, 695, 696, 697, 698, 681, - - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 699, 681, - 681, 35, 681, 681, 681, 681, 700, 701, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 689, 681, - 681, 681, 681, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 681, 681, 681, 681, 681, 681, 681, 690, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 702, 703, - 681, 681, 681, 681, 681, 681, 681, 699, 681, 699, - 681, 121, 681, 681, 681, 681, 681, 704, 681, 681, - 705, 681, 706, 707, 681, 681, 681, 681, 681, 681, - 681, 681, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 702, 708, 703, 681, 681, - 709, 699, 681, 681, 681, 681, 681, 710, 681, 681, - 681, 705, 681, 681, 681, 706, 711, 707, 681, 681, - 681, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 681, 681, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 681, 681, 689, 689, 689, 689, 689, - 689, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 712, 681, 713, 681, 681, - 714, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 715, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 716, 689, 689, 689, 689, 717, 681, - 681, 681, 681, 681, 681, 712, 708, 714, 711, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 715, 681, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - - 689, 689, 689, 689, 689, 689, 689, 689, 716, 681, - 689, 717, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 681, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 681, 689, 689, 689, 689, 689, 689, 689, - 689, 689, 689, 689, 689, 689, 689, 689, 689, 689, - 0, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681 + 687, 687, 686, 3, 688, 688, 689, 689, 690, 690, + 691, 691, 692, 692, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 693, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 35, 686, 686, 686, 686, + 686, 686, 694, 686, 686, 686, 686, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 695, 686, 686, 686, 686, 686, + 686, 686, 696, 697, 698, 699, 700, 701, 702, 703, + + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 704, + 686, 686, 35, 686, 686, 686, 686, 705, 706, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 694, + 686, 686, 686, 686, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 686, 686, 686, 686, 686, 686, 686, + 695, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 707, 708, 686, 686, 686, 686, 686, 686, 686, 704, + 686, 704, 686, 122, 686, 686, 686, 686, 686, 709, + 686, 686, 710, 686, 711, 712, 686, 686, 686, 686, + 686, 686, 686, 686, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 707, 713, + 708, 686, 686, 714, 704, 686, 686, 686, 686, 686, + 715, 686, 686, 686, 710, 686, 686, 686, 711, 716, + 712, 686, 686, 686, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 686, 686, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 686, 686, 694, 694, + 694, 694, 694, 694, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 717, + 686, 718, 686, 686, 719, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 720, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 721, 694, 694, + 694, 694, 722, 686, 686, 686, 686, 686, 686, 686, + 717, 713, 719, 716, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 720, 686, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 721, 686, 694, 722, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 686, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 686, 694, 694, + 694, 694, 694, 694, 694, 694, 694, 694, 694, 694, + 694, 694, 694, 694, 694, 0, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686 } ; -static const flex_int16_t yy_nxt[1326] = +static const flex_int16_t yy_nxt[1331] = { 0, 17, 18, 19, 18, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -888,147 +890,147 @@ static const flex_int16_t yy_nxt[1326] = 51, 52, 53, 54, 43, 55, 43, 56, 57, 58, 59, 60, 43, 61, 62, 63, 64, 65, 66, 43, 67, 43, 68, 69, 70, 72, 73, 74, 79, 80, - 75, 72, 73, 74, 79, 80, 75, 680, 91, 101, + 75, 72, 73, 74, 79, 80, 75, 685, 686, 684, 81, 86, 16, 16, 86, 82, 81, 86, 16, 16, 86, 82, 90, 90, 90, 90, 90, 90, 90, 90, - 102, 105, 681, 184, 107, 679, 76, 185, 109, 109, - 109, 109, 76, 106, 113, 142, 143, 92, 93, 94, - 108, 95, 96, 144, 145, 97, 110, 118, 114, 115, - 132, 681, 119, 133, 152, 98, 77, 99, 150, 151, - 150, 150, 77, 678, 120, 210, 211, 153, 146, 116, - 111, 117, 117, 117, 117, 117, 117, 117, 117, 134, - 134, 134, 134, 147, 259, 160, 138, 161, 189, 167, - 162, 148, 194, 163, 190, 260, 195, 135, 168, 139, - 140, 112, 121, 164, 122, 122, 122, 122, 122, 122, - - 122, 122, 208, 165, 260, 169, 166, 170, 172, 123, - 124, 136, 125, 126, 127, 209, 173, 171, 174, 128, - 154, 175, 155, 677, 129, 123, 124, 176, 156, 187, - 177, 130, 141, 191, 216, 157, 158, 681, 159, 178, - 131, 179, 137, 127, 188, 200, 676, 180, 181, 192, - 213, 214, 193, 182, 183, 196, 232, 221, 197, 204, - 221, 201, 198, 205, 202, 206, 681, 207, 203, 199, - 217, 222, 328, 249, 266, 90, 90, 90, 90, 90, - 90, 90, 90, 109, 109, 109, 109, 233, 329, 239, - 250, 263, 215, 234, 240, 443, 264, 235, 268, 269, - - 216, 110, 216, 262, 236, 267, 444, 257, 237, 257, - 238, 259, 258, 258, 258, 258, 258, 258, 258, 258, - 270, 271, 260, 125, 126, 111, 150, 151, 150, 150, - 304, 291, 134, 134, 134, 134, 283, 296, 287, 284, - 292, 260, 125, 288, 308, 305, 306, 297, 675, 289, - 135, 131, 314, 249, 309, 674, 112, 117, 117, 117, - 117, 117, 117, 117, 117, 321, 315, 336, 673, 348, - 250, 322, 244, 245, 136, 331, 337, 403, 323, 332, - 342, 324, 221, 404, 343, 221, 357, 246, 244, 245, - 249, 359, 681, 672, 247, 251, 349, 252, 252, 252, - - 252, 252, 252, 252, 252, 137, 464, 362, 637, 363, - 364, 638, 253, 254, 347, 347, 347, 347, 347, 347, - 347, 347, 394, 395, 365, 363, 364, 255, 253, 254, - 360, 366, 360, 465, 256, 361, 361, 361, 361, 361, - 361, 361, 361, 367, 671, 367, 373, 374, 368, 368, - 368, 368, 368, 368, 368, 368, 258, 258, 258, 258, - 258, 258, 258, 258, 369, 373, 415, 416, 417, 418, - 670, 419, 420, 424, 375, 424, 424, 669, 370, 454, - 369, 454, 454, 466, 468, 371, 470, 472, 474, 657, - 668, 425, 667, 658, 462, 249, 666, 455, 347, 347, - - 347, 347, 347, 347, 347, 347, 109, 109, 109, 109, - 467, 469, 362, 471, 473, 475, 361, 361, 361, 361, - 361, 361, 361, 361, 110, 245, 377, 532, 254, 665, - 664, 379, 533, 456, 572, 573, 574, 663, 557, 246, - 662, 245, 255, 359, 254, 477, 247, 477, 111, 256, - 478, 478, 478, 478, 478, 478, 478, 478, 368, 368, - 368, 368, 368, 368, 368, 368, 373, 374, 661, 479, - 479, 134, 134, 134, 134, 424, 364, 424, 424, 112, - 480, 480, 559, 660, 659, 373, 656, 379, 655, 135, - 365, 654, 364, 425, 375, 653, 652, 366, 651, 480, - - 480, 534, 535, 536, 537, 650, 538, 539, 454, 649, - 454, 454, 648, 136, 478, 478, 478, 478, 478, 478, - 478, 478, 647, 646, 645, 644, 455, 643, 642, 610, - 641, 640, 639, 636, 635, 634, 633, 632, 631, 630, - 629, 628, 627, 583, 137, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 71, 71, 71, - 71, 71, 71, 71, 71, 71, 71, 71, 71, 78, - 78, 78, 78, 78, 78, 78, 78, 78, 78, 78, - 78, 83, 83, 83, 83, 83, 83, 83, 83, 83, - 83, 83, 83, 85, 85, 85, 85, 85, 85, 85, - - 85, 85, 85, 85, 85, 87, 87, 87, 87, 87, - 87, 87, 87, 87, 87, 87, 87, 103, 103, 626, - 103, 103, 103, 103, 103, 103, 103, 103, 103, 149, - 149, 149, 149, 149, 149, 149, 220, 625, 624, 220, - 220, 220, 220, 220, 220, 220, 220, 220, 223, 223, - 223, 223, 223, 623, 622, 621, 620, 619, 223, 224, - 224, 224, 224, 224, 618, 617, 616, 615, 614, 224, - 225, 225, 225, 225, 225, 613, 559, 557, 611, 610, - 225, 226, 226, 226, 226, 226, 608, 607, 606, 605, - 604, 226, 227, 227, 227, 227, 227, 603, 602, 601, - - 600, 599, 227, 228, 228, 228, 228, 228, 598, 597, - 596, 595, 594, 228, 229, 229, 229, 229, 229, 593, - 592, 591, 590, 589, 229, 230, 230, 230, 230, 230, - 588, 587, 586, 585, 584, 230, 248, 248, 248, 248, - 248, 248, 248, 248, 248, 248, 248, 248, 261, 261, - 261, 128, 128, 583, 581, 580, 128, 579, 128, 356, - 356, 356, 356, 356, 356, 356, 356, 356, 356, 356, - 356, 358, 358, 358, 358, 358, 358, 358, 358, 358, - 358, 358, 358, 258, 578, 258, 577, 576, 575, 258, - 372, 372, 372, 571, 372, 570, 372, 376, 376, 376, - - 376, 376, 376, 376, 376, 376, 376, 376, 376, 378, - 378, 378, 378, 378, 378, 378, 378, 378, 378, 378, - 378, 476, 476, 476, 476, 476, 476, 476, 476, 476, - 476, 476, 476, 361, 569, 361, 568, 567, 566, 361, - 368, 565, 368, 564, 563, 562, 368, 481, 481, 481, - 481, 481, 481, 481, 481, 481, 481, 481, 481, 556, - 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, - 556, 478, 561, 478, 560, 559, 557, 478, 558, 558, - 558, 558, 558, 558, 558, 558, 558, 558, 558, 558, - 582, 582, 582, 582, 582, 582, 582, 582, 582, 582, - - 582, 582, 609, 609, 609, 609, 609, 609, 609, 609, - 609, 609, 609, 609, 612, 612, 612, 555, 612, 612, - 612, 612, 612, 612, 612, 612, 555, 554, 554, 553, - 553, 552, 552, 551, 551, 550, 550, 549, 548, 547, - 546, 545, 544, 543, 542, 541, 540, 531, 530, 529, - 528, 527, 526, 525, 524, 523, 522, 521, 520, 519, - 518, 517, 516, 515, 514, 513, 512, 511, 510, 509, - 508, 507, 506, 505, 504, 503, 502, 501, 500, 499, - 498, 497, 496, 495, 494, 493, 492, 491, 490, 489, - 488, 487, 486, 485, 484, 483, 482, 379, 377, 370, - - 365, 359, 357, 463, 463, 461, 460, 459, 458, 457, - 453, 452, 451, 450, 449, 448, 447, 446, 445, 442, - 441, 440, 439, 438, 437, 436, 435, 434, 433, 432, - 431, 430, 429, 428, 427, 426, 423, 422, 421, 414, - 413, 412, 411, 410, 409, 408, 407, 406, 405, 402, - 401, 400, 399, 398, 397, 396, 393, 392, 391, 390, - 389, 388, 387, 386, 385, 384, 383, 382, 381, 380, - 379, 377, 251, 255, 246, 359, 357, 355, 354, 353, - 352, 351, 350, 346, 345, 344, 341, 340, 339, 338, - 335, 334, 333, 330, 327, 326, 325, 320, 319, 318, - - 317, 316, 313, 312, 311, 310, 307, 303, 302, 301, - 300, 299, 298, 295, 294, 293, 290, 286, 285, 282, - 281, 280, 279, 278, 277, 276, 275, 274, 273, 272, - 265, 129, 243, 242, 241, 232, 231, 219, 218, 212, - 186, 104, 100, 89, 681, 88, 88, 84, 84, 15, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681 + 92, 102, 106, 108, 143, 144, 76, 686, 110, 110, + 110, 110, 76, 114, 107, 119, 139, 683, 133, 109, + 120, 134, 103, 145, 146, 91, 111, 115, 116, 140, + 141, 185, 121, 147, 188, 186, 77, 168, 682, 93, + 94, 95, 77, 96, 97, 681, 169, 98, 148, 189, + 112, 135, 135, 135, 135, 153, 149, 99, 117, 100, + 118, 118, 118, 118, 118, 118, 118, 118, 154, 136, + 165, 190, 142, 151, 152, 151, 151, 191, 680, 192, + 166, 113, 122, 167, 123, 123, 123, 123, 123, 123, + + 123, 123, 178, 137, 170, 193, 171, 330, 194, 124, + 125, 179, 126, 127, 128, 222, 172, 195, 222, 129, + 155, 196, 156, 331, 130, 124, 125, 686, 157, 211, + 212, 131, 214, 215, 138, 158, 159, 161, 160, 162, + 132, 173, 163, 128, 209, 164, 180, 201, 217, 174, + 679, 175, 181, 182, 176, 234, 686, 210, 183, 184, + 177, 197, 241, 202, 198, 205, 203, 242, 199, 206, + 204, 207, 223, 208, 216, 200, 90, 90, 90, 90, + 90, 90, 90, 90, 218, 251, 235, 110, 110, 110, + 110, 264, 236, 265, 678, 268, 237, 261, 266, 270, + + 271, 285, 252, 238, 286, 111, 261, 239, 262, 240, + 677, 126, 127, 259, 217, 259, 217, 262, 260, 260, + 260, 260, 260, 260, 260, 260, 269, 262, 293, 112, + 126, 272, 273, 676, 306, 675, 262, 294, 316, 132, + 135, 135, 135, 135, 151, 152, 151, 151, 289, 307, + 308, 333, 317, 290, 222, 334, 674, 222, 136, 291, + 113, 118, 118, 118, 118, 118, 118, 118, 118, 298, + 310, 344, 323, 351, 338, 345, 246, 247, 324, 299, + 311, 673, 137, 339, 406, 325, 397, 398, 326, 672, + 407, 248, 246, 247, 251, 251, 671, 251, 249, 253, + + 352, 254, 254, 254, 254, 254, 254, 254, 254, 376, + 377, 252, 365, 138, 365, 446, 255, 256, 349, 349, + 349, 349, 349, 349, 349, 349, 447, 670, 376, 669, + 686, 257, 255, 256, 363, 668, 363, 378, 258, 364, + 364, 364, 364, 364, 364, 364, 364, 366, 367, 370, + 427, 370, 427, 427, 371, 371, 371, 371, 371, 371, + 371, 371, 368, 366, 367, 372, 468, 667, 428, 369, + 260, 260, 260, 260, 260, 260, 260, 260, 470, 373, + 666, 372, 418, 419, 420, 421, 374, 422, 423, 457, + 465, 457, 457, 469, 349, 349, 349, 349, 349, 349, + + 349, 349, 472, 474, 476, 471, 478, 458, 360, 110, + 110, 110, 110, 362, 364, 364, 364, 364, 364, 364, + 364, 364, 642, 247, 256, 643, 665, 111, 664, 473, + 475, 477, 427, 479, 427, 427, 380, 248, 257, 247, + 256, 382, 662, 459, 249, 258, 663, 481, 661, 481, + 428, 112, 482, 482, 482, 482, 482, 482, 482, 482, + 371, 371, 371, 371, 371, 371, 371, 371, 376, 377, + 483, 660, 483, 135, 135, 135, 135, 659, 658, 536, + 562, 484, 113, 484, 537, 362, 457, 376, 457, 457, + 657, 136, 538, 539, 540, 541, 378, 542, 543, 656, + + 484, 655, 484, 367, 458, 482, 482, 482, 482, 482, + 482, 482, 482, 564, 654, 137, 653, 368, 382, 367, + 577, 578, 579, 652, 369, 651, 650, 649, 648, 647, + 615, 646, 645, 644, 641, 640, 639, 638, 637, 636, + 635, 634, 633, 632, 588, 631, 138, 16, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 71, + 71, 71, 71, 71, 71, 71, 71, 71, 71, 71, + 71, 78, 78, 78, 78, 78, 78, 78, 78, 78, + 78, 78, 78, 83, 83, 83, 83, 83, 83, 83, + 83, 83, 83, 83, 83, 85, 85, 85, 85, 85, + + 85, 85, 85, 85, 85, 85, 85, 87, 87, 87, + 87, 87, 87, 87, 87, 87, 87, 87, 87, 104, + 104, 630, 104, 104, 104, 104, 104, 104, 104, 104, + 104, 150, 150, 150, 150, 150, 150, 150, 221, 629, + 628, 221, 221, 221, 221, 221, 221, 221, 221, 221, + 225, 225, 225, 225, 225, 627, 626, 625, 624, 623, + 225, 226, 226, 226, 226, 226, 622, 621, 620, 619, + 618, 226, 227, 227, 227, 227, 227, 564, 562, 616, + 615, 613, 227, 228, 228, 228, 228, 228, 612, 611, + 610, 609, 608, 228, 229, 229, 229, 229, 229, 607, + + 606, 605, 604, 603, 229, 230, 230, 230, 230, 230, + 602, 601, 600, 599, 598, 230, 231, 231, 231, 231, + 231, 597, 596, 595, 594, 593, 231, 232, 232, 232, + 232, 232, 592, 591, 590, 589, 588, 232, 250, 250, + 250, 250, 250, 250, 250, 250, 250, 250, 250, 250, + 263, 263, 263, 129, 129, 586, 585, 584, 129, 583, + 129, 359, 359, 359, 359, 359, 359, 359, 359, 359, + 359, 359, 359, 361, 361, 361, 361, 361, 361, 361, + 361, 361, 361, 361, 361, 260, 582, 260, 581, 580, + 576, 260, 375, 375, 375, 575, 375, 574, 375, 379, + + 379, 379, 379, 379, 379, 379, 379, 379, 379, 379, + 379, 381, 381, 381, 381, 381, 381, 381, 381, 381, + 381, 381, 381, 480, 480, 480, 480, 480, 480, 480, + 480, 480, 480, 480, 480, 364, 573, 364, 572, 571, + 570, 364, 371, 569, 371, 568, 567, 566, 371, 485, + 485, 485, 485, 485, 485, 485, 485, 485, 485, 485, + 485, 561, 561, 561, 561, 561, 561, 561, 561, 561, + 561, 561, 561, 482, 565, 482, 564, 562, 560, 482, + 563, 563, 563, 563, 563, 563, 563, 563, 563, 563, + 563, 563, 587, 587, 587, 587, 587, 587, 587, 587, + + 587, 587, 587, 587, 614, 614, 614, 614, 614, 614, + 614, 614, 614, 614, 614, 614, 617, 617, 617, 560, + 617, 617, 617, 617, 617, 617, 617, 617, 559, 559, + 558, 558, 557, 557, 556, 556, 555, 555, 554, 553, + 552, 551, 550, 549, 548, 547, 546, 545, 544, 535, + 534, 533, 532, 531, 530, 529, 528, 527, 526, 525, + 524, 523, 522, 521, 520, 519, 518, 517, 516, 515, + 514, 513, 512, 511, 510, 509, 508, 507, 506, 505, + 504, 503, 502, 501, 500, 499, 498, 497, 496, 495, + 494, 493, 492, 491, 490, 489, 488, 487, 486, 382, + + 380, 373, 368, 362, 360, 467, 467, 466, 464, 463, + 462, 461, 460, 456, 455, 454, 453, 452, 451, 450, + 449, 448, 445, 444, 443, 442, 441, 440, 439, 438, + 437, 436, 435, 434, 433, 432, 431, 430, 429, 426, + 425, 424, 417, 416, 415, 414, 413, 412, 411, 410, + 409, 408, 405, 404, 403, 402, 401, 400, 399, 396, + 395, 394, 393, 392, 391, 390, 389, 388, 387, 386, + 385, 384, 383, 382, 380, 253, 257, 248, 362, 360, + 358, 357, 356, 355, 354, 353, 350, 348, 347, 346, + 343, 342, 341, 340, 337, 336, 335, 332, 329, 328, + + 327, 322, 321, 320, 319, 318, 315, 314, 313, 312, + 309, 305, 304, 303, 302, 301, 300, 297, 296, 295, + 292, 288, 287, 284, 283, 282, 281, 280, 279, 278, + 277, 276, 275, 274, 267, 130, 245, 244, 243, 234, + 233, 224, 220, 219, 213, 187, 105, 101, 89, 686, + 88, 88, 84, 84, 15, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686 } ; -static const flex_int16_t yy_chk[1326] = +static const flex_int16_t yy_chk[1331] = { 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, @@ -1038,161 +1040,161 @@ static const flex_int16_t yy_chk[1326] = 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 5, 5, 5, 7, 7, - 5, 6, 6, 6, 8, 8, 6, 679, 23, 25, + 5, 6, 6, 6, 8, 8, 6, 684, 36, 683, 7, 11, 11, 11, 11, 7, 8, 12, 12, 12, 12, 8, 22, 22, 22, 22, 22, 22, 22, 22, - 25, 29, 36, 56, 30, 678, 5, 56, 31, 31, - 31, 31, 6, 29, 32, 40, 40, 23, 23, 23, - 30, 23, 23, 41, 41, 23, 31, 34, 32, 32, - 37, 36, 34, 37, 47, 23, 5, 23, 45, 45, - 45, 45, 6, 674, 34, 66, 66, 47, 42, 33, - 31, 33, 33, 33, 33, 33, 33, 33, 33, 38, - 38, 38, 38, 42, 126, 49, 39, 49, 59, 51, - 49, 42, 61, 49, 59, 126, 61, 38, 51, 39, - 39, 31, 35, 50, 35, 35, 35, 35, 35, 35, - - 35, 35, 65, 50, 126, 52, 50, 52, 53, 35, - 35, 38, 35, 35, 35, 65, 53, 52, 53, 35, - 48, 53, 48, 673, 35, 35, 35, 53, 48, 58, - 54, 35, 39, 60, 76, 48, 48, 122, 48, 54, - 35, 55, 38, 35, 58, 63, 672, 55, 55, 60, - 69, 69, 60, 55, 55, 62, 104, 86, 62, 64, - 86, 63, 62, 64, 63, 64, 122, 64, 63, 62, - 76, 90, 199, 119, 137, 90, 90, 90, 90, 90, - 90, 90, 90, 109, 109, 109, 109, 104, 199, 110, - 119, 135, 69, 104, 110, 329, 135, 104, 139, 139, - - 76, 109, 76, 128, 104, 137, 329, 123, 104, 123, - 104, 131, 123, 123, 123, 123, 123, 123, 123, 123, - 145, 145, 131, 128, 128, 109, 150, 150, 150, 150, - 181, 169, 134, 134, 134, 134, 164, 173, 167, 164, - 169, 131, 128, 167, 184, 181, 181, 173, 671, 167, - 134, 128, 189, 248, 184, 670, 109, 117, 117, 117, - 117, 117, 117, 117, 117, 195, 189, 205, 668, 232, - 248, 195, 117, 117, 134, 201, 205, 294, 195, 201, - 210, 195, 221, 294, 210, 221, 357, 117, 117, 117, - 250, 357, 252, 666, 117, 121, 232, 121, 121, 121, - - 121, 121, 121, 121, 121, 134, 350, 250, 601, 252, - 252, 601, 121, 121, 222, 222, 222, 222, 222, 222, - 222, 222, 286, 286, 252, 252, 252, 121, 121, 121, - 244, 252, 244, 350, 121, 244, 244, 244, 244, 244, - 244, 244, 244, 253, 664, 253, 261, 261, 253, 253, - 253, 253, 253, 253, 253, 253, 257, 257, 257, 257, - 257, 257, 257, 257, 258, 261, 306, 306, 306, 306, - 661, 306, 306, 310, 261, 310, 310, 658, 258, 340, - 258, 340, 340, 351, 352, 258, 353, 354, 355, 636, - 657, 310, 656, 636, 347, 362, 655, 340, 347, 347, - - 347, 347, 347, 347, 347, 347, 359, 359, 359, 359, - 351, 352, 362, 353, 354, 355, 360, 360, 360, 360, - 360, 360, 360, 360, 359, 361, 377, 448, 368, 650, - 648, 377, 448, 340, 501, 501, 501, 643, 557, 361, - 641, 361, 368, 557, 368, 363, 361, 363, 359, 368, - 363, 363, 363, 363, 363, 363, 363, 363, 367, 367, - 367, 367, 367, 367, 367, 367, 372, 372, 640, 374, - 375, 379, 379, 379, 379, 424, 478, 424, 424, 359, - 374, 375, 559, 639, 637, 372, 635, 559, 633, 379, - 478, 629, 478, 424, 372, 627, 626, 478, 623, 374, - - 375, 449, 449, 449, 449, 622, 449, 449, 454, 621, - 454, 454, 620, 379, 477, 477, 477, 477, 477, 477, - 477, 477, 618, 616, 614, 613, 454, 612, 611, 609, - 608, 605, 602, 598, 597, 593, 592, 591, 590, 588, - 587, 586, 585, 582, 379, 682, 682, 682, 682, 682, - 682, 682, 682, 682, 682, 682, 682, 683, 683, 683, - 683, 683, 683, 683, 683, 683, 683, 683, 683, 684, - 684, 684, 684, 684, 684, 684, 684, 684, 684, 684, - 684, 685, 685, 685, 685, 685, 685, 685, 685, 685, - 685, 685, 685, 686, 686, 686, 686, 686, 686, 686, - - 686, 686, 686, 686, 686, 687, 687, 687, 687, 687, - 687, 687, 687, 687, 687, 687, 687, 688, 688, 580, - 688, 688, 688, 688, 688, 688, 688, 688, 688, 689, - 689, 689, 689, 689, 689, 689, 690, 579, 578, 690, - 690, 690, 690, 690, 690, 690, 690, 690, 691, 691, - 691, 691, 691, 577, 576, 575, 571, 570, 691, 692, - 692, 692, 692, 692, 569, 565, 564, 563, 562, 692, - 693, 693, 693, 693, 693, 560, 558, 556, 545, 544, - 693, 694, 694, 694, 694, 694, 543, 542, 541, 540, - 538, 694, 695, 695, 695, 695, 695, 534, 533, 532, - - 529, 528, 695, 696, 696, 696, 696, 696, 527, 526, - 525, 524, 523, 696, 697, 697, 697, 697, 697, 522, - 521, 520, 519, 518, 697, 698, 698, 698, 698, 698, - 517, 516, 515, 514, 513, 698, 699, 699, 699, 699, - 699, 699, 699, 699, 699, 699, 699, 699, 700, 700, - 700, 701, 701, 512, 511, 509, 701, 506, 701, 702, - 702, 702, 702, 702, 702, 702, 702, 702, 702, 702, - 702, 703, 703, 703, 703, 703, 703, 703, 703, 703, - 703, 703, 703, 704, 505, 704, 504, 503, 502, 704, - 705, 705, 705, 500, 705, 499, 705, 706, 706, 706, - - 706, 706, 706, 706, 706, 706, 706, 706, 706, 707, - 707, 707, 707, 707, 707, 707, 707, 707, 707, 707, - 707, 708, 708, 708, 708, 708, 708, 708, 708, 708, - 708, 708, 708, 709, 497, 709, 496, 495, 493, 709, - 710, 492, 710, 491, 488, 485, 710, 711, 711, 711, - 711, 711, 711, 711, 711, 711, 711, 711, 711, 712, - 712, 712, 712, 712, 712, 712, 712, 712, 712, 712, - 712, 713, 484, 713, 482, 481, 476, 713, 714, 714, - 714, 714, 714, 714, 714, 714, 714, 714, 714, 714, - 715, 715, 715, 715, 715, 715, 715, 715, 715, 715, - - 715, 715, 716, 716, 716, 716, 716, 716, 716, 716, - 716, 716, 716, 716, 717, 717, 717, 475, 717, 717, - 717, 717, 717, 717, 717, 717, 474, 473, 472, 471, - 470, 469, 468, 467, 466, 465, 464, 462, 461, 459, - 458, 456, 455, 453, 452, 451, 450, 447, 445, 444, - 443, 442, 441, 440, 439, 438, 437, 436, 435, 434, - 433, 432, 430, 429, 428, 426, 425, 423, 422, 421, - 419, 415, 414, 413, 412, 410, 409, 408, 407, 406, - 405, 404, 403, 399, 398, 397, 396, 395, 394, 393, - 391, 390, 388, 387, 385, 384, 382, 378, 376, 371, - - 366, 358, 356, 349, 348, 345, 344, 343, 342, 341, - 339, 338, 337, 336, 335, 334, 333, 331, 330, 328, - 327, 326, 325, 324, 323, 322, 321, 320, 319, 318, - 317, 316, 315, 314, 313, 311, 309, 308, 307, 305, - 304, 303, 302, 301, 300, 298, 297, 296, 295, 293, - 292, 291, 290, 289, 288, 287, 285, 284, 283, 282, - 281, 280, 279, 278, 277, 276, 274, 273, 271, 268, - 264, 263, 262, 256, 247, 240, 239, 238, 237, 236, - 235, 234, 233, 215, 212, 211, 209, 208, 207, 206, - 204, 203, 202, 200, 198, 197, 196, 194, 193, 192, - - 191, 190, 188, 187, 186, 185, 183, 180, 178, 177, - 176, 175, 174, 172, 171, 170, 168, 166, 165, 163, - 162, 161, 160, 159, 158, 157, 156, 155, 154, 153, - 136, 130, 116, 112, 111, 103, 101, 82, 81, 67, - 57, 26, 24, 20, 15, 14, 13, 10, 9, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681, 681, 681, 681, 681, 681, - 681, 681, 681, 681, 681 + 23, 25, 29, 30, 40, 40, 5, 36, 31, 31, + 31, 31, 6, 32, 29, 34, 39, 679, 37, 30, + 34, 37, 25, 41, 41, 22, 31, 32, 32, 39, + 39, 56, 34, 42, 58, 56, 5, 51, 678, 23, + 23, 23, 6, 23, 23, 677, 51, 23, 42, 58, + 31, 38, 38, 38, 38, 47, 42, 23, 33, 23, + 33, 33, 33, 33, 33, 33, 33, 33, 47, 38, + 50, 59, 39, 45, 45, 45, 45, 59, 676, 60, + 50, 31, 35, 50, 35, 35, 35, 35, 35, 35, + + 35, 35, 54, 38, 52, 60, 52, 200, 60, 35, + 35, 54, 35, 35, 35, 86, 52, 61, 86, 35, + 48, 61, 48, 200, 35, 35, 35, 123, 48, 66, + 66, 35, 69, 69, 38, 48, 48, 49, 48, 49, + 35, 53, 49, 35, 65, 49, 55, 63, 76, 53, + 675, 53, 55, 55, 53, 105, 123, 65, 55, 55, + 53, 62, 111, 63, 62, 64, 63, 111, 62, 64, + 63, 64, 90, 64, 69, 62, 90, 90, 90, 90, + 90, 90, 90, 90, 76, 120, 105, 110, 110, 110, + 110, 129, 105, 136, 673, 138, 105, 127, 136, 140, + + 140, 165, 120, 105, 165, 110, 132, 105, 127, 105, + 671, 129, 129, 124, 76, 124, 76, 132, 124, 124, + 124, 124, 124, 124, 124, 124, 138, 127, 170, 110, + 129, 146, 146, 669, 182, 666, 132, 170, 190, 129, + 135, 135, 135, 135, 151, 151, 151, 151, 168, 182, + 182, 202, 190, 168, 222, 202, 663, 222, 135, 168, + 110, 118, 118, 118, 118, 118, 118, 118, 118, 174, + 185, 211, 196, 234, 206, 211, 118, 118, 196, 174, + 185, 662, 135, 206, 296, 196, 288, 288, 196, 661, + 296, 118, 118, 118, 250, 252, 660, 365, 118, 122, + + 234, 122, 122, 122, 122, 122, 122, 122, 122, 263, + 263, 250, 252, 135, 365, 331, 122, 122, 223, 223, + 223, 223, 223, 223, 223, 223, 331, 655, 263, 653, + 254, 122, 122, 122, 246, 648, 246, 263, 122, 246, + 246, 246, 246, 246, 246, 246, 246, 254, 254, 255, + 312, 255, 312, 312, 255, 255, 255, 255, 255, 255, + 255, 255, 254, 254, 254, 260, 353, 646, 312, 254, + 259, 259, 259, 259, 259, 259, 259, 259, 354, 260, + 645, 260, 308, 308, 308, 308, 260, 308, 308, 342, + 349, 342, 342, 353, 349, 349, 349, 349, 349, 349, + + 349, 349, 355, 356, 357, 354, 358, 342, 360, 362, + 362, 362, 362, 360, 363, 363, 363, 363, 363, 363, + 363, 363, 606, 364, 371, 606, 644, 362, 642, 355, + 356, 357, 427, 358, 427, 427, 380, 364, 371, 364, + 371, 380, 641, 342, 364, 371, 641, 366, 640, 366, + 427, 362, 366, 366, 366, 366, 366, 366, 366, 366, + 370, 370, 370, 370, 370, 370, 370, 370, 375, 375, + 377, 638, 378, 382, 382, 382, 382, 634, 632, 451, + 562, 377, 362, 378, 451, 562, 457, 375, 457, 457, + 631, 382, 452, 452, 452, 452, 375, 452, 452, 628, + + 377, 627, 378, 482, 457, 481, 481, 481, 481, 481, + 481, 481, 481, 564, 626, 382, 625, 482, 564, 482, + 505, 505, 505, 623, 482, 621, 619, 618, 617, 616, + 614, 613, 610, 607, 603, 602, 598, 597, 596, 595, + 593, 592, 591, 590, 587, 585, 382, 687, 687, 687, + 687, 687, 687, 687, 687, 687, 687, 687, 687, 688, + 688, 688, 688, 688, 688, 688, 688, 688, 688, 688, + 688, 689, 689, 689, 689, 689, 689, 689, 689, 689, + 689, 689, 689, 690, 690, 690, 690, 690, 690, 690, + 690, 690, 690, 690, 690, 691, 691, 691, 691, 691, + + 691, 691, 691, 691, 691, 691, 691, 692, 692, 692, + 692, 692, 692, 692, 692, 692, 692, 692, 692, 693, + 693, 584, 693, 693, 693, 693, 693, 693, 693, 693, + 693, 694, 694, 694, 694, 694, 694, 694, 695, 583, + 582, 695, 695, 695, 695, 695, 695, 695, 695, 695, + 696, 696, 696, 696, 696, 581, 580, 576, 575, 574, + 696, 697, 697, 697, 697, 697, 570, 569, 568, 567, + 565, 697, 698, 698, 698, 698, 698, 563, 561, 549, + 548, 547, 698, 699, 699, 699, 699, 699, 546, 545, + 544, 542, 538, 699, 700, 700, 700, 700, 700, 537, + + 536, 533, 532, 531, 700, 701, 701, 701, 701, 701, + 530, 529, 528, 527, 526, 701, 702, 702, 702, 702, + 702, 525, 524, 523, 522, 521, 702, 703, 703, 703, + 703, 703, 520, 519, 518, 517, 516, 703, 704, 704, + 704, 704, 704, 704, 704, 704, 704, 704, 704, 704, + 705, 705, 705, 706, 706, 515, 513, 510, 706, 509, + 706, 707, 707, 707, 707, 707, 707, 707, 707, 707, + 707, 707, 707, 708, 708, 708, 708, 708, 708, 708, + 708, 708, 708, 708, 708, 709, 508, 709, 507, 506, + 504, 709, 710, 710, 710, 503, 710, 501, 710, 711, + + 711, 711, 711, 711, 711, 711, 711, 711, 711, 711, + 711, 712, 712, 712, 712, 712, 712, 712, 712, 712, + 712, 712, 712, 713, 713, 713, 713, 713, 713, 713, + 713, 713, 713, 713, 713, 714, 500, 714, 499, 497, + 496, 714, 715, 495, 715, 492, 489, 488, 715, 716, + 716, 716, 716, 716, 716, 716, 716, 716, 716, 716, + 716, 717, 717, 717, 717, 717, 717, 717, 717, 717, + 717, 717, 717, 718, 486, 718, 485, 480, 479, 718, + 719, 719, 719, 719, 719, 719, 719, 719, 719, 719, + 719, 719, 720, 720, 720, 720, 720, 720, 720, 720, + + 720, 720, 720, 720, 721, 721, 721, 721, 721, 721, + 721, 721, 721, 721, 721, 721, 722, 722, 722, 478, + 722, 722, 722, 722, 722, 722, 722, 722, 477, 476, + 475, 474, 473, 472, 471, 470, 469, 468, 466, 465, + 464, 462, 461, 459, 458, 456, 455, 454, 453, 450, + 448, 447, 446, 445, 444, 443, 442, 441, 440, 439, + 438, 437, 436, 435, 433, 432, 431, 429, 428, 426, + 425, 424, 422, 418, 417, 416, 415, 413, 412, 411, + 410, 409, 408, 407, 406, 402, 401, 400, 399, 398, + 397, 396, 394, 393, 391, 390, 388, 387, 385, 381, + + 379, 374, 369, 361, 359, 352, 351, 350, 347, 346, + 345, 344, 343, 341, 340, 339, 338, 337, 336, 335, + 333, 332, 330, 329, 328, 327, 326, 325, 324, 323, + 322, 321, 320, 319, 318, 317, 316, 315, 313, 311, + 310, 309, 307, 306, 305, 304, 303, 302, 300, 299, + 298, 297, 295, 294, 293, 292, 291, 290, 289, 287, + 286, 285, 284, 283, 282, 281, 280, 279, 278, 276, + 275, 273, 270, 266, 265, 264, 258, 249, 242, 241, + 240, 239, 238, 237, 236, 235, 224, 216, 213, 212, + 210, 209, 208, 207, 205, 204, 203, 201, 199, 198, + + 197, 195, 194, 193, 192, 191, 189, 188, 187, 186, + 184, 181, 179, 178, 177, 176, 175, 173, 172, 171, + 169, 167, 166, 164, 163, 162, 161, 160, 159, 158, + 157, 156, 155, 154, 137, 131, 117, 113, 112, 104, + 102, 91, 82, 81, 67, 57, 26, 24, 20, 15, + 14, 13, 10, 9, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686, + 686, 686, 686, 686, 686, 686, 686, 686, 686, 686 } ; /* Table of booleans, true if rule could match eol. */ -static const flex_int32_t yy_rule_can_match_eol[235] = +static const flex_int32_t yy_rule_can_match_eol[236] = { 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, +0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, + 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, }; + 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, }; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. @@ -1252,11 +1254,11 @@ void das_accept_cpp_comment ( vector & crdi, yyscan_t scanner, #define YY_EXTRA_TYPE das::DasParserState * -#line 1255 "ds2_lexer.cpp" +#line 1257 "ds2_lexer.cpp" #define YY_NO_UNISTD_H 1 /* %option debug */ -#line 1259 "ds2_lexer.cpp" +#line 1261 "ds2_lexer.cpp" #define INITIAL 0 #define normal 1 @@ -1539,7 +1541,7 @@ YY_DECL #line 71 "ds2_lexer.lpp" -#line 1542 "ds2_lexer.cpp" +#line 1544 "ds2_lexer.cpp" while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { @@ -1566,13 +1568,13 @@ YY_DECL while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 682 ) + if ( yy_current_state >= 687 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; ++yy_cp; } - while ( yy_current_state != 681 ); + while ( yy_current_state != 686 ); yy_cp = yyg->yy_last_accepting_cpos; yy_current_state = yyg->yy_last_accepting_state; @@ -1605,9 +1607,14 @@ YY_DECL goto yy_find_action; case 1: -/* rule 1 can match eol */ YY_RULE_SETUP #line 73 "ds2_lexer.lpp" +{ /* skipping #gen2# text, which indicates type of syntax */ } + YY_BREAK +case 2: +/* rule 2 can match eol */ +YY_RULE_SETUP +#line 74 "ds2_lexer.lpp" { string txt = yytext; int lRow, lCol; @@ -1631,14 +1638,14 @@ YY_RULE_SETUP } } YY_BREAK -case 2: +case 3: YY_RULE_SETUP -#line 95 "ds2_lexer.lpp" +#line 96 "ds2_lexer.lpp" das2_yyfatalerror(yylloc_param,yyscanner,"Unexpected */", CompilationError::unexpected_close_comment); return LEXER_ERROR; YY_BREAK -case 3: +case 4: YY_RULE_SETUP -#line 96 "ds2_lexer.lpp" +#line 97 "ds2_lexer.lpp" { BEGIN(c_comment); yyextra->das_c_style_depth = 1; @@ -1648,9 +1655,9 @@ YY_RULE_SETUP } } YY_BREAK -case 4: +case 5: YY_RULE_SETUP -#line 104 "ds2_lexer.lpp" +#line 105 "ds2_lexer.lpp" { BEGIN(cpp_comment); if ( !yyextra->g_CommentReaders.empty() ) { @@ -1659,10 +1666,10 @@ YY_RULE_SETUP } } YY_BREAK -case 5: -/* rule 5 can match eol */ +case 6: +/* rule 6 can match eol */ YY_RULE_SETUP -#line 111 "ds2_lexer.lpp" +#line 112 "ds2_lexer.lpp" { BEGIN(normal); unput('\n'); @@ -1673,12 +1680,12 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(cpp_comment): -#line 119 "ds2_lexer.lpp" +#line 120 "ds2_lexer.lpp" BEGIN(normal); YY_BREAK -case 6: +case 7: YY_RULE_SETUP -#line 120 "ds2_lexer.lpp" +#line 121 "ds2_lexer.lpp" { if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(yyscanner,*yylloc_param); @@ -1686,16 +1693,16 @@ YY_RULE_SETUP } } YY_BREAK -case 7: +case 8: YY_RULE_SETUP -#line 126 "ds2_lexer.lpp" +#line 127 "ds2_lexer.lpp" { yyextra->das_c_style_depth ++; } YY_BREAK -case 8: +case 9: YY_RULE_SETUP -#line 129 "ds2_lexer.lpp" +#line 130 "ds2_lexer.lpp" { yyextra->das_c_style_depth --; if ( yyextra->das_c_style_depth==0 ) { @@ -1707,9 +1714,9 @@ YY_RULE_SETUP } } YY_BREAK -case 9: +case 10: YY_RULE_SETUP -#line 139 "ds2_lexer.lpp" +#line 140 "ds2_lexer.lpp" { /* skipping comment body */ if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(yyscanner,*yylloc_param); @@ -1717,10 +1724,10 @@ YY_RULE_SETUP } } YY_BREAK -case 10: -/* rule 10 can match eol */ +case 11: +/* rule 11 can match eol */ YY_RULE_SETUP -#line 145 "ds2_lexer.lpp" +#line 146 "ds2_lexer.lpp" { /* skipping comment eol */ if ( !yyextra->g_CommentReaders.empty() ) { auto tak = tokAt(yyscanner,*yylloc_param); @@ -1729,50 +1736,50 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(c_comment): -#line 151 "ds2_lexer.lpp" +#line 152 "ds2_lexer.lpp" { das2_yyfatalerror(yylloc_param,yyscanner,"end of file encountered inside c-style comment", CompilationError::comment_contains_eof); BEGIN(normal); } YY_BREAK case YY_STATE_EOF(reader): -#line 155 "ds2_lexer.lpp" +#line 156 "ds2_lexer.lpp" { das2_yyfatalerror(yylloc_param,yyscanner,"reader constant exceeds file", CompilationError::string_constant_exceeds_file); BEGIN(normal); return END_OF_READ; } YY_BREAK -case 11: -/* rule 11 can match eol */ +case 12: +/* rule 12 can match eol */ YY_RULE_SETUP -#line 160 "ds2_lexer.lpp" +#line 161 "ds2_lexer.lpp" { YY2NEWLINE(yyscanner); yylval_param->ch = yytext[0]; return STRING_CHARACTER; } YY_BREAK -case 12: +case 13: YY_RULE_SETUP -#line 165 "ds2_lexer.lpp" +#line 166 "ds2_lexer.lpp" { yylval_param->ch = yytext[0]; return STRING_CHARACTER; } YY_BREAK -case 13: +case 14: YY_RULE_SETUP -#line 169 "ds2_lexer.lpp" +#line 170 "ds2_lexer.lpp" { // assert(nested_sb==0); BEGIN(normal); return END_STRING; } YY_BREAK -case 14: +case 15: YY_RULE_SETUP -#line 174 "ds2_lexer.lpp" +#line 175 "ds2_lexer.lpp" { DAS_ASSERT(yyextra->das_nested_sb==0); yyextra->das_nested_sb ++; @@ -1781,67 +1788,67 @@ YY_RULE_SETUP } YY_BREAK case YY_STATE_EOF(strb): -#line 180 "ds2_lexer.lpp" +#line 181 "ds2_lexer.lpp" { das2_yyfatalerror(yylloc_param,yyscanner,"string constant exceeds file", CompilationError::string_constant_exceeds_file); BEGIN(normal); return END_STRING; } YY_BREAK -case 15: +case 16: YY_RULE_SETUP -#line 185 "ds2_lexer.lpp" +#line 186 "ds2_lexer.lpp" { return STRING_CHARACTER_ESC; } YY_BREAK -case 16: +case 17: YY_RULE_SETUP -#line 188 "ds2_lexer.lpp" +#line 189 "ds2_lexer.lpp" { yylval_param->ch = yytext[1]; return STRING_CHARACTER; } YY_BREAK -case 17: +case 18: YY_RULE_SETUP -#line 192 "ds2_lexer.lpp" +#line 193 "ds2_lexer.lpp" /* do exactly nothing */ YY_BREAK -case 18: -/* rule 18 can match eol */ +case 19: +/* rule 19 can match eol */ YY_RULE_SETUP -#line 193 "ds2_lexer.lpp" +#line 194 "ds2_lexer.lpp" { yylval_param->ch = *yytext; YY2NEWLINE(yyscanner); return STRING_CHARACTER; } YY_BREAK -case 19: +case 20: YY_RULE_SETUP -#line 198 "ds2_lexer.lpp" +#line 199 "ds2_lexer.lpp" { yylval_param->ch = *yytext; return STRING_CHARACTER; } YY_BREAK -case 20: +case 21: YY_RULE_SETUP -#line 202 "ds2_lexer.lpp" +#line 203 "ds2_lexer.lpp" { yylval_param->ch = *yytext; return STRING_CHARACTER; } YY_BREAK -case 21: +case 22: YY_RULE_SETUP -#line 206 "ds2_lexer.lpp" +#line 207 "ds2_lexer.lpp" /* eat the whitespace */ YY_BREAK -case 22: +case 23: YY_RULE_SETUP -#line 207 "ds2_lexer.lpp" +#line 208 "ds2_lexer.lpp" { /* got the include file name */ auto cfi = yyextra->g_FileAccessStack.back(); string incFileName = yyextra->g_Access->getIncludeFileName(cfi->name,yytext); @@ -1865,670 +1872,670 @@ YY_RULE_SETUP BEGIN(normal); } YY_BREAK -case 23: -YY_RULE_SETUP -#line 230 "ds2_lexer.lpp" -BEGIN(include); - YY_BREAK case 24: YY_RULE_SETUP #line 231 "ds2_lexer.lpp" -return DAS_CAPTURE; +BEGIN(include); YY_BREAK case 25: YY_RULE_SETUP #line 232 "ds2_lexer.lpp" -return DAS_FOR; +return DAS_CAPTURE; YY_BREAK case 26: YY_RULE_SETUP #line 233 "ds2_lexer.lpp" -return DAS_WHILE; +return DAS_FOR; YY_BREAK case 27: YY_RULE_SETUP #line 234 "ds2_lexer.lpp" -return DAS_IF; +return DAS_WHILE; YY_BREAK case 28: YY_RULE_SETUP #line 235 "ds2_lexer.lpp" -return DAS_STATIC_IF; +return DAS_IF; YY_BREAK case 29: YY_RULE_SETUP #line 236 "ds2_lexer.lpp" -return DAS_ELIF; +return DAS_STATIC_IF; YY_BREAK case 30: YY_RULE_SETUP #line 237 "ds2_lexer.lpp" -return DAS_STATIC_ELIF; +return DAS_ELIF; YY_BREAK case 31: YY_RULE_SETUP #line 238 "ds2_lexer.lpp" -return DAS_ELSE; +return DAS_STATIC_ELIF; YY_BREAK case 32: YY_RULE_SETUP #line 239 "ds2_lexer.lpp" -return DAS_FINALLY; +return DAS_ELSE; YY_BREAK case 33: YY_RULE_SETUP #line 240 "ds2_lexer.lpp" -return DAS_DEF; +return DAS_FINALLY; YY_BREAK case 34: YY_RULE_SETUP #line 241 "ds2_lexer.lpp" -return DAS_WITH; +return DAS_DEF; YY_BREAK case 35: YY_RULE_SETUP #line 242 "ds2_lexer.lpp" -return DAS_AKA; +return DAS_WITH; YY_BREAK case 36: YY_RULE_SETUP #line 243 "ds2_lexer.lpp" -return DAS_ASSUME; +return DAS_AKA; YY_BREAK case 37: -/* rule 37 can match eol */ YY_RULE_SETUP #line 244 "ds2_lexer.lpp" +return DAS_ASSUME; + YY_BREAK +case 38: +/* rule 38 can match eol */ +YY_RULE_SETUP +#line 245 "ds2_lexer.lpp" { // TODO: comment reader after let where? unput('\n'); das_accept_cpp_comment(yyextra->g_CommentReaders, yyscanner, *yylloc_param, yytext); return DAS_LET; } YY_BREAK -case 38: +case 39: YY_RULE_SETUP -#line 249 "ds2_lexer.lpp" +#line 250 "ds2_lexer.lpp" return DAS_LET; YY_BREAK -case 39: -/* rule 39 can match eol */ +case 40: +/* rule 40 can match eol */ YY_RULE_SETUP -#line 250 "ds2_lexer.lpp" +#line 251 "ds2_lexer.lpp" { // TODO: comment reader after var where? unput('\n'); das_accept_cpp_comment(yyextra->g_CommentReaders, yyscanner, *yylloc_param, yytext); return DAS_VAR; } YY_BREAK -case 40: -YY_RULE_SETUP -#line 255 "ds2_lexer.lpp" -return DAS_UNINITIALIZED; - YY_BREAK case 41: YY_RULE_SETUP #line 256 "ds2_lexer.lpp" -return DAS_VAR; +return DAS_UNINITIALIZED; YY_BREAK case 42: YY_RULE_SETUP #line 257 "ds2_lexer.lpp" -return DAS_STRUCT; +return DAS_VAR; YY_BREAK case 43: YY_RULE_SETUP #line 258 "ds2_lexer.lpp" -return DAS_CLASS; +return DAS_STRUCT; YY_BREAK case 44: YY_RULE_SETUP #line 259 "ds2_lexer.lpp" -return DAS_ENUM; +return DAS_CLASS; YY_BREAK case 45: YY_RULE_SETUP #line 260 "ds2_lexer.lpp" -return DAS_TRY; +return DAS_ENUM; YY_BREAK case 46: YY_RULE_SETUP #line 261 "ds2_lexer.lpp" -return DAS_CATCH; +return DAS_TRY; YY_BREAK case 47: YY_RULE_SETUP #line 262 "ds2_lexer.lpp" -return DAS_TYPEDEF; +return DAS_CATCH; YY_BREAK case 48: YY_RULE_SETUP #line 263 "ds2_lexer.lpp" -return DAS_TYPEDECL; +return DAS_TYPEDEF; YY_BREAK case 49: YY_RULE_SETUP #line 264 "ds2_lexer.lpp" -return DAS_LABEL; +return DAS_TYPEDECL; YY_BREAK case 50: YY_RULE_SETUP #line 265 "ds2_lexer.lpp" -return DAS_GOTO; +return DAS_LABEL; YY_BREAK case 51: YY_RULE_SETUP #line 266 "ds2_lexer.lpp" -return DAS_MODULE; +return DAS_GOTO; YY_BREAK case 52: YY_RULE_SETUP #line 267 "ds2_lexer.lpp" -return DAS_PUBLIC; +return DAS_MODULE; YY_BREAK case 53: YY_RULE_SETUP #line 268 "ds2_lexer.lpp" -return DAS_OPTIONS; +return DAS_PUBLIC; YY_BREAK case 54: YY_RULE_SETUP #line 269 "ds2_lexer.lpp" -return DAS_OPERATOR; +return DAS_OPTIONS; YY_BREAK case 55: YY_RULE_SETUP #line 270 "ds2_lexer.lpp" -return DAS_REQUIRE; +return DAS_OPERATOR; YY_BREAK case 56: YY_RULE_SETUP #line 271 "ds2_lexer.lpp" -return DAS_TBLOCK; +return DAS_REQUIRE; YY_BREAK case 57: YY_RULE_SETUP #line 272 "ds2_lexer.lpp" -return DAS_TFUNCTION; +return DAS_TBLOCK; YY_BREAK case 58: YY_RULE_SETUP #line 273 "ds2_lexer.lpp" -return DAS_TLAMBDA; +return DAS_TFUNCTION; YY_BREAK case 59: YY_RULE_SETUP #line 274 "ds2_lexer.lpp" -return DAS_GENERATOR; +return DAS_TLAMBDA; YY_BREAK case 60: YY_RULE_SETUP #line 275 "ds2_lexer.lpp" -return DAS_TTUPLE; +return DAS_GENERATOR; YY_BREAK case 61: YY_RULE_SETUP #line 276 "ds2_lexer.lpp" -return DAS_TVARIANT; +return DAS_TTUPLE; YY_BREAK case 62: YY_RULE_SETUP #line 277 "ds2_lexer.lpp" -return DAS_CONST; +return DAS_TVARIANT; YY_BREAK case 63: YY_RULE_SETUP #line 278 "ds2_lexer.lpp" -return DAS_CONTINUE; +return DAS_CONST; YY_BREAK case 64: YY_RULE_SETUP #line 279 "ds2_lexer.lpp" -return DAS_WHERE; +return DAS_CONTINUE; YY_BREAK case 65: YY_RULE_SETUP #line 280 "ds2_lexer.lpp" -return DAS_CAST; +return DAS_WHERE; YY_BREAK case 66: YY_RULE_SETUP #line 281 "ds2_lexer.lpp" -return DAS_UPCAST; +return DAS_CAST; YY_BREAK case 67: YY_RULE_SETUP #line 282 "ds2_lexer.lpp" -return DAS_PASS; +return DAS_UPCAST; YY_BREAK case 68: YY_RULE_SETUP #line 283 "ds2_lexer.lpp" -return DAS_REINTERPRET; +return DAS_PASS; YY_BREAK case 69: YY_RULE_SETUP #line 284 "ds2_lexer.lpp" -return DAS_OVERRIDE; +return DAS_REINTERPRET; YY_BREAK case 70: YY_RULE_SETUP #line 285 "ds2_lexer.lpp" -return DAS_SEALED; +return DAS_OVERRIDE; YY_BREAK case 71: YY_RULE_SETUP #line 286 "ds2_lexer.lpp" -return DAS_ABSTRACT; +return DAS_SEALED; YY_BREAK case 72: YY_RULE_SETUP #line 287 "ds2_lexer.lpp" -return DAS_EXPECT; +return DAS_ABSTRACT; YY_BREAK case 73: YY_RULE_SETUP #line 288 "ds2_lexer.lpp" -return DAS_TABLE; +return DAS_EXPECT; YY_BREAK case 74: YY_RULE_SETUP #line 289 "ds2_lexer.lpp" -return DAS_ARRAY; +return DAS_TABLE; YY_BREAK case 75: YY_RULE_SETUP #line 290 "ds2_lexer.lpp" -return DAS_FIXED_ARRAY; +return DAS_ARRAY; YY_BREAK case 76: YY_RULE_SETUP #line 291 "ds2_lexer.lpp" -return DAS_DEFAULT; +return DAS_FIXED_ARRAY; YY_BREAK case 77: YY_RULE_SETUP #line 292 "ds2_lexer.lpp" -return DAS_ITERATOR; +return DAS_DEFAULT; YY_BREAK case 78: YY_RULE_SETUP #line 293 "ds2_lexer.lpp" -return DAS_IN; +return DAS_ITERATOR; YY_BREAK case 79: YY_RULE_SETUP #line 294 "ds2_lexer.lpp" -return DAS_IMPLICIT; +return DAS_IN; YY_BREAK case 80: YY_RULE_SETUP #line 295 "ds2_lexer.lpp" -return DAS_EXPLICIT; +return DAS_IMPLICIT; YY_BREAK case 81: YY_RULE_SETUP #line 296 "ds2_lexer.lpp" -return DAS_SHARED; +return DAS_EXPLICIT; YY_BREAK case 82: YY_RULE_SETUP #line 297 "ds2_lexer.lpp" -return DAS_PRIVATE; +return DAS_SHARED; YY_BREAK case 83: YY_RULE_SETUP #line 298 "ds2_lexer.lpp" -return DAS_SMART_PTR; +return DAS_PRIVATE; YY_BREAK case 84: YY_RULE_SETUP #line 299 "ds2_lexer.lpp" -return DAS_UNSAFE; +return DAS_SMART_PTR; YY_BREAK case 85: YY_RULE_SETUP #line 300 "ds2_lexer.lpp" -return DAS_INSCOPE; +return DAS_UNSAFE; YY_BREAK case 86: YY_RULE_SETUP #line 301 "ds2_lexer.lpp" -return DAS_STATIC; +return DAS_INSCOPE; YY_BREAK case 87: YY_RULE_SETUP #line 302 "ds2_lexer.lpp" -return DAS_AS; +return DAS_STATIC; YY_BREAK case 88: YY_RULE_SETUP #line 303 "ds2_lexer.lpp" -return DAS_IS; +return DAS_AS; YY_BREAK case 89: YY_RULE_SETUP #line 304 "ds2_lexer.lpp" -return DAS_DEREF; +return DAS_IS; YY_BREAK case 90: YY_RULE_SETUP #line 305 "ds2_lexer.lpp" -return DAS_ADDR; +return DAS_DEREF; YY_BREAK case 91: YY_RULE_SETUP #line 306 "ds2_lexer.lpp" -return DAS_NULL; +return DAS_ADDR; YY_BREAK case 92: YY_RULE_SETUP #line 307 "ds2_lexer.lpp" -return DAS_RETURN; +return DAS_NULL; YY_BREAK case 93: YY_RULE_SETUP #line 308 "ds2_lexer.lpp" -return DAS_YIELD; +return DAS_RETURN; YY_BREAK case 94: YY_RULE_SETUP #line 309 "ds2_lexer.lpp" -return DAS_BREAK; +return DAS_YIELD; YY_BREAK case 95: YY_RULE_SETUP #line 310 "ds2_lexer.lpp" -return DAS_TYPEINFO; +return DAS_BREAK; YY_BREAK case 96: YY_RULE_SETUP #line 311 "ds2_lexer.lpp" -return DAS_TYPE; +return DAS_TYPEINFO; YY_BREAK case 97: YY_RULE_SETUP #line 312 "ds2_lexer.lpp" -return DAS_NEWT; +return DAS_TYPE; YY_BREAK case 98: YY_RULE_SETUP #line 313 "ds2_lexer.lpp" -return DAS_DELETE; +return DAS_NEWT; YY_BREAK case 99: YY_RULE_SETUP #line 314 "ds2_lexer.lpp" -return DAS_TRUE; +return DAS_DELETE; YY_BREAK case 100: YY_RULE_SETUP #line 315 "ds2_lexer.lpp" -return DAS_FALSE; +return DAS_TRUE; YY_BREAK case 101: YY_RULE_SETUP #line 316 "ds2_lexer.lpp" -return DAS_TAUTO; +return DAS_FALSE; YY_BREAK case 102: YY_RULE_SETUP #line 317 "ds2_lexer.lpp" -return DAS_TBOOL; +return DAS_TAUTO; YY_BREAK case 103: YY_RULE_SETUP #line 318 "ds2_lexer.lpp" -return DAS_TVOID; +return DAS_TBOOL; YY_BREAK case 104: YY_RULE_SETUP #line 319 "ds2_lexer.lpp" -return DAS_TSTRING; +return DAS_TVOID; YY_BREAK case 105: YY_RULE_SETUP #line 320 "ds2_lexer.lpp" -return DAS_TRANGE64; +return DAS_TSTRING; YY_BREAK case 106: YY_RULE_SETUP #line 321 "ds2_lexer.lpp" -return DAS_TURANGE64; +return DAS_TRANGE64; YY_BREAK case 107: YY_RULE_SETUP #line 322 "ds2_lexer.lpp" -return DAS_TRANGE; +return DAS_TURANGE64; YY_BREAK case 108: YY_RULE_SETUP #line 323 "ds2_lexer.lpp" -return DAS_TURANGE; +return DAS_TRANGE; YY_BREAK case 109: YY_RULE_SETUP #line 324 "ds2_lexer.lpp" -return DAS_TINT; +return DAS_TURANGE; YY_BREAK case 110: YY_RULE_SETUP #line 325 "ds2_lexer.lpp" -return DAS_TINT8; +return DAS_TINT; YY_BREAK case 111: YY_RULE_SETUP #line 326 "ds2_lexer.lpp" -return DAS_TINT16; +return DAS_TINT8; YY_BREAK case 112: YY_RULE_SETUP #line 327 "ds2_lexer.lpp" -return DAS_TINT64; +return DAS_TINT16; YY_BREAK case 113: YY_RULE_SETUP #line 328 "ds2_lexer.lpp" -return DAS_TINT2; +return DAS_TINT64; YY_BREAK case 114: YY_RULE_SETUP #line 329 "ds2_lexer.lpp" -return DAS_TINT3; +return DAS_TINT2; YY_BREAK case 115: YY_RULE_SETUP #line 330 "ds2_lexer.lpp" -return DAS_TINT4; +return DAS_TINT3; YY_BREAK case 116: YY_RULE_SETUP #line 331 "ds2_lexer.lpp" -return DAS_TUINT; +return DAS_TINT4; YY_BREAK case 117: YY_RULE_SETUP #line 332 "ds2_lexer.lpp" -return DAS_TBITFIELD; +return DAS_TUINT; YY_BREAK case 118: YY_RULE_SETUP #line 333 "ds2_lexer.lpp" -return DAS_TUINT8; +return DAS_TBITFIELD; YY_BREAK case 119: YY_RULE_SETUP #line 334 "ds2_lexer.lpp" -return DAS_TUINT16; +return DAS_TUINT8; YY_BREAK case 120: YY_RULE_SETUP #line 335 "ds2_lexer.lpp" -return DAS_TUINT64; +return DAS_TUINT16; YY_BREAK case 121: YY_RULE_SETUP #line 336 "ds2_lexer.lpp" -return DAS_TUINT2; +return DAS_TUINT64; YY_BREAK case 122: YY_RULE_SETUP #line 337 "ds2_lexer.lpp" -return DAS_TUINT3; +return DAS_TUINT2; YY_BREAK case 123: YY_RULE_SETUP #line 338 "ds2_lexer.lpp" -return DAS_TUINT4; +return DAS_TUINT3; YY_BREAK case 124: YY_RULE_SETUP #line 339 "ds2_lexer.lpp" -return DAS_TDOUBLE; +return DAS_TUINT4; YY_BREAK case 125: YY_RULE_SETUP #line 340 "ds2_lexer.lpp" -return DAS_TFLOAT; +return DAS_TDOUBLE; YY_BREAK case 126: YY_RULE_SETUP #line 341 "ds2_lexer.lpp" -return DAS_TFLOAT2; +return DAS_TFLOAT; YY_BREAK case 127: YY_RULE_SETUP #line 342 "ds2_lexer.lpp" -return DAS_TFLOAT3; +return DAS_TFLOAT2; YY_BREAK case 128: YY_RULE_SETUP #line 343 "ds2_lexer.lpp" -return DAS_TFLOAT4; +return DAS_TFLOAT3; YY_BREAK case 129: YY_RULE_SETUP #line 344 "ds2_lexer.lpp" +return DAS_TFLOAT4; + YY_BREAK +case 130: +YY_RULE_SETUP +#line 345 "ds2_lexer.lpp" { yylval_param->s = new string(yytext); return NAME; } YY_BREAK -case 130: +case 131: YY_RULE_SETUP -#line 348 "ds2_lexer.lpp" +#line 349 "ds2_lexer.lpp" { BEGIN(strb); return BEGIN_STRING; } YY_BREAK -case 131: -YY_RULE_SETUP -#line 352 "ds2_lexer.lpp" -yylval_param->ui = 8; return UNSIGNED_INT8; - YY_BREAK case 132: YY_RULE_SETUP #line 353 "ds2_lexer.lpp" -yylval_param->ui = 9; return UNSIGNED_INT8; +yylval_param->ui = 8; return UNSIGNED_INT8; YY_BREAK case 133: YY_RULE_SETUP #line 354 "ds2_lexer.lpp" -yylval_param->ui = 10; return UNSIGNED_INT8; +yylval_param->ui = 9; return UNSIGNED_INT8; YY_BREAK case 134: YY_RULE_SETUP #line 355 "ds2_lexer.lpp" -yylval_param->ui = 12; return UNSIGNED_INT8; +yylval_param->ui = 10; return UNSIGNED_INT8; YY_BREAK case 135: YY_RULE_SETUP #line 356 "ds2_lexer.lpp" -yylval_param->ui = 13; return UNSIGNED_INT8; +yylval_param->ui = 12; return UNSIGNED_INT8; YY_BREAK case 136: YY_RULE_SETUP #line 357 "ds2_lexer.lpp" -yylval_param->ui = '\\'; return UNSIGNED_INT8; +yylval_param->ui = 13; return UNSIGNED_INT8; YY_BREAK case 137: YY_RULE_SETUP #line 358 "ds2_lexer.lpp" -yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INT8; +yylval_param->ui = '\\'; return UNSIGNED_INT8; YY_BREAK case 138: YY_RULE_SETUP -#line 360 "ds2_lexer.lpp" -yylval_param->ui = 8; return UNSIGNED_INTEGER; +#line 359 "ds2_lexer.lpp" +yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INT8; YY_BREAK case 139: YY_RULE_SETUP #line 361 "ds2_lexer.lpp" -yylval_param->ui = 9; return UNSIGNED_INTEGER; +yylval_param->ui = 8; return UNSIGNED_INTEGER; YY_BREAK case 140: YY_RULE_SETUP #line 362 "ds2_lexer.lpp" -yylval_param->ui = 10; return UNSIGNED_INTEGER; +yylval_param->ui = 9; return UNSIGNED_INTEGER; YY_BREAK case 141: YY_RULE_SETUP #line 363 "ds2_lexer.lpp" -yylval_param->ui = 12; return UNSIGNED_INTEGER; +yylval_param->ui = 10; return UNSIGNED_INTEGER; YY_BREAK case 142: YY_RULE_SETUP #line 364 "ds2_lexer.lpp" -yylval_param->ui = 13; return UNSIGNED_INTEGER; +yylval_param->ui = 12; return UNSIGNED_INTEGER; YY_BREAK case 143: YY_RULE_SETUP #line 365 "ds2_lexer.lpp" -yylval_param->ui = '\\'; return UNSIGNED_INTEGER; +yylval_param->ui = 13; return UNSIGNED_INTEGER; YY_BREAK case 144: YY_RULE_SETUP #line 366 "ds2_lexer.lpp" -yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INTEGER; +yylval_param->ui = '\\'; return UNSIGNED_INTEGER; YY_BREAK case 145: YY_RULE_SETUP -#line 368 "ds2_lexer.lpp" -yylval_param->i = 8; return INTEGER; +#line 367 "ds2_lexer.lpp" +yylval_param->ui = uint32_t(yytext[1]); return UNSIGNED_INTEGER; YY_BREAK case 146: YY_RULE_SETUP #line 369 "ds2_lexer.lpp" -yylval_param->i = 9; return INTEGER; +yylval_param->i = 8; return INTEGER; YY_BREAK case 147: YY_RULE_SETUP #line 370 "ds2_lexer.lpp" -yylval_param->i = 10; return INTEGER; +yylval_param->i = 9; return INTEGER; YY_BREAK case 148: YY_RULE_SETUP #line 371 "ds2_lexer.lpp" -yylval_param->i = 12; return INTEGER; +yylval_param->i = 10; return INTEGER; YY_BREAK case 149: YY_RULE_SETUP #line 372 "ds2_lexer.lpp" -yylval_param->i = 13; return INTEGER; +yylval_param->i = 12; return INTEGER; YY_BREAK case 150: YY_RULE_SETUP #line 373 "ds2_lexer.lpp" -yylval_param->i = '\\'; return INTEGER; +yylval_param->i = 13; return INTEGER; YY_BREAK case 151: YY_RULE_SETUP -#line 375 "ds2_lexer.lpp" -yylval_param->i = int32_t(yytext[1]); return INTEGER; +#line 374 "ds2_lexer.lpp" +yylval_param->i = '\\'; return INTEGER; YY_BREAK case 152: YY_RULE_SETUP #line 376 "ds2_lexer.lpp" +yylval_param->i = int32_t(yytext[1]); return INTEGER; + YY_BREAK +case 153: +YY_RULE_SETUP +#line 377 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2541,9 +2548,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 153: +case 154: YY_RULE_SETUP -#line 387 "ds2_lexer.lpp" +#line 388 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2556,9 +2563,9 @@ YY_RULE_SETUP return LONG_INTEGER; } YY_BREAK -case 154: +case 155: YY_RULE_SETUP -#line 398 "ds2_lexer.lpp" +#line 399 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2573,9 +2580,9 @@ YY_RULE_SETUP return UNSIGNED_INT8; } YY_BREAK -case 155: +case 156: YY_RULE_SETUP -#line 411 "ds2_lexer.lpp" +#line 412 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2588,9 +2595,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 156: +case 157: YY_RULE_SETUP -#line 422 "ds2_lexer.lpp" +#line 423 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2607,9 +2614,9 @@ YY_RULE_SETUP return INTEGER; } YY_BREAK -case 157: +case 158: YY_RULE_SETUP -#line 437 "ds2_lexer.lpp" +#line 438 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2622,9 +2629,9 @@ YY_RULE_SETUP return INTEGER; } YY_BREAK -case 158: +case 159: YY_RULE_SETUP -#line 448 "ds2_lexer.lpp" +#line 449 "ds2_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2637,9 +2644,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 159: +case 160: YY_RULE_SETUP -#line 459 "ds2_lexer.lpp" +#line 460 "ds2_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2652,9 +2659,9 @@ YY_RULE_SETUP return UNSIGNED_LONG_INTEGER; } YY_BREAK -case 160: +case 161: YY_RULE_SETUP -#line 470 "ds2_lexer.lpp" +#line 471 "ds2_lexer.lpp" { char temptext[128]; int templength = skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2679,9 +2686,9 @@ YY_RULE_SETUP } } YY_BREAK -case 161: +case 162: YY_RULE_SETUP -#line 493 "ds2_lexer.lpp" +#line 494 "ds2_lexer.lpp" { char temptext[128]; skip_underscode(yytext,temptext,temptext+sizeof(temptext)); @@ -2694,9 +2701,9 @@ YY_RULE_SETUP return UNSIGNED_INTEGER; } YY_BREAK -case 162: +case 163: YY_RULE_SETUP -#line 504 "ds2_lexer.lpp" +#line 505 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2707,9 +2714,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 163: +case 164: YY_RULE_SETUP -#line 513 "ds2_lexer.lpp" +#line 514 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2721,9 +2728,9 @@ YY_RULE_SETUP } YY_BREAK -case 164: +case 165: YY_RULE_SETUP -#line 523 "ds2_lexer.lpp" +#line 524 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2734,9 +2741,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 165: +case 166: YY_RULE_SETUP -#line 532 "ds2_lexer.lpp" +#line 533 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->fd); if ( res.ec == std::errc::result_out_of_range ) { @@ -2747,9 +2754,9 @@ YY_RULE_SETUP return FLOAT; } YY_BREAK -case 166: +case 167: YY_RULE_SETUP -#line 541 "ds2_lexer.lpp" +#line 542 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2760,9 +2767,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 167: +case 168: YY_RULE_SETUP -#line 550 "ds2_lexer.lpp" +#line 551 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2773,9 +2780,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 168: +case 169: YY_RULE_SETUP -#line 559 "ds2_lexer.lpp" +#line 560 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2786,9 +2793,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 169: +case 170: YY_RULE_SETUP -#line 568 "ds2_lexer.lpp" +#line 569 "ds2_lexer.lpp" { auto res = fast_float::from_chars(yytext, yytext+strlen(yytext), yylval_param->d); if ( res.ec == std::errc::result_out_of_range ) { @@ -2799,9 +2806,9 @@ YY_RULE_SETUP return DOUBLE; } YY_BREAK -case 170: +case 171: YY_RULE_SETUP -#line 577 "ds2_lexer.lpp" +#line 578 "ds2_lexer.lpp" { if ( !yyextra->das_nested_parentheses ) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching parentheses", CompilationError::mismatching_parentheses); @@ -2811,17 +2818,17 @@ YY_RULE_SETUP return ')'; } YY_BREAK -case 171: +case 172: YY_RULE_SETUP -#line 585 "ds2_lexer.lpp" +#line 586 "ds2_lexer.lpp" { yyextra->das_nested_parentheses ++; return '('; } YY_BREAK -case 172: +case 173: YY_RULE_SETUP -#line 589 "ds2_lexer.lpp" +#line 590 "ds2_lexer.lpp" { if ( !yyextra->das_nested_square_braces ) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -2831,17 +2838,17 @@ YY_RULE_SETUP return ']'; } YY_BREAK -case 173: +case 174: YY_RULE_SETUP -#line 597 "ds2_lexer.lpp" +#line 598 "ds2_lexer.lpp" { yyextra->das_nested_square_braces ++; return '['; } YY_BREAK -case 174: +case 175: YY_RULE_SETUP -#line 601 "ds2_lexer.lpp" +#line 602 "ds2_lexer.lpp" { if ( yyextra->das_nested_sb ) { yyextra->das_nested_sb --; @@ -2861,9 +2868,9 @@ YY_RULE_SETUP } } YY_BREAK -case 175: +case 176: YY_RULE_SETUP -#line 619 "ds2_lexer.lpp" +#line 620 "ds2_lexer.lpp" { if ( yyextra->das_nested_sb ) { yyextra->das_nested_sb ++; @@ -2873,220 +2880,220 @@ YY_RULE_SETUP return '{'; } YY_BREAK -case 176: -YY_RULE_SETUP -#line 627 "ds2_lexer.lpp" -return COLCOL; - YY_BREAK case 177: YY_RULE_SETUP #line 628 "ds2_lexer.lpp" -return MTAG_DOTDOTDOT; +return COLCOL; YY_BREAK case 178: YY_RULE_SETUP #line 629 "ds2_lexer.lpp" -return DOTDOT; +return MTAG_DOTDOTDOT; YY_BREAK case 179: YY_RULE_SETUP #line 630 "ds2_lexer.lpp" -return RPIPE; +return DOTDOT; YY_BREAK case 180: YY_RULE_SETUP #line 631 "ds2_lexer.lpp" -return LPIPE; +return RPIPE; YY_BREAK case 181: YY_RULE_SETUP #line 632 "ds2_lexer.lpp" -return MTAG_E; +return LPIPE; YY_BREAK case 182: -/* rule 182 can match eol */ YY_RULE_SETUP #line 633 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_E; +return MTAG_E; YY_BREAK case 183: /* rule 183 can match eol */ YY_RULE_SETUP #line 634 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_I; +unput(yytext[yyleng-1]); return MTAG_E; YY_BREAK case 184: /* rule 184 can match eol */ YY_RULE_SETUP #line 635 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_V; +unput(yytext[yyleng-1]); return MTAG_I; YY_BREAK case 185: /* rule 185 can match eol */ YY_RULE_SETUP #line 636 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_B; +unput(yytext[yyleng-1]); return MTAG_V; YY_BREAK case 186: /* rule 186 can match eol */ YY_RULE_SETUP #line 637 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_A; +unput(yytext[yyleng-1]); return MTAG_B; YY_BREAK case 187: /* rule 187 can match eol */ YY_RULE_SETUP #line 638 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_T; +unput(yytext[yyleng-1]); return MTAG_A; YY_BREAK case 188: /* rule 188 can match eol */ YY_RULE_SETUP #line 639 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_C; +unput(yytext[yyleng-1]); return MTAG_T; YY_BREAK case 189: /* rule 189 can match eol */ YY_RULE_SETUP #line 640 "ds2_lexer.lpp" -unput(yytext[yyleng-1]); return MTAG_F; +unput(yytext[yyleng-1]); return MTAG_C; YY_BREAK case 190: +/* rule 190 can match eol */ YY_RULE_SETUP #line 641 "ds2_lexer.lpp" -return QQ; +unput(yytext[yyleng-1]); return MTAG_F; YY_BREAK case 191: YY_RULE_SETUP #line 642 "ds2_lexer.lpp" +return QQ; + YY_BREAK +case 192: +YY_RULE_SETUP +#line 643 "ds2_lexer.lpp" { yyextra->das_nested_square_braces ++; return QBRA; } YY_BREAK -case 192: -YY_RULE_SETUP -#line 646 "ds2_lexer.lpp" -return QDOT; - YY_BREAK case 193: YY_RULE_SETUP #line 647 "ds2_lexer.lpp" -return CLONEEQU; +return QDOT; YY_BREAK case 194: YY_RULE_SETUP #line 648 "ds2_lexer.lpp" -return RARROW; +return CLONEEQU; YY_BREAK case 195: YY_RULE_SETUP #line 649 "ds2_lexer.lpp" -return LARROW; +return RARROW; YY_BREAK case 196: YY_RULE_SETUP #line 650 "ds2_lexer.lpp" -return ADDEQU; +return LARROW; YY_BREAK case 197: YY_RULE_SETUP #line 651 "ds2_lexer.lpp" -return SUBEQU; +return ADDEQU; YY_BREAK case 198: YY_RULE_SETUP #line 652 "ds2_lexer.lpp" -return DIVEQU; +return SUBEQU; YY_BREAK case 199: YY_RULE_SETUP #line 653 "ds2_lexer.lpp" -return MULEQU; +return DIVEQU; YY_BREAK case 200: YY_RULE_SETUP #line 654 "ds2_lexer.lpp" -return MODEQU; +return MULEQU; YY_BREAK case 201: YY_RULE_SETUP #line 655 "ds2_lexer.lpp" -return ANDANDEQU; +return MODEQU; YY_BREAK case 202: YY_RULE_SETUP #line 656 "ds2_lexer.lpp" -return OROREQU; +return ANDANDEQU; YY_BREAK case 203: YY_RULE_SETUP #line 657 "ds2_lexer.lpp" -return XORXOREQU; +return OROREQU; YY_BREAK case 204: YY_RULE_SETUP #line 658 "ds2_lexer.lpp" -return ANDAND; +return XORXOREQU; YY_BREAK case 205: YY_RULE_SETUP #line 659 "ds2_lexer.lpp" -return OROR; +return ANDAND; YY_BREAK case 206: YY_RULE_SETUP #line 660 "ds2_lexer.lpp" -return XORXOR; +return OROR; YY_BREAK case 207: YY_RULE_SETUP #line 661 "ds2_lexer.lpp" -return ANDEQU; +return XORXOR; YY_BREAK case 208: YY_RULE_SETUP #line 662 "ds2_lexer.lpp" -return OREQU; +return ANDEQU; YY_BREAK case 209: YY_RULE_SETUP #line 663 "ds2_lexer.lpp" -return XOREQU; +return OREQU; YY_BREAK case 210: YY_RULE_SETUP #line 664 "ds2_lexer.lpp" -return ADDADD; +return XOREQU; YY_BREAK case 211: YY_RULE_SETUP #line 665 "ds2_lexer.lpp" -return SUBSUB; +return ADDADD; YY_BREAK case 212: YY_RULE_SETUP #line 666 "ds2_lexer.lpp" -return LEEQU; +return SUBSUB; YY_BREAK case 213: YY_RULE_SETUP #line 667 "ds2_lexer.lpp" -return GREQU; +return LEEQU; YY_BREAK case 214: YY_RULE_SETUP #line 668 "ds2_lexer.lpp" -return EQUEQU; +return GREQU; YY_BREAK case 215: YY_RULE_SETUP #line 669 "ds2_lexer.lpp" -return NOTEQU; +return EQUEQU; YY_BREAK case 216: YY_RULE_SETUP #line 670 "ds2_lexer.lpp" +return NOTEQU; + YY_BREAK +case 217: +YY_RULE_SETUP +#line 671 "ds2_lexer.lpp" { if ( yyextra->das_arrow_depth ) { unput('>'); @@ -3098,9 +3105,9 @@ YY_RULE_SETUP } } YY_BREAK -case 217: +case 218: YY_RULE_SETUP -#line 680 "ds2_lexer.lpp" +#line 681 "ds2_lexer.lpp" { if ( yyextra->das_arrow_depth ) { unput('>'); @@ -3111,50 +3118,50 @@ YY_RULE_SETUP } } YY_BREAK -case 218: -YY_RULE_SETUP -#line 689 "ds2_lexer.lpp" -return ROTL; - YY_BREAK case 219: YY_RULE_SETUP #line 690 "ds2_lexer.lpp" -return SHL; +return ROTL; YY_BREAK case 220: YY_RULE_SETUP #line 691 "ds2_lexer.lpp" -return SHREQU; +return SHL; YY_BREAK case 221: YY_RULE_SETUP #line 692 "ds2_lexer.lpp" -return SHLEQU; +return SHREQU; YY_BREAK case 222: YY_RULE_SETUP #line 693 "ds2_lexer.lpp" -return ROTREQU; +return SHLEQU; YY_BREAK case 223: YY_RULE_SETUP #line 694 "ds2_lexer.lpp" -return ROTLEQU; +return ROTREQU; YY_BREAK case 224: YY_RULE_SETUP #line 695 "ds2_lexer.lpp" -return MAPTO; +return ROTLEQU; YY_BREAK case 225: YY_RULE_SETUP #line 696 "ds2_lexer.lpp" -/* skip white space */ +return MAPTO; YY_BREAK case 226: -/* rule 226 can match eol */ YY_RULE_SETUP -#line 698 "ds2_lexer.lpp" +#line 697 "ds2_lexer.lpp" +/* skip white space */ + YY_BREAK +case 227: +/* rule 227 can match eol */ +YY_RULE_SETUP +#line 699 "ds2_lexer.lpp" { if ( yyextra->das_nested_curly_braces < 2 ) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3164,10 +3171,10 @@ YY_RULE_SETUP return SEMICOLON_CUR_CUR; } YY_BREAK -case 227: -/* rule 227 can match eol */ +case 228: +/* rule 228 can match eol */ YY_RULE_SETUP -#line 707 "ds2_lexer.lpp" +#line 708 "ds2_lexer.lpp" { if ( !yyextra->das_nested_curly_braces ) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3182,10 +3189,10 @@ YY_RULE_SETUP return SEMICOLON_CUR_SQR; } YY_BREAK -case 228: -/* rule 228 can match eol */ +case 229: +/* rule 229 can match eol */ YY_RULE_SETUP -#line 721 "ds2_lexer.lpp" +#line 722 "ds2_lexer.lpp" { if ( !yyextra->das_nested_curly_braces ) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching curly braces", CompilationError::mismatching_parentheses); @@ -3200,10 +3207,10 @@ YY_RULE_SETUP return COMMA_CUR_SQR; } YY_BREAK -case 229: -/* rule 229 can match eol */ +case 230: +/* rule 230 can match eol */ YY_RULE_SETUP -#line 735 "ds2_lexer.lpp" +#line 736 "ds2_lexer.lpp" { if ( yyextra->das_nested_square_braces < 2) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -3213,10 +3220,10 @@ YY_RULE_SETUP return SEMICOLON_SQR_SQR; } YY_BREAK -case 230: -/* rule 230 can match eol */ +case 231: +/* rule 231 can match eol */ YY_RULE_SETUP -#line 744 "ds2_lexer.lpp" +#line 745 "ds2_lexer.lpp" { if ( yyextra->das_nested_square_braces < 2) { das2_yyfatalerror(yylloc_param,yyscanner,"mismatching square braces", CompilationError::mismatching_parentheses); @@ -3226,25 +3233,25 @@ YY_RULE_SETUP return COMMA_SQR_SQR; } YY_BREAK -case 231: -/* rule 231 can match eol */ +case 232: +/* rule 232 can match eol */ YY_RULE_SETUP -#line 752 "ds2_lexer.lpp" +#line 753 "ds2_lexer.lpp" { YYCOLUMN(yyextra->das_yycolumn = 0, "NEW LINE"); } YY_BREAK -case 232: -/* rule 232 can match eol */ +case 233: +/* rule 233 can match eol */ YY_RULE_SETUP -#line 755 "ds2_lexer.lpp" +#line 756 "ds2_lexer.lpp" { YYCOLUMN(yyextra->das_yycolumn = 0, "NEW LINE"); das_accept_cpp_comment(yyextra->g_CommentReaders, yyscanner, *yylloc_param, yytext); } YY_BREAK case YY_STATE_EOF(normal): -#line 759 "ds2_lexer.lpp" +#line 760 "ds2_lexer.lpp" { if ( yyextra->g_FileAccessStack.size()==1 ) { YYCOLUMN(yyextra->das_yycolumn = 0,"EOF"); @@ -3257,17 +3264,17 @@ case YY_STATE_EOF(normal): } } YY_BREAK -case 233: +case 234: YY_RULE_SETUP -#line 770 "ds2_lexer.lpp" +#line 771 "ds2_lexer.lpp" return *yytext; YY_BREAK -case 234: +case 235: YY_RULE_SETUP -#line 772 "ds2_lexer.lpp" +#line 773 "ds2_lexer.lpp" ECHO; YY_BREAK -#line 3270 "ds2_lexer.cpp" +#line 3277 "ds2_lexer.cpp" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(include): yyterminate(); @@ -3568,7 +3575,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 682 ) + if ( yy_current_state >= 687 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; @@ -3597,11 +3604,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner) while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; - if ( yy_current_state >= 682 ) + if ( yy_current_state >= 687 ) yy_c = yy_meta[yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + yy_c]; - yy_is_jam = (yy_current_state == 681); + yy_is_jam = (yy_current_state == 686); (void)yyg; return yy_is_jam ? 0 : yy_current_state; @@ -4461,7 +4468,7 @@ void yyfree (void * ptr , yyscan_t yyscanner) #define YYTABLES_NAME "yytables" -#line 772 "ds2_lexer.lpp" +#line 773 "ds2_lexer.lpp" void das2_accept_sequence ( yyscan_t yyscanner, const char * seq, size_t seqLen, int lineNo, FileInfo * info ) { diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.lpp b/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.lpp index 7927a41e0..d04756c98 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.lpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_lexer.lpp @@ -70,6 +70,7 @@ void das_accept_cpp_comment ( vector & crdi, yyscan_t scanner, %% +\#gen2\# { /* skipping #gen2# text, which indicates type of syntax */ } \#[0-9]+,[0-9]+,\"[^\"]+\"\# { string txt = yytext; int lRow, lCol; diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp index d42bb51b8..f480a10fe 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.cpp @@ -933,7 +933,7 @@ union yyalloc /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ -#define YYLAST 10703 +#define YYLAST 10704 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 210 @@ -942,7 +942,7 @@ union yyalloc /* YYNRULES -- Number of rules. */ #define YYNRULES 769 /* YYNSTATES -- Number of states. */ -#define YYNSTATES 1414 +#define YYNSTATES 1415 /* YYMAXUTOK -- Last valid token kind. */ #define YYMAXUTOK 437 @@ -1224,7 +1224,7 @@ yysymbol_name (yysymbol_kind_t yysymbol) } #endif -#define YYPACT_NINF (-1246) +#define YYPACT_NINF (-1236) #define yypact_value_is_default(Yyn) \ ((Yyn) == YYPACT_NINF) @@ -1238,148 +1238,148 @@ yysymbol_name (yysymbol_kind_t yysymbol) STATE-NUM. */ static const yytype_int16 yypact[] = { - -1246, 22, -1246, -1246, 48, -98, -26, 427, -1246, -46, - 427, 427, 427, -1246, -93, 16, -1246, -1246, -96, -1246, - -1246, -1246, 346, -1246, 31, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -39, -1246, -3, -38, 10, - -1246, -1246, -26, 17, -1246, -1246, -1246, 171, 120, -1246, - -1246, 31, 213, 214, 249, 250, 289, -1246, -1246, -1246, - 16, 16, 16, 261, -1246, 399, 66, -1246, -1246, -1246, - -1246, 439, 484, 485, -1246, 512, 21, 48, 280, -98, - 277, 327, -1246, 335, 351, -1246, -1246, -1246, 513, -1246, - -1246, -1246, -1246, 362, 350, -1246, -1246, -36, 48, 16, - 16, 16, 16, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - 363, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, 83, 112, -1246, -1246, -1246, -1246, 493, -1246, - -1246, 411, -1246, -1246, -1246, 421, 423, 431, -1246, -1246, - 444, -1246, 76, -1246, 90, 464, 399, 10541, -1246, 442, - 507, 429, -1246, -1246, 418, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, 88, -1246, 1576, -1246, -1246, -1246, -1246, -1246, - 9221, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, 618, 622, -1246, 458, - 502, 382, 503, -1246, 509, -1246, 48, 466, 515, -1246, - -1246, -1246, 112, -1246, 490, 491, 495, 473, 496, 498, - -1246, -1246, -1246, 479, -1246, -1246, -1246, -1246, -1246, 500, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, 505, -1246, -1246, -1246, 506, 511, -1246, -1246, -1246, - -1246, 516, 517, 481, -93, -1246, -1246, -1246, -1246, -1246, - -1246, 220, 510, 526, -1246, -1246, 532, 535, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, 536, 499, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, 677, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, 542, 504, -1246, -1246, -29, - 524, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, 525, 537, -1246, 48, -1246, 352, -1246, - -1246, -1246, -1246, -1246, 5978, -1246, -1246, 548, -1246, 143, - 239, 257, -1246, -1246, 5978, 123, -1246, -1246, -1246, 9, - -1246, -1246, 62, -1246, 3260, -1246, 508, 1299, -1246, 534, - 1398, 25, -1246, -1246, -1246, -1246, 551, 583, -1246, 518, - -1246, 44, -1246, -117, 1576, -1246, 1876, 554, -93, -1246, - -1246, -1246, -1246, 555, 1576, -1246, 131, 1576, 1576, 1576, - 539, 544, -1246, -1246, 65, -93, 547, 29, -1246, 184, - 523, 553, 556, 550, 557, 196, 571, -1246, 263, 572, - 573, 5978, 5978, 559, 560, 561, 565, 568, 574, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, 3456, 5978, - 5978, 5978, 5978, 5978, 2872, 5978, -1246, 552, -1246, -1246, - -1246, 575, -1246, -1246, -1246, -1246, 578, -1246, -1246, -1246, - -1246, -1246, -1246, -22, 1400, -1246, 577, -1246, -1246, -1246, - -1246, -1246, -1246, 1576, 1576, 533, 600, 1576, 458, 1576, - 458, 1576, 458, 6321, 614, 6315, -1246, 5978, -1246, -1246, - -1246, -1246, 579, -1246, -1246, 8673, 3650, -1246, -1246, 616, - -1246, -58, -1246, 617, 510, 615, 607, -1246, 620, 623, - -1246, -1246, 5978, -1246, -1246, 240, -101, -1246, 510, -1246, - 585, -1246, -1246, 588, 3844, -1246, 502, 4038, 590, 634, - -1246, 625, 643, 4232, 502, 4426, 762, -1246, 628, 629, - 597, 794, -1246, -1246, -1246, -1246, -1246, 637, -1246, 638, - 640, 641, 644, 645, -1246, 739, -1246, 646, 9105, 636, - -1246, 642, -1246, 19, -1246, -6, -1246, -1246, -1246, 5978, - 369, 403, 639, 164, -1246, -1246, -1246, 624, 627, -1246, - 269, -1246, 648, 650, 656, -1246, 5978, 1576, 5978, 5978, - -1246, -1246, 5978, -1246, -1246, 5978, -1246, -1246, 5978, -1246, - 1576, 87, 87, 5978, 5978, 5978, 5978, 5978, 5978, 501, - 240, 9252, -1246, 664, 87, 87, -45, 87, 87, 240, - 806, 665, 9909, 665, 203, 3066, 819, -1246, 647, 578, - -1246, 10391, 10422, 5978, 5978, -1246, -1246, 5978, 5978, 5978, - 5978, 662, 5978, 324, 5978, 5978, 5978, 5978, 5978, 5978, - 5978, 5978, 5978, 4620, 5978, 5978, 5978, 5978, 5978, 5978, - 5978, 5978, 5978, 5978, -47, 5978, -1246, 4814, 406, 413, - -1246, -1246, 153, 414, 524, 416, 524, 432, 524, -1246, - 265, -1246, 270, -1246, 1576, 651, 667, -1246, -1246, -1246, - 8764, -1246, 657, 1576, -1246, -1246, 1576, -1246, -1246, 6351, - 649, 804, -1246, -67, -1246, 5978, 240, 5978, 9909, 834, - 5978, 9909, 5978, 670, -1246, 669, 696, 9909, -1246, 5978, - 9909, 683, -1246, -1246, 5978, 653, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -70, -1246, 5978, 5978, 5978, 5978, 5978, - 5978, 5978, 5978, 5978, 5978, 5978, 5978, 5978, 5978, 5978, - 5978, 5978, 5978, 5978, 554, -1246, -1246, 848, 429, -1246, - 5978, 9351, -1246, -1246, -1246, 1576, 1576, 1576, 1576, 789, - 5978, 698, 5978, 1576, -1246, -1246, -1246, 1576, 665, 286, - 664, 6443, 1576, 1576, 6542, 1576, 1576, 665, 1576, 1576, - 665, 1576, 675, 6573, 6672, 6764, 6797, 6889, 6988, -1246, - 5978, 150, 18, 5978, 5978, 692, 20, 240, 5978, 660, - 659, 663, 666, 259, -1246, -1246, 668, 117, 2676, -1246, - 113, 689, 671, 673, 458, 2081, -1246, 819, 684, 674, - -1246, -1246, 685, 676, -1246, -1246, 531, 531, 170, 170, - 10258, 10258, 678, 619, 679, -1246, 8795, -65, -65, 577, - 531, 531, 10112, 899, 376, 9998, 10510, 9440, 809, 10144, - 10226, 170, 170, 709, 709, 619, 619, 619, 325, 5978, - 680, 681, 365, 5978, 871, 8885, -1246, 115, -1246, -1246, - 713, -1246, -1246, 690, -1246, 694, -1246, 702, 6321, -1246, - 614, -1246, 336, 510, -1246, 5978, -1246, -1246, 510, 510, - -1246, 5978, 720, -1246, 727, -1246, 1576, -1246, 5978, 7019, - 24, 9909, 502, 9909, 7118, 5978, -1246, -1246, 9909, -1246, - 7210, 5978, 686, 847, 731, -1246, 353, -1246, 9909, 9909, - 9909, 9909, 9909, 9909, 9909, 9909, 9909, 9909, 9909, 9909, - 9909, 9909, 9909, 9909, 9909, 9909, 9909, -1246, 723, 514, - 829, 729, 9472, -1246, -1246, -1246, -1246, 510, 716, 717, - 433, -1246, 99, 699, 340, 7243, 453, 1576, 1576, 1576, - 718, 700, 1576, 703, 704, -1246, 728, 730, -1246, 732, - 736, 707, 737, 744, 735, 749, 819, -1246, -1246, -1246, - -1246, -1246, 740, 9554, 5978, 9909, -1246, -1246, 5978, 46, - 9909, -1246, -1246, 5978, 5978, 1576, 458, 5978, 5978, 5978, - 128, 6172, -1246, 366, -1246, -35, 524, -1246, 458, -1246, - 5978, -1246, 5978, 5008, 5978, -1246, 724, 741, -1246, -1246, - 5978, 742, -1246, 8916, 5978, 5202, 743, -1246, 9006, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, 1576, 745, 7335, -1246, - 901, -8, 9909, 502, 5978, -1246, 502, 9909, 2286, 502, - 7434, 5978, 787, -1246, 193, 790, 1576, 131, -1246, -1246, - -1246, 133, -1246, -5, -1246, -1246, -1246, -1246, -1246, 147, - -1246, 750, -1246, 795, 746, -1246, -1246, 773, 774, 775, - -1246, -1246, 776, 5978, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -41, 5396, -1246, -27, 402, 5978, - 7465, 7564, 777, 524, 7656, 9909, 9909, 760, 2676, 763, - 151, 805, 807, 808, 810, -1246, 215, 58, 524, 1576, - 7689, 1576, 7781, -1246, 216, 7880, -1246, 5978, 10030, 5978, - -1246, 7911, -1246, 218, 5978, -1246, -1246, -1246, -1246, -1246, - 510, 5978, -1246, 811, 5978, -1246, 222, -1246, -1246, 129, - 959, 8010, -1246, 812, 471, 932, 130, 5978, 943, -5, - -1246, -1246, 514, 772, 782, -1246, -1246, 793, 5978, -1246, - -1246, -1246, -1246, 783, 784, 664, 5978, 5978, 5978, 785, - 789, 796, 798, 5590, -1246, -1246, 227, 5978, 5978, 409, - -1246, -1246, -1246, 818, 152, -1246, 145, 5978, 5978, 5978, - -1246, -1246, -1246, -1246, -35, -1246, 5784, -1246, -1246, 502, - 820, -1246, 460, -1246, -1246, -1246, 1576, 8102, 8135, -1246, - -1246, 8227, 799, -1246, 9909, 502, 502, -1246, -1246, 802, - -1246, 2480, 836, -1246, -1246, 1576, 131, 851, -1246, 5978, - 9586, -1246, -1246, 943, 240, 789, 789, 814, 8326, 815, - 826, 830, 5978, 5978, 803, 170, 170, 170, 5978, -1246, - 789, 367, -1246, 8357, -1246, 838, 9668, 5978, 248, -1246, - 5978, 5978, 828, 8456, 9909, 9909, -1246, 5978, 9998, -1246, - -1246, -1246, 468, -1246, -1246, -1246, -1246, -1246, -1246, 5978, - -1246, -1246, -1246, -1246, -1246, 9909, -1246, 131, 5978, -1246, - 9702, -1246, 10541, -1246, -1246, -23, -23, 5978, -1246, 789, - 789, 367, 665, 664, -1246, 665, -23, 689, 831, -1246, - 972, 865, 837, 9668, -1246, 248, 9909, 9909, -1246, 185, - 10030, -1246, -1246, -1246, 8548, 5978, 9784, -1246, 872, 10541, - 367, 689, 867, 840, 841, 8581, -23, -23, 842, 843, - 844, 845, 846, -1246, 5978, -1246, -1246, 839, -1246, 5978, - 5978, -1246, 502, 9873, -1246, -1246, 502, 228, 849, -1246, - -1246, -1246, -1246, 850, 852, -1246, -1246, -1246, -1246, -1246, - 9909, -1246, 9909, 9909, 129, -1246, -1246, -1246, 367, -1246, - -1246, -1246, 230, -1246 + -1236, 23, -1236, -1236, 24, -54, -67, 331, -1236, -102, + 331, 331, 331, -1236, 148, 58, -1236, -1236, -9, -1236, + -1236, -1236, 175, -1236, 91, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, 46, -1236, 155, 179, 305, + -1236, -1236, -67, 11, -1236, -1236, -1236, 211, 235, -1236, + -1236, 91, 273, 283, 284, 301, 134, -1236, -1236, -1236, + 58, 58, 58, 275, -1236, 520, 51, -1236, -1236, -1236, + -1236, 424, 428, 440, -1236, 452, 22, 24, 335, -1236, + -54, 226, 336, -1236, 361, 373, -1236, -1236, -1236, 456, + -1236, -1236, -1236, -1236, 376, 368, -1236, -1236, -41, 24, + 58, 58, 58, 58, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, 391, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -87, 94, -1236, -1236, -1236, -1236, 494, + -1236, -1236, 375, -1236, -1236, -1236, 400, 413, 421, -1236, + -1236, 430, -1236, 39, -1236, 497, 465, 520, 10542, -1236, + 435, 503, 416, -1236, -1236, 498, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, 106, -1236, 1577, -1236, -1236, -1236, -1236, + -1236, 9222, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, 611, 612, -1236, + 445, 481, 325, 483, -1236, 507, -1236, 24, 464, 511, + -1236, -1236, -1236, 94, -1236, 489, 490, 491, 472, 493, + 496, -1236, -1236, -1236, 474, -1236, -1236, -1236, -1236, -1236, + 499, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, 500, -1236, -1236, -1236, 501, 504, -1236, -1236, + -1236, -1236, 506, 508, 477, 148, -1236, -1236, -1236, -1236, + -1236, -1236, 671, 510, 526, -1236, -1236, 533, 535, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, 536, + 495, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, 678, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, 540, 502, -1236, -1236, + -100, 522, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, 524, 537, -1236, 24, -1236, 144, + -1236, -1236, -1236, -1236, -1236, 5979, -1236, -1236, 546, -1236, + 143, 191, 201, -1236, -1236, 5979, 216, -1236, -1236, -1236, + 9, -1236, -1236, 3, -1236, 3261, -1236, 509, 1300, -1236, + 531, 1399, -68, -1236, -1236, -1236, -1236, 549, 581, -1236, + 514, -1236, 110, -1236, -32, 1577, -1236, 1877, 552, 148, + -1236, -1236, -1236, -1236, 558, 1577, -1236, 26, 1577, 1577, + 1577, 538, 539, -1236, -1236, 66, 148, 548, 30, -1236, + 217, 516, 550, 553, 517, 554, 231, 555, -1236, 232, + 557, 560, 5979, 5979, 529, 532, 542, 544, 545, 551, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, 3457, + 5979, 5979, 5979, 5979, 5979, 2873, 5979, -1236, 559, -1236, + -1236, -1236, 556, -1236, -1236, -1236, -1236, 562, -1236, -1236, + -1236, -1236, -1236, -1236, 100, 1401, -1236, 561, -1236, -1236, + -1236, -1236, -1236, -1236, 1577, 1577, 519, 586, 1577, 445, + 1577, 445, 1577, 445, 6322, 589, 6316, -1236, 5979, -1236, + -1236, -1236, -1236, 567, -1236, -1236, 8674, 3651, -1236, -1236, + 595, -1236, -19, -1236, 571, 510, 587, 578, -1236, 591, + 603, -1236, -1236, 5979, -1236, -1236, 156, -66, -1236, 510, + -1236, 572, -1236, -1236, 574, 3845, -1236, 481, 4039, 575, + 619, -1236, 610, 628, 4233, 481, 4427, 747, -1236, 615, + 617, 585, 781, -1236, -1236, -1236, -1236, -1236, 621, -1236, + 623, 624, 625, 627, 629, -1236, 734, -1236, 630, 9106, + 626, -1236, 632, -1236, 20, -1236, 118, -1236, -1236, -1236, + 5979, 8, 370, 620, 223, -1236, -1236, -1236, 598, 606, + -1236, 244, -1236, 631, 633, 634, -1236, 5979, 1577, 5979, + 5979, -1236, -1236, 5979, -1236, -1236, 5979, -1236, -1236, 5979, + -1236, 1577, 19, 19, 5979, 5979, 5979, 5979, 5979, 5979, + 476, 156, 9253, -1236, 635, 19, 19, -48, 19, 19, + 156, 801, 639, 9910, 639, 212, 3067, 816, -1236, 613, + 562, -1236, 10392, 10423, 5979, 5979, -1236, -1236, 5979, 5979, + 5979, 5979, 660, 5979, 314, 5979, 5979, 5979, 5979, 5979, + 5979, 5979, 5979, 5979, 4621, 5979, 5979, 5979, 5979, 5979, + 5979, 5979, 5979, 5979, 5979, -46, 5979, -1236, 4815, 389, + 390, -1236, -1236, -27, 395, 522, 396, 522, 402, 522, + -1236, 190, -1236, 266, -1236, 1577, 618, 645, -1236, -1236, + -1236, 8765, -1236, 654, 1577, -1236, -1236, 1577, -1236, -1236, + 6352, 622, 783, -1236, 104, -1236, 5979, 156, 5979, 9910, + 814, 5979, 9910, 5979, 650, -1236, 649, 679, 9910, -1236, + 5979, 9910, 663, -1236, -1236, 5979, 636, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -77, -1236, 5979, 5979, 5979, 5979, + 5979, 5979, 5979, 5979, 5979, 5979, 5979, 5979, 5979, 5979, + 5979, 5979, 5979, 5979, 5979, 552, -1236, -1236, 827, 416, + -1236, 5979, 9352, -1236, -1236, -1236, 1577, 1577, 1577, 1577, + 766, 5979, 675, 5979, 1577, -1236, -1236, -1236, 1577, 639, + 269, 635, 6444, 1577, 1577, 6543, 1577, 1577, 639, 1577, + 1577, 639, 1577, 652, 6574, 6673, 6765, 6798, 6890, 6989, + -1236, 5979, 455, 14, 5979, 5979, 668, 25, 156, 5979, + 638, 637, 641, 643, 234, -1236, -1236, 644, -36, 2677, + -1236, 114, 662, 646, 651, 445, 2082, -1236, 816, 659, + 657, -1236, -1236, 665, 661, -1236, -1236, 412, 412, 1028, + 1028, 10259, 10259, 664, 150, 666, -1236, 8796, -64, -64, + 561, 412, 412, 10113, 377, 900, 9999, 10511, 9441, 810, + 10145, 10227, 1028, 1028, 527, 527, 150, 150, 150, 316, + 5979, 667, 672, 320, 5979, 850, 8886, -1236, 120, -1236, + -1236, 692, -1236, -1236, 673, -1236, 682, -1236, 684, 6322, + -1236, 589, -1236, 271, 510, -1236, 5979, -1236, -1236, 510, + 510, -1236, 5979, 695, -1236, 699, -1236, 1577, -1236, 5979, + 7020, 31, 9910, 481, 9910, 7119, 5979, -1236, -1236, 9910, + -1236, 7211, 5979, 674, 821, 703, -1236, 281, -1236, 9910, + 9910, 9910, 9910, 9910, 9910, 9910, 9910, 9910, 9910, 9910, + 9910, 9910, 9910, 9910, 9910, 9910, 9910, 9910, -1236, 702, + 463, 809, 706, 9473, -1236, -1236, -1236, -1236, 510, 696, + 697, 403, -1236, 109, 680, 272, 7244, 404, 1577, 1577, + 1577, 698, 681, 1577, 676, 683, -1236, 704, 705, -1236, + 708, 709, 686, 711, 713, 694, 715, 816, -1236, -1236, + -1236, -1236, -1236, 700, 9555, 5979, 9910, -1236, -1236, 5979, + 38, 9910, -1236, -1236, 5979, 5979, 1577, 445, 5979, 5979, + 5979, 69, 6173, -1236, 322, -1236, -57, 522, -1236, 445, + -1236, 5979, -1236, 5979, 5009, 5979, -1236, 717, 701, -1236, + -1236, 5979, 707, -1236, 8917, 5979, 5203, 710, -1236, 9007, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, 1577, 712, 7336, + -1236, 842, -59, 9910, 481, 5979, -1236, 481, 9910, 2287, + 481, 7435, 5979, 741, -1236, 121, 742, 1577, 26, -1236, + -1236, -1236, 141, -1236, 6, -1236, -1236, -1236, -1236, -1236, + 161, -1236, 718, -1236, 745, 714, -1236, -1236, 723, 724, + 725, -1236, -1236, 727, 5979, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -29, 5397, -1236, 349, 353, + 5979, 7466, 7565, 728, 522, 7657, 9910, 9910, 730, 2677, + 726, 163, 761, 780, 784, 785, -1236, 128, 62, 522, + 1577, 7690, 1577, 7782, -1236, 131, 7881, -1236, 5979, 10031, + 5979, -1236, 7912, -1236, 138, 5979, -1236, -1236, -1236, -1236, + -1236, 510, 5979, -1236, 786, 5979, -1236, 152, -1236, -1236, + 366, 933, 8011, -1236, 787, -17, 907, 132, 5979, 918, + 6, -1236, -1236, 463, 748, 752, -1236, -1236, 772, 5979, + -1236, -1236, -1236, -1236, 755, 756, 635, 5979, 5979, 5979, + 757, 766, 758, 759, 5591, -1236, -1236, 160, 5979, 5979, + 356, -1236, -1236, -1236, 782, 168, -1236, 70, 5979, 5979, + 5979, -1236, -1236, -1236, -1236, -57, -1236, 5785, -1236, -1236, + 481, 788, -1236, 410, -1236, -1236, -1236, 1577, 8103, 8136, + -1236, -1236, 8228, 746, -1236, 9910, 481, 481, -1236, -1236, + 762, -1236, 2481, 797, -1236, -1236, 1577, 26, 808, -1236, + 5979, 9587, -1236, -1236, 918, 156, 766, 766, 767, 8327, + 768, 770, 771, 5979, 5979, 765, 1028, 1028, 1028, 5979, + -1236, 766, 326, -1236, 8358, -1236, 805, 9669, 5979, 218, + -1236, 5979, 5979, 774, 8457, 9910, 9910, -1236, 5979, 9999, + -1236, -1236, -1236, 411, -1236, -1236, -1236, -1236, -1236, -1236, + 5979, -1236, -1236, -1236, -1236, -1236, 9910, -1236, 26, 5979, + -1236, 9703, -1236, 10542, -1236, -1236, 13, 13, 5979, -1236, + 766, 766, 326, 639, 635, -1236, 639, 13, 662, 796, + -1236, 925, 817, 800, 9669, -1236, 218, 9910, 9910, -1236, + 170, 10031, -1236, -1236, -1236, 8549, 5979, 9785, -1236, 818, + 10542, 326, 662, 811, 799, 802, 8582, 13, 13, 803, + 804, 815, 820, 826, -1236, 5979, -1236, -1236, 807, -1236, + 5979, 5979, -1236, 481, 9874, -1236, -1236, 481, 173, 830, + -1236, -1236, -1236, -1236, 831, 832, -1236, -1236, -1236, -1236, + -1236, 9910, -1236, 9910, 9910, 366, -1236, -1236, -1236, 326, + -1236, -1236, -1236, 177, -1236 }; /* YYDEFACT[STATE-NUM] -- Default reduction number in state STATE-NUM. @@ -1390,207 +1390,207 @@ static const yytype_int16 yydefact[] = 2, 113, 1, 264, 0, 0, 0, 532, 265, 0, 532, 532, 532, 16, 0, 0, 15, 3, 0, 10, 9, 8, 0, 7, 520, 6, 11, 5, 4, 13, - 12, 14, 85, 86, 84, 93, 95, 37, 50, 47, + 12, 14, 85, 86, 84, 93, 95, 37, 50, 0, 48, 39, 0, 45, 38, 534, 533, 0, 0, 22, 21, 520, 0, 0, 0, 0, 240, 35, 100, 101, 0, 0, 0, 102, 104, 111, 0, 99, 17, 553, - 552, 206, 538, 554, 521, 522, 0, 0, 0, 0, - 40, 0, 46, 0, 0, 43, 535, 537, 18, 696, - 688, 692, 242, 0, 0, 110, 105, 0, 0, 0, - 0, 0, 0, 114, 208, 207, 210, 205, 540, 539, - 0, 556, 555, 559, 524, 523, 525, 91, 92, 89, - 90, 88, 0, 0, 87, 96, 51, 49, 45, 42, - 41, 0, 19, 20, 23, 0, 0, 0, 241, 33, - 36, 109, 0, 106, 107, 108, 112, 0, 541, 542, - 549, 458, 24, 25, 0, 80, 81, 78, 79, 77, - 76, 82, 0, 44, 0, 697, 689, 693, 34, 103, - 0, 180, 181, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 192, 193, 194, 195, 196, 197, 198, - 199, 200, 201, 202, 203, 204, 0, 0, 120, 115, - 0, 0, 0, 550, 0, 560, 0, 459, 0, 26, - 27, 28, 0, 94, 0, 0, 0, 0, 0, 0, - 567, 587, 568, 603, 569, 573, 574, 575, 576, 593, - 580, 581, 582, 583, 584, 585, 586, 588, 589, 590, - 591, 658, 572, 579, 592, 665, 672, 570, 577, 571, - 578, 0, 0, 0, 0, 602, 622, 625, 623, 624, - 685, 620, 536, 608, 486, 492, 174, 175, 172, 123, - 124, 126, 125, 127, 128, 129, 130, 156, 157, 154, - 155, 147, 158, 159, 148, 145, 146, 173, 167, 0, - 171, 160, 161, 162, 163, 134, 135, 136, 131, 132, - 133, 144, 0, 150, 151, 149, 142, 143, 138, 137, - 139, 140, 141, 122, 121, 166, 0, 152, 153, 458, - 118, 233, 211, 594, 597, 600, 601, 595, 598, 596, - 599, 543, 544, 547, 557, 97, 0, 512, 505, 526, - 83, 626, 649, 652, 0, 655, 645, 0, 611, 659, - 666, 673, 679, 682, 0, 0, 635, 640, 634, 0, - 648, 637, 0, 644, 0, 639, 621, 0, 609, 765, - 690, 694, 176, 177, 170, 165, 178, 168, 164, 0, - 116, 263, 480, 0, 0, 209, 0, 529, 0, 551, - 471, 561, 98, 0, 0, 506, 0, 0, 0, 0, - 0, 0, 365, 366, 0, 0, 0, 0, 359, 0, - 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 447, - 308, 310, 309, 311, 312, 313, 314, 29, 0, 0, - 0, 0, 0, 0, 0, 0, 294, 295, 363, 362, - 441, 360, 434, 433, 432, 431, 113, 437, 361, 436, - 435, 406, 367, 407, 0, 368, 0, 364, 700, 704, - 701, 702, 703, 0, 0, 0, 0, 0, 115, 0, - 115, 0, 115, 0, 0, 0, 631, 236, 642, 643, - 636, 638, 0, 641, 617, 0, 0, 687, 686, 766, - 698, 240, 487, 0, 482, 0, 0, 493, 0, 0, - 179, 169, 0, 261, 262, 0, 458, 117, 119, 235, - 0, 60, 61, 0, 255, 253, 0, 0, 0, 0, - 254, 0, 0, 0, 0, 0, 212, 215, 0, 0, - 0, 0, 228, 223, 220, 219, 221, 0, 234, 0, - 67, 68, 65, 66, 229, 267, 218, 0, 64, 527, - 530, 765, 548, 472, 513, 0, 503, 504, 502, 0, - 0, 0, 0, 614, 721, 724, 245, 0, 248, 252, - 0, 283, 0, 0, 0, 750, 0, 0, 0, 0, - 274, 277, 0, 280, 754, 0, 730, 736, 0, 727, - 0, 395, 396, 0, 0, 0, 0, 0, 0, 0, - 0, 734, 757, 765, 372, 371, 408, 370, 369, 0, - 0, 765, 289, 765, 296, 0, 303, 233, 295, 113, - 214, 0, 0, 0, 0, 397, 398, 0, 0, 0, + 552, 206, 538, 554, 521, 522, 0, 0, 0, 47, + 0, 40, 0, 46, 0, 0, 43, 535, 537, 18, + 696, 688, 692, 242, 0, 0, 110, 105, 0, 0, + 0, 0, 0, 0, 114, 208, 207, 210, 205, 540, + 539, 0, 556, 555, 559, 524, 523, 525, 91, 92, + 89, 90, 88, 0, 0, 87, 96, 51, 49, 45, + 42, 41, 0, 19, 20, 23, 0, 0, 0, 241, + 33, 36, 109, 0, 106, 107, 108, 112, 0, 541, + 542, 549, 458, 24, 25, 0, 80, 81, 78, 79, + 77, 76, 82, 0, 44, 0, 697, 689, 693, 34, + 103, 0, 180, 181, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 192, 193, 194, 195, 196, 197, + 198, 199, 200, 201, 202, 203, 204, 0, 0, 120, + 115, 0, 0, 0, 550, 0, 560, 0, 459, 0, + 26, 27, 28, 0, 94, 0, 0, 0, 0, 0, + 0, 567, 587, 568, 603, 569, 573, 574, 575, 576, + 593, 580, 581, 582, 583, 584, 585, 586, 588, 589, + 590, 591, 658, 572, 579, 592, 665, 672, 570, 577, + 571, 578, 0, 0, 0, 0, 602, 622, 625, 623, + 624, 685, 620, 536, 608, 486, 492, 174, 175, 172, + 123, 124, 126, 125, 127, 128, 129, 130, 156, 157, + 154, 155, 147, 158, 159, 148, 145, 146, 173, 167, + 0, 171, 160, 161, 162, 163, 134, 135, 136, 131, + 132, 133, 144, 0, 150, 151, 149, 142, 143, 138, + 137, 139, 140, 141, 122, 121, 166, 0, 152, 153, + 458, 118, 233, 211, 594, 597, 600, 601, 595, 598, + 596, 599, 543, 544, 547, 557, 97, 0, 512, 505, + 526, 83, 626, 649, 652, 0, 655, 645, 0, 611, + 659, 666, 673, 679, 682, 0, 0, 635, 640, 634, + 0, 648, 637, 0, 644, 0, 639, 621, 0, 609, + 765, 690, 694, 176, 177, 170, 165, 178, 168, 164, + 0, 116, 263, 480, 0, 0, 209, 0, 529, 0, + 551, 471, 561, 98, 0, 0, 506, 0, 0, 0, + 0, 0, 0, 365, 366, 0, 0, 0, 0, 359, + 0, 0, 0, 0, 0, 0, 0, 0, 593, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 447, 308, 310, 309, 311, 312, 313, 314, 29, 0, + 0, 0, 0, 0, 0, 0, 0, 294, 295, 363, + 362, 441, 360, 434, 433, 432, 431, 113, 437, 361, + 436, 435, 406, 367, 407, 0, 368, 0, 364, 700, + 704, 701, 702, 703, 0, 0, 0, 0, 0, 115, + 0, 115, 0, 115, 0, 0, 0, 631, 236, 642, + 643, 636, 638, 0, 641, 617, 0, 0, 687, 686, + 766, 698, 240, 487, 0, 482, 0, 0, 493, 0, + 0, 179, 169, 0, 261, 262, 0, 458, 117, 119, + 235, 0, 60, 61, 0, 255, 253, 0, 0, 0, + 0, 254, 0, 0, 0, 0, 0, 212, 215, 0, + 0, 0, 0, 228, 223, 220, 219, 221, 0, 234, + 0, 67, 68, 65, 66, 229, 267, 218, 0, 64, + 527, 530, 765, 548, 472, 513, 0, 503, 504, 502, + 0, 0, 0, 0, 614, 721, 724, 245, 0, 248, + 252, 0, 283, 0, 0, 0, 750, 0, 0, 0, + 0, 274, 277, 0, 280, 754, 0, 730, 736, 0, + 727, 0, 395, 396, 0, 0, 0, 0, 0, 0, + 0, 0, 734, 757, 765, 372, 371, 408, 370, 369, + 0, 0, 765, 289, 765, 296, 0, 303, 233, 295, + 113, 214, 0, 0, 0, 0, 397, 398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 351, 0, 629, 0, 0, 0, - 604, 606, 0, 0, 118, 0, 118, 0, 118, 484, - 0, 490, 0, 605, 0, 0, 237, 633, 616, 619, - 0, 610, 0, 0, 488, 691, 0, 494, 695, 0, - 0, 562, 478, 497, 481, 0, 0, 0, 256, 0, - 0, 243, 0, 0, 232, 0, 0, 54, 72, 0, - 258, 0, 230, 231, 0, 0, 222, 217, 224, 225, - 226, 227, 266, 0, 216, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 766, 545, 558, 0, 458, 517, - 0, 0, 627, 650, 653, 0, 0, 0, 0, 719, - 236, 0, 0, 0, 740, 743, 746, 0, 765, 0, - 765, 0, 0, 0, 0, 0, 0, 765, 0, 0, - 765, 0, 0, 0, 0, 0, 0, 0, 0, 32, - 0, 30, 0, 0, 766, 0, 0, 0, 766, 0, - 0, 0, 0, 341, 338, 340, 0, 240, 0, 354, - 0, 714, 0, 0, 115, 0, 296, 303, 0, 0, - 420, 419, 0, 0, 421, 425, 373, 374, 386, 387, - 384, 385, 0, 414, 0, 404, 0, 438, 439, 440, - 375, 376, 391, 392, 393, 394, 0, 0, 389, 390, - 388, 382, 383, 378, 377, 379, 380, 381, 0, 0, - 0, 347, 0, 0, 0, 0, 357, 0, 656, 646, - 0, 612, 660, 0, 667, 0, 674, 0, 0, 680, - 0, 683, 0, 238, 630, 0, 618, 699, 483, 489, - 479, 0, 0, 496, 0, 495, 0, 498, 0, 0, - 0, 257, 0, 244, 0, 0, 52, 53, 259, 233, - 0, 0, 0, 507, 0, 273, 505, 272, 325, 326, - 328, 327, 329, 319, 320, 321, 330, 331, 317, 318, - 332, 333, 322, 323, 324, 316, 528, 531, 0, 465, - 468, 0, 0, 519, 628, 651, 654, 615, 0, 0, - 0, 720, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 409, 0, 0, 410, 0, - 0, 0, 0, 0, 0, 0, 303, 442, 443, 444, - 445, 446, 0, 0, 0, 733, 758, 759, 0, 0, - 290, 739, 399, 0, 0, 0, 115, 0, 0, 0, - 0, 0, 356, 0, 355, 0, 118, 307, 115, 416, - 0, 422, 0, 0, 0, 402, 0, 0, 426, 430, - 0, 0, 405, 0, 0, 0, 0, 348, 0, 352, - 400, 358, 657, 647, 607, 613, 661, 663, 668, 670, - 675, 677, 485, 681, 491, 684, 0, 0, 0, 564, - 565, 499, 501, 0, 0, 260, 0, 75, 0, 0, - 0, 0, 0, 268, 0, 0, 0, 0, 546, 466, - 467, 468, 469, 460, 473, 518, 722, 725, 246, 0, - 250, 0, 249, 0, 0, 286, 284, 0, 0, 0, - 751, 749, 0, 0, 760, 275, 278, 281, 755, 753, - 731, 737, 735, 728, 0, 0, 31, 0, 0, 0, - 0, 0, 0, 118, 0, 706, 705, 0, 0, 0, - 0, 0, 0, 0, 0, 301, 0, 0, 118, 0, - 0, 0, 0, 336, 0, 0, 427, 0, 415, 0, - 403, 0, 349, 0, 0, 401, 353, 664, 671, 678, - 239, 236, 563, 0, 0, 73, 0, 74, 213, 57, - 62, 0, 509, 0, 505, 510, 0, 0, 463, 460, - 461, 462, 465, 0, 0, 247, 251, 0, 0, 285, - 741, 744, 747, 0, 0, 765, 0, 0, 0, 0, - 719, 0, 0, 0, 413, 448, 0, 0, 0, 0, - 339, 457, 342, 0, 0, 334, 0, 0, 0, 0, - 299, 300, 298, 297, 0, 304, 0, 291, 305, 0, - 0, 456, 0, 454, 337, 451, 0, 0, 0, 450, - 350, 0, 0, 566, 500, 0, 0, 55, 56, 0, - 69, 0, 0, 508, 269, 0, 0, 0, 514, 0, - 0, 464, 474, 463, 0, 719, 719, 0, 0, 0, - 0, 0, 0, 0, 0, 276, 279, 282, 0, 732, - 719, 0, 411, 0, 449, 763, 763, 0, 0, 345, - 0, 0, 0, 0, 708, 707, 302, 0, 292, 306, - 417, 423, 0, 455, 453, 452, 632, 71, 58, 0, - 63, 67, 68, 65, 66, 64, 70, 0, 0, 511, - 0, 516, 0, 476, 470, 0, 0, 0, 287, 719, - 719, 0, 765, 765, 761, 765, 0, 713, 0, 412, - 0, 0, 0, 763, 343, 0, 710, 709, 335, 0, - 293, 418, 424, 428, 0, 0, 0, 515, 0, 0, - 0, 717, 765, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 729, 0, 769, 767, 0, 346, 0, - 0, 429, 0, 0, 271, 475, 0, 0, 766, 718, - 723, 726, 288, 0, 0, 748, 752, 762, 756, 738, - 764, 768, 712, 711, 57, 270, 477, 715, 0, 742, - 745, 59, 0, 716 + 0, 0, 0, 0, 0, 351, 0, 629, 0, 0, + 0, 604, 606, 0, 0, 118, 0, 118, 0, 118, + 484, 0, 490, 0, 605, 0, 0, 237, 633, 616, + 619, 0, 610, 0, 0, 488, 691, 0, 494, 695, + 0, 0, 562, 478, 497, 481, 0, 0, 0, 256, + 0, 0, 243, 0, 0, 232, 0, 0, 54, 72, + 0, 258, 0, 230, 231, 0, 0, 222, 217, 224, + 225, 226, 227, 266, 0, 216, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 766, 545, 558, 0, 458, + 517, 0, 0, 627, 650, 653, 0, 0, 0, 0, + 719, 236, 0, 0, 0, 740, 743, 746, 0, 765, + 0, 765, 0, 0, 0, 0, 0, 0, 765, 0, + 0, 765, 0, 0, 0, 0, 0, 0, 0, 0, + 32, 0, 30, 0, 0, 766, 0, 0, 0, 766, + 0, 0, 0, 0, 341, 338, 340, 0, 240, 0, + 354, 0, 714, 0, 0, 115, 0, 296, 303, 0, + 0, 420, 419, 0, 0, 421, 425, 373, 374, 386, + 387, 384, 385, 0, 414, 0, 404, 0, 438, 439, + 440, 375, 376, 391, 392, 393, 394, 0, 0, 389, + 390, 388, 382, 383, 378, 377, 379, 380, 381, 0, + 0, 0, 347, 0, 0, 0, 0, 357, 0, 656, + 646, 0, 612, 660, 0, 667, 0, 674, 0, 0, + 680, 0, 683, 0, 238, 630, 0, 618, 699, 483, + 489, 479, 0, 0, 496, 0, 495, 0, 498, 0, + 0, 0, 257, 0, 244, 0, 0, 52, 53, 259, + 233, 0, 0, 0, 507, 0, 273, 505, 272, 325, + 326, 328, 327, 329, 319, 320, 321, 330, 331, 317, + 318, 332, 333, 322, 323, 324, 316, 528, 531, 0, + 465, 468, 0, 0, 519, 628, 651, 654, 615, 0, + 0, 0, 720, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 409, 0, 0, 410, + 0, 0, 0, 0, 0, 0, 0, 303, 442, 443, + 444, 445, 446, 0, 0, 0, 733, 758, 759, 0, + 0, 290, 739, 399, 0, 0, 0, 115, 0, 0, + 0, 0, 0, 356, 0, 355, 0, 118, 307, 115, + 416, 0, 422, 0, 0, 0, 402, 0, 0, 426, + 430, 0, 0, 405, 0, 0, 0, 0, 348, 0, + 352, 400, 358, 657, 647, 607, 613, 661, 663, 668, + 670, 675, 677, 485, 681, 491, 684, 0, 0, 0, + 564, 565, 499, 501, 0, 0, 260, 0, 75, 0, + 0, 0, 0, 0, 268, 0, 0, 0, 0, 546, + 466, 467, 468, 469, 460, 473, 518, 722, 725, 246, + 0, 250, 0, 249, 0, 0, 286, 284, 0, 0, + 0, 751, 749, 0, 0, 760, 275, 278, 281, 755, + 753, 731, 737, 735, 728, 0, 0, 31, 0, 0, + 0, 0, 0, 0, 118, 0, 706, 705, 0, 0, + 0, 0, 0, 0, 0, 0, 301, 0, 0, 118, + 0, 0, 0, 0, 336, 0, 0, 427, 0, 415, + 0, 403, 0, 349, 0, 0, 401, 353, 664, 671, + 678, 239, 236, 563, 0, 0, 73, 0, 74, 213, + 57, 62, 0, 509, 0, 505, 510, 0, 0, 463, + 460, 461, 462, 465, 0, 0, 247, 251, 0, 0, + 285, 741, 744, 747, 0, 0, 765, 0, 0, 0, + 0, 719, 0, 0, 0, 413, 448, 0, 0, 0, + 0, 339, 457, 342, 0, 0, 334, 0, 0, 0, + 0, 299, 300, 298, 297, 0, 304, 0, 291, 305, + 0, 0, 456, 0, 454, 337, 451, 0, 0, 0, + 450, 350, 0, 0, 566, 500, 0, 0, 55, 56, + 0, 69, 0, 0, 508, 269, 0, 0, 0, 514, + 0, 0, 464, 474, 463, 0, 719, 719, 0, 0, + 0, 0, 0, 0, 0, 0, 276, 279, 282, 0, + 732, 719, 0, 411, 0, 449, 763, 763, 0, 0, + 345, 0, 0, 0, 0, 708, 707, 302, 0, 292, + 306, 417, 423, 0, 455, 453, 452, 632, 71, 58, + 0, 63, 67, 68, 65, 66, 64, 70, 0, 0, + 511, 0, 516, 0, 476, 470, 0, 0, 0, 287, + 719, 719, 0, 765, 765, 761, 765, 0, 713, 0, + 412, 0, 0, 0, 763, 343, 0, 710, 709, 335, + 0, 293, 418, 424, 428, 0, 0, 0, 515, 0, + 0, 0, 717, 765, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 729, 0, 769, 767, 0, 346, + 0, 0, 429, 0, 0, 271, 475, 0, 0, 766, + 718, 723, 726, 288, 0, 0, 748, 752, 762, 756, + 738, 764, 768, 712, 711, 57, 270, 477, 715, 0, + 742, 745, 59, 0, 716 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int16 yypgoto[] = { - -1246, -1246, -1246, -1246, -1246, -1246, 448, 977, -1246, -1246, - -1246, 1058, -1246, -1246, -1246, 1018, -1246, 933, -1246, -1246, - 984, -1246, -1246, -1246, -340, -1246, -1246, -186, -1246, -1246, - -1246, -1246, -1246, -1246, 854, -1246, -1246, -60, 970, -1246, - -1246, -1246, 317, -1246, -421, -462, -650, -1246, -1246, -1246, - -1200, -1246, -1246, -520, -1246, -1246, -612, -758, -1246, -14, - -1246, -1246, -1246, -1246, -1246, -182, -180, -179, -178, -1246, - -1246, 1073, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -426, -1246, 630, - -145, -1246, -797, -1246, -1246, -1246, -1246, -1246, -1246, -1245, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, 543, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -147, -102, -183, - -91, 11, -1246, -1246, -1246, -1246, -1246, 580, -1246, -473, - -1246, -1246, -477, -1246, -1246, -698, -169, -556, -905, -1246, - -1246, -1246, -1246, 1047, -1246, -1246, -1246, 345, -1246, 633, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -587, -161, - -1246, 701, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -336, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -139, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, 705, -617, -231, 141, -1246, -999, -1167, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -793, -1246, - -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, -1246, - -1246, -1246, -1246, -586, -1246, -1233, -548, -1246 + -1236, -1236, -1236, -1236, -1236, -1236, 381, 930, -1236, -1236, + -1236, 1006, -1236, -1236, -1236, 972, -1236, 891, -1236, -1236, + 956, -1236, -1236, -1236, -364, -1236, -1236, -210, -1236, -1236, + -1236, -1236, -1236, -1236, 833, -1236, -1236, -61, 945, -1236, + -1236, -1236, 308, -1236, -433, -462, -650, -1236, -1236, -1236, + -1230, -1236, -1236, -520, -1236, -1236, -615, -759, -1236, -14, + -1236, -1236, -1236, -1236, -1236, -207, -205, -204, -201, -1236, + -1236, 1051, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -426, -1236, 590, + -172, -1236, -789, -1236, -1236, -1236, -1236, -1236, -1236, -1235, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, 543, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -147, -125, -206, + -126, -23, -1236, -1236, -1236, -1236, -1236, 547, -1236, -476, + -1236, -1236, -479, -1236, -1236, -701, -203, -556, -909, -1236, + -1236, -1236, -1236, 1009, -1236, -1236, -1236, 306, -1236, 656, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -589, -161, + -1236, 669, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -336, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -139, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, 670, -617, -267, 103, -1236, -1036, -1152, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -794, -1236, + -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, -1236, + -1236, -1236, -1236, -587, -1236, -1231, -548, -1236 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { - 0, 1, 16, 134, 51, 17, 154, 160, 609, 448, - 140, 449, 94, 19, 20, 43, 44, 85, 21, 39, - 40, 538, 539, 1249, 1250, 540, 1252, 541, 542, 543, - 544, 545, 546, 547, 161, 162, 35, 36, 37, 207, - 63, 64, 65, 66, 22, 320, 385, 199, 23, 106, - 200, 107, 147, 322, 450, 548, 386, 685, 892, 451, - 549, 577, 768, 1185, 452, 550, 551, 552, 553, 554, - 515, 555, 733, 1074, 925, 556, 453, 782, 1196, 783, - 1197, 785, 1198, 454, 773, 1189, 455, 621, 1228, 456, - 1135, 1136, 824, 457, 630, 458, 557, 459, 460, 815, - 461, 1005, 1288, 1006, 1345, 462, 874, 1156, 463, 622, - 1139, 1351, 1141, 1352, 1236, 1381, 465, 381, 1182, 1262, - 1081, 1083, 951, 563, 758, 1322, 1359, 382, 383, 503, - 680, 370, 508, 682, 371, 1009, 702, 569, 396, 926, - 338, 927, 339, 75, 116, 25, 151, 560, 561, 47, - 48, 131, 26, 110, 149, 202, 27, 387, 948, 389, - 204, 205, 73, 113, 391, 28, 150, 334, 703, 466, - 331, 257, 258, 672, 369, 259, 476, 1045, 572, 366, - 260, 261, 397, 954, 684, 474, 1043, 398, 955, 399, - 956, 473, 1042, 477, 1046, 478, 1157, 479, 1048, 480, - 1158, 481, 1050, 482, 1159, 483, 1053, 484, 1055, 504, - 29, 136, 264, 505, 30, 137, 265, 509, 31, 135, - 263, 692, 467, 1361, 1338, 822, 1362, 1363, 962, 468, - 766, 1183, 767, 1184, 791, 1202, 788, 1200, 612, 469, - 789, 1201, 470, 967, 1269, 968, 1270, 969, 1271, 777, - 1193, 786, 1199, 613, 471, 1341, 500, 472 + 0, 1, 16, 135, 51, 17, 155, 161, 610, 449, + 141, 450, 95, 19, 20, 43, 44, 86, 21, 39, + 40, 539, 540, 1250, 1251, 541, 1253, 542, 543, 544, + 545, 546, 547, 548, 162, 163, 35, 36, 37, 208, + 63, 64, 65, 66, 22, 321, 386, 200, 23, 107, + 201, 108, 148, 323, 451, 549, 387, 686, 893, 452, + 550, 578, 769, 1186, 453, 551, 552, 553, 554, 555, + 516, 556, 734, 1075, 926, 557, 454, 783, 1197, 784, + 1198, 786, 1199, 455, 774, 1190, 456, 622, 1229, 457, + 1136, 1137, 825, 458, 631, 459, 558, 460, 461, 816, + 462, 1006, 1289, 1007, 1346, 463, 875, 1157, 464, 623, + 1140, 1352, 1142, 1353, 1237, 1382, 466, 382, 1183, 1263, + 1082, 1084, 952, 564, 759, 1323, 1360, 383, 384, 504, + 681, 371, 509, 683, 372, 1010, 703, 570, 397, 927, + 339, 928, 340, 75, 117, 25, 152, 561, 562, 47, + 48, 132, 26, 111, 150, 203, 27, 388, 949, 390, + 205, 206, 73, 114, 392, 28, 151, 335, 704, 467, + 332, 258, 259, 673, 370, 260, 477, 1046, 573, 367, + 261, 262, 398, 955, 685, 475, 1044, 399, 956, 400, + 957, 474, 1043, 478, 1047, 479, 1158, 480, 1049, 481, + 1159, 482, 1051, 483, 1160, 484, 1054, 485, 1056, 505, + 29, 137, 265, 506, 30, 138, 266, 510, 31, 136, + 264, 693, 468, 1362, 1339, 823, 1363, 1364, 963, 469, + 767, 1184, 768, 1185, 792, 1203, 789, 1201, 613, 470, + 790, 1202, 471, 968, 1270, 969, 1271, 970, 1272, 778, + 1194, 787, 1200, 614, 472, 1342, 501, 473 }; /* YYTABLE[YYPACT[STATE-NUM]] -- What to do in state STATE-NUM. If @@ -1598,1296 +1598,1336 @@ static const yytype_int16 yydefgoto[] = number is the opposite. If YYTABLE_NINF, syntax error. */ static const yytype_int16 yytable[] = { - 57, 67, 780, 256, 208, 908, 709, 681, 821, 760, - 679, 996, 963, 755, 718, 825, 674, 125, 676, 623, - 678, 1077, 2, 802, 883, 262, 885, -113, 887, 3, - 1018, 498, 806, 1279, 582, 626, 117, 118, 994, 81, - 998, 1180, 488, 1344, 1064, 55, 67, 67, 67, 379, - 58, 513, 4, 1342, 5, 516, 6, 38, 565, 903, - 641, 686, 7, 643, 644, 805, 1119, 32, 33, 56, - 400, 401, 8, 809, 82, 810, 68, 922, 9, 59, - 93, 868, 869, 643, 644, 67, 67, 67, 67, 517, - 407, 1131, 923, 74, 514, 490, 409, 1132, 1325, 1326, - 1378, 1181, 10, 99, 100, 101, 870, 206, 631, 632, - 1377, 904, 905, 1336, 906, 871, 49, 907, 903, 910, - 566, 379, 1358, 693, 11, 12, 567, 155, 156, 321, - 816, 583, 584, 415, 416, 924, 41, 664, 665, 1089, - 76, 1246, 757, 78, 1133, 1207, 335, 60, 627, 1134, - 255, 895, 1247, 1248, 55, 872, 873, 664, 665, 1386, - 778, 50, 1366, 1367, 1203, 42, 759, 418, 419, 787, - 141, 905, 790, 568, 367, 77, 119, 380, 56, 206, - 1178, 120, 1360, 121, 122, 446, 628, 506, 79, 1114, - 756, 631, 632, 489, 13, 1226, 904, 507, 904, 820, - 1082, 1010, 904, 55, 635, 636, 256, 83, 827, 256, - 34, 61, 641, 14, 585, 643, 644, 645, 646, 84, - 999, 62, 15, 256, 904, 15, 123, 56, 321, 99, - 971, 101, 974, 256, 586, 438, 256, 256, 256, 981, - 355, 877, 984, 903, 102, 518, 491, 152, 153, 1008, - 576, 779, 816, 356, 77, 93, 566, 566, 570, 571, - 573, 1089, 567, 567, 792, 492, 212, 157, 444, 1256, - 103, 493, 158, 903, 159, 122, 392, 903, 903, 1008, - 357, 358, 169, 1218, 1290, 633, 634, 635, 636, 664, - 665, 1011, 87, 895, 213, 641, 905, 642, 643, 644, - 645, 646, 1258, 647, 648, 1090, 1013, 1068, 486, 568, - 568, 903, 256, 256, 209, 210, 256, 1379, 256, 1012, - 256, 1041, 256, 1013, -662, 880, 905, 1364, 487, -662, - 905, 905, 1127, 86, 668, 669, 765, 1372, 673, 881, - 675, 55, 677, 359, 686, 821, 367, 360, -662, 1292, - 811, 69, 70, 255, 71, 812, 255, 659, 660, 661, - 662, 663, 1016, 1164, 905, 56, 1137, 1393, 1394, 587, - 255, 1173, 664, 665, 562, 89, 90, 95, 96, 97, - 255, 594, 72, 255, 255, 255, 55, 700, 813, 588, - 255, 580, 1065, 1224, 895, 811, 895, 631, 632, 1174, - 895, 595, 701, 1242, 361, 895, 1013, 362, 1013, 363, - 56, 91, 92, 1054, 1285, 1052, 143, 144, 145, 146, - -669, 1225, 1234, 364, 1240, -669, 256, 93, 1245, 365, - 958, 959, 1219, 1284, 1407, 126, 1413, 888, -676, 256, - -344, 970, 890, -676, -669, -344, 976, 977, 597, 979, - 980, 889, 982, 983, 771, 985, 891, 323, 972, 255, - 255, 324, -676, 255, -344, 255, 98, 255, 598, 255, - 831, 835, 973, 1213, 772, 325, 326, 844, 1031, 84, - 327, 328, 329, 330, 45, 849, 845, 1032, 1229, 128, - 46, 633, 634, 635, 636, 637, 104, 129, 638, 639, - 640, 641, 105, 642, 643, 644, 645, 646, 1056, 647, - 648, 1216, 1093, 130, 139, 649, 1291, 1195, 1036, 1129, - 816, 1177, 1057, 256, 138, 148, 1094, 1037, 1130, 1089, - 393, 1075, 256, 394, 1076, 256, 395, 395, 99, 100, - 101, 108, 111, 1165, 1123, 893, 1167, 109, 112, 1169, - 82, 367, 631, 632, 898, 762, 1138, 899, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 1117, 114, - 132, 1079, 1118, 255, 1208, 115, 133, 1080, 664, 665, - 895, 1287, 209, 210, 211, 367, 255, 895, 367, 763, - 164, 165, 878, 166, 1204, 367, 367, 1144, 367, 879, - 882, 167, 884, 99, 256, 256, 256, 256, 168, 1153, - 814, 950, 256, 203, 367, 367, 256, 1227, 886, 1088, - 1259, 256, 256, 201, 256, 256, 957, 256, 256, 960, - 256, 1097, 1098, 1099, 966, 367, 1102, 206, 1166, 1096, - 631, 632, 367, 52, 53, 54, 1301, 1274, 635, 636, - 367, 1380, 1255, 317, 1353, 395, 641, 318, 642, 643, - 644, 645, 646, 319, 1337, 152, 153, 799, 800, 1122, - 255, 333, 321, 332, 336, 341, 342, 337, 344, 255, - 343, 345, 255, 346, 347, 348, 354, 1333, 368, 1206, - 349, 350, 367, 1209, 372, 1029, 351, 373, 374, 376, - 1318, 352, 353, 375, 377, 384, 388, 390, 378, 1299, - 475, 496, 499, 510, 1337, 511, 559, 564, 659, 660, - 661, 662, 663, 512, 574, 1307, 1308, 256, 589, 575, - 631, 632, 581, 664, 665, 686, 635, 636, 590, 670, - 1176, 591, 593, 1387, 641, 256, 642, 643, 644, 645, - 646, 255, 255, 255, 255, 592, 596, 599, 600, 255, - 624, 1355, 671, 255, 603, 604, 605, 1061, 255, 255, - 606, 255, 255, 607, 255, 255, 506, 255, 691, 608, - 625, 15, 667, 687, 1369, 1370, 695, 1371, 696, 694, - 705, 1412, 697, 706, 698, 712, 713, 714, 715, 721, - 722, 723, 724, 1230, 725, 732, 256, 256, 256, 726, - 727, 256, 728, 729, 1389, 753, 730, 731, 734, 807, - 754, 664, 665, 823, 842, 764, 635, 636, 897, 769, - 631, 632, 770, 774, 641, 775, 642, 643, 644, 645, - 646, 776, 804, 808, 256, 895, 1332, 902, 912, 915, - 916, 917, 1335, 919, 901, 826, 949, 894, 921, 961, - 964, 986, 1404, 997, 1001, 1002, 1406, 1013, 1003, 1019, - 1021, 1004, 1039, 1007, 255, 1044, 1047, 1014, 1015, 1020, - 1049, 1022, 1059, 1023, 1024, 1034, 1035, 464, 1051, 1060, - 1072, 1071, 255, 1073, 1078, 256, 1082, 485, 661, 662, - 663, 1084, 1086, 1087, 1100, 1092, 1101, 495, 1103, 1146, - 1104, 664, 665, 1109, 1105, 256, 1106, 1160, 1107, 1317, - 631, 632, 1108, 1110, 633, 634, 635, 636, 637, 558, - 1111, 638, 639, 640, 641, 1113, 642, 643, 644, 645, - 646, 1112, 647, 648, 1163, 1115, 1147, 1149, 1154, 1172, - 1161, 1188, 1175, 255, 255, 255, 1186, 1187, 255, 1190, - 1191, 1192, 1194, 1212, 601, 602, 1215, 1220, 1217, 1221, - 1222, 1251, 1223, 1243, 1254, 1257, 1261, 1265, 256, 1267, - 256, 611, 614, 615, 616, 617, 618, 1266, 1272, 1273, - 1278, 255, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 1280, 1232, 1281, 1289, 1306, 1300, 1309, 1316, 1334, - 1340, 664, 665, 1319, 633, 634, 635, 636, 637, 1327, - 1329, 638, 639, 640, 641, 1374, 642, 643, 644, 645, - 646, 1330, 647, 648, 1348, 1331, 1375, 1373, 649, 690, - 651, 1376, 255, 1401, 1385, 1388, 1390, 1391, 1395, 1396, - 1397, 1398, 1399, 124, 1408, 699, 1409, 801, 1410, 18, - 80, 163, 255, 127, 1411, 1310, 340, 708, 142, 1311, - 711, 1312, 1313, 1314, 24, 256, 717, 1263, 720, 1296, - 1323, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 1264, 1179, 629, 256, 1324, 704, 1302, 88, 947, - 1368, 664, 665, 1091, 0, 578, 0, 0, 0, 579, - 0, 0, 761, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 255, 0, 255, 0, 0, - 0, 611, 781, 0, 0, 784, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 793, 794, 795, 796, - 797, 798, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 836, 837, 0, 0, - 838, 839, 840, 841, 0, 843, 0, 846, 847, 848, - 850, 851, 852, 853, 854, 855, 857, 858, 859, 860, - 861, 862, 863, 864, 865, 866, 867, 0, 875, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 255, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 255, 0, 0, 0, 0, 0, 0, 909, 0, - 911, 0, 0, 913, 0, 914, 0, 0, 0, 0, - 0, 0, 918, 0, 0, 0, 0, 920, 0, 0, - 0, 0, 0, 0, 814, 0, 0, 0, 928, 929, + 57, 67, 781, 909, 257, 209, 682, 710, 680, 822, + 761, 997, 964, 826, 756, 719, 126, 675, 1078, 677, + 624, 679, 803, 2, 627, 884, 263, 886, -113, 888, + 3, 807, 499, 82, 995, 583, 491, 118, 119, 1019, + 632, 633, 489, 32, 33, 999, 67, 67, 67, 1280, + 380, 1065, 1181, 4, 1345, 5, 1343, 6, 1120, 566, + 49, 642, 687, 7, 644, 645, 806, 904, 83, 1132, + 923, 401, 402, 8, 810, 1133, 811, 153, 154, 9, + 644, 645, 869, 870, 380, 924, 67, 67, 67, 67, + 904, 408, 58, 1359, 507, 41, 1009, 410, 100, 101, + 102, 38, 94, 10, 508, 50, 381, 871, 207, 156, + 157, 1379, 1182, 1378, 1326, 1327, 872, 514, 911, 94, + 906, 59, 1134, 368, 42, 11, 12, 1135, 925, 1337, + 1387, 758, 584, 585, 416, 417, 636, 637, 665, 666, + 517, 322, 207, 906, 642, 881, 336, 644, 645, 646, + 647, 256, 567, 74, 665, 666, 873, 874, 568, 882, + 515, 779, 694, 68, 1256, 142, 817, 396, 419, 420, + 788, 632, 633, 791, 518, 1090, 1204, 120, 1367, 1368, + 69, 70, 121, 71, 122, 123, 34, 492, 1179, 60, + 368, 757, 905, 490, 763, 13, 55, 828, 1115, 1227, + 821, 84, 1011, 905, 55, 569, 493, 257, 1083, 905, + 257, 72, 494, 85, 14, 586, 905, 77, 1361, 1000, + 56, 665, 666, 15, 257, 76, 15, 124, 56, 103, + 904, 972, 322, 975, 257, 587, 439, 257, 257, 257, + 982, 356, 878, 985, 567, 170, 519, 1014, 1014, 158, + 568, 577, 780, 61, 159, 104, 160, 123, 567, 571, + 572, 574, 817, 62, 568, 793, 1257, 636, 637, 445, + 628, 1090, 94, 1128, 1293, 642, 393, 643, 644, 645, + 646, 647, 905, 906, 213, 907, 55, 904, 908, 904, + 760, 1365, 1012, 1009, 904, 1219, 904, 569, 896, 1174, + 1291, 1373, 1380, 701, 1259, 1069, 1225, 447, 629, 896, + 56, 569, 214, 257, 257, 1091, 896, 257, 702, 257, + 1013, 257, 394, 257, -662, 395, 1042, 1175, 396, -662, + 896, 1394, 1395, 77, 1226, 669, 670, 1235, 896, 674, + 906, 676, 906, 678, 1241, 687, 822, 906, -662, 906, + 55, 1014, 665, 666, 256, 1014, 55, 256, 1246, 812, + 78, 1165, 889, 1017, 813, 812, 1285, 1138, 96, 97, + 98, 256, -669, 87, 56, 563, 890, -669, 1247, 1408, + 56, 256, -676, 1414, 256, 256, 256, -676, 45, 1248, + 1249, 256, 581, 1066, 46, 766, -669, 814, 632, 633, + 324, 487, 588, 1243, 325, 368, -676, 88, 144, 145, + 146, 147, 1055, 1053, 1286, -344, 595, 598, 326, 327, + -344, 488, 589, 328, 329, 330, 331, 257, 85, 772, + 1220, 959, 960, 632, 633, 90, 596, 599, 891, -344, + 257, 973, 971, 1057, 1094, 91, 92, 977, 978, 773, + 980, 981, 892, 983, 984, 974, 986, 1058, 1095, 1076, + 256, 256, 1077, 93, 256, 396, 256, 845, 256, 1032, + 256, 832, 836, 1037, 1214, 1130, 846, 79, 1033, 817, + 99, 105, 1038, 80, 1131, 109, 850, 106, 1090, 1230, + 127, 110, 634, 635, 636, 637, 638, 112, 129, 639, + 640, 641, 642, 113, 643, 644, 645, 646, 647, 115, + 648, 649, 1217, 133, 1292, 116, 650, 1196, 652, 134, + 1080, 1208, 1178, 130, 257, 1209, 1081, 896, 1288, 636, + 637, 896, 140, 257, 896, 131, 257, 642, 139, 643, + 644, 645, 646, 647, 1166, 1124, 894, 1168, 632, 633, + 1170, 83, 368, 149, 165, 899, 764, 1139, 900, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 1118, + 166, 368, 368, 1119, 256, 879, 880, 368, 368, 665, + 666, 883, 885, 167, 368, 368, 368, 256, 887, 1089, + 1097, 168, 368, 368, 169, 1205, 1302, 1354, 1145, 660, + 661, 662, 663, 664, 100, 257, 257, 257, 257, 204, + 1154, 815, 951, 257, 665, 666, 202, 257, 1228, 210, + 211, 1260, 257, 257, 207, 257, 257, 958, 257, 257, + 961, 257, 1098, 1099, 1100, 967, 100, 1103, 102, 1167, + 153, 154, 800, 801, 636, 637, 318, 319, 1275, 1381, + 320, 322, 642, 333, 643, 644, 645, 646, 647, 100, + 101, 102, 210, 211, 212, 1338, 52, 53, 54, 334, + 1123, 256, 337, 338, 342, 343, 344, 345, 346, 348, + 256, 347, 355, 256, 349, 350, 351, 1334, 369, 352, + 1207, 353, 368, 354, 1210, 373, 1030, 374, 375, 376, + 377, 1319, 378, 385, 357, 389, 379, 391, 476, 500, + 1300, 511, 497, 512, 560, 1338, 662, 663, 664, 513, + 565, 590, 593, 575, 576, 671, 1308, 1309, 257, 665, + 666, 358, 359, 582, 604, 591, 687, 605, 592, 594, + 597, 1177, 600, 695, 1388, 601, 257, 606, 672, 607, + 608, 507, 256, 256, 256, 256, 609, 692, 696, 697, + 256, 626, 1356, 698, 256, 15, 668, 625, 1062, 256, + 256, 688, 256, 256, 699, 256, 256, 706, 256, 707, + 713, 714, 715, 716, 722, 1370, 1371, 723, 1372, 724, + 725, 726, 1413, 727, 360, 728, 729, 730, 361, 731, + 733, 732, 735, 770, 1231, 754, 765, 257, 257, 257, + 755, 771, 257, 805, 808, 1390, 775, 809, 776, 777, + 824, 827, 843, 896, 895, 898, 903, 902, 913, 916, + 917, 632, 633, 920, 918, 950, 962, 965, 987, 998, + 1014, 922, 1002, 1003, 1020, 257, 1004, 1333, 1005, 1008, + 1022, 1040, 1015, 1336, 1045, 362, 1016, 1060, 363, 1048, + 364, 1061, 1021, 1405, 1073, 1074, 1023, 1407, 1050, 1024, + 1052, 1025, 1035, 1079, 365, 256, 1083, 1036, 1085, 1072, + 366, 1104, 1087, 1088, 1101, 1164, 1093, 1102, 465, 1105, + 1106, 1107, 1110, 256, 1108, 1109, 257, 1111, 486, 1112, + 1113, 1114, 1147, 1173, 1176, 1116, 1148, 1188, 496, 1191, + 1192, 1193, 1150, 1195, 1213, 1155, 257, 1162, 1161, 1189, + 1318, 632, 633, 1221, 1187, 634, 635, 636, 637, 638, + 559, 1218, 639, 640, 641, 642, 1216, 643, 644, 645, + 646, 647, 1222, 648, 649, 1252, 1223, 1224, 1244, 1255, + 1258, 1262, 1307, 1266, 256, 256, 256, 1267, 1268, 256, + 1273, 1274, 1279, 1281, 1282, 602, 603, 1310, 1290, 1317, + 1320, 1335, 1328, 1330, 1301, 1331, 1332, 1341, 1375, 257, + 1349, 257, 612, 615, 616, 617, 618, 619, 1376, 1389, + 1386, 802, 256, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 1374, 1233, 1377, 1391, 125, 18, 1392, 1396, + 1397, 1402, 665, 666, 81, 634, 635, 636, 637, 638, + 164, 1398, 639, 640, 641, 642, 1399, 643, 644, 645, + 646, 647, 1400, 648, 649, 1409, 128, 1410, 1411, 650, + 691, 1412, 1311, 256, 143, 1312, 341, 1313, 1314, 632, + 633, 1315, 24, 1297, 630, 1264, 700, 1265, 1324, 1180, + 89, 948, 1325, 256, 705, 1369, 1092, 0, 709, 0, + 0, 712, 0, 0, 579, 580, 257, 718, 0, 721, + 0, 0, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 0, 0, 0, 257, 0, 0, 1303, 0, + 0, 0, 665, 666, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 762, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 256, 0, 256, 0, + 0, 0, 612, 782, 0, 0, 785, 0, 0, 0, + 0, 0, 0, 634, 635, 636, 637, 794, 795, 796, + 797, 798, 799, 642, 0, 643, 644, 645, 646, 647, + 0, 648, 649, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 837, 838, 0, + 0, 839, 840, 841, 842, 0, 844, 0, 847, 848, + 849, 851, 852, 853, 854, 855, 856, 858, 859, 860, + 861, 862, 863, 864, 865, 866, 867, 868, 0, 876, + 0, 0, 0, 0, 0, 660, 661, 662, 663, 664, + 0, 0, 0, 256, 0, 0, 0, 0, 0, 0, + 665, 666, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 256, 0, 0, 0, 0, 0, 0, 910, + 0, 912, 0, 0, 914, 0, 915, 0, 0, 0, + 0, 0, 0, 919, 0, 0, 0, 0, 921, 0, + 0, 0, 0, 0, 0, 815, 0, 0, 0, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, - 940, 941, 942, 943, 944, 945, 946, 0, 0, 0, - 0, 0, 0, 952, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 965, 0, 0, 214, 0, - 0, 0, 0, 0, 215, 0, 0, 0, 0, 0, - 216, 814, 0, 0, 0, 0, 0, 0, 0, 0, - 217, 0, 0, 993, 0, 0, 995, 611, 218, 0, - 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 219, 0, 0, 0, 0, 558, 0, - 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, + 940, 941, 942, 943, 944, 945, 946, 947, 0, 0, + 0, 0, 0, 0, 953, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 966, 0, 0, 215, + 0, 0, 0, 0, 0, 216, 0, 0, 0, 0, + 0, 217, 815, 0, 0, 0, 0, 0, 0, 0, + 0, 218, 0, 0, 994, 0, 0, 996, 612, 219, + 0, 0, 1001, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 220, 0, 0, 0, 0, 559, + 0, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, - 250, 251, 252, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1033, 0, 0, 0, 1038, 214, 0, 0, - 0, 631, 632, 215, 0, 0, 0, 0, 0, 216, - 0, 0, 0, 0, 0, 0, 0, 55, 1000, 217, - 0, 0, 0, 0, 1058, 0, 0, 218, 0, 0, - 253, 1062, 0, 0, 0, 0, 0, 0, 1067, 0, - 0, 56, 219, 0, 1070, 0, 0, 0, 0, 220, + 250, 251, 252, 253, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1034, 0, 0, 0, 1039, 215, 0, + 0, 0, 632, 633, 216, 0, 0, 0, 0, 0, + 217, 0, 0, 0, 0, 0, 0, 0, 55, 1001, + 218, 0, 0, 0, 0, 1059, 0, 0, 219, 0, + 0, 254, 1063, 0, 0, 0, 0, 0, 0, 1068, + 0, 0, 56, 220, 0, 1071, 0, 0, 0, 0, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, - 251, 252, 0, 0, 0, 0, 254, 0, 497, 0, - 0, 0, 0, 0, 0, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 0, 55, 0, 0, 649, - 650, 651, 0, 0, 0, 652, 1120, 1121, 0, 253, - 1124, 1125, 1126, 0, 1000, 0, 0, 0, 0, 0, - 501, 0, 0, 1140, 0, 1142, 0, 1145, 0, 0, - 502, 0, 0, 1148, 0, 0, 0, 1151, 0, 0, - 653, 0, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 214, 0, 0, 0, 0, - 0, 215, 664, 665, 0, 254, 666, 216, 0, 0, - 0, 558, 0, 0, 1171, 0, 0, 217, 0, 0, - 0, 0, 0, 0, 0, 218, 0, 0, 0, 0, + 251, 252, 253, 0, 0, 0, 0, 255, 0, 498, + 0, 0, 0, 0, 0, 0, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 0, 55, 0, 0, + 650, 651, 652, 0, 0, 0, 653, 1121, 1122, 0, + 254, 1125, 1126, 1127, 0, 1001, 0, 0, 0, 0, + 0, 502, 0, 0, 1141, 0, 1143, 0, 1146, 0, + 0, 503, 0, 0, 1149, 0, 0, 0, 1152, 0, + 0, 654, 0, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 215, 0, 0, 0, + 0, 0, 216, 665, 666, 0, 255, 667, 217, 0, + 0, 0, 559, 0, 0, 1172, 0, 0, 218, 0, + 0, 0, 0, 0, 0, 0, 219, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 219, 0, 0, 0, 0, 0, 611, 220, 221, 222, + 0, 220, 0, 0, 0, 0, 0, 612, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250, 251, 252, + 253, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 1238, 0, 1239, 0, 0, 0, 0, 1242, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 1245, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 1261, 0, 0, 0, 0, 0, 0, 254, 0, + 0, 0, 1269, 0, 0, 0, 0, 0, 0, 56, + 1276, 1277, 1278, 0, 0, 0, 0, 1284, 0, 0, + 0, 612, 1287, 0, 0, 0, 0, 0, 0, 0, + 0, 1294, 1295, 1296, 0, 0, 0, 0, 0, 0, + 1299, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 255, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 1316, 0, 0, 0, 0, + 0, 0, 0, 1321, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 612, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1237, 0, 1238, 0, 0, 0, 0, 1241, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 1244, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 1260, 0, 0, 0, 0, 0, 0, 253, 0, 0, - 0, 1268, 0, 0, 0, 0, 0, 0, 56, 1275, - 1276, 1277, 0, 0, 0, 0, 1283, 0, 0, 0, - 611, 1286, 0, 0, 0, 0, 0, 0, 0, 0, - 1293, 1294, 1295, 0, 0, 0, 0, 0, 0, 1298, + 0, 1344, 0, 0, 1347, 1348, 0, 0, 0, 0, + 0, 1351, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 1355, 0, 0, 0, 0, 0, 0, + 0, 0, 1357, 0, 0, 0, 0, 0, 0, 0, + 0, 1366, 0, 0, 0, 0, 0, 0, 520, 0, + 0, 0, 401, 402, 3, 0, 521, 522, 523, 0, + 524, 0, 403, 404, 405, 406, 407, 0, 0, 1384, + 0, 0, 408, 525, 409, 526, 527, 0, 410, 0, + 0, 0, 0, 0, 0, 528, 411, 0, 1401, 529, + 0, 530, 412, 1403, 1404, 413, 0, 8, 414, 531, + 0, 532, 415, 0, 0, 533, 534, 0, 0, 0, + 0, 0, 535, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 536, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 254, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 1315, 0, 0, 0, 0, 0, - 0, 0, 1320, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 611, 0, 0, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 0, 430, 431, 432, 433, 434, 435, 436, 437, 56, + 438, 0, 0, 0, 0, 0, 0, 439, 537, 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 1343, 0, 0, 1346, 1347, 0, 0, 0, 0, 0, - 1350, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 1354, 0, 0, 0, 0, 0, 0, 0, - 0, 1356, 0, 0, 0, 0, 0, 0, 0, 0, - 1365, 0, 0, 0, 0, 0, 0, 519, 0, 0, - 0, 400, 401, 3, 0, 520, 521, 522, 0, 523, - 0, 402, 403, 404, 405, 406, 0, 0, 1383, 0, - 0, 407, 524, 408, 525, 526, 0, 409, 0, 0, - 0, 0, 0, 0, 527, 410, 0, 1400, 528, 0, - 529, 411, 1402, 1403, 412, 0, 8, 413, 530, 0, - 531, 414, 0, 0, 532, 533, 0, 0, 0, 0, - 0, 534, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 535, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 0, 0, 0, 0, + 445, 0, 446, 520, 447, 448, 0, 401, 402, 3, + 0, 521, 522, 523, 0, 524, 0, 403, 404, 405, + 406, 407, 0, 0, 0, 0, 0, 408, 525, 409, + 526, 527, 0, 410, 0, 0, 0, 0, 0, 0, + 528, 411, 0, 0, 529, 0, 530, 412, 0, 0, + 413, 0, 8, 414, 531, 0, 532, 415, 0, 0, + 533, 534, 0, 0, 0, 0, 0, 535, 0, 0, + 416, 417, 0, 221, 222, 223, 0, 225, 226, 227, + 228, 229, 418, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 0, 243, 244, 245, 0, 0, + 248, 249, 250, 251, 419, 420, 421, 536, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 422, + 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 0, - 429, 430, 431, 432, 433, 434, 435, 436, 56, 437, - 0, 0, 0, 0, 0, 0, 438, 536, 537, 0, + 55, 0, 0, 0, 0, 0, 0, 0, 424, 425, + 426, 427, 428, 0, 429, 0, 430, 431, 432, 433, + 434, 435, 436, 437, 56, 438, 0, 0, 0, 0, + 0, 0, 439, 1018, 538, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 440, + 441, 442, 0, 14, 0, 0, 443, 444, 0, 0, + 0, 0, 0, 0, 0, 445, 0, 446, 520, 447, + 448, 0, 401, 402, 3, 0, 521, 522, 523, 0, + 524, 0, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 525, 409, 526, 527, 0, 410, 0, + 0, 0, 0, 0, 0, 528, 411, 0, 0, 529, + 0, 530, 412, 0, 0, 413, 0, 8, 414, 531, + 0, 532, 415, 0, 0, 533, 534, 0, 0, 0, + 0, 0, 535, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 536, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 0, 0, 0, 0, 444, - 0, 445, 519, 446, 447, 0, 400, 401, 3, 0, - 520, 521, 522, 0, 523, 0, 402, 403, 404, 405, - 406, 0, 0, 0, 0, 0, 407, 524, 408, 525, - 526, 0, 409, 0, 0, 0, 0, 0, 0, 527, - 410, 0, 0, 528, 0, 529, 411, 0, 0, 412, - 0, 8, 413, 530, 0, 531, 414, 0, 0, 532, - 533, 0, 0, 0, 0, 0, 534, 0, 0, 415, - 416, 0, 220, 221, 222, 0, 224, 225, 226, 227, - 228, 417, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 0, 242, 243, 244, 0, 0, 247, - 248, 249, 250, 418, 419, 420, 535, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 421, 422, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 0, 430, 431, 432, 433, 434, 435, 436, 437, 56, + 438, 0, 0, 0, 0, 0, 0, 439, 1169, 538, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, - 0, 0, 0, 0, 0, 0, 0, 423, 424, 425, - 426, 427, 0, 428, 0, 429, 430, 431, 432, 433, - 434, 435, 436, 56, 437, 0, 0, 0, 0, 0, - 0, 438, 1017, 537, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 439, 440, - 441, 0, 14, 0, 0, 442, 443, 0, 0, 0, - 0, 0, 0, 0, 444, 0, 445, 519, 446, 447, - 0, 400, 401, 3, 0, 520, 521, 522, 0, 523, - 0, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 524, 408, 525, 526, 0, 409, 0, 0, - 0, 0, 0, 0, 527, 410, 0, 0, 528, 0, - 529, 411, 0, 0, 412, 0, 8, 413, 530, 0, - 531, 414, 0, 0, 532, 533, 0, 0, 0, 0, - 0, 534, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 535, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 0, - 429, 430, 431, 432, 433, 434, 435, 436, 56, 437, - 0, 0, 0, 0, 0, 0, 438, 1168, 537, 0, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 401, 402, 0, 0, + 445, 0, 446, 0, 447, 448, 403, 404, 405, 406, + 407, 0, 0, 0, 0, 0, 408, 525, 409, 526, + 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, + 411, 0, 0, 0, 0, 0, 412, 0, 0, 413, + 0, 0, 414, 531, 0, 0, 415, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 417, 0, 221, 222, 223, 0, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 419, 420, 421, 536, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 400, 401, 0, 0, 444, - 0, 445, 0, 446, 447, 402, 403, 404, 405, 406, - 0, 0, 0, 0, 0, 407, 524, 408, 525, 0, - 0, 409, 0, 0, 0, 0, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 411, 0, 0, 412, 0, - 0, 413, 530, 0, 0, 414, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, - 0, 220, 221, 222, 0, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 418, 419, 420, 535, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 421, 422, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 426, + 427, 428, 0, 429, 0, 430, 431, 432, 433, 434, + 435, 436, 437, 56, 438, 0, 0, 0, 0, 0, + 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, + 442, 0, 14, 0, 0, 443, 444, 0, 0, 0, + 0, 0, 401, 402, 445, 0, 446, 0, 447, 448, + 620, 0, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 0, 409, 0, 0, 0, 410, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, + 0, 0, 412, 0, 0, 413, 621, 0, 414, 0, + 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 423, 424, 425, 426, - 427, 0, 428, 0, 429, 430, 431, 432, 433, 434, - 435, 436, 56, 437, 0, 0, 0, 0, 0, 0, - 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 439, 440, 441, - 0, 14, 0, 0, 442, 443, 0, 0, 0, 0, - 0, 400, 401, 444, 0, 445, 0, 446, 447, 619, - 0, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 0, 408, 0, 0, 0, 409, 0, 0, - 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 411, 0, 0, 412, 620, 0, 413, 0, 0, - 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 817, 430, 431, 432, 433, 434, 435, 436, 437, 818, + 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 816, - 429, 430, 431, 432, 433, 434, 435, 436, 817, 437, - 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 0, 0, 401, 402, + 445, 0, 446, 0, 447, 448, 620, 0, 403, 404, + 405, 406, 407, 0, 0, 0, 0, 0, 408, 0, + 409, 0, 0, 0, 410, 0, 0, 0, 0, 0, + 0, 0, 411, 0, 0, 0, 0, 0, 412, 0, + 0, 413, 621, 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 0, 0, 400, 401, 444, - 0, 445, 0, 446, 447, 619, 0, 402, 403, 404, - 405, 406, 0, 0, 0, 0, 0, 407, 0, 408, - 0, 0, 0, 409, 0, 0, 0, 0, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 411, 0, 0, - 412, 620, 0, 413, 0, 0, 0, 414, 0, 0, + 0, 416, 417, 0, 221, 222, 223, 0, 225, 226, + 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 0, 243, 244, 245, 0, + 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 416, 0, 220, 221, 222, 0, 224, 225, 226, - 227, 228, 417, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 0, 242, 243, 244, 0, 0, - 247, 248, 249, 250, 418, 419, 420, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 423, 424, - 425, 426, 427, 0, 428, 0, 429, 430, 431, 432, - 433, 434, 435, 436, 56, 437, 0, 0, 0, 0, - 0, 0, 438, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 439, - 440, 441, 0, 14, 0, 0, 442, 443, 0, 0, - 0, 400, 401, 0, 0, 444, 0, 445, 0, 446, - 447, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 0, 408, 0, 0, 0, 409, 0, 0, - 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 411, 0, 0, 412, 0, 0, 413, 0, 0, - 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 426, 427, 428, 0, 429, 0, 430, 431, 432, + 433, 434, 435, 436, 437, 56, 438, 0, 0, 0, + 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 816, - 429, 430, 431, 432, 433, 434, 435, 436, 817, 437, - 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 440, 441, 442, 0, 14, 0, 0, 443, 444, 0, + 0, 0, 401, 402, 0, 0, 445, 0, 446, 0, + 447, 448, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 0, 409, 0, 0, 0, 410, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, + 0, 0, 412, 0, 0, 413, 0, 0, 414, 0, + 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 400, 401, 0, 0, 818, - 0, 445, 819, 446, 447, 402, 403, 404, 405, 406, - 0, 0, 0, 0, 0, 407, 0, 408, 0, 0, - 0, 409, 0, 0, 0, 0, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 411, 0, 0, 412, 0, - 0, 413, 0, 0, 0, 414, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, - 0, 220, 221, 222, 0, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 418, 419, 420, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 421, 422, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 817, 430, 431, 432, 433, 434, 435, 436, 437, 818, + 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 423, 424, 425, 426, - 427, 0, 428, 0, 429, 430, 431, 432, 433, 434, - 435, 436, 56, 437, 0, 0, 0, 0, 0, 0, - 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 439, 440, 441, - 0, 14, 0, 0, 442, 443, 0, 0, 0, 0, - 0, 400, 401, 444, 494, 445, 0, 446, 447, 610, - 0, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 0, 408, 0, 0, 0, 409, 0, 0, - 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 411, 0, 0, 412, 0, 0, 413, 0, 0, - 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 401, 402, 0, 0, + 819, 0, 446, 820, 447, 448, 403, 404, 405, 406, + 407, 0, 0, 0, 0, 0, 408, 0, 409, 0, + 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, + 411, 0, 0, 0, 0, 0, 412, 0, 0, 413, + 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 417, 0, 221, 222, 223, 0, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 0, - 429, 430, 431, 432, 433, 434, 435, 436, 56, 437, - 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 426, + 427, 428, 0, 429, 0, 430, 431, 432, 433, 434, + 435, 436, 437, 56, 438, 0, 0, 0, 0, 0, + 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, + 442, 0, 14, 0, 0, 443, 444, 0, 0, 0, + 0, 0, 401, 402, 445, 495, 446, 0, 447, 448, + 611, 0, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 0, 409, 0, 0, 0, 410, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, + 0, 0, 412, 0, 0, 413, 0, 0, 414, 0, + 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 400, 401, 0, 0, 444, - 0, 445, 0, 446, 447, 402, 403, 404, 405, 406, - 0, 0, 0, 0, 0, 407, 0, 408, 0, 0, - 0, 409, 0, 0, 0, 0, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 411, 0, 0, 412, 0, - 0, 413, 0, 0, 0, 414, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, - 0, 220, 221, 222, 0, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 418, 419, 420, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 421, 422, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 0, 430, 431, 432, 433, 434, 435, 436, 437, 56, + 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 423, 424, 425, 426, - 427, 0, 428, 0, 429, 430, 431, 432, 433, 434, - 435, 436, 56, 437, 0, 0, 0, 0, 0, 0, - 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 439, 440, 441, - 0, 14, 0, 0, 442, 443, 0, 0, 0, 400, - 401, 0, 0, 444, 689, 445, 0, 446, 447, 402, - 403, 404, 405, 406, 0, 0, 0, 0, 0, 407, - 0, 408, 0, 0, 0, 409, 0, 0, 0, 0, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 411, - 0, 0, 412, 0, 0, 413, 0, 0, 0, 414, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 401, 402, 0, 0, + 445, 0, 446, 0, 447, 448, 403, 404, 405, 406, + 407, 0, 0, 0, 0, 0, 408, 0, 409, 0, + 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, + 411, 0, 0, 0, 0, 0, 412, 0, 0, 413, + 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 417, 0, 221, 222, 223, 0, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 416, 0, 220, 221, 222, 0, 224, - 225, 226, 227, 228, 417, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 0, 242, 243, 244, - 0, 0, 247, 248, 249, 250, 418, 419, 420, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 426, + 427, 428, 0, 429, 0, 430, 431, 432, 433, 434, + 435, 436, 437, 56, 438, 0, 0, 0, 0, 0, + 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, + 442, 0, 14, 0, 0, 443, 444, 0, 0, 0, + 401, 402, 0, 0, 445, 690, 446, 0, 447, 448, + 403, 404, 405, 406, 407, 0, 0, 0, 0, 0, + 408, 0, 409, 0, 0, 0, 410, 0, 0, 0, + 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, + 412, 0, 0, 413, 0, 0, 414, 0, 0, 0, + 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 416, 417, 0, 221, 222, 223, 0, + 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 0, 243, 244, + 245, 0, 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 421, 422, 0, 0, 0, 0, 0, 0, 0, - 707, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 423, 424, 425, 426, 427, 0, 428, 0, 429, 430, - 431, 432, 433, 434, 435, 436, 56, 437, 0, 0, - 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, + 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, + 0, 708, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 424, 425, 426, 427, 428, 0, 429, 0, 430, + 431, 432, 433, 434, 435, 436, 437, 56, 438, 0, + 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 439, 440, 441, 0, 14, 0, 0, 442, 443, - 0, 0, 0, 400, 401, 0, 0, 444, 0, 445, - 0, 446, 447, 402, 403, 404, 405, 406, 0, 0, - 0, 0, 0, 407, 0, 408, 0, 0, 0, 409, - 0, 0, 0, 0, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 411, 0, 0, 412, 0, 0, 413, - 0, 0, 0, 414, 0, 0, 0, 0, 0, 710, - 0, 0, 0, 0, 0, 0, 415, 416, 0, 220, - 221, 222, 0, 224, 225, 226, 227, 228, 417, 230, + 0, 0, 440, 441, 442, 0, 14, 0, 0, 443, + 444, 0, 0, 0, 401, 402, 0, 0, 445, 0, + 446, 0, 447, 448, 403, 404, 405, 406, 407, 0, + 0, 0, 0, 0, 408, 0, 409, 0, 0, 0, + 410, 0, 0, 0, 0, 0, 0, 0, 411, 0, + 0, 0, 0, 0, 412, 0, 0, 413, 0, 0, + 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, + 711, 0, 0, 0, 0, 0, 0, 416, 417, 0, + 221, 222, 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 0, 242, 243, 244, 0, 0, 247, 248, 249, 250, - 418, 419, 420, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 421, 422, 0, 0, 0, + 241, 0, 243, 244, 245, 0, 0, 248, 249, 250, + 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 426, 427, 428, + 0, 429, 0, 430, 431, 432, 433, 434, 435, 436, + 437, 56, 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 423, 424, 425, 426, 427, 0, - 428, 0, 429, 430, 431, 432, 433, 434, 435, 436, - 56, 437, 0, 0, 0, 0, 0, 0, 438, 0, + 0, 0, 0, 0, 0, 0, 440, 441, 442, 0, + 14, 0, 0, 443, 444, 0, 0, 0, 401, 402, + 0, 0, 445, 0, 446, 0, 447, 448, 403, 404, + 405, 406, 407, 0, 0, 0, 0, 0, 408, 0, + 409, 0, 0, 0, 410, 0, 0, 0, 0, 0, + 0, 0, 411, 0, 0, 0, 0, 0, 412, 0, + 0, 413, 0, 0, 414, 0, 0, 0, 415, 0, + 0, 717, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 416, 417, 0, 221, 222, 223, 0, 225, 226, + 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 0, 243, 244, 245, 0, + 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 439, 440, 441, 0, 14, - 0, 0, 442, 443, 0, 0, 0, 400, 401, 0, - 0, 444, 0, 445, 0, 446, 447, 402, 403, 404, - 405, 406, 0, 0, 0, 0, 0, 407, 0, 408, - 0, 0, 0, 409, 0, 0, 0, 0, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 411, 0, 0, - 412, 0, 0, 413, 0, 0, 0, 414, 0, 0, - 716, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 416, 0, 220, 221, 222, 0, 224, 225, 226, - 227, 228, 417, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 0, 242, 243, 244, 0, 0, - 247, 248, 249, 250, 418, 419, 420, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 423, 424, - 425, 426, 427, 0, 428, 0, 429, 430, 431, 432, - 433, 434, 435, 436, 56, 437, 0, 0, 0, 0, - 0, 0, 438, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 439, - 440, 441, 0, 14, 0, 0, 442, 443, 0, 0, - 0, 400, 401, 0, 0, 444, 0, 445, 0, 446, - 447, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 0, 408, 0, 0, 0, 409, 0, 0, - 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 411, 0, 0, 412, 0, 0, 413, 0, 0, - 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, - 0, 0, 719, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 0, - 429, 430, 431, 432, 433, 434, 435, 436, 56, 437, - 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 426, 427, 428, 0, 429, 0, 430, 431, 432, + 433, 434, 435, 436, 437, 56, 438, 0, 0, 0, + 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 400, 401, 0, 0, 444, - 0, 445, 0, 446, 447, 402, 403, 404, 405, 406, - 0, 0, 856, 0, 0, 407, 0, 408, 0, 0, - 0, 409, 0, 0, 0, 0, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 411, 0, 0, 412, 0, - 0, 413, 0, 0, 0, 414, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, - 0, 220, 221, 222, 0, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 418, 419, 420, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 421, 422, 0, + 440, 441, 442, 0, 14, 0, 0, 443, 444, 0, + 0, 0, 401, 402, 0, 0, 445, 0, 446, 0, + 447, 448, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 0, 409, 0, 0, 0, 410, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, + 0, 0, 412, 0, 0, 413, 0, 0, 414, 0, + 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, + 0, 0, 0, 720, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 0, 430, 431, 432, 433, 434, 435, 436, 437, 56, + 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 423, 424, 425, 426, - 427, 0, 428, 0, 429, 430, 431, 432, 433, 434, - 435, 436, 56, 437, 0, 0, 0, 0, 0, 0, - 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 439, 440, 441, - 0, 14, 0, 0, 442, 443, 0, 0, 0, 400, - 401, 0, 0, 444, 0, 445, 0, 446, 447, 402, - 403, 404, 405, 406, 0, 0, 0, 0, 0, 407, - 0, 408, 0, 0, 0, 409, 0, 0, 0, 0, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 411, - 0, 0, 412, 0, 0, 413, 0, 0, 0, 414, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 401, 402, 0, 0, + 445, 0, 446, 0, 447, 448, 403, 404, 405, 406, + 407, 0, 0, 857, 0, 0, 408, 0, 409, 0, + 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, + 411, 0, 0, 0, 0, 0, 412, 0, 0, 413, + 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 417, 0, 221, 222, 223, 0, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 416, 0, 220, 221, 222, 0, 224, - 225, 226, 227, 228, 417, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 0, 242, 243, 244, - 0, 0, 247, 248, 249, 250, 418, 419, 420, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 426, + 427, 428, 0, 429, 0, 430, 431, 432, 433, 434, + 435, 436, 437, 56, 438, 0, 0, 0, 0, 0, + 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, + 442, 0, 14, 0, 0, 443, 444, 0, 0, 0, + 401, 402, 0, 0, 445, 0, 446, 0, 447, 448, + 403, 404, 405, 406, 407, 0, 0, 0, 0, 0, + 408, 0, 409, 0, 0, 0, 410, 0, 0, 0, + 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, + 412, 0, 0, 413, 0, 0, 414, 0, 0, 0, + 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 416, 417, 0, 221, 222, 223, 0, + 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 0, 243, 244, + 245, 0, 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 421, 422, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 423, 424, 425, 426, 427, 0, 428, 0, 429, 430, - 431, 432, 433, 434, 435, 436, 56, 437, 0, 0, - 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 424, 425, 426, 427, 428, 0, 429, 0, 430, + 431, 432, 433, 434, 435, 436, 437, 56, 438, 0, + 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 439, 440, 441, 0, 14, 0, 0, 442, 443, - 0, 0, 0, 400, 401, 0, 0, 444, 0, 445, - 876, 446, 447, 402, 403, 404, 405, 406, 0, 0, - 0, 0, 0, 407, 0, 408, 0, 0, 0, 409, - 0, 0, 0, 0, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 411, 0, 0, 412, 0, 0, 413, - 0, 0, 0, 414, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 415, 416, 0, 220, - 221, 222, 0, 224, 225, 226, 227, 228, 417, 230, + 0, 0, 440, 441, 442, 0, 14, 0, 0, 443, + 444, 0, 0, 0, 401, 402, 0, 0, 445, 0, + 446, 877, 447, 448, 403, 404, 405, 406, 407, 0, + 0, 0, 0, 0, 408, 0, 409, 0, 0, 0, + 410, 0, 0, 0, 0, 0, 0, 0, 411, 0, + 0, 0, 0, 0, 412, 0, 0, 413, 0, 0, + 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 416, 417, 0, + 221, 222, 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 0, 242, 243, 244, 0, 0, 247, 248, 249, 250, - 418, 419, 420, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 421, 422, 0, 0, 0, + 241, 0, 243, 244, 245, 0, 0, 248, 249, 250, + 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 426, 427, 428, + 0, 429, 0, 430, 431, 432, 433, 434, 435, 436, + 437, 56, 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 423, 424, 425, 426, 427, 0, - 428, 0, 429, 430, 431, 432, 433, 434, 435, 436, - 56, 437, 0, 0, 0, 0, 0, 0, 438, 0, + 0, 0, 0, 0, 0, 0, 440, 441, 442, 0, + 14, 0, 0, 443, 444, 0, 0, 0, 401, 402, + 0, 0, 445, 0, 446, 1144, 447, 448, 403, 404, + 405, 406, 407, 0, 0, 0, 0, 0, 408, 0, + 409, 0, 0, 0, 410, 0, 0, 0, 0, 0, + 0, 0, 411, 0, 0, 0, 0, 0, 412, 0, + 0, 413, 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 439, 440, 441, 0, 14, - 0, 0, 442, 443, 0, 0, 0, 400, 401, 0, - 0, 444, 0, 445, 1143, 446, 447, 402, 403, 404, - 405, 406, 0, 0, 0, 0, 0, 407, 0, 408, - 0, 0, 0, 409, 0, 0, 0, 0, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 411, 0, 0, - 412, 0, 0, 413, 0, 0, 0, 414, 0, 0, + 0, 416, 417, 0, 221, 222, 223, 0, 225, 226, + 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 0, 243, 244, 245, 0, + 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 416, 0, 220, 221, 222, 0, 224, 225, 226, - 227, 228, 417, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 0, 242, 243, 244, 0, 0, - 247, 248, 249, 250, 418, 419, 420, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 423, 424, - 425, 426, 427, 0, 428, 0, 429, 430, 431, 432, - 433, 434, 435, 436, 56, 437, 0, 0, 0, 0, - 0, 0, 438, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 439, - 440, 441, 0, 14, 0, 0, 442, 443, 0, 0, - 0, 400, 401, 0, 0, 444, 0, 445, 1152, 446, - 447, 402, 403, 404, 405, 406, 0, 0, 0, 0, - 0, 407, 0, 408, 0, 0, 0, 409, 0, 0, - 0, 0, 0, 0, 0, 410, 0, 0, 0, 0, - 0, 411, 0, 0, 412, 0, 0, 413, 0, 0, - 0, 414, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 415, 416, 0, 220, 221, 222, - 0, 224, 225, 226, 227, 228, 417, 230, 231, 232, - 233, 234, 235, 236, 237, 238, 239, 240, 0, 242, - 243, 244, 0, 0, 247, 248, 249, 250, 418, 419, - 420, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 421, 422, 0, 0, 0, 0, 0, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 426, 427, 428, 0, 429, 0, 430, 431, 432, + 433, 434, 435, 436, 437, 56, 438, 0, 0, 0, + 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 55, 0, 0, 0, 0, 0, - 0, 0, 423, 424, 425, 426, 427, 0, 428, 0, - 429, 430, 431, 432, 433, 434, 435, 436, 56, 437, - 0, 0, 0, 0, 0, 0, 438, 0, 0, 0, + 440, 441, 442, 0, 14, 0, 0, 443, 444, 0, + 0, 0, 401, 402, 0, 0, 445, 0, 446, 1153, + 447, 448, 403, 404, 405, 406, 407, 0, 0, 0, + 0, 0, 408, 0, 409, 0, 0, 0, 410, 0, + 0, 0, 0, 0, 0, 0, 411, 0, 0, 0, + 0, 0, 412, 0, 0, 413, 0, 0, 414, 0, + 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 416, 417, 0, 221, 222, + 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, + 233, 234, 235, 236, 237, 238, 239, 240, 241, 0, + 243, 244, 245, 0, 0, 248, 249, 250, 251, 419, + 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 439, 440, 441, 0, 14, 0, 0, - 442, 443, 0, 0, 0, 400, 401, 0, 0, 444, - 0, 445, 1205, 446, 447, 402, 403, 404, 405, 406, - 0, 0, 0, 0, 0, 407, 0, 408, 0, 0, - 0, 409, 0, 0, 0, 0, 0, 0, 0, 410, - 0, 0, 0, 0, 0, 411, 0, 0, 412, 0, - 0, 413, 0, 0, 0, 414, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 415, 416, - 0, 220, 221, 222, 0, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 418, 419, 420, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 421, 422, 0, + 0, 0, 0, 0, 0, 55, 0, 0, 0, 0, + 0, 0, 0, 424, 425, 426, 427, 428, 0, 429, + 0, 430, 431, 432, 433, 434, 435, 436, 437, 56, + 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 55, 0, - 0, 0, 0, 0, 0, 0, 423, 424, 425, 426, - 427, 0, 428, 0, 429, 430, 431, 432, 433, 434, - 435, 436, 56, 437, 0, 0, 0, 0, 0, 0, - 438, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 439, 440, 441, - 0, 14, 0, 0, 442, 443, 0, 0, 0, 400, - 401, 0, 0, 444, 0, 445, 1282, 446, 447, 402, - 403, 404, 405, 406, 0, 0, 0, 0, 0, 407, - 0, 408, 0, 0, 0, 409, 0, 0, 0, 0, - 0, 0, 0, 410, 0, 0, 0, 0, 0, 411, - 0, 0, 412, 0, 0, 413, 0, 0, 0, 414, + 0, 0, 0, 0, 440, 441, 442, 0, 14, 0, + 0, 443, 444, 0, 0, 0, 401, 402, 0, 0, + 445, 0, 446, 1206, 447, 448, 403, 404, 405, 406, + 407, 0, 0, 0, 0, 0, 408, 0, 409, 0, + 0, 0, 410, 0, 0, 0, 0, 0, 0, 0, + 411, 0, 0, 0, 0, 0, 412, 0, 0, 413, + 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 416, + 417, 0, 221, 222, 223, 0, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 415, 416, 0, 220, 221, 222, 0, 224, - 225, 226, 227, 228, 417, 230, 231, 232, 233, 234, - 235, 236, 237, 238, 239, 240, 0, 242, 243, 244, - 0, 0, 247, 248, 249, 250, 418, 419, 420, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 55, + 0, 0, 0, 0, 0, 0, 0, 424, 425, 426, + 427, 428, 0, 429, 0, 430, 431, 432, 433, 434, + 435, 436, 437, 56, 438, 0, 0, 0, 0, 0, + 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 440, 441, + 442, 0, 14, 0, 0, 443, 444, 0, 0, 0, + 401, 402, 0, 0, 445, 0, 446, 1283, 447, 448, + 403, 404, 405, 406, 407, 0, 0, 0, 0, 0, + 408, 0, 409, 0, 0, 0, 410, 0, 0, 0, + 0, 0, 0, 0, 411, 0, 0, 0, 0, 0, + 412, 0, 0, 413, 0, 0, 414, 0, 0, 0, + 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 416, 417, 0, 221, 222, 223, 0, + 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, + 235, 236, 237, 238, 239, 240, 241, 0, 243, 244, + 245, 0, 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 421, 422, 0, 0, 0, 0, 0, 0, 0, - 1297, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 55, 0, 0, 0, 0, 0, 0, 0, - 423, 424, 425, 426, 427, 0, 428, 0, 429, 430, - 431, 432, 433, 434, 435, 436, 56, 437, 0, 0, - 0, 0, 0, 0, 438, 0, 0, 0, 0, 0, + 0, 0, 422, 423, 0, 0, 0, 0, 0, 0, + 0, 1298, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 55, 0, 0, 0, 0, 0, 0, + 0, 424, 425, 426, 427, 428, 0, 429, 0, 430, + 431, 432, 433, 434, 435, 436, 437, 56, 438, 0, + 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 439, 440, 441, 0, 14, 0, 0, 442, 443, - 0, 0, 0, 400, 401, 0, 0, 444, 0, 445, - 0, 446, 447, 402, 403, 404, 405, 406, 0, 0, - 0, 0, 0, 407, 0, 408, 0, 0, 0, 409, - 0, 0, 0, 0, 0, 0, 0, 410, 0, 0, - 0, 0, 0, 411, 0, 0, 412, 0, 0, 413, - 0, 0, 0, 414, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 415, 416, 0, 220, - 221, 222, 0, 224, 225, 226, 227, 228, 417, 230, + 0, 0, 440, 441, 442, 0, 14, 0, 0, 443, + 444, 0, 0, 0, 401, 402, 0, 0, 445, 0, + 446, 0, 447, 448, 403, 404, 405, 406, 407, 0, + 0, 0, 0, 0, 408, 0, 409, 0, 0, 0, + 410, 0, 0, 0, 0, 0, 0, 0, 411, 0, + 0, 0, 0, 0, 412, 0, 0, 413, 0, 0, + 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 416, 417, 0, + 221, 222, 223, 0, 225, 226, 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, - 0, 242, 243, 244, 0, 0, 247, 248, 249, 250, - 418, 419, 420, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 421, 422, 0, 0, 0, + 241, 0, 243, 244, 245, 0, 0, 248, 249, 250, + 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 422, 423, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 55, 0, 0, + 0, 0, 0, 0, 0, 424, 425, 426, 427, 428, + 0, 429, 0, 430, 431, 432, 433, 434, 435, 436, + 437, 56, 438, 0, 0, 0, 0, 0, 0, 439, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 55, 0, 0, 0, - 0, 0, 0, 0, 423, 424, 425, 426, 427, 0, - 428, 0, 429, 430, 431, 432, 433, 434, 435, 436, - 56, 437, 0, 0, 0, 0, 0, 0, 438, 0, + 0, 0, 0, 0, 0, 0, 440, 441, 442, 0, + 14, 0, 0, 443, 444, 0, 0, 0, 401, 402, + 0, 0, 445, 0, 446, 0, 447, 448, 403, 404, + 405, 406, 407, 0, 0, 0, 0, 0, 408, 0, + 409, 0, 0, 0, 410, 0, 0, 0, 0, 0, + 0, 0, 411, 0, 0, 0, 0, 0, 412, 0, + 0, 413, 0, 0, 414, 0, 0, 0, 415, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 439, 440, 441, 0, 14, - 0, 0, 442, 443, 0, 0, 0, 400, 401, 0, - 0, 444, 0, 445, 0, 446, 447, 402, 403, 404, - 405, 406, 0, 0, 0, 0, 0, 407, 0, 408, - 0, 0, 0, 409, 0, 0, 0, 0, 0, 0, - 0, 410, 0, 0, 0, 0, 0, 411, 0, 0, - 412, 0, 0, 413, 0, 0, 0, 414, 0, 0, + 0, 416, 417, 0, 221, 222, 223, 0, 225, 226, + 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 0, 243, 244, 245, 0, + 0, 248, 249, 250, 251, 419, 420, 421, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 415, 416, 0, 220, 221, 222, 0, 224, 225, 226, - 227, 228, 417, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 0, 242, 243, 244, 0, 0, - 247, 248, 249, 250, 418, 419, 420, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 421, - 422, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 422, 423, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 55, 0, 0, 0, 0, 0, 0, 0, 423, 424, - 425, 426, 427, 0, 428, 0, 429, 430, 431, 432, - 433, 434, 435, 436, 56, 437, 631, 632, 0, 0, - 214, 0, 438, 0, 0, 0, 215, 0, 0, 0, - 0, 0, 216, 0, 0, 0, 0, 0, 0, 439, - 440, 441, 217, 14, 0, 0, 442, 443, 0, 0, - 218, 0, 631, 632, 0, 1128, 0, 445, 0, 446, - 447, 0, 0, 0, 0, 219, 0, 0, 0, 0, - 0, 0, 220, 221, 222, 223, 224, 225, 226, 227, + 0, 55, 0, 0, 0, 0, 0, 0, 0, 424, + 425, 426, 427, 428, 0, 429, 0, 430, 431, 432, + 433, 434, 435, 436, 437, 56, 438, 632, 633, 0, + 0, 215, 0, 439, 0, 0, 0, 216, 0, 0, + 0, 0, 0, 217, 0, 0, 0, 0, 0, 0, + 440, 441, 442, 218, 14, 0, 0, 443, 444, 0, + 0, 219, 0, 632, 633, 0, 1129, 0, 446, 0, + 447, 448, 0, 0, 0, 0, 220, 0, 0, 0, + 0, 0, 0, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, - 248, 249, 250, 251, 252, 0, 0, 0, 0, 0, - 633, 634, 635, 636, 637, 0, 0, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 0, 0, 55, - 652, 0, 0, 0, 631, 632, 633, 634, 635, 636, - 637, 0, 253, 638, 639, 640, 641, 0, 642, 643, - 644, 645, 646, 501, 647, 648, 0, 0, 0, 0, - 649, 650, 651, 0, 0, 653, 652, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 0, - 0, 683, 0, 0, 0, 0, 0, 0, 254, 0, - 0, 653, 0, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 664, 665, 0, 0, 900, 633, 634, - 635, 636, 637, 631, 632, 638, 639, 640, 641, 0, - 642, 643, 644, 645, 646, 0, 647, 648, 0, 0, - 0, 0, 649, 650, 651, 0, 0, 0, 652, 0, - 0, 0, 0, 0, 631, 632, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 653, 0, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 664, 665, 0, 0, 975, - 0, 0, 0, 0, 0, 0, 0, 633, 634, 635, - 636, 637, 0, 0, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 0, 0, 0, - 0, 649, 650, 651, 0, 0, 0, 652, 633, 634, - 635, 636, 637, 631, 632, 638, 639, 640, 641, 0, - 642, 643, 644, 645, 646, 0, 647, 648, 0, 0, - 0, 0, 649, 650, 651, 0, 0, 0, 652, 0, - 0, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 664, 665, 0, 0, 978, 0, - 0, 0, 0, 653, 0, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 664, 665, 0, 0, 987, - 0, 0, 0, 0, 0, 631, 632, 633, 634, 635, - 636, 637, 0, 0, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 0, 0, 0, - 0, 649, 650, 651, 0, 0, 0, 652, 631, 632, + 248, 249, 250, 251, 252, 253, 0, 0, 0, 0, + 0, 634, 635, 636, 637, 638, 0, 0, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 0, 0, + 55, 653, 0, 0, 0, 632, 633, 634, 635, 636, + 637, 638, 0, 254, 639, 640, 641, 642, 0, 643, + 644, 645, 646, 647, 502, 648, 649, 0, 0, 0, + 0, 650, 651, 652, 0, 0, 654, 653, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 0, 0, 684, 0, 0, 0, 0, 0, 0, 255, + 0, 0, 654, 0, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 665, 666, 0, 0, 901, 634, + 635, 636, 637, 638, 632, 633, 639, 640, 641, 642, + 0, 643, 644, 645, 646, 647, 0, 648, 649, 0, + 0, 0, 0, 650, 651, 652, 0, 0, 0, 653, + 0, 0, 0, 0, 0, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 654, 0, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, + 976, 0, 0, 0, 0, 0, 0, 0, 634, 635, + 636, 637, 638, 0, 0, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 0, 0, + 0, 0, 650, 651, 652, 0, 0, 0, 653, 634, + 635, 636, 637, 638, 632, 633, 639, 640, 641, 642, + 0, 643, 644, 645, 646, 647, 0, 648, 649, 0, + 0, 0, 0, 650, 651, 652, 0, 0, 0, 653, + 0, 0, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 665, 666, 0, 0, 979, + 0, 0, 0, 0, 654, 0, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, + 988, 0, 0, 0, 0, 0, 632, 633, 634, 635, + 636, 637, 638, 0, 0, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 0, 0, + 0, 0, 650, 651, 652, 0, 0, 0, 653, 632, + 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 664, 665, 0, 0, 988, 633, - 634, 635, 636, 637, 0, 0, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 0, - 0, 0, 0, 649, 650, 651, 0, 0, 0, 652, - 631, 632, 633, 634, 635, 636, 637, 0, 0, 638, - 639, 640, 641, 0, 642, 643, 644, 645, 646, 0, - 647, 648, 0, 0, 0, 0, 649, 650, 651, 0, - 0, 0, 652, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 0, 0, - 989, 0, 0, 0, 0, 0, 0, 653, 0, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 664, - 665, 0, 0, 990, 633, 634, 635, 636, 637, 631, - 632, 638, 639, 640, 641, 0, 642, 643, 644, 645, - 646, 0, 647, 648, 0, 0, 0, 0, 649, 650, - 651, 0, 0, 0, 652, 0, 0, 0, 0, 0, - 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 653, - 0, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 664, 665, 0, 0, 991, 0, 0, 0, 0, - 0, 0, 0, 633, 634, 635, 636, 637, 0, 0, - 638, 639, 640, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 0, 0, 0, 0, 649, 650, 651, - 0, 0, 0, 652, 633, 634, 635, 636, 637, 631, - 632, 638, 639, 640, 641, 0, 642, 643, 644, 645, - 646, 0, 647, 648, 0, 0, 0, 0, 649, 650, - 651, 0, 0, 0, 652, 0, 0, 0, 653, 0, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 0, 0, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 665, 666, 0, 0, 989, + 634, 635, 636, 637, 638, 0, 0, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 0, 0, 0, 0, 650, 651, 652, 0, 0, 0, + 653, 632, 633, 634, 635, 636, 637, 638, 0, 0, + 639, 640, 641, 642, 0, 643, 644, 645, 646, 647, + 0, 648, 649, 0, 0, 0, 0, 650, 651, 652, + 0, 0, 0, 653, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, + 0, 990, 0, 0, 0, 0, 0, 0, 654, 0, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 0, 0, 992, 0, 0, 0, 0, 653, - 0, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 664, 665, 0, 0, 1063, 0, 0, 0, 0, - 0, 631, 632, 633, 634, 635, 636, 637, 0, 0, - 638, 639, 640, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 0, 0, 0, 0, 649, 650, 651, - 0, 0, 0, 652, 631, 632, 0, 0, 0, 0, + 665, 666, 0, 0, 991, 634, 635, 636, 637, 638, + 632, 633, 639, 640, 641, 642, 0, 643, 644, 645, + 646, 647, 0, 648, 649, 0, 0, 0, 0, 650, + 651, 652, 0, 0, 0, 653, 0, 0, 0, 0, + 0, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 653, 0, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 654, 0, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 665, 666, 0, 0, 992, 0, 0, 0, + 0, 0, 0, 0, 634, 635, 636, 637, 638, 0, + 0, 639, 640, 641, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 0, 0, 0, 0, 650, 651, + 652, 0, 0, 0, 653, 634, 635, 636, 637, 638, + 632, 633, 639, 640, 641, 642, 0, 643, 644, 645, + 646, 647, 0, 648, 649, 0, 0, 0, 0, 650, + 651, 652, 0, 0, 0, 653, 0, 0, 0, 654, + 0, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 0, 0, 993, 0, 0, 0, 0, + 654, 0, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 665, 666, 0, 0, 1064, 0, 0, 0, + 0, 0, 632, 633, 634, 635, 636, 637, 638, 0, + 0, 639, 640, 641, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 0, 0, 0, 0, 650, 651, + 652, 0, 0, 0, 653, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 0, 0, 1066, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 0, 0, 0, 0, 649, - 650, 651, 0, 0, 0, 652, 631, 632, 633, 634, - 635, 636, 637, 0, 0, 638, 639, 640, 641, 0, - 642, 643, 644, 645, 646, 0, 647, 648, 0, 0, - 0, 0, 649, 650, 651, 0, 0, 0, 652, 0, - 653, 0, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 664, 665, 0, 0, 1069, 0, 0, 0, - 0, 0, 0, 653, 0, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 664, 665, 0, 0, 1095, - 633, 634, 635, 636, 637, 631, 632, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 0, 0, 0, - 652, 0, 0, 0, 0, 0, 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 654, + 0, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 0, 0, 1067, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 0, 0, 0, 0, + 650, 651, 652, 0, 0, 0, 653, 632, 633, 634, + 635, 636, 637, 638, 0, 0, 639, 640, 641, 642, + 0, 643, 644, 645, 646, 647, 0, 648, 649, 0, + 0, 0, 0, 650, 651, 652, 0, 0, 0, 653, + 0, 654, 0, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 665, 666, 0, 0, 1070, 0, 0, + 0, 0, 0, 0, 654, 0, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, + 1096, 634, 635, 636, 637, 638, 632, 633, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 0, 0, + 0, 653, 0, 0, 0, 0, 0, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 0, - 0, 1162, 0, 0, 0, 0, 0, 0, 0, 633, - 634, 635, 636, 637, 0, 0, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 0, - 0, 0, 0, 649, 650, 651, 0, 0, 0, 652, - 633, 634, 635, 636, 637, 631, 632, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 0, 0, 0, - 652, 0, 0, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 0, 0, - 1170, 0, 0, 0, 0, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 0, - 0, 1210, 0, 0, 0, 0, 0, 631, 632, 633, - 634, 635, 636, 637, 0, 0, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 0, - 0, 0, 0, 649, 650, 651, 0, 0, 0, 652, - 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 0, 0, 1163, 0, 0, 0, 0, 0, 0, 0, + 634, 635, 636, 637, 638, 0, 0, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 0, 0, 0, 0, 650, 651, 652, 0, 0, 0, + 653, 634, 635, 636, 637, 638, 632, 633, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 0, 0, + 0, 653, 0, 0, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, + 0, 1171, 0, 0, 0, 0, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 0, 0, 1211, 0, 0, 0, 0, 0, 632, 633, + 634, 635, 636, 637, 638, 0, 0, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 0, 0, 0, 0, 650, 651, 652, 0, 0, 0, + 653, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 0, 0, - 1211, 633, 634, 635, 636, 637, 0, 0, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 649, 650, 651, 0, 0, - 0, 652, 631, 632, 633, 634, 635, 636, 637, 0, - 0, 638, 639, 640, 641, 0, 642, 643, 644, 645, - 646, 0, 647, 648, 0, 0, 0, 0, 649, 650, - 651, 0, 0, 0, 652, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, - 0, 0, 1214, 0, 0, 0, 0, 0, 0, 653, - 0, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 664, 665, 0, 0, 1231, 633, 634, 635, 636, - 637, 631, 632, 638, 639, 640, 641, 0, 642, 643, - 644, 645, 646, 0, 647, 648, 0, 0, 0, 0, - 649, 650, 651, 0, 0, 0, 652, 0, 0, 0, - 0, 0, 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, + 0, 1212, 634, 635, 636, 637, 638, 0, 0, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 650, 651, 652, 0, + 0, 0, 653, 632, 633, 634, 635, 636, 637, 638, + 0, 0, 639, 640, 641, 642, 0, 643, 644, 645, + 646, 647, 0, 648, 649, 0, 0, 0, 0, 650, + 651, 652, 0, 0, 0, 653, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 0, 0, 1215, 0, 0, 0, 0, 0, 0, + 654, 0, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 665, 666, 0, 0, 1232, 634, 635, 636, + 637, 638, 632, 633, 639, 640, 641, 642, 0, 643, + 644, 645, 646, 647, 0, 648, 649, 0, 0, 0, + 0, 650, 651, 652, 0, 0, 0, 653, 0, 0, + 0, 0, 0, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 653, 0, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 664, 665, 0, 0, 1233, 0, 0, - 0, 0, 0, 0, 0, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 0, 0, 0, 0, 649, - 650, 651, 0, 0, 0, 652, 633, 634, 635, 636, - 637, 631, 632, 638, 639, 640, 641, 0, 642, 643, - 644, 645, 646, 0, 647, 648, 0, 0, 0, 0, - 649, 650, 651, 0, 0, 0, 652, 0, 0, 0, - 653, 0, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 664, 665, 0, 0, 1235, 0, 0, 0, - 0, 653, 0, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 664, 665, 0, 0, 1239, 0, 0, - 0, 0, 0, 631, 632, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 0, 0, 0, 0, 649, - 650, 651, 0, 0, 0, 652, 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 654, 0, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 665, 666, 0, 0, 1234, 0, + 0, 0, 0, 0, 0, 0, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 0, 0, 0, 0, + 650, 651, 652, 0, 0, 0, 653, 634, 635, 636, + 637, 638, 632, 633, 639, 640, 641, 642, 0, 643, + 644, 645, 646, 647, 0, 648, 649, 0, 0, 0, + 0, 650, 651, 652, 0, 0, 0, 653, 0, 0, + 0, 654, 0, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 665, 666, 0, 0, 1236, 0, 0, + 0, 0, 654, 0, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 665, 666, 0, 0, 1240, 0, + 0, 0, 0, 0, 632, 633, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 0, 0, 0, 0, + 650, 651, 652, 0, 0, 0, 653, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 653, 0, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 664, 665, 0, 0, 1253, 633, 634, 635, - 636, 637, 0, 0, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 0, 0, 0, - 0, 649, 650, 651, 0, 0, 0, 652, 631, 632, - 633, 634, 635, 636, 637, 0, 0, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 0, 0, 0, - 652, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 664, 665, 0, 0, 1303, 0, - 0, 0, 0, 0, 0, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 0, - 0, 1304, 633, 634, 635, 636, 637, 631, 632, 638, - 639, 640, 641, 0, 642, 643, 644, 645, 646, 0, - 647, 648, 0, 0, 0, 0, 649, 650, 651, 0, - 0, 0, 652, 0, 0, 0, 0, 0, 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 654, 0, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 665, 666, 0, 0, 1254, 634, 635, + 636, 637, 638, 0, 0, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 0, 0, + 0, 0, 650, 651, 652, 0, 0, 0, 653, 632, + 633, 634, 635, 636, 637, 638, 0, 0, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 0, 0, + 0, 653, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 665, 666, 0, 0, 1304, + 0, 0, 0, 0, 0, 0, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 0, 0, 1305, 634, 635, 636, 637, 638, 632, 633, + 639, 640, 641, 642, 0, 643, 644, 645, 646, 647, + 0, 648, 649, 0, 0, 0, 0, 650, 651, 652, + 0, 0, 0, 653, 0, 0, 0, 0, 0, 632, + 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 653, 0, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 664, - 665, 0, 0, 1305, 0, 0, 0, 0, 0, 0, - 0, 633, 634, 635, 636, 637, 0, 0, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 649, 650, 651, 0, 0, - 0, 652, 633, 634, 635, 636, 637, 631, 632, 638, - 639, 640, 641, 0, 642, 643, 644, 645, 646, 0, - 647, 648, 0, 0, 0, 0, 649, 650, 651, 0, - 0, 0, 652, 0, 0, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, - 0, 0, 1328, 0, 0, 0, 0, 653, 0, 654, - 655, 656, 657, 658, 659, 660, 661, 662, 663, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 664, - 665, 0, 0, 1339, 0, 0, 0, 0, 0, 631, - 632, 633, 634, 635, 636, 637, 0, 0, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 649, 650, 651, 0, 0, - 0, 652, 631, 632, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 654, 0, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 665, 666, 0, 0, 1306, 0, 0, 0, 0, 0, + 0, 0, 634, 635, 636, 637, 638, 0, 0, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 650, 651, 652, 0, + 0, 0, 653, 634, 635, 636, 637, 638, 632, 633, + 639, 640, 641, 642, 0, 643, 644, 645, 646, 647, + 0, 648, 649, 0, 0, 0, 0, 650, 651, 652, + 0, 0, 0, 653, 0, 0, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 0, 0, 1329, 0, 0, 0, 0, 654, 0, + 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, - 0, 0, 1349, 633, 634, 635, 636, 637, 0, 0, - 638, 639, 640, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 0, 0, 0, 0, 649, 650, 651, - 0, 0, 0, 652, 631, 632, 633, 634, 635, 636, - 637, 0, 0, 638, 639, 640, 641, 0, 642, 643, - 644, 645, 646, 0, 647, 648, 0, 0, 0, 0, - 649, 650, 651, 0, 0, 0, 652, 0, 653, 0, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 665, 666, 0, 0, 1340, 0, 0, 0, 0, 0, + 632, 633, 634, 635, 636, 637, 638, 0, 0, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 650, 651, 652, 0, + 0, 0, 653, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 0, 0, 1382, 0, 0, 0, 0, 0, - 0, 653, 0, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 664, 665, 631, 632, 1392, 633, 634, - 635, 636, 637, 0, 0, 638, 639, 640, 641, 0, - 642, 643, 644, 645, 646, 0, 647, 648, 0, 0, - 0, 0, 649, 650, 651, 0, 631, 632, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 0, 0, 1350, 634, 635, 636, 637, 638, 0, + 0, 639, 640, 641, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 0, 0, 0, 0, 650, 651, + 652, 0, 0, 0, 653, 632, 633, 634, 635, 636, + 637, 638, 0, 0, 639, 640, 641, 642, 0, 643, + 644, 645, 646, 647, 0, 648, 649, 0, 0, 0, + 0, 650, 651, 652, 0, 0, 0, 653, 0, 654, + 0, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 0, 0, 1383, 0, 0, 0, 0, + 0, 0, 654, 0, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 665, 666, 632, 633, 1393, 634, + 635, 636, 637, 638, 0, 0, 639, 640, 641, 642, + 0, 643, 644, 645, 646, 647, 0, 648, 649, 0, + 0, 0, 0, 650, 651, 652, 0, 632, 633, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 653, 0, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 664, 665, 688, 0, 633, - 634, 635, 636, 637, 0, 0, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 0, - 0, 0, 0, 649, 650, 651, 631, 632, 0, 652, - 633, 634, 635, 636, 637, 0, 0, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 631, 632, 0, - 652, 0, 0, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 896, 0, - 0, 0, 0, 0, 0, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 1025, - 633, 634, 635, 636, 637, 0, 0, 638, 639, 640, - 641, 0, 642, 643, 644, 645, 646, 0, 647, 648, - 0, 0, 0, 0, 649, 650, 651, 631, 632, 0, - 652, 633, 634, 635, 636, 637, 0, 0, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 649, 650, 651, 0, 0, - 0, 652, 0, 0, 0, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 1040, - 0, 0, 0, 0, 0, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, - 1150, 633, 634, 635, 636, 637, 631, 632, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 649, 650, 651, 0, 0, - 0, 652, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 654, 0, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 665, 666, 689, 0, + 634, 635, 636, 637, 638, 0, 0, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 0, 0, 0, 0, 650, 651, 652, 632, 633, 0, + 653, 634, 635, 636, 637, 638, 0, 0, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 632, 633, + 0, 653, 0, 0, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 897, + 0, 0, 0, 0, 0, 0, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 1026, 634, 635, 636, 637, 638, 0, 0, 639, 640, + 641, 642, 0, 643, 644, 645, 646, 647, 0, 648, + 649, 0, 0, 0, 0, 650, 651, 652, 632, 633, + 0, 653, 634, 635, 636, 637, 638, 0, 0, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 650, 651, 652, 0, + 0, 0, 653, 0, 0, 0, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, + 1041, 0, 0, 0, 0, 0, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 1151, 634, 635, 636, 637, 638, 632, 633, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 650, 651, 652, 0, + 0, 0, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, - 1155, 0, 735, 736, 737, 738, 739, 740, 741, 742, - 633, 634, 635, 636, 637, 743, 744, 638, 639, 640, - 641, 745, 642, 643, 644, 645, 646, 746, 647, 648, - 747, 748, 266, 267, 649, 650, 651, 749, 750, 751, - 652, 0, 0, 0, 0, 0, 0, 0, 0, 268, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 631, 632, 0, 0, -315, 0, 0, - 0, 0, 0, 0, 752, 653, 0, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 664, 665, 0, + 0, 0, 0, 0, 0, 0, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 1156, 0, 736, 737, 738, 739, 740, 741, 742, + 743, 634, 635, 636, 637, 638, 744, 745, 639, 640, + 641, 642, 746, 643, 644, 645, 646, 647, 747, 648, + 649, 748, 749, 267, 268, 650, 651, 652, 750, 751, + 752, 653, 0, 0, 0, 0, 0, 0, 0, 0, + 269, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 632, 633, 0, 0, -315, 0, + 0, 0, 0, 0, 0, 753, 654, 0, 655, 656, + 657, 658, 659, 660, 661, 662, 663, 664, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 269, 270, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, - 281, 282, 283, 284, 285, 286, 0, 0, 287, 288, - 289, 0, 0, 290, 291, 292, 293, 294, 0, 0, - 295, 296, 297, 298, 299, 300, 301, 633, 634, 635, - 636, 637, 631, 632, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 0, 0, 803, - 0, 649, 650, 651, 0, 0, 0, 652, 0, 0, - 0, 302, 0, 303, 304, 305, 306, 307, 308, 309, - 310, 311, 312, 0, 0, 313, 314, 0, 0, 0, - 0, 0, 0, 315, 316, 0, 0, 0, 0, 0, - 0, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 664, 665, 0, 0, 0, 0, - 0, 631, 632, 0, 0, 0, 633, 634, 635, 636, - 637, 0, 0, 638, 639, 640, 641, 0, 642, 643, - 644, 645, 646, 0, 647, 648, 0, 0, 0, 0, - 649, 650, 651, 631, 632, 0, 652, 0, 0, 0, + 281, 282, 283, 284, 285, 286, 287, 0, 0, 288, + 289, 290, 0, 0, 291, 292, 293, 294, 295, 0, + 0, 296, 297, 298, 299, 300, 301, 302, 634, 635, + 636, 637, 638, 632, 633, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 0, 0, + 804, 0, 650, 651, 652, 0, 0, 0, 653, 0, + 0, 0, 303, 0, 304, 305, 306, 307, 308, 309, + 310, 311, 312, 313, 0, 0, 314, 315, 0, 0, + 0, 0, 0, 0, 316, 317, 0, 0, 0, 0, + 0, 0, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 665, 666, 0, 0, 0, + 0, 0, 632, 633, 0, 0, 0, 634, 635, 636, + 637, 638, 0, 0, 639, 640, 641, 642, 0, 643, + 644, 645, 646, 647, 0, 648, 649, 0, 0, 0, + 0, 650, 651, 652, 632, 633, 0, 653, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 953, 0, 0, 0, 0, 0, 0, - 0, 653, 0, 654, 655, 656, 657, 658, 659, 660, - 661, 662, 663, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 664, 665, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 631, 632, 0, 0, 649, - 650, 651, 0, 0, 0, 652, 0, 633, 634, 635, - 636, 637, 0, 0, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 631, 632, 0, - 0, 649, 650, 651, 0, 0, 0, 652, 0, 0, - 653, 1030, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 664, 665, 1085, 0, 0, 0, 0, 0, - 0, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 633, - 634, 635, 636, 637, 664, 665, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 631, - 632, 0, 0, 649, 650, 651, 0, 0, 0, 652, - 0, 633, 634, 635, 636, 637, 0, 0, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 1116, 631, 632, 649, 650, 651, 0, 0, - 0, 652, 0, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 1321, 0, - 0, 0, 0, 0, 0, 0, 653, 0, 654, 655, - 656, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 633, 634, 635, 636, 637, 664, 665, - 638, 639, 640, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 0, 0, 631, 632, 649, 650, 651, - 0, 0, 0, 652, 0, 0, 0, 633, 634, 635, - 636, 637, 0, 0, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 0, 0, 0, - 1340, 649, 650, 651, 0, 0, 0, 652, 653, 0, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 0, 0, 0, 0, 954, 0, 0, 0, 0, 0, + 0, 0, 654, 0, 655, 656, 657, 658, 659, 660, + 661, 662, 663, 664, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 665, 666, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 632, 633, 0, 0, + 650, 651, 652, 0, 0, 0, 653, 0, 634, 635, + 636, 637, 638, 0, 0, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 632, 633, + 0, 0, 650, 651, 652, 0, 0, 0, 653, 0, + 0, 654, 1031, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 665, 666, 1086, 0, 0, 0, 0, + 0, 0, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 634, 635, 636, 637, 638, 665, 666, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 632, 633, 0, 0, 650, 651, 652, 0, 0, 0, + 653, 0, 634, 635, 636, 637, 638, 0, 0, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 1117, 632, 633, 650, 651, 652, 0, + 0, 0, 653, 0, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 1322, + 0, 0, 0, 0, 0, 0, 0, 654, 0, 655, + 656, 657, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 634, 635, 636, 637, 638, 665, + 666, 639, 640, 641, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 0, 0, 632, 633, 650, 651, + 652, 0, 0, 0, 653, 0, 0, 0, 634, 635, + 636, 637, 638, 0, 0, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 0, 0, + 0, 1341, 650, 651, 652, 0, 0, 0, 653, 654, + 0, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 0, 0, 1358, 0, 0, 0, 0, + 0, 0, 0, 654, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 632, 633, 0, 0, 0, + 634, 635, 636, 637, 638, 665, 666, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 0, 0, 0, 0, 650, 651, 652, 0, 0, 0, + 653, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 0, 0, 1357, 0, 0, 0, 0, 0, - 0, 0, 653, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 631, 632, 0, 0, 0, 633, - 634, 635, 636, 637, 664, 665, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 0, - 0, 0, 0, 649, 650, 651, 0, 0, 0, 652, - 631, 632, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 1385, 0, 0, + 0, 0, 0, 0, 0, 654, 0, 655, 656, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 665, 666, 634, + 635, 636, 637, 638, 0, 0, 639, 640, 641, 642, + 0, 643, 644, 645, 646, 647, 0, 648, 649, 0, + 0, 0, 0, 650, 651, 652, 0, 0, 0, 653, + 632, 633, 0, 0, 0, 634, 635, 636, 637, 638, + 0, 0, 639, 640, 641, 642, 0, 643, 644, 645, + 646, 647, 0, 648, 649, 0, 1406, 0, 0, 650, + 651, 652, 632, 633, 654, 653, 655, 656, 657, 658, + 659, 660, 661, 662, 663, 664, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 665, 666, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 1384, 0, 0, 0, - 0, 0, 0, 0, 653, 0, 654, 655, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 664, 665, 633, 634, - 635, 636, 637, 0, 0, 638, 639, 640, 641, 0, - 642, 643, 644, 645, 646, 0, 647, 648, 0, 0, - 0, 0, 649, 650, 651, 0, 0, 0, 652, 631, - 632, 0, 0, 0, 633, 634, 635, 636, 637, 0, - 0, 638, 639, 640, 641, 0, 642, 643, 644, 645, - 646, 0, 647, 648, 0, 1405, 0, 0, 649, 650, - 651, 631, 632, 653, 652, 654, 655, 656, 657, 658, - 659, 660, 661, 662, 663, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 664, 665, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 653, - 0, 654, 655, 656, 657, 658, 659, 660, 661, 662, - 663, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 664, 665, 633, 634, 635, 636, 637, 0, 0, - 638, 639, 640, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 631, 632, 0, 0, 649, 650, 651, - 0, 0, 0, -677, 0, 633, 634, 635, 636, 637, - 0, 0, 638, 639, 640, 641, 0, 642, 643, 644, - 645, 646, 0, 647, 648, 631, 632, 0, 0, 649, - 650, 651, 0, 0, 0, 0, 0, 0, 653, 0, - 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 654, 0, 655, 656, 657, 658, 659, 660, 661, 662, + 663, 664, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 665, 666, 634, 635, 636, 637, 638, 0, + 0, 639, 640, 641, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 632, 633, 0, 0, 650, 651, + 652, 0, 0, 0, -677, 0, 634, 635, 636, 637, + 638, 0, 0, 639, 640, 641, 642, 0, 643, 644, + 645, 646, 647, 0, 648, 649, 632, 633, 0, 0, + 650, 651, 652, 0, 0, 0, 0, 0, 0, 654, + 0, 655, 656, 657, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 0, 0, 0, 0, 0, 0, 0, + 0, 654, 0, 655, 656, 657, 658, 659, 660, 661, + 662, 663, 664, 0, 0, 0, 0, 0, 634, 635, + 636, 637, 638, 665, 666, 639, 640, 641, 642, 0, + 643, 644, 645, 646, 647, 0, 648, 649, 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 0, 0, 0, 0, 0, 0, 0, 0, - 653, 0, 654, 655, 656, 657, 658, 659, 660, 661, - 662, 663, 0, 0, 0, 0, 0, 633, 634, 635, - 636, 637, 664, 665, 638, 639, 640, 641, 0, 642, - 643, 644, 645, 646, 0, 647, 648, 631, 632, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 633, - 634, 635, 636, 637, 0, 0, 638, 639, 640, 641, - 0, 642, 643, 644, 645, 646, 0, 647, 648, 631, - 632, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 654, 655, 656, 657, 658, 659, - 660, 661, 662, 663, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 664, 665, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 656, 657, - 658, 659, 660, 661, 662, 663, 0, 0, 0, 0, - 0, 633, 634, 635, 636, 637, 664, 665, 638, 639, - 640, 641, 0, 642, 643, 644, 645, 646, 0, 647, - 648, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 633, 634, 635, 636, 637, 0, 0, - 638, 0, 0, 641, 0, 642, 643, 644, 645, 646, - 0, 647, 648, 0, 0, 0, 0, 0, 0, 0, + 634, 635, 636, 637, 638, 0, 0, 639, 640, 641, + 642, 0, 643, 644, 645, 646, 647, 0, 648, 649, + 632, 633, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 655, 656, 657, 658, 659, + 660, 661, 662, 663, 664, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 665, 666, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 657, + 658, 659, 660, 661, 662, 663, 664, 0, 0, 0, + 0, 0, 634, 635, 636, 637, 638, 665, 666, 639, + 640, 641, 642, 0, 643, 644, 645, 646, 647, 0, + 648, 649, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 634, 635, 636, 637, 638, 0, + 0, 639, 0, 0, 642, 0, 643, 644, 645, 646, + 647, 0, 648, 649, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 828, 657, 658, 659, 660, 661, 662, 663, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 664, 665, + 0, 829, 658, 659, 660, 661, 662, 663, 664, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 665, + 666, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 833, 0, 658, 659, 660, 661, 662, 663, + 664, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 665, 666, 221, 222, 223, 0, 225, 226, 227, + 228, 229, 418, 231, 232, 233, 234, 235, 236, 237, + 238, 239, 240, 241, 0, 243, 244, 245, 0, 0, + 248, 249, 250, 251, 221, 222, 223, 0, 225, 226, + 227, 228, 229, 418, 231, 232, 233, 234, 235, 236, + 237, 238, 239, 240, 241, 0, 243, 244, 245, 0, + 0, 248, 249, 250, 251, 0, 0, 0, 0, 0, + 1027, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 830, 0, 0, 0, 0, + 0, 0, 0, 0, 831, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 832, 0, 657, 658, 659, 660, 661, 662, 663, + 0, 0, 0, 0, 0, 0, 834, 171, 0, 0, + 0, 0, 221, 222, 223, 835, 225, 226, 227, 228, + 229, 418, 231, 232, 233, 234, 235, 236, 237, 238, + 239, 240, 241, 0, 243, 244, 245, 0, 0, 248, + 249, 250, 251, 172, 0, 173, 0, 174, 175, 176, + 177, 178, 0, 179, 180, 181, 182, 183, 184, 185, + 186, 187, 188, 189, 0, 190, 191, 192, 0, 0, + 193, 194, 195, 196, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 197, + 198, 0, 0, 0, 1028, 0, 0, 0, 0, 0, + 0, 0, 0, 1029, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 664, 665, 220, 221, 222, 0, 224, 225, 226, 227, - 228, 417, 230, 231, 232, 233, 234, 235, 236, 237, - 238, 239, 240, 0, 242, 243, 244, 0, 0, 247, - 248, 249, 250, 220, 221, 222, 0, 224, 225, 226, - 227, 228, 417, 230, 231, 232, 233, 234, 235, 236, - 237, 238, 239, 240, 0, 242, 243, 244, 0, 0, - 247, 248, 249, 250, 0, 0, 0, 0, 0, 1026, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 829, 0, 0, 0, 0, 0, - 0, 0, 0, 830, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 833, 170, 0, 0, 0, - 0, 220, 221, 222, 834, 224, 225, 226, 227, 228, - 417, 230, 231, 232, 233, 234, 235, 236, 237, 238, - 239, 240, 0, 242, 243, 244, 0, 0, 247, 248, - 249, 250, 171, 0, 172, 0, 173, 174, 175, 176, - 177, 0, 178, 179, 180, 181, 182, 183, 184, 185, - 186, 187, 188, 0, 189, 190, 191, 0, 0, 192, - 193, 194, 195, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 196, 197, - 0, 0, 0, 1027, 0, 0, 0, 0, 0, 0, - 0, 0, 1028, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 198 + 0, 0, 0, 0, 199 }; static const yytype_int16 yycheck[] = { - 14, 15, 588, 164, 151, 703, 526, 484, 625, 565, - 483, 804, 770, 561, 534, 627, 478, 77, 480, 445, - 482, 926, 0, 610, 674, 164, 676, 8, 678, 7, - 827, 367, 619, 1200, 5, 456, 15, 16, 20, 22, - 20, 46, 33, 1288, 20, 138, 60, 61, 62, 150, - 34, 7, 30, 1286, 32, 172, 34, 155, 394, 126, - 125, 487, 40, 128, 129, 613, 20, 19, 20, 162, - 5, 6, 50, 621, 57, 623, 172, 147, 56, 63, - 138, 128, 129, 128, 129, 99, 100, 101, 102, 206, - 25, 126, 162, 62, 50, 33, 31, 132, 1265, 1266, - 1345, 106, 80, 139, 140, 141, 153, 208, 21, 22, - 1343, 178, 179, 1280, 181, 162, 162, 184, 126, 706, - 126, 150, 1322, 181, 102, 103, 132, 15, 16, 170, - 153, 102, 103, 68, 69, 205, 162, 202, 203, 162, - 179, 12, 563, 181, 179, 172, 206, 131, 170, 184, - 164, 178, 23, 24, 138, 202, 203, 202, 203, 1359, - 586, 207, 1329, 1330, 205, 191, 172, 102, 103, 595, - 206, 179, 598, 179, 182, 178, 155, 206, 162, 208, - 47, 160, 205, 162, 163, 207, 208, 162, 178, 986, - 171, 21, 22, 184, 172, 137, 178, 172, 178, 625, - 67, 818, 178, 138, 117, 118, 367, 190, 629, 370, - 162, 195, 125, 191, 185, 128, 129, 130, 131, 202, - 807, 205, 203, 384, 178, 203, 205, 162, 170, 139, - 778, 141, 780, 394, 205, 170, 397, 398, 399, 787, - 254, 667, 790, 126, 178, 384, 184, 164, 165, 132, - 185, 587, 153, 33, 178, 138, 126, 126, 397, 398, - 399, 162, 132, 132, 600, 203, 178, 155, 203, 1174, - 204, 209, 160, 126, 162, 163, 336, 126, 126, 132, - 60, 61, 206, 132, 132, 115, 116, 117, 118, 202, - 203, 178, 172, 178, 206, 125, 179, 127, 128, 129, - 130, 131, 172, 133, 134, 206, 178, 919, 185, 179, - 179, 126, 473, 474, 164, 165, 477, 132, 479, 206, - 481, 206, 483, 178, 181, 172, 179, 1326, 205, 186, - 179, 179, 204, 162, 473, 474, 172, 1336, 477, 186, - 479, 138, 481, 123, 770, 962, 182, 127, 205, 204, - 147, 5, 6, 367, 8, 152, 370, 187, 188, 189, - 190, 191, 824, 1061, 179, 162, 1016, 1366, 1367, 185, - 384, 178, 202, 203, 388, 162, 162, 60, 61, 62, - 394, 185, 36, 397, 398, 399, 138, 147, 185, 205, - 404, 405, 912, 178, 178, 147, 178, 21, 22, 206, - 178, 205, 162, 1161, 184, 178, 178, 187, 178, 189, - 162, 162, 162, 890, 1207, 888, 99, 100, 101, 102, - 181, 206, 206, 203, 206, 186, 587, 138, 206, 209, - 766, 767, 1130, 206, 206, 155, 206, 172, 181, 600, - 181, 777, 172, 186, 205, 186, 782, 783, 185, 785, - 786, 186, 788, 789, 185, 791, 186, 75, 172, 473, - 474, 79, 205, 477, 205, 479, 205, 481, 205, 483, - 631, 632, 186, 1123, 205, 93, 94, 153, 153, 202, - 98, 99, 100, 101, 57, 646, 162, 162, 1138, 162, - 63, 115, 116, 117, 118, 119, 57, 162, 122, 123, - 124, 125, 63, 127, 128, 129, 130, 131, 172, 133, - 134, 1128, 172, 162, 164, 139, 1214, 1103, 153, 153, - 153, 1077, 186, 684, 162, 162, 186, 162, 162, 162, - 178, 178, 693, 181, 181, 696, 184, 184, 139, 140, - 141, 57, 57, 1063, 1006, 684, 1066, 63, 63, 1069, - 57, 182, 21, 22, 693, 186, 1018, 696, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, 994, 57, - 57, 57, 998, 587, 172, 63, 63, 63, 202, 203, - 178, 172, 164, 165, 166, 182, 600, 178, 182, 186, - 179, 170, 186, 170, 1114, 182, 182, 1023, 182, 186, - 186, 170, 186, 139, 765, 766, 767, 768, 164, 1035, - 624, 758, 773, 106, 182, 182, 777, 1137, 186, 186, - 1176, 782, 783, 181, 785, 786, 765, 788, 789, 768, - 791, 967, 968, 969, 773, 182, 972, 208, 1064, 186, - 21, 22, 182, 10, 11, 12, 186, 1195, 117, 118, - 182, 1349, 181, 35, 186, 184, 125, 35, 127, 128, - 129, 130, 131, 205, 1281, 164, 165, 166, 167, 1005, - 684, 162, 170, 170, 208, 185, 185, 162, 205, 693, - 185, 185, 696, 185, 205, 185, 205, 1273, 162, 1115, - 185, 185, 182, 1119, 162, 856, 185, 162, 162, 22, - 1256, 185, 185, 204, 162, 181, 181, 170, 204, 1229, - 162, 203, 178, 162, 1331, 132, 162, 162, 187, 188, - 189, 190, 191, 205, 185, 1245, 1246, 888, 205, 185, - 21, 22, 185, 202, 203, 1161, 117, 118, 185, 206, - 1076, 185, 185, 1360, 125, 906, 127, 128, 129, 130, - 131, 765, 766, 767, 768, 205, 185, 185, 185, 773, - 208, 1317, 162, 777, 205, 205, 205, 906, 782, 783, - 205, 785, 786, 205, 788, 789, 162, 791, 162, 205, - 205, 203, 205, 204, 1332, 1333, 171, 1335, 181, 172, - 205, 1408, 172, 205, 171, 205, 162, 172, 155, 37, - 172, 172, 205, 1139, 10, 66, 967, 968, 969, 172, - 172, 972, 172, 172, 1362, 179, 172, 172, 172, 13, - 178, 202, 203, 4, 162, 186, 117, 118, 171, 205, - 21, 22, 205, 185, 125, 185, 127, 128, 129, 130, - 131, 185, 178, 178, 1005, 178, 1272, 43, 14, 179, - 181, 155, 1278, 170, 205, 208, 8, 206, 205, 70, - 162, 186, 1382, 171, 204, 206, 1386, 178, 205, 185, - 185, 205, 1, 205, 888, 162, 186, 206, 205, 205, - 186, 205, 162, 205, 205, 205, 205, 344, 186, 162, - 43, 205, 906, 162, 171, 1056, 67, 354, 189, 190, - 191, 172, 186, 186, 186, 206, 206, 364, 205, 185, - 206, 202, 203, 206, 186, 1076, 186, 1056, 186, 1255, - 21, 22, 186, 186, 115, 116, 117, 118, 119, 386, - 186, 122, 123, 124, 125, 186, 127, 128, 129, 130, - 131, 206, 133, 134, 43, 205, 205, 205, 205, 162, - 205, 205, 162, 967, 968, 969, 206, 162, 972, 186, - 186, 186, 186, 186, 421, 422, 206, 162, 205, 162, - 162, 12, 162, 162, 162, 43, 33, 205, 1139, 186, - 1141, 438, 439, 440, 441, 442, 443, 205, 205, 205, - 205, 1005, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 205, 1141, 205, 186, 206, 186, 205, 172, 206, - 172, 202, 203, 162, 115, 116, 117, 118, 119, 205, - 205, 122, 123, 124, 125, 53, 127, 128, 129, 130, - 131, 205, 133, 134, 206, 205, 171, 206, 139, 496, - 141, 204, 1056, 204, 172, 178, 206, 206, 206, 206, - 206, 206, 206, 76, 205, 512, 206, 609, 206, 1, - 42, 128, 1076, 79, 1404, 1251, 212, 524, 98, 1251, - 527, 1251, 1251, 1251, 1, 1236, 533, 1179, 535, 1224, - 1263, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, 1182, 1081, 463, 1255, 1264, 516, 1236, 51, 754, - 1331, 202, 203, 962, -1, 404, -1, -1, -1, 404, - -1, -1, 569, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 1139, -1, 1141, -1, -1, - -1, 588, 589, -1, -1, 592, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 603, 604, 605, 606, - 607, 608, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 633, 634, -1, -1, - 637, 638, 639, 640, -1, 642, -1, 644, 645, 646, + 14, 15, 589, 704, 165, 152, 485, 527, 484, 626, + 566, 805, 771, 628, 562, 535, 77, 479, 927, 481, + 446, 483, 611, 0, 457, 675, 165, 677, 8, 679, + 7, 620, 368, 22, 20, 5, 33, 15, 16, 828, + 21, 22, 33, 19, 20, 20, 60, 61, 62, 1201, + 150, 20, 46, 30, 1289, 32, 1287, 34, 20, 395, + 162, 125, 488, 40, 128, 129, 614, 126, 57, 126, + 147, 5, 6, 50, 622, 132, 624, 164, 165, 56, + 128, 129, 128, 129, 150, 162, 100, 101, 102, 103, + 126, 25, 34, 1323, 162, 162, 132, 31, 139, 140, + 141, 155, 138, 80, 172, 207, 206, 153, 208, 15, + 16, 1346, 106, 1344, 1266, 1267, 162, 7, 707, 138, + 179, 63, 179, 182, 191, 102, 103, 184, 205, 1281, + 1360, 564, 102, 103, 68, 69, 117, 118, 202, 203, + 172, 170, 208, 179, 125, 172, 207, 128, 129, 130, + 131, 165, 126, 62, 202, 203, 202, 203, 132, 186, + 50, 587, 181, 172, 181, 206, 153, 184, 102, 103, + 596, 21, 22, 599, 206, 162, 205, 155, 1330, 1331, + 5, 6, 160, 8, 162, 163, 162, 184, 47, 131, + 182, 171, 178, 184, 186, 172, 138, 630, 987, 137, + 626, 190, 819, 178, 138, 179, 203, 368, 67, 178, + 371, 36, 209, 202, 191, 185, 178, 178, 205, 808, + 162, 202, 203, 203, 385, 179, 203, 205, 162, 178, + 126, 779, 170, 781, 395, 205, 170, 398, 399, 400, + 788, 255, 668, 791, 126, 206, 385, 178, 178, 155, + 132, 185, 588, 195, 160, 204, 162, 163, 126, 398, + 399, 400, 153, 205, 132, 601, 1175, 117, 118, 203, + 170, 162, 138, 204, 204, 125, 337, 127, 128, 129, + 130, 131, 178, 179, 178, 181, 138, 126, 184, 126, + 172, 1327, 178, 132, 126, 132, 126, 179, 178, 178, + 132, 1337, 132, 147, 172, 920, 178, 207, 208, 178, + 162, 179, 206, 474, 475, 206, 178, 478, 162, 480, + 206, 482, 178, 484, 181, 181, 206, 206, 184, 186, + 178, 1367, 1368, 178, 206, 474, 475, 206, 178, 478, + 179, 480, 179, 482, 206, 771, 963, 179, 205, 179, + 138, 178, 202, 203, 368, 178, 138, 371, 206, 147, + 181, 1062, 172, 825, 152, 147, 206, 1017, 60, 61, + 62, 385, 181, 162, 162, 389, 186, 186, 12, 206, + 162, 395, 181, 206, 398, 399, 400, 186, 57, 23, + 24, 405, 406, 913, 63, 172, 205, 185, 21, 22, + 75, 185, 185, 1162, 79, 182, 205, 172, 100, 101, + 102, 103, 891, 889, 1208, 181, 185, 185, 93, 94, + 186, 205, 205, 98, 99, 100, 101, 588, 202, 185, + 1131, 767, 768, 21, 22, 162, 205, 205, 172, 205, + 601, 172, 778, 172, 172, 162, 162, 783, 784, 205, + 786, 787, 186, 789, 790, 186, 792, 186, 186, 178, + 474, 475, 181, 162, 478, 184, 480, 153, 482, 153, + 484, 632, 633, 153, 1124, 153, 162, 172, 162, 153, + 205, 57, 162, 178, 162, 57, 647, 63, 162, 1139, + 155, 63, 115, 116, 117, 118, 119, 57, 162, 122, + 123, 124, 125, 63, 127, 128, 129, 130, 131, 57, + 133, 134, 1129, 57, 1215, 63, 139, 1104, 141, 63, + 57, 172, 1078, 162, 685, 172, 63, 178, 172, 117, + 118, 178, 164, 694, 178, 162, 697, 125, 162, 127, + 128, 129, 130, 131, 1064, 1007, 685, 1067, 21, 22, + 1070, 57, 182, 162, 179, 694, 186, 1019, 697, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, 995, + 170, 182, 182, 999, 588, 186, 186, 182, 182, 202, + 203, 186, 186, 170, 182, 182, 182, 601, 186, 186, + 186, 170, 182, 182, 164, 1115, 186, 186, 1024, 187, + 188, 189, 190, 191, 139, 766, 767, 768, 769, 106, + 1036, 625, 759, 774, 202, 203, 181, 778, 1138, 164, + 165, 1177, 783, 784, 208, 786, 787, 766, 789, 790, + 769, 792, 968, 969, 970, 774, 139, 973, 141, 1065, + 164, 165, 166, 167, 117, 118, 35, 35, 1196, 1350, + 205, 170, 125, 170, 127, 128, 129, 130, 131, 139, + 140, 141, 164, 165, 166, 1282, 10, 11, 12, 162, + 1006, 685, 208, 162, 185, 185, 185, 205, 185, 205, + 694, 185, 205, 697, 185, 185, 185, 1274, 162, 185, + 1116, 185, 182, 185, 1120, 162, 857, 162, 162, 204, + 22, 1257, 162, 181, 33, 181, 204, 170, 162, 178, + 1230, 162, 203, 132, 162, 1332, 189, 190, 191, 205, + 162, 205, 205, 185, 185, 206, 1246, 1247, 889, 202, + 203, 60, 61, 185, 205, 185, 1162, 205, 185, 185, + 185, 1077, 185, 172, 1361, 185, 907, 205, 162, 205, + 205, 162, 766, 767, 768, 769, 205, 162, 171, 181, + 774, 205, 1318, 172, 778, 203, 205, 208, 907, 783, + 784, 204, 786, 787, 171, 789, 790, 205, 792, 205, + 205, 162, 172, 155, 37, 1333, 1334, 172, 1336, 172, + 205, 10, 1409, 172, 123, 172, 172, 172, 127, 172, + 66, 172, 172, 205, 1140, 179, 186, 968, 969, 970, + 178, 205, 973, 178, 13, 1363, 185, 178, 185, 185, + 4, 208, 162, 178, 206, 171, 43, 205, 14, 179, + 181, 21, 22, 170, 155, 8, 70, 162, 186, 171, + 178, 205, 204, 206, 185, 1006, 205, 1273, 205, 205, + 185, 1, 206, 1279, 162, 184, 205, 162, 187, 186, + 189, 162, 205, 1383, 43, 162, 205, 1387, 186, 205, + 186, 205, 205, 171, 203, 889, 67, 205, 172, 205, + 209, 205, 186, 186, 186, 43, 206, 206, 345, 206, + 186, 186, 206, 907, 186, 186, 1057, 186, 355, 186, + 206, 186, 185, 162, 162, 205, 205, 162, 365, 186, + 186, 186, 205, 186, 186, 205, 1077, 205, 1057, 205, + 1256, 21, 22, 162, 206, 115, 116, 117, 118, 119, + 387, 205, 122, 123, 124, 125, 206, 127, 128, 129, + 130, 131, 162, 133, 134, 12, 162, 162, 162, 162, + 43, 33, 206, 205, 968, 969, 970, 205, 186, 973, + 205, 205, 205, 205, 205, 422, 423, 205, 186, 172, + 162, 206, 205, 205, 186, 205, 205, 172, 53, 1140, + 206, 1142, 439, 440, 441, 442, 443, 444, 171, 178, + 172, 610, 1006, 183, 184, 185, 186, 187, 188, 189, + 190, 191, 206, 1142, 204, 206, 76, 1, 206, 206, + 206, 204, 202, 203, 42, 115, 116, 117, 118, 119, + 129, 206, 122, 123, 124, 125, 206, 127, 128, 129, + 130, 131, 206, 133, 134, 205, 80, 206, 206, 139, + 497, 1405, 1252, 1057, 99, 1252, 213, 1252, 1252, 21, + 22, 1252, 1, 1225, 464, 1180, 513, 1183, 1264, 1082, + 51, 755, 1265, 1077, 517, 1332, 963, -1, 525, -1, + -1, 528, -1, -1, 405, 405, 1237, 534, -1, 536, + -1, -1, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, -1, -1, -1, 1256, -1, -1, 1237, -1, + -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 570, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 1140, -1, 1142, -1, + -1, -1, 589, 590, -1, -1, 593, -1, -1, -1, + -1, -1, -1, 115, 116, 117, 118, 604, 605, 606, + 607, 608, 609, 125, -1, 127, 128, 129, 130, 131, + -1, 133, 134, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 634, 635, -1, + -1, 638, 639, 640, 641, -1, 643, -1, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, - 657, 658, 659, 660, 661, 662, 663, -1, 665, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 1236, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 1255, -1, -1, -1, -1, -1, -1, 705, -1, - 707, -1, -1, 710, -1, 712, -1, -1, -1, -1, - -1, -1, 719, -1, -1, -1, -1, 724, -1, -1, - -1, -1, -1, -1, 1288, -1, -1, -1, 735, 736, + 657, 658, 659, 660, 661, 662, 663, 664, -1, 666, + -1, -1, -1, -1, -1, 187, 188, 189, 190, 191, + -1, -1, -1, 1237, -1, -1, -1, -1, -1, -1, + 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 1256, -1, -1, -1, -1, -1, -1, 706, + -1, 708, -1, -1, 711, -1, 713, -1, -1, -1, + -1, -1, -1, 720, -1, -1, -1, -1, 725, -1, + -1, -1, -1, -1, -1, 1289, -1, -1, -1, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745, 746, - 747, 748, 749, 750, 751, 752, 753, -1, -1, -1, - -1, -1, -1, 760, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 772, -1, -1, 19, -1, - -1, -1, -1, -1, 25, -1, -1, -1, -1, -1, - 31, 1345, -1, -1, -1, -1, -1, -1, -1, -1, - 41, -1, -1, 800, -1, -1, 803, 804, 49, -1, - -1, 808, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 64, -1, -1, -1, -1, 825, -1, + 747, 748, 749, 750, 751, 752, 753, 754, -1, -1, + -1, -1, -1, -1, 761, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 773, -1, -1, 19, + -1, -1, -1, -1, -1, 25, -1, -1, -1, -1, + -1, 31, 1346, -1, -1, -1, -1, -1, -1, -1, + -1, 41, -1, -1, 801, -1, -1, 804, 805, 49, + -1, -1, 809, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 64, -1, -1, -1, -1, 826, + -1, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 870, -1, -1, -1, 874, 19, -1, + -1, -1, 21, 22, 25, -1, -1, -1, -1, -1, + 31, -1, -1, -1, -1, -1, -1, -1, 138, 896, + 41, -1, -1, -1, -1, 902, -1, -1, 49, -1, + -1, 151, 909, -1, -1, -1, -1, -1, -1, 916, + -1, -1, 162, 64, -1, 922, -1, -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 869, -1, -1, -1, 873, 19, -1, -1, - -1, 21, 22, 25, -1, -1, -1, -1, -1, 31, - -1, -1, -1, -1, -1, -1, -1, 138, 895, 41, - -1, -1, -1, -1, 901, -1, -1, 49, -1, -1, - 151, 908, -1, -1, -1, -1, -1, -1, 915, -1, - -1, 162, 64, -1, 921, -1, -1, -1, -1, 71, - 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, - 102, 103, -1, -1, -1, -1, 207, -1, 209, -1, - -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, - 130, 131, -1, 133, 134, -1, 138, -1, -1, 139, - 140, 141, -1, -1, -1, 145, 1003, 1004, -1, 151, - 1007, 1008, 1009, -1, 1011, -1, -1, -1, -1, -1, - 162, -1, -1, 1020, -1, 1022, -1, 1024, -1, -1, - 172, -1, -1, 1030, -1, -1, -1, 1034, -1, -1, - 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, -1, 19, -1, -1, -1, -1, - -1, 25, 202, 203, -1, 207, 206, 31, -1, -1, - -1, 1068, -1, -1, 1071, -1, -1, 41, -1, -1, - -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, + 101, 102, 103, -1, -1, -1, -1, 207, -1, 209, + -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, 138, -1, -1, + 139, 140, 141, -1, -1, -1, 145, 1004, 1005, -1, + 151, 1008, 1009, 1010, -1, 1012, -1, -1, -1, -1, + -1, 162, -1, -1, 1021, -1, 1023, -1, 1025, -1, + -1, 172, -1, -1, 1031, -1, -1, -1, 1035, -1, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, 19, -1, -1, -1, + -1, -1, 25, 202, 203, -1, 207, 206, 31, -1, + -1, -1, 1069, -1, -1, 1072, -1, -1, 41, -1, + -1, -1, -1, -1, -1, -1, 49, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 64, -1, -1, -1, -1, -1, 1103, 71, 72, 73, - 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, - 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, + -1, 64, -1, -1, -1, -1, -1, 1104, 71, 72, + 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, + 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, + 103, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 1148, -1, 1150, -1, -1, -1, -1, 1155, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 1165, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, 1178, -1, -1, -1, -1, -1, -1, 151, -1, + -1, -1, 1189, -1, -1, -1, -1, -1, -1, 162, + 1197, 1198, 1199, -1, -1, -1, -1, 1204, -1, -1, + -1, 1208, 1209, -1, -1, -1, -1, -1, -1, -1, + -1, 1218, 1219, 1220, -1, -1, -1, -1, -1, -1, + 1227, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 207, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 1252, -1, -1, -1, -1, + -1, -1, -1, 1260, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 1274, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 1147, -1, 1149, -1, -1, -1, -1, 1154, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 1164, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - 1177, -1, -1, -1, -1, -1, -1, 151, -1, -1, - -1, 1188, -1, -1, -1, -1, -1, -1, 162, 1196, - 1197, 1198, -1, -1, -1, -1, 1203, -1, -1, -1, - 1207, 1208, -1, -1, -1, -1, -1, -1, -1, -1, - 1217, 1218, 1219, -1, -1, -1, -1, -1, -1, 1226, + -1, 1288, -1, -1, 1291, 1292, -1, -1, -1, -1, + -1, 1298, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 1310, -1, -1, -1, -1, -1, -1, + -1, -1, 1319, -1, -1, -1, -1, -1, -1, -1, + -1, 1328, -1, -1, -1, -1, -1, -1, 1, -1, + -1, -1, 5, 6, 7, -1, 9, 10, 11, -1, + 13, -1, 15, 16, 17, 18, 19, -1, -1, 1356, + -1, -1, 25, 26, 27, 28, 29, -1, 31, -1, + -1, -1, -1, -1, -1, 38, 39, -1, 1375, 42, + -1, 44, 45, 1380, 1381, 48, -1, 50, 51, 52, + -1, 54, 55, -1, -1, 58, 59, -1, -1, -1, + -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, 105, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 207, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 1251, -1, -1, -1, -1, -1, - -1, -1, 1259, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 1273, -1, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, 171, 172, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, -1, -1, -1, -1, + 203, -1, 205, 1, 207, 208, -1, 5, 6, 7, + -1, 9, 10, 11, -1, 13, -1, 15, 16, 17, + 18, 19, -1, -1, -1, -1, -1, 25, 26, 27, + 28, 29, -1, 31, -1, -1, -1, -1, -1, -1, + 38, 39, -1, -1, 42, -1, 44, 45, -1, -1, + 48, -1, 50, 51, 52, -1, 54, 55, -1, -1, + 58, 59, -1, -1, -1, -1, -1, 65, -1, -1, + 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, 102, 103, 104, 105, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 1287, -1, -1, 1290, 1291, -1, -1, -1, -1, -1, - 1297, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 1309, -1, -1, -1, -1, -1, -1, -1, - -1, 1318, -1, -1, -1, -1, -1, -1, -1, -1, - 1327, -1, -1, -1, -1, -1, -1, 1, -1, -1, - -1, 5, 6, 7, -1, 9, 10, 11, -1, 13, - -1, 15, 16, 17, 18, 19, -1, -1, 1355, -1, - -1, 25, 26, 27, 28, 29, -1, 31, -1, -1, - -1, -1, -1, -1, 38, 39, -1, 1374, 42, -1, - 44, 45, 1379, 1380, 48, -1, 50, 51, 52, -1, - 54, 55, -1, -1, 58, 59, -1, -1, -1, -1, - -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, 105, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, + 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, + 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, + -1, -1, 170, 171, 172, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, + 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, + -1, -1, -1, -1, -1, 203, -1, 205, 1, 207, + 208, -1, 5, 6, 7, -1, 9, 10, 11, -1, + 13, -1, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, 26, 27, 28, 29, -1, 31, -1, + -1, -1, -1, -1, -1, 38, 39, -1, -1, 42, + -1, 44, 45, -1, -1, 48, -1, 50, 51, 52, + -1, 54, 55, -1, -1, 58, 59, -1, -1, -1, + -1, -1, 65, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, 105, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, 171, 172, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, 171, 172, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, -1, -1, -1, -1, 203, - -1, 205, 1, 207, 208, -1, 5, 6, 7, -1, - 9, 10, 11, -1, 13, -1, 15, 16, 17, 18, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, + 203, -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, 26, 27, 28, - 29, -1, 31, -1, -1, -1, -1, -1, -1, 38, - 39, -1, -1, 42, -1, 44, 45, -1, -1, 48, - -1, 50, 51, 52, -1, 54, 55, -1, -1, 58, - 59, -1, -1, -1, -1, -1, 65, -1, -1, 68, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, + -1, -1, 51, 52, -1, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, @@ -2898,852 +2938,812 @@ static const yytype_int16 yycheck[] = -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, - -1, 170, 171, 172, -1, -1, -1, -1, -1, -1, + -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, - -1, -1, -1, -1, 203, -1, 205, 1, 207, 208, - -1, 5, 6, 7, -1, 9, 10, 11, -1, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, 26, 27, 28, 29, -1, 31, -1, -1, - -1, -1, -1, -1, 38, 39, -1, -1, 42, -1, - 44, 45, -1, -1, 48, -1, 50, 51, 52, -1, - 54, 55, -1, -1, 58, 59, -1, -1, -1, -1, - -1, 65, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, 105, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, 171, 172, -1, + -1, -1, 5, 6, 203, -1, 205, -1, 207, 208, + 13, -1, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, + -1, -1, 45, -1, -1, 48, 49, -1, 51, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, 26, 27, 28, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, 52, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, 105, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, -1, - -1, 5, 6, 203, -1, 205, -1, 207, 208, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, 49, -1, 51, -1, -1, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, -1, -1, 5, 6, + 203, -1, 205, -1, 207, 208, 13, -1, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, + 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, + -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, + -1, 48, 49, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, -1, -1, 5, 6, 203, - -1, 205, -1, 207, 208, 13, -1, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, - 48, 49, -1, 51, -1, -1, -1, 55, -1, -1, + 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, + -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, - 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, - -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, - 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, - -1, 5, 6, -1, -1, 203, -1, 205, -1, 207, - 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, + -1, -1, 5, 6, -1, -1, 203, -1, 205, -1, + 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, + -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, 153, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, 206, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, + 203, -1, 205, 206, 207, 208, 15, 16, 17, 18, + 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, + -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, + 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, + 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, -1, - -1, 5, 6, 203, 204, 205, -1, 207, 208, 13, - -1, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, + -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, + 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, + -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, + 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, + -1, -1, 5, 6, 203, 204, 205, -1, 207, 208, + 13, -1, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, + -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, + 203, -1, 205, -1, 207, 208, 15, 16, 17, 18, + 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, + -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, + 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, + 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, 204, 205, -1, 207, 208, 15, - 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, - -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, - -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, - -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, + -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, + 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, + -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, + 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, + 5, 6, -1, -1, 203, 204, 205, -1, 207, 208, + 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, + 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, + 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, 69, -1, 71, 72, 73, -1, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, - -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, + -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, + -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, + -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, - 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, - 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, - -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, + -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, + 195, -1, -1, -1, 5, 6, -1, -1, 203, -1, + 205, -1, 207, 208, 15, 16, 17, 18, 19, -1, + -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, + 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, + -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, + 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, + 61, -1, -1, -1, -1, -1, -1, 68, 69, -1, + 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, + 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, - -1, -1, -1, 5, 6, -1, -1, 203, -1, 205, - -1, 207, 208, 15, 16, 17, 18, 19, -1, -1, - -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, - -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, - -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, - -1, -1, -1, 55, -1, -1, -1, -1, -1, 61, - -1, -1, -1, -1, -1, -1, 68, 69, -1, 71, - 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, - 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, + -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, + -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, - -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, - 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, + -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, + 191, -1, -1, 194, 195, -1, -1, -1, 5, 6, + -1, -1, 203, -1, 205, -1, 207, 208, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, + 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, + -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, + -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, + -1, 58, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, - -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, - -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, - 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, - 58, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, - 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, - -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, - 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, - -1, 5, 6, -1, -1, 203, -1, 205, -1, 207, - 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, - -1, -1, 126, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, + -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, -1, 207, 208, 15, 16, 17, 18, 19, - -1, -1, 22, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, + -1, -1, 5, 6, -1, -1, 203, -1, 205, -1, + 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, + -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, + -1, -1, -1, 126, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, -1, 205, -1, 207, 208, 15, - 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, - -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, - -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, - -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, + 203, -1, 205, -1, 207, 208, 15, 16, 17, 18, + 19, -1, -1, 22, -1, -1, 25, -1, 27, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, + -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, + 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, + 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, - -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, + -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, + 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, + -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, + 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, + 5, 6, -1, -1, 203, -1, 205, -1, 207, 208, + 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, + 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, + 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, 69, -1, 71, 72, 73, -1, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, - 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, - -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, + -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, + -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, + -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, - -1, -1, -1, 5, 6, -1, -1, 203, -1, 205, - 206, 207, 208, 15, 16, 17, 18, 19, -1, -1, - -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, - -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, - -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, - -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 68, 69, -1, 71, - 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, - 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, + 195, -1, -1, -1, 5, 6, -1, -1, 203, -1, + 205, 206, 207, 208, 15, 16, 17, 18, 19, -1, + -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, + 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, + -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, + 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, 69, -1, + 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, + 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, - -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, - 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, + -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, + -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, + -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, - -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, - -1, 203, -1, 205, 206, 207, 208, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, - 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, + 191, -1, -1, 194, 195, -1, -1, -1, 5, 6, + -1, -1, 203, -1, 205, 206, 207, 208, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, + 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, + -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, + -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, - 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, -1, -1, -1, -1, - -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 187, - 188, 189, -1, 191, -1, -1, 194, 195, -1, -1, - -1, 5, 6, -1, -1, 203, -1, 205, 206, 207, - 208, 15, 16, 17, 18, 19, -1, -1, -1, -1, - -1, 25, -1, 27, -1, -1, -1, 31, -1, -1, - -1, -1, -1, -1, -1, 39, -1, -1, -1, -1, - -1, 45, -1, -1, 48, -1, -1, 51, -1, -1, - -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 68, 69, -1, 71, 72, 73, - -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, - 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, - 94, 95, -1, -1, 98, 99, 100, 101, 102, 103, - 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, + 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 138, -1, -1, -1, -1, -1, - -1, -1, 146, 147, 148, 149, 150, -1, 152, -1, - 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, - -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, -1, -1, -1, + -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 187, 188, 189, -1, 191, -1, -1, - 194, 195, -1, -1, -1, 5, 6, -1, -1, 203, - -1, 205, 206, 207, 208, 15, 16, 17, 18, 19, - -1, -1, -1, -1, -1, 25, -1, 27, -1, -1, - -1, 31, -1, -1, -1, -1, -1, -1, -1, 39, - -1, -1, -1, -1, -1, 45, -1, -1, 48, -1, - -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 68, 69, - -1, 71, 72, 73, -1, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, + 187, 188, 189, -1, 191, -1, -1, 194, 195, -1, + -1, -1, 5, 6, -1, -1, 203, -1, 205, 206, + 207, 208, 15, 16, 17, 18, 19, -1, -1, -1, + -1, -1, 25, -1, 27, -1, -1, -1, 31, -1, + -1, -1, -1, -1, -1, -1, 39, -1, -1, -1, + -1, -1, 45, -1, -1, 48, -1, -1, 51, -1, + -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 68, 69, -1, 71, 72, + 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, + 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, + 93, 94, 95, -1, -1, 98, 99, 100, 101, 102, + 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 138, -1, - -1, -1, -1, -1, -1, -1, 146, 147, 148, 149, - 150, -1, 152, -1, 154, 155, 156, 157, 158, 159, - 160, 161, 162, 163, -1, -1, -1, -1, -1, -1, - 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 187, 188, 189, - -1, 191, -1, -1, 194, 195, -1, -1, -1, 5, - 6, -1, -1, 203, -1, 205, 206, 207, 208, 15, - 16, 17, 18, 19, -1, -1, -1, -1, -1, 25, - -1, 27, -1, -1, -1, 31, -1, -1, -1, -1, - -1, -1, -1, 39, -1, -1, -1, -1, -1, 45, - -1, -1, 48, -1, -1, 51, -1, -1, -1, 55, + -1, -1, -1, -1, -1, 138, -1, -1, -1, -1, + -1, -1, -1, 146, 147, 148, 149, 150, -1, 152, + -1, 154, 155, 156, 157, 158, 159, 160, 161, 162, + 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 68, 69, -1, 71, 72, 73, -1, 75, - 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, - 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, - -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, + -1, -1, -1, -1, 187, 188, 189, -1, 191, -1, + -1, 194, 195, -1, -1, -1, 5, 6, -1, -1, + 203, -1, 205, 206, 207, 208, 15, 16, 17, 18, + 19, -1, -1, -1, -1, -1, 25, -1, 27, -1, + -1, -1, 31, -1, -1, -1, -1, -1, -1, -1, + 39, -1, -1, -1, -1, -1, 45, -1, -1, 48, + -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 68, + 69, -1, 71, 72, 73, -1, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, + 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, + 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, - 126, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 138, -1, -1, -1, -1, -1, -1, -1, - 146, 147, 148, 149, 150, -1, 152, -1, 154, 155, - 156, 157, 158, 159, 160, 161, 162, 163, -1, -1, - -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 138, + -1, -1, -1, -1, -1, -1, -1, 146, 147, 148, + 149, 150, -1, 152, -1, 154, 155, 156, 157, 158, + 159, 160, 161, 162, 163, -1, -1, -1, -1, -1, + -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 187, 188, + 189, -1, 191, -1, -1, 194, 195, -1, -1, -1, + 5, 6, -1, -1, 203, -1, 205, 206, 207, 208, + 15, 16, 17, 18, 19, -1, -1, -1, -1, -1, + 25, -1, 27, -1, -1, -1, 31, -1, -1, -1, + -1, -1, -1, -1, 39, -1, -1, -1, -1, -1, + 45, -1, -1, 48, -1, -1, 51, -1, -1, -1, + 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 68, 69, -1, 71, 72, 73, -1, + 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, + 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, + 95, -1, -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 187, 188, 189, -1, 191, -1, -1, 194, 195, - -1, -1, -1, 5, 6, -1, -1, 203, -1, 205, - -1, 207, 208, 15, 16, 17, 18, 19, -1, -1, - -1, -1, -1, 25, -1, 27, -1, -1, -1, 31, - -1, -1, -1, -1, -1, -1, -1, 39, -1, -1, - -1, -1, -1, 45, -1, -1, 48, -1, -1, 51, - -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 68, 69, -1, 71, - 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, - -1, 93, 94, 95, -1, -1, 98, 99, 100, 101, - 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, + -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, + -1, 126, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 138, -1, -1, -1, -1, -1, -1, + -1, 146, 147, 148, 149, 150, -1, 152, -1, 154, + 155, 156, 157, 158, 159, 160, 161, 162, 163, -1, + -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 138, -1, -1, -1, - -1, -1, -1, -1, 146, 147, 148, 149, 150, -1, - 152, -1, 154, 155, 156, 157, 158, 159, 160, 161, - 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, + -1, -1, 187, 188, 189, -1, 191, -1, -1, 194, + 195, -1, -1, -1, 5, 6, -1, -1, 203, -1, + 205, -1, 207, 208, 15, 16, 17, 18, 19, -1, + -1, -1, -1, -1, 25, -1, 27, -1, -1, -1, + 31, -1, -1, -1, -1, -1, -1, -1, 39, -1, + -1, -1, -1, -1, 45, -1, -1, 48, -1, -1, + 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 68, 69, -1, + 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, + 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, + 91, -1, 93, 94, 95, -1, -1, 98, 99, 100, + 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 187, 188, 189, -1, 191, - -1, -1, 194, 195, -1, -1, -1, 5, 6, -1, - -1, 203, -1, 205, -1, 207, 208, 15, 16, 17, - 18, 19, -1, -1, -1, -1, -1, 25, -1, 27, - -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, - -1, 39, -1, -1, -1, -1, -1, 45, -1, -1, - 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 138, -1, -1, + -1, -1, -1, -1, -1, 146, 147, 148, 149, 150, + -1, 152, -1, 154, 155, 156, 157, 158, 159, 160, + 161, 162, 163, -1, -1, -1, -1, -1, -1, 170, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 68, 69, -1, 71, 72, 73, -1, 75, 76, 77, - 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, - 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, - 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 187, 188, 189, -1, + 191, -1, -1, 194, 195, -1, -1, -1, 5, 6, + -1, -1, 203, -1, 205, -1, 207, 208, 15, 16, + 17, 18, 19, -1, -1, -1, -1, -1, 25, -1, + 27, -1, -1, -1, 31, -1, -1, -1, -1, -1, + -1, -1, 39, -1, -1, -1, -1, -1, 45, -1, + -1, 48, -1, -1, 51, -1, -1, -1, 55, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 138, -1, -1, -1, -1, -1, -1, -1, 146, 147, - 148, 149, 150, -1, 152, -1, 154, 155, 156, 157, - 158, 159, 160, 161, 162, 163, 21, 22, -1, -1, - 19, -1, 170, -1, -1, -1, 25, -1, -1, -1, - -1, -1, 31, -1, -1, -1, -1, -1, -1, 187, - 188, 189, 41, 191, -1, -1, 194, 195, -1, -1, - 49, -1, 21, 22, -1, 203, -1, 205, -1, 207, - 208, -1, -1, -1, -1, 64, -1, -1, -1, -1, - -1, -1, 71, 72, 73, 74, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, - 99, 100, 101, 102, 103, -1, -1, -1, -1, -1, - 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, 138, - 145, -1, -1, -1, 21, 22, 115, 116, 117, 118, - 119, -1, 151, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, 162, 133, 134, -1, -1, -1, -1, - 139, 140, 141, -1, -1, 180, 145, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, - -1, 206, -1, -1, -1, -1, -1, -1, 207, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, - 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, - -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, + -1, 68, 69, -1, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, 102, 103, 104, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 117, 118, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, - -1, -1, -1, -1, -1, -1, -1, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 115, 116, - 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, + -1, 138, -1, -1, -1, -1, -1, -1, -1, 146, + 147, 148, 149, 150, -1, 152, -1, 154, 155, 156, + 157, 158, 159, 160, 161, 162, 163, 21, 22, -1, + -1, 19, -1, 170, -1, -1, -1, 25, -1, -1, + -1, -1, -1, 31, -1, -1, -1, -1, -1, -1, + 187, 188, 189, 41, 191, -1, -1, 194, 195, -1, + -1, 49, -1, 21, 22, -1, 203, -1, 205, -1, + 207, 208, -1, -1, -1, -1, 64, -1, -1, -1, + -1, -1, -1, 71, 72, 73, 74, 75, 76, 77, + 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, + 98, 99, 100, 101, 102, 103, -1, -1, -1, -1, + -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, + 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, + 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, + 138, 145, -1, -1, -1, 21, 22, 115, 116, 117, + 118, 119, -1, 151, 122, 123, 124, 125, -1, 127, + 128, 129, 130, 131, 162, 133, 134, -1, -1, -1, + -1, 139, 140, 141, -1, -1, 180, 145, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, + -1, -1, 206, -1, -1, -1, -1, -1, -1, 207, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, - -1, -1, -1, -1, -1, 21, 22, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, + 116, 117, 118, 119, 21, 22, 122, 123, 124, 125, + -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, + -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, + -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, - 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, + -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, + 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, + 206, -1, -1, -1, -1, -1, -1, -1, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + -1, -1, 139, 140, 141, -1, -1, -1, 145, 115, + 116, 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, - 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, - -1, -1, 145, -1, 180, -1, 182, 183, 184, 185, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, + -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, - 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 203, -1, -1, 206, 115, 116, 117, 118, 119, 21, - 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, - 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, - 141, -1, -1, -1, 145, -1, -1, -1, -1, -1, - 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + 206, -1, -1, -1, -1, -1, 21, 22, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + -1, -1, 139, 140, 141, -1, -1, -1, 145, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, - -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, - -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, - 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, - -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, - -1, -1, -1, 145, 115, 116, 117, 118, 119, 21, - 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, - 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, - 141, -1, -1, -1, 145, -1, -1, -1, 180, -1, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 202, 203, -1, -1, 206, -1, -1, -1, -1, 180, - -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, - -1, 21, 22, 115, 116, 117, 118, 119, -1, -1, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, + 145, 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, - -1, -1, -1, 145, 21, 22, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 180, -1, + -1, -1, -1, 145, -1, 180, -1, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, + -1, 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, - 140, 141, -1, -1, -1, 145, 21, 22, 115, 116, - 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, + 140, 141, -1, -1, -1, 145, -1, -1, -1, -1, + -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, - 115, 116, 117, 118, 119, 21, 22, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, - 145, -1, -1, -1, -1, -1, 21, 22, -1, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, -1, -1, -1, 145, 115, 116, 117, 118, 119, + 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, + 140, 141, -1, -1, -1, 145, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, + 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, + -1, -1, 21, 22, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, -1, -1, -1, 145, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, - -1, 206, -1, -1, -1, -1, -1, -1, -1, 115, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, -1, -1, 206, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, + 139, 140, 141, -1, -1, -1, 145, 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 115, 116, 117, 118, 119, 21, 22, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, - 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, + -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, - 206, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, - -1, 206, -1, -1, -1, -1, -1, 21, 22, 115, - 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, - -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + 206, 115, 116, 117, 118, 119, 21, 22, 122, 123, + 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, + 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, + -1, 145, -1, -1, -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, - 206, 115, 116, 117, 118, 119, -1, -1, 122, 123, + -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, + -1, -1, 206, -1, -1, -1, -1, -1, -1, -1, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, + 145, 115, 116, 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, - -1, 145, 21, 22, 115, 116, 117, 118, 119, -1, - -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, - 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, - 141, -1, -1, -1, 145, -1, 180, -1, 182, 183, + -1, 145, -1, -1, -1, 180, -1, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, + -1, 206, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, - -1, -1, 206, -1, -1, -1, -1, -1, -1, 180, - -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, - 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 202, 203, -1, -1, 206, 115, 116, 117, 118, - 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, - 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, - -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, + -1, -1, 206, -1, -1, -1, -1, -1, 21, 22, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, + 145, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, - -1, -1, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, + -1, 206, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, - 140, 141, -1, -1, -1, 145, 115, 116, 117, 118, - 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, - 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, + 140, 141, -1, -1, -1, 145, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, - -1, -1, -1, 21, 22, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, - 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, - 140, 141, -1, -1, -1, 145, 21, 22, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 202, 203, -1, -1, 206, 115, 116, 117, + 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, + 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, + -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, + -1, -1, -1, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 202, 203, -1, -1, 206, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, + -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, + -1, -1, -1, -1, -1, -1, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, + 139, 140, 141, -1, -1, -1, 145, 115, 116, 117, + 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, - 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, - 145, -1, 180, -1, 182, 183, 184, 185, 186, 187, + -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, + -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, - -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, - -1, 206, 115, 116, 117, 118, 119, 21, 22, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, - 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, - -1, -1, 145, -1, -1, -1, -1, -1, 21, 22, + -1, -1, -1, -1, 21, 22, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, + 139, 140, 141, -1, -1, -1, 145, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 203, -1, -1, 206, -1, -1, -1, -1, -1, -1, - -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, - 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, - 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, - -1, 145, 115, 116, 117, 118, 119, 21, 22, 122, - 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, - 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, - -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, - -1, -1, 206, -1, -1, -1, -1, 180, -1, 182, - 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, - 203, -1, -1, 206, -1, -1, -1, -1, -1, 21, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, -1, -1, 206, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + -1, -1, 139, 140, 141, -1, -1, -1, 145, 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, - -1, 145, 21, 22, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 145, -1, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, - -1, -1, 206, 115, 116, 117, 118, 119, -1, -1, + -1, -1, 206, 115, 116, 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, - -1, -1, -1, 145, 21, 22, 115, 116, 117, 118, - 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, - 139, 140, 141, -1, -1, -1, 145, -1, 180, -1, + -1, -1, -1, 145, -1, -1, -1, -1, -1, 21, + 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, 21, 22, 206, 115, 116, - 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, 21, 22, 145, -1, + -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, 115, 116, 117, 118, 119, 21, 22, + 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, + -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, + -1, -1, -1, 145, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, 206, -1, -1, -1, -1, 180, -1, + 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + 202, 203, -1, -1, 206, -1, -1, -1, -1, -1, + 21, 22, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, - 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, 204, -1, 115, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, 206, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, + 141, -1, -1, -1, 145, 21, 22, 115, 116, 117, + 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, + 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, + -1, 139, 140, 141, -1, -1, -1, 145, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, -1, -1, 206, -1, -1, -1, -1, + -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 202, 203, 21, 22, 206, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, - -1, -1, -1, 139, 140, 141, 21, 22, -1, 145, - 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, - 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, - -1, -1, -1, -1, 139, 140, 141, 21, 22, -1, - 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, + -1, -1, -1, 139, 140, 141, -1, 21, 22, 145, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, 204, -1, - -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, 204, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, 139, 140, 141, 21, 22, -1, 145, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, - 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, + 134, -1, -1, -1, -1, 139, 140, 141, 21, 22, -1, 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, 204, -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, - 204, 115, 116, 117, 118, 119, 21, 22, 122, 123, + 204, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, - 134, -1, -1, -1, -1, 139, 140, 141, -1, -1, - -1, 145, -1, -1, -1, -1, -1, -1, -1, -1, + 134, -1, -1, -1, -1, 139, 140, 141, 21, 22, + -1, 145, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, + 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, + 204, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, 204, 115, 116, 117, 118, 119, 21, 22, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, 139, 140, 141, -1, + -1, -1, 145, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, 204, -1, 107, 108, 109, 110, 111, 112, 113, + 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, + 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, + 134, 135, 136, 21, 22, 139, 140, 141, 142, 143, + 144, 145, -1, -1, -1, -1, -1, -1, -1, -1, + 38, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 21, 22, -1, -1, 172, -1, + -1, -1, -1, -1, -1, 179, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, - 204, -1, 107, 108, 109, 110, 111, 112, 113, 114, - 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, - 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, - 135, 136, 21, 22, 139, 140, 141, 142, 143, 144, - 145, -1, -1, -1, -1, -1, -1, -1, -1, 38, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 21, 22, -1, -1, 172, -1, -1, - -1, -1, -1, -1, 179, 180, -1, 182, 183, 184, - 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 107, 108, - 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, - 119, 120, 121, 122, 123, 124, -1, -1, 127, 128, - 129, -1, -1, 132, 133, 134, 135, 136, -1, -1, - 139, 140, 141, 142, 143, 144, 145, 115, 116, 117, - 118, 119, 21, 22, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, -1, -1, 137, - -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, 194, 195, -1, -1, -1, - -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 107, + 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, + 118, 119, 120, 121, 122, 123, 124, -1, -1, 127, + 128, 129, -1, -1, 132, 133, 134, 135, 136, -1, + -1, 139, 140, 141, 142, 143, 144, 145, 115, 116, + 117, 118, 119, 21, 22, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + 137, -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, + 188, 189, 190, 191, -1, -1, 194, 195, -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, - -1, 21, 22, -1, -1, -1, 115, 116, 117, 118, - 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, - 129, 130, 131, -1, 133, 134, -1, -1, -1, -1, - 139, 140, 141, 21, 22, -1, 145, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 172, -1, -1, -1, -1, -1, -1, - -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 202, 203, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, - 130, 131, -1, 133, 134, 21, 22, -1, -1, 139, - 140, 141, -1, -1, -1, 145, -1, 115, 116, 117, - 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, - -1, 139, 140, 141, -1, -1, -1, 145, -1, -1, - 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 202, 203, 172, -1, -1, -1, -1, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, 115, - 116, 117, 118, 119, 202, 203, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, - 22, -1, -1, 139, 140, 141, -1, -1, -1, 145, - -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, - 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, - 134, -1, 168, 21, 22, 139, 140, 141, -1, -1, - -1, 145, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, 172, -1, - -1, -1, -1, -1, -1, -1, 180, -1, 182, 183, - 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, - -1, -1, -1, 115, 116, 117, 118, 119, 202, 203, - 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, - -1, 133, 134, -1, -1, 21, 22, 139, 140, 141, - -1, -1, -1, 145, -1, -1, -1, 115, 116, 117, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, + -1, -1, 21, 22, -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, -1, - 172, 139, 140, 141, -1, -1, -1, 145, 180, -1, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + -1, 139, 140, 141, 21, 22, -1, 145, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 202, 203, -1, -1, 172, -1, -1, -1, -1, -1, - -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 21, 22, -1, -1, -1, 115, - 116, 117, 118, 119, 202, 203, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, - -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, - 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 172, -1, -1, -1, - -1, -1, -1, -1, 180, -1, 182, 183, 184, 185, - 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, 202, 203, 115, 116, + -1, -1, -1, -1, 172, -1, -1, -1, -1, -1, + -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 202, 203, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, + 139, 140, 141, -1, -1, -1, 145, -1, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, - 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, - -1, -1, 139, 140, 141, -1, -1, -1, 145, 21, - 22, -1, -1, -1, 115, 116, 117, 118, 119, -1, - -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, - 131, -1, 133, 134, -1, 172, -1, -1, 139, 140, - 141, 21, 22, 180, 145, 182, 183, 184, 185, 186, + 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, + -1, -1, 139, 140, 141, -1, -1, -1, 145, -1, + -1, 180, 181, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 202, 203, 172, -1, -1, -1, -1, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 180, + 115, 116, 117, 118, 119, 202, 203, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + 21, 22, -1, -1, 139, 140, 141, -1, -1, -1, + 145, -1, 115, 116, 117, 118, 119, -1, -1, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, 168, 21, 22, 139, 140, 141, -1, + -1, -1, 145, -1, -1, 180, -1, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, 172, + -1, -1, -1, -1, -1, -1, -1, 180, -1, 182, + 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, 202, + 203, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, 21, 22, 139, 140, + 141, -1, -1, -1, 145, -1, -1, -1, 115, 116, + 117, 118, 119, -1, -1, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, -1, -1, + -1, 172, 139, 140, 141, -1, -1, -1, 145, 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 202, 203, 115, 116, 117, 118, 119, -1, -1, - 122, 123, 124, 125, -1, 127, 128, 129, 130, 131, - -1, 133, 134, 21, 22, -1, -1, 139, 140, 141, - -1, -1, -1, 145, -1, 115, 116, 117, 118, 119, - -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, - 130, 131, -1, 133, 134, 21, 22, -1, -1, 139, - 140, 141, -1, -1, -1, -1, -1, -1, 180, -1, - 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, + -1, 202, 203, -1, -1, 172, -1, -1, -1, -1, + -1, -1, -1, 180, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 21, 22, -1, -1, -1, + 115, 116, 117, 118, 119, 202, 203, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + -1, -1, -1, -1, 139, 140, 141, -1, -1, -1, + 145, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, - 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, - 190, 191, -1, -1, -1, -1, -1, 115, 116, 117, - 118, 119, 202, 203, 122, 123, 124, 125, -1, 127, - 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, - -1, -1, -1, -1, -1, -1, -1, -1, -1, 115, + -1, -1, -1, -1, -1, -1, -1, 172, -1, -1, + -1, -1, -1, -1, -1, 180, -1, 182, 183, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 202, 203, 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, 125, - -1, 127, 128, 129, 130, 131, -1, 133, 134, 21, - 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 184, 185, + -1, 127, 128, 129, 130, 131, -1, 133, 134, -1, + -1, -1, -1, 139, 140, 141, -1, -1, -1, 145, + 21, 22, -1, -1, -1, 115, 116, 117, 118, 119, + -1, -1, 122, 123, 124, 125, -1, 127, 128, 129, + 130, 131, -1, 133, 134, -1, 172, -1, -1, 139, + 140, 141, 21, 22, 180, 145, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, -1, - -1, 115, 116, 117, 118, 119, 202, 203, 122, 123, - 124, 125, -1, 127, 128, 129, 130, 131, -1, 133, - 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 115, 116, 117, 118, 119, -1, -1, - 122, -1, -1, 125, -1, 127, 128, 129, 130, 131, - -1, 133, 134, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 19, 185, 186, 187, 188, 189, 190, 191, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 202, 203, + 180, -1, 182, 183, 184, 185, 186, 187, 188, 189, + 190, 191, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 202, 203, 115, 116, 117, 118, 119, -1, + -1, 122, 123, 124, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, 21, 22, -1, -1, 139, 140, + 141, -1, -1, -1, 145, -1, 115, 116, 117, 118, + 119, -1, -1, 122, 123, 124, 125, -1, 127, 128, + 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, + 139, 140, 141, -1, -1, -1, -1, -1, -1, 180, + -1, 182, 183, 184, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, -1, -1, -1, -1, -1, -1, -1, + -1, 180, -1, 182, 183, 184, 185, 186, 187, 188, + 189, 190, 191, -1, -1, -1, -1, -1, 115, 116, + 117, 118, 119, 202, 203, 122, 123, 124, 125, -1, + 127, 128, 129, 130, 131, -1, 133, 134, 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, 19, -1, 185, 186, 187, 188, 189, 190, 191, + 115, 116, 117, 118, 119, -1, -1, 122, 123, 124, + 125, -1, 127, 128, 129, 130, 131, -1, 133, 134, + 21, 22, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 202, 203, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 184, + 185, 186, 187, 188, 189, 190, 191, -1, -1, -1, + -1, -1, 115, 116, 117, 118, 119, 202, 203, 122, + 123, 124, 125, -1, 127, 128, 129, 130, 131, -1, + 133, 134, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 115, 116, 117, 118, 119, -1, + -1, 122, -1, -1, 125, -1, 127, 128, 129, 130, + 131, -1, 133, 134, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - 202, 203, 71, 72, 73, -1, 75, 76, 77, 78, - 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, - 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, - 99, 100, 101, 71, 72, 73, -1, 75, 76, 77, + -1, 19, 185, 186, 187, 188, 189, 190, 191, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 202, + 203, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 19, -1, 185, 186, 187, 188, 189, 190, + 191, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, 203, 71, 72, 73, -1, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, - 98, 99, 100, 101, -1, -1, -1, -1, -1, 19, - -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, 153, -1, -1, -1, -1, -1, - -1, -1, -1, 162, -1, -1, -1, -1, -1, -1, + 98, 99, 100, 101, 71, 72, 73, -1, 75, 76, + 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, + 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, + -1, 98, 99, 100, 101, -1, -1, -1, -1, -1, + 19, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 153, -1, -1, -1, -1, + -1, -1, -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 153, 35, -1, -1, -1, - -1, 71, 72, 73, 162, 75, 76, 77, 78, 79, - 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, - 90, 91, -1, 93, 94, 95, -1, -1, 98, 99, - 100, 101, 71, -1, 73, -1, 75, 76, 77, 78, - 79, -1, 81, 82, 83, 84, 85, 86, 87, 88, + -1, -1, -1, -1, -1, -1, 153, 35, -1, -1, + -1, -1, 71, 72, 73, 162, 75, 76, 77, 78, + 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, 98, - 99, 100, 101, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, -1, -1, -1, 117, 118, - -1, -1, -1, 153, -1, -1, -1, -1, -1, -1, - -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, + 99, 100, 101, 71, -1, 73, -1, 75, 76, 77, + 78, 79, -1, 81, 82, 83, 84, 85, 86, 87, + 88, 89, 90, 91, -1, 93, 94, 95, -1, -1, + 98, 99, 100, 101, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, -1, 117, + 118, -1, -1, -1, 153, -1, -1, -1, -1, -1, + -1, -1, -1, 162, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, -1, 162 + -1, -1, -1, -1, 162 }; /* YYSTOS[STATE-NUM] -- The symbol kind of the accessing symbol of @@ -3757,141 +3757,141 @@ static const yytype_int16 yystos[] = 230, 162, 191, 225, 226, 57, 63, 359, 360, 162, 207, 214, 359, 359, 359, 138, 162, 269, 34, 63, 131, 195, 205, 250, 251, 252, 253, 269, 172, 5, - 6, 8, 36, 372, 62, 353, 179, 178, 181, 178, - 225, 22, 57, 190, 202, 227, 162, 172, 353, 162, - 162, 162, 162, 138, 222, 252, 252, 252, 205, 139, - 140, 141, 178, 204, 57, 63, 259, 261, 57, 63, - 363, 57, 63, 373, 57, 63, 354, 15, 16, 155, - 160, 162, 163, 205, 217, 247, 155, 230, 162, 162, - 162, 361, 57, 63, 213, 429, 421, 425, 162, 164, - 220, 206, 248, 252, 252, 252, 252, 262, 162, 364, - 376, 356, 164, 165, 216, 15, 16, 155, 160, 162, - 217, 244, 245, 227, 179, 170, 170, 170, 164, 206, - 35, 71, 73, 75, 76, 77, 78, 79, 81, 82, - 83, 84, 85, 86, 87, 88, 89, 90, 91, 93, - 94, 95, 98, 99, 100, 101, 117, 118, 162, 257, - 260, 181, 365, 106, 370, 371, 208, 249, 327, 164, - 165, 166, 178, 206, 19, 25, 31, 41, 49, 64, - 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, - 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, - 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, - 101, 102, 103, 151, 207, 269, 379, 381, 382, 385, - 390, 391, 419, 430, 422, 426, 21, 22, 38, 107, - 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, - 118, 119, 120, 121, 122, 123, 124, 127, 128, 129, - 132, 133, 134, 135, 136, 139, 140, 141, 142, 143, - 144, 145, 180, 182, 183, 184, 185, 186, 187, 188, - 189, 190, 191, 194, 195, 202, 203, 35, 35, 205, - 255, 170, 263, 75, 79, 93, 94, 98, 99, 100, - 101, 380, 170, 162, 377, 247, 208, 162, 350, 352, - 244, 185, 185, 185, 205, 185, 185, 205, 185, 185, - 185, 185, 185, 185, 205, 269, 33, 60, 61, 123, - 127, 184, 187, 189, 203, 209, 389, 182, 162, 384, - 341, 344, 162, 162, 162, 204, 22, 162, 204, 150, - 206, 327, 337, 338, 181, 256, 266, 367, 181, 369, - 170, 374, 247, 178, 181, 184, 348, 392, 397, 399, - 5, 6, 15, 16, 17, 18, 19, 25, 27, 31, - 39, 45, 48, 51, 55, 68, 69, 80, 102, 103, - 104, 117, 118, 146, 147, 148, 149, 150, 152, 154, - 155, 156, 157, 158, 159, 160, 161, 163, 170, 187, - 188, 189, 194, 195, 203, 205, 207, 208, 219, 221, - 264, 269, 274, 286, 293, 296, 299, 303, 305, 307, - 308, 310, 315, 318, 319, 326, 379, 432, 439, 449, - 452, 464, 467, 401, 395, 162, 386, 403, 405, 407, - 409, 411, 413, 415, 417, 319, 185, 205, 33, 184, - 33, 184, 203, 209, 204, 319, 203, 209, 390, 178, - 466, 162, 172, 339, 419, 423, 162, 172, 342, 427, - 162, 132, 205, 7, 50, 280, 172, 206, 419, 1, - 9, 10, 11, 13, 26, 28, 29, 38, 42, 44, - 52, 54, 58, 59, 65, 105, 171, 172, 231, 232, - 235, 237, 238, 239, 240, 241, 242, 243, 265, 270, - 275, 276, 277, 278, 279, 281, 285, 306, 319, 162, - 357, 358, 269, 333, 162, 390, 126, 132, 179, 347, - 419, 419, 388, 419, 185, 185, 185, 271, 381, 432, - 269, 185, 5, 102, 103, 185, 205, 185, 205, 205, - 185, 185, 205, 185, 185, 205, 185, 185, 205, 185, - 185, 319, 319, 205, 205, 205, 205, 205, 205, 218, - 13, 319, 448, 463, 319, 319, 319, 319, 319, 13, - 49, 297, 319, 297, 208, 205, 254, 170, 208, 299, - 304, 21, 22, 115, 116, 117, 118, 119, 122, 123, - 124, 125, 127, 128, 129, 130, 131, 133, 134, 139, - 140, 141, 145, 180, 182, 183, 184, 185, 186, 187, - 188, 189, 190, 191, 202, 203, 206, 205, 419, 419, - 206, 162, 383, 419, 255, 419, 255, 419, 255, 339, - 340, 342, 343, 206, 394, 267, 297, 204, 204, 204, - 319, 162, 431, 181, 172, 171, 181, 172, 171, 319, - 147, 162, 346, 378, 337, 205, 205, 126, 319, 263, - 61, 319, 205, 162, 172, 155, 58, 319, 263, 126, - 319, 37, 172, 172, 205, 10, 172, 172, 172, 172, - 172, 172, 66, 282, 172, 107, 108, 109, 110, 111, - 112, 113, 114, 120, 121, 126, 132, 135, 136, 142, - 143, 144, 179, 179, 178, 466, 171, 254, 334, 172, - 347, 319, 186, 186, 186, 172, 440, 442, 272, 205, - 205, 185, 205, 294, 185, 185, 185, 459, 297, 390, - 463, 319, 287, 289, 319, 291, 461, 297, 446, 450, - 297, 444, 390, 319, 319, 319, 319, 319, 319, 166, - 167, 216, 378, 137, 178, 466, 378, 13, 178, 466, - 466, 147, 152, 185, 269, 309, 153, 162, 203, 206, - 297, 433, 435, 4, 302, 266, 208, 254, 19, 153, - 162, 379, 19, 153, 162, 379, 319, 319, 319, 319, - 319, 319, 162, 319, 153, 162, 319, 319, 319, 379, - 319, 319, 319, 319, 319, 319, 22, 319, 319, 319, - 319, 319, 319, 319, 319, 319, 319, 319, 128, 129, - 153, 162, 202, 203, 316, 319, 206, 297, 186, 186, - 172, 186, 186, 256, 186, 256, 186, 256, 172, 186, - 172, 186, 268, 419, 206, 178, 204, 171, 419, 419, - 206, 205, 43, 126, 178, 179, 181, 184, 345, 319, - 378, 319, 14, 319, 319, 179, 181, 155, 319, 170, - 319, 205, 147, 162, 205, 284, 349, 351, 319, 319, + 6, 8, 36, 372, 62, 353, 179, 178, 181, 172, + 178, 225, 22, 57, 190, 202, 227, 162, 172, 353, + 162, 162, 162, 162, 138, 222, 252, 252, 252, 205, + 139, 140, 141, 178, 204, 57, 63, 259, 261, 57, + 63, 363, 57, 63, 373, 57, 63, 354, 15, 16, + 155, 160, 162, 163, 205, 217, 247, 155, 230, 162, + 162, 162, 361, 57, 63, 213, 429, 421, 425, 162, + 164, 220, 206, 248, 252, 252, 252, 252, 262, 162, + 364, 376, 356, 164, 165, 216, 15, 16, 155, 160, + 162, 217, 244, 245, 227, 179, 170, 170, 170, 164, + 206, 35, 71, 73, 75, 76, 77, 78, 79, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 93, 94, 95, 98, 99, 100, 101, 117, 118, 162, + 257, 260, 181, 365, 106, 370, 371, 208, 249, 327, + 164, 165, 166, 178, 206, 19, 25, 31, 41, 49, + 64, 71, 72, 73, 74, 75, 76, 77, 78, 79, + 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, + 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, + 100, 101, 102, 103, 151, 207, 269, 379, 381, 382, + 385, 390, 391, 419, 430, 422, 426, 21, 22, 38, + 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, + 117, 118, 119, 120, 121, 122, 123, 124, 127, 128, + 129, 132, 133, 134, 135, 136, 139, 140, 141, 142, + 143, 144, 145, 180, 182, 183, 184, 185, 186, 187, + 188, 189, 190, 191, 194, 195, 202, 203, 35, 35, + 205, 255, 170, 263, 75, 79, 93, 94, 98, 99, + 100, 101, 380, 170, 162, 377, 247, 208, 162, 350, + 352, 244, 185, 185, 185, 205, 185, 185, 205, 185, + 185, 185, 185, 185, 185, 205, 269, 33, 60, 61, + 123, 127, 184, 187, 189, 203, 209, 389, 182, 162, + 384, 341, 344, 162, 162, 162, 204, 22, 162, 204, + 150, 206, 327, 337, 338, 181, 256, 266, 367, 181, + 369, 170, 374, 247, 178, 181, 184, 348, 392, 397, + 399, 5, 6, 15, 16, 17, 18, 19, 25, 27, + 31, 39, 45, 48, 51, 55, 68, 69, 80, 102, + 103, 104, 117, 118, 146, 147, 148, 149, 150, 152, + 154, 155, 156, 157, 158, 159, 160, 161, 163, 170, + 187, 188, 189, 194, 195, 203, 205, 207, 208, 219, + 221, 264, 269, 274, 286, 293, 296, 299, 303, 305, + 307, 308, 310, 315, 318, 319, 326, 379, 432, 439, + 449, 452, 464, 467, 401, 395, 162, 386, 403, 405, + 407, 409, 411, 413, 415, 417, 319, 185, 205, 33, + 184, 33, 184, 203, 209, 204, 319, 203, 209, 390, + 178, 466, 162, 172, 339, 419, 423, 162, 172, 342, + 427, 162, 132, 205, 7, 50, 280, 172, 206, 419, + 1, 9, 10, 11, 13, 26, 28, 29, 38, 42, + 44, 52, 54, 58, 59, 65, 105, 171, 172, 231, + 232, 235, 237, 238, 239, 240, 241, 242, 243, 265, + 270, 275, 276, 277, 278, 279, 281, 285, 306, 319, + 162, 357, 358, 269, 333, 162, 390, 126, 132, 179, + 347, 419, 419, 388, 419, 185, 185, 185, 271, 381, + 432, 269, 185, 5, 102, 103, 185, 205, 185, 205, + 205, 185, 185, 205, 185, 185, 205, 185, 185, 205, + 185, 185, 319, 319, 205, 205, 205, 205, 205, 205, + 218, 13, 319, 448, 463, 319, 319, 319, 319, 319, + 13, 49, 297, 319, 297, 208, 205, 254, 170, 208, + 299, 304, 21, 22, 115, 116, 117, 118, 119, 122, + 123, 124, 125, 127, 128, 129, 130, 131, 133, 134, + 139, 140, 141, 145, 180, 182, 183, 184, 185, 186, + 187, 188, 189, 190, 191, 202, 203, 206, 205, 419, + 419, 206, 162, 383, 419, 255, 419, 255, 419, 255, + 339, 340, 342, 343, 206, 394, 267, 297, 204, 204, + 204, 319, 162, 431, 181, 172, 171, 181, 172, 171, + 319, 147, 162, 346, 378, 337, 205, 205, 126, 319, + 263, 61, 319, 205, 162, 172, 155, 58, 319, 263, + 126, 319, 37, 172, 172, 205, 10, 172, 172, 172, + 172, 172, 172, 66, 282, 172, 107, 108, 109, 110, + 111, 112, 113, 114, 120, 121, 126, 132, 135, 136, + 142, 143, 144, 179, 179, 178, 466, 171, 254, 334, + 172, 347, 319, 186, 186, 186, 172, 440, 442, 272, + 205, 205, 185, 205, 294, 185, 185, 185, 459, 297, + 390, 463, 319, 287, 289, 319, 291, 461, 297, 446, + 450, 297, 444, 390, 319, 319, 319, 319, 319, 319, + 166, 167, 216, 378, 137, 178, 466, 378, 13, 178, + 466, 466, 147, 152, 185, 269, 309, 153, 162, 203, + 206, 297, 433, 435, 4, 302, 266, 208, 254, 19, + 153, 162, 379, 19, 153, 162, 379, 319, 319, 319, + 319, 319, 319, 162, 319, 153, 162, 319, 319, 319, + 379, 319, 319, 319, 319, 319, 319, 22, 319, 319, + 319, 319, 319, 319, 319, 319, 319, 319, 319, 128, + 129, 153, 162, 202, 203, 316, 319, 206, 297, 186, + 186, 172, 186, 186, 256, 186, 256, 186, 256, 172, + 186, 172, 186, 268, 419, 206, 178, 204, 171, 419, + 419, 206, 205, 43, 126, 178, 179, 181, 184, 345, + 319, 378, 319, 14, 319, 319, 179, 181, 155, 319, + 170, 319, 205, 147, 162, 205, 284, 349, 351, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, 319, - 319, 319, 319, 319, 319, 319, 319, 357, 368, 8, - 327, 332, 319, 172, 393, 398, 400, 419, 390, 390, - 419, 70, 438, 267, 162, 319, 419, 453, 455, 457, - 390, 466, 172, 186, 466, 206, 390, 390, 206, 390, - 390, 466, 390, 390, 466, 390, 186, 206, 206, 206, - 206, 206, 206, 319, 20, 319, 448, 171, 20, 378, - 319, 204, 206, 205, 205, 311, 313, 205, 132, 345, - 433, 178, 206, 178, 206, 205, 255, 171, 302, 185, - 205, 185, 205, 205, 205, 204, 19, 153, 162, 379, - 181, 153, 162, 319, 205, 205, 153, 162, 319, 1, - 204, 206, 402, 396, 162, 387, 404, 186, 408, 186, - 412, 186, 339, 416, 342, 418, 172, 186, 319, 162, - 162, 419, 319, 206, 20, 263, 206, 319, 266, 206, - 319, 205, 43, 162, 283, 178, 181, 348, 171, 57, - 63, 330, 67, 331, 172, 172, 186, 186, 186, 162, - 206, 435, 206, 172, 186, 206, 186, 390, 390, 390, - 186, 206, 390, 205, 206, 186, 186, 186, 186, 206, - 186, 186, 206, 186, 302, 205, 168, 297, 297, 20, - 319, 319, 390, 255, 319, 319, 319, 204, 203, 153, - 162, 126, 132, 179, 184, 300, 301, 256, 255, 320, - 319, 322, 319, 206, 297, 319, 185, 205, 319, 205, - 204, 319, 206, 297, 205, 204, 317, 406, 410, 414, - 419, 205, 206, 43, 345, 263, 297, 263, 171, 263, - 206, 319, 162, 178, 206, 162, 390, 347, 47, 331, - 46, 106, 328, 441, 443, 273, 206, 162, 205, 295, - 186, 186, 186, 460, 186, 463, 288, 290, 292, 462, - 447, 451, 445, 205, 263, 206, 297, 172, 172, 297, - 206, 206, 186, 256, 206, 206, 433, 205, 132, 345, - 162, 162, 162, 162, 178, 206, 137, 263, 298, 256, - 390, 206, 419, 206, 206, 206, 324, 319, 319, 206, - 206, 319, 267, 162, 319, 206, 12, 23, 24, 233, - 234, 12, 236, 206, 162, 181, 348, 43, 172, 347, - 319, 33, 329, 328, 330, 205, 205, 186, 319, 454, - 456, 458, 205, 205, 466, 319, 319, 319, 205, 438, - 205, 205, 206, 319, 206, 448, 319, 172, 312, 186, - 132, 345, 204, 319, 319, 319, 300, 126, 319, 263, - 186, 186, 419, 206, 206, 206, 206, 263, 263, 205, - 237, 275, 276, 277, 278, 319, 172, 390, 347, 162, - 319, 172, 335, 329, 346, 438, 438, 205, 206, 205, - 205, 205, 297, 463, 206, 297, 438, 433, 434, 206, - 172, 465, 465, 319, 309, 314, 319, 319, 206, 206, - 319, 321, 323, 186, 319, 347, 319, 172, 260, 336, - 205, 433, 436, 437, 437, 319, 438, 438, 434, 466, - 466, 466, 437, 206, 53, 171, 204, 465, 309, 132, - 345, 325, 206, 319, 172, 172, 260, 433, 178, 466, - 206, 206, 206, 437, 437, 206, 206, 206, 206, 206, - 319, 204, 319, 319, 263, 172, 263, 206, 205, 206, - 206, 234, 433, 206 + 319, 319, 319, 319, 319, 319, 319, 319, 357, 368, + 8, 327, 332, 319, 172, 393, 398, 400, 419, 390, + 390, 419, 70, 438, 267, 162, 319, 419, 453, 455, + 457, 390, 466, 172, 186, 466, 206, 390, 390, 206, + 390, 390, 466, 390, 390, 466, 390, 186, 206, 206, + 206, 206, 206, 206, 319, 20, 319, 448, 171, 20, + 378, 319, 204, 206, 205, 205, 311, 313, 205, 132, + 345, 433, 178, 206, 178, 206, 205, 255, 171, 302, + 185, 205, 185, 205, 205, 205, 204, 19, 153, 162, + 379, 181, 153, 162, 319, 205, 205, 153, 162, 319, + 1, 204, 206, 402, 396, 162, 387, 404, 186, 408, + 186, 412, 186, 339, 416, 342, 418, 172, 186, 319, + 162, 162, 419, 319, 206, 20, 263, 206, 319, 266, + 206, 319, 205, 43, 162, 283, 178, 181, 348, 171, + 57, 63, 330, 67, 331, 172, 172, 186, 186, 186, + 162, 206, 435, 206, 172, 186, 206, 186, 390, 390, + 390, 186, 206, 390, 205, 206, 186, 186, 186, 186, + 206, 186, 186, 206, 186, 302, 205, 168, 297, 297, + 20, 319, 319, 390, 255, 319, 319, 319, 204, 203, + 153, 162, 126, 132, 179, 184, 300, 301, 256, 255, + 320, 319, 322, 319, 206, 297, 319, 185, 205, 319, + 205, 204, 319, 206, 297, 205, 204, 317, 406, 410, + 414, 419, 205, 206, 43, 345, 263, 297, 263, 171, + 263, 206, 319, 162, 178, 206, 162, 390, 347, 47, + 331, 46, 106, 328, 441, 443, 273, 206, 162, 205, + 295, 186, 186, 186, 460, 186, 463, 288, 290, 292, + 462, 447, 451, 445, 205, 263, 206, 297, 172, 172, + 297, 206, 206, 186, 256, 206, 206, 433, 205, 132, + 345, 162, 162, 162, 162, 178, 206, 137, 263, 298, + 256, 390, 206, 419, 206, 206, 206, 324, 319, 319, + 206, 206, 319, 267, 162, 319, 206, 12, 23, 24, + 233, 234, 12, 236, 206, 162, 181, 348, 43, 172, + 347, 319, 33, 329, 328, 330, 205, 205, 186, 319, + 454, 456, 458, 205, 205, 466, 319, 319, 319, 205, + 438, 205, 205, 206, 319, 206, 448, 319, 172, 312, + 186, 132, 345, 204, 319, 319, 319, 300, 126, 319, + 263, 186, 186, 419, 206, 206, 206, 206, 263, 263, + 205, 237, 275, 276, 277, 278, 319, 172, 390, 347, + 162, 319, 172, 335, 329, 346, 438, 438, 205, 206, + 205, 205, 205, 297, 463, 206, 297, 438, 433, 434, + 206, 172, 465, 465, 319, 309, 314, 319, 319, 206, + 206, 319, 321, 323, 186, 319, 347, 319, 172, 260, + 336, 205, 433, 436, 437, 437, 319, 438, 438, 434, + 466, 466, 466, 437, 206, 53, 171, 204, 465, 309, + 132, 345, 325, 206, 319, 172, 172, 260, 433, 178, + 466, 206, 206, 206, 437, 437, 206, 206, 206, 206, + 206, 319, 204, 319, 319, 263, 172, 263, 206, 205, + 206, 206, 234, 433, 206 }; /* YYR1[RULE-NUM] -- Symbol kind of the left-hand side of rule RULE-NUM. */ @@ -3983,7 +3983,7 @@ static const yytype_int8 yyr2[] = 2, 2, 2, 2, 2, 2, 2, 2, 0, 1, 1, 1, 1, 4, 1, 1, 2, 2, 3, 0, 2, 4, 3, 1, 2, 0, 4, 2, 2, 1, - 2, 3, 3, 2, 4, 0, 1, 2, 1, 3, + 2, 3, 3, 2, 4, 0, 1, 3, 1, 3, 1, 3, 3, 3, 2, 1, 1, 0, 2, 6, 1, 1, 0, 2, 1, 1, 1, 1, 1, 6, 7, 7, 2, 5, 5, 4, 1, 1, 1, 1, diff --git a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp index 79634ba73..9294ce08a 100644 --- a/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp +++ b/prog/1stPartyLibs/daScript/src/parser/ds2_parser.ypp @@ -744,7 +744,7 @@ is_public_module ; expect_declaration - : DAS_EXPECT expect_list + : DAS_EXPECT expect_list ';' ; expect_list diff --git a/prog/1stPartyLibs/daScript/src/simulate/simulate.cpp b/prog/1stPartyLibs/daScript/src/simulate/simulate.cpp index 06b5b8ba5..42ee7372e 100644 --- a/prog/1stPartyLibs/daScript/src/simulate/simulate.cpp +++ b/prog/1stPartyLibs/daScript/src/simulate/simulate.cpp @@ -395,6 +395,54 @@ namespace das return v_zero(); } +#if DAS_ENABLE_KEEPALIVE + + vec4f SimNodeKeepAlive_ForWithIteratorBase::eval ( Context & context ) { + // note: this is the 'slow' version, to which we fall back when there are too many sources + DAS_PROFILE_NODE + int totalCount = int(totalSources); + vector pi(totalCount); + for ( int t=0; t!=totalCount; ++t ) { + pi[t] = context.stack.sp() + stackTop[t]; + } + vector sources(totalCount); + for ( int t=0; t!=totalCount; ++t ) { + vec4f ll = source_iterators[t]->eval(context); + sources[t] = cast::to(ll); + } + bool needLoop = true; + SimNode ** __restrict tail = list + total; + for ( int t=0; t!=totalCount; ++t ) { + sources[t]->isOpen = true; + needLoop = sources[t]->first(context, pi[t]) && needLoop; + if ( context.stopFlags ) goto loopend; + } + if ( !needLoop ) goto loopend; + while ( !context.stopFlags ) { + SimNode ** __restrict body = list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + for ( int t=0; t!=totalCount; ++t ){ + if ( !sources[t]->next(context, pi[t]) ) goto loopend; + if ( context.stopFlags ) goto loopend; + } + } + loopend: + evalFinal(context); + for ( int t=0; t!=totalCount; ++t ) { + sources[t]->close(context, pi[t]); + } + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } + + +#endif + #if DAS_DEBUGGER vec4f SimNodeDebug_ForWithIteratorBase::eval ( Context & context ) { @@ -657,13 +705,9 @@ namespace das while ( cond->evalBool(context) && !context.stopFlags ) { SimNode ** __restrict body = list; loopbegin:; - if (body!=tail) { - for (; body!=tail; ++body) { - (*body)->eval(context); - DAS_PROCESS_LOOP_FLAGS(break); - } - } else { - DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); } } loopend:; @@ -680,14 +724,10 @@ namespace das while ( cond->evalBool(context) && !context.stopFlags ) { SimNode ** __restrict body = list; loopbegin:; - if (body!=tail) { - for (; body!=tail; ++body) { - DAS_SINGLE_STEP(context,(*body)->debugInfo,true); - (*body)->eval(context); - DAS_PROCESS_LOOP_FLAGS(break); - } - } else { - DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + DAS_SINGLE_STEP(context,(*body)->debugInfo,true); + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); } } loopend:; @@ -698,6 +738,26 @@ namespace das #endif +#if DAS_ENABLE_KEEPALIVE + vec4f SimNodeKeepAlive_While::eval ( Context & context ) { + DAS_PROFILE_NODE + SimNode ** __restrict tail = list + total; + while ( cond->evalBool(context) && !context.stopFlags ) { + SimNode ** __restrict body = list; + loopbegin:; + DAS_KEEPALIVE_LOOP(&context); + for (; body!=tail; ++body) { + (*body)->eval(context); + DAS_PROCESS_LOOP_FLAGS(break); + } + } + loopend:; + evalFinal(context); + context.stopFlags &= ~EvalFlags::stopForBreak; + return v_zero(); + } +#endif + // Return vec4f SimNode_Return::eval ( Context & context ) { diff --git a/prog/1stPartyLibs/daScript/src/simulate/simulate_visit.cpp b/prog/1stPartyLibs/daScript/src/simulate/simulate_visit.cpp index 77e14a6e3..2e4db9c30 100644 --- a/prog/1stPartyLibs/daScript/src/simulate/simulate_visit.cpp +++ b/prog/1stPartyLibs/daScript/src/simulate/simulate_visit.cpp @@ -71,6 +71,17 @@ namespace das { V_END(); } +#if DAS_ENABLE_KEEPALIVE + + SimNode * SimNode_KeepAlive::visit ( SimVisitor & vis ) { + V_BEGIN(); + V_OP(KeepAlive); + V_SUB(value); + V_END(); + } + +#endif + void SimVisitor::sub ( SimNode ** nodes, uint32_t count, const char * ) { for ( uint32_t t=0; t!=count; ++t ) { nodes[t] = nodes[t]->visit(*this); diff --git a/prog/3rdPartyLibs/Detour/Include/detourTileCache.h b/prog/3rdPartyLibs/Detour/Include/detourTileCache.h index af1887b08..4e0ad9c82 100644 --- a/prog/3rdPartyLibs/Detour/Include/detourTileCache.h +++ b/prog/3rdPartyLibs/Detour/Include/detourTileCache.h @@ -63,7 +63,11 @@ struct dtObstacleOrientedBox float angle; }; +#if _TARGET_PC static const int DT_MAX_TOUCHED_TILES = 128; +#else +static const int DT_MAX_TOUCHED_TILES = 8; +#endif struct dtTileCacheObstacle { union diff --git a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp index dcf66da63..0cfc22289 100644 --- a/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp +++ b/prog/3rdPartyLibs/ImGuiColorTextEdit/TextEditor.cpp @@ -2737,7 +2737,7 @@ void TextEditor::ColorizeRange(int from, int to, bool multiline_tokens) int lineLen = min(2000, (int)line.size()); - if (line.size() > buffer.size() + 1) + if (line.size() + 1 > buffer.size()) buffer.resize(line.size() + 1); for (size_t j = 0; j < line.size(); ++j) diff --git a/prog/daNetGame/game/gameEvents.h b/prog/daNetGame/game/gameEvents.h index 44ef12e1a..d831c0399 100644 --- a/prog/daNetGame/game/gameEvents.h +++ b/prog/daNetGame/game/gameEvents.h @@ -36,7 +36,7 @@ class IGenLoad; DECL_GAME_EVENT(EventDoLoadTaggedLocationData, int /*tag*/, IGenLoad * /*crd*/, bool * /*inout_tag_loaded*/) \ DECL_GAME_EVENT(EventDoFinishLocationDataLoad) \ DECL_GAME_EVENT(EventHeroChanged, ecs::EntityId /*new_hero*/) \ - DECL_GAME_EVENT(EventUserLoggedIn, int64_t /*user_id*/) \ + DECL_GAME_EVENT(EventUserLoggedIn, int64_t /*user_id*/, SimpleString /*user_name*/) \ DECL_GAME_EVENT(EventUserLoggedOut) \ DECL_GAME_EVENT(EventUserMMQueueJoined) \ DECL_GAME_EVENT(EventRendinstDestroyed, rendinst::riex_handle_t /* riex_handle*/, TMatrix /*ri_tm*/, BBox3 /*ri_bbox*/) \ diff --git a/prog/daNetGame/game/riDestrES.cpp.inl b/prog/daNetGame/game/riDestrES.cpp.inl index 0b466af55..aed946d69 100644 --- a/prog/daNetGame/game/riDestrES.cpp.inl +++ b/prog/daNetGame/game/riDestrES.cpp.inl @@ -38,6 +38,7 @@ #include "main/gameLoad.h" #include "render/renderer.h" +#include "camera/sceneCam.h" #include "sound/rendinstSound.h" namespace ridestr @@ -350,7 +351,8 @@ void init(bool have_render) { destructables::init(dgs_get_settings()); rendinstdestr::init(is_server() ? &on_ridestr_changed_server : nullptr, true, // - &rendinstdestr::create_tree_rend_inst_destr, &rendinstdestr::remove_tree_rendinst_destr, &rendinstsound::rendinst_tree_sound_cb); + &rendinstdestr::create_tree_rend_inst_destr, &rendinstdestr::remove_tree_rendinst_destr, &rendinstsound::rendinst_tree_sound_cb, + have_render ? +[] { return get_cam_itm().getcol(3); } : nullptr); if (have_render) { diff --git a/prog/daNetGame/main/appProfile.h b/prog/daNetGame/main/appProfile.h index ff54d9afe..512cb8195 100644 --- a/prog/daNetGame/main/appProfile.h +++ b/prog/daNetGame/main/appProfile.h @@ -18,6 +18,7 @@ struct ProfileSettings eastl::string serverSessionId; eastl::string cmdAuthKey; eastl::string userId; + eastl::string userName; int appId = 0; rapidjson::Document matchingInviteData; // not null on dedicated only or in offline mode diff --git a/prog/daNetGame/main/appProfileES.cpp.inl b/prog/daNetGame/main/appProfileES.cpp.inl index 4403f39a1..6e892379e 100644 --- a/prog/daNetGame/main/appProfileES.cpp.inl +++ b/prog/daNetGame/main/appProfileES.cpp.inl @@ -30,6 +30,7 @@ static void load_argv(rapidjson::Document &matchingInviteData) // load on first profile.serverSessionId = dgs_get_argv("session_id", ""); profile.cmdAuthKey = dgs_get_argv("auth_key", ""); profile.userId = dgs_get_argv("user_id", ""); + profile.userName = dgs_get_argv("user_name", "{Local Player}"); if (const char *inv_data = (dedicated::is_dedicated() || DAGOR_DBGLEVEL > 0) ? dgs_get_argv("invite_data") : nullptr) //-V560 { @@ -67,7 +68,11 @@ ProfileSettings &getRW() ProfileSettings const &get() { return getRW(); } -static void app_profile_es_event_handler(const EventUserLoggedIn &evt) { getRW().userId = eastl::to_string(evt.get<0>()); } +static void app_profile_es_event_handler(const EventUserLoggedIn &evt) +{ + getRW().userId = eastl::to_string(evt.get<0>()); + getRW().userName = evt.get<1>(); +} static void app_profile_es_event_handler(const EventUserLoggedOut &) { getRW().userId = ""; } diff --git a/prog/daNetGame/main/watchdogES.cpp.inl b/prog/daNetGame/main/watchdogES.cpp.inl index ca333c1b2..8ad1bdcf4 100644 --- a/prog/daNetGame/main/watchdogES.cpp.inl +++ b/prog/daNetGame/main/watchdogES.cpp.inl @@ -21,7 +21,7 @@ namespace watchdog { #if EA_ASAN_ENABLED || defined(__SANITIZE_ADDRESS__) -static constexpr uint32_t THRESHOLDS_MULTIPLIER = 2; +static constexpr uint32_t THRESHOLDS_MULTIPLIER = 3; #else static constexpr uint32_t THRESHOLDS_MULTIPLIER = 1; #endif diff --git a/prog/daNetGame/net/dedicated/matching.cpp b/prog/daNetGame/net/dedicated/matching.cpp index b9005c738..363a2e341 100644 --- a/prog/daNetGame/net/dedicated/matching.cpp +++ b/prog/daNetGame/net/dedicated/matching.cpp @@ -56,12 +56,7 @@ static void register_room_member(Json::Value const &member_info) static eastl::string find_room_secret() { - if (const char *secret = dgs_get_argv("room_secret")) - if (*secret) - return eastl::string(secret); - if (room_info.isNull()) - return eastl::string(); - return room_info["private"]["room_secret"].asString(); + return !room_info.isNull() ? room_info["private"]["room_secret"].asString() : eastl::string(); } void apply_room_info_on_join(const Json::Value ¶ms) @@ -275,7 +270,13 @@ int64_t get_player_original_group(matching::UserId uid) const Json::Value &get_mode_info() { return room_info["public"]; } -const eastl::string &get_room_secret() { return room_secret; } +const eastl::string &get_room_secret() +{ + if (DAGOR_UNLIKELY(room_secret.empty())) + if (const char *rsec = dgs_get_argv("room_secret"); rsec && *rsec) + room_secret = rsec; + return room_secret; +} int get_room_members_count() { return room_members.size(); } diff --git a/prog/daNetGame/net/userid.cpp b/prog/daNetGame/net/userid.cpp index 4606c4d2d..c886abd70 100644 --- a/prog/daNetGame/net/userid.cpp +++ b/prog/daNetGame/net/userid.cpp @@ -60,11 +60,7 @@ matching::UserId get_user_id() return cachedUserId; } -const char *get_user_name() -{ - const char *username = dgs_get_argv("user_name"); - return username ? username : "{Local Player}"; -} +const char *get_user_name() { return app_profile::get().userName.c_str(); } matching::SessionId get_session_id() { diff --git a/prog/daNetGame/render/world/frameGraphNodes/gbufferNodes.cpp b/prog/daNetGame/render/world/frameGraphNodes/gbufferNodes.cpp index 0ac51dbe8..6e572243d 100644 --- a/prog/daNetGame/render/world/frameGraphNodes/gbufferNodes.cpp +++ b/prog/daNetGame/render/world/frameGraphNodes/gbufferNodes.cpp @@ -290,7 +290,11 @@ dabfg::NodeHandle makeResolveGbufferNode(const char *resolve_pshader_name, registry.readTexture("ssao_tex").atStage(dabfg::Stage::PS_OR_CS).bindToShaderVar("ssao_tex").optional(); registry.read("ssao_sampler").blob().bindToShaderVar("ssao_tex_samplerstate").optional(); // for SSAO&SSR - registry.read("upscale_sampling_tex").texture().atStage(dabfg::Stage::PS_OR_CS).bindToShaderVar("upscale_sampling_tex"); + registry.read("upscale_sampling_tex") + .texture() + .atStage(dabfg::Stage::PS_OR_CS) + .bindToShaderVar("upscale_sampling_tex") + .optional(); auto cameraHndl = registry.readBlob("current_camera").handle(); use_current_camera(registry); diff --git a/prog/daNetGame/render/world/frameGraphNodes/lightingNodes.cpp b/prog/daNetGame/render/world/frameGraphNodes/lightingNodes.cpp index 9a1ecb872..5c021c688 100644 --- a/prog/daNetGame/render/world/frameGraphNodes/lightingNodes.cpp +++ b/prog/daNetGame/render/world/frameGraphNodes/lightingNodes.cpp @@ -57,6 +57,7 @@ eastl::array makeSceneShadowPassNodes() auto volumesHndl = registry.createBlob("scene_shadow_volumes_to_render", dabfg::History::No).handle(); auto updatesHndl = registry.createBlob("scene_shadow_updates", dabfg::History::No).handle(); + registry.readBlob("volfog_token"); return [cameraHndl, volumesHndl, updatesHndl] { auto &wr = *static_cast(get_world_renderer()); diff --git a/prog/daNetGame/render/world/private_worldRenderer.h b/prog/daNetGame/render/world/private_worldRenderer.h index 5962fe751..7efcebd36 100644 --- a/prog/daNetGame/render/world/private_worldRenderer.h +++ b/prog/daNetGame/render/world/private_worldRenderer.h @@ -479,7 +479,11 @@ class WorldRenderer final : public IRenderWorld, public IShadowInfoProvider void removePuddlesInCrater(const Point3 &pos, float radius); void delayedInvalidateAfterHeightmapChange(const BBox3 &box); - virtual void setWorldBBox(const BBox3 &bbox) override { worldBBox = bbox; } + virtual void setWorldBBox(const BBox3 &bbox) override + { + worldBBox = bbox; + additionalBBox.setempty(); + } bool getLandHeight(const Point2 &p, float &ht, Point3 *normal) const; @@ -1200,6 +1204,7 @@ class WorldRenderer final : public IRenderWorld, public IShadowInfoProvider DPoint3 oldWorldPos; BBox3 worldBBox; + BBox3 additionalBBox; SatelliteRenderer satelliteRenderer; diff --git a/prog/daNetGame/render/world/shadowsManager.cpp b/prog/daNetGame/render/world/shadowsManager.cpp index f51809ace..c23c718a3 100644 --- a/prog/daNetGame/render/world/shadowsManager.cpp +++ b/prog/daNetGame/render/world/shadowsManager.cpp @@ -709,6 +709,12 @@ bool ShadowsManager::updateStaticShadowAround(const Point3 &pos, bool update_onl G_ASSERT(staticShadows->cascadesCount() <= MAX_NUM_STATIC_SHADOWS_CASCADES); + if (worldBBoxDirty) + { + staticShadowsSetWorldSize(); + worldBBoxDirty = false; + } + if (always_render_all_cascades) update_only_last_cascade = false; @@ -933,6 +939,8 @@ void ShadowsManager::staticShadowsSetWorldSize() } } +void ShadowsManager::markWorldBBoxDirty() { worldBBoxDirty = true; } + void ShadowsManager::shadowsInvalidate(bool force) { TIME_PROFILE_DEV(shadows_invalidate); diff --git a/prog/daNetGame/render/world/shadowsManager.h b/prog/daNetGame/render/world/shadowsManager.h index 753bc0f76..d602d46a5 100644 --- a/prog/daNetGame/render/world/shadowsManager.h +++ b/prog/daNetGame/render/world/shadowsManager.h @@ -87,6 +87,7 @@ class ShadowsManager final : public ICascadeShadowsClient void combineShadows(); void staticShadowsSetWorldSize(); + void markWorldBBoxDirty(); void restoreShadowSampler(); void initVisibilityNode(); @@ -204,6 +205,7 @@ class ShadowsManager final : public ICascadeShadowsClient float staticShadowMaxUpdateAmount = 0.1; bool staticShadowUniformUpdate = false; + bool worldBBoxDirty = false; eastl::unique_ptr staticShadows; dabfg::NodeHandle staticShadowRenderNode; bool staticShadowsSetShaderVars = false; diff --git a/prog/daNetGame/render/world/shadowsManagerES.cpp.gen.es.cpp b/prog/daNetGame/render/world/shadowsManagerES.cpp.gen.es.cpp index 703b8a23c..6c2b5c8d2 100644 --- a/prog/daNetGame/render/world/shadowsManagerES.cpp.gen.es.cpp +++ b/prog/daNetGame/render/world/shadowsManagerES.cpp.gen.es.cpp @@ -31,6 +31,37 @@ static ecs::EntitySystemDesc shadows_settings_tracking_es_es_desc ecs::EventSetBuilder::build(), 0 ,nullptr,"render_settings__combinedShadows,render_settings__forwardRendering,render_settings__ssssQuality,render_settings__waterQuality",nullptr,"ssss_settings_tracking_es"); +static constexpr ecs::ComponentDesc update_world_bbox_es_comps[] = +{ +//start of 3 ro components at [0] + {ECS_HASH("transform"), ecs::ComponentTypeInfo()}, + {ECS_HASH("ri_extra__bboxMin"), ecs::ComponentTypeInfo()}, + {ECS_HASH("ri_extra__bboxMax"), ecs::ComponentTypeInfo()} +}; +static void update_world_bbox_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +{ + auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do + update_world_bbox_es(evt + , ECS_RO_COMP(update_world_bbox_es_comps, "transform", TMatrix) + , ECS_RO_COMP(update_world_bbox_es_comps, "ri_extra__bboxMin", Point3) + , ECS_RO_COMP(update_world_bbox_es_comps, "ri_extra__bboxMax", Point3) + ); + while (++comp != compE); +} +static ecs::EntitySystemDesc update_world_bbox_es_es_desc +( + "update_world_bbox_es", + "prog/daNetGame/render/world/shadowsManagerES.cpp.inl", + ecs::EntitySystemOps(nullptr, update_world_bbox_es_all_events), + empty_span(), + make_span(update_world_bbox_es_comps+0, 3)/*ro*/, + empty_span(), + empty_span(), + ecs::EventSetBuilder::build(), + 0 +,nullptr,nullptr,nullptr,"rendinst_move_es_event_handler,rendinst_with_handle_move_es_event_handler"); static constexpr ecs::ComponentDesc use_rgba_fmt_ecs_query_comps[] = { //start of 1 ro components at [0] diff --git a/prog/daNetGame/render/world/shadowsManagerES.cpp.inl b/prog/daNetGame/render/world/shadowsManagerES.cpp.inl index e9441adab..2292c59c1 100644 --- a/prog/daNetGame/render/world/shadowsManagerES.cpp.inl +++ b/prog/daNetGame/render/world/shadowsManagerES.cpp.inl @@ -9,6 +9,8 @@ #include #include #include "ssss.h" +#include +#include template inline void shadows_init_ecs_query(ecs::EntityId eid, Callable c); @@ -51,4 +53,15 @@ void combined_shadows_bind_additional_textures(dabfg::Registry ®istry) for (const ecs::string samplerName : combined_shadows__additional_samplers) registry.read(samplerName.c_str()).blob().bindToShaderVar(samplerName.c_str()); }); -} \ No newline at end of file +} + +ECS_ON_EVENT(on_appear, EventRendinstsLoaded) +ECS_AFTER(rendinst_move_es_event_handler) +ECS_AFTER(rendinst_with_handle_move_es_event_handler) +static void update_world_bbox_es( + const ecs::Event &, const TMatrix &transform, const Point3 &ri_extra__bboxMin, const Point3 ri_extra__bboxMax) +{ + BBox3 worldSpaceBBox = transform * BBox3(ri_extra__bboxMin, ri_extra__bboxMax); + WRDispatcher::updateWorldBBox(worldSpaceBBox); + WRDispatcher::getShadowsManager().markWorldBBoxDirty(); +} diff --git a/prog/daNetGame/render/world/worldRenderer.cpp b/prog/daNetGame/render/world/worldRenderer.cpp index e2e7150bb..1b0cca55c 100644 --- a/prog/daNetGame/render/world/worldRenderer.cpp +++ b/prog/daNetGame/render/world/worldRenderer.cpp @@ -793,8 +793,6 @@ void WorldRenderer::onLevelLoaded(const DataBlock &level_blk) } shadowsManager.shadowsInvalidate(true); shadowsManager.staticShadowsAdditionalHeight = level_blk.getReal("staticShadowsAdditionalHeight", 0.f); - // TODO figure out how to calculate static shadow box exactly. - shadowsManager.staticShadowsAdditionalHeight += 200; shadowsManager.staticShadowsSetWorldSize(); updateDistantHeightmap(); @@ -6770,14 +6768,18 @@ void WorldRenderer::closeShoreAndWaterFlowmap() BBox3 WorldRenderer::getWorldBBox3() const { - if (!worldBBox.isempty()) - return worldBBox; - BBox3 b; - if (!binSceneBbox.isempty()) - b += binSceneBbox; - if (lmeshMgr) - b += lmeshMgr->getBBoxWithHMapWBBox(); - return b; + BBox3 result = [this]() { + if (!worldBBox.isempty()) + return worldBBox; + BBox3 b; + if (!binSceneBbox.isempty()) + b += binSceneBbox; + if (lmeshMgr) + b += lmeshMgr->getBBoxWithHMapWBBox(); + return b; + }(); + result += additionalBBox; + return result; } void WorldRenderer::getMinMaxZ(float &minHt, float &maxHt) const @@ -7673,6 +7675,13 @@ bool WRDispatcher::shouldHideGui() return wr && wr->applySettingsAfterResetDevice && wr->needSeparatedUI(); } +void WRDispatcher::updateWorldBBox(const BBox3 &additional_bbox) +{ + auto *wr = static_cast(get_world_renderer()); + G_ASSERTF_RETURN(wr != nullptr, , WR_WAS_NULL_ERR_MSG); + wr->additionalBBox += additional_bbox; +} + ECS_REGISTER_EVENT(AfterRenderWorld) ECS_REGISTER_EVENT(AfterRenderPostFx) ECS_REGISTER_EVENT(RenderPostFx) diff --git a/prog/daNetGame/render/world/wrDispatcher.h b/prog/daNetGame/render/world/wrDispatcher.h index fb7020029..1583b8912 100644 --- a/prog/daNetGame/render/world/wrDispatcher.h +++ b/prog/daNetGame/render/world/wrDispatcher.h @@ -50,4 +50,5 @@ struct WRDispatcher static eastl::optional getHmapDeformRect(); static void getMinMaxZ(float &min, float &max); static bool shouldHideGui(); + static void updateWorldBBox(const BBox3 &additional_bbox); }; diff --git a/prog/daNetGame/scripts/stubs/gameevents b/prog/daNetGame/scripts/stubs/gameevents index 9bf001851..f2aeec171 100644 --- a/prog/daNetGame/scripts/stubs/gameevents +++ b/prog/daNetGame/scripts/stubs/gameevents @@ -16,7 +16,9 @@ return { CmdSwapEquipSlots = class {name = "CmdSwapEquipSlots"} EventRiExtraDestroyed = class {name = "EventRiExtraDestroyed"} CmdTeleportTo = class {name = "CmdTeleportTo"} - EventUserLoggedIn = class {name = "EventUserLoggedIn"} + EventUserLoggedIn = class {name = "EventUserLoggedIn" + constructor(...){} + } EventUserLoggedOut = class {name = "EventUserLoggedOut"} EventUserMMQueueJoined = class {name = "EventUserMMQueueJoined"} } diff --git a/prog/daNetGame/shaders/_build/raytracing.blk b/prog/daNetGame/shaders/_build/raytracing.blk index a44aaef7f..477793556 100644 --- a/prog/daNetGame/shaders/_build/raytracing.blk +++ b/prog/daNetGame/shaders/_build/raytracing.blk @@ -10,6 +10,7 @@ include "../../../../prog/gameLibs/render/rtr/shaders/build.blk" file:t = "../../../../prog/gameLibs/bvh/shaders/bvh_process_impostor_vertices.dshl" file:t = "../../../../prog/gameLibs/bvh/shaders/bvh_process_bake_texture_to_vertices.dshl" file:t = "../../../../prog/gameLibs/bvh/shaders/bvh_process_tree_vertices.dshl" + file:t = "../../../../prog/gameLibs/bvh/shaders/bvh_process_flag_vertices.dshl" } "@override:Compile" { diff --git a/prog/daNetGame/shaders/_build/shaders_tools11.blk b/prog/daNetGame/shaders/_build/shaders_tools11.blk index 391f5514b..986763481 100644 --- a/prog/daNetGame/shaders/_build/shaders_tools11.blk +++ b/prog/daNetGame/shaders/_build/shaders_tools11.blk @@ -17,6 +17,7 @@ source file:t = "../no_postfx_resolve.dshl" file:t = "pack_impostor_texture.dshl" file:t = "../../../prog/gameLibs/vr/shaders/vrGuiSurface.dshl" + file:t = "ssr_ps.dshl" include shadersList.blk } common_valid_variants { diff --git a/prog/daNetGame/shaders/contact_shadows.dshl b/prog/daNetGame/shaders/contact_shadows.dshl index bc1a2957d..01d661874 100644 --- a/prog/daNetGame/shaders/contact_shadows.dshl +++ b/prog/daNetGame/shaders/contact_shadows.dshl @@ -4,6 +4,7 @@ float4 projtm_psf_2; float4 projtm_psf_3; int shadow_frame = 0; float contact_shadow_len = 0.2; +float contact_shadow_step_offset = 0.2; macro CONTACT_SHADOWS_BASE(code) (code) { projectionMatrix@f44 = {projtm_psf_0, projtm_psf_1, projtm_psf_2, projtm_psf_3}; } diff --git a/prog/daNetGame/shaders/deferred_shadow_classify_tiles.dshl b/prog/daNetGame/shaders/deferred_shadow_classify_tiles.dshl index 73e5d9dfb..9163d8cfa 100644 --- a/prog/daNetGame/shaders/deferred_shadow_classify_tiles.dshl +++ b/prog/daNetGame/shaders/deferred_shadow_classify_tiles.dshl @@ -128,7 +128,10 @@ shader deferred_shadow_classify_tiles { uint2 tileCoords = Groupid.xy; uint2 cornerPixCoords = tileCoords * RESOLVE_GBUFFER_TILE_SIZE + GTid.xy * 2; - uint featureBits = get_feature_bits_for_range(tileCoords, get_raw_depth_range_2x2(cornerPixCoords)); + uint featureBits = 0; + BRANCH + if (all(cornerPixCoords < uint2(rendering_res.xy))) + featureBits = get_feature_bits_for_range(tileCoords, get_raw_depth_range_2x2(cornerPixCoords)); if (GI < 1) g_shared_feature_bits = 0; diff --git a/prog/daNetGame/shaders/draw_indirect_buffer_layout.dshl b/prog/daNetGame/shaders/draw_indirect_buffer_layout.dshl new file mode 100644 index 000000000..bf4c17dcb --- /dev/null +++ b/prog/daNetGame/shaders/draw_indirect_buffer_layout.dshl @@ -0,0 +1,34 @@ +include "shader_global.dshl" +include "hardware_defines.dshl" + +macro USE_DRAW_INDIRECT_BUFFER_LAYOUT() + // Layout of: + // struct DrawIndexedIndirectArgs + // { + // uint extraArgument; // only for dx12 + // uint indexCountPerInstance; + // uint instanceCount; + // uint startIndexLocation; + // int baseVertexLocation; + // uint startInstanceLocation; + // }; + + if (hardware.dx12) + { + hlsl { + #define INDEX_COUNT_PER_INSTANCE 1 + #define INSTANCE_COUNT_OFFSET 2 + #define START_INSTANCE_LOCATION_OFFSET 5 + #define DRAW_INDIRECT_ARGS_SIZEOF 6 + } + } + else + { + hlsl { + #define INDEX_COUNT_PER_INSTANCE 0 + #define INSTANCE_COUNT_OFFSET 1 + #define START_INSTANCE_LOCATION_OFFSET 4 + #define DRAW_INDIRECT_ARGS_SIZEOF 5 + } + } +endmacro \ No newline at end of file diff --git a/prog/daNetGame/shaders/film_grain_inc.dshl b/prog/daNetGame/shaders/film_grain_inc.dshl index 72c9c9887..2e2ed6e50 100644 --- a/prog/daNetGame/shaders/film_grain_inc.dshl +++ b/prog/daNetGame/shaders/film_grain_inc.dshl @@ -55,6 +55,10 @@ macro USE_FILM_GRAIN() float grain_inv_pitch = film_grain_params.z; float grain_phase = film_grain_params.w; + // Previosly it's was applied on SDR then moved to HDR + // So this coeff to presafe same settings + grain_strength *= 0.25; + float rg = grain_source(float3(uvs, floor(grain_rate * (grain_phase))), grain_strength, grain_inv_pitch); float gg = grain_source(float3(uvs, floor(grain_rate * (grain_phase + 9.0))), grain_strength, grain_inv_pitch); float bg = grain_source(float3(uvs, floor(grain_rate * (grain_phase - 9.0))), grain_strength, grain_inv_pitch); diff --git a/prog/daNetGame/shaders/heightmap.dshl b/prog/daNetGame/shaders/heightmap.dshl index b5c9fdcd4..46f36e8c3 100644 --- a/prog/daNetGame/shaders/heightmap.dshl +++ b/prog/daNetGame/shaders/heightmap.dshl @@ -533,7 +533,11 @@ shader heightmap GBUFFER_OUTPUT output = encode_gbuffer(result, pointToEye, GET_SCREEN_POS(input.pos)); ##if lmesh_rendering_mode == rendering_reflection - output.color.rgb = apply_fog(output.color.rgb, pointToEye); + // note: it won't work on mobile as-is + half3 add,loss; + get_fog(pointToEye.xyz, loss, add); + add = pack_hdr(add); + output.color.rgb = output.color.rgb*loss + add; ##endif return output; } diff --git a/prog/daNetGame/shaders/land_aces.dshl b/prog/daNetGame/shaders/land_aces.dshl index 47d7c5b26..b94de121e 100644 --- a/prog/daNetGame/shaders/land_aces.dshl +++ b/prog/daNetGame/shaders/land_aces.dshl @@ -326,7 +326,11 @@ shader land_mesh//, land_mesh_combined GBUFFER_OUTPUT output = encode_gbuffer(result, input.pointToEye, GET_SCREEN_POS(input.pos)); ##if lmesh_rendering_mode == rendering_reflection - output.color.rgb = apply_fog(output.color.rgb, input.pointToEye.xyz); + // note: it won't work on mobile as-is + half3 add,loss; + get_fog( input.pointToEye.xyz, loss, add); + add = pack_hdr(add); + output.color.rgb = output.color.rgb*loss + add; ##endif return output; } diff --git a/prog/daNetGame/shaders/postfx.dshl b/prog/daNetGame/shaders/postfx.dshl index 3c46cf83b..99be3d983 100644 --- a/prog/daNetGame/shaders/postfx.dshl +++ b/prog/daNetGame/shaders/postfx.dshl @@ -415,8 +415,11 @@ shader postfx return c; } - void apply_cinematic_mode_pre_tonemap_effects(inout float3 result, float2 tc) + void apply_cinematic_mode_pre_tonemap_effects(inout float3 result, float2 tc, float2 pos) { + BRANCH + if (film_grain_params.x > 0.0) + result = apply_film_grain(result, pos); ##if cinematic_mode_on == on BRANCH if (flare_params.x > 0.0 || flare_params.y > 0.0) @@ -424,12 +427,9 @@ shader postfx ##endif } - void apply_cinematic_mode_post_tonemap_effects(inout float3 result, float2 tc, float2 pos) + void apply_cinematic_mode_post_tonemap_effects(inout float3 result, float2 tc) { BRANCH - if (film_grain_params.x > 0.0) - result = apply_film_grain(result, pos); - BRANCH if (vignette_strength.x > 0.0) result = apply_vignette(result, tc); } @@ -545,13 +545,13 @@ shader postfx half3 result = common_postfx(frame, input.tc, get_local_exposure(frame, input.tc)); apply_post_bloom_effects(input.tc, result); - apply_cinematic_mode_pre_tonemap_effects(result, input.tc); + apply_cinematic_mode_pre_tonemap_effects(result, input.tc, pos.xy); POSTFX_OUTPUT ret; ##if (hdr_ps_output_mode != sdr_only) float3 hdr_result = performLUTColorGrade(result); - apply_cinematic_mode_post_tonemap_effects(hdr_result, input.tc, pos.xy); + apply_cinematic_mode_post_tonemap_effects(hdr_result, input.tc); apply_postfx_post_tonemap_effects_modifiers(hdr_result, input.tc, pos.xy); BRANCH if (fsr_on == 1) @@ -563,7 +563,7 @@ shader postfx ##if (hdr_ps_output_mode == sdr_only) || (hdr_ps_output_mode == hdr10_and_sdr) float3 sdr_result = performLUTTonemap(result); sdr_result = apply_shader_gamma(sdr_result); - apply_cinematic_mode_post_tonemap_effects(sdr_result, input.tc, pos.xy); + apply_cinematic_mode_post_tonemap_effects(sdr_result, input.tc); apply_postfx_post_tonemap_effects_modifiers(sdr_result, input.tc, pos.xy); ret.sdr_result = half4(sdr_result, 1); ##endif diff --git a/prog/daNetGame/shaders/rendinst_clipmap.dshl b/prog/daNetGame/shaders/rendinst_clipmap.dshl index a2fd10087..20cf60371 100644 --- a/prog/daNetGame/shaders/rendinst_clipmap.dshl +++ b/prog/daNetGame/shaders/rendinst_clipmap.dshl @@ -123,6 +123,7 @@ shader rendinst_clipmap, rendinst_landclass static float max_tessellation_quality = 30 no_warnings; static float max_dispacement_distance = 30 no_warnings; static float min_dispacement_distance = 8 no_warnings; + static float tessellation_transition_distance = 1.0 no_warnings; } else { @@ -131,6 +132,7 @@ shader rendinst_clipmap, rendinst_landclass static float max_tessellation_quality = 30 no_warnings; static float max_dispacement_distance = 16 no_warnings; static float min_dispacement_distance = 0 no_warnings; + static float tessellation_transition_distance = 1.0 no_warnings; } bool global_tessellation_enabled = (in_editor_assume == yes && object_tess_factor == object_tess_factor_on) || (in_editor_assume != yes && hmap_object_tess_factor == hmap_object_tess_factor_on); @@ -624,6 +626,6 @@ shader rendinst_clipmap, rendinst_landclass } } - USE_PN_TRIANGULATION(camera_base_offset) + USE_PN_TRIANGULATION(camera_base_offset, get_min_displacement_distance(), get_max_dispacement_distance(), get_tessellation_transition_distance()) } } diff --git a/prog/daNetGame/shaders/rendinst_simple_inc.dshl b/prog/daNetGame/shaders/rendinst_simple_inc.dshl index cacb7a62b..5c72dfd94 100644 --- a/prog/daNetGame/shaders/rendinst_simple_inc.dshl +++ b/prog/daNetGame/shaders/rendinst_simple_inc.dshl @@ -40,6 +40,10 @@ macro INIT_COMMON_RENDINST_TESSELLATION() static float4 rendinst_displacement_lod = (0, 0, 0, 0) no_warnings; static float4 rendinst_displacement_mod = (1, 1, 0.75, 0.25) no_warnings; // 4 packed multipliers .x - trunc, .yzw - branches static float max_tessellation_factor = 10 no_warnings; + static float min_tessellation_distance = 2.0 no_warnings; + static float max_tessellation_distance = 2.0 no_warnings; + static float tessellation_transition_distance = 1.0 no_warnings; + static float tessellation_max_edge_length = 0.024 no_warnings; bool pn_triangulation_enabled = (object_tess_factor == object_tess_factor_on && material_pn_triangulation != off && @@ -57,6 +61,10 @@ macro INIT_COMMON_RENDINST_TESSELLATION() { max_tessellation_factor@f1 = max_tessellation_factor; material_pn_triangulation@i1 = material_pn_triangulation; + min_tessellation_distance@f1 = min_tessellation_distance; + max_tessellation_distance@f1 = max_tessellation_distance; + tessellation_transition_distance@f1 = tessellation_transition_distance; + tessellation_max_edge_length@f1 = tessellation_max_edge_length; } hlsl(ds) { @@ -164,7 +172,7 @@ endmacro macro USE_COMMON_RENDINST_TESSELLATION() if (pn_triangulation_enabled) { - USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(camera_base_offset, get_max_tessellation_factor()) + USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(camera_base_offset, get_max_tessellation_factor(), get_tessellation_max_edge_length(), get_min_tessellation_distance(), get_max_tessellation_distance(), get_tessellation_transition_distance()) } endmacro diff --git a/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl b/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl index f43db3daa..1c3994877 100644 --- a/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl +++ b/prog/daNetGame/shaders/rendinst_tree_perlin_layered.dshl @@ -48,6 +48,10 @@ shader rendinst_tree_perlin_layered static float4 rendinst_displacement_lod = (0, 0, 0, 0) no_warnings; static float4 rendinst_displacement_mod = (1, 1, 0.75, 0.25) no_warnings; // 4 packed multipliers .x - trunc, .yzw - branches static float max_tessellation_factor = 10 no_warnings; + static float min_tessellation_distance = 2.0 no_warnings; + static float max_tessellation_distance = 12.0 no_warnings; + static float tessellation_transition_distance = 1.0 no_warnings; + static float tessellation_max_edge_length = 0.024 no_warnings; bool pn_triangulation_enabled = (object_tess_factor == object_tess_factor_on && material_pn_triangulation != off && @@ -616,6 +620,10 @@ shader rendinst_tree_perlin_layered (vs) { max_tessellation_factor@f1 = (max_tessellation_factor); + min_tessellation_distance@f1 = min_tessellation_distance; + max_tessellation_distance@f1 = max_tessellation_distance; + tessellation_transition_distance@f1 = tessellation_transition_distance; + tessellation_max_edge_length@f1 = tessellation_max_edge_length; } if (material_pn_triangulation == displacement) { @@ -727,6 +735,6 @@ shader rendinst_tree_perlin_layered } } - USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(camera_base_offset, get_max_tessellation_factor()) + USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(camera_base_offset, get_max_tessellation_factor(), get_tessellation_max_edge_length(), get_min_tessellation_distance(), get_max_tessellation_distance(), get_tessellation_transition_distance()) } } diff --git a/prog/daNetGame/shaders/shader_global.dshl b/prog/daNetGame/shaders/shader_global.dshl index 1b9ae4e46..460f25838 100644 --- a/prog/daNetGame/shaders/shader_global.dshl +++ b/prog/daNetGame/shaders/shader_global.dshl @@ -545,6 +545,8 @@ macro USE_COMPAT_HDR_WRITE_BASE(code, exposure_name) #if !HAS_HDR_DEFINED #define HAS_HDR_DEFINED 1 half get_exposure_mul() {return exposure_name;} + + half3 pack_hdr(half3 a) {return a * get_exposure_mul();} #endif } endmacro diff --git a/prog/daNetGame/shaders/water_3d_ssr.dshl b/prog/daNetGame/shaders/water_3d_ssr.dshl index bf4dcb061..3dfcc9072 100644 --- a/prog/daNetGame/shaders/water_3d_ssr.dshl +++ b/prog/daNetGame/shaders/water_3d_ssr.dshl @@ -41,6 +41,11 @@ shader water_ssr_nv2, water_ssr_nv2_heightmap INIT_READ_GBUFFER_MATERIAL_DYNAMIC() USE_READ_GBUFFER_MATERIAL_DYNAMIC() + USE_BRUNETON_FOG() + + INIT_HDR(ps) + USE_HDR(ps) + local float4 water_reflection_tex_dimensions = get_dimensions(water_reflection_tex, 0); if (shader == water_ssr_nv2 && water_planar_reflection_terrain != NULL) { @@ -361,6 +366,22 @@ shader water_ssr_nv2, water_ssr_nv2_heightmap float fade = w / zn_zfar.y; objectReflection = float4(planarColor, 1-fade); } + else // use padding on the edges of non-zero reflections to avoid upscaling artefacts in later stages + { + float3 maxColor = 0; + UNROLL for (int y = -1; y <= 1; ++y) + UNROLL for (int x = -1; x <= 1; ++x) + { + if (x == 0 && y == 0) // center has zero color and depth + continue; + float2 tc = reflectionTC + float2(x, y) * water_reflection_tex_res.zw; + float3 planarColor = tex2Dlod(water_planar_reflection_terrain, float4(tc + reflDistortionVector, 0, 0)).rgb; + // technically, the color with the closest depth should be used, but this is a good approximation (color is 0 if depth is 0) + maxColor = max(maxColor, planarColor); + } + FLATTEN if (any(maxColor > 0)) + objectReflection = float4(maxColor, 0); + } } ##endif } @@ -373,6 +394,15 @@ shader water_ssr_nv2, water_ssr_nv2_heightmap float2 alpha__strength : SV_Target1; }; + void applyFogToReflection(float2 screen_tc, float dist, inout float3 color) + { + half3 add,loss; + float3 view = normalize(getViewVecOptimized(screen_tc)); + get_bruneton_fog(view, dist, loss, add); + add = pack_hdr(add); + color = color*loss + add; + } + WaterOutput water_nv_ps(PS_INPUT In HW_USE_SCREEN_POS INPUT_VFACE) { bool hasData; @@ -457,6 +487,7 @@ shader water_ssr_nv2, water_ssr_nv2_heightmap { float rayHitDist = 0; get_alternate_reflections(newTarget, rayHitDist, screenpos.xy, reflect(-pointToEye, worldNormal), cameraToPoint, worldNormal, false, false); + applyFogToReflection(refractionTC, rayHitDist, newTarget.rgb); } bool discardHistory = offscreen || (isGbufferDynamic(oldUv) && (prevScreen.z < sample_close_depth_tex(oldUv, 0))) || force_ignore_history > 0; diff --git a/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl b/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl index ce3bc6273..db5f2edc1 100644 --- a/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl +++ b/prog/daNetGameLibs/blood_puddles/private/shaders/blood_puddles.dshl @@ -7,9 +7,9 @@ interval special_vision : special_vision_off<1, thermal_vision; texture perlin_noise3d; float blood_puddle_depth = 0.03; -float blood_puddle_reflectance = 0.3; -float blood_puddle_smoothness = 1.0; -float blood_puddle_smoothness_edge = 0.9; +float blood_puddle_reflectance = 0.3 always_referenced; +float blood_puddle_smoothness = 1.0 always_referenced; +float blood_puddle_smoothness_edge = 0.9 always_referenced; float4 blood_puddle_high_intensity_color = (0.157, 0.012, 0.000, 1.000); float4 blood_puddle_low_intensity_color = (0.086, 0.024, 0.020, 0.960); float4 blood_decals_atlas_size = (1, 1, 0, 0); diff --git a/prog/daNetGameLibs/motion_matching/animation/animation_clip.h b/prog/daNetGameLibs/motion_matching/animation/animation_clip.h index cb749cb38..55aeedfa1 100644 --- a/prog/daNetGameLibs/motion_matching/animation/animation_clip.h +++ b/prog/daNetGameLibs/motion_matching/animation/animation_clip.h @@ -53,8 +53,8 @@ struct AnimationClip bool looped; bool inPlaceAnimation; const AnimV20::AnimData *animation; - using Point3Channel = eastl::pair; - using QuaternionChannel = eastl::pair; + using Point3Channel = eastl::pair; + using QuaternionChannel = eastl::pair; dag::Vector channelTranslation; dag::Vector channelRotation; dag::Vector channelScale; diff --git a/prog/daNetGameLibs/motion_matching/animation/animation_sampling.cpp b/prog/daNetGameLibs/motion_matching/animation/animation_sampling.cpp index 1e919526e..3fc353787 100644 --- a/prog/daNetGameLibs/motion_matching/animation/animation_sampling.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/animation_sampling.cpp @@ -18,23 +18,19 @@ void set_identity(NodeTSRFixedArray &nodes, const GeomNodeTree &tree) void sample_animation(float t, const AnimationClip &clip, NodeTSRFixedArray &nodes) { - int a2dTime = t * AnimV20::TIME_TicksPerSec; + AnimV20Math::PrsAnimSampler sampler(clip.animation, t); - float keyT; for (const AnimationClip::Point3Channel &translation : clip.channelTranslation) { - const AnimV20::AnimKeyPoint3 *key = translation.first->findKey(a2dTime, &keyT); - nodes[translation.second.index()].set_translation(keyT > 0 ? AnimV20Math::interp_key(key[0], v_splats(keyT)) : key[0].p); + nodes[translation.second.index()].set_translation(sampler.samplePos(translation.first)); } for (const AnimationClip::QuaternionChannel &rotation : clip.channelRotation) { - const AnimV20::AnimKeyQuat *key = rotation.first->findKey(a2dTime, &keyT); - nodes[rotation.second.index()].set_rotation(keyT > 0 ? AnimV20Math::interp_key(key[0], key[1], keyT) : key[0].p); + nodes[rotation.second.index()].set_rotation(sampler.sampleRot(rotation.first)); } for (const AnimationClip::Point3Channel &scale : clip.channelScale) { - const AnimV20::AnimKeyPoint3 *key = scale.first->findKey(a2dTime, &keyT); - nodes[scale.second.index()].set_scale(keyT > 0 ? AnimV20Math::interp_key(key[0], v_splats(keyT)) : key[0].p); + nodes[scale.second.index()].set_scale(sampler.sampleScl(scale.first)); } if (clip.inPlaceAnimation) { diff --git a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp index aea1810ba..430584f6c 100644 --- a/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/inertial_blending.cpp @@ -54,20 +54,6 @@ void inertialize_pose_update(BoneInertialInfo &result, } } -static vec3f get_key(const AnimV20::AnimChanPoint3 *channel, int time) -{ - float keyT; - const AnimV20::AnimKeyPoint3 *key = channel->findKey(time, &keyT); - return keyT > 0 ? AnimV20Math::interp_key(key[0], v_splats(keyT)) : key[0].p; -} - -static vec3f get_key(const AnimV20::AnimChanQuat *channel, int time) -{ - float keyT; - const AnimV20::AnimKeyQuat *key = channel->findKey(time, &keyT); - return keyT > 0 ? AnimV20Math::interp_key(key[0], key[1], keyT) : key[0].p; -} - void apply_root_motion_correction(float t, const AnimationClip &clip, dag::Index16 root_idx, @@ -98,17 +84,21 @@ void extract_frame_info(float t, eastl::bitvector &position_dirty, eastl::bitvector &rotation_dirty) { - constexpr int TIME_TicksPerSec = AnimV20::TIME_TicksPerSec >> AnimV20::TIME_SubdivExp; + constexpr int TIME_FramesPerSec = AnimV20::TIME_TicksPerSec >> AnimV20::TIME_SubdivExp; int a2dTime1 = t * AnimV20::TIME_TicksPerSec; - int a2dTime2 = a2dTime1 + AnimV20::TIME_TicksPerSec / TIME_TicksPerSec; + int a2dTime2 = a2dTime1 + AnimV20::TIME_TicksPerSec / TIME_FramesPerSec; + + vec4f dtInv = v_safediv(V_C_ONE, v_splats(TIME_FramesPerSec)); - vec4f dtInv = v_safediv(V_C_ONE, v_splats(TIME_TicksPerSec)); + AnimV20Math::PrsAnimSampler sampler(clip.animation); for (const AnimationClip::Point3Channel &channel : clip.channelTranslation) { - vec3f p1 = get_key(channel.first, a2dTime1); - vec3f p2 = get_key(channel.first, a2dTime2); + sampler.seekTicks(a2dTime1); + vec3f p1 = sampler.samplePos(channel.first); + sampler.seekTicks(a2dTime2); + vec3f p2 = sampler.samplePos(channel.first); int nodeIdx = channel.second.index(); info.position[nodeIdx] = p1; @@ -118,8 +108,10 @@ void extract_frame_info(float t, for (const AnimationClip::QuaternionChannel &channel : clip.channelRotation) { - quat4f r1 = get_key(channel.first, a2dTime1); - quat4f r2 = get_key(channel.first, a2dTime2); + sampler.seekTicks(a2dTime1); + vec3f r1 = sampler.sampleRot(channel.first); + sampler.seekTicks(a2dTime2); + vec3f r2 = sampler.sampleRot(channel.first); int nodeIdx = channel.second.index(); info.rotation[nodeIdx] = r1; diff --git a/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp b/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp index f81486e15..758a7387f 100644 --- a/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/load_animation_data_base.cpp @@ -35,31 +35,27 @@ static Tags get_tags(const OAHashNameMap &tagsMap, const char *tags) return tagMask; } -template -static int max_time_chan(const AnimV20::AnimChan &chan) -{ - return chan.keyNum ? chan.keyTimeLast() : 0; -} static int anim_max_time(const AnimV20::AnimData::Anim &anim) { - int time = max(max_time_chan(anim.originLinVel), max_time_chan(anim.originAngVel)); - for (int j = 0, k = anim.pos.nodeNum; j < k; j++) - time = max(time, max_time_chan(anim.pos.nodeAnim[j])); - for (int j = 0, k = anim.rot.nodeNum; j < k; j++) - time = max(time, max_time_chan(anim.rot.nodeAnim[j])); - for (int j = 0, k = anim.scl.nodeNum; j < k; j++) - time = max(time, max_time_chan(anim.scl.nodeAnim[j])); + int time = max(anim.originLinVel.keyTimeLast(), anim.originAngVel.keyTimeLast()); + time = max(time, anim.pos.keyTimeLast()); + time = max(time, anim.rot.keyTimeLast()); + time = max(time, anim.scl.keyTimeLast()); return time; } -template -static const T *find_anim_channel(const eastl::string &channel_name, const AnimV20::AnimDataChan &chan) +static dag::Index16 find_anim_channel(const eastl::string &channel_name, const AnimV20::AnimDataChan &chan) { for (int i = 0, n = chan.nodeNum; i < n; i++) if (!strcmp(chan.nodeName[i].get(), channel_name.c_str())) - return &chan.nodeAnim[i]; - return nullptr; + { + auto id = dag::Index16(i); + if (!chan.hasKeys(id)) + return dag::Index16(); + return id; + } + return dag::Index16(); } constexpr int a2dtimeConversion = 2 * 256; @@ -81,18 +77,18 @@ static void copy_animation(const AnimV20::AnimData &anim_data, AnimationClip &cl if (weight <= 0.f) continue; clip.nodeMask[nodeIdx.index()] = weight; - const auto *pos = find_anim_channel(name, anim_data.anim.pos); - if (pos && pos->keyNum > 0) + auto pos = find_anim_channel(name, anim_data.anim.pos); + if (pos) { clip.channelTranslation.push_back({pos, nodeIdx}); } - const auto *rot = find_anim_channel(name, anim_data.anim.rot); - if (rot && rot->keyNum > 0) + auto rot = find_anim_channel(name, anim_data.anim.rot); + if (rot) { clip.channelRotation.push_back({rot, nodeIdx}); } - const auto *scl = find_anim_channel(name, anim_data.anim.scl); - if (scl && scl->keyNum > 0) + auto scl = find_anim_channel(name, anim_data.anim.scl); + if (scl) { clip.channelScale.push_back({scl, nodeIdx}); } @@ -103,18 +99,19 @@ static void load_and_validate_root_scale(AnimationClip &clip, dag::Index16 root_ { clip.rootScale = V_C_UNIT_1110; bool valid = true; + AnimV20Math::PrsAnimSampler sampler(clip.animation); for (const AnimationClip::Point3Channel &nodeScale : clip.channelScale) { - vec3f scale = nodeScale.first->key[0].p; + sampler.seekTicks(0); + vec3f scale = sampler.sampleScl(nodeScale.first); if (nodeScale.second == root_node) clip.rootScale = scale; else valid &= v_extract_x(v_length3_sq_x(v_sub(scale, V_C_ONE))) < 0.001; - for (int i = 1, ie = nodeScale.first->keyNum; i < ie; ++i) - { - vec3f scale2 = nodeScale.first->key[i].p; + sampler.forEachSclKey(nodeScale.first, [&valid, &sampler, &nodeScale, scale] { + vec3f scale2 = sampler.sampleScl(nodeScale.first); valid &= v_extract_x(v_length3_sq_x(v_sub(scale, scale2))) < 0.001; - } + }); } if (!valid) logerr("animation <%s> has variable scale and won't work correctly with inertial blending", clip.name); @@ -221,8 +218,8 @@ static bool load_root_motion_from_a2d_node(AnimationClip &clip, const eastl::str { if (a2d_node_name.empty()) return false; - const AnimV20::AnimChanPoint3 *rootMotionPos = find_anim_channel(a2d_node_name, clip.animation->anim.pos); - const AnimV20::AnimChanQuat *rootMotionRot = find_anim_channel(a2d_node_name, clip.animation->anim.rot); + auto rootMotionPos = find_anim_channel(a2d_node_name, clip.animation->anim.pos); + auto rootMotionRot = find_anim_channel(a2d_node_name, clip.animation->anim.rot); if (!rootMotionPos || !rootMotionRot) { if (rootMotionPos) @@ -238,15 +235,11 @@ static bool load_root_motion_from_a2d_node(AnimationClip &clip, const eastl::str return false; } + AnimV20Math::PrsAnimNodeSampler sampler(clip.animation, rootMotionPos, rootMotionRot, dag::Index16()); for (int tick = 0; tick <= clip.tickDuration; tick++) { - int a2dTime = (clip.duration * tick / clip.tickDuration) * AnimV20::TIME_TicksPerSec; - float keyT; - const AnimV20::AnimKeyPoint3 *keyPos = rootMotionPos->findKey(a2dTime, &keyT); - vec3f pos = keyT > 0 ? AnimV20Math::interp_key(keyPos[0], v_splats(keyT)) : keyPos[0].p; - const AnimV20::AnimKeyQuat *keyRot = rootMotionRot->findKey(a2dTime, &keyT); - quat4f rot = keyT > 0 ? AnimV20Math::interp_key(keyRot[0], keyRot[1], keyT) : keyRot[0].p; - clip.rootMotion[tick] = {pos, rot}; + sampler.seek(clip.duration * tick / clip.tickDuration); + clip.rootMotion[tick] = {sampler.samplePos(), sampler.sampleRot()}; } return true; } diff --git a/prog/daNetGameLibs/motion_matching/animation/motion_matching_controller.cpp b/prog/daNetGameLibs/motion_matching/animation/motion_matching_controller.cpp index f7a64c71c..8ea42bae9 100644 --- a/prog/daNetGameLibs/motion_matching/animation/motion_matching_controller.cpp +++ b/prog/daNetGameLibs/motion_matching/animation/motion_matching_controller.cpp @@ -42,38 +42,33 @@ bool MotionMatchingController::getPose(AnimV20::AnimBlender::TlsContext &tls, co int16_t animId = animMap.animId; + AnimV20::AnimBlender::PrsResult &chPrs = tls.chPrs[animId]; + AnimV20::AnimBlender::NodeWeight &wtPos = tls.wtPos[animId]; wtPos.totalNum = 1; wtPos.wTotal = nodeWeight; - AnimV20::AnimBlender::WeightedNode &chPos = tls.chPos[animId]; + AnimV20::AnimBlender::WeightedNode &chPos = tls.chPos[animId]; chPos.readyFlg = AnimV20::AnimBlender::RM_POS_B; - chPos.blendSrc[0].w = nodeWeight; - chPos.blendSrc[0].t = 0; - const vec3f *pos = geomId == rootId ? &rootPRS.position : &resultAnimation.position[geomId]; - static_assert(offsetof(AnimV20::AnimKeyPoint3, p) == 0); - chPos.blendSrc[0].k = reinterpret_cast(pos); + chPos.blendWt[0] = nodeWeight; + chPrs.pos = (geomId == rootId ? rootPRS.position : resultAnimation.position[geomId]); AnimV20::AnimBlender::NodeWeight &wtRot = tls.wtRot[animId]; wtRot.totalNum = 1; wtRot.wTotal = nodeWeight; - AnimV20::AnimBlender::WeightedNode &chRot = tls.chRot[animId]; + AnimV20::AnimBlender::WeightedNode &chRot = tls.chRot[animId]; chRot.readyFlg = AnimV20::AnimBlender::RM_ROT_B; - chRot.blendSrc[0].w = nodeWeight; - chRot.blendSrc[0].t = 0; - const quat4f *rot = geomId == rootId ? &rootPRS.rotation : &resultAnimation.rotation[geomId]; - static_assert(offsetof(AnimV20::AnimKeyQuat, p) == 0); - chRot.blendSrc[0].k = reinterpret_cast(rot); + chRot.blendWt[0] = nodeWeight; + chPrs.rot = (geomId == rootId ? rootPRS.rotation : resultAnimation.rotation[geomId]); if (geomId == rootId) { AnimV20::AnimBlender::NodeWeight &wtScl = tls.wtScl[animId]; wtScl.totalNum = 1; wtScl.wTotal = nodeWeight; - AnimV20::AnimBlender::WeightedNode &chScl = tls.chScl[animId]; + AnimV20::AnimBlender::WeightedNode &chScl = tls.chScl[animId]; chScl.readyFlg = AnimV20::AnimBlender::RM_SCL_B; - chScl.blendSrc[0].w = nodeWeight; - chScl.blendSrc[0].t = 0; - chScl.blendSrc[0].k = reinterpret_cast(&rootPRS.scale); + chScl.blendWt[0] = nodeWeight; + chPrs.scl = rootPRS.scale; } } return true; diff --git a/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl b/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl index e87cc1596..5e268440f 100644 --- a/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl +++ b/prog/daNetGameLibs/motion_matching/es/debugAnimationES.cpp.inl @@ -77,12 +77,14 @@ static void debug_motion_matching_skeleton_es(const ecs::UpdateStageInfoRenderDe animNodesCount = max(animNodesCount, map.animId + 1); AnimV20::AnimBlender::TlsContext tlsAnimCtx; - dag::Vector> chPos(animNodesCount), chScl(animNodesCount); - dag::Vector> chRot(animNodesCount); + dag::Vector chPos(animNodesCount), chScl(animNodesCount); + dag::Vector chRot(animNodesCount); + dag::Vector chPrs(animNodesCount); dag::Vector wtPos(animNodesCount), wtRot(animNodesCount), wtScl(animNodesCount); tlsAnimCtx.chPos = chPos.data(); tlsAnimCtx.chRot = chRot.data(); tlsAnimCtx.chScl = chScl.data(); + tlsAnimCtx.chPrs = chPrs.data(); tlsAnimCtx.wtPos = wtPos.data(); tlsAnimCtx.wtRot = wtRot.data(); tlsAnimCtx.wtScl = wtScl.data(); @@ -99,17 +101,17 @@ static void debug_motion_matching_skeleton_es(const ecs::UpdateStageInfoRenderDe if (tlsAnimCtx.wtPos[animId].totalNum) { nodeMask.set(geomId, true); - pos = tlsAnimCtx.chPos[animId].blendSrc[0].k->p; + pos = tlsAnimCtx.chPrs[animId].pos; } if (tlsAnimCtx.wtRot[animId].totalNum) { nodeMask.set(geomId, true); - rot = tlsAnimCtx.chRot[animId].blendSrc[0].k->p; + rot = tlsAnimCtx.chPrs[animId].rot; } if (tlsAnimCtx.wtScl[animId].totalNum) { nodeMask.set(geomId, true); - scl = tlsAnimCtx.chScl[animId].blendSrc[0].k->p; + scl = tlsAnimCtx.chPrs[animId].scl; } v_mat44_compose(mmAnimatedTree.getNodeTm(animMap[i].geomId), pos, rot, scl); } diff --git a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.gen.es.cpp b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.gen.es.cpp index 3c9e2815b..ff19a9e9d 100644 --- a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.gen.es.cpp +++ b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.gen.es.cpp @@ -41,7 +41,7 @@ static constexpr ecs::ComponentDesc mm_calculate_root_offset_es_comps[] = {ECS_HASH("motion_matching__controller"), ecs::ComponentTypeInfo()}, //start of 2 ro components at [1] {ECS_HASH("transform"), ecs::ComponentTypeInfo()}, - {ECS_HASH("animchar__turnDir"), ecs::ComponentTypeInfo()} + {ECS_HASH("animchar__turnDir"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL} }; static void mm_calculate_root_offset_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) { @@ -49,8 +49,8 @@ static void mm_calculate_root_offset_es_all_events(const ecs::Event &__restrict auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do mm_calculate_root_offset_es(static_cast(evt) , ECS_RO_COMP(mm_calculate_root_offset_es_comps, "transform", TMatrix) - , ECS_RO_COMP(mm_calculate_root_offset_es_comps, "animchar__turnDir", bool) , ECS_RW_COMP(mm_calculate_root_offset_es_comps, "motion_matching__controller", MotionMatchingController) + , ECS_RO_COMP_OR(mm_calculate_root_offset_es_comps, "animchar__turnDir", bool(false)) ); while (++comp != compE); } diff --git a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl index 586602333..2fe7378a8 100644 --- a/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl +++ b/prog/daNetGameLibs/motion_matching/es/playAnimationES.cpp.inl @@ -33,8 +33,8 @@ ECS_AFTER(after_guns_update_sync, wait_motion_matching_job_es) ECS_BEFORE(animchar_es) static void mm_calculate_root_offset_es(const ParallelUpdateFrameDelayed &, const TMatrix &transform, - bool animchar__turnDir, - MotionMatchingController &motion_matching__controller) + MotionMatchingController &motion_matching__controller, + bool animchar__turnDir = false) { if (!motion_matching__controller.dataBase) return; diff --git a/prog/daNetGameLibs/sound/environment_sounds/es/spline_sound.das b/prog/daNetGameLibs/sound/environment_sounds/es/spline_sound.das index a0b3b8f6f..27909a83d 100644 --- a/prog/daNetGameLibs/sound/environment_sounds/es/spline_sound.das +++ b/prog/daNetGameLibs/sound/environment_sounds/es/spline_sound.das @@ -187,7 +187,7 @@ def game_object_spline_sound_generator(evt : Event; points |> push(float4(0., 0., 0., -1.)) // separator for a new spline isFirstPointInSpline = false let pos = tm[3] - let radius = length(tm[0]) * 0.5 * game_object_spline_sound_generator__pointRadiusMul + let radius = length(tm[0]) * game_object_spline_sound_generator__pointRadiusMul points |> push(float4(pos.x, pos.y, pos.z, radius)) return false return true diff --git a/prog/dagorInclude/anim/dag_animBlend.h b/prog/dagorInclude/anim/dag_animBlend.h index d225a2fd9..4481bbddb 100644 --- a/prog/dagorInclude/anim/dag_animBlend.h +++ b/prog/dagorInclude/anim/dag_animBlend.h @@ -252,22 +252,15 @@ class AnimBlender static constexpr int MAX_ANIMS_IN_NODE = 16; // weighted pos and rot channels - template struct WeightedNode { - struct BlendSrc - { - const KEY *k; - real t; - real w; - int interp() const { return *(int *)&t; } - }; - - BlendSrc blendSrc[MAX_ANIMS_IN_NODE]; - uint8_t blendMod[((MAX_ANIMS_IN_NODE + 8) & ~7) - 1]; + real blendWt[MAX_ANIMS_IN_NODE]; + uint8_t blendMod[((MAX_ANIMS_IN_NODE + 1 + 7) & ~7) - 1]; uint8_t readyFlg; }; + struct NodeSamplers; + struct NodeWeight { int totalNum; @@ -354,8 +347,8 @@ class AnimBlender dag::Span bnlWt; dag::Span bnlCT; - WeightedNode *chPos = NULL, *chScl = NULL; - WeightedNode *chRot = NULL; + NodeSamplers *chXfm = NULL; + WeightedNode *chPos = NULL, *chScl = NULL, *chRot = NULL; NodeWeight *wtPos = NULL, *wtScl = NULL, *wtRot = NULL; PrsResult *chPrs = NULL; diff --git a/prog/dagorInclude/anim/dag_animChannels.h b/prog/dagorInclude/anim/dag_animChannels.h index 71911c4e2..8e98a4661 100644 --- a/prog/dagorInclude/anim/dag_animChannels.h +++ b/prog/dagorInclude/anim/dag_animChannels.h @@ -10,9 +10,8 @@ #include #include #include -#include +#include #include -#include // forward declarations for external classes and structures class IGenLoad; @@ -50,101 +49,6 @@ enum CHTYPE_ROTATION, }; -// Animations for channels as sequence of keys -template -struct AnimChan -{ - PatchablePtr key; - PatchablePtr keyTime16; - int keyNum; - int _resv; - - int keyTimeFirst() const { return unsigned(keyTime16[0]) << TIME_SubdivExp; } - int keyTimeLast() const { return unsigned(keyTime16[keyNum - 1]) << TIME_SubdivExp; } - int keyTime(int idx) const { return unsigned(keyTime16[idx]) << TIME_SubdivExp; } - - __forceinline KEY *findKey(int t32, float *out_t) const - { - if (keyNum == 1 || t32 <= keyTimeFirst()) - { - *out_t = 0; - return &key[0]; - } - if (t32 >= keyTimeLast()) - { - *out_t = 0; - return &key[keyNum - 1]; - } - - int t = t32 >> TIME_SubdivExp, a = 0, b = keyNum - 1; - while (b - a > 1) - { - int c = (a + b) / 2; - if (keyTime16[c] == t) - { - if (keyTime(c) == t32) - { - *out_t = 0; - return &key[c]; - } - *out_t = float(t32 - (t << TIME_SubdivExp)) / float((keyTime16[c + 1] - t) << TIME_SubdivExp); - return &key[c]; - } - else if (keyTime16[c] < t) - a = c; - else - b = c; - } - *out_t = float(t32 - keyTime(a)) / float(keyTime(b) - keyTime(a)); - return &key[a]; - } - - __forceinline KEY *findKeyEx(int t32, float *out_t, int &dkeys) const - { - if (keyNum == 1 || t32 <= keyTimeFirst()) - { - dkeys = 0; - *out_t = 0; - return &key[0]; - } - if (t32 >= keyTimeLast()) - { - dkeys = 0; - *out_t = 0; - return &key[keyNum - 1]; - } - - int t = t32 >> TIME_SubdivExp, a = 0, b = keyNum - 1; - while (b - a > 1) - { - int c = (a + b) / 2; - if (keyTime16[c] == t) - { - if (keyTime(c) == t32) - { - dkeys = (c < keyNum - 1) ? (keyTime16[c + 1] - keyTime16[c]) : 0; - *out_t = 0; - return &key[c]; - } - dkeys = keyTime16[c + 1] - keyTime16[c]; - *out_t = float(t32 - (t << TIME_SubdivExp)) / float((keyTime16[c + 1] - t) << TIME_SubdivExp); - return &key[c]; - } - else if (keyTime16[c] < t) - a = c; - else - b = c; - } - dkeys = keyTime16[b] - keyTime16[a]; - *out_t = float(t32 - keyTime(a)) / float(keyTime(b) - keyTime(a)); - return &key[a]; - } -}; - -typedef AnimChan AnimChanPoint3; -typedef AnimChan AnimChanQuat; -typedef AnimChan AnimChanReal; - // Note track labels struct AnimKeyLabel { @@ -155,13 +59,15 @@ struct AnimKeyLabel void patchData(void *base) { name.patch(base); } }; +struct AnimChan +{}; + // // Generic channels for distinct animation keys // -template struct AnimDataChan { - PatchablePtr nodeAnim; + PatchablePtr nodeAnim; unsigned nodeNum; unsigned channelType; PatchablePtr nodeWt; @@ -169,28 +75,50 @@ struct AnimDataChan AnimDataChan() {} - void patchData(void *base) + void patchData(void *base); + + dag::Index16 getNodeId(const char *node_name) { - nodeAnim.patch(base); - nodeName.patch(base); - nodeWt.patch(base); - for (int i = 0; i < nodeNum; i++) - { - nodeName[i].patch(base); - nodeAnim[i].key.patch(base); - nodeAnim[i].keyTime16.patch(base); - } + for (unsigned id = 0; id < nodeNum; id++) + if (dd_stricmp(node_name, nodeName[id]) == 0) + return dag::Index16(id); + return dag::Index16(); } - int getNodeId(const char *node_name) + // has one or more keys + bool hasKeys(dag::Index16 node_id) const; + + // has more than one key + bool hasAnimation(dag::Index16 node_id) const; + + unsigned getNumKeys(dag::Index16 node_id) const; + + int keyTimeFirst(dag::Index16 node_id) const; + int keyTimeLast(dag::Index16 node_id) const; + + int keyTimeFirst() const { - for (int id = 0; id < nodeNum; id++) - if (dd_stricmp(node_name, nodeName[id]) == 0) - return id; - return -1; + if (nodeNum == 0) + return INT_MAX; + int t = keyTimeFirst(dag::Index16(0)); + for (unsigned i = 1; i < nodeNum; i++) + t = min(t, keyTimeFirst(dag::Index16(i))); + return t; + } + + int keyTimeLast() const + { + if (nodeNum == 0) + return INT_MIN; + int t = keyTimeLast(dag::Index16(0)); + for (unsigned i = 1; i < nodeNum; i++) + t = max(t, keyTimeLast(dag::Index16(i))); + return t; } }; +struct PrsAnimNodeRef; + // // Master animation holder (can be shared) // @@ -199,22 +127,22 @@ class AnimData : public DObject public: struct DumpData { - PatchableTab> chanPoint3; - PatchableTab> chanQuat; - PatchableTab> chanReal; + PatchableTab chanPoint3; + PatchableTab chanQuat; + PatchableTab chanReal; PatchableTab noteTrack; void patchData(void *base); - AnimDataChan *getChanPoint3(unsigned channel_type); - AnimDataChan *getChanQuat(unsigned channel_type); - AnimDataChan *getChanReal(unsigned channel_type); + AnimDataChan *getChanPoint3(unsigned channel_type); + AnimDataChan *getChanQuat(unsigned channel_type); + AnimDataChan *getChanReal(unsigned channel_type); } dumpData; struct Anim { - AnimDataChan pos, scl; - AnimDataChan rot; - AnimChanPoint3 originLinVel, originAngVel; + AnimDataChan pos, scl; + AnimDataChan rot; + AnimDataChan originLinVel, originAngVel; void setup(DumpData &d); } anim; int resId = -1; @@ -226,15 +154,13 @@ class AnimData : public DObject memset(&dumpData, 0, sizeof(dumpData)); animAdditive = false; } + // creates alias of other AnimData and uses only nodes specified AnimData(AnimData *src_anim, const NameMap &node_list, IMemAlloc *ma); bool load(IGenLoad &cb, IMemAlloc *ma = midmem); - // creates alias of other AnimData and uses only nodes specified + PrsAnimNodeRef getPrsAnim(const char *node_name); - const AnimChanPoint3 *getPoint3Anim(unsigned channel_type, const char *node_name); - const AnimChanQuat *getQuatAnim(unsigned channel_type, const char *node_name); - const AnimChanReal *getRealAnim(unsigned channel_type, const char *node_name); int getLabelTime(const char *name, bool fatal_err = true); bool isAdditive() const { return animAdditive; } AnimData *getSourceAnimData() const { return src; } @@ -253,4 +179,25 @@ class AnimData : public DObject void *extraData; bool animAdditive; }; + +struct PrsAnimNodeRef +{ + const AnimData::Anim *anim = nullptr; + dag::Index16 posId; + dag::Index16 rotId; + dag::Index16 sclId; + + inline bool valid() const { return anim && (posId || rotId || sclId); } + inline bool allValid() const { return anim && posId && rotId && sclId; } + + inline bool hasAnimation() const + { + return anim && (anim->pos.hasAnimation(posId) || anim->rot.hasAnimation(rotId) || anim->scl.hasAnimation(sclId)); + } + + int keyTimeFirst() const; + int keyTimeLast() const; + float getDuration() const; // in seconds +}; + } // end of namespace AnimV20 diff --git a/prog/dagorInclude/anim/dag_animDecl.h b/prog/dagorInclude/anim/dag_animDecl.h index 862e65e27..c2c7e14b6 100644 --- a/prog/dagorInclude/anim/dag_animDecl.h +++ b/prog/dagorInclude/anim/dag_animDecl.h @@ -14,11 +14,7 @@ struct AnimKeyPoint3; struct AnimKeyQuat; struct AnimKeyReal; -template struct AnimChan; -typedef AnimChan AnimChanPoint3; -typedef AnimChan AnimChanQuat; -typedef AnimChan AnimChanReal; struct AnimKeyLabel; // shareable animation (a2d) diff --git a/prog/dagorInclude/anim/dag_animKeyInterp.h b/prog/dagorInclude/anim/dag_animKeyInterp.h index 49eda05fe..51f205774 100644 --- a/prog/dagorInclude/anim/dag_animKeyInterp.h +++ b/prog/dagorInclude/anim/dag_animKeyInterp.h @@ -4,11 +4,341 @@ // #pragma once +#include #include +#include +#include #include namespace AnimV20Math { + + +template +struct AnimChan; +typedef AnimChan AnimChanPoint3; +typedef AnimChan AnimChanQuat; +typedef AnimChan AnimChanReal; + + +inline int seconds_to_ticks(float seconds) { return roundf(seconds * AnimV20::TIME_TicksPerSec); } + + +struct AnimSamplerConfig +{ + // If true, sampling time must be specified in the constructor call. + static constexpr bool is_one_shot() { return false; } +}; + +struct DefaultConfig : AnimSamplerConfig +{}; + +struct OneShotConfig : AnimSamplerConfig +{ + static constexpr bool is_one_shot() { return true; } +}; + + +#define ONE_SHOT_CTOR_CHECK() \ + if constexpr (k_one_shot) \ + G_ASSERT_EX(false, "time must be specified in ctor for one-shot sampler") + +#define ONE_SHOT_SEEK_CHECK() \ + if constexpr (k_one_shot) \ + G_ASSERT_EX(false, "can't seek one-shot sampler") + +// For sampling several nodes of the same AnimData. +template +struct PrsAnimSampler +{ + PrsAnimSampler(const AnimV20::AnimData *ad = nullptr) : anim(ad ? &ad->anim : nullptr) { ONE_SHOT_CTOR_CHECK(); } + + explicit PrsAnimSampler(const AnimV20::AnimData *ad, int time_ticks) : anim(ad ? &ad->anim : nullptr) { setTimeTicks(time_ticks); } + + explicit PrsAnimSampler(const AnimV20::AnimData *ad, float time_seconds) : anim(ad ? &ad->anim : nullptr) + { + setTimeTicks(seconds_to_ticks(time_seconds)); + } + + void seekTicks(int ticks) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(ticks); + } + + void seek(float seconds) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(seconds_to_ticks(seconds)); + } + + int getTimeTicks() const { return curTime; } + float getTimeSeconds() const { return curTime / float(AnimV20::TIME_TicksPerSec); } + + // seek to each key time + template + void forEachSclKey(dag::Index16 node_id, F callback); + + vec3f samplePos(dag::Index16 node_id) const; + quat4f sampleRot(dag::Index16 node_id) const; + vec3f sampleScl(dag::Index16 node_id) const; + +protected: + static constexpr bool k_one_shot = CFG::is_one_shot(); + + const AnimV20::AnimData::Anim *anim; + int curTime = 0; + + void setTimeTicks(int ticks) { curTime = ticks; } +}; + + +// For samping single node. +template +struct PrsAnimNodeSampler +{ + PrsAnimNodeSampler() + { + ONE_SHOT_CTOR_CHECK(); + init(nullptr, dag::Index16(), dag::Index16(), dag::Index16()); + } + + PrsAnimNodeSampler(const AnimV20::PrsAnimNodeRef &prs) + { + ONE_SHOT_CTOR_CHECK(); + init(prs.anim, prs.posId, prs.rotId, prs.sclId); + } + + PrsAnimNodeSampler(const AnimV20::AnimData *a, dag::Index16 p, dag::Index16 r, dag::Index16 s) + { + ONE_SHOT_CTOR_CHECK(); + init(a ? &a->anim : nullptr, p, r, s); + } + + PrsAnimNodeSampler(const AnimV20::AnimData *a, dag::Index16 p, dag::Index16 r, dag::Index16 s, int ticks) + { + initOneShot(a ? &a->anim : nullptr, p, r, s, ticks); + } + + explicit PrsAnimNodeSampler(const AnimV20::PrsAnimNodeRef &prs, int ticks) + { + initOneShot(prs.anim, prs.posId, prs.rotId, prs.sclId, ticks); + } + + explicit PrsAnimNodeSampler(const AnimV20::PrsAnimNodeRef &prs, float seconds) + { + initOneShot(prs.anim, prs.posId, prs.rotId, prs.sclId, seconds_to_ticks(seconds)); + } + + void seekTicks(int ticks) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(ticks); + } + + void seek(float seconds) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(seconds_to_ticks(seconds)); + } + + vec3f samplePos() const; + quat4f sampleRot() const; + vec3f sampleScl() const; + + void sampleTransform(vec3f &p, quat4f &r, vec3f &s) const + { + p = samplePos(); + r = sampleRot(); + s = sampleScl(); + } + +protected: + static constexpr bool k_one_shot = CFG::is_one_shot(); + + struct LongCtx + { + const AnimChanQuat *rot; + const AnimChanPoint3 *pos, *scl; + int curTime; + }; + + struct OneShotCtx + { + const AnimV20::AnimKeyQuat *krot; + const AnimV20::AnimKeyPoint3 *kpos, *kscl; + float arot, apos, ascl; + }; + + typename eastl::conditional_t ctx; + + void init(const AnimV20::AnimData::Anim *a, dag::Index16 p, dag::Index16 r, dag::Index16 s); + void initOneShot(const AnimV20::AnimData::Anim *a, dag::Index16 p, dag::Index16 r, dag::Index16 s, int ticks); + + void setTimeTicks(int ticks) + { + if constexpr (!k_one_shot) + ctx.curTime = ticks; + } +}; + + +template +struct Float3AnimNodeSampler +{ + Float3AnimNodeSampler(const AnimV20::AnimDataChan &anim, dag::Index16 node = dag::Index16(0)) + { + ONE_SHOT_CTOR_CHECK(); + init(anim, node); + } + + Float3AnimNodeSampler(const AnimV20::AnimDataChan &anim, int ticks, dag::Index16 node = dag::Index16(0)) + { + initOneShot(anim, node, ticks); + } + + Float3AnimNodeSampler(const AnimV20::AnimDataChan &anim, float seconds, dag::Index16 node = dag::Index16(0)) + { + initOneShot(anim, node, seconds_to_ticks(seconds)); + } + + void seekTicks(int ticks) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(ticks); + } + + void seek(float seconds) + { + ONE_SHOT_SEEK_CHECK(); + setTimeTicks(seconds_to_ticks(seconds)); + } + + vec3f sample(vec3f default_value = v_zero()) const; + +protected: + static constexpr bool k_one_shot = CFG::is_one_shot(); + + struct LongCtx + { + const AnimChanPoint3 *chan; + int curTime; + }; + + struct OneShotCtx + { + const AnimV20::AnimKeyPoint3 *key; + float alpha; + }; + + typename eastl::conditional_t ctx; + + void init(const AnimV20::AnimDataChan &anim, dag::Index16 node); + void initOneShot(const AnimV20::AnimDataChan &anim, dag::Index16 node, int ticks); + + void setTimeTicks(int ticks) + { + if constexpr (!k_one_shot) + ctx.curTime = ticks; + } +}; + + +// Implementation details: + +// Animations for channels as sequence of keys +template +struct AnimChan +{ + PatchablePtr key; + PatchablePtr keyTime16; + int keyNum; + int _resv; + + int keyTimeFirst() const { return unsigned(keyTime16[0]) << AnimV20::TIME_SubdivExp; } + int keyTimeLast() const { return unsigned(keyTime16[keyNum - 1]) << AnimV20::TIME_SubdivExp; } + int keyTime(int idx) const { return unsigned(keyTime16[idx]) << AnimV20::TIME_SubdivExp; } + + __forceinline KEY *findKey(int t32, float *out_t) const + { + if (keyNum == 1 || t32 <= keyTimeFirst()) + { + *out_t = 0; + return &key[0]; + } + if (t32 >= keyTimeLast()) + { + *out_t = 0; + return &key[keyNum - 1]; + } + + int t = t32 >> AnimV20::TIME_SubdivExp, a = 0, b = keyNum - 1; + while (b - a > 1) + { + int c = (a + b) / 2; + if (keyTime16[c] == t) + { + if (keyTime(c) == t32) + { + *out_t = 0; + return &key[c]; + } + *out_t = float(t32 - (t << AnimV20::TIME_SubdivExp)) / float((keyTime16[c + 1] - t) << AnimV20::TIME_SubdivExp); + return &key[c]; + } + else if (keyTime16[c] < t) + a = c; + else + b = c; + } + *out_t = float(t32 - keyTime(a)) / float(keyTime(b) - keyTime(a)); + return &key[a]; + } + + __forceinline KEY *findKeyEx(int t32, float *out_t, int &dkeys) const + { + if (keyNum == 1 || t32 <= keyTimeFirst()) + { + dkeys = 0; + *out_t = 0; + return &key[0]; + } + if (t32 >= keyTimeLast()) + { + dkeys = 0; + *out_t = 0; + return &key[keyNum - 1]; + } + + int t = t32 >> AnimV20::TIME_SubdivExp, a = 0, b = keyNum - 1; + while (b - a > 1) + { + int c = (a + b) / 2; + if (keyTime16[c] == t) + { + if (keyTime(c) == t32) + { + dkeys = (c < keyNum - 1) ? (keyTime16[c + 1] - keyTime16[c]) : 0; + *out_t = 0; + return &key[c]; + } + dkeys = keyTime16[c + 1] - keyTime16[c]; + *out_t = float(t32 - (t << AnimV20::TIME_SubdivExp)) / float((keyTime16[c + 1] - t) << AnimV20::TIME_SubdivExp); + return &key[c]; + } + else if (keyTime16[c] < t) + a = c; + else + b = c; + } + dkeys = keyTime16[b] - keyTime16[a]; + *out_t = float(t32 - keyTime(a)) / float(keyTime(b) - keyTime(a)); + return &key[a]; + } +}; + +static_assert(sizeof(AnimChanPoint3) == sizeof(AnimChanQuat)); + // Key data __forceinline real interp_key(const AnimV20::AnimKeyReal &a, real t) { return ((a.k3 * t + a.k2) * t + a.k1) * t + a.p; } @@ -23,4 +353,302 @@ __forceinline vec4f interp_key(const AnimV20::AnimKeyQuat &a, const AnimV20::Ani return v_quat_qsquad(t, a.p, a.b0, a.b1, b.p); } + +// Sampler implementation + +__forceinline const AnimChanPoint3 *get_point3_anim(const AnimV20::AnimDataChan &anim, dag::Index16 node_id) +{ + if (node_id.index() >= anim.nodeNum) + return nullptr; + return (const AnimChanPoint3 *)anim.nodeAnim.get() + node_id.index(); +} + +__forceinline const AnimChanQuat *get_quat_anim(const AnimV20::AnimDataChan &anim, dag::Index16 node_id) +{ + if (node_id.index() >= anim.nodeNum) + return nullptr; + return (const AnimChanQuat *)anim.nodeAnim.get() + node_id.index(); +} + +template +__forceinline const KEY *find_key(const AnimChan *ch, int t, float *a) +{ + if (!ch || ch->keyNum == 0) + { + *a = 0; + return nullptr; + } + return ch->findKey(t, a); +} + +__forceinline vec3f sample_anim(const AnimChanPoint3 *anim, int time, vec3f default_value) +{ + if (!anim) + return default_value; + float alpha = 0; + auto *k = anim->findKey(time, &alpha); + return (alpha != 0.f) ? interp_key(k[0], v_splats(alpha)) : k->p; +} + +__forceinline quat4f sample_anim(const AnimChanQuat *anim, int time, quat4f default_value) +{ + if (!anim) + return default_value; + float alpha = 0; + auto *k = anim->findKey(time, &alpha); + return (alpha != 0.f) ? interp_key(k[0], k[1], alpha) : k->p; +} + + +template +__forceinline vec3f PrsAnimSampler::samplePos(dag::Index16 node_id) const +{ + if (!anim || !node_id) + return v_zero(); + return sample_anim(get_point3_anim(anim->pos, node_id), curTime, v_zero()); +} + +template +__forceinline vec3f PrsAnimSampler::sampleScl(dag::Index16 node_id) const +{ + if (!anim || !node_id) + return V_C_ONE; + return sample_anim(get_point3_anim(anim->scl, node_id), curTime, V_C_ONE); +} + +template +__forceinline quat4f PrsAnimSampler::sampleRot(dag::Index16 node_id) const +{ + if (!anim || !node_id) + return V_C_UNIT_0001; + return sample_anim(get_quat_anim(anim->rot, node_id), curTime, V_C_UNIT_0001); +} + +template +template +__forceinline void PrsAnimSampler::forEachSclKey(dag::Index16 node_id, F callback) +{ + if (!anim) + return; + auto a = get_point3_anim(anim->scl, node_id); + if (!a) + return; + for (int ki = 0; ki < a->keyNum; ki++) + { + seekTicks(a->keyTime(ki)); + callback(); + } +} + + +template +void PrsAnimNodeSampler::init(const AnimV20::AnimData::Anim *a, dag::Index16 p, dag::Index16 r, dag::Index16 s) +{ + if constexpr (k_one_shot) + { + G_ASSERT_EX(false, "can't init() one-shot PrsAnimNodeSampler"); + } + else + { + if (a) + { + ctx.rot = get_quat_anim(a->rot, r); + ctx.pos = get_point3_anim(a->pos, p); + ctx.scl = get_point3_anim(a->scl, s); + } + else + { + ctx.rot = nullptr; + ctx.pos = nullptr; + ctx.scl = nullptr; + } + ctx.curTime = 0; + } +} + +template +__forceinline void PrsAnimNodeSampler::initOneShot(const AnimV20::AnimData::Anim *a, dag::Index16 p, dag::Index16 r, + dag::Index16 s, int ticks) +{ + if constexpr (k_one_shot) + { + if (a) + { + ctx.krot = find_key(get_quat_anim(a->rot, r), ticks, &ctx.arot); + ctx.kpos = find_key(get_point3_anim(a->pos, p), ticks, &ctx.apos); + ctx.kscl = find_key(get_point3_anim(a->scl, s), ticks, &ctx.ascl); + } + else + { + ctx.krot = nullptr; + ctx.kpos = nullptr; + ctx.kscl = nullptr; + } + } + else + { + init(a, p, r, s); + setTimeTicks(ticks); + } +} + +template +__forceinline vec3f PrsAnimNodeSampler::samplePos() const +{ + if constexpr (k_one_shot) + { + if (!ctx.kpos) + return v_zero(); + return *(int *)&ctx.apos ? interp_key(ctx.kpos[0], v_splats(ctx.apos)) : ctx.kpos->p; + } + else + return sample_anim(ctx.pos, ctx.curTime, v_zero()); +} + +template +__forceinline vec3f PrsAnimNodeSampler::sampleScl() const +{ + if constexpr (k_one_shot) + { + if (!ctx.kscl) + return V_C_ONE; + return *(int *)&ctx.ascl ? interp_key(ctx.kscl[0], v_splats(ctx.ascl)) : ctx.kscl->p; + } + else + return sample_anim(ctx.scl, ctx.curTime, V_C_ONE); +} + +template +__forceinline quat4f PrsAnimNodeSampler::sampleRot() const +{ + if constexpr (k_one_shot) + { + if (!ctx.krot) + return V_C_UNIT_0001; + return *(int *)&ctx.arot ? interp_key(ctx.krot[0], ctx.krot[1], ctx.arot) : ctx.krot->p; + } + else + return sample_anim(ctx.rot, ctx.curTime, V_C_UNIT_0001); +} + + +template +void Float3AnimNodeSampler::init(const AnimV20::AnimDataChan &anim, dag::Index16 node) +{ + if constexpr (k_one_shot) + { + G_ASSERT_EX(false, "can't init() one-shot Float3AnimNodeSampler"); + } + else + { + ctx.chan = get_point3_anim(anim, node); + ctx.curTime = 0; + } +} + +template +__forceinline void Float3AnimNodeSampler::initOneShot(const AnimV20::AnimDataChan &anim, dag::Index16 node, int ticks) +{ + if constexpr (k_one_shot) + { + ctx.key = find_key(get_point3_anim(anim, node), ticks, &ctx.alpha); + } + else + { + init(anim, node); + setTimeTicks(ticks); + } +} + +template +__forceinline vec3f Float3AnimNodeSampler::sample(vec3f default_value) const +{ + if constexpr (k_one_shot) + { + if (!ctx.key) + return default_value; + return *(int *)&ctx.alpha ? interp_key(ctx.key[0], v_splats(ctx.alpha)) : ctx.key->p; + } + else + return sample_anim(ctx.chan, ctx.curTime, default_value); +} + } // end of namespace AnimV20Math + + +__forceinline bool AnimV20::AnimDataChan::hasKeys(dag::Index16 node_id) const +{ + if (node_id.index() >= nodeNum) + return false; + return ((const AnimV20Math::AnimChanPoint3 *)nodeAnim.get() + node_id.index())->keyNum > 0; +} + +__forceinline bool AnimV20::AnimDataChan::hasAnimation(dag::Index16 node_id) const +{ + if (node_id.index() >= nodeNum) + return false; + return ((const AnimV20Math::AnimChanPoint3 *)nodeAnim.get() + node_id.index())->keyNum > 1; +} + +__forceinline unsigned AnimV20::AnimDataChan::getNumKeys(dag::Index16 node_id) const +{ + if (node_id.index() >= nodeNum) + return 0; + return ((const AnimV20Math::AnimChanPoint3 *)nodeAnim.get() + node_id.index())->keyNum; +} + +inline int AnimV20::AnimDataChan::keyTimeFirst(dag::Index16 node_id) const +{ + if (node_id.index() >= nodeNum) + return INT_MAX; + auto a = (const AnimV20Math::AnimChanPoint3 *)nodeAnim.get() + node_id.index(); + if (a->keyNum == 0) + return INT_MAX; + return a->keyTimeFirst(); +} + +inline int AnimV20::AnimDataChan::keyTimeLast(dag::Index16 node_id) const +{ + if (node_id.index() >= nodeNum) + return INT_MIN; + auto a = (const AnimV20Math::AnimChanPoint3 *)nodeAnim.get() + node_id.index(); + if (a->keyNum == 0) + return INT_MIN; + return a->keyTimeLast(); +} + + +inline int AnimV20::PrsAnimNodeRef::keyTimeFirst() const +{ + if (!anim) + return INT_MAX; + int t = INT_MAX; + if (auto a = AnimV20Math::get_point3_anim(anim->pos, posId)) + t = min(t, a->keyTimeFirst()); + if (auto a = AnimV20Math::get_quat_anim(anim->rot, rotId)) + t = min(t, a->keyTimeFirst()); + if (auto a = AnimV20Math::get_point3_anim(anim->scl, sclId)) + t = min(t, a->keyTimeFirst()); + return t; +} + +inline int AnimV20::PrsAnimNodeRef::keyTimeLast() const +{ + if (!anim) + return INT_MIN; + int t = INT_MIN; + if (auto a = AnimV20Math::get_point3_anim(anim->pos, posId)) + t = max(t, a->keyTimeLast()); + if (auto a = AnimV20Math::get_quat_anim(anim->rot, rotId)) + t = max(t, a->keyTimeLast()); + if (auto a = AnimV20Math::get_point3_anim(anim->scl, sclId)) + t = max(t, a->keyTimeLast()); + return t; +} + +inline float AnimV20::PrsAnimNodeRef::getDuration() const +{ + if (!anim) + return 0; + return keyTimeLast() / float(AnimV20::TIME_TicksPerSec); +} diff --git a/prog/dagorInclude/anim/dag_animPostBlendCtrl.h b/prog/dagorInclude/anim/dag_animPostBlendCtrl.h index 98fb7b7e7..a2e8dd71e 100644 --- a/prog/dagorInclude/anim/dag_animPostBlendCtrl.h +++ b/prog/dagorInclude/anim/dag_animPostBlendCtrl.h @@ -641,8 +641,7 @@ class ApbAnimateCtrl : public AnimPostBlendCtrl { struct NodeAnim { - const AnimV20::AnimChanPoint3 *pos, *scl; - const AnimV20::AnimChanQuat *rot; + AnimV20::PrsAnimNodeRef prs; SimpleString name; }; struct AnimRec diff --git a/prog/dagorInclude/anim/dag_simpleNodeAnim.h b/prog/dagorInclude/anim/dag_simpleNodeAnim.h index 3ed7d0a42..32e2fb212 100644 --- a/prog/dagorInclude/anim/dag_simpleNodeAnim.h +++ b/prog/dagorInclude/anim/dag_simpleNodeAnim.h @@ -14,9 +14,9 @@ class SimpleNodeAnim bool init(AnimV20::AnimData *a, const char *node_name); - void calcAnimTm(TMatrix &tm, int t, int d_keys_no_blend = -1); + void calcAnimTm(TMatrix &tm, int t); - bool isValid() const { return anim.get() && (pos || rot || scl); } + bool isValid() const { return anim.get() && prs.valid(); } bool setTargetNode(const char *node_name); @@ -24,7 +24,5 @@ class SimpleNodeAnim protected: Ptr anim; - const AnimV20::AnimChanPoint3 *pos; - const AnimV20::AnimChanQuat *rot; - const AnimV20::AnimChanPoint3 *scl; + AnimV20::PrsAnimNodeRef prs; }; diff --git a/prog/dagorInclude/math/dag_lsbVisitor.h b/prog/dagorInclude/math/dag_lsbVisitor.h index a4bb2ec73..61b9b5c9b 100644 --- a/prog/dagorInclude/math/dag_lsbVisitor.h +++ b/prog/dagorInclude/math/dag_lsbVisitor.h @@ -4,6 +4,7 @@ // #pragma once +#include #include #include #include "dag_intrin.h" diff --git a/prog/dagorInclude/shaders/dag_shaders.h b/prog/dagorInclude/shaders/dag_shaders.h index b0cb37dbb..8638fb05b 100644 --- a/prog/dagorInclude/shaders/dag_shaders.h +++ b/prog/dagorInclude/shaders/dag_shaders.h @@ -203,6 +203,9 @@ using ShaderReloadCb = eastl::fixed_function; void shaders_register_console( bool allow_reload = true, const ShaderReloadCb &after_reload_cb = [](bool) {}); +// enable or disable shaders reloading depending on build configuration and settings +void shaders_set_reload_flags(); + // Shaders global time: float get_shader_global_time(); diff --git a/prog/engine/anim/animChannels.cpp b/prog/engine/anim/animChannels.cpp index 426686bd4..67512a06d 100644 --- a/prog/engine/anim/animChannels.cpp +++ b/prog/engine/anim/animChannels.cpp @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -36,9 +37,7 @@ static inline void *regAlloc(int sz, char *&base, int align = 8) return p; } -template -static void cloneAnimDataChan(AnimDataChan &d, const NameMap &nodes, const AnimDataChan &s, char *&allocPtr, - Tab &remap_storage) +static void cloneAnimDataChan(AnimDataChan &d, const NameMap &nodes, const AnimDataChan &s, char *&allocPtr, Tab &remap_storage) { #if DAGOR_DBGLEVEL > 0 remap_storage.resize(nodes.nameCount()); @@ -65,7 +64,7 @@ static void cloneAnimDataChan(AnimDataChan &d, const NameMap &nodes, return; } - d.nodeAnim.setPtr(regAlloc(remap_count * sizeof(d.nodeAnim[0]), allocPtr, 8)); + d.nodeAnim.setPtr(regAlloc(remap_count * sizeof(AnimV20Math::AnimChanPoint3), allocPtr, 8)); d.nodeName.setPtr(regAlloc(remap_count * sizeof(d.nodeName[0]), allocPtr, 8)); d.nodeWt.setPtr(regAlloc(remap_count * sizeof(d.nodeWt[0]), allocPtr, 4)); d.nodeNum = remap_count; @@ -73,7 +72,7 @@ static void cloneAnimDataChan(AnimDataChan &d, const NameMap &nodes, for (int i = 0; i < remap_count; i++) { - d.nodeAnim[i] = s.nodeAnim[remap_storage[i]]; + ((AnimV20Math::AnimChanPoint3 *)d.nodeAnim.get())[i] = ((AnimV20Math::AnimChanPoint3 *)s.nodeAnim.get())[remap_storage[i]]; d.nodeName[i] = s.nodeName[remap_storage[i]]; d.nodeWt[i] = s.nodeWt[remap_storage[i]]; } @@ -95,17 +94,17 @@ AnimData::AnimData(AnimData *src_anim, const NameMap &node_list, IMemAlloc *ma) for (int i = 0; i < d.chanPoint3.size(); i++) { int remapped_nodes = count_remapped_nodes(d.chanPoint3[i].nodeName, d.chanPoint3[i].nodeNum, node_list); - dataSize += (remapped_nodes * (add_per_node + sizeof(d.chanPoint3[i].nodeAnim[0])) + 7) & ~7; + dataSize += (remapped_nodes * (add_per_node + sizeof(AnimV20Math::AnimChanPoint3)) + 7) & ~7; } for (int i = 0; i < d.chanQuat.size(); i++) { int remapped_nodes = count_remapped_nodes(d.chanQuat[i].nodeName, d.chanQuat[i].nodeNum, node_list); - dataSize += (remapped_nodes * (add_per_node + sizeof(d.chanQuat[i].nodeAnim[0])) + 7) & ~7; + dataSize += (remapped_nodes * (add_per_node + sizeof(AnimV20Math::AnimChanQuat)) + 7) & ~7; } for (int i = 0; i < d.chanReal.size(); i++) { int remapped_nodes = count_remapped_nodes(d.chanReal[i].nodeName, d.chanReal[i].nodeNum, node_list); - dataSize += (remapped_nodes * (add_per_node + sizeof(d.chanReal[i].nodeAnim[0])) + 7) & ~7; + dataSize += (remapped_nodes * (add_per_node + sizeof(AnimV20Math::AnimChanReal)) + 7) & ~7; } extraData = ma->alloc(dataSize); @@ -154,6 +153,20 @@ AnimData::~AnimData() memset(&dumpData, 0, sizeof(dumpData)); } +void AnimDataChan::patchData(void *base) +{ + nodeAnim.patch(base); + nodeName.patch(base); + nodeWt.patch(base); + auto anim = (AnimV20Math::AnimChanPoint3 *)nodeAnim.get(); + for (int i = 0; i < nodeNum; i++) + { + nodeName[i].patch(base); + anim[i].key.patch(base); + anim[i].keyTime16.patch(base); + } +} + void AnimData::DumpData::patchData(void *base) { chanPoint3.patch(base); @@ -170,7 +183,7 @@ void AnimData::DumpData::patchData(void *base) noteTrack[i].patchData(base); } -AnimDataChan *AnimData::DumpData::getChanPoint3(unsigned channel_type) +AnimDataChan *AnimData::DumpData::getChanPoint3(unsigned channel_type) { for (int i = 0; i < chanPoint3.size(); i++) if (chanPoint3[i].channelType == channel_type) @@ -178,7 +191,7 @@ AnimDataChan *AnimData::DumpData::getChanPoint3(unsigned channel return NULL; } -AnimDataChan *AnimData::DumpData::getChanQuat(unsigned channel_type) +AnimDataChan *AnimData::DumpData::getChanQuat(unsigned channel_type) { for (int i = 0; i < chanQuat.size(); i++) if (chanQuat[i].channelType == channel_type) @@ -186,7 +199,7 @@ AnimDataChan *AnimData::DumpData::getChanQuat(unsigned channel_typ return NULL; } -AnimDataChan *AnimData::DumpData::getChanReal(unsigned channel_type) +AnimDataChan *AnimData::DumpData::getChanReal(unsigned channel_type) { for (int i = 0; i < chanReal.size(); i++) if (chanReal[i].channelType == channel_type) @@ -195,40 +208,14 @@ AnimDataChan *AnimData::DumpData::getChanReal(unsigned channel_typ } -const AnimChanPoint3 *AnimData::getPoint3Anim(unsigned channel_type, const char *node_name) +PrsAnimNodeRef AnimData::getPrsAnim(const char *node_name) { - AnimDataChan *animDataChan = dumpData.getChanPoint3(channel_type); - if (animDataChan) - { - int animId = animDataChan->getNodeId(node_name); - if (animId != -1) - return &animDataChan->nodeAnim[animId]; - } - return NULL; -} - -const AnimChanQuat *AnimData::getQuatAnim(unsigned channel_type, const char *node_name) -{ - AnimDataChan *animDataChan = dumpData.getChanQuat(channel_type); - if (animDataChan) - { - int animId = animDataChan->getNodeId(node_name); - if (animId != -1) - return &animDataChan->nodeAnim[animId]; - } - return NULL; -} - -const AnimChanReal *AnimData::getRealAnim(unsigned channel_type, const char *node_name) -{ - AnimDataChan *animDataChan = dumpData.getChanReal(channel_type); - if (animDataChan) - { - int animId = animDataChan->getNodeId(node_name); - if (animId != -1) - return &animDataChan->nodeAnim[animId]; - } - return NULL; + PrsAnimNodeRef prs; + prs.anim = &anim; + prs.posId = anim.pos.getNodeId(node_name); + prs.rotId = anim.rot.getNodeId(node_name); + prs.sclId = anim.scl.getNodeId(node_name); + return prs; } int AnimData::getLabelTime(const char *name, bool fatal_err) @@ -284,33 +271,31 @@ bool AnimData::load(IGenLoad &crd, class IMemAlloc *ma) void AnimData::Anim::setup(DumpData &d) { - AnimDataChan *p3; - AnimDataChan *quat; - - p3 = d.getChanPoint3(CHTYPE_POSITION); - if (p3) - memcpy(&pos, p3, sizeof(pos)); + AnimDataChan *ch; - p3 = d.getChanPoint3(CHTYPE_SCALE); - if (p3) - memcpy(&scl, p3, sizeof(scl)); + ch = d.getChanPoint3(CHTYPE_POSITION); + if (ch) + memcpy(&pos, ch, sizeof(pos)); - quat = d.getChanQuat(CHTYPE_ROTATION); - if (quat) - memcpy(&rot, quat, sizeof(rot)); + ch = d.getChanPoint3(CHTYPE_SCALE); + if (ch) + memcpy(&scl, ch, sizeof(scl)); + ch = d.getChanQuat(CHTYPE_ROTATION); + if (ch) + memcpy(&rot, ch, sizeof(rot)); - p3 = d.getChanPoint3(CHTYPE_ORIGIN_LINVEL); - if (p3) + ch = d.getChanPoint3(CHTYPE_ORIGIN_LINVEL); + if (ch) { - G_ASSERT(p3->nodeNum == 1); - memcpy(&originLinVel, &p3->nodeAnim[0], sizeof(originLinVel)); + G_ASSERT(ch->nodeNum == 1); + memcpy(&originLinVel, ch, sizeof(originLinVel)); } - p3 = d.getChanPoint3(CHTYPE_ORIGIN_ANGVEL); - if (p3) + ch = d.getChanPoint3(CHTYPE_ORIGIN_ANGVEL); + if (ch) { - G_ASSERT(p3->nodeNum == 1); - memcpy(&originAngVel, &p3->nodeAnim[0], sizeof(originAngVel)); + G_ASSERT(ch->nodeNum == 1); + memcpy(&originAngVel, ch, sizeof(originAngVel)); } } diff --git a/prog/engine/anim/animGraph.cpp b/prog/engine/anim/animGraph.cpp index 008c39189..b1148df95 100644 --- a/prog/engine/anim/animGraph.cpp +++ b/prog/engine/anim/animGraph.cpp @@ -31,6 +31,25 @@ using namespace AnimV20; static constexpr int PROFILE_BLENDING = 0; +struct AnimBlender::NodeSamplers +{ + struct SamplerParams + { + dag::Index16 posNode, sclNode, rotNode; + }; + + union Entry + { + AnimV20Math::PrsAnimNodeSampler sampler; + SamplerParams sp; + }; + + Entry samplers[MAX_ANIMS_IN_NODE]; + uint8_t totalNum : 8; + int32_t lastBnl : 24; +}; + + namespace perfanimgblend { PerformanceTimer2 perf_tm; @@ -708,9 +727,8 @@ void AnimBlender::TlsContext::rebuildNodeList(int bnl_count, int pbc_count, int chPrs = NULL; int req_sz = +3 * sizeof(NodeWeight) * target_node_count + sizeof(PrsResult) * target_node_count + - 2 * sizeof(WeightedNode) * target_node_count + sizeof(WeightedNode) * target_node_count + - elem_size(bnlWt) * bnl_count + elem_size(bnlCT) * bnl_count + elem_size(pbcWt) * pbc_count + - elem_size(readyMark) * target_node_count + 8; + sizeof(NodeSamplers) * target_node_count + 3 * sizeof(WeightedNode) * target_node_count + elem_size(bnlWt) * bnl_count + + elem_size(bnlCT) * bnl_count + elem_size(pbcWt) * pbc_count + elem_size(readyMark) * target_node_count + 8; char *base = (char *)dataPtr; if (req_sz <= dataPtrSz) { @@ -746,14 +764,17 @@ void AnimBlender::TlsContext::rebuildNodeList(int bnl_count, int pbc_count, int chPrs = (PrsResult *)base; base += sizeof(PrsResult) * target_node_count; - chPos = (WeightedNode *)base; - base += sizeof(WeightedNode) * target_node_count; + chXfm = (NodeSamplers *)base; + base += sizeof(NodeSamplers) * target_node_count; - chScl = (WeightedNode *)base; - base += sizeof(WeightedNode) * target_node_count; + chPos = (WeightedNode *)base; + base += sizeof(WeightedNode) * target_node_count; - chRot = (WeightedNode *)base; - base += sizeof(WeightedNode) * target_node_count; + chScl = (WeightedNode *)base; + base += sizeof(WeightedNode) * target_node_count; + + chRot = (WeightedNode *)base; + base += sizeof(WeightedNode) * target_node_count; // prepare node-wise buffer for blending bnlWt.set((real *)base, bnl_count); @@ -841,8 +862,9 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod dag::Span pbcWt = tls.pbcWt; dag::Span readyMark = tls.readyMark; NodeWeight *wtPos = tls.wtPos, *wtScl = tls.wtScl, *wtRot = tls.wtRot; - WeightedNode *chPos = tls.chPos, *chScl = tls.chScl; - WeightedNode *chRot = tls.chRot; + NodeSamplers *chXfm = tls.chXfm; + WeightedNode *chPos = tls.chPos, *chScl = tls.chScl; + WeightedNode *chRot = tls.chRot; PrsResult *chPrs = tls.chPrs; if (PROFILE_BLENDING) @@ -888,9 +910,10 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod // construct blending lists enum { - BMOD_ADDITIVE = 1 << 0, - BMOD_CHARDEP = 1 << 1, - BMOD_MOTION_MATCHING_POSE = 1 << 2 + BMOD_INDEX_MASK = (1 << 5) - 1, + BMOD_ADDITIVE = 1 << 5, + BMOD_CHARDEP = 1 << 6, + BMOD_MOTION_MATCHING_POSE = 1 << 7 }; if (bctx.irq(GIRQT_GetMotionMatchingPose, (intptr_t)&tls, 0, 0) == GIRQR_MotionMatchingPoseApplied) @@ -904,6 +927,33 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod chScl[i].blendMod[0] = BMOD_MOTION_MATCHING_POSE; } + for (i = 0; i < nodenum; i++) + { + chXfm[i].lastBnl = -1; + chXfm[i].totalNum = 0; + } + + auto add_sampler = [](NodeSamplers &smp, int i, int j, int targetChN, const AnimDataChan &chan) { + G_UNUSED(j); + G_UNUSED(targetChN); + G_UNUSED(chan); + if (DAGOR_UNLIKELY(smp.totalNum >= MAX_ANIMS_IN_NODE)) + { +#if DAGOR_DBGLEVEL > 0 + LOGERR_ONCE("xfm: Need to increase max anims for node %d/%s, j=%d, targetChN=%d: %dn", i, chan.nodeName[j].get(), j, targetChN, + smp.totalNum); +#endif + return false; + } + auto &s = smp.samplers[smp.totalNum]; + s.sp.posNode = dag::Index16(); + s.sp.sclNode = dag::Index16(); + s.sp.rotNode = dag::Index16(); + smp.totalNum++; + smp.lastBnl = i; + return true; + }; + for (i = 0; i < bnlNum; i++) { if (fabsf(bnlWt[i]) <= 1e-6f || !bnl[i] || !bnl.data()[i]->anim) @@ -912,9 +962,10 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod real wa_w = bnlWt.data()[i], w; bool additive = bnl.data()[i]->additive; - const AnimDataChan &pos = bnl.data()[i]->anim->anim.pos; - const AnimDataChan &scl = bnl.data()[i]->anim->anim.scl; - const AnimDataChan &rot = bnl.data()[i]->anim->anim.rot; + const AnimData *anim = bnl.data()[i]->anim; + const AnimDataChan &pos = anim->anim.pos; + const AnimDataChan &scl = anim->anim.scl; + const AnimDataChan &rot = anim->anim.rot; const ChannelMap &cm = bnlChan[i]; int wa_pos = bnlCT[i]; @@ -927,12 +978,11 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod if (targetChN < 0) continue; - const AnimChanPoint3 &chan = pos.nodeAnim[j]; w = pos.nodeWt[j] * wa_w; NodeWeight &ch_w = wtPos[targetChN]; - WeightedNode &ch = chPos[targetChN]; + WeightedNode &ch = chPos[targetChN]; if (ch_w.totalNum > 0 && ch.blendMod[0] == BMOD_MOTION_MATCHING_POSE && !additive) - w *= (1 - ch.blendSrc[0].w); + w *= (1 - ch.blendWt[0]); if (fabsf(w) <= 1e-6f) continue; @@ -946,8 +996,15 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod continue; } - WeightedNode::BlendSrc &bsrc = ch.blendSrc[ch_w.totalNum]; - ch.blendMod[ch_w.totalNum] = bmod; + NodeSamplers &smp = chXfm[targetChN]; + // we couldn't have already added animation for this BNL, unless there are nodes with duplicate names + if (smp.lastBnl != i) + if (!add_sampler(smp, i, j, targetChN, pos)) + continue; + smp.samplers[smp.totalNum - 1].sp.posNode = dag::Index16(j); + + ch.blendWt[ch_w.totalNum] = w; + ch.blendMod[ch_w.totalNum] = bmod | (smp.totalNum - 1); if (charDep && charDepNodeId != targetChN) ch.blendMod[ch_w.totalNum] &= ~BMOD_CHARDEP; ch.readyFlg = (ch_w.totalNum ? ch.readyFlg : 0) | (additive ? RM_POS_A : RM_POS_B); @@ -956,8 +1013,6 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod ch_w.wTotal += w; else if (ch_w.totalNum == 1) ch_w.wTotal = 1.0f; //< only additive anims for node, mark wTotal as 'used' - bsrc.w = w; - bsrc.k = chan.findKey(wa_pos, &bsrc.t); } for (j = 0; j < scl.nodeNum; j++) @@ -968,35 +1023,37 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod continue; if (charDep && charDepNodeId != targetChN) continue; - const AnimChanPoint3 &chan = scl.nodeAnim[j]; w = scl.nodeWt[j] * wa_w; NodeWeight &ch_w = wtScl[targetChN]; - WeightedNode &ch = chScl[targetChN]; + WeightedNode &ch = chScl[targetChN]; if (ch_w.totalNum > 0 && ch.blendMod[0] == BMOD_MOTION_MATCHING_POSE && !additive) - w *= (1 - ch.blendSrc[0].w); + w *= (1 - ch.blendWt[0]); if (fabsf(w) <= 1e-6f) continue; - if (ch_w.totalNum >= MAX_ANIMS_IN_NODE) { #if DAGOR_DBGLEVEL > 0 - LOGERR_ONCE("scl: Need to increase max anims for node %d/%s, j=%d, targetChN=%d: %d\n", i, pos.nodeName[j].get(), j, targetChN, + LOGERR_ONCE("scl: Need to increase max anims for node %d/%s, j=%d, targetChN=%d: %d\n", i, scl.nodeName[j].get(), j, targetChN, ch_w.totalNum); #endif continue; } - WeightedNode::BlendSrc &bsrc = ch.blendSrc[ch_w.totalNum]; - ch.blendMod[ch_w.totalNum] = bmod; + NodeSamplers &smp = chXfm[targetChN]; + if (smp.lastBnl != i) + if (!add_sampler(smp, i, j, targetChN, scl)) + continue; + smp.samplers[smp.totalNum - 1].sp.sclNode = dag::Index16(j); + + ch.blendWt[ch_w.totalNum] = w; + ch.blendMod[ch_w.totalNum] = bmod | (smp.totalNum - 1); ch.readyFlg = (ch_w.totalNum ? ch.readyFlg : 0) | (additive ? RM_SCL_A : RM_SCL_B); ch_w.totalNum++; if (!additive) ch_w.wTotal += w; else if (ch_w.totalNum == 1) ch_w.wTotal = 1.0f; //< only additive anims for node, mark wTotal as 'used' - bsrc.w = w; - bsrc.k = chan.findKey(wa_pos, &bsrc.t); } for (j = 0; j < rot.nodeNum; j++) @@ -1005,33 +1062,47 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod if (targetChN < 0) continue; - const AnimChanQuat &chan = rot.nodeAnim[j]; w = rot.nodeWt[j] * wa_w; NodeWeight &ch_w = wtRot[targetChN]; - WeightedNode &ch = chRot[targetChN]; + WeightedNode &ch = chRot[targetChN]; if (ch_w.totalNum > 0 && ch.blendMod[0] == BMOD_MOTION_MATCHING_POSE && !additive) - w *= (1 - ch.blendSrc[0].w); + w *= (1 - ch.blendWt[0]); if (w <= 1e-6f) continue; if (ch_w.totalNum >= MAX_ANIMS_IN_NODE) { #if DAGOR_DBGLEVEL > 0 - LOGERR_ONCE("rot: Need to increase max anims for node %d/%s, j=%d, targetChN=%d: %d\n", i, pos.nodeName[j].get(), j, targetChN, + LOGERR_ONCE("rot: Need to increase max anims for node %d/%s, j=%d, targetChN=%d: %d\n", i, rot.nodeName[j].get(), j, targetChN, ch_w.totalNum); #endif continue; } - WeightedNode::BlendSrc &bsrc = ch.blendSrc[ch_w.totalNum]; - ch.blendMod[ch_w.totalNum] = bmod & ~BMOD_CHARDEP; + + NodeSamplers &smp = chXfm[targetChN]; + if (smp.lastBnl != i) + if (!add_sampler(smp, i, j, targetChN, rot)) + continue; + smp.samplers[smp.totalNum - 1].sp.rotNode = dag::Index16(j); + + ch.blendWt[ch_w.totalNum] = w; + ch.blendMod[ch_w.totalNum] = (bmod & ~BMOD_CHARDEP) | (smp.totalNum - 1); ch.readyFlg = (ch_w.totalNum ? ch.readyFlg : 0) | (additive ? RM_ROT_A : RM_ROT_B); ch_w.totalNum++; if (!additive) ch_w.wTotal += w; else if (ch_w.totalNum == 1) ch_w.wTotal = 1.0f; //< only additive anims for node, mark wTotal as 'used' - bsrc.w = w; - bsrc.k = chan.findKey(wa_pos, &bsrc.t); + } + + // create added samplers + for (j = 0; j < nodenum; j++) + { + NodeSamplers &smp = chXfm[j]; + if (smp.lastBnl != i) + continue; + auto &s = smp.samplers[smp.totalNum - 1]; + new (&s.sampler, _NEW_INPLACE) decltype(s.sampler)(anim, s.sp.posNode, s.sp.rotNode, s.sp.sclNode, wa_pos); } } if (PROFILE_BLENDING) @@ -1050,34 +1121,41 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod if (!bnum || fabsf(ch_w.wTotal) < 1e-6f) continue; - WeightedNode &ch = chPos[i]; + WeightedNode &ch = chPos[i]; + NodeSamplers &smp = chXfm[i]; - WeightedNode::BlendSrc *bsrc = ch.blendSrc; + real *bwgt = ch.blendWt; uint8_t *bmod = ch.blendMod; - vec4f t4, w4, v, res = v_zero(); + vec4f w4, v, res = v_zero(); bnum--; readyMark[i] |= ch.readyFlg; - t4 = v_splats(bsrc->t); - w4 = v_splats(bsrc->w); - - v = bsrc->interp() ? AnimV20Math::interp_key(*bsrc->k, t4) : bsrc->k->p; - if (*bmod & BMOD_CHARDEP) - v = v_madd(v, cmm_scl, cmm_ofs); + if (*bmod == BMOD_MOTION_MATCHING_POSE) + { + if (!bnum) // result is already in chPrs + continue; + v = chPrs[i].pos; + } + else + { + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.samplePos(); + if (*bmod & BMOD_CHARDEP) + v = v_madd(v, cmm_scl, cmm_ofs); + } - if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(bsrc->w) > 0) + if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(*bwgt) > 0) chPrs[i].pos = v; else { + w4 = v_splats(*bwgt); vec4f inv_total = v_rcp(v_splats(ch_w.wTotal)); res = v_mul(v, !(*bmod & BMOD_ADDITIVE) ? v_mul(w4, inv_total) : w4); - bsrc++; + bwgt++; bmod++; - for (; bnum; bsrc++, bmod++, bnum--) + for (; bnum; bwgt++, bmod++, bnum--) { - t4 = v_splats(bsrc->t); - w4 = v_splats(bsrc->w); - v = bsrc->interp() ? AnimV20Math::interp_key(*bsrc->k, t4) : bsrc->k->p; + w4 = v_splats(*bwgt); + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.samplePos(); if (*bmod & BMOD_CHARDEP) v = v_madd(v, cmm_scl, cmm_ofs); @@ -1095,38 +1173,45 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod if (!bnum || fabsf(ch_w.wTotal) < 1e-6f) continue; - WeightedNode &ch = chScl[i]; + WeightedNode &ch = chScl[i]; + NodeSamplers &smp = chXfm[i]; - WeightedNode::BlendSrc *bsrc = ch.blendSrc; + real *bwgt = ch.blendWt; uint8_t *bmod = ch.blendMod; - vec4f t4, w4, v, res = v_zero(), additive_scl = V_C_ONE; + vec4f w4, v, res = v_zero(), additive_scl = V_C_ONE; bnum--; readyMark[i] |= ch.readyFlg; - t4 = v_splats(bsrc->t); - w4 = v_splats(bsrc->w); - - v = bsrc->interp() ? AnimV20Math::interp_key(*bsrc->k, t4) : bsrc->k->p; - if (*bmod & BMOD_CHARDEP) - v = v_mul(v, cmm_scl); + if (*bmod == BMOD_MOTION_MATCHING_POSE) + { + if (!bnum) // result is already in chPrs + continue; + v = chPrs[i].scl; + } + else + { + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.sampleScl(); + if (*bmod & BMOD_CHARDEP) + v = v_mul(v, cmm_scl); + } - if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(bsrc->w) > 0) + if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(*bwgt) > 0) chPrs[i].scl = v; else { + w4 = v_splats(*bwgt); vec4f inv_total = v_rcp(v_splats(ch_w.wTotal)); if (!(*bmod & BMOD_ADDITIVE)) res = v_mul(v, v_mul(w4, inv_total)); else additive_scl = v_lerp_vec4f(w4, V_C_ONE, v); - bsrc++; + bwgt++; bmod++; - for (; bnum; bsrc++, bmod++, bnum--) + for (; bnum; bwgt++, bmod++, bnum--) { - t4 = v_splats(bsrc->t); - w4 = v_splats(bsrc->w); - v = bsrc->interp() ? AnimV20Math::interp_key(*bsrc->k, t4) : bsrc->k->p; + w4 = v_splats(*bwgt); + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.sampleScl(); if (*bmod & BMOD_CHARDEP) v = v_mul(v, cmm_scl); @@ -1152,38 +1237,45 @@ bool AnimBlender::blend(TlsContext &tls, IPureAnimStateHolder &st, IAnimBlendNod if (!bnum || fabsf(ch_w.wTotal) < 1e-6f) continue; - WeightedNode &ch = chRot[i]; + WeightedNode &ch = chRot[i]; + NodeSamplers &smp = chXfm[i]; - WeightedNode::BlendSrc *bsrc = ch.blendSrc; + real *bwgt = ch.blendWt; uint8_t *bmod = ch.blendMod; vec4f v, additive_rot = V_C_UNIT_0001, res = V_C_UNIT_0001; bnum--; readyMark[i] |= ch.readyFlg; + if (*bmod == BMOD_MOTION_MATCHING_POSE) + { + if (!bnum) // result is already in chPrs + continue; + v = chPrs[i].rot; + } + else + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.sampleRot(); - v = bsrc->interp() ? AnimV20Math::interp_key(bsrc->k[0], bsrc->k[1], bsrc->t) : bsrc->k->p; - - if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(bsrc->w) > 0) + if (!bnum && !(*bmod & BMOD_ADDITIVE) && fabsf(*bwgt) > 0) chPrs[i].rot = v; else { float wsum = 0; if (!(*bmod & BMOD_ADDITIVE)) - res = v, wsum = bsrc->w; + res = v, wsum = *bwgt; else - additive_rot = v_quat_lerp(v_splats(bsrc->w), V_C_UNIT_0001, v); - bsrc++; + additive_rot = v_quat_lerp(v_splats(*bwgt), V_C_UNIT_0001, v); + bwgt++; bmod++; - for (; bnum; bsrc++, bmod++, bnum--) + for (; bnum; bwgt++, bmod++, bnum--) { - v = bsrc->interp() ? AnimV20Math::interp_key(bsrc->k[0], bsrc->k[1], bsrc->t) : bsrc->k->p; + v = smp.samplers[*bmod & BMOD_INDEX_MASK].sampler.sampleRot(); if (!(*bmod & BMOD_ADDITIVE)) { - wsum += bsrc->w; - res = (wsum != bsrc->w) ? v_quat_qslerp(safediv(bsrc->w, wsum), res, v) : v; + wsum += *bwgt; + res = (wsum != *bwgt) ? v_quat_qslerp(safediv(*bwgt, wsum), res, v) : v; } else - additive_rot = v_quat_mul_quat(additive_rot, v_quat_lerp(v_splats(bsrc->w), V_C_UNIT_0001, v)); + additive_rot = v_quat_mul_quat(additive_rot, v_quat_lerp(v_splats(*bwgt), V_C_UNIT_0001, v)); } if (!(ch.readyFlg & RM_ROT_A)) chPrs[i].rot = res; @@ -1280,33 +1372,16 @@ void AnimBlender::blendOriginVel(TlsContext &tls, IPureAnimStateHolder &st, IAni pts = v_mul(pts, v_splats(*st.getParamScalarPtr(bnl[i]->timeScaleParamId))); AnimData::Anim &a = bnl[i]->anim->anim; - AnimKeyPoint3 *klv = NULL, *kav = NULL; - float tlv = 0, tav = 0; - - if (a.originLinVel.keyNum > 0) - klv = a.originLinVel.findKey(wa_pos, &tlv); - if (a.originAngVel.keyNum > 0) - kav = a.originAngVel.findKey(wa_pos, &tav); + using Sampler = AnimV20Math::Float3AnimNodeSampler; + Sampler linVelSampler(a.originLinVel, wa_pos); + Sampler angVelSampler(a.originAngVel, wa_pos); vec3f vel; vec3f addVel = bnl[i]->addOriginVel; - if (!klv) - vel = addVel; - else if (*(int *)&tlv) - vel = v_madd(AnimV20Math::interp_key(*klv, v_splats(tlv)), ts, addVel); - else - vel = v_madd(klv->p, ts, addVel); + vel = v_madd(linVelSampler.sample(), ts, addVel); - if (kav) - { - vec3f ts_pts = v_mul(ts, pts); - - if (!*(int *)&tav) - originWVel = v_madd(kav->p, ts_pts, originWVel); - else - originWVel = v_madd(AnimV20Math::interp_key(*kav, v_splats(tav)), ts_pts, originWVel); - } + originWVel = v_madd(angVelSampler.sample(), v_mul(ts, pts), originWVel); originVel = v_madd(vel, pts, originVel); has_origin_vel = true; diff --git a/prog/engine/anim/animGraphDbg.cpp b/prog/engine/anim/animGraphDbg.cpp index 4b1c5b71a..8db74aedf 100644 --- a/prog/engine/anim/animGraphDbg.cpp +++ b/prog/engine/anim/animGraphDbg.cpp @@ -225,9 +225,9 @@ const DataBlock *AnimV20::AnimationGraph::getDebugBlenderState(AnimV20::AnimDbgC b->setInt("frame", wa_key / (TIME_TicksPerSec / 30)); ord++; - const AnimDataChan &pos = blender.bnl[i]->anim->anim.pos; - const AnimDataChan &scl = blender.bnl[i]->anim->anim.scl; - const AnimDataChan &rot = blender.bnl[i]->anim->anim.rot; + const AnimDataChan &pos = blender.bnl[i]->anim->anim.pos; + const AnimDataChan &scl = blender.bnl[i]->anim->anim.scl; + const AnimDataChan &rot = blender.bnl[i]->anim->anim.rot; const AnimBlender::ChannelMap &cm = blender.bnlChan[i]; diff --git a/prog/engine/anim/animPostBlendCtrl.cpp b/prog/engine/anim/animPostBlendCtrl.cpp index d8466cd7e..45f058145 100644 --- a/prog/engine/anim/animPostBlendCtrl.cpp +++ b/prog/engine/anim/animPostBlendCtrl.cpp @@ -1287,7 +1287,6 @@ void ApbAnimateCtrl::init(IPureAnimStateHolder &st, const GeomNodeTree &tree) void ApbAnimateCtrl::process(IPureAnimStateHolder &st, real /*w*/, GeomNodeTree &tree, AnimPostBlendCtrl::Context &) { NodeId *nodeId = (NodeId *)st.getInlinePtr(varId); - float tpos = 0, tscl = 0, trot = 0; vec3f p, s; quat4f r; @@ -1307,20 +1306,8 @@ void ApbAnimateCtrl::process(IPureAnimStateHolder &st, real /*w*/, GeomNodeTree if (!n_idx) continue; - if (AnimV20::AnimKeyPoint3 *kpos = anim[j].pos ? anim[j].pos->findKey(t, &tpos) : NULL) - p = (tpos != 0.f) ? AnimV20Math::interp_key(kpos[0], v_splats(tpos)) : kpos->p; - else - p = v_zero(); - - if (AnimV20::AnimKeyQuat *krot = anim[j].rot ? anim[j].rot->findKey(t, &trot) : NULL) - r = (trot != 0.f) ? AnimV20Math::interp_key(krot[0], krot[1], trot) : krot->p; - else - r = v_zero(); - - if (AnimV20::AnimKeyPoint3 *kscl = anim[j].scl ? anim[j].scl->findKey(t, &tscl) : NULL) - s = (tscl != 0.f) ? AnimV20Math::interp_key(kscl[0], v_splats(tscl)) : kscl->p; - else - s = V_C_ONE; + AnimV20Math::PrsAnimNodeSampler sampler(anim[j].prs, t); + sampler.sampleTransform(p, r, s); v_mat44_compose(tree.getNodeTm(n_idx), p, r, s); tree.invalidateWtm(n_idx.preceeding()); @@ -1328,8 +1315,7 @@ void ApbAnimateCtrl::process(IPureAnimStateHolder &st, real /*w*/, GeomNodeTree } } -template -static void gather_node_names_by_re(Tab &filtered_names, AnimDataChan *ad, RegExp &re) +static void gather_node_names_by_re(Tab &filtered_names, AnimDataChan *ad, RegExp &re) { PatchablePtr *nodeName = ad->nodeName; for (int i = 0, ie = ad->nodeNum; i < ie; i++) @@ -1408,17 +1394,14 @@ void ApbAnimateCtrl::createNode(AnimationGraph &graph, const DataBlock &blk) { NodeAnim &na = node->anim.push_back(); na.name = b.getStr(k); - na.pos = ad->getPoint3Anim(AnimV20::CHTYPE_POSITION, na.name); - na.rot = ad->getQuatAnim(AnimV20::CHTYPE_ROTATION, na.name); - na.scl = ad->getPoint3Anim(AnimV20::CHTYPE_SCALE, na.name); - if (!na.pos && !na.rot && !na.scl) + na.prs = ad->getPrsAnim(na.name); + if (!na.prs.valid()) { if (mandatoryNodes) G_ASSERT_LOG(0, "failed to find node <%s> in BNL '%s', block %d", na.name, bnl_nm, j); node->anim.pop_back(); } - else if (arrayNodesOnly && - ((!na.pos || na.pos->keyNum <= 1) && (!na.rot || na.rot->keyNum <= 1) && (!na.scl || na.scl->keyNum <= 1))) + else if (arrayNodesOnly && !na.prs.hasAnimation()) node->anim.pop_back(); else for (int m = 0; m < filtered_names.size(); m++) @@ -1432,17 +1415,14 @@ void ApbAnimateCtrl::createNode(AnimationGraph &graph, const DataBlock &blk) { NodeAnim &na = node->anim.push_back(); na.name = filtered_names[k]; - na.pos = ad->getPoint3Anim(AnimV20::CHTYPE_POSITION, na.name); - na.rot = ad->getQuatAnim(AnimV20::CHTYPE_ROTATION, na.name); - na.scl = ad->getPoint3Anim(AnimV20::CHTYPE_SCALE, na.name); - if (!na.pos && !na.rot && !na.scl) + na.prs = ad->getPrsAnim(na.name); + if (!na.prs.valid()) { if (mandatoryNodes) G_ASSERT_LOG(0, "failed to find node <%s> (re) in BNL '%s', block %d", na.name, bnl_nm, j); node->anim.pop_back(); } - else if ( - arrayNodesOnly && ((!na.pos || na.pos->keyNum <= 1) && (!na.rot || na.rot->keyNum <= 1) && (!na.scl || na.scl->keyNum <= 1))) + else if (arrayNodesOnly && !na.prs.hasAnimation()) node->anim.pop_back(); } clear_and_shrink(filtered_names); diff --git a/prog/engine/anim/simpleNodeAnim.cpp b/prog/engine/anim/simpleNodeAnim.cpp index e7d0fceb3..4ca4e1c32 100644 --- a/prog/engine/anim/simpleNodeAnim.cpp +++ b/prog/engine/anim/simpleNodeAnim.cpp @@ -17,66 +17,31 @@ bool SimpleNodeAnim::setTargetNode(const char *node_name) if (!anim.get()) return false; - pos = anim->getPoint3Anim(AnimV20::CHTYPE_POSITION, node_name); - rot = anim->getQuatAnim(AnimV20::CHTYPE_ROTATION, node_name); - scl = anim->getPoint3Anim(AnimV20::CHTYPE_SCALE, node_name); + prs = anim->getPrsAnim(node_name); return isValid(); } void SimpleNodeAnim::calcTimeMinMax(int &t_min, int &t_max) { - if (!pos || !rot || !scl) + if (!prs.posId || !prs.rotId || !prs.sclId) { t_min = INT_MAX; t_max = INT_MIN; return; } - t_min = pos->keyTimeFirst(); - if (t_min > rot->keyTimeFirst()) - t_min = rot->keyTimeFirst(); - if (t_min > scl->keyTimeFirst()) - t_min = scl->keyTimeFirst(); - - t_max = pos->keyTimeLast(); - if (t_max < rot->keyTimeLast()) - t_max = rot->keyTimeLast(); - if (t_max < scl->keyTimeLast()) - t_max = scl->keyTimeLast(); + t_min = prs.keyTimeFirst(); + t_max = prs.keyTimeLast(); } -void SimpleNodeAnim::calcAnimTm(TMatrix &tm, int t, int d_keys_no_blend /* = -1*/) +void SimpleNodeAnim::calcAnimTm(TMatrix &tm, int t) { - float tpos = 0, tscl = 0, trot = 0; vec3f p, s; quat4f r; - int dkeys = 0; - AnimV20::AnimKeyPoint3 *kpos = pos ? pos->findKeyEx(t, &tpos, dkeys) : NULL; - AnimV20::AnimKeyQuat *krot = rot ? rot->findKey(t, &trot) : NULL; - AnimV20::AnimKeyPoint3 *kscl = scl ? scl->findKey(t, &tscl) : NULL; - - if (dkeys <= d_keys_no_blend) - { - tpos = 0; - tscl = 0; - trot = 0; - } - - if (kpos) - p = (tpos != 0.f) ? AnimV20Math::interp_key(kpos[0], v_splats(tpos)) : kpos->p; - else - p = v_zero(); - - if (krot) - r = (trot != 0.f) ? AnimV20Math::interp_key(krot[0], krot[1], trot) : krot->p; - else - r = v_zero(); - if (kscl) - s = (tscl != 0.f) ? AnimV20Math::interp_key(kscl[0], v_splats(tscl)) : kscl->p; - else - s = V_C_ONE; + AnimV20Math::PrsAnimNodeSampler sampler(prs, t); + sampler.sampleTransform(p, r, s); tm = AnimV20Math::makeTM((Point3 &)p, (Quat &)r, (Point3 &)s); } diff --git a/prog/engine/animChar/animate2ndPass.cpp b/prog/engine/animChar/animate2ndPass.cpp index 5818e2312..34cbc37d8 100644 --- a/prog/engine/animChar/animate2ndPass.cpp +++ b/prog/engine/animChar/animate2ndPass.cpp @@ -117,9 +117,8 @@ void Animate2ndPassCtx::Ctrl::initAnimState(const GeomNodeTree &tree) am.animId = anim.getGraph().getNodeId(tree.getNodeName(i)); if (am.animId != -1) { - if (!anim.getA2D().getPoint3Anim(AnimV20::CHTYPE_POSITION, tree.getNodeName(i)) && - !anim.getA2D().getPoint3Anim(AnimV20::CHTYPE_SCALE, tree.getNodeName(i)) && - !anim.getA2D().getQuatAnim(AnimV20::CHTYPE_ROTATION, tree.getNodeName(i))) + if (!anim.getA2D().anim.pos.getNodeId(tree.getNodeName(i)) && !anim.getA2D().anim.scl.getNodeId(tree.getNodeName(i)) && + !anim.getA2D().anim.rot.getNodeId(tree.getNodeName(i))) continue; // skip not-animated node am.geomId = i; animMap.push_back(am); diff --git a/prog/engine/drv/drv3d_DX11/buffers.cpp b/prog/engine/drv/drv3d_DX11/buffers.cpp index 93b2d0e15..a56170e26 100644 --- a/prog/engine/drv/drv3d_DX11/buffers.cpp +++ b/prog/engine/drv/drv3d_DX11/buffers.cpp @@ -289,18 +289,6 @@ void close_buffers() g_inline_index_buffer.destroy(); } -void recreate_buffers() -{ - debug("recreate_buffers: %d", g_buffers.totalUsed()); - ITERATE_OVER_OBJECT_POOL(g_buffers, i) - if (g_buffers[i].obj != NULL) - { - g_buffers[i].obj->recreateBuf(g_buffers[i].obj); - watchdog_kick(); - } - ITERATE_OVER_OBJECT_POOL_RESTORE(g_buffers) -} - void gather_buffers_to_recreate(FramememResourceSizeInfoCollection &collection) { debug("gather_buffers_to_recreate: %d", g_buffers.totalUsed()); diff --git a/prog/engine/drv/drv3d_DX11/genericBuffer.cpp b/prog/engine/drv/drv3d_DX11/genericBuffer.cpp index 4019be650..d12ae5077 100644 --- a/prog/engine/drv/drv3d_DX11/genericBuffer.cpp +++ b/prog/engine/drv/drv3d_DX11/genericBuffer.cpp @@ -288,7 +288,9 @@ bool GenericBuffer::recreateBuf(Sbuffer *sb) { bool result = true; TEXQL_ON_BUF_ALLOC(this); - if (bufFlags & (SBCF_BIND_INDEX | SBCF_BIND_VERTEX)) + if (!(bufFlags & SBCF_DYNAMIC) && rld) + ; // delayed recreation, don't alloc buffer here + else if (bufFlags & (SBCF_BIND_INDEX | SBCF_BIND_VERTEX)) { result |= createBuf(); } diff --git a/prog/engine/drv/drv3d_DX11/init.cpp b/prog/engine/drv/drv3d_DX11/init.cpp index 53637a5ca..c260ea924 100644 --- a/prog/engine/drv/drv3d_DX11/init.cpp +++ b/prog/engine/drv/drv3d_DX11/init.cpp @@ -284,8 +284,6 @@ bool gamma_control_valid = false; extern eastl::vector deviceResetEventHandlers; -extern void recreate_textures(); -extern void recreate_buffers(); extern void save_predicates(); extern void recreate_predicates(); extern void gather_textures_to_recreate(FramememResourceSizeInfoCollection &); @@ -2355,14 +2353,18 @@ static void recreate_gpu_resources() gather_textures_to_recreate(resourcesToRecreate); gather_buffers_to_recreate(resourcesToRecreate); uint32_t reloadCallbacksCount = 0; + uint32_t tex_to_reload = 0, buf_to_reload = 0; for (int i = resourcesToRecreate.size() - 1; i >= 0; --i) { if (resourcesToRecreate[i].hasRecreationCallback) { + (resourcesToRecreate[i].isTex ? tex_to_reload : buf_to_reload)++; eastl::swap(resourcesToRecreate[i], resourcesToRecreate[resourcesToRecreate.size() - 1 - reloadCallbacksCount]); reloadCallbacksCount++; } } + debug("recreate_gpu_resources: %d tex + %d buf (%d recreatable of %d total)", tex_to_reload, buf_to_reload, + tex_to_reload + buf_to_reload, resourcesToRecreate.size()); stlsort::sort(resourcesToRecreate.begin(), resourcesToRecreate.end() - reloadCallbacksCount, [](const ResourceSizeInfo &a, const ResourceSizeInfo &b) { return a.sizeInBytes > b.sizeInBytes; }); for (const ResourceSizeInfo &res : resourcesToRecreate) diff --git a/prog/engine/drv/drv3d_DX11/states.cpp b/prog/engine/drv/drv3d_DX11/states.cpp index 3c63432fb..850e44ba2 100644 --- a/prog/engine/drv/drv3d_DX11/states.cpp +++ b/prog/engine/drv/drv3d_DX11/states.cpp @@ -682,7 +682,6 @@ bool TextureFetchState::Samplers::flush(unsigned shader_stage, bool force, ID3D1 else { G_ASSERTF(ss.viewObject == NULL, "slot = %d", i); - G_ASSERT(ss.stateObject == NULL); } } #endif diff --git a/prog/engine/drv/drv3d_DX11/texture.cpp b/prog/engine/drv/drv3d_DX11/texture.cpp index d3ec44977..ab055eec1 100644 --- a/prog/engine/drv/drv3d_DX11/texture.cpp +++ b/prog/engine/drv/drv3d_DX11/texture.cpp @@ -191,47 +191,6 @@ void close_textures() numLeakedTextures); } -void recreate_textures() -{ - debug("recreate_textures: %d", g_textures.totalUsed()); - // re-create textures from thumb - // acquireD3dOwnership(); - ITERATE_OVER_OBJECT_POOL(g_textures, i) - if (BaseTex *t = g_textures[i].obj) - { - bool upd_samplers = t->releaseTex(true); - if (t->rld) - { - int addrU = t->addrU, addrV = t->addrV, addrW = t->addrW; - t->delayedCreate = true; - t->rld->reloadD3dRes(t); - t->texaddru(addrU); - t->texaddrv(addrV); - t->texaddrw(addrW); - } - else if ((t->cflg & TEXCF_SYSTEXCOPY) && data_size(t->texCopy)) - { - ddsx::Header &hdr = *(ddsx::Header *)t->texCopy.data(); - int8_t sysCopyQualityId = hdr.hqPartLevels; - unsigned flg = hdr.flags & ~(hdr.FLG_ADDRU_MASK | hdr.FLG_ADDRV_MASK); - hdr.flags = flg | (t->addrU & hdr.FLG_ADDRU_MASK) | ((t->addrV << 4) & hdr.FLG_ADDRV_MASK); - - InPlaceMemLoadCB mcrd(t->texCopy.data() + sizeof(hdr), data_size(t->texCopy) - (int)sizeof(hdr)); - t->delayedCreate = true; - VERBOSE_DEBUG("%s <%s> recreate %dx%dx%d (%s)", t->strLabel(), t->getResName(), hdr.w, hdr.h, hdr.depth, "TEXCF_SYSTEXCOPY"); - d3d::load_ddsx_tex_contents(t, hdr, mcrd, sysCopyQualityId); - } - else - t->recreate(); - watchdog_kick(); - } - g_render_state.modified = true; - for (int i = 0; i < g_render_state.texFetchState.resources.size(); ++i) - g_render_state.texFetchState.resources[i].modifiedMask = 0xFFFFFFFF; - ITERATE_OVER_OBJECT_POOL_RESTORE(g_textures) - // releaseD3dOwnership(); -} - void gather_textures_to_recreate(FramememResourceSizeInfoCollection &collection) { debug("gather_textures_to_recreate: %d", g_textures.totalUsed()); diff --git a/prog/engine/drv/drv3d_DX12/debug/break_point.h b/prog/engine/drv/drv3d_DX12/debug/break_point.h index 799bf6061..097996d9f 100644 --- a/prog/engine/drv/drv3d_DX12/debug/break_point.h +++ b/prog/engine/drv/drv3d_DX12/debug/break_point.h @@ -1,11 +1,11 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once +#include "call_stack.h" #include #include #include #include -#include "call_stack.h" namespace drv3d_dx12::debug::break_point diff --git a/prog/engine/drv/drv3d_DX12/debug/call_stack_return_address.h b/prog/engine/drv/drv3d_DX12/debug/call_stack_return_address.h index 27798a94e..005668b39 100644 --- a/prog/engine/drv/drv3d_DX12/debug/call_stack_return_address.h +++ b/prog/engine/drv/drv3d_DX12/debug/call_stack_return_address.h @@ -1,9 +1,9 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -#include #include #include +#include class DataBlock; @@ -12,9 +12,9 @@ class String; #if COMMANDS_STORE_RETURN_ADDRESS #include -#include #include #include +#include namespace drv3d_dx12::debug::call_stack::return_address { diff --git a/prog/engine/drv/drv3d_DX12/debug/command_list_trace.h b/prog/engine/drv/drv3d_DX12/debug/command_list_trace.h index 89d3cef2d..31ef1879e 100644 --- a/prog/engine/drv/drv3d_DX12/debug/command_list_trace.h +++ b/prog/engine/drv/drv3d_DX12/debug/command_list_trace.h @@ -502,17 +502,19 @@ class CommandListTrace : public CommandListTraceBase otd, debug_info, vs, ps, &pipeline_base, &pipeline, count, instance_count, index_start, first_instance, topology, vertex_base}); } void drawIndirect(const OperationTraceData &otd, const call_stack::CommandData &debug_info, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { traces.emplace_back(DrawIndirectTrace{otd, debug_info, buffer, vs, ps, &pipeline_base, &pipeline}); } void drawIndexedIndirect(const OperationTraceData &otd, const call_stack::CommandData &debug_info, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { traces.emplace_back(DrawIndexedIndirectTrace{otd, debug_info, buffer, vs, ps, &pipeline_base, &pipeline}); } void dispatchIndirect(const OperationTraceData &otd, const call_stack::CommandData &debug_info, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { traces.emplace_back(DispatchIndirectTrace{otd, debug_info, buffer, state, &pipeline}); } @@ -527,8 +529,8 @@ class CommandListTrace : public CommandListTraceBase traces.emplace_back(DispatchMeshTrace{otd, debug_info, vs, ps, &pipeline_base, &pipeline, x, y, z}); } void dispatchMeshIndirect(const OperationTraceData &otd, const call_stack::CommandData &debug_info, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { traces.emplace_back(DispatchMeshIndirectTrace{otd, debug_info, args, count, vs, ps, &pipeline_base, &pipeline, max_count}); } diff --git a/prog/engine/drv/drv3d_DX12/debug/device_context_state_null.h b/prog/engine/drv/drv3d_DX12/debug/device_context_state_null.h index ee825f26e..d72190fb1 100644 --- a/prog/engine/drv/drv3d_DX12/debug/device_context_state_null.h +++ b/prog/engine/drv/drv3d_DX12/debug/device_context_state_null.h @@ -34,15 +34,15 @@ class DeviceContextState : public break_point::Controller {} void debugDrawIndirect(DeviceState &, D3DGraphicsCommandList *, const PipelineStageStateBase &, const PipelineStageStateBase &, - BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void debugDrawIndexedIndirect(DeviceState &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void debugDispatchIndirect(DeviceState &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, - BufferResourceReferenceAndOffset) + const BufferResourceReferenceAndOffset &) {} void debugDispatch(DeviceState &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, uint32_t, uint32_t, @@ -54,8 +54,8 @@ class DeviceContextState : public break_point::Controller {} void debugDispatchMeshIndirect(DeviceState &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset, - BufferResourceReferenceAndOffset, uint32_t) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &, + const BufferResourceReferenceAndOffset &, uint32_t) {} void debugBlit(DeviceState &, D3DGraphicsCommandList *) {} diff --git a/prog/engine/drv/drv3d_DX12/debug/device_context_state_pc.h b/prog/engine/drv/drv3d_DX12/debug/device_context_state_pc.h index 16a71ba1b..e53202468 100644 --- a/prog/engine/drv/drv3d_DX12/debug/device_context_state_pc.h +++ b/prog/engine/drv/drv3d_DX12/debug/device_context_state_pc.h @@ -44,17 +44,19 @@ class DeviceContextState : public break_point::Controller first_instance, topology); } void debugDrawIndirect(DeviceState &dds, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { dds.drawIndirect(getCommandData(), cmd, vs, ps, pipeline_base, pipeline, buffer); } void debugDrawIndexedIndirect(DeviceState &dds, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { dds.drawIndexedIndirect(getCommandData(), cmd, vs, ps, pipeline_base, pipeline, buffer); } void debugDispatchIndirect(DeviceState &dds, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { dds.dispatchIndirect(getCommandData(), cmd, state, pipeline, buffer); } @@ -71,8 +73,8 @@ class DeviceContextState : public break_point::Controller } void debugDispatchMeshIndirect(DeviceState &dds, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { dds.dispatchMeshIndirect(getCommandData(), cmd, vs, ps, pipeline_base, pipeline, args, count, max_count); } diff --git a/prog/engine/drv/drv3d_DX12/debug/device_state_pc.cpp b/prog/engine/drv/drv3d_DX12/debug/device_state_pc.cpp index 34949e56f..325145313 100644 --- a/prog/engine/drv/drv3d_DX12/debug/device_state_pc.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/device_state_pc.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "device_state_pc.h" #include "device.h" #if USE_PIX @@ -146,20 +147,20 @@ void DeviceState::drawIndexed(const call_stack::CommandData &debug_info, D3DGrap void DeviceState::drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset buffer) + const BufferResourceReferenceAndOffset &buffer) { globalState->postmortemTrace().drawIndirect(debug_info, cmd, vs, ps, pipeline_base, pipeline, buffer); } void DeviceState::drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset buffer) + const BufferResourceReferenceAndOffset &buffer) { globalState->postmortemTrace().drawIndexedIndirect(debug_info, cmd, vs, ps, pipeline_base, pipeline, buffer); } void DeviceState::dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, - const PipelineStageStateBase &state, ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &state, ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { globalState->postmortemTrace().dispatchIndirect(debug_info, cmd, state, pipeline, buffer); } @@ -179,7 +180,7 @@ void DeviceState::dispatchMesh(const call_stack::CommandData &debug_info, D3DGra void DeviceState::dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset args, BufferResourceReferenceAndOffset count, uint32_t max_count) + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { globalState->postmortemTrace().dispatchMeshIndirect(debug_info, cmd, vs, ps, pipeline_base, pipeline, args, count, max_count); } diff --git a/prog/engine/drv/drv3d_DX12/debug/device_state_pc.h b/prog/engine/drv/drv3d_DX12/debug/device_state_pc.h index 6e8446d1a..fcac8004b 100644 --- a/prog/engine/drv/drv3d_DX12/debug/device_state_pc.h +++ b/prog/engine/drv/drv3d_DX12/debug/device_state_pc.h @@ -29,18 +29,20 @@ class DeviceState : public call_stack::Reporter, protected event_marker::Tracker const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t count, uint32_t instance_count, uint32_t index_start, int32_t vertex_base, uint32_t first_instance, D3D12_PRIMITIVE_TOPOLOGY topology); void drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer); + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer); void dispatch(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, ComputePipeline &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMesh(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count); void blit(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd); void onDeviceRemoved(D3DDevice *device, HRESULT remove_reason); void preRecovery(); diff --git a/prog/engine/drv/drv3d_DX12/debug/global_state.cpp b/prog/engine/drv/drv3d_DX12/debug/global_state.cpp index d3a3cb7f3..9c2425296 100644 --- a/prog/engine/drv/drv3d_DX12/debug/global_state.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/global_state.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "global_state.h" #include "device.h" namespace drv3d_dx12::debug diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_capture.cpp b/prog/engine/drv/drv3d_DX12/debug/gpu_capture.cpp index 40dcce7d5..4cff4d4f0 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_capture.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_capture.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "gpu_capture.h" #include "device.h" #if USE_PIX diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem.h index 1e302d828..62cf9e84b 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem.h @@ -176,7 +176,8 @@ class GpuPostmortem } } void drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { if (isAnyActive()) { @@ -184,7 +185,8 @@ class GpuPostmortem } } void drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { if (isAnyActive()) { @@ -193,7 +195,7 @@ class GpuPostmortem } } void dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { if (isAnyActive()) { @@ -217,8 +219,8 @@ class GpuPostmortem } } void dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { if (isAnyActive()) { diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_ags_trace.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_ags_trace.h index f73c31bd4..09d4ad601 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_ags_trace.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_ags_trace.h @@ -42,13 +42,13 @@ class AgsTrace D3D12_PRIMITIVE_TOPOLOGY) {} void drawIndirect(const call_stack::CommandData &, ID3D12GraphicsCommandList2 *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void drawIndexedIndirect(const call_stack::CommandData &, ID3D12GraphicsCommandList2 *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void dispatchIndirect(const call_stack::CommandData &, ID3D12GraphicsCommandList2 *, const PipelineStageStateBase &, - ComputePipeline &, BufferResourceReferenceAndOffset) + ComputePipeline &, const BufferResourceReferenceAndOffset &) {} void dispatch(const call_stack::CommandData &, ID3D12GraphicsCommandList2 *, const PipelineStageStateBase &, ComputePipeline &, uint32_t, uint32_t, uint32_t) @@ -57,8 +57,8 @@ class AgsTrace const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, uint32_t, uint32_t, uint32_t) {} void dispatchMeshIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset, - BufferResourceReferenceAndOffset, uint32_t) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &, + const BufferResourceReferenceAndOffset &, uint32_t) {} void blit(const call_stack::CommandData &, ID3D12GraphicsCommandList2 *) {} void onDeviceRemoved(D3DDevice *, HRESULT, call_stack::Reporter &); diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.cpp b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.cpp index 7a2565d34..d17d77a11 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "gpu_postmortem_dagor_trace.h" #include "device.h" namespace drv3d_dx12::debug::gpu_postmortem::dagor @@ -139,7 +140,8 @@ void Trace::drawIndexed(const call_stack::CommandData &debug_info, D3DGraphicsCo } void Trace::drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer) { auto &list = commandListTable.getList(cmd); auto id = list.traceRecodring.record(cmd); @@ -148,7 +150,7 @@ void Trace::drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsC void Trace::drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset buffer) + const BufferResourceReferenceAndOffset &buffer) { auto &list = commandListTable.getList(cmd); auto id = list.traceRecodring.record(cmd); @@ -156,7 +158,7 @@ void Trace::drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGr } void Trace::dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, - const PipelineStageStateBase &state, ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &state, ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { auto &list = commandListTable.getList(cmd); auto id = list.traceRecodring.record(cmd); @@ -181,7 +183,7 @@ void Trace::dispatchMesh(const call_stack::CommandData &debug_info, D3DGraphicsC void Trace::dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset args, BufferResourceReferenceAndOffset count, uint32_t max_count) + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { auto &list = commandListTable.getList(cmd); auto id = list.traceRecodring.record(cmd); diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.h index 6c4d6fdf3..993d4b04c 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_dagor_trace.h @@ -76,18 +76,18 @@ class Trace const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, uint32_t, uint32_t, uint32_t, int32_t, uint32_t, D3D12_PRIMITIVE_TOPOLOGY); void drawIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset); + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &); void drawIndexedIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset); + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &); void dispatchIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, - BufferResourceReferenceAndOffset); + const BufferResourceReferenceAndOffset &); void dispatch(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, uint32_t, uint32_t, uint32_t); void dispatchMesh(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count); void blit(const call_stack::CommandData &, D3DGraphicsCommandList *); void onDeviceRemoved(D3DDevice *device, HRESULT reason, call_stack::Reporter &reporter); bool sendGPUCrashDump(const char *, const void *, uintptr_t); diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.cpp b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.cpp index 1c91af8a0..3a180de86 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "gpu_postmortem_microsoft_dred.h" #include "device.h" namespace @@ -189,20 +190,20 @@ void DeviceRemovedExtendedData::drawIndexed(const call_stack::CommandData &debug void DeviceRemovedExtendedData::drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset buffer) + const BufferResourceReferenceAndOffset &buffer) { commandListTable.getList(cmd).drawIndirect({}, debug_info, vs, ps, pipeline_base, pipeline, buffer); } void DeviceRemovedExtendedData::drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset buffer) + const BufferResourceReferenceAndOffset &buffer) { commandListTable.getList(cmd).drawIndexedIndirect({}, debug_info, vs, ps, pipeline_base, pipeline, buffer); } void DeviceRemovedExtendedData::dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, - const PipelineStageStateBase &state, ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer) + const PipelineStageStateBase &state, ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer) { commandListTable.getList(cmd).dispatchIndirect({}, debug_info, state, pipeline, buffer); } @@ -222,7 +223,7 @@ void DeviceRemovedExtendedData::dispatchMesh(const call_stack::CommandData &debu void DeviceRemovedExtendedData::dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, - BufferResourceReferenceAndOffset args, BufferResourceReferenceAndOffset count, uint32_t max_count) + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count) { commandListTable.getList(cmd).dispatchMeshIndirect({}, debug_info, vs, ps, pipeline_base, pipeline, args, count, max_count); } diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.h index 462f686f6..2eb0c395f 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_microsoft_dred.h @@ -159,18 +159,20 @@ class DeviceRemovedExtendedData const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t count, uint32_t instance_count, uint32_t index_start, int32_t vertex_base, uint32_t first_instance, D3D12_PRIMITIVE_TOPOLOGY topology); void drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer); + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer); void dispatch(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &stage, ComputePipeline &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMesh(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count); void blit(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd); void onDeviceRemoved(D3DDevice *device, HRESULT reason, call_stack::Reporter &reporter); bool sendGPUCrashDump(const char *, const void *, uintptr_t); diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_null_trace.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_null_trace.h index 0b81317e0..40ce20554 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_null_trace.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_null_trace.h @@ -32,13 +32,13 @@ class NullTrace D3D12_PRIMITIVE_TOPOLOGY) {} constexpr void drawIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} constexpr void drawIndexedIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} constexpr void dispatchIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - ComputePipeline &, BufferResourceReferenceAndOffset) + ComputePipeline &, const BufferResourceReferenceAndOffset &) {} constexpr void dispatch(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, uint32_t, uint32_t, uint32_t) @@ -47,8 +47,8 @@ class NullTrace const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, uint32_t, uint32_t, uint32_t) {} constexpr void dispatchMeshIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset, - BufferResourceReferenceAndOffset, uint32_t) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &, + const BufferResourceReferenceAndOffset &, uint32_t) {} constexpr void blit(const call_stack::CommandData &, D3DGraphicsCommandList *) {} void onDeviceRemoved(D3DDevice *, HRESULT, call_stack::Reporter &) diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.cpp b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.cpp index df1b8cbae..b8e822c2f 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "gpu_postmortem_nvidia_aftermath.h" #include "device.h" #include @@ -743,15 +744,15 @@ void Aftermath::drawIndexed(const call_stack::CommandData &, D3DGraphicsCommandL {} void Aftermath::drawIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void Aftermath::drawIndexedIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &) {} void Aftermath::dispatchIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - ComputePipeline &, BufferResourceReferenceAndOffset) + ComputePipeline &, const BufferResourceReferenceAndOffset &) {} void Aftermath::dispatch(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, ComputePipeline &, @@ -763,8 +764,8 @@ void Aftermath::dispatchMesh(const call_stack::CommandData &, D3DGraphicsCommand {} void Aftermath::dispatchMeshIndirect(const call_stack::CommandData &, D3DGraphicsCommandList *, const PipelineStageStateBase &, - const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, BufferResourceReferenceAndOffset, - BufferResourceReferenceAndOffset, uint32_t) + const PipelineStageStateBase &, BasePipeline &, PipelineVariant &, const BufferResourceReferenceAndOffset &, + const BufferResourceReferenceAndOffset &, uint32_t) {} void Aftermath::blit(const call_stack::CommandData &, D3DGraphicsCommandList *) {} diff --git a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.h b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.h index 19b1a72c2..a824aa2da 100644 --- a/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.h +++ b/prog/engine/drv/drv3d_DX12/debug/gpu_postmortem_nvidia_aftermath.h @@ -119,18 +119,20 @@ class Aftermath const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t count, uint32_t instance_count, uint32_t index_start, int32_t vertex_base, uint32_t first_instance, D3D12_PRIMITIVE_TOPOLOGY topology); void drawIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void drawIndexedIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset buffer); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &buffer); void dispatchIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &state, - ComputePipeline &pipeline, BufferResourceReferenceAndOffset buffer); + ComputePipeline &pipeline, const BufferResourceReferenceAndOffset &buffer); void dispatch(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &stage, ComputePipeline &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMesh(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, uint32_t x, uint32_t y, uint32_t z); void dispatchMeshIndirect(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd, const PipelineStageStateBase &vs, - const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, BufferResourceReferenceAndOffset args, - BufferResourceReferenceAndOffset count, uint32_t max_count); + const PipelineStageStateBase &ps, BasePipeline &pipeline_base, PipelineVariant &pipeline, + const BufferResourceReferenceAndOffset &args, const BufferResourceReferenceAndOffset &count, uint32_t max_count); void blit(const call_stack::CommandData &debug_info, D3DGraphicsCommandList *cmd); void onDeviceRemoved(D3DDevice *device, HRESULT reason, call_stack::Reporter &reporter); bool sendGPUCrashDump(const char *type, const void *data, uintptr_t size); diff --git a/prog/engine/drv/drv3d_DX12/debug/pipeline_resource_reporter.cpp b/prog/engine/drv/drv3d_DX12/debug/pipeline_resource_reporter.cpp index 0e17c02b7..7caa17b10 100644 --- a/prog/engine/drv/drv3d_DX12/debug/pipeline_resource_reporter.cpp +++ b/prog/engine/drv/drv3d_DX12/debug/pipeline_resource_reporter.cpp @@ -1,5 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. +#include "pipeline_resource_reporter.h" #include "device.h" using namespace drv3d_dx12; diff --git a/prog/engine/drv/drv3d_DX12/descriptor_heap.h b/prog/engine/drv/drv3d_DX12/descriptor_heap.h index 444f79e58..d52fb8c5f 100644 --- a/prog/engine/drv/drv3d_DX12/descriptor_heap.h +++ b/prog/engine/drv/drv3d_DX12/descriptor_heap.h @@ -497,8 +497,8 @@ enum class DescriptorReservationResult NewHeap, }; -#define DX12_USE_SIMPLER_GPU_DESCRIPTOR_HEAPS 0 -#define DX12_USE_SIMPLE_SEARCH_GPU_DESCRIPTOR_HEAPS 1 +#define DX12_USE_SIMPLER_GPU_DESCRIPTOR_HEAPS 1 +#define DX12_USE_SIMPLE_SEARCH_GPU_DESCRIPTOR_HEAPS 0 #if DX12_USE_SIMPLER_GPU_DESCRIPTOR_HEAPS class ShaderResourceViewDescriptorHeapManager { diff --git a/prog/engine/drv/drv3d_DX12/device_context.cpp b/prog/engine/drv/drv3d_DX12/device_context.cpp index e91c7206f..a3d0f2ab6 100644 --- a/prog/engine/drv/drv3d_DX12/device_context.cpp +++ b/prog/engine/drv/drv3d_DX12/device_context.cpp @@ -4097,7 +4097,8 @@ void DeviceContext::ExecutionContext::buildTopAccelerationStructure(uint32_t bat contextState.resourceStates.flushPendingUAVActions(contextState.graphicsCommandListBarrierBatch, device.currentEventPath().data(), device.validatesUserBarriers()); - contextState.resourceActivationTracker.flushAll(contextState.graphicsCommandListBarrierBatch); + if (batch_index == 0) + contextState.resourceActivationTracker.flushAll(contextState.graphicsCommandListBarrierBatch); contextState.graphicsCommandListBarrierBatch.execute(contextState.cmdBuffer); diff --git a/prog/engine/drv/drv3d_DX12/shader.h b/prog/engine/drv/drv3d_DX12/shader.h index 3f6de24b3..53780999c 100644 --- a/prog/engine/drv/drv3d_DX12/shader.h +++ b/prog/engine/drv/drv3d_DX12/shader.h @@ -15,6 +15,7 @@ #include #include #include +#include #include "driver.h" #include "shader_program_id.h" @@ -506,6 +507,8 @@ void inspect_scripted_shader_bin_dump(ScriptedShadersBinDumpOwner *dump, T inspe visited.reserve(visited.capacity() + cls.shrefStorage.size()); for (auto &prog : cls.shrefStorage) { + ::watchdog_kick(); // REMOVEME: dirty, dirty hack to work around watchdog killing us during pipeline cache loading + if constexpr (VisitOnce) if (!visited.insert((uint32_t(prog.vprId) << 16) | prog.fshId).second) continue; diff --git a/prog/engine/drv/drv3d_DX12/swapchain.h b/prog/engine/drv/drv3d_DX12/swapchain.h index 4b036816e..b14407c93 100644 --- a/prog/engine/drv/drv3d_DX12/swapchain.h +++ b/prog/engine/drv/drv3d_DX12/swapchain.h @@ -198,7 +198,7 @@ class Swapchain PresentationMode getPresentationMode() const { return presentMode; } void changePresentMode(PresentationMode mode) { presentMode = mode; } - WIN_FUNC bool isVrrSupported() const { return isTearingSupported; } + WIN_FUNC bool isVrrSupported() const { return isTearingSupported && !isInExclusiveFullscreenModeEnabled; } }; } // namespace backend } // namespace drv3d_dx12 diff --git a/prog/engine/drv/drv3d_commonCode/amdFsr3Helpers.h b/prog/engine/drv/drv3d_commonCode/amdFsr3Helpers.h index 20698fd9f..5c1426f44 100644 --- a/prog/engine/drv/drv3d_commonCode/amdFsr3Helpers.h +++ b/prog/engine/drv/drv3d_commonCode/amdFsr3Helpers.h @@ -3,6 +3,7 @@ #include "amdFsr.h" +#include #include namespace amd diff --git a/prog/engine/drv/drv3d_commonCode/free_list_utils.h b/prog/engine/drv/drv3d_commonCode/free_list_utils.h index a62a8ab6a..8f31f8bbe 100644 --- a/prog/engine/drv/drv3d_commonCode/free_list_utils.h +++ b/prog/engine/drv/drv3d_commonCode/free_list_utils.h @@ -1,8 +1,9 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -#include +#include "value_range.h" #include +#include #include diff --git a/prog/engine/drv/drv3d_commonCode/genericSbufferImplementation.h b/prog/engine/drv/drv3d_commonCode/genericSbufferImplementation.h index ae86adf97..3f25b7e92 100644 --- a/prog/engine/drv/drv3d_commonCode/genericSbufferImplementation.h +++ b/prog/engine/drv/drv3d_commonCode/genericSbufferImplementation.h @@ -1,13 +1,14 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -#include -#include +#include "drv_returnAddrStore.h" + +#include <3d/tql.h> +#include #include +#include +#include #include -#include - -#include "drv_returnAddrStore.h" template diff --git a/prog/engine/drv/drv3d_vulkan/bindless.h b/prog/engine/drv/drv3d_vulkan/bindless.h index 09afa7768..f2d2ec675 100644 --- a/prog/engine/drv/drv3d_vulkan/bindless.h +++ b/prog/engine/drv/drv3d_vulkan/bindless.h @@ -1,7 +1,6 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once -#include "util/value_range.h" #include "vulkan_device.h" #include @@ -9,6 +8,7 @@ #include #include #include +#include #include "bindless_common.h" #include "image_view_state.h" #include "buffer_ref.h" diff --git a/prog/engine/drv/drv3d_vulkan/buffer.h b/prog/engine/drv/drv3d_vulkan/buffer.h index 27de2bbcc..739cca030 100644 --- a/prog/engine/drv/drv3d_vulkan/buffer.h +++ b/prog/engine/drv/drv3d_vulkan/buffer.h @@ -3,7 +3,7 @@ #include #include -#include "util/value_range.h" +#include #include "buffer_resource.h" #include "async_completion_state.h" #include "temp_buffers.h" diff --git a/prog/engine/drv/drv3d_vulkan/driver_config.cpp b/prog/engine/drv/drv3d_vulkan/driver_config.cpp index f0ae39d0d..271f470a3 100644 --- a/prog/engine/drv/drv3d_vulkan/driver_config.cpp +++ b/prog/engine/drv/drv3d_vulkan/driver_config.cpp @@ -219,8 +219,8 @@ void DriverConfig::configurePerDeviceDriverFeatures() bits.enableDeviceExecutionTracker = true; logwarn("vulkan: enabled device execution tracker due to GPU fault on last run"); } - executionTrackerBreakpoint = - (uint64_t)execTrackerProp->getInt("breakpointHI", 0) << 32ULL | (uint64_t)execTrackerProp->getInt("breakpointLO", 0); + executionTrackerBreakpoint = ((uint64_t)execTrackerProp->getInt("breakpointHI", 0) << 32ULL) | + ((uint64_t)execTrackerProp->getInt("breakpointLO", 0) & 0xFFFFFFFF); if (executionTrackerBreakpoint) debug("vulkan: will break on execution hash %016llX", executionTrackerBreakpoint); } diff --git a/prog/engine/drv/drv3d_vulkan/execution_sync.cpp b/prog/engine/drv/drv3d_vulkan/execution_sync.cpp index a9eefd8ad..8981fce73 100644 --- a/prog/engine/drv/drv3d_vulkan/execution_sync.cpp +++ b/prog/engine/drv/drv3d_vulkan/execution_sync.cpp @@ -215,7 +215,10 @@ struct OpsProcessAlgorithm ops.arr[i].addToBarrierByTemplateDst(barrier); // if src ops did not added any stages due to suppresion or full src-less conflicts - // do src less barrier as-is + // do src less barrier as-is if synchronization2 is available + // otherwise do full commands barrier + if (!Globals::VK::phy.hasSynchronization2 && barrier.getStagesSrc() == VK_PIPELINE_STAGE_NONE) + barrier.addStagesSrc(VK_PIPELINE_STAGE_ALL_COMMANDS_BIT); } void reduceLoopRanges() diff --git a/prog/engine/drv/drv3d_vulkan/fence_manager.h b/prog/engine/drv/drv3d_vulkan/fence_manager.h index 3a0871365..f92bd7527 100644 --- a/prog/engine/drv/drv3d_vulkan/fence_manager.h +++ b/prog/engine/drv/drv3d_vulkan/fence_manager.h @@ -7,6 +7,8 @@ #include #include #include +#include "globals.h" +#include "driver_config.h" #include "vulkan_device.h" @@ -126,7 +128,14 @@ class ThreadedFence // still, use non infinite timeout, as this can be unsafe //(blocking core from being used by other threads, sometimes) #if DAGOR_DBGLEVEL > 0 && !_TARGET_ANDROID - D3D_ERROR("vulkan: timeout waiting for GPU fence, retrying wait"); + // when debug level above 0, assert on timeout + if (Globals::cfg.debugLevel > 0) + { + generateFaultReport(); + G_ASSERTF(0, "vulkan: timeout waiting for GPU fence, skip to retry"); + } + else + D3D_ERROR("vulkan: timeout waiting for GPU fence, retrying wait"); #endif waitRet = device.vkWaitForFences(device.get(), 1, ptr(fence), VK_TRUE, GENERAL_GPU_TIMEOUT_NS); } diff --git a/prog/engine/drv/drv3d_vulkan/format_store.h b/prog/engine/drv/drv3d_vulkan/format_store.h index 8edad44d6..6400b4064 100644 --- a/prog/engine/drv/drv3d_vulkan/format_store.h +++ b/prog/engine/drv/drv3d_vulkan/format_store.h @@ -4,9 +4,9 @@ #include #include #include +#include #include "util/bits.h" -#include "util/value_range.h" #include "vulkan_api.h" namespace drv3d_vulkan diff --git a/prog/engine/drv/drv3d_vulkan/image_view_state.h b/prog/engine/drv/drv3d_vulkan/image_view_state.h index 726d94d66..a4ee7e135 100644 --- a/prog/engine/drv/drv3d_vulkan/image_view_state.h +++ b/prog/engine/drv/drv3d_vulkan/image_view_state.h @@ -3,9 +3,9 @@ #include #include +#include #include "util/bits.h" -#include "util/value_range.h" #include "format_store.h" namespace drv3d_vulkan diff --git a/prog/engine/drv/drv3d_vulkan/physical_device_set.h b/prog/engine/drv/drv3d_vulkan/physical_device_set.h index e3b63d4b8..ebf8d871c 100644 --- a/prog/engine/drv/drv3d_vulkan/physical_device_set.h +++ b/prog/engine/drv/drv3d_vulkan/physical_device_set.h @@ -109,6 +109,11 @@ struct PhysicalDeviceSet Tab displays; #endif +#if VK_KHR_synchronization2 + VkPhysicalDeviceSynchronization2Features synchronization2Features = // + {VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_SYNCHRONIZATION_2_FEATURES, nullptr, false}; +#endif + bool hasDevProps2 = false; bool hasConditionalRender = false; @@ -130,6 +135,7 @@ struct PhysicalDeviceSet bool hasPageableDeviceLocalMemory = false; bool hasPipelineCreationCacheControl = false; bool hasSixteenBitStorage = false; + bool hasSynchronization2 = false; uint32_t maxBindlessTextures = 0; uint32_t maxBindlessSamplers = 0; uint32_t maxBindlessBuffers = 0; @@ -360,6 +366,13 @@ struct PhysicalDeviceSet chain_structs(target, sixteenBitStorageFeatures); } #endif + +#if VK_KHR_synchronization2 + if (hasExtension()) + { + chain_structs(target, synchronization2Features); + } +#endif } uint32_t getAvailableVideoMemoryKb() const { return deviceLocalHeapSizeKb; } @@ -593,6 +606,16 @@ struct PhysicalDeviceSet else hasSixteenBitStorage = false; #endif + +#if VK_KHR_synchronization2 + if (hasExtension()) + { + hasSynchronization2 = synchronization2Features.synchronization2; + synchronization2Features.pNext = nullptr; + } + else + hasSynchronization2 = false; +#endif } template @@ -1513,6 +1536,7 @@ struct PhysicalDeviceSet boolToStr(hasShaderFloat16), boolToStr(hasMemoryPriority), boolToStr(hasPageableDeviceLocalMemory)); apd("hasPipelineCreationCacheControl: %s", boolToStr(hasPipelineCreationCacheControl)); apd("hasSixteenBitStorage: %s", boolToStr(hasSixteenBitStorage)); + apd("hasSynchronization2: %s", boolToStr(hasSynchronization2)); } inline void print(uint32_t device_index) diff --git a/prog/engine/drv/drv3d_vulkan/util/value_range.h b/prog/engine/drv/drv3d_vulkan/util/value_range.h deleted file mode 100644 index 5d2e778bb..000000000 --- a/prog/engine/drv/drv3d_vulkan/util/value_range.h +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (C) Gaijin Games KFT. All rights reserved. -#pragma once - -#include - -template -struct ValueRange -{ - struct Iterator - { - T at = 0; - - constexpr Iterator() = default; - ~Iterator() = default; - constexpr Iterator(const Iterator &) = default; - Iterator &operator=(const Iterator &) = default; - constexpr Iterator(T v) : at(v) {} - constexpr T operator*() const { return at; } - Iterator &operator++() - { - ++at; - return *this; - } - Iterator operator++(int) { return at++; } - Iterator &operator--() - { - --at; - return *this; - } - Iterator operator--(int) { return at--; } - friend constexpr bool operator==(Iterator l, Iterator r) { return l.at == r.at; } - friend constexpr bool operator!=(Iterator l, Iterator r) { return l.at != r.at; } - }; - // inclusive - T start = 0; - // exclusive - T stop = 0; - - constexpr ValueRange() = default; - ~ValueRange() = default; - - constexpr ValueRange(const ValueRange &) = default; - ValueRange &operator=(const ValueRange &) = default; - - constexpr ValueRange(T s, T e) : start(s), stop(e) {} - // allow base type conversion - template - constexpr ValueRange(const ValueRange &o) : start(T(o.start)), stop(T(o.stop)) - {} - - void clear() { start = stop = 0; } - - constexpr T front() const { return start; } - constexpr T back() const { return stop; } - constexpr Iterator begin() const { return {start}; } - constexpr Iterator end() const { return {stop}; } - - constexpr T length() const { return stop - start; } - constexpr T size() const { return length(); } - void reset(T s, T e) - { - start = s; - stop = e; - } - constexpr bool empty() const { return start == stop; } - - template - constexpr bool isAdjacent(U v) const - { - return (v + 1) == start || v == stop; - } - template - constexpr bool isInside(U v) const - { - return v >= start && v < stop; - } - template - constexpr bool isSubRangeOf(ValueRange o) const - { - return (o.isInside(start) && o.isInside(stop)) || o.stop == stop; - } - template - constexpr bool overlaps(ValueRange o) const - { - // no overlap if - // - this comes before o - // - this comes after o - return !((stop <= o.start) || (start >= o.stop)); - } - - friend constexpr bool operator==(ValueRange l, ValueRange r) { return l.start == r.start && l.stop == r.stop; } - - friend constexpr bool operator!=(ValueRange l, ValueRange r) { return !(l == r); } - - constexpr ValueRange merge(ValueRange o) const { return {o.start < start ? o.start : start, o.stop > stop ? o.stop : stop}; } - - constexpr bool isContigous(ValueRange o) const { return stop == o.start || o.stop == start; } - - // returns start-at, turns this into at-stop - ValueRange cut(T at) - { - G_ASSERT(at >= start); - G_ASSERT(at <= stop); - ValueRange newRange(start, at); - start = at; - return newRange; - } - - // may returns a second range if o cuts this into two parts - // first part always remains in this - ValueRange cutOut(ValueRange o) - { - ValueRange other; - if (o.start <= start && o.stop > start) - { - if (o.stop >= stop) - { - // this is a subset of o, so cutting o from this results in a empty range - start = stop = 0; - } - else - { - start = o.stop; - } - } - else if (o.start < stop) - { - if (o.stop < stop) - { - other.start = o.stop; - other.stop = stop; - } - stop = o.start; - } - return other; - } - - constexpr ValueRange getOverlap(ValueRange o) const - { - ValueRange result; - if (o.start < start && o.stop > start) - { - result.start = start; - - if (o.stop < stop) - result.stop = o.stop; - else - result.stop = stop; - } - else if (o.start < stop) - { - result.start = o.start; - - if (o.stop < stop) - result.stop = o.stop; - else - result.stop = stop; - } - return result; - } - - void pop_front() { ++start; } - void pop_back() { --stop; } - void push_front() { --start; } - void push_back() { ++stop; } - - constexpr ValueRange front(T offset) const { return {T(start + offset), stop}; } - constexpr ValueRange back(T offset) const { return {T(stop - offset), stop}; } - - constexpr T operator[](T offset) const { return start + offset; } -}; - -template -inline constexpr ValueRange make_value_range(T from, U sz) -{ - return {from, T(from + sz)}; -} - -// terminator only takes one value -template -constexpr P c_max(P p) -{ - return p; -} -// max with arbitrary amount of values to pick from -template -constexpr P c_max(P p, PP... pp) -{ - return c_max(pp...) > p ? c_max(pp...) : p; -} \ No newline at end of file diff --git a/prog/engine/drv/drv3d_vulkan/vulkan_device.h b/prog/engine/drv/drv3d_vulkan/vulkan_device.h index a0caebb28..49221ef09 100644 --- a/prog/engine/drv/drv3d_vulkan/vulkan_device.h +++ b/prog/engine/drv/drv3d_vulkan/vulkan_device.h @@ -333,6 +333,14 @@ VULKAN_END_EXTENSION_FUCTION_PACK(SwapchainKHR); VULKAN_DECLARE_EXTENSION(SwapchainKHR, KHR_SWAPCHAIN); +VULKAN_MAKE_EXTENSION_FUNCTION_DEF(vkCmdPipelineBarrier2KHR) + +VULKAN_BEGIN_EXTENSION_FUNCTION_PACK +VULKAN_EXTENSION_FUNCTION_PACK_ENTRY(vkCmdPipelineBarrier2KHR) +VULKAN_END_EXTENSION_FUCTION_PACK(Synchronization2KHR); + +VULKAN_DECLARE_EXTENSION(Synchronization2KHR, KHR_SYNCHRONIZATION_2); + #if VK_EXT_debug_marker VULKAN_MAKE_EXTENSION_FUNCTION_DEF(vkDebugMarkerSetObjectTagEXT) VULKAN_MAKE_EXTENSION_FUNCTION_DEF(vkDebugMarkerSetObjectNameEXT) @@ -806,6 +814,10 @@ class VulkanDevice : public VulkanDeviceCore { diff --git a/prog/engine/lib3d/texPackMgr2.cpp b/prog/engine/lib3d/texPackMgr2.cpp index 860260bab..2a9eb9fb5 100644 --- a/prog/engine/lib3d/texPackMgr2.cpp +++ b/prog/engine/lib3d/texPackMgr2.cpp @@ -2524,7 +2524,6 @@ struct DDSxArrayTextureFactory final : public TextureFactory if (r.slice[s].hqPack && target_lev > base_lev) { RMGR.startReading(r.tid.index(), RMGR.getLevDesc(r.tid.index(), TQL_high)); - start_lev = 0; TRACE_ARRTEX("arrTex: %s %p.load[%d]: HQ %s, ofs=0x%X", texname, t, s, r.slice[s].hqPack->file->packName, r.slice[s].hqPack->texRec[r.slice[s].hqIdx].ofs); FullFileLoadCB crd(r.slice[s].hqPack->file->packName); @@ -2540,7 +2539,7 @@ struct DDSxArrayTextureFactory final : public TextureFactory crd.seekto(r.slice[s].hqPack->texRec[r.slice[s].hqIdx].ofs); TexLoadRes ldRet = - d3d_load_ddsx_to_slice(t, s, r.slice[s].hqPack->texHdr[r.slice[s].hqIdx], crd, r.quality, start_lev, resQS.getLdLev()); + d3d_load_ddsx_to_slice(t, s, r.slice[s].hqPack->texHdr[r.slice[s].hqIdx], crd, r.quality, 0, resQS.getLdLev()); if (ldRet != TexLoadRes::OK) { @@ -2574,6 +2573,34 @@ struct DDSxArrayTextureFactory final : public TextureFactory return false; } } + else if (r.slice[s].viaFactory && target_lev > base_lev) + { + TEXTUREID tid = get_managed_texture_id(r.slice[s].ddsxFn); + TRACE_ARRTEX("arrTex: %s %p.load[%d]: HQ factory(%s)=%d", texname, t, s, r.slice[s].ddsxFn, tid); + int id = RMGR.toIndex(tid); + Tab ddsx_data; + + if (RMGR.getFactory(id) && RMGR.getFactory(id)->getTextureDDSx(tid, ddsx_data)) + { + InPlaceMemLoadCB crd(ddsx_data.data(), data_size(ddsx_data)); + ddsx::Header hdr; + crd.read(&hdr, sizeof(hdr)); + + TexLoadRes ldRet = d3d_load_ddsx_to_slice(t, s, hdr, crd, r.quality, 0, resQS.getLdLev()); + if (ldRet != TexLoadRes::OK) + { + if (ldRet == TexLoadRes::ERR) + FATALERR("add_managed_array_texture(%s): d3d_load_ddsx_to_slice(%d) failed", texname, s); + return false; + } + } + else + { + FATALERR("add_managed_array_texture(%s): getTextureDDSx(%d) failed", texname, s); + return false; + } + } + if (resQS.isReading()) { t->texmiplevel(0, t->level_count() - 1); @@ -2843,17 +2870,29 @@ struct DDSxArrayTextureFactory final : public TextureFactory desc.dim.h = r.hdr.h; desc.dim.d = r.hdr.depth; desc.dim.l = r.hdr.levels; - if (!r.slice[0].hqPack) - RMGR.setLevDesc(idx, TQL_base, desc.dim.maxLev = get_log2i(max(r.hdr.w, r.hdr.h))); - else - { - auto &bhdr = r.slice[0].bqPack->texHdr[r.slice[0].bqIdx]; - RMGR.setLevDesc(idx, TQL_base, get_log2i(max(bhdr.w, bhdr.h))); - RMGR.setLevDesc(idx, TQL_high, desc.dim.maxLev = get_log2i(max(r.hdr.w, r.hdr.h))); - } + desc.dim.maxLev = get_log2i(max(r.hdr.w, r.hdr.h)); + unsigned bq_mip = 0; + RMGR.setLevDesc(idx, TQL_high, desc.dim.maxLev); + for (const auto &s : r.slice) + if (s.hqPack) + { + const auto &bhdr = s.bqPack->texHdr[s.bqIdx]; + if (!bq_mip) + { + RMGR.setLevDesc(idx, TQL_base, bq_mip = get_log2i(max(bhdr.w, bhdr.h))); + RMGR.setLevDesc(idx, TQL_high, desc.dim.maxLev); + } + else + G_ASSERTF(bq_mip == get_log2i(max(bhdr.w, bhdr.h)), + "arrtex(%s) bqMip=%d (%dx%d,L%d) in slice[%d] differs from used bqMip=%d", RMGR.getName(idx), + get_log2i(max(bhdr.w, bhdr.h)), bhdr.w, bhdr.h, bhdr.levels, &s - r.slice.data(), bq_mip); + } + if (!bq_mip) + RMGR.setLevDesc(idx, TQL_base, desc.dim.maxLev); auto &resQS = RMGR.resQS[r.tid.index()]; resQS.setQLev(desc.dim.maxLev); resQS.setMaxQL(RMGR.calcMaxQL(idx), RMGR.calcCurQL(idx, resQS.getLdLev())); + // RMGR.dumpTexState(idx); } void term_load_queue() { loadQueue.freeQueue(); } @@ -2937,7 +2976,7 @@ unsigned reload_managed_array_textures_for_changed_slice(const char *slice_tex_n slice_tex_name = TextureMetaData::decodeFileName(slice_tex_name, &tmp_stor1); for (auto &texRec : arr_tex_factory.rec) { - bool contains_tex = false; + int tex_slice_idx = -1; slicesNames.clear(); { OSSpinlockScopedLock autolock(texRec.spinlock); @@ -2945,15 +2984,15 @@ unsigned reload_managed_array_textures_for_changed_slice(const char *slice_tex_n { slicesNames.push_back() = TextureMetaData::decodeFileName( slice.bqPack ? slice.bqPack->getTextureNameById(slice.bqIdx) : slice.ddsxFn.c_str(), &tmp_stor2); - if (!contains_tex && slicesNames.back() == slice_tex_name) - contains_tex = true; + if (tex_slice_idx < 0 && slicesNames.back() == slice_tex_name) + tex_slice_idx = &slice - texRec.slice.data(); } } - if (contains_tex) + if (tex_slice_idx >= 0) { const char *arrtex_name = get_managed_texture_name(texRec.tid); - debug("reloading arrtex: %s (slice %s changed)", arrtex_name, slice_tex_name); + debug("reloading arrtex: %s (slice[%d] %s changed)", arrtex_name, tex_slice_idx, slice_tex_name); // this make_span is legal since 'SimpleString' matches layout of 'char*' update_managed_array_texture(arrtex_name, make_span((const char **)slicesNames.data(), slicesNames.size())); changed_arrtex++; diff --git a/prog/engine/osApiWrappers/syncFileIo.cpp b/prog/engine/osApiWrappers/syncFileIo.cpp index 8c4fe41bf..9ac910ae4 100644 --- a/prog/engine/osApiWrappers/syncFileIo.cpp +++ b/prog/engine/osApiWrappers/syncFileIo.cpp @@ -590,7 +590,7 @@ file_ptr_t df_mkstemp(char *templ) for (int i = 0; i < 16; ++i) { for (char *c = beg; *c; ++c) - *c = rndchars[grnd() % sizeof(rndchars)]; + *c = rndchars[grnd() % (sizeof(rndchars) - 1)]; fd = open(templ, O_RDWR | O_CREAT | O_EXCL, 0600); if (fd >= 0 || errno != EEXIST) break; diff --git a/prog/engine/shaders/shAssert.cpp b/prog/engine/shaders/shAssert.cpp index dafb8c6c0..b213b6d9d 100644 --- a/prog/engine/shaders/shAssert.cpp +++ b/prog/engine/shaders/shAssert.cpp @@ -157,9 +157,9 @@ void readback() } } + output += '\n'; + output += stackhlp_get_call_stack_str(g_stacks_on_frames[frame][it->stack_id].data(), MAX_STACK_SIZE); logerr(output); - String str = stackhlp_get_call_stack_str(g_stacks_on_frames[frame][it->stack_id].data(), MAX_STACK_SIZE); - logerr(str.c_str()); } } g_stacks_on_frames[frame].clear(); diff --git a/prog/engine/shaders/shadersCon.cpp b/prog/engine/shaders/shadersCon.cpp index c4b11e133..9f6ab2975 100644 --- a/prog/engine/shaders/shadersCon.cpp +++ b/prog/engine/shaders/shadersCon.cpp @@ -386,10 +386,7 @@ class ShadersCmdProcessor : public console::ICommandProcessor } }; -static InitOnDemand shaders_consoleproc; -static InitOnDemand shaders_reload_consoleproc; - -void shaders_register_console(bool allow_reload, const ShaderReloadCb &after_reload_cb) +void shaders_set_reload_flags() { #if (_TARGET_IOS | _TARGET_TVOS | _TARGET_ANDROID | _TARGET_C3) || DAGOR_DBGLEVEL == 0 shaders_internal::shader_reload_allowed = false; @@ -398,8 +395,16 @@ void shaders_register_console(bool allow_reload, const ShaderReloadCb &after_rel #endif shaders_internal::shader_reload_allowed = dgs_get_settings()->getBlockByNameEx("graphics")->getBool("shader_reload_allowed", shaders_internal::shader_reload_allowed); - shaders_internal::shader_reload_allowed = + shaders_internal::shader_pad_for_reload = dgs_get_settings()->getBlockByNameEx("graphics")->getInt("shader_pad_for_reload", shaders_internal::shader_pad_for_reload); +} + +static InitOnDemand shaders_consoleproc; +static InitOnDemand shaders_reload_consoleproc; + +void shaders_register_console(bool allow_reload, const ShaderReloadCb &after_reload_cb) +{ + shaders_set_reload_flags(); shaders_consoleproc.demandInit(); add_con_proc(shaders_consoleproc); if (allow_reload) diff --git a/prog/gameLibs/bvh/bvh.cpp b/prog/gameLibs/bvh/bvh.cpp index 3896c214b..c718cb4cb 100644 --- a/prog/gameLibs/bvh/bvh.cpp +++ b/prog/gameLibs/bvh/bvh.cpp @@ -309,7 +309,7 @@ void init(elem_rules_fn elem_rules_init) UniqueBVHBuffer emptyInstances( d3d::buffers::create_persistent_sr_structured(sizeof(HWInstance), 1, "empty_tlas_instances", d3d::buffers::Init::Zero)); - tlasEmpty = UniqueTLAS::create(0, RaytraceBuildFlags::NONE); + tlasEmpty = UniqueTLAS::create(0, RaytraceBuildFlags::NONE, "empty"); raytrace::TopAccelerationStructureBuildInfo buildInfo = {}; buildInfo.instanceBuffer = emptyInstances.get(); @@ -1235,11 +1235,11 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con static_assert(sizeof(HWInstance) == 64, "HWInstance size must be 64 bytes. If this changes, adjust the allocation size below."); - auto round_up = [](int value, int alignment) { return (value + alignment - 1) & ~(alignment - 1); }; + auto round_up = [](uint32_t value, uint32_t alignment) { return (value + alignment - 1) & ~(alignment - 1); }; - auto uploadSizeMain = round_up(instanceCount + grassBufferSize + gobjBufferSize, 1024); - auto uploadSizeTerrain = terrainBlases.size(); - auto uploadSizeParticles = fxBufferSize; + auto uploadSizeMain = max(round_up(instanceCount + grassBufferSize + gobjBufferSize, 1024 << 3), 1U << 17); + auto uploadSizeTerrain = round_up(terrainBlases.size() + 1, 64); + auto uploadSizeParticles = max(round_up(fxBufferSize, 1024), 1U << 13); if (context_id->tlasUploadMain && uploadSizeMain > context_id->tlasUploadMain->getNumElements()) context_id->tlasUploadMain.close(); @@ -1255,20 +1255,23 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con if (!context_id->tlasUploadMain) { context_id->tlasUploadMain = - dag::buffers::create_ua_sr_structured(sizeof(HWInstance), uploadSizeMain + 1024, ccn(context_id, "bvh_tlas_upload_main")); + dag::buffers::create_ua_sr_structured(sizeof(HWInstance), uploadSizeMain, ccn(context_id, "bvh_tlas_upload_main")); HANDLE_LOST_DEVICE_STATE(context_id->tlasUploadMain, ); + logdbg("tlasUploadMain resized to %u", uploadSizeMain); } if (!context_id->tlasUploadTerrain) { - context_id->tlasUploadTerrain = dag::buffers::create_ua_sr_structured(sizeof(HWInstance), max(uploadSizeTerrain, 100U), - ccn(context_id, "bvh_tlas_upload_terrain")); + context_id->tlasUploadTerrain = + dag::buffers::create_ua_sr_structured(sizeof(HWInstance), uploadSizeTerrain, ccn(context_id, "bvh_tlas_upload_terrain")); HANDLE_LOST_DEVICE_STATE(context_id->tlasUploadTerrain, ); + logdbg("tlasUploadTerrain resized to %u", uploadSizeTerrain); } if (!context_id->tlasUploadParticles) { - context_id->tlasUploadParticles = dag::buffers::create_ua_sr_structured(sizeof(HWInstance), uploadSizeParticles + 1000U, - ccn(context_id, "bvh_tlas_upload_particles")); + context_id->tlasUploadParticles = + dag::buffers::create_ua_sr_structured(sizeof(HWInstance), uploadSizeParticles, ccn(context_id, "bvh_tlas_upload_particles")); HANDLE_LOST_DEVICE_STATE(context_id->tlasUploadParticles, ); + logdbg("tlasUploadParticles resized to %u", uploadSizeParticles); } context_id->animatedInstanceCount = 0; @@ -1684,7 +1687,7 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con { TIME_D3D_PROFILE(copy_to_tlas_terrain_upload); if (auto upload = lock_sbuffer(context_id->tlasUploadTerrain.getBuf(), 0, 0, VBLOCK_WRITEONLY)) - memcpy(upload.get(), instanceDescs.data() + terrainDescIndex, uploadSizeTerrain * sizeof(HWInstance)); + memcpy(upload.get(), instanceDescs.data() + terrainDescIndex, terrainBlases.size() * sizeof(HWInstance)); } { @@ -1704,27 +1707,43 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con if (!context_id->tlasMain && context_id->tlasUploadMain) { - context_id->tlasMain = UniqueTLAS::create(context_id->tlasUploadMain->getNumElements(), RaytraceBuildFlags::FAST_TRACE); + context_id->tlasMain = UniqueTLAS::create(context_id->tlasUploadMain->getNumElements(), RaytraceBuildFlags::FAST_TRACE, "main"); HANDLE_LOST_DEVICE_STATE(context_id->tlasMain, ); + HANDLE_LOST_DEVICE_STATE(context_id->tlasMain.getScratchBuffer(), ); + + logdbg("Main TLAS creation for %u instances. AS size: %ukb, Scratch size: %ukb.", context_id->tlasUploadMain->getNumElements(), + context_id->tlasMain.getASSize() >> 10, context_id->tlasMain.getScratchBuffer()->getNumElements() >> 10); } if (!context_id->tlasTerrain && context_id->tlasUploadTerrain) { - context_id->tlasTerrain = UniqueTLAS::create(context_id->tlasUploadTerrain->getNumElements(), RaytraceBuildFlags::FAST_TRACE); + context_id->tlasTerrain = + UniqueTLAS::create(context_id->tlasUploadTerrain->getNumElements(), RaytraceBuildFlags::FAST_TRACE, "terrain"); HANDLE_LOST_DEVICE_STATE(context_id->tlasTerrain, ); + HANDLE_LOST_DEVICE_STATE(context_id->tlasTerrain.getScratchBuffer(), ); + + logdbg("Terrain TLAS creation for %u instances. AS size: %ukb, Scratch size: %ukb.", + context_id->tlasUploadTerrain->getNumElements(), context_id->tlasTerrain.getASSize() >> 10, + context_id->tlasTerrain.getScratchBuffer()->getNumElements() >> 10); } if (!context_id->tlasParticles && context_id->tlasUploadParticles) { - context_id->tlasParticles = UniqueTLAS::create(context_id->tlasUploadParticles->getNumElements(), RaytraceBuildFlags::FAST_TRACE); + context_id->tlasParticles = + UniqueTLAS::create(context_id->tlasUploadParticles->getNumElements(), RaytraceBuildFlags::FAST_TRACE, "particle"); HANDLE_LOST_DEVICE_STATE(context_id->tlasParticles, ); + HANDLE_LOST_DEVICE_STATE(context_id->tlasParticles.getScratchBuffer(), ); + + logdbg("Particle TLAS creation for %u instances. AS size: %ukb, Scratch size: %ukb.", + context_id->tlasUploadParticles->getNumElements(), context_id->tlasParticles.getASSize() >> 10, + context_id->tlasParticles.getScratchBuffer()->getNumElements() >> 10); } TIME_D3D_PROFILE(build_tlas); context_id->tlasMainValid = context_id->tlasMain && cpuInstanceCount; - context_id->tlasTerrainValid = context_id->tlasTerrain && uploadSizeTerrain; - context_id->tlasParticlesValid = context_id->tlasParticles && uploadSizeParticles; + context_id->tlasTerrainValid = context_id->tlasTerrain && terrainBlases.size(); + context_id->tlasParticlesValid = context_id->tlasParticles && fxBufferSize; raytrace::BatchedTopAccelerationStructureBuildInfo tlasUpdate[3]; int tlasCount = 0; @@ -1732,12 +1751,16 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con auto fillTlas = [&](const UniqueTLAS &tlas, const UniqueBuf &instances, uint32_t instance_count) { auto &tasbi = tlasUpdate[tlasCount].tasbi; + G_ASSERT(tlas.get()); + G_ASSERT(tlas.getScratchBuffer()); + tlasUpdate[tlasCount].as = tlas.get(); tasbi.doUpdate = false; tasbi.instanceBuffer = instances.getBuf(); tasbi.instanceCount = instance_count; tasbi.scratchSpaceBufferSizeInBytes = tlas.getBuildScratchSize(); - tasbi.scratchSpaceBuffer = alloc_scratch_buffer(tasbi.scratchSpaceBufferSizeInBytes, tasbi.scratchSpaceBufferOffsetInBytes); + tasbi.scratchSpaceBufferOffsetInBytes = 0; + tasbi.scratchSpaceBuffer = tlas.getScratchBuffer(); tasbi.flags = RaytraceBuildFlags::FAST_TRACE; ++tlasCount; @@ -1752,13 +1775,13 @@ void build(ContextId context_id, const TMatrix &itm, const TMatrix4 &projTm, con if (context_id->tlasTerrainValid) { - fillTlas(context_id->tlasTerrain, context_id->tlasUploadTerrain, uploadSizeTerrain); + fillTlas(context_id->tlasTerrain, context_id->tlasUploadTerrain, terrainBlases.size()); CHECK_LOST_DEVICE_STATE(); } if (context_id->tlasParticlesValid) { - fillTlas(context_id->tlasParticles, context_id->tlasUploadParticles, uploadSizeParticles); + fillTlas(context_id->tlasParticles, context_id->tlasUploadParticles, fxBufferSize); CHECK_LOST_DEVICE_STATE(); } diff --git a/prog/gameLibs/bvh/shaders/bvh.dshl b/prog/gameLibs/bvh/shaders/bvh.dshl index 98cb6a167..19211b4bb 100644 --- a/prog/gameLibs/bvh/shaders/bvh.dshl +++ b/prog/gameLibs/bvh/shaders/bvh.dshl @@ -512,7 +512,9 @@ macro USE_MAIN_BVH(stage, need_textures, need_normal, need_color, cull_back_face uint translucency = hasTranslucency ? ((instanceId >> 15) & 0xFF) : 0; instanceId = hasTranslucency ? (instanceId & 0x7FFF) : instanceId; - BVHMeta meta = bvh_meta[ instanceId ]; + bool hasPerInstanceData = instanceContributionToHitGroupIndex != 0xFFFFFFU; + + BVHMeta meta = structuredBufferAt(bvh_meta, instanceId); hitInfo.material = meta.materialType; hitInfo.albedoTextureIndex = get_albedo_texture_index(meta, hitInfo.albedoSamplerIndex); hitInfo.alphaTextureIndex = get_alpha_texture_index(meta, hitInfo.alphaSamplerIndex); @@ -525,7 +527,7 @@ macro USE_MAIN_BVH(stage, need_textures, need_normal, need_color, cull_back_face hitInfo.isCamo = is_camo(meta.materialType); hitInfo.isLayered = is_layered(meta.materialType); hitInfo.isGrass = is_grass(meta.materialType); - hitInfo.perInstanceData = bvh_per_instance_data[instanceContributionToHitGroupIndex]; + hitInfo.perInstanceData = hasPerInstanceData ? structuredBufferAt(bvh_per_instance_data, instanceContributionToHitGroupIndex) : 0; hitInfo.rawLayerData = meta.layerData; if (hitInfo.isLayered) @@ -917,7 +919,7 @@ macro USE_PARTICLE_BVH(stage) hitInfo.centerWorldPos = to_world._14_24_34 + bvh_origin; - BVHMeta meta = bvh_meta[ instanceId ]; + BVHMeta meta = structuredBufferAt(bvh_meta, instanceId); hitInfo.material = meta.materialType; hitInfo.albedoTextureIndex = get_albedo_texture_index(meta, hitInfo.albedoSamplerIndex); @@ -1259,9 +1261,9 @@ macro USE_CALC_GEOMETRY_NORMAL(stage) hlsl (stage) { float3 getHalfDepth(uint2 tci) { - return float3(half_res_depth_tex[tci].r, - half_res_depth_tex[tci + int2(1, 0)].r, - half_res_depth_tex[tci + uint2(0, 1)].r); + return float3(texture2DAt(half_res_depth_tex, tci).r, + texture2DAt(half_res_depth_tex, tci + uint2(1, 0)).r, + texture2DAt(half_res_depth_tex, tci + uint2(0, 1)).r); } float3 getDepth(uint2 tci) @@ -1284,13 +1286,15 @@ macro USE_CALC_GEOMETRY_NORMAL(stage) return (half3)worldNormal; } - half3 calc_geometry_normal(uint2 tci, float2 inv_resolution) + half3 calc_geometry_normal(uint2 tci, float2 inv_resolution, uint2 resolution) { + tci = min(tci, resolution - 2); // Prevent sampling depth over the edge of the screen. return calc_geometry_normal_depth(tci, inv_resolution, getDepth(tci)); } - half3 calc_geometry_normal_half(uint2 tci, float2 inv_resolution) + half3 calc_geometry_normal_half(uint2 tci, float2 inv_resolution, uint2 resolution) { + tci = min(tci, resolution - 2); // Prevent sampling depth over the edge of the screen. return calc_geometry_normal_depth(tci, inv_resolution, getHalfDepth(tci)); } } diff --git a/prog/gameLibs/daSkies2/shaders/brunetonSky.dshl b/prog/gameLibs/daSkies2/shaders/brunetonSky.dshl index 1d1f413b0..12418c832 100644 --- a/prog/gameLibs/daSkies2/shaders/brunetonSky.dshl +++ b/prog/gameLibs/daSkies2/shaders/brunetonSky.dshl @@ -54,9 +54,11 @@ endmacro macro BASE_FOG_MATH(code) hlsl(code) { + #include float2 get_panoramic_scattering_tc(float3 view) { - float theta = atan2( view.x, view.z ); + float theta = atan2Fast(view.x, view.z); + //float theta = atan2( view.x, view.z ); return float2(theta * (0.5/PI)+0.5, view.y*0.5 + 0.5); } float3 get_panoramic_scattering_view(float2 texcoord) diff --git a/prog/gameLibs/dasModules/common/scriptsLoader.cpp b/prog/gameLibs/dasModules/common/scriptsLoader.cpp index 091e4b6b3..69e798a68 100644 --- a/prog/gameLibs/dasModules/common/scriptsLoader.cpp +++ b/prog/gameLibs/dasModules/common/scriptsLoader.cpp @@ -125,8 +125,9 @@ bool DasScripts::loadScriptInternal(const das::string & if (enableSerialization && serializationReading) { program = das::make_smart(); - initDeserializer->thisModuleGroup = dummyLibGroup.get(); - if (initDeserializer->serializeScript(program)) + if (initDeserializer) + initDeserializer->thisModuleGroup = dummyLibGroup.get(); + if (initDeserializer && initDeserializer->serializeScript(program)) { access->getFileInfo(fname); // add script file to openedFiles to support hot reload // (other openedFiles are added later in getPrerequisites function, @@ -184,7 +185,7 @@ bool DasScripts::loadScriptInternal(const das::string & } // Do not write out anything when loading is in progress (in serveral threads) - if (enableSerialization && !serializationReading && !suppressSerialization) + if (enableSerialization && !serializationReading && !suppressSerialization && initSerializer) program->serialize(*initSerializer); das::shared_ptr ctx = das::make_shared(program->unsafe ? program->getContextStackSize() : 0); diff --git a/prog/gameLibs/ecs/gameres/gameResES.cpp.inl b/prog/gameLibs/ecs/gameres/gameResES.cpp.inl index 66f32097b..cfb40c997 100644 --- a/prog/gameLibs/ecs/gameres/gameResES.cpp.inl +++ b/prog/gameLibs/ecs/gameres/gameResES.cpp.inl @@ -84,11 +84,11 @@ void place_gameres_request(eastl::vector &&eids, gameres_list_t & job->entities = eastl::move(eids); job->reslist = eastl::move(requests); int loadingJobMgrId = get_common_loading_job_mgr(); -#if DAECS_EXTENSIVE_CHECKS - if (loadingJobMgrId == cpujobs::COREID_IMMEDIATE) - logerr("ECS common loading job mgr id isn't set - resources will be loaded synchronously.\n" - "ecs::set_common_loading_job_mgr() wasn't called?"); -#endif + if (DAGOR_UNLIKELY(loadingJobMgrId == cpujobs::COREID_IMMEDIATE)) + // Assume that's okay for dedicated (which lacks "render" tag) to load game resources synchronously + if (g_entity_mgr->getTemplateDB().info().filterTags.count(ECS_HASH("render").hash)) + logerr("ECS common loading job mgr id isn't set - resources will be loaded synchronously.\n" + "ecs::set_common_loading_job_mgr() wasn't called?"); G_VERIFY(cpujobs::add_job(loadingJobMgrId, job)); } diff --git a/prog/gameLibs/ecs/rendInst/rendinstES.cpp.gen.es.cpp b/prog/gameLibs/ecs/rendInst/rendinstES.cpp.gen.es.cpp index 1b64fe23a..eaa6d8821 100644 --- a/prog/gameLibs/ecs/rendInst/rendinstES.cpp.gen.es.cpp +++ b/prog/gameLibs/ecs/rendInst/rendinstES.cpp.gen.es.cpp @@ -33,29 +33,38 @@ static ecs::EntitySystemDesc rigrid_debug_pos_es_es_desc ecs::EventSetBuilder<>::build(), (1<()}, -//start of 1 ro components at [1] - {ECS_HASH("eid"), ecs::ComponentTypeInfo()} +//start of 5 ro components at [1] + {ECS_HASH("eid"), ecs::ComponentTypeInfo()}, + {ECS_HASH("ri_extra__handle"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL}, + {ECS_HASH("ri_extra__name"), ecs::ComponentTypeInfo()}, + {ECS_HASH("ri_extra__sendSpawnEvent"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL}, + {ECS_HASH("levelRiExtra"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL} }; -static void riextra_spawn_ri_es_event_handler_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) +static void riextra_spawn_ri_es_all_events(const ecs::Event &__restrict evt, const ecs::QueryView &__restrict components) { auto comp = components.begin(), compE = components.end(); G_ASSERT(comp!=compE); do - riextra_spawn_ri_es_event_handler(evt - , ECS_RW_COMP(riextra_spawn_ri_es_event_handler_comps, "ri_extra", RiExtraComponent) - , ECS_RO_COMP(riextra_spawn_ri_es_event_handler_comps, "eid", ecs::EntityId) + riextra_spawn_ri_es(evt + , components.manager() + , ECS_RW_COMP(riextra_spawn_ri_es_comps, "ri_extra", RiExtraComponent) + , ECS_RO_COMP(riextra_spawn_ri_es_comps, "eid", ecs::EntityId) + , ECS_RO_COMP_PTR(riextra_spawn_ri_es_comps, "ri_extra__handle", rendinst::riex_handle_t) + , ECS_RO_COMP(riextra_spawn_ri_es_comps, "ri_extra__name", ecs::string) + , ECS_RO_COMP_PTR(riextra_spawn_ri_es_comps, "ri_extra__sendSpawnEvent", ecs::Tag) + , ECS_RO_COMP_PTR(riextra_spawn_ri_es_comps, "levelRiExtra", ecs::Tag) ); while (++comp != compE); } -static ecs::EntitySystemDesc riextra_spawn_ri_es_event_handler_es_desc +static ecs::EntitySystemDesc riextra_spawn_ri_es_es_desc ( "riextra_spawn_ri_es", "prog/gameLibs/ecs/rendInst/./rendinstES.cpp.inl", - ecs::EntitySystemOps(nullptr, riextra_spawn_ri_es_event_handler_all_events), - make_span(riextra_spawn_ri_es_event_handler_comps+0, 1)/*rw*/, - make_span(riextra_spawn_ri_es_event_handler_comps+1, 1)/*ro*/, + ecs::EntitySystemOps(nullptr, riextra_spawn_ri_es_all_events), + make_span(riextra_spawn_ri_es_comps+0, 1)/*rw*/, + make_span(riextra_spawn_ri_es_comps+1, 5)/*ro*/, empty_span(), empty_span(), ecs::EventSetBuilder::build(), 0 -); +,nullptr,nullptr,nullptr,"riextra_spawn_ri_es"); static constexpr ecs::ComponentDesc rendinst_with_handle_move_es_event_handler_comps[] = { //start of 2 rw components at [0] diff --git a/prog/gameLibs/ecs/rendInst/rendinstES.cpp.inl b/prog/gameLibs/ecs/rendInst/rendinstES.cpp.inl index 4bda24426..13b8d66e0 100644 --- a/prog/gameLibs/ecs/rendInst/rendinstES.cpp.inl +++ b/prog/gameLibs/ecs/rendInst/rendinstES.cpp.inl @@ -262,29 +262,29 @@ struct DelayedSpawnRiExtra final : public DelayedAction, public eastl::intrusive int resIdx = rendinst::getRIGenExtraResIdx(name); const rendinst::riex_handle_t handle = spawn_ri_extra(mgr, eid, resIdx, name); mgr.getRW(eid, ECS_HASH("ri_extra")).handle = handle; - if (nullptr != mgr.getNullable(eid, ECS_HASH("ri_extra__sendSpawnEvent"))) + if (mgr.getNullable(eid, ECS_HASH("ri_extra__sendSpawnEvent"))) g_entity_mgr->sendEventImmediate(eid, EventRendinstSpawned()); - if (nullptr != mgr.getNullable(eid, ECS_HASH("levelRiExtra"))) + if (mgr.getNullable(eid, ECS_HASH("levelRiExtra"))) g_entity_mgr->broadcastEventImmediate(EventRendinstInitForLevel(handle)); } }; ECS_ON_EVENT(on_appear) -static void riextra_spawn_ri_es_event_handler(const ecs::Event &, RiExtraComponent &ri_extra, ecs::EntityId eid) +static void riextra_spawn_ri_es(const ecs::Event &, ecs::EntityManager &manager, RiExtraComponent &ri_extra, ecs::EntityId eid, + const rendinst::riex_handle_t *ri_extra__handle, const ecs::string &ri_extra__name, const ecs::Tag *ri_extra__sendSpawnEvent, + const ecs::Tag *levelRiExtra) { - const ecs::EntityManager &mgr = *g_entity_mgr; - if (mgr.getOr(eid, ECS_HASH("ri_extra__handle"), rendinst::RIEX_HANDLE_NULL) != rendinst::RIEX_HANDLE_NULL) + if (ri_extra__handle && *ri_extra__handle != rendinst::RIEX_HANDLE_NULL) return; - const char *name = mgr.get(eid, ECS_HASH("ri_extra__name")).c_str(); if (rendinst::isRiExtraLoaded() && DelayedSpawnRiExtra::dyn_riex_creation_queue.empty()) { - ri_extra.handle = spawn_ri_extra(mgr, eid, rendinst::getRIGenExtraResIdx(name), name); + ri_extra.handle = spawn_ri_extra(manager, eid, rendinst::getRIGenExtraResIdx(ri_extra__name.c_str()), ri_extra__name.c_str()); // this event is required for WT, so this tag is used purely to avoid sending extra events in DNG, // if you ever need this event, remove this check entirely - if (nullptr != mgr.getNullable(eid, ECS_HASH("ri_extra__sendSpawnEvent"))) - g_entity_mgr->sendEventImmediate(eid, EventRendinstSpawned()); - if (nullptr != mgr.getNullable(eid, ECS_HASH("levelRiExtra"))) - g_entity_mgr->broadcastEventImmediate(EventRendinstInitForLevel(ri_extra.handle)); + if (ri_extra__sendSpawnEvent) + manager.sendEventImmediate(eid, EventRendinstSpawned()); + if (levelRiExtra) + manager.broadcastEventImmediate(EventRendinstInitForLevel(ri_extra.handle)); } else { @@ -443,6 +443,7 @@ static __forceinline void rendinst_track_move_es_event_handler(const ecs::Event } ECS_ON_EVENT(on_appear, EventRendinstsLoaded) +ECS_AFTER(riextra_spawn_ri_es) static __forceinline void rendinst_move_es_event_handler(const ecs::Event &, RiExtraComponent &ri_extra, const TMatrix &transform, Point3 *ri_extra__bboxMin, Point3 *ri_extra__bboxMax) { diff --git a/prog/gameLibs/ecs/scripts/das/das_es.cpp b/prog/gameLibs/ecs/scripts/das/das_es.cpp index c48b144c2..49b7054e8 100644 --- a/prog/gameLibs/ecs/scripts/das/das_es.cpp +++ b/prog/gameLibs/ecs/scripts/das/das_es.cpp @@ -1842,7 +1842,7 @@ static bool load_scripts_from_serialized_data() { uint64_t size = 0; das::vector filenames; - bool ok = initDeserializer->trySerialize([&](das::AstSerializer &ser) { + bool ok = initDeserializer && initDeserializer->trySerialize([&](das::AstSerializer &ser) { ser << size; for (size_t i = 0; i < size; i++) { @@ -1870,7 +1870,8 @@ static bool load_scripts_from_serialized_data() script.moduleGroup->reset(); } // collect created file infos that no module owns - initDeserializer->collectFileInfo(scripts.orphanFileInfos); + if (initDeserializer) + initDeserializer->collectFileInfo(scripts.orphanFileInfos); enableSerialization = false; loadingQueue.clear(); // clear the queue #if DAGOR_DBGLEVEL > 0 @@ -1933,7 +1934,7 @@ bool stop_loading_queue(TInitDas init) ok = jobs[i].success && ok; } - if (enableSerialization && !serializationReading) + if (enableSerialization && !serializationReading && initSerializer) { uint64_t filesCount = 0; for (auto &fname : queue) @@ -2089,6 +2090,8 @@ static auto get_serialization_scripts_version() -> das::vector static bool compare_loading_queues() { + if (!initDeserializer) + return false; das::vector savedQueue; if (!bind_dascript::initDeserializer->trySerialize([&](das::AstSerializer &ser) { ser << savedQueue; })) { @@ -2115,6 +2118,8 @@ static bool compare_loading_queues() static void write_serializer_version() { + if (!bind_dascript::initSerializer) + return; uint32_t ptrsize = sizeof(void *), protocolVersion = bind_dascript::initSerializer->getVersion(); debug("das: serialize: Versions differ: init from text files, writeback the result. Game version: %lu, protocol version: %lu, " "ptrsize: %@", @@ -2151,9 +2156,15 @@ bool load_entry_script_with_serialization(const char *entry_point_name, TInitDas { set_up_serializer_versions(serialized_version); if (serializationReading) - initDeserializer->getCompiledModules(); + { + if (initDeserializer) + initDeserializer->getCompiledModules(); + } else - initSerializer->getCompiledModules(); + { + if (initSerializer) + initSerializer->getCompiledModules(); + } enableSerialization = true; res = stop_loading_queue(init); enableSerialization = false; diff --git a/prog/gameLibs/fftWater/waterRender.cpp b/prog/gameLibs/fftWater/waterRender.cpp index 43590fe96..74cb83b21 100644 --- a/prog/gameLibs/fftWater/waterRender.cpp +++ b/prog/gameLibs/fftWater/waterRender.cpp @@ -968,7 +968,7 @@ void WaterNVRender::calculateGradients() d3d::set_render_target(i, gradient[i].getTex2D(), 0); } - d3d::clearview(CLEAR_DISCARD_TARGET, 0, 0, 0); + d3d::clearview(CLEAR_TARGET, 0, 0, 0); gradientRenderer.render(); if (hasFoam) diff --git a/prog/gameLibs/folders/jamfile b/prog/gameLibs/folders/jamfile index 5479e35c7..af3897c37 100644 --- a/prog/gameLibs/folders/jamfile +++ b/prog/gameLibs/folders/jamfile @@ -13,10 +13,12 @@ AddIncludes = Sources = folders.cpp ; if $(Platform) in windows { - Sources += - platform/windows.cpp - platform/common.cpp - ; + Sources += platform/common.cpp ; + if $(UseGDK) = no { + Sources += platform/windows.cpp ; + } else { + Sources += platform/xbox.cpp ; + } } if $(Platform) = linux { diff --git a/prog/gameLibs/gamePhys/phys/destrRender/destructablesRender.cpp b/prog/gameLibs/gamePhys/phys/destrRender/destructablesRender.cpp index f69bb5179..413e2d4a7 100644 --- a/prog/gameLibs/gamePhys/phys/destrRender/destructablesRender.cpp +++ b/prog/gameLibs/gamePhys/phys/destrRender/destructablesRender.cpp @@ -111,7 +111,8 @@ destructables::DestrRendData *destructables::init_rend_data(DynamicPhysObjectCla : NULL; } - rdata->deformationId = deform_create_instance_cb ? deform_create_instance_cb(rdata) : -1; + // TODO: pass true to a sec arg if it needs to be fully deformed (i.e. - by explosion) + rdata->deformationId = deform_create_instance_cb ? deform_create_instance_cb(rdata, false) : -1; return rdata; } diff --git a/prog/gameLibs/gamePhys/phys/destructableObject.cpp b/prog/gameLibs/gamePhys/phys/destructableObject.cpp index 9ac06aa5e..710f33ac8 100644 --- a/prog/gameLibs/gamePhys/phys/destructableObject.cpp +++ b/prog/gameLibs/gamePhys/phys/destructableObject.cpp @@ -15,6 +15,8 @@ #include #include <3d/dag_render.h> #include +#include +#include #include #include @@ -28,27 +30,28 @@ static int default_fgroup = dacoll::EPL_DEFAULT; static constexpr int default_fmask = dacoll::EPL_ALL; } // namespace destructables -DestructableObject::DestructableObject(DynamicPhysObjectData *po_data, float scale_dt, const TMatrix &tm, PhysWorld *phys_world, - int res_idx, uint32_t hash_val, const DataBlock *blk) : +DestructableObject::DestructableObject(const destructables::DestructableCreationParams ¶ms, PhysWorld *phys_world, + float scale_dt) : scaleDt(scale_dt), - physObj(DynamicPhysObject::create(po_data, phys_world, tm, destructables::default_fgroup, destructables::default_fmask)), - resIdx(res_idx) + physObj( + DynamicPhysObject::create(params.physObjData, phys_world, params.tm, destructables::default_fgroup, destructables::default_fmask)), + resIdx(params.resIdx) { mat44f tm44; - v_mat44_make_from_43cu_unsafe(tm44, tm.array); + v_mat44_make_from_43cu_unsafe(tm44, params.tm.array); mat43f m43; v_mat44_transpose_to_mat43(m43, tm44); v_stu(&intialTmAndHash[0].x, m43.row0); v_stu(&intialTmAndHash[1].x, m43.row1); v_stu(&intialTmAndHash[2].x, m43.row2); - memcpy(&intialTmAndHash[3].x, &hash_val, sizeof(hash_val)); - - if (blk) - { - ttl = blk->getReal("timeToLive", ttl); - defaultTimeToLive = blk->getReal("timeForBodies", defaultTimeToLive); - timeToKinematic = blk->getReal("timeToKinematic", timeToKinematic); - } + memcpy(&intialTmAndHash[3].x, ¶ms.hashVal, sizeof(params.hashVal)); + + if (params.timeToLive >= 0.0f) + ttl = params.timeToLive; + if (params.defaultTimeToLive >= 0.0f) + defaultTimeToLive = params.defaultTimeToLive; + if (params.timeToKinematic >= 0.0f) + timeToKinematic = params.timeToKinematic; clear_and_resize(ttlBodies, physObj->getPhysSys()->getBodyCount()); for (int i = 0; i < ttlBodies.size(); ++i) ttlBodies[i] = defaultTimeToLive; @@ -236,6 +239,7 @@ static float distForScaleDtSq; static float maxScaleDt; float minDestrRadiusSq; static float overflowReportTimeout = 0.0f; +static bool errorOnBodiesOverflow = true; void init(const DataBlock *blk, int fgroup) { @@ -245,26 +249,30 @@ void init(const DataBlock *blk, int fgroup) distForScaleDtSq = sqr(destrBlk->getReal("distForScaleDt", 100.f)); maxScaleDt = destrBlk->getReal("maxScaleDt", 3.f); minDestrRadiusSq = sqr(destrBlk->getReal("minDestrRadius", 40.f)); + errorOnBodiesOverflow = destrBlk->getBool("errorOnBodiesOverflow", true); default_fgroup = fgroup; if (!destructablesListAllocator.isInited()) destructablesListAllocator.init(sizeof(DestructableObject), (4096 * 2 - 16) / sizeof(DestructableObject)); } -destructables::id_t addDestructable(gamephys::DestructableObject **out_destr, DynamicPhysObjectData *po_data, const TMatrix &tm, - PhysWorld *phys_world, const Point3 &cam_pos, int res_idx, uint32_t hash_val, const DataBlock *blk) +destructables::id_t addDestructable(gamephys::DestructableObject **out_destr, const DestructableCreationParams ¶ms, + PhysWorld *phys_world) { - float scaleDt = 1.f; - if (distForScaleDtSq > 0.f) + G_ASSERT_RETURN(params.physObjData, nullptr); + + float scaleDt = params.scaleDt >= 0.0f ? params.scaleDt : 1.f; + if (params.scaleDt < 0.0f && distForScaleDtSq > 0.f) //-V1051 { - float distSq = (cam_pos - tm.getcol(3)).lengthSq(); + float distSq = (params.camPos - params.tm.getcol(3)).lengthSq(); if (distSq > distForScaleDtSq) scaleDt = clamp(sqrtf(distSq / distForScaleDtSq), 1.f, maxScaleDt); } + void *mem = destructablesListAllocator.allocateOneBlock(); DestructableObject *obj = nullptr; { TIME_PROFILE(addDestructable__DestructableObject_ctor); - obj = new (mem, _NEW_INPLACE) DestructableObject(po_data, scaleDt, tm, phys_world, res_idx, hash_val, blk); + obj = new (mem, _NEW_INPLACE) DestructableObject(params, phys_world, scaleDt); } destructablesList.emplace_back(obj); if (out_destr) @@ -272,6 +280,25 @@ destructables::id_t addDestructable(gamephys::DestructableObject **out_destr, Dy return obj; // To consider: we can use high 16 bit of pointer for storing generation (for safety) } +id_t addDestructable(gamephys::DestructableObject **out_destr, DynamicPhysObjectData *po_data, const TMatrix &tm, + PhysWorld *phys_world, const Point3 &cam_pos, int res_idx, uint32_t hash_val, const DataBlock *blk) +{ + DestructableCreationParams params; + params.physObjData = po_data; + params.tm = tm; + params.camPos = cam_pos; + params.resIdx = res_idx; + params.hashVal = hash_val; + if (blk) + { + params.timeToLive = blk->getReal("timeToLive", -1.0f); + params.defaultTimeToLive = blk->getReal("timeForBodies", -1.0f); + params.timeToKinematic = blk->getReal("timeToKinematic", -1.0f); + } + return addDestructable(out_destr, params, phys_world); +} + + void clear() { clear_and_shrink(destructablesList); @@ -285,6 +312,47 @@ void removeDestructableById(id_t id) static_cast(id)->markForDelete(); } +void overflowHandler() +{ + String msg(framemem_ptr()); + msg.printf(0, "destructables::update: too many destructable bodies %d, max - %d", numActiveBodies, maxNumberOfDestructableBodies); + +#if DAGOR_DBGLEVEL > 0 + const bool forceErrorOnOverflow = errorOnBodiesOverflow; +#else + const bool forceErrorOnOverflow = false; +#endif + + if (!forceErrorOnOverflow) + { + logwarn(msg.c_str()); + return; + } + +#if DAGOR_DBGLEVEL > 0 + String fullMsg(framemem_ptr()); + fullMsg.append(msg); + for (const auto &i : destructablesList) + { + const auto *physObj = i->getPhysObj(); + G_ASSERT_CONTINUE(physObj); + + for (int n = 0; n < physObj->getModelCount(); ++n) + { + DynamicRenderableSceneInstance *inst = physObj->getModel(n); + DynamicRenderableSceneLodsResource *lods = inst->getLodsResource(); + + String name; + String resMsg(framemem_ptr()); + resolve_game_resource_name(name, lods); + resMsg.printf(0, "\n res: %s, active bodies: %d", name.c_str(), i->getNumActiveBodies()); + fullMsg.append(resMsg); + } + } + logerr(fullMsg.c_str()); +#endif +} + void update(float dt) { TIME_PROFILE(destructables_update); @@ -314,12 +382,7 @@ void update(float dt) if (overflowReportTimeout <= 0.0f) { overflowReportTimeout = 1.0f; -#if DAGOR_DBGLEVEL > 0 - logerr( -#else - logwarn( -#endif - "destructables::update: too many destructable bodies %d, max - %d", numActiveBodies, maxNumberOfDestructableBodies); + overflowHandler(); } // Cleanup first those bodies that are falling through, then all old ones diff --git a/prog/gameLibs/gamePhys/phys/rendinstDestr.cpp b/prog/gameLibs/gamePhys/phys/rendinstDestr.cpp index 989be6a6e..7595d2033 100644 --- a/prog/gameLibs/gamePhys/phys/rendinstDestr.cpp +++ b/prog/gameLibs/gamePhys/phys/rendinstDestr.cpp @@ -221,7 +221,8 @@ class RestorableRendinst rendinst::riex_handle_t restore() { rendinst::riex_handle_t h = rendinst::restoreRiGenDestr(riDesc, riBuffer); - VERBOSE_SYNC("restored ri (likely no sync received) desc:" FMT_DESC_STR, FMT_DESC_V(riDesc)); + VERBOSE_SYNC("restored ri (likely no sync received) desc:" FMT_DESC_STR " restored:%i", FMT_DESC_V(riDesc), + h != rendinst::RIEX_HANDLE_NULL); rendinst::delRIGenExtra(generatedHandle); destructables::removeDestructableById(destrId); if (rem_tree_cb) @@ -291,7 +292,8 @@ void rendinstdestr::init_ex(rendinstdestr::on_destr_changed_callback on_destr_cb } void rendinstdestr::init(rendinstdestr::on_destr_changed_callback on_destr_cb, bool apply_pending, - create_tree_rend_inst_destr_cb create_tree_destr_cb, remove_tree_rendinst_destr_cb rem_tree_destr_cb, ri_tree_sound_cb tree_sound_cb) + create_tree_rend_inst_destr_cb create_tree_destr_cb, remove_tree_rendinst_destr_cb rem_tree_destr_cb, ri_tree_sound_cb tree_sound_cb, + get_camera_pos get_camera_pos_cb) { on_changed_destr_cb = on_destr_cb; rendinst::enable_apex = false; @@ -304,6 +306,7 @@ void rendinstdestr::init(rendinstdestr::on_destr_changed_callback on_destr_cb, b rem_physx_collision_obj_cb = nullptr; create_apex_actors_at_point_cb = nullptr; apex_force_remove_actor_cb = nullptr; + get_current_camera_pos = get_camera_pos_cb; debugTreeInstData.branchDestr = get_tree_destr().branchDestr; } @@ -442,6 +445,22 @@ static void findRendinstNeighbors(rendinst::RendInstDesc desc, int destroy_neigh rendinst::testObjToRIGenIntersection(localBBox, coll_info->tm, rendinstCallback, rendinst::GatherRiTypeFlag::RiExtraOnly); } + +void rendinstdestr::fill_ri_destructable_params(destructables::DestructableCreationParams ¶ms, const rendinst::RendInstDesc &desc, + DynamicPhysObjectData *po_data, const TMatrix &tm) +{ + params.physObjData = po_data; + params.tm = tm; + if (get_current_camera_pos) + params.camPos = get_current_camera_pos(); + const rendinst::riex_handle_t riexHandle = desc.getRiExtraHandle(); + params.resIdx = desc.pool; + params.hashVal = riexHandle != rendinst::RIEX_HANDLE_NULL ? rendinst::get_riextra_instance_seed(riexHandle) : 0; + params.timeToLive = riexHandle != rendinst::RIEX_HANDLE_NULL ? rendinst::get_riextra_destr_time_to_live(riexHandle) : 15.0f; + params.timeToKinematic = + riexHandle != rendinst::RIEX_HANDLE_NULL ? rendinst::get_riextra_destr_time_to_kinematic(riexHandle) : -1.0f; +} + static rendinst::RendInstDesc destroyRendinstInternal(rendinst::RendInstDesc desc, bool add_restorable, const Point3 &pos, const Point3 &impulse, float at_time, const rendinst::CollisionInfo *coll_info, bool create_destr_effects, ApexDmgInfo *apex_dmg_info, rendinstdestr::on_destr_callback on_destr_cb, rendinst::DestrOptionFlags flags) @@ -470,7 +489,6 @@ static rendinst::RendInstDesc destroyRendinstInternal(rendinst::RendInstDesc des else mainTm = rendinst::getRIGenMatrixDestr(desc); - const uint32_t instSeed = desc.isRiExtra() ? rendinst::get_riextra_instance_seed(desc.getRiExtraHandle()) : 0; rendinst::RendInstBufferData riBuffer; DynamicPhysObjectData *poData = NULL; rendinst::RendInstDesc offsetedDesc; @@ -479,6 +497,9 @@ static rendinst::RendInstDesc destroyRendinstInternal(rendinst::RendInstDesc des offsetedDesc = rendinst::get_restorable_desc(desc); // Desc with offs set to restorable_desc.offs offsetedDesc.idx = desc.idx; } + const bool canAddRestorable = add_restorable && offsetedDesc.isValid() && (offsetedDesc.isRiExtra() || offsetedDesc.layer == 0) && + rendinstdestr::get_destr_settings().isNetClient && coll_info; + rendinst::riex_handle_t createdDestroyedRiexHandle = rendinst::RIEX_HANDLE_NULL; // New riex replacing destroyed dacoll::invalidate_ri_instance(desc); // do before destring, otherwise in riextra we'll lose unique data and will not be able to // compare them @@ -494,11 +515,15 @@ static rendinst::RendInstDesc destroyRendinstInternal(rendinst::RendInstDesc des rendinst::onRiExtraDestruction(rendinst::make_handle(desc.pool, desc.idx), true, userData, impulse, pos); else if (add_restorable) { + if (canAddRestorable) + call_restorable_rendinst_cb(offsetedDesc, rendinstdestr::RRS_CREATED); // call restored cb BEFORE destroying, so it will be + // called, before handle is invalidated const Point3 *collPoint = (pos == ZERO()) ? nullptr : &pos; poData = rendinst::doRIGenDestr(desc, riBuffer, create_destr_effects ? ri_effect_cb : nullptr, createdDestroyedRiexHandle, userData, collPoint, &outRiRemoved, flags, impulse, pos); - if (desc.isRiExtra() && rendinstdestr::get_destr_settings().isNetClient && coll_info && offsetedDesc.isValid()) - call_restorable_rendinst_cb(offsetedDesc, rendinstdestr::RRS_CREATED); + if (canAddRestorable && !outRiRemoved) + call_restorable_rendinst_cb(offsetedDesc, rendinstdestr::RRS_RESTORED); // not destroyed - call restored cb to rollback previous + // call } else poData = rendinst::doRIGenDestrEx(desc, create_destr_effects ? ri_effect_cb : nullptr, userData); @@ -542,24 +567,25 @@ static rendinst::RendInstDesc destroyRendinstInternal(rendinst::RendInstDesc des destructables::id_t destrId = destructables::INVALID_ID; if (!apex_asset_created && poData && create_destr_effects) //-V560 { - gamephys::DestructableObject *destr = NULL; - const Point3 &campos = get_current_camera_pos ? get_current_camera_pos() : mainTm.getcol(3); - destrId = destructables::addDestructable(&destr, poData, mainTm, phys_world, campos, desc.pool, instSeed); + destructables::DestructableCreationParams params; + rendinstdestr::fill_ri_destructable_params(params, desc, poData, mainTm); + gamephys::DestructableObject *destr = nullptr; + destrId = destructables::addDestructable(&destr, params, phys_world); if (destr) //-V1051 { - destr->ttl = desc.isRiExtra() ? rendinst::getTtl(desc) : 15.f; if (impulse != ZERO()) destr->addImpulse(*phys_world, pos, impulse); } } - if (add_restorable && rendinstdestr::get_destr_settings().isNetClient && coll_info && outRiRemoved) + if (canAddRestorable && outRiRemoved) { // At this point coll_info->desc might be invalid, since 'on_destr_cb' can // call 'reset' on it, but we need proper coll_info for restorable so that // vehicle collisions could be checked against it, so copy proper desc over. rendinst::CollisionInfo tmp = *coll_info; tmp.desc = desc; + VERBOSE_SYNC("added restorable desc:" FMT_DESC_STR, FMT_DESC_V(offsetedDesc)); restorables.emplace_back(offsetedDesc, riBuffer, destrId, at_time, tmp, createdDestroyedRiexHandle, apex_destructible_id); } else if (desc.isRiExtra() && offsetedDesc.isValid()) @@ -646,21 +672,16 @@ rendinst::RendInstDesc rendinstdestr::destroyRendinst(rendinst::RendInstDesc des void rendinstdestr::destroyRiExtra(rendinst::riex_handle_t riex_handle, const TMatrix &transform, const Point3 &impulse, const Point3 &impulse_pos) { - uint32_t instSeed = rendinst::get_riextra_instance_seed(riex_handle); if (DynamicPhysObjectData *poData = rendinst::doRIExGenDestrEx(riex_handle, ri_effect_cb)) { - uint32_t res_idx = rendinst::handle_to_ri_type(riex_handle); - const Point3 &campos = get_current_camera_pos ? get_current_camera_pos() : transform.getcol(3); - gamephys::DestructableObject *destr = NULL; - destructables::addDestructable(&destr, poData, transform, phys_world, campos, res_idx, instSeed); - if (destr) + destructables::DestructableCreationParams params; + fill_ri_destructable_params(params, rendinst::RendInstDesc(riex_handle), poData, transform); + gamephys::DestructableObject *destr = nullptr; + destructables::addDestructable(&destr, params, phys_world); + if (destr && impulse != ZERO()) { - destr->ttl = rendinst::get_riextra_ttl(riex_handle); - if (impulse != ZERO()) - { - G_ASSERTF(lengthSq(impulse) < sqr(MAX_RI_DESTROY_IMPULSE), "Bad destroy rendInst impulse %@", impulse); - destr->addImpulse(*phys_world, impulse_pos, impulse); - } + G_ASSERTF(lengthSq(impulse) < sqr(MAX_RI_DESTROY_IMPULSE), "Bad destroy rendInst impulse %@", impulse); + destr->addImpulse(*phys_world, impulse_pos, impulse); } } } diff --git a/prog/gameLibs/gpuObjects/volumePlacerES.cpp.gen.es.cpp b/prog/gameLibs/gpuObjects/volumePlacerES.cpp.gen.es.cpp index 7d75bb788..fa0671d9b 100644 --- a/prog/gameLibs/gpuObjects/volumePlacerES.cpp.gen.es.cpp +++ b/prog/gameLibs/gpuObjects/volumePlacerES.cpp.gen.es.cpp @@ -96,7 +96,10 @@ static constexpr ecs::ComponentDesc gpu_object_placer_changed_es_event_handler_c //start of 2 ro components at [11] {ECS_HASH("ri_gpu_object__name"), ecs::ComponentTypeInfo()}, {ECS_HASH("transform"), ecs::ComponentTypeInfo()}, -//start of 20 rq components at [13] +//start of 23 rq components at [13] + {ECS_HASH("gpu_object_placer__boxBorderX"), ecs::ComponentTypeInfo()}, + {ECS_HASH("gpu_object_placer__boxBorderY"), ecs::ComponentTypeInfo()}, + {ECS_HASH("gpu_object_placer__boxBorderZ"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__distance_based_scale"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__object_scale_range"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__distance_to_scale_from"), ecs::ComponentTypeInfo()}, @@ -145,11 +148,11 @@ static ecs::EntitySystemDesc gpu_object_placer_changed_es_event_handler_es_desc ecs::EntitySystemOps(nullptr, gpu_object_placer_changed_es_event_handler_all_events), make_span(gpu_object_placer_changed_es_event_handler_comps+0, 11)/*rw*/, make_span(gpu_object_placer_changed_es_event_handler_comps+11, 2)/*ro*/, - make_span(gpu_object_placer_changed_es_event_handler_comps+13, 20)/*rq*/, + make_span(gpu_object_placer_changed_es_event_handler_comps+13, 23)/*rq*/, empty_span(), ecs::EventSetBuilder<>::build(), 0 -,"dev,render","gpu_object_placer__decal,gpu_object_placer__distance_affect_decals,gpu_object_placer__distance_based_scale,gpu_object_placer__distance_out_of_range,gpu_object_placer__distance_to_rotation_from,gpu_object_placer__distance_to_rotation_pow,gpu_object_placer__distance_to_rotation_to,gpu_object_placer__distance_to_scale_from,gpu_object_placer__distance_to_scale_pow,gpu_object_placer__distance_to_scale_to,gpu_object_placer__distorsion,gpu_object_placer__min_gathered_triangle_size,gpu_object_placer__min_scale_radius,gpu_object_placer__object_density,gpu_object_placer__object_max_count,gpu_object_placer__object_scale_range,gpu_object_placer__object_up_vector_threshold,gpu_object_placer__opaque,gpu_object_placer__place_on_geometry,gpu_object_placer__use_distance_emitter,ri_gpu_object__name,transform"); +,"dev,render","gpu_object_placer__boxBorderX,gpu_object_placer__boxBorderY,gpu_object_placer__boxBorderZ,gpu_object_placer__decal,gpu_object_placer__distance_affect_decals,gpu_object_placer__distance_based_scale,gpu_object_placer__distance_out_of_range,gpu_object_placer__distance_to_rotation_from,gpu_object_placer__distance_to_rotation_pow,gpu_object_placer__distance_to_rotation_to,gpu_object_placer__distance_to_scale_from,gpu_object_placer__distance_to_scale_pow,gpu_object_placer__distance_to_scale_to,gpu_object_placer__distorsion,gpu_object_placer__min_gathered_triangle_size,gpu_object_placer__min_scale_radius,gpu_object_placer__object_density,gpu_object_placer__object_max_count,gpu_object_placer__object_scale_range,gpu_object_placer__object_up_vector_threshold,gpu_object_placer__opaque,gpu_object_placer__place_on_geometry,gpu_object_placer__use_distance_emitter,ri_gpu_object__name,transform"); static constexpr ecs::ComponentDesc gpu_object_placer_create_es_event_handler_comps[] = { //start of 9 rw components at [0] @@ -276,7 +279,7 @@ static constexpr ecs::ComponentDesc gpu_object_placer_fill_ecs_query_comps[] = {ECS_HASH("gpu_object_placer__on_terrain_geometry_count"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__distance_emitter_is_dirty"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__surface_riex_handles"), ecs::ComponentTypeInfo()}, -//start of 22 ro components at [10] +//start of 25 ro components at [10] {ECS_HASH("eid"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__ri_asset_idx"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__visible_distance_squared"), ecs::ComponentTypeInfo()}, @@ -299,15 +302,18 @@ static constexpr ecs::ComponentDesc gpu_object_placer_fill_ecs_query_comps[] = {ECS_HASH("gpu_object_placer__distance_affect_decals"), ecs::ComponentTypeInfo()}, {ECS_HASH("gpu_object_placer__distance_out_of_range"), ecs::ComponentTypeInfo()}, {ECS_HASH("transform"), ecs::ComponentTypeInfo()}, -//start of 1 rq components at [32] + {ECS_HASH("gpu_object_placer__boxBorderX"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL}, + {ECS_HASH("gpu_object_placer__boxBorderY"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL}, + {ECS_HASH("gpu_object_placer__boxBorderZ"), ecs::ComponentTypeInfo(), ecs::CDF_OPTIONAL}, +//start of 1 rq components at [35] {ECS_HASH("box_zone"), ecs::ComponentTypeInfo()} }; static ecs::CompileTimeQueryDesc gpu_object_placer_fill_ecs_query_desc ( "gpu_objects::gpu_object_placer_fill_ecs_query", make_span(gpu_object_placer_fill_ecs_query_comps+0, 10)/*rw*/, - make_span(gpu_object_placer_fill_ecs_query_comps+10, 22)/*ro*/, - make_span(gpu_object_placer_fill_ecs_query_comps+32, 1)/*rq*/, + make_span(gpu_object_placer_fill_ecs_query_comps+10, 25)/*ro*/, + make_span(gpu_object_placer_fill_ecs_query_comps+35, 1)/*rq*/, empty_span()); template inline void gpu_objects::gpu_object_placer_fill_ecs_query(Callable function) @@ -350,6 +356,9 @@ inline void gpu_objects::gpu_object_placer_fill_ecs_query(Callable function) , ECS_RO_COMP(gpu_object_placer_fill_ecs_query_comps, "gpu_object_placer__distance_out_of_range", bool) , ECS_RW_COMP(gpu_object_placer_fill_ecs_query_comps, "gpu_object_placer__surface_riex_handles", gpu_objects::riex_handles) , ECS_RO_COMP(gpu_object_placer_fill_ecs_query_comps, "transform", TMatrix) + , ECS_RO_COMP_PTR(gpu_object_placer_fill_ecs_query_comps, "gpu_object_placer__boxBorderX", Point2) + , ECS_RO_COMP_PTR(gpu_object_placer_fill_ecs_query_comps, "gpu_object_placer__boxBorderY", Point2) + , ECS_RO_COMP_PTR(gpu_object_placer_fill_ecs_query_comps, "gpu_object_placer__boxBorderZ", Point2) ); }while (++comp != compE); diff --git a/prog/gameLibs/gpuObjects/volumePlacerES.cpp.inl b/prog/gameLibs/gpuObjects/volumePlacerES.cpp.inl index b026b2eb8..e73270edc 100644 --- a/prog/gameLibs/gpuObjects/volumePlacerES.cpp.inl +++ b/prog/gameLibs/gpuObjects/volumePlacerES.cpp.inl @@ -171,6 +171,26 @@ inline void gpu_object_placer_select_closest_distance_emitter_ecs_query(T b); template inline void gpu_object_placer_remove_ecs_query(T b); + +static void adjust_transform_to_border_offset(const Point2 *offset, int axis_index, TMatrix &transform) +{ + if (offset == nullptr) + return; + + const Point2 &offsetV = *offset; + Point3 axis = transform.getcol(axis_index); + float axisLength = axis.length(); + float adjustedLength = axisLength - offsetV.x - offsetV.y; + if (adjustedLength <= 0.0f) + { + LOGERR_ONCE("GPUObjectsPlacer: box borders are too big for the object. Axis=%@, offset=%@", axis_index, offsetV); + return; + } + transform.setcol(axis_index, axis * (adjustedLength / axisLength)); + float axisTranslation = offsetV.y - offsetV.x; + transform.setcol(3, transform.getcol(3) + axis * (axisTranslation / axisLength * 0.5f)); +} + void VolumePlacer::performPlacing(const Point3 &camera_pos) { TIME_D3D_PROFILE(VolumePlacer_performPlacing) @@ -193,8 +213,12 @@ void VolumePlacer::performPlacing(const Point3 &camera_pos) float gpu_object_placer__distance_to_rotation_to, const Point3 &gpu_object_placer__distance_to_scale_pow, float gpu_object_placer__distance_to_rotation_pow, bool gpu_object_placer__use_distance_emitter, bool gpu_object_placer__distance_affect_decals, bool gpu_object_placer__distance_out_of_range, - riex_handles &gpu_object_placer__surface_riex_handles, const TMatrix &transform ECS_REQUIRE(ecs::Tag box_zone)) { + riex_handles &gpu_object_placer__surface_riex_handles, TMatrix transform, const Point2 *gpu_object_placer__boxBorderX, + const Point2 *gpu_object_placer__boxBorderY, const Point2 *gpu_object_placer__boxBorderZ ECS_REQUIRE(ecs::Tag box_zone)) { G_ASSERT(!(gpu_object_placer__filled && gpu_object_placer__buffer_offset == -1)); + adjust_transform_to_border_offset(gpu_object_placer__boxBorderX, 0, transform); + adjust_transform_to_border_offset(gpu_object_placer__boxBorderY, 1, transform); + adjust_transform_to_border_offset(gpu_object_placer__boxBorderZ, 2, transform); float currentDistanceSq = lengthSq(transform.getcol(3) - camera_pos); gpu_object_placer__current_distance_squared = currentDistanceSq; @@ -1008,7 +1032,8 @@ ECS_TRACK(ri_gpu_object__name, gpu_object_placer__place_on_geometry, gpu_object_ gpu_object_placer__distance_to_scale_from, gpu_object_placer__distance_to_scale_to) ECS_TRACK(gpu_object_placer__distance_to_rotation_from, gpu_object_placer__distance_to_rotation_to, gpu_object_placer__distance_to_scale_pow, gpu_object_placer__distance_to_rotation_pow, gpu_object_placer__use_distance_emitter, - gpu_object_placer__distance_out_of_range, gpu_object_placer__distance_affect_decals) + gpu_object_placer__distance_out_of_range, gpu_object_placer__distance_affect_decals, gpu_object_placer__boxBorderX, + gpu_object_placer__boxBorderY, gpu_object_placer__boxBorderZ) ECS_REQUIRE(bool gpu_object_placer__place_on_geometry, int gpu_object_placer__object_max_count, float gpu_object_placer__object_density, float gpu_object_placer__min_gathered_triangle_size, Point2 gpu_object_placer__object_scale_range, Point2 gpu_object_placer__distance_based_scale, @@ -1019,7 +1044,8 @@ ECS_REQUIRE(bool gpu_object_placer__place_on_geometry, int gpu_object_placer__ob ECS_REQUIRE(float gpu_object_placer__distance_to_rotation_from, float gpu_object_placer__distance_to_rotation_to, Point3 gpu_object_placer__distance_to_scale_pow, float gpu_object_placer__distance_to_rotation_pow, bool gpu_object_placer__use_distance_emitter, bool gpu_object_placer__distance_out_of_range, - bool gpu_object_placer__distance_affect_decals) + bool gpu_object_placer__distance_affect_decals, Point2 gpu_object_placer__boxBorderX, Point2 gpu_object_placer__boxBorderY, + Point2 gpu_object_placer__boxBorderZ) static __forceinline void gpu_object_placer_changed_es_event_handler(const ecs::Event &, const ecs::string &ri_gpu_object__name, int &gpu_object_placer__ri_asset_idx, bool &gpu_object_placer__filled, int &gpu_object_placer__buffer_offset, int &gpu_object_placer__distance_emitter_decal_buffer_size, int &gpu_object_placer__distance_emitter_buffer_size, diff --git a/prog/gameLibs/pathFinder/tileCache/tileCache.cpp b/prog/gameLibs/pathFinder/tileCache/tileCache.cpp index 43c4242c3..93134294b 100644 --- a/prog/gameLibs/pathFinder/tileCache/tileCache.cpp +++ b/prog/gameLibs/pathFinder/tileCache/tileCache.cpp @@ -299,7 +299,7 @@ obstacle_handle_t tilecache_obstacle_add(const Point3 &c, const Point3 &ext, flo int ntouched = 0; tileCache->queryTiles(bmin, bmax, ob->touched, &ntouched, DT_MAX_TOUCHED_TILES); if (ntouched == DT_MAX_TOUCHED_TILES) - logerr("Maximum number of touched tiles has been reached? pos(%f %f %f) ext(%f %f %f)", c.x, c.y, c.z, ext.x, ext.y, ext.z); + logerr("Maximum number of touched tiles (%d) has been reached? pos(%@) ext(%@)", DT_MAX_TOUCHED_TILES, c, ext); ob->ntouched = (unsigned char)ntouched; } else diff --git a/prog/gameLibs/publicInclude/bvh/bvh.h b/prog/gameLibs/publicInclude/bvh/bvh.h index a95ee0ed3..a52e7e90d 100644 --- a/prog/gameLibs/publicInclude/bvh/bvh.h +++ b/prog/gameLibs/publicInclude/bvh/bvh.h @@ -28,6 +28,16 @@ namespace dynrend enum class ContextId; } +struct SbufferDeleter +{ + void operator()(Sbuffer *buf) + { + if (buf) + destroy_d3dres(buf); + } +}; +using UniqueBVHBuffer = eastl::unique_ptr; + template struct UniqueAS { @@ -43,7 +53,10 @@ struct UniqueAS #if D3D_HAS_RAY_TRACING as.as = d3d::create_raytrace_bottom_acceleration_structure(desc, desc_count, flags, as.buildScratchSize, &as.updateScratchSize); if (as.as) + { as.gpuAddress = d3d::get_raytrace_acceleration_structure_gpu_handle(as.as).handle; + as.asSize = d3d::get_raytrace_acceleration_structure_size(as.as); + } #endif return as; } @@ -57,14 +70,17 @@ struct UniqueAS #if D3D_HAS_RAY_TRACING as.as = d3d::create_raytrace_bottom_acceleration_structure(size); if (as.as) + { as.gpuAddress = d3d::get_raytrace_acceleration_structure_gpu_handle(as.as).handle; + as.asSize = d3d::get_raytrace_acceleration_structure_size(as.as); + } #endif return as; } template static eastl::enable_if_t, UniqueAS> create(uint32_t instance_count, - RaytraceBuildFlags flags) + RaytraceBuildFlags flags, const char *name) { G_UNUSED(instance_count); G_UNUSED(flags); @@ -73,7 +89,12 @@ struct UniqueAS #if D3D_HAS_RAY_TRACING as.as = d3d::create_raytrace_top_acceleration_structure(instance_count, flags, as.buildScratchSize, &as.updateScratchSize); if (as.as) + { as.gpuAddress = d3d::get_raytrace_acceleration_structure_gpu_handle(as.as).handle; + as.asSize = d3d::get_raytrace_acceleration_structure_size(as.as); + as.scratchBuffer.reset(d3d::create_sbuffer(1, as.buildScratchSize, SBCF_USAGE_ACCELLERATION_STRUCTURE_BUILD_SCRATCH_SPACE, 0, + String(0, "tlas_scratch_%s", name))); + } #endif return as; } @@ -81,10 +102,16 @@ struct UniqueAS UniqueAS() = default; UniqueAS(UniqueAS &&other) : - as(other.as), gpuAddress(other.gpuAddress), buildScratchSize(other.buildScratchSize), updateScratchSize(other.updateScratchSize) + as(other.as), + scratchBuffer(eastl::move(other.scratchBuffer)), + gpuAddress(other.gpuAddress), + asSize(other.asSize), + buildScratchSize(other.buildScratchSize), + updateScratchSize(other.updateScratchSize) { other.as = nullptr; other.gpuAddress = 0; + other.asSize = 0; other.buildScratchSize = 0; other.updateScratchSize = 0; } @@ -93,11 +120,14 @@ struct UniqueAS { reset(); as = other.as; + scratchBuffer.swap(other.scratchBuffer); gpuAddress = other.gpuAddress; + asSize = other.asSize; buildScratchSize = other.buildScratchSize; updateScratchSize = other.updateScratchSize; other.as = nullptr; other.gpuAddress = 0; + other.asSize = 0; other.buildScratchSize = 0; other.updateScratchSize = 0; return *this; @@ -106,7 +136,9 @@ struct UniqueAS ~UniqueAS() { reset(); } ASType *get() const { return as; } + Sbuffer *getScratchBuffer() const { return scratchBuffer.get(); } uint64_t getGPUAddress() const { return gpuAddress; } + uint32_t getASSize() const { return asSize; } // This code should be used, but a bug in the D3D12 validation layers always expect the larger build size. // So play along with that now. // uint32_t getBuildScratchSize() const { return buildScratchSize; } @@ -126,7 +158,9 @@ struct UniqueAS } #endif as = nullptr; + scratchBuffer.reset(); gpuAddress = 0; + asSize = 0; buildScratchSize = 0; updateScratchSize = 0; } @@ -134,6 +168,8 @@ struct UniqueAS void swap(UniqueAS &other) { eastl::swap(as, other.as); + scratchBuffer.swap(other.scratchBuffer); + eastl::swap(asSize, other.asSize); eastl::swap(gpuAddress, other.gpuAddress); eastl::swap(buildScratchSize, other.buildScratchSize); eastl::swap(updateScratchSize, other.updateScratchSize); @@ -147,7 +183,9 @@ struct UniqueAS private: ASType *as = nullptr; + UniqueBVHBuffer scratchBuffer; uint64_t gpuAddress = 0; + uint32_t asSize = 0; uint32_t buildScratchSize = 0; uint32_t updateScratchSize = 0; }; @@ -155,16 +193,6 @@ struct UniqueAS using UniqueBLAS = UniqueAS; using UniqueTLAS = UniqueAS; -struct SbufferDeleter -{ - void operator()(Sbuffer *buf) - { - if (buf) - destroy_d3dres(buf); - } -}; -using UniqueBVHBuffer = eastl::unique_ptr; - struct UniqueBVHBufferWithOffset { UniqueBVHBuffer buffer; diff --git a/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h b/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h index 9b251c2ac..fba8c1555 100644 --- a/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h +++ b/prog/gameLibs/publicInclude/gamePhys/phys/destructableObject.h @@ -24,6 +24,23 @@ namespace destructables typedef void *id_t; static constexpr id_t INVALID_ID = nullptr; static constexpr int DESTRUCTABLES_DELETE_MAX_PER_FRAME = 10; + +struct DestructableCreationParams +{ + DynamicPhysObjectData *physObjData = nullptr; + TMatrix tm = TMatrix::IDENT; + // set out-of-bounds position, so if camera pos is not set, + // it would count as being very far + Point3 camPos = Point3(1e6f, 1e6f, 1e6f); + float scaleDt = -1.0f; + + int resIdx = -1; + uint32_t hashVal = 0; + + float timeToLive = -1.0f; + float defaultTimeToLive = -1.0f; + float timeToKinematic = -1.0f; +}; } // namespace destructables namespace gamephys @@ -52,8 +69,7 @@ class DestructableObject int resIdx; Point4 intialTmAndHash[4]; // row0-1 - initialTm(43), row3 = hash - DestructableObject(DynamicPhysObjectData *po_data, float scale_dt, const TMatrix &tm, PhysWorld *phys_world, int res_idx, - uint32_t hash_val, const DataBlock *blk); + DestructableObject(const destructables::DestructableCreationParams ¶ms, PhysWorld *phys_world, float scale_dt); bool update(float dt, bool force_update_ttl); // return false if it need to be destroyed destructables::id_t getId() const { return (destructables::id_t)this; } @@ -80,6 +96,7 @@ extern float minDestrRadiusSq; void init(const DataBlock *blk, int fgroup = dacoll::EPL_DEBRIS); +id_t addDestructable(gamephys::DestructableObject **out_destr, const DestructableCreationParams ¶ms, PhysWorld *phys_world); id_t addDestructable(gamephys::DestructableObject **out_destr, DynamicPhysObjectData *po_data, const TMatrix &tm, PhysWorld *phys_world, const Point3 &cam_pos, int res_idx = -1, uint32_t hash_val = 0, const DataBlock *blk = nullptr); void clear(); diff --git a/prog/gameLibs/publicInclude/gamePhys/phys/destructableRendObject.h b/prog/gameLibs/publicInclude/gamePhys/phys/destructableRendObject.h index 79d845874..dfbefe143 100644 --- a/prog/gameLibs/publicInclude/gamePhys/phys/destructableRendObject.h +++ b/prog/gameLibs/publicInclude/gamePhys/phys/destructableRendObject.h @@ -39,7 +39,7 @@ void before_render(const Point3 &view_pos, bool has_motion_vectors); // Objects with a bounding box radius < min_bbox_radius will be skipped. void render(dynrend::ContextId inst_ctx, const Frustum &frustum, float min_bbox_radius); -typedef int (*deform_create_instance_cb_type)(const DestrRendData *src); +typedef int (*deform_create_instance_cb_type)(const DestrRendData *src, bool fully_deformed); typedef void (*deform_destroy_instance_cb_type)(const DestrRendData *src); typedef void (*deform_before_render_cb_type)(dag::ConstSpan list); typedef bool (*deform_per_draw_cb_type)(int deformation_id, Point4 &v); diff --git a/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h b/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h index 8c7e4bb2c..2385be488 100644 --- a/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h +++ b/prog/gameLibs/publicInclude/gamePhys/phys/rendinstDestr.h @@ -87,7 +87,8 @@ void init_ex(on_destr_changed_callback on_destr_cb, create_tree_rend_inst_destr_ apex_force_remove_actor_callback apex_remove_actor_cb = NULL); // apply_pending - apply destrs received before level load void init(on_destr_changed_callback on_destr_cb, bool apply_pending, create_tree_rend_inst_destr_cb create_tree_destr_cb = nullptr, - remove_tree_rendinst_destr_cb rem_tree_destr_cb = nullptr, ri_tree_sound_cb tree_sound_cb = nullptr); + remove_tree_rendinst_destr_cb rem_tree_destr_cb = nullptr, ri_tree_sound_cb tree_sound_cb = nullptr, + get_camera_pos get_camera_pos_cb = nullptr); void clear(); void shutdown(); @@ -164,6 +165,8 @@ rendinst::RendInstDesc destroyRendinst(rendinst::RendInstDesc desc, bool add_res rendinst::DestrOptionFlags flags = rendinst::DestrOptionFlag::AddDestroyedRi | rendinst::DestrOptionFlag::ForceDestroy); void destroyRiExtra(rendinst::riex_handle_t riex_handle, const TMatrix &transform, const Point3 &impulse, const Point3 &impulse_pos); void update(float dt, const Frustum *frustum); +void fill_ri_destructable_params(destructables::DestructableCreationParams ¶ms, const rendinst::RendInstDesc &desc, + DynamicPhysObjectData *po_data, const TMatrix &tm); bool apply_damage_to_riextra(rendinst::riex_handle_t handle, float dmg, const Point3 &pos, const Point3 &impulse, float at_time); void apply_damage_to_ri(const rendinst::RendInstDesc &desc, float dmg, float impulse_to_hp, const Point3 &pos, const Point3 &impulse, diff --git a/prog/gameLibs/publicInclude/rendInst/rendInstDesc.h b/prog/gameLibs/publicInclude/rendInst/rendInstDesc.h index 3e88765b8..b472d9333 100644 --- a/prog/gameLibs/publicInclude/rendInst/rendInstDesc.h +++ b/prog/gameLibs/publicInclude/rendInst/rendInstDesc.h @@ -53,7 +53,6 @@ struct RendInstDesc }; bool isRiGenDescValid(const RendInstDesc &desc); -float getTtl(const RendInstDesc &desc); bool isRgLayerPrimary(const RendInstDesc &desc); using IgnoreFunc = eastl::fixed_function; diff --git a/prog/gameLibs/publicInclude/rendInst/rendInstExtraAccess.h b/prog/gameLibs/publicInclude/rendInst/rendInstExtraAccess.h index 8c65165b4..915a55358 100644 --- a/prog/gameLibs/publicInclude/rendInst/rendInstExtraAccess.h +++ b/prog/gameLibs/publicInclude/rendInst/rendInstExtraAccess.h @@ -18,7 +18,8 @@ class CollisionResource; namespace rendinst { -float get_riextra_ttl(riex_handle_t); +float get_riextra_destr_time_to_live(riex_handle_t); +float get_riextra_destr_time_to_kinematic(riex_handle_t); bool get_riextra_immortality(riex_handle_t); uint32_t get_riextra_instance_seed(riex_handle_t); diff --git a/prog/gameLibs/publicInclude/render/debugGbuffer.h b/prog/gameLibs/publicInclude/render/debugGbuffer.h index 3a3cf2887..842a5e2bb 100644 --- a/prog/gameLibs/publicInclude/render/debugGbuffer.h +++ b/prog/gameLibs/publicInclude/render/debugGbuffer.h @@ -45,6 +45,6 @@ void debug_render_gbuffer(const class PostFxRenderer &debugRenderer, DeferredRT void debug_render_gbuffer(const class PostFxRenderer &debugRenderer, Texture *depth, int mode = USE_DEBUG_GBUFFER_MODE); void debug_render_gbuffer_with_vectors(const class DynamicShaderHelper &debugVecShader, DeferredRT &gbuffer, - int mode = USE_DEBUG_GBUFFER_MODE); + int mode = USE_DEBUG_GBUFFER_MODE, int vec_count = -1, float vec_scale = 0.f); void debug_render_gbuffer_with_vectors(const class DynamicShaderHelper &debugVecShader, Texture *depth, - int mode = USE_DEBUG_GBUFFER_MODE); + int mode = USE_DEBUG_GBUFFER_MODE, int vec_count = -1, float vec_scale = 0.f); diff --git a/prog/gameLibs/publicInclude/render/deferredRenderer.h b/prog/gameLibs/publicInclude/render/deferredRenderer.h index a0772e514..ce5a595b6 100644 --- a/prog/gameLibs/publicInclude/render/deferredRenderer.h +++ b/prog/gameLibs/publicInclude/render/deferredRenderer.h @@ -94,6 +94,7 @@ class DeferredRenderTarget void setVar() { renderTargets.setVar(); } void changeResolution(const int w, const int h) { renderTargets.changeResolution(w, h); } void debugRender(int show_gbuffer = USE_DEBUG_GBUFFER_MODE); + void debugRenderVectors(int show_gbuffer = USE_DEBUG_GBUFFER_MODE, int vec_count = -1, int vec_scale = 0.f); // returns true if 32 bit depth buffer was created uint32_t recreateDepth(uint32_t fmt) { return renderTargets.recreateDepth(fmt); } int getWidth() const { return renderTargets.getWidth(); } diff --git a/prog/gameLibs/publicInclude/render/texDebug.h b/prog/gameLibs/publicInclude/render/texDebug.h index 52f0e171b..706c99bf1 100644 --- a/prog/gameLibs/publicInclude/render/texDebug.h +++ b/prog/gameLibs/publicInclude/render/texDebug.h @@ -8,4 +8,5 @@ namespace texdebug { void init(); void teardown(); +void select_texture(const char *name); } // namespace texdebug \ No newline at end of file diff --git a/prog/gameLibs/rendInst/rendInstDesc.cpp b/prog/gameLibs/rendInst/rendInstDesc.cpp index 66229971f..752fbf51c 100644 --- a/prog/gameLibs/rendInst/rendInstDesc.cpp +++ b/prog/gameLibs/rendInst/rendInstDesc.cpp @@ -15,14 +15,6 @@ bool rendinst::isRiGenDescValid(const rendinst::RendInstDesc &desc) return !riutil::is_rendinst_data_destroyed(desc); } -float rendinst::getTtl(const rendinst::RendInstDesc &desc) -{ - if (!desc.isValid() || !desc.isRiExtra()) - return -1.f; - - return desc.pool < rendinst::riExtra.size() ? rendinst::riExtra[desc.pool].ttl : -1.f; -} - bool rendinst::isRgLayerPrimary(const RendInstDesc &desc) { return rendinst::isRgLayerPrimary(desc.layer); } bool rendinst::ignoreTraceRiExtra(const RendInstDesc &desc, rendinst::IgnoreFunc f) { return f ? f(desc) : false; } diff --git a/prog/gameLibs/rendInst/rendInstExtraAccess.cpp b/prog/gameLibs/rendInst/rendInstExtraAccess.cpp index 9ecb66de7..7a42c1413 100644 --- a/prog/gameLibs/rendInst/rendInstExtraAccess.cpp +++ b/prog/gameLibs/rendInst/rendInstExtraAccess.cpp @@ -16,7 +16,16 @@ static const int LOGMESSAGE_LEVEL = LOGLEVEL_ERR; static const int LOGMESSAGE_LEVEL = LOGLEVEL_WARN; #endif -float rendinst::get_riextra_ttl(rendinst::riex_handle_t handle) { return rendinst::riExtra[rendinst::handle_to_ri_type(handle)].ttl; } +float rendinst::get_riextra_destr_time_to_live(rendinst::riex_handle_t handle) +{ + G_ASSERT_RETURN(handle != RIEX_HANDLE_NULL, -1.0f); + return rendinst::riExtra[rendinst::handle_to_ri_type(handle)].destrTimeToLive; +} +float rendinst::get_riextra_destr_time_to_kinematic(rendinst::riex_handle_t handle) +{ + G_ASSERT_RETURN(handle != RIEX_HANDLE_NULL, -1.0f); + return rendinst::riExtra[rendinst::handle_to_ri_type(handle)].destrTimeToKinematic; +} bool rendinst::get_riextra_immortality(rendinst::riex_handle_t handle) { diff --git a/prog/gameLibs/rendInst/rendInstGenDebris.cpp b/prog/gameLibs/rendInst/rendInstGenDebris.cpp index c83bdfffc..d68e8e2b7 100644 --- a/prog/gameLibs/rendInst/rendInstGenDebris.cpp +++ b/prog/gameLibs/rendInst/rendInstGenDebris.cpp @@ -643,9 +643,9 @@ DynamicPhysObjectData *rendinst::doRIGenDestr(const RendInstDesc &desc, RendInst // system says that we // should do it. { + out_buffer.tm = tm; if (rgl) { - out_buffer.tm = tm; if (effect_cb) play_destroy_effect(rgl->rtData, riExtra[desc.pool].riPoolRef, tm, effect_cb, false, coll_point); } @@ -875,8 +875,6 @@ rendinst::riex_handle_t rendinst::restoreRiGenDestr(const RendInstDesc &desc, co { riex_handle_t h = RIEX_HANDLE_NULL; RendInstGenData *rgl = RendInstGenData::getGenDataByLayer(desc); - if (!rgl) - return RIEX_HANDLE_NULL; if (desc.isRiExtra()) { @@ -891,6 +889,8 @@ rendinst::riex_handle_t rendinst::restoreRiGenDestr(const RendInstDesc &desc, co } else { + if (!rgl) + return RIEX_HANDLE_NULL; RendInstGenData::Cell *cell = nullptr; int16_t *data = riutil::get_data_by_desc_no_subcell(desc, cell); if (!data) @@ -913,6 +913,9 @@ rendinst::riex_handle_t rendinst::restoreRiGenDestr(const RendInstDesc &desc, co print_debug_destr_data(); #endif + if (!rgl) + return h; + ScopedLockWrite lock(rgl->rtData->riRwCs); for (int i = 0; i < rgl->rtData->riDestrCellData.size(); ++i) { diff --git a/prog/gameLibs/rendInst/rendInstGenExtra.cpp b/prog/gameLibs/rendInst/rendInstGenExtra.cpp index 7d7efca66..5c83b4085 100644 --- a/prog/gameLibs/rendInst/rendInstGenExtra.cpp +++ b/prog/gameLibs/rendInst/rendInstGenExtra.cpp @@ -364,7 +364,6 @@ int rendinst::addRIGenExtraResIdx(const char *ri_res_name, int ri_pool_ref, int bool immortal = bool(ri_flags & AddRIFlag::Immortal); float combinedRendinstHeight = 0.0f; int id = riExtraMap.getNameId(ri_res_name); - float ttl = 15.f; const DataBlock ¶msBlock = getRiParamsBlockByName(ri_res_name); if (!immortal) @@ -457,7 +456,8 @@ int rendinst::addRIGenExtraResIdx(const char *ri_res_name, int ri_pool_ref, int riExtra[id].riPoolRefLayer = ri_pool_ref_layer; riExtra[id].useShadow = useShadow; riExtra[id].immortal = immortal; - riExtra[id].ttl = ttl; + riExtra[id].destrTimeToLive = 15.0f; + riExtra[id].destrTimeToKinematic = -1.0f; riExtra[id].rendinstHeight = combinedRendinstHeight; riExtra[id].killsNearEffects = false; @@ -470,6 +470,10 @@ int rendinst::addRIGenExtraResIdx(const char *ri_res_name, int ri_pool_ref, int riExtra[id].damageThreshold = b->getReal("damageThreshold", b->getReal("impulseThreshold", 0)); riExtra[id].rendinstHeight = b->getReal("combinedRendinstHeight", 0.0f); riExtra[id].killsNearEffects = b->getBool("killsNearEffects", false); + riExtra[id].destrTimeToLive = b->getReal("destrTimeToLive", riExtra[id].destrTimeToLive); + if (b->getBool("destrDynDeform", false)) + riExtra[id].destrTimeToKinematic = 0.05f; + riExtra[id].destrTimeToKinematic = b->getReal("destrTimeToKinematic", riExtra[id].destrTimeToKinematic); #if RI_VERBOSE_OUTPUT debug("riExtra hp=%.1f damageThres=%.3f regenRate=%.3f", riExtra[id].initialHP, riExtra[id].damageThreshold, riExtra[id].regenHpRate); diff --git a/prog/gameLibs/rendInst/riGen/riExtraPool.h b/prog/gameLibs/rendInst/riGen/riExtraPool.h index faf5657da..33697b1c2 100644 --- a/prog/gameLibs/rendInst/riGen/riExtraPool.h +++ b/prog/gameLibs/rendInst/riGen/riExtraPool.h @@ -106,6 +106,8 @@ struct RiExtraPool int destrFxType = -1; int destrCompositeFxId = -1; float destrFxScale = 0; + float destrTimeToLive = -1.f; + float destrTimeToKinematic = -1.f; int dmgFxType = -1; float dmgFxScale = 1.f; float damageThreshold = 0; @@ -116,7 +118,6 @@ struct RiExtraPool float radiusFadeDrown = 0.f; float radiusFade = 0.f; unsigned lodLimits = defLodLimits; - float ttl = -1.f; bool isRendinstClipmap = false; bool isPaintFxOnHit = false; bool isDynamicRendinst = false; diff --git a/prog/gameLibs/render/clusteredLights.cpp b/prog/gameLibs/render/clusteredLights.cpp index 50595787c..0d20e89ed 100644 --- a/prog/gameLibs/render/clusteredLights.cpp +++ b/prog/gameLibs/render/clusteredLights.cpp @@ -363,7 +363,7 @@ bool ClusteredLights::cullOutOfFrustumLights(mat44f_cref globtm, SpotLightsManag const uint32_t words = spotWords + omniWords; const uint32_t sz4 = (words * OOF_GRID_SIZE + 3) & ~3; - if (!outOfFrustumLightsFullGridCB || outOfFrustumLightsFullGridCB.getBuf()->ressize() < sz4) + if (!outOfFrustumLightsFullGridCB || outOfFrustumLightsFullGridCB.getBuf()->ressize() < sz4 * 4) { outOfFrustumLightsFullGridCB.close(); outOfFrustumLightsFullGridCB = diff --git a/prog/gameLibs/render/debugGbuffer.cpp b/prog/gameLibs/render/debugGbuffer.cpp index 829996133..86b075459 100644 --- a/prog/gameLibs/render/debugGbuffer.cpp +++ b/prog/gameLibs/render/debugGbuffer.cpp @@ -143,10 +143,11 @@ void debug_render_gbuffer(const PostFxRenderer &debugRenderer, DeferredRT &gbuff debug_render_gbuffer(debugRenderer, gbuffer.getDepth(), mode); } -void debug_render_gbuffer_with_vectors(const DynamicShaderHelper &debugVecShader, DeferredRT &gbuffer, int mode) +void debug_render_gbuffer_with_vectors(const DynamicShaderHelper &debugVecShader, DeferredRT &gbuffer, int mode, int vec_count, + float vec_scale) { gbuffer.setVar(); - debug_render_gbuffer_with_vectors(debugVecShader, gbuffer.getDepth(), mode); + debug_render_gbuffer_with_vectors(debugVecShader, gbuffer.getDepth(), mode, vec_count, vec_scale); } void debug_render_gbuffer(const PostFxRenderer &debugRenderer, Texture *depth, int mode) @@ -165,19 +166,24 @@ void debug_render_gbuffer(const PostFxRenderer &debugRenderer, Texture *depth, i } } -void debug_render_gbuffer_with_vectors(const DynamicShaderHelper &debugVecShader, Texture *depth, int mode) +void debug_render_gbuffer_with_vectors(const DynamicShaderHelper &debugVecShader, Texture *depth, int mode, int vec_count, + float vec_scale) { if (!debugVecShader.shader) return; if (mode == USE_DEBUG_GBUFFER_MODE) mode = (int)show_gbuffer_with_vectors; + if (vec_count < 0) + vec_count = debug_vectors_count; + if (abs(vec_scale) < FLT_EPSILON) + vec_scale = debug_vectors_scale; if (mode >= 0) { static int vec_countVarId = get_shader_variable_id("gbuffer_debug_vec_count"); - ShaderGlobal::set_real(vec_countVarId, float(debug_vectors_count)); + ShaderGlobal::set_real(vec_countVarId, float(vec_count)); static int vec_scaleVarId = get_shader_variable_id("gbuffer_debug_vec_scale"); - ShaderGlobal::set_real(vec_scaleVarId, debug_vectors_scale); + ShaderGlobal::set_real(vec_scaleVarId, vec_scale); ShaderGlobal::setBlock(-1, ShaderGlobal::LAYER_FRAME); DebugGbufferRenderScope scope(depth); diff --git a/prog/gameLibs/render/deferredRenderer.cpp b/prog/gameLibs/render/deferredRenderer.cpp index f9cf575fb..401d72158 100644 --- a/prog/gameLibs/render/deferredRenderer.cpp +++ b/prog/gameLibs/render/deferredRenderer.cpp @@ -282,11 +282,15 @@ void DeferredRenderTarget::debugRender(int mode) if (debugRenderer.getMat() == NULL) debugRenderer = PostFxRenderer(DEBUG_RENDER_GBUFFER_SHADER_NAME); debug_render_gbuffer(debugRenderer, renderTargets, mode); +} + +void DeferredRenderTarget::debugRenderVectors(int mode, int vec_count, int vec_scale) +{ if (debugVecRenderer.material == NULL) { debugVecRenderer = DynamicShaderHelper(); debugVecRenderer.init(DEBUG_RENDER_GBUFFER_WITH_VECTORS_SHADER_NAME, nullptr, 0, DEBUG_RENDER_GBUFFER_WITH_VECTORS_SHADER_NAME, true); } - debug_render_gbuffer_with_vectors(debugVecRenderer, renderTargets, mode); -} + debug_render_gbuffer_with_vectors(debugVecRenderer, renderTargets, mode, vec_count, vec_scale); +} \ No newline at end of file diff --git a/prog/gameLibs/render/denoiser/denoiser.cpp b/prog/gameLibs/render/denoiser/denoiser.cpp index 9517b378e..869f9382b 100644 --- a/prog/gameLibs/render/denoiser/denoiser.cpp +++ b/prog/gameLibs/render/denoiser/denoiser.cpp @@ -383,6 +383,7 @@ struct RelaxSharedConstants uint32_t diffMaterialMask; uint32_t specMaterialMask; uint32_t resetHistory; + uint32_t padding; }; static int divide_up(int x, int y) { return (x + y - 1) / y; } @@ -2041,6 +2042,9 @@ static void denoise_reflection_relax(const ReflectionDenoiser ¶ms) { TIME_D3D_PROFILE(relax::classify_tiles); + static_assert(sizeof(relaxSharedConstants) % (4 * sizeof(float)) == 0, + "RelaxSharedConstants size must be multiple of sizeof(float4) for d3d::set_cb0_data"); + d3d::set_cb0_data(STAGE_CS, (const float *)&relaxSharedConstants, divide_up(sizeof(relaxSharedConstants), 16)); d3d::set_tex(STAGE_CS, 0, viewZ, false); d3d::set_rwtex(STAGE_CS, 0, tiles, 0, 0); diff --git a/prog/gameLibs/render/denoiser/shaders/denoiser_prepare.dshl b/prog/gameLibs/render/denoiser/shaders/denoiser_prepare.dshl index fc385d480..2b6093805 100644 --- a/prog/gameLibs/render/denoiser/shaders/denoiser_prepare.dshl +++ b/prog/gameLibs/render/denoiser/shaders/denoiser_prepare.dshl @@ -24,7 +24,7 @@ interval denoiser_spec_confidence_half_res: no < 1, yes; shader denoiser_prepare { (cs) { - resolution@i2 = denoiser_resolution.xy; + resolution@u2 = denoiser_resolution.xy; nrTexture@uav = denoiser_nr hlsl { RWTexture2D nrTexture@uav; }; viewZTexture@uav = denoiser_view_z hlsl { RWTexture2D viewZTexture@uav; }; diff --git a/prog/gameLibs/render/objectMotionBlur/objectMotionBlur.cpp b/prog/gameLibs/render/objectMotionBlur/objectMotionBlur.cpp index 0c81148b7..4ce98ea46 100644 --- a/prog/gameLibs/render/objectMotionBlur/objectMotionBlur.cpp +++ b/prog/gameLibs/render/objectMotionBlur/objectMotionBlur.cpp @@ -116,7 +116,7 @@ static void initialize() { if (!is_enabled() || (!settingsFromConfig.externalTextures && renderingResolution == IPoint2(0, 0))) { - teardown(); + g_ctx.reset(); return; } @@ -128,7 +128,7 @@ static void initialize() if (!g_ctx || !g_ctx->tileMaxCs || !g_ctx->neighborMaxCs || !g_ctx->motionBlurCs) { logerr("Failed to initialize object motion blur shaders!"); - teardown(); + g_ctx.reset(); return; } diff --git a/prog/gameLibs/render/rtao/shaders/rtao.dshl b/prog/gameLibs/render/rtao/shaders/rtao.dshl index a93aa3372..c8418deb3 100644 --- a/prog/gameLibs/render/rtao/shaders/rtao.dshl +++ b/prog/gameLibs/render/rtao/shaders/rtao.dshl @@ -23,7 +23,7 @@ shader rt_ao (cs) { inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; - resolution@i2 = rtao_resolutionI.xy; + resolution@u2 = rtao_resolutionI.xy; inv_resolution@f2 = (1.0 / rtao_resolution.x, 1.0 / rtao_resolution.y); hit_dist_params@f4 = rtao_hit_dist_params; frame_index@i1 = rtao_frame_index; @@ -97,7 +97,7 @@ shader rt_ao ##if rtao_res_mul == on UnpackedGbuffer gbuffer = unpackGbuffer(loadPackedGbuffer(rayIndex * 2)); - float rawDepth = half_res_depth_tex[rayIndex].r; + float rawDepth = texture2DAt(half_res_depth_tex, rayIndex).r; ##else UnpackedGbuffer gbuffer = unpackGbuffer(loadPackedGbuffer(rayIndex)); float rawDepth = loadGbufferDepth(rayIndex); @@ -130,9 +130,9 @@ shader rt_ao if (!isGrass) { ##if rtao_res_mul == on - normal = calc_geometry_normal_half(rayIndex, inv_resolution); + normal = calc_geometry_normal_half(rayIndex, inv_resolution, resolution); ##else - normal = calc_geometry_normal(rayIndex, inv_resolution); + normal = calc_geometry_normal(rayIndex, inv_resolution, resolution); ##endif } float3 sampleDir = cosine_sample_hemisphere(normal, seed); diff --git a/prog/gameLibs/render/rtao/shaders/rtao_use.dshl b/prog/gameLibs/render/rtao/shaders/rtao_use.dshl index e3dc87c55..feef1d28b 100644 --- a/prog/gameLibs/render/rtao/shaders/rtao_use.dshl +++ b/prog/gameLibs/render/rtao/shaders/rtao_use.dshl @@ -34,7 +34,8 @@ macro USING_RTAO(stage, rtao_tex_space) { (stage) { inv_output_resolution@f2 = (1.0 / (rtao_resolutionI.x * rtao_res_mul), 1.0 / (rtao_resolutionI.y * rtao_res_mul)); - resolutionI@i2 = rtao_resolutionI.xy; + output_resolutionF@f2 = rtao_resolutionI.xy; + output_resolutionI@u2 = rtao_resolutionI.xy; } hlsl (stage) { @@ -45,13 +46,13 @@ macro USING_RTAO(stage, rtao_tex_space) float getRTAO(uint2 tci) { float2 uv = (tci.xy + 0.5) * inv_output_resolution; - float2 texelPos = frac(uv * resolutionI); - uint2 crd = uint2(uv * resolutionI); + float2 texelPos = frac(uv * output_resolutionF); + uint2 crd = uint2(uv * output_resolutionF); - float tl = rt_texture_outputs[rtao_bindless_slot][crd].r; - float tr = rt_texture_outputs[rtao_bindless_slot][crd + uint2(1, 0)].r; - float bl = rt_texture_outputs[rtao_bindless_slot][crd + uint2(0, 1)].r; - float br = rt_texture_outputs[rtao_bindless_slot][crd + uint2(1, 1)].r; + float tl = texture2DAt(rt_texture_outputs[rtao_bindless_slot], crd).r; + float tr = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(1, 0), output_resolutionI - 1)).r; + float bl = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(0, 1), output_resolutionI - 1)).r; + float br = texture2DAt(rt_texture_outputs[rtao_bindless_slot], min(crd + uint2(1, 1), output_resolutionI - 1)).r; float top = lerp(tl, tr, texelPos.x); float bottom = lerp(bl, br, texelPos.x); diff --git a/prog/gameLibs/render/rtr/shaders/rtr.dshl b/prog/gameLibs/render/rtr/shaders/rtr.dshl index 79a340a82..568369502 100644 --- a/prog/gameLibs/render/rtr/shaders/rtr.dshl +++ b/prog/gameLibs/render/rtr/shaders/rtr.dshl @@ -68,7 +68,7 @@ shader rt_reflection_classify (cs) { inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; - resolution@i2 = rtr_resolutionI.xy; + resolution@u2 = rtr_resolutionI.xy; tilesResolution@i2 = rtr_resolutionI.zw; inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); classify_tresholds@f3 = rtr_classify_tresholds; @@ -134,7 +134,7 @@ shader rt_reflection_classify if ( evenFrame == evenLine ) ++rayIndex.x; } - float rawDepth = rtr_res_mul > 1 ? half_res_depth_tex[rayIndex].r : loadGbufferDepth(rayIndex); + float rawDepth = rtr_res_mul > 1 ? texture2DAt(half_res_depth_tex, rayIndex).r : loadGbufferDepth(rayIndex); BRANCH if (rawDepth > 0) @@ -149,7 +149,7 @@ shader rt_reflection_classify { UnpackedGbuffer gbuffer = unpackGbuffer(loadPackedGbuffer(rayIndex * rtr_res_mul)); - float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(nr_texture[rayIndex]); + float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(texture2DAt(nr_texture, rayIndex)); half smoothness = 1.0 - surfaceNormal_roughness.w; float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); half3 toPoint = (half3)normalize(relPos); @@ -204,7 +204,7 @@ shader rt_reflection_sample (cs) { inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; - resolution@i2 = rtr_resolutionI; + resolution@u2 = rtr_resolutionI; tilesResolution@u2 = rtr_resolutionI.zw; inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); hit_dist_params@f4 = rtr_hit_dist_params; @@ -288,7 +288,7 @@ shader rt_reflection_sample ++rayIndex.x; } - float rawDepth = rtr_res_mul > 1 ? half_res_depth_tex[rayIndex].r : loadGbufferDepth(rayIndex); + float rawDepth = rtr_res_mul > 1 ? texture2DAt(half_res_depth_tex, rayIndex).r : loadGbufferDepth(rayIndex); if (rawDepth <= 0) return; @@ -361,7 +361,7 @@ shader rt_reflection (cs) { inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; - resolution@i2 = rtr_resolutionI; + resolution@u2 = rtr_resolutionI; tilesResolution@u2 = rtr_resolutionI.zw; inv_resolution@f2 = (1.0 / get_dimensions(rtr_target, 0).xy); hit_dist_params@f4 = rtr_hit_dist_params; @@ -475,7 +475,7 @@ shader rt_reflection { uint2 loc = rayIndex + uint2(x,y); if (all(loc < resolution)) - rawDepth = rtr_res_mul > 1 ? half_res_depth_tex[loc].r : loadGbufferDepth(loc); + rawDepth = rtr_res_mul > 1 ? texture2DAt(half_res_depth_tex, loc).r : loadGbufferDepth(loc); if (rawDepth > 0) rayIndex += uint2(x,y); } @@ -497,7 +497,7 @@ shader rt_reflection float3 relPos = calc_camera_relative_pos(rayIndex, w, inv_resolution); half3 toPoint = (half3)normalize(relPos); - float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(nr_texture[rayIndex]); + float4 surfaceNormal_roughness = NRD_FrontEnd_UnpackNormalAndRoughness(texture2DAt(nr_texture, rayIndex)); half3 normal = (half3)normalize(surfaceNormal_roughness.xyz); half roughness = surfaceNormal_roughness.w; half3 reflectionVector = reflect(toPoint, normal); @@ -505,7 +505,7 @@ shader rt_reflection half3 sampleDir = get_scattered_reflection_vector(reflectionVector, seed, roughness); if (!isGrass) { - normal = rtr_res_mul > 1 ? calc_geometry_normal_half(rayIndex, inv_resolution) : calc_geometry_normal(rayIndex, inv_resolution); + normal = rtr_res_mul > 1 ? calc_geometry_normal_half(rayIndex, inv_resolution, resolution) : calc_geometry_normal(rayIndex, inv_resolution, resolution); half SoN = dot(normal, sampleDir); // The ray points into the surface, lets mirror it to the surface if (SoN < 0) @@ -567,8 +567,8 @@ shader rt_reflection [unroll] for (uint x = 0; x < rtr_spacing && outputIndex.x + x < resolution.x; ++x) { - uint2 depthIndex = clamp(baseRayIndex + (rtr_checkerboard ? uint2(x*2,y) : uint2(x,y)), 0, resolution); - float rawDepth = rtr_res_mul > 1 ? half_res_depth_tex[depthIndex].r : loadGbufferDepth(depthIndex); + uint2 depthIndex = clamp(baseRayIndex + (rtr_checkerboard ? uint2(x*2,y) : uint2(x,y)), 0, resolution - 1); + float rawDepth = rtr_res_mul > 1 ? texture2DAt(half_res_depth_tex, depthIndex).r : loadGbufferDepth(depthIndex); float subw = linearize_z(rawDepth, zn_zfar.zw); float subdist = reflectionDistance - (subw - w); @@ -597,7 +597,7 @@ shader rt_glass_reflection (cs) { inv_proj_tm@f44 = inv_proj_tm; - resolution@i2 = rtr_resolutionI.xy; + resolution@u2 = rtr_resolutionI.xy; inv_resolution@f2 = (1.0 / get_dimensions(translucent_gbuffer, 0).xy); hit_dist_params@f4 = rtr_hit_dist_params; rt_glass_gbuffer@uav = translucent_gbuffer hlsl { RWTexture2D rt_glass_gbuffer@uav; }; @@ -636,16 +636,16 @@ shader rt_glass_reflection if (any(dtid >= resolution)) return; - float rawDepth = rt_glass_gbuffer_depth[dtid].x; + float rawDepth = texture2DAt(rt_glass_gbuffer_depth, dtid).x; BRANCH if (rawDepth <= 0) { - rt_glass_gbuffer[dtid] = 0; + texture2DAt(rt_glass_gbuffer, dtid) = 0; return; } - float4 gbuffer = rt_glass_gbuffer[dtid]; + float4 gbuffer = texture2DAt(rt_glass_gbuffer, dtid); float w = linearize_z(rawDepth, zn_zfar.zw); float3 relPos = calc_camera_relative_pos(dtid, w, inv_resolution); diff --git a/prog/gameLibs/render/rtr/shaders/rtr_use.dshl b/prog/gameLibs/render/rtr/shaders/rtr_use.dshl index 537ce0883..20c22f658 100644 --- a/prog/gameLibs/render/rtr/shaders/rtr_use.dshl +++ b/prog/gameLibs/render/rtr/shaders/rtr_use.dshl @@ -36,7 +36,8 @@ macro USING_RTR(stage) (stage) { rtr_output_type@i1 = rtr_output_type; inv_output_resolution_rt@f2 = (1.0 / (rtr_resolutionI.x * rtr_res_mul), 1.0 / (rtr_resolutionI.y * rtr_res_mul)); - resolutionI_rt@i2 = rtr_resolutionI.xy; + resolutionF_rt@f2 = rtr_resolutionI.xy; + resolutionI_rt@u2 = rtr_resolutionI.xy; } hlsl (stage) { @@ -53,24 +54,24 @@ macro USING_RTR(stage) float3 getRTR(uint2 tci) { float2 uv = (tci.xy + 0.5) * inv_output_resolution_rt; - float2 texelPos = frac(uv * resolutionI_rt); - uint2 crd = uint2(uv * resolutionI_rt); + float2 texelPos = frac(uv * resolutionF_rt); + uint2 crd = uint2(uv * resolutionF_rt); float3 tl, tr, bl, br; BRANCH if (rtr_output_type == RTR_REBLUR) { - tl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(rt_texture_outputs[rtr_bindless_slot][crd]).rgb; - tr = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(rt_texture_outputs[rtr_bindless_slot][crd + uint2(1, 0)]).rgb; - bl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(rt_texture_outputs[rtr_bindless_slot][crd + uint2(0, 1)]).rgb; - br = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(rt_texture_outputs[rtr_bindless_slot][crd + uint2(1, 1)]).rgb; + tl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], crd)).rgb; + tr = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 0), resolutionI_rt - 1))).rgb; + bl = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(0, 1), resolutionI_rt - 1))).rgb; + br = REBLUR_BackEnd_UnpackRadianceAndNormHitDist(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 1), resolutionI_rt - 1))).rgb; } else { - tl = RELAX_BackEnd_UnpackRadiance(rt_texture_outputs[rtr_bindless_slot][crd]).rgb; - tr = RELAX_BackEnd_UnpackRadiance(rt_texture_outputs[rtr_bindless_slot][crd + uint2(1, 0)]).rgb; - bl = RELAX_BackEnd_UnpackRadiance(rt_texture_outputs[rtr_bindless_slot][crd + uint2(0, 1)]).rgb; - br = RELAX_BackEnd_UnpackRadiance(rt_texture_outputs[rtr_bindless_slot][crd + uint2(1, 1)]).rgb; + tl = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], crd)).rgb; + tr = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 0), resolutionI_rt - 1))).rgb; + bl = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(0, 1), resolutionI_rt - 1))).rgb; + br = RELAX_BackEnd_UnpackRadiance(texture2DAt(rt_texture_outputs[rtr_bindless_slot], min(crd + uint2(1, 1), resolutionI_rt - 1))).rgb; } float3 top = lerp(tl, tr, texelPos.x); diff --git a/prog/gameLibs/render/rtsm/shaders/rtsm.dshl b/prog/gameLibs/render/rtsm/shaders/rtsm.dshl index 5fb177dcb..160be71ca 100644 --- a/prog/gameLibs/render/rtsm/shaders/rtsm.dshl +++ b/prog/gameLibs/render/rtsm/shaders/rtsm.dshl @@ -51,7 +51,7 @@ shader rt_shadows inv_proj_tm@f44 = inv_proj_tm; world_view_pos@f3 = world_view_pos; sun_dir_for_shadows@f3 = (sun_dir_for_shadows.x, sun_dir_for_shadows.y, sun_dir_for_shadows.z); - resolution@i2 = rt_shadow_resolutionI; + resolution@u2 = rt_shadow_resolutionI; inv_resolution@f2 = (1.0 / rt_shadow_resolution.x, 1.0 / rt_shadow_resolution.y); frame_index@i1 = rtsm_frame_index; sun_angle_multiplier@f1 = rtsm_sun_angle_multiplier; @@ -145,9 +145,9 @@ shader rt_shadows sampleIndex += virtualSampleIndex * spp; // The algorithm - uint3 A = scrambling_ranking_texture[ pixelPos & 127 ] * 255; + uint3 A = texture2DAt(scrambling_ranking_texture, pixelPos & 127) * 255; uint rankedSampleIndex = sampleIndex ^ A.z; - uint4 B = sobol_texture[ uint2( rankedSampleIndex & 255, 0 ) ] * 255; + uint4 B = texture2DAt(sobol_texture, uint2( rankedSampleIndex & 255, 0 )) * 255; float4 blue = ( float4( B ^ A.xyxy ) + 0.5 ) * ( 1.0 / 256.0 ); // Randomize in [ 0; 1 / 256 ] area to get rid of possible banding @@ -284,7 +284,7 @@ shader rt_shadows bool isTerrain = false; #endif - float3 geometryNormal = calc_geometry_normal(dtid, inv_resolution); + float3 geometryNormal = calc_geometry_normal(dtid, inv_resolution, resolution); BRANCH if (!isGrass && !isImpostor && !isTerrain) @@ -382,7 +382,7 @@ shader rt_direct_lights dynamic_lights@uav = rtsm_dynamic_lights hlsl { RWTexture2D dynamic_lights@uav; }; ao_affect_on_landmesh@f1 = (ssao_affect_on_landmesh, 0, 0, 0); direct_light_has_ao@i1 = rstm_direct_light_has_ao; - resolution@i2 = rt_shadow_resolutionI; + resolution@u2 = rt_shadow_resolutionI; inv_resolution@f2 = (1.0 / rt_shadow_resolution.x, 1.0 / rt_shadow_resolution.y); big_light_pos_rad_0@f4 = big_light_pos_rad_0; diff --git a/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl b/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl index 50e6bdbb3..ebd3c6d27 100644 --- a/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl +++ b/prog/gameLibs/render/rtsm/shaders/rtsm_use.dshl @@ -40,7 +40,7 @@ macro USING_RTSM(stage) half3 getRTSM(uint2 tci) { - half4 shadowTexel = rt_texture_outputs[rtsm_bindless_slot][tci]; + half4 shadowTexel = texture2DAt(rt_texture_outputs[rtsm_bindless_slot], tci); half4 shadowData = SIGMA_BackEnd_UnpackShadow(shadowTexel); return lerp(shadowData.yzw, 1.0, shadowData.x); } diff --git a/prog/gameLibs/render/shaders/gtao.dshl b/prog/gameLibs/render/shaders/gtao.dshl index e1ef1b9d9..a4707093b 100644 --- a/prog/gameLibs/render/shaders/gtao.dshl +++ b/prog/gameLibs/render/shaders/gtao.dshl @@ -57,7 +57,7 @@ macro GTAO_MAIN_CORE(code) local_view_y@f3 = local_view_y; local_view_z@f3 = local_view_z; - shadow_params@f3 = (temporal_shadow_frame.x, contact_shadow_len, contact_shadow_min_len, 0); + shadow_params@f4 = (temporal_shadow_frame.x, contact_shadow_len, contact_shadow_min_len, contact_shadow_step_offset); viewProjectionMatrixNoOfs@f44 = { globtm_no_ofs_psf_0, globtm_no_ofs_psf_1, globtm_no_ofs_psf_2, globtm_no_ofs_psf_3 }; @@ -72,6 +72,7 @@ macro GTAO_MAIN_CORE(code) #define shadow_frame shadow_params.x #define contact_shadow_len shadow_params.y #define contact_shadow_min_len shadow_params.z + #define contact_shadow_step_offset shadow_params.w } CONTACT_SHADOWS_BASE(code) @@ -265,7 +266,8 @@ macro GTAO_MAIN_CORE(code) half_res_close_depth, half_res_close_depth_samplerstate, cameraToPoint, -from_sun_direction, max(w * contact_shadow_len, min(contact_shadow_min_len, w)), - shadow_steps, dither-0.5, projectionMatrix, w, viewProjectionMatrixNoOfs, hitUV, float2(100, 99) + shadow_steps, dither + contact_shadow_step_offset * saturate(pow2(dot(wsNormal, -from_sun_direction))), + projectionMatrix, w, viewProjectionMatrixNoOfs, hitUV, float2(100, 99) ); gtao_value.CONTACT_SHADOWS_ATTR = lerp (1, gtao_value.CONTACT_SHADOWS_ATTR, shadow_strength); diff --git a/prog/gameLibs/render/shaders/pn_triangulation.dshl b/prog/gameLibs/render/shaders/pn_triangulation.dshl index ad3a40501..328a8c022 100644 --- a/prog/gameLibs/render/shaders/pn_triangulation.dshl +++ b/prog/gameLibs/render/shaders/pn_triangulation.dshl @@ -9,6 +9,11 @@ // 7. Additional parameters can be calculated freely in proxy_struct_fields and fields_barycentric_values (like pointToEye after tesselation) // 8. After all of this, include USE_PN_TRIANGULATION() +include "shader_global.dshl" + +int debug_enable_old_tessellation_factors = 0; +interval debug_enable_old_tessellation_factors:off<1, on; +assume debug_enable_old_tessellation_factors = off; macro INIT_PN_TRIANGULATION(smoothing) hlsl { @@ -17,6 +22,10 @@ hlsl { #pragma spir-v compiler dxc ##endif + ##if debug_enable_old_tessellation_factors == on + #define USING_OLD_TESSELLATION_FACTORS + ##endif + #define PN_TESSELATION 1 ##if smoothing #define PN_TRIANGULATION_SMOOTHING 1 @@ -28,6 +37,7 @@ hlsl { #define FIELD_BARYCENTRIC_VALUE(field_name) \ output.field_name = GET_INTERPOLATED_INPUT_VALUE(field_name) + #define PROXY_FIELD_VALUE(field_name) \ output.field_name = input.field_name @@ -56,25 +66,33 @@ hlsl { } endmacro -macro INIT_AND_USE_EDGE_LENGTH_BASED_TESS_FACTORS(max_tessellation_factor) +macro INIT_AND_USE_EDGE_LENGTH_BASED_TESS_FACTORS(max_tessellation_factor, tessellation_max_edge_length) hlsl(hs) { - float edgeLod(float3 pos1, float3 pos2) - { - return max_tessellation_factor / length(world_view_pos - (pos1 + pos2) * 0.5); - } - - float calc_tess_factor(inout HsPatchData patch, OutputPatch controlPoints, uint tid) - { - int next = (1U << tid) & 3; // (tid + 1) % 3 - next = (1U << next) & 3; - - return max(1, min(edgeLod(controlPoints[tid].pos1, controlPoints[next].pos1),max_tessellation_factor)); - } + #ifndef USING_OLD_TESSELLATION_FACTORS + #define USING_EDGE_LENGTH_TESS_FACTOR + + float3 calc_edge_length_tess_factors(float3 lengths, float3 distances) { + return clamp(lengths / distances / tessellation_max_edge_length, 1.0, max_tessellation_factor); + } + #else + float edgeLod(float3 pos1, float3 pos2) + { + return max_tessellation_factor / length(world_view_pos - (pos1 + pos2) * 0.5); + } + + float calc_tess_factor(inout HsPatchData patch, OutputPatch controlPoints, uint tid) + { + int next = (1U << tid) & 3; // (tid + 1) % 3 + next = (1U << next) & 3; + + return max(1, min(edgeLod(controlPoints[tid].pos1, controlPoints[next].pos1),max_tessellation_factor)); + } + #endif } endmacro -macro USE_PN_TRIANGULATION(world_pos_offset_param) +macro USE_PN_TRIANGULATION(world_pos_offset_param, min_tessellation_distance, max_tessellation_distance, tessellation_transition_distance) hlsl(hs) { //patch constant data HsPatchData HullShaderPatchConstant(OutputPatch controlPoints) @@ -83,16 +101,59 @@ hlsl(hs) { DRAW_CALL_ID = GET_DRAW_CALL_ID_TRIANGULATION(controlPoints[0]); #endif HsPatchData patch = (HsPatchData)0; - //calculate Tessellation factors - patch.edges[0] = calc_tess_factor(patch, controlPoints, 0); - patch.edges[1] = calc_tess_factor(patch, controlPoints, 1); - patch.edges[2] = calc_tess_factor(patch, controlPoints, 2); - patch.inside = max(max(patch.edges[0], patch.edges[1]), patch.edges[2]); + //calculate center float3 center = (controlPoints[0].pos2 + controlPoints[0].pos3) * 0.5 - controlPoints[0].pos1 + (controlPoints[1].pos2 + controlPoints[1].pos3) * 0.5 - controlPoints[1].pos1 + (controlPoints[2].pos2 + controlPoints[2].pos3) * 0.5 - controlPoints[2].pos1; patch.center = center; + + #if !defined(USING_OLD_TESSELLATION_FACTORS) && defined(USING_EDGE_LENGTH_TESS_FACTOR) + float3 pos1 = controlPoints[0].pos1; + float3 pos2 = controlPoints[1].pos1; + float3 pos3 = controlPoints[2].pos1; + + float3 distances = max(sqrt(float3( + lengthSq(pos1 - world_view_pos), + lengthSq(pos2 - world_view_pos), + lengthSq(pos3 - world_view_pos) + )), min_tessellation_distance); + + float tessellationFadeOutEnd = max_tessellation_distance + tessellation_transition_distance; + bool3 requiresTessellation = distances < tessellationFadeOutEnd; + + if (!any(requiresTessellation)) { + patch.edges[0] = 1.0; + patch.edges[1] = 1.0; + patch.edges[2] = 1.0; + patch.inside = 1.0; + return patch; + } + + float3 edgeLengths = sqrt(float3( + lengthSq(pos1 - pos3), + lengthSq(pos2 - pos1), + lengthSq(pos3 - pos2) + )); + + float3 factors = lerp( + calc_edge_length_tess_factors(edgeLengths, distances), + 1.0, + smoothstep(max_tessellation_distance, tessellationFadeOutEnd, distances) + ); + patch.edges[0] = factors.x; + patch.edges[1] = factors.y; + patch.edges[2] = factors.z; + + patch.inside = dot(factors, 1.0 / 3.0); + #else + patch.edges[0] = calc_tess_factor(patch, controlPoints, 0); + patch.edges[1] = calc_tess_factor(patch, controlPoints, 1); + patch.edges[2] = calc_tess_factor(patch, controlPoints, 2); + + patch.inside = max(max(patch.edges[0], patch.edges[1]), patch.edges[2]); + #endif + return patch; } @@ -169,7 +230,7 @@ hlsl(ds) { compile("ds_5_0", "pn_triangulation_ds"); endmacro -macro USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(world_pos_offset_param, max_tessellation_factor) - INIT_AND_USE_EDGE_LENGTH_BASED_TESS_FACTORS(max_tessellation_factor) - USE_PN_TRIANGULATION(world_pos_offset_param) +macro USE_PN_TRIANGULATION_WITH_EDGE_LENGTH_BASED_TESS_FACTORS(world_pos_offset_param, max_tessellation_factor, tessellation_max_edge_length, min_tessellation_distance, max_tessellation_distance, tessellation_transition_distance) + INIT_AND_USE_EDGE_LENGTH_BASED_TESS_FACTORS(max_tessellation_factor, tessellation_max_edge_length) + USE_PN_TRIANGULATION(world_pos_offset_param, min_tessellation_distance, max_tessellation_distance, tessellation_transition_distance) endmacro diff --git a/prog/gameLibs/render/shaders/puddles_inc.dshl b/prog/gameLibs/render/shaders/puddles_inc.dshl index f1cb79270..d2392820f 100644 --- a/prog/gameLibs/render/shaders/puddles_inc.dshl +++ b/prog/gameLibs/render/shaders/puddles_inc.dshl @@ -98,8 +98,13 @@ macro USE_LAND_WETNESS() float porosity = wetness_blend_porosity_params.w; float wetnessAO = ClampRange(wetMaterial, 0.45, 0.95); float3 albedoSqr = 0.8*g_buf.albedo.rgb * g_buf.albedo.rgb; + + // we overriding real normal by vertical normal, so we lose all microdetails on puddle bottom. fake them by sundot + float preshadow = saturate(dot(g_buf.normal, sunDir)); + g_buf.normal = lerp(g_buf.normal, vertical_norm, wetnessAO); g_buf.albedo.rgb = lerp(g_buf.albedo.rgb, albedoSqr, ClampRange(totalWetness, 0.0, 0.35) * porosity); + g_buf.albedo.rgb *= lerp(1, preshadow, 0.8 * wetnessAO); g_buf.albedo.rgb = lerp(g_buf.albedo.rgb, heightmap_mud_color.rgb, saturate(heightmap_mud_color.w*landThickness*ClampRange(wetness.y, 0.55, 1))); @@ -164,8 +169,13 @@ macro USE_LANDMESH_PUDDLES(code) float wetMaterial = get_wet_material(wetness, water_border); float wetnessAO = ClampRange(wetMaterial, 0.45, 0.95); float3 albedoSqr = 0.8*g_buf.albedo.rgb * g_buf.albedo.rgb; + + // we overriding real normal by vertical normal, so we lose all microdetails on puddle bottom. fake them by sundot + float preshadow = saturate(dot(g_buf.normal, sunDir)); + g_buf.normal = lerp(g_buf.normal, vertical_norm, wetnessAO); g_buf.albedo.rgb = lerp(g_buf.albedo.rgb, albedoSqr, ClampRange(wetness, 0.0, 0.35) * porosity); + g_buf.albedo.rgb *= lerp(1, preshadow, 0.8 * wetnessAO); g_buf.albedo.rgb = lerp(g_buf.albedo.rgb, float3(0.015, 0.015, 0.015), fresnelterm*pow2(wetness)); g_buf.ao = lerp(g_buf.ao, 1.0, wetnessAO); g_buf.shadow = lerp(g_buf.shadow, 1.0, wetnessAO); diff --git a/prog/gameLibs/render/shaders/ssr_common.hlsl b/prog/gameLibs/render/shaders/ssr_common.hlsl index 0ef479cf9..74e5cb370 100644 --- a/prog/gameLibs/render/shaders/ssr_common.hlsl +++ b/prog/gameLibs/render/shaders/ssr_common.hlsl @@ -187,14 +187,10 @@ half4 sample_analytic_sphere(float hitDist, float3 cameraToPoint, float3 R, floa return result; } -bool get_prev_frame_disocclusion_weight_sample(float2 historyUV, float3 cameraToPoint, float lod, inout half3 historySample) +bool get_prev_frame_disocclusion_weight_sample(float2 historyUV, float prev_linear_depth, float3 cameraToPoint, float lod, inout half3 historySample) { bool weight = all(abs(historyUV*2-1) < 1); #if USE_PREV_DOWNSAMPLED_CLOSE_DEPTH - float4 prevClipExactPos = mul(float4(cameraToPoint, 1), prev_globtm_no_ofs_psf); - float prevScreenExactZ = prevClipExactPos.w > 1e-6 ? prevClipExactPos.z/prevClipExactPos.w : 0; - float prev_linear_depth = max(prev_zn_zfar.x, linearize_z(prevScreenExactZ, prev_zn_zfar.zw)); - float4 depths = prev_downsampled_close_depth_tex.GatherRed(prev_downsampled_close_depth_tex_samplerstate, historyUV).wzxy; float4 linearDepths = linearize_z4(depths, prev_zn_zfar.zw); float4 depthDiff = abs(linearDepths - prev_linear_depth); @@ -234,31 +230,38 @@ half4 sample_vignetted_color(float3 hit_uv_z, float linear_roughness, float hitD half4 result; float3 cameraToHitPoint = getViewVecOptimized(hit_uv_z.xy)* hit_uv_z.z; #ifdef REPROJECT_TO_PREV_SCREEN - float2 oldUv = 0; - float2 screenPos = 0; + + float4 prevClipHitPos = mul(float4(cameraToHitPoint, 1), prev_globtm_no_ofs_psf); + float3 oldExactUVZ = prevClipHitPos.w > 1e-6 ? prevClipHitPos.xyz/prevClipHitPos.w : float3(2,2,0); + oldExactUVZ.z = max(prev_zn_zfar.x, linearize_z(oldExactUVZ.z, prev_zn_zfar.zw)); #if SSR_MOTIONREPROJ == 1 - float2 motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(hit_uv_z.xy, 0, 0)).rg; - if (CHECK_VALID_MOTION_VECTOR(motion)) // if we have motion vectors - { - oldUv = hit_uv_z.xy + motion; - screenPos = oldUv * 2 - 1; - } - else + motion_type surface_motion = tex2Dlod(MOTION_VECTORS_TEXTURE, float4(hit_uv_z.xy,0,0)).motion_attr; + #if MOTION_VECTORS_3D + float3 surface_3d_motion = surface_motion; + #else + float3 surface_3d_motion = float3(surface_motion, oldExactUVZ.z - hit_uv_z.z); + #endif + if (!CHECK_VALID_MOTION_VECTOR(surface_motion)) + surface_3d_motion = oldExactUVZ - hit_uv_z; + #else + #if PREV_HERO_SPHERE + bool isHero = apply_hero_matrix(hit_uv_z.xy, cameraToHitPoint); + #endif + float2 screenPos1; + float2 oldUv = get_reprojected_history_uvz1(cameraToHitPoint, prev_globtm_no_ofs_psf, screenPos1).xy; + + float3 surface_3d_motion = float3(oldUv, isHero ? oldExactUVZ.z : hit_uv_z.z) - hit_uv_z; #endif - { - #if SSR_MOTIONREPROJ != 1 && PREV_HERO_SPHERE - apply_hero_matrix(hit_uv_z.xy, cameraToHitPoint); - #endif - oldUv = get_reprojected_history_uvz1(cameraToHitPoint, prev_globtm_no_ofs_psf, screenPos).xy; - } - #define SSR_MIPS 1 - float2 sampleUV = oldUv.xy; + #define SSR_MIPS 1 + float prevLinearDepth = hit_uv_z.z + surface_3d_motion.z; + float2 sampleUV = hit_uv_z.xy + surface_3d_motion.xy; #else - float2 screenPos = hit_uv_z.xy * 2 - 1; + float prevLinearDepth = hit_uv_z.z; float2 sampleUV = hit_uv_z.xy; #endif + float2 screenPos = sampleUV.xy * 2 - 1; #if SSR_MIPS // mip selection @@ -268,7 +271,7 @@ half4 sample_vignetted_color(float3 hit_uv_z, float linear_roughness, float hitD float TXlod = 0; #endif half3 prevScreenColor = 0; - bool hit = get_prev_frame_disocclusion_weight_sample(sampleUV.xy, cameraToHitPoint, TXlod, prevScreenColor); + bool hit = get_prev_frame_disocclusion_weight_sample(sampleUV.xy, prevLinearDepth, cameraToHitPoint, TXlod, prevScreenColor); result.rgb = prevScreenColor; //hit = true; //result.rgb = PREV_FRAME_UNPACK(tex2Dlod(prev_frame_tex, float4(sampleUV.xy, 0, TXlod)).rgb); diff --git a/prog/gameLibs/render/shaders/ssr_compute.dshl b/prog/gameLibs/render/shaders/ssr_compute.dshl index 6d6f6ca76..fec692ea6 100644 --- a/prog/gameLibs/render/shaders/ssr_compute.dshl +++ b/prog/gameLibs/render/shaders/ssr_compute.dshl @@ -399,6 +399,8 @@ shader tile_ssr_compute INIT_ENVI_SPECULAR_BASE(cs) GET_ALTERNATE_REFLECTIONS(cs) GET_TRANSLUCENT_ALTERNATE_REFLECTIONS(cs) + INIT_BRUNETON_FOG(cs) + BASE_USE_BRUNETON_FOG(cs) } SSR_DISOCCLUSION(cs) bool manual_denoising = ssr_denoiser_type == manual || ssr_denoiser_type == simple; @@ -460,6 +462,16 @@ shader tile_ssr_compute #define NUM_TEMPORAL_RAYS 16 return hammersley( ((random.x&3) + 3*(random.y&3))&(NUM_TEMPORAL_RAYS-1), NUM_TEMPORAL_RAYS, random ); } + + ##if (ssr_alternate_reflections == yes) + void applyFogToReflection(float3 view, float dist, inout float3 color) + { + half3 add,loss; + get_bruneton_fog(view, dist, loss, add); + color = color*loss + add; + } + ##endif + #define BLOCK_SIZE_W 8 #define BLOCK_SIZE_H 8 @@ -578,6 +590,11 @@ shader tile_ssr_compute { get_alternate_reflections(alternateRefl, reflectionDistance, pixelPos, R, cameraToPoint, normal, false, false); ssrResultPrecision = exp2(-reflectionDistance/w); + if (alternateRefl.a > 0) + { + float len = length(reflectionDistance*R + cameraToPoint); + applyFogToReflection((reflectionDistance*R + cameraToPoint)*rcp(max(1e-6,len)), len, alternateRefl.rgb); + } } if (alternateRefl.a < 1) { @@ -585,7 +602,7 @@ shader tile_ssr_compute reflectionDistance = SSR_FP16_MAX; } newFrame = half4(lerp(alternateRefl.rgb, newFrame.rgb, newFrame.a), 1); - #if TEMPORAL_IN_ONE_PASS + #if !TEMPORAL_IN_ONE_PASS newFrame.a = alternateRefl.a; #endif //newFrame = alternateRefl.a > 0 ? half4(lerp(alternateRefl.rgb, newFrame.rgb, newFrame.a), alternateRefl.a) : newFrame; diff --git a/prog/gameLibs/render/shaders/water_ripples.dshl b/prog/gameLibs/render/shaders/water_ripples.dshl index 80bd2e961..4d30958fd 100644 --- a/prog/gameLibs/render/shaders/water_ripples.dshl +++ b/prog/gameLibs/render/shaders/water_ripples.dshl @@ -293,6 +293,8 @@ shader water_ripples_update compile("target_ps", "water_ripples_update_ps"); } +float water_ripples_resolve_noise_scale = 1.5; + shader water_ripples_resolve { cull_mode = none; @@ -304,6 +306,7 @@ shader water_ripples_resolve water_ripples_t1@smp2d = water_ripples_t1; perlin_tex@smp2d = perlin_tex; water_ripples_frame_no@i1 = water_ripples_frame_no; + water_ripples_resolve_noise_scale@f2 = (1.0 - water_ripples_resolve_noise_scale, 2 * water_ripples_resolve_noise_scale); } @@ -350,9 +353,6 @@ shader water_ripples_resolve } ##endif - float2 noiseTc = 0.0611f*worldPos.xy; // non-periodic - float noiseData = 0.1f + 1.9f*tex2Dlod(perlin_tex, float4(noiseTc, 0, 0)).r; - float deltaXY = origin_size_psize.w * 0.5f; float2 dx = float2(deltaXY, 0.0); float2 dy = float2(0.0, deltaXY); @@ -370,7 +370,7 @@ shader water_ripples_resolve samples.z = tex2Dlod(water_ripples_t1, float4(tcOffset - dx, 0, 0)).r; \ samples.w = tex2Dlod(water_ripples_t1, float4(tcOffset - dy, 0, 0)).r; \ \ - normal += _w * normalize(float3(-(samples.x - samples.z), -(samples.y - samples.w), deltaXY * wSize * noiseData)).xy; + normal += _w * normalize(float3(-(samples.x - samples.z), -(samples.y - samples.w), deltaXY * wSize)).xy; // use blur for smoother gradients @@ -395,6 +395,15 @@ shader water_ripples_resolve ##endif center1 = waterBelowUnclamped > waterBelowBorder ? max(center1, -waterBelowUnclamped + waterBelowBorder) : center1; + BRANCH + if (water_ripples_resolve_noise_scale.x < 1.0f) + { + float2 noiseTc1 = 0.0611f*worldPos.xy + 0.5*normal.xy; // non-periodic + float2 noiseTc2 = 0.0599f*worldPos.yx - 0.5*normal.xy; // non-periodic + normal.x *= water_ripples_resolve_noise_scale.x + water_ripples_resolve_noise_scale.y*tex2Dlod(perlin_tex, float4(noiseTc1, 0, 0)).r; + normal.y *= water_ripples_resolve_noise_scale.x + water_ripples_resolve_noise_scale.y*tex2Dlod(perlin_tex, float4(noiseTc2, 0, 0)).r; + } + normal = normal * 0.5 + 0.5; return float4(normal.xy, 0.5 + center1*0.5, 1); } diff --git a/prog/gameLibs/render/shaders/wetness_inc.dshl b/prog/gameLibs/render/shaders/wetness_inc.dshl index c65e4e0c9..94e20fc5b 100644 --- a/prog/gameLibs/render/shaders/wetness_inc.dshl +++ b/prog/gameLibs/render/shaders/wetness_inc.dshl @@ -189,7 +189,7 @@ macro USE_WATER_RIPPLES() // ofc on very large puddles it can look weird, because new pseudo-waves are not physical, but on small ones it looks good #define RIPPLE_PUDDLE_SCALE_HACK 400.0f rippleNormalPacked.rgb = rippleNormalPacked.rgb*2 - 1; - rippleNormalPacked.rg *= cos(rippleNormalPacked.b * RIPPLE_PUDDLE_SCALE_HACK); + rippleNormalPacked.rg *= 2.0f * cos(rippleNormalPacked.b * RIPPLE_PUDDLE_SCALE_HACK); rippleNormalPacked.rg = 0.5f + rippleNormalPacked.rg * 0.5f; ##endif rippleNormalPacked.rg = lerp(rippleNormalPacked.rg, float2(0.5, 0.5), max(borderFade.x, borderFade.y)); diff --git a/prog/gameLibs/render/texDebug/texDebug.cpp b/prog/gameLibs/render/texDebug/texDebug.cpp index 9c185363f..5b8143aac 100644 --- a/prog/gameLibs/render/texDebug/texDebug.cpp +++ b/prog/gameLibs/render/texDebug/texDebug.cpp @@ -102,6 +102,8 @@ static UniqueTex unlockImage; static TMatrix cubeViewMatrix; +static bool selectableNeedsFocus = false; + static void save_pinned_list() { #if _TARGET_PC | _TARGET_XBOX @@ -434,6 +436,7 @@ static void render_selected_texture() auto &formatDesc = get_tex_format_desc(entry->cflg); auto formatName = get_tex_format_name(entry->cflg); + ImGui::Text("Name: %s", selectedTextureName.c_str()); ImGui::Text("Type: %s", get_tex_type_name(entry->resType)); ImGui::SameLine(); ImGui::Text("Format: %s", formatName); @@ -889,7 +892,16 @@ static void imguiWindow() auto entry = textures.find(name); if (entry == textures.end()) continue; - if (!entry->first.empty() && ImGui::Selectable(entry->first.data(), entry->first == selectedTextureName)) + + bool selected = entry->first == selectedTextureName; + + if (selected && selectableNeedsFocus) + { + ImGui::SetScrollHereY(); + selectableNeedsFocus = false; + } + + if (!entry->first.empty() && ImGui::Selectable(entry->first.data(), selected)) { selectedTextureName = entry->first; reset_view(); @@ -996,6 +1008,21 @@ void teardown() unlockImage.close(); } +void select_texture(const char *name) +{ + if (strcmp(name, "") == 0) + { + imgui_window_set_visible("Render", "Texture debug", false); + return; + } + + imgui_window_set_visible("Render", "Texture debug", true); + refresh_textures(); + update_filtered_textures(); + selectedTextureName = name; + selectableNeedsFocus = true; +} + } // namespace texdebug REGISTER_IMGUI_WINDOW("Render", "Texture debug", texdebug::imguiWindow); diff --git a/prog/gameLibs/render/texDebug/texDebug_stub.cpp b/prog/gameLibs/render/texDebug/texDebug_stub.cpp index a66a39bce..a1213db5f 100644 --- a/prog/gameLibs/render/texDebug/texDebug_stub.cpp +++ b/prog/gameLibs/render/texDebug/texDebug_stub.cpp @@ -6,4 +6,5 @@ namespace texdebug { void init() {} void teardown() {} +void select_texture(const char *) {} } // namespace texdebug \ No newline at end of file diff --git a/prog/samples/commonShaders/contact_shadows.dshl b/prog/samples/commonShaders/contact_shadows.dshl index bc1a2957d..01d661874 100644 --- a/prog/samples/commonShaders/contact_shadows.dshl +++ b/prog/samples/commonShaders/contact_shadows.dshl @@ -4,6 +4,7 @@ float4 projtm_psf_2; float4 projtm_psf_3; int shadow_frame = 0; float contact_shadow_len = 0.2; +float contact_shadow_step_offset = 0.2; macro CONTACT_SHADOWS_BASE(code) (code) { projectionMatrix@f44 = {projtm_psf_0, projtm_psf_1, projtm_psf_2, projtm_psf_3}; } diff --git a/prog/scripts/sq/std/string.nut b/prog/scripts/sq/std/string.nut index 7710ba70c..68b5dc47e 100644 --- a/prog/scripts/sq/std/string.nut +++ b/prog/scripts/sq/std/string.nut @@ -219,7 +219,7 @@ function tostring_any(input, tostringfunc=null, compact=true) { else if (typ == "string"){ if (input=="") return "\"\"" - return compact ? input : $"\"{input}\"" + return $"\"{input}\"" } else if (typ == "null"){ return "null" @@ -229,7 +229,7 @@ function tostring_any(input, tostringfunc=null, compact=true) { return r.contains(".") || r.contains("e") ? r : $"{r}.0" } else if (typ=="instance"){ - return input.tostring() + return $"\"{input.tostring()}\"" } else if (typ == "userdata"){ return "#USERDATA#" diff --git a/prog/scripts/tools/localization_tools/debug_run_wild.bat b/prog/scripts/tools/localization_tools/debug_run_wild.bat index 6381fdcf0..ffe738dca 100644 --- a/prog/scripts/tools/localization_tools/debug_run_wild.bat +++ b/prog/scripts/tools/localization_tools/debug_run_wild.bat @@ -1,5 +1,8 @@ @REM This batch file is for validation scripts debugging. It is for use by programmers only. @REM It validates all WT localizaton files, and writes results into local "result.txt" file. + +@REM For better usage exaples see: dagor2\skyquake\prog\scripts\tools\localization_tools + @echo off setlocal set PARAMS_JSON="{\"root\":\"../../../../skyquake/develop/gameBase/lang_src\",\"scan\":[\"\"],\"exclude\":[\"lang\"],\"verbose\":true}" diff --git a/prog/scripts/tools/localization_tools/langs_validation.nut b/prog/scripts/tools/localization_tools/langs_validation.nut index 97e142792..dda0a6512 100644 --- a/prog/scripts/tools/localization_tools/langs_validation.nut +++ b/prog/scripts/tools/localization_tools/langs_validation.nut @@ -23,9 +23,12 @@ local currencySymbols = { local langsByPluralFormsCount = [ /* 0 */ [], - /* 1 */ [ "Chinese", "Japanese", "Vietnamese", "Korean", "TChinese", "HChinese" ], + /* 1 */ [ "Chinese", "Japanese", "Vietnamese", "Korean", "TChinese", "HChinese", "Thai", "Indonesian" ], /* 2 */ [ "English", "French", "Italian", "German", "Spanish", "Turkish", "Portuguese", "Hungarian", "Georgian", "Greek" ], /* 3 */ [ "Russian", "Polish", "Czech", "Ukrainian", "Serbian", "Belarusian", "Romanian", "Croatian" ], + /* 4 */ [], + /* 5 */ [], + /* 6 */ [ "Arabic" ], ] local totalRowsChecked = 0 diff --git a/prog/tools/AssetViewer/A2d/a2d.cpp b/prog/tools/AssetViewer/A2d/a2d.cpp index 25401063a..12d52d3a3 100644 --- a/prog/tools/AssetViewer/A2d/a2d.cpp +++ b/prog/tools/AssetViewer/A2d/a2d.cpp @@ -25,6 +25,7 @@ #include #include +#include #include #include #include @@ -132,18 +133,19 @@ static A2dNodeStats getNodesParamsFromA2d(AnimV20::AnimData *a2d) A2dNodeStats s; - AnimDataChan *adcPos = a2d->dumpData.getChanPoint3(CHTYPE_POSITION); - AnimDataChan *adcRot = a2d->dumpData.getChanQuat(CHTYPE_ROTATION); - AnimDataChan *adcScl = a2d->dumpData.getChanPoint3(CHTYPE_SCALE); + AnimDataChan *adcPos = a2d->dumpData.getChanPoint3(CHTYPE_POSITION); + AnimDataChan *adcRot = a2d->dumpData.getChanQuat(CHTYPE_ROTATION); + AnimDataChan *adcScl = a2d->dumpData.getChanPoint3(CHTYPE_SCALE); if (adcPos) { s.pos_cnt = adcPos->nodeNum; for (int i = 0; i < adcPos->nodeNum; ++i) { - if (s.pos_max_keys < adcPos->nodeAnim[i].keyNum) - s.pos_max_keys = adcPos->nodeAnim[i].keyNum; - s.pos_total_keys += adcPos->nodeAnim[i].keyNum; + auto n = adcPos->getNumKeys(dag::Index16(i)); + if (s.pos_max_keys < n) + s.pos_max_keys = n; + s.pos_total_keys += n; } } if (adcRot) @@ -151,9 +153,10 @@ static A2dNodeStats getNodesParamsFromA2d(AnimV20::AnimData *a2d) s.rot_cnt = adcRot->nodeNum; for (int i = 0; i < adcRot->nodeNum; ++i) { - if (s.rot_max_keys < adcRot->nodeAnim[i].keyNum) - s.rot_max_keys = adcRot->nodeAnim[i].keyNum; - s.rot_total_keys += adcRot->nodeAnim[i].keyNum; + auto n = adcRot->getNumKeys(dag::Index16(i)); + if (s.rot_max_keys < n) + s.rot_max_keys = n; + s.rot_total_keys += n; } } if (adcScl) @@ -161,9 +164,10 @@ static A2dNodeStats getNodesParamsFromA2d(AnimV20::AnimData *a2d) s.scl_cnt = adcScl->nodeNum; for (int i = 0; i < adcScl->nodeNum; ++i) { - if (s.scl_max_keys < adcScl->nodeAnim[i].keyNum) - s.scl_max_keys = adcScl->nodeAnim[i].keyNum; - s.scl_total_keys += adcScl->nodeAnim[i].keyNum; + auto n = adcScl->getNumKeys(dag::Index16(i)); + if (s.scl_max_keys < n) + s.scl_max_keys = n; + s.scl_total_keys += n; } } @@ -174,9 +178,9 @@ static eastl::map getNodesNamesFromA2d(AnimV20::AnimData *a2 { using namespace AnimV20; - AnimDataChan *adcPos = a2d->dumpData.getChanPoint3(CHTYPE_POSITION); - AnimDataChan *adcRot = a2d->dumpData.getChanQuat(CHTYPE_ROTATION); - AnimDataChan *adcScl = a2d->dumpData.getChanPoint3(CHTYPE_SCALE); + AnimDataChan *adcPos = a2d->dumpData.getChanPoint3(CHTYPE_POSITION); + AnimDataChan *adcRot = a2d->dumpData.getChanQuat(CHTYPE_ROTATION); + AnimDataChan *adcScl = a2d->dumpData.getChanPoint3(CHTYPE_SCALE); A2dNodeStats s = getNodesParamsFromA2d(a2d); diff --git a/prog/tools/AssetViewer/A2d/a2d.h b/prog/tools/AssetViewer/A2d/a2d.h index 306b4741b..ef4a82370 100644 --- a/prog/tools/AssetViewer/A2d/a2d.h +++ b/prog/tools/AssetViewer/A2d/a2d.h @@ -13,10 +13,6 @@ class SimpleString; class ILodController; -namespace AnimV20 -{ -class AnimV20; -} class A2dPlugin : public IGenEditorPlugin, public PropPanel::ControlEventHandler { diff --git a/prog/tools/AssetViewer/animTree/animTree.cpp b/prog/tools/AssetViewer/animTree/animTree.cpp index bd952e40d..0ce3db2aa 100644 --- a/prog/tools/AssetViewer/animTree/animTree.cpp +++ b/prog/tools/AssetViewer/animTree/animTree.cpp @@ -890,7 +890,7 @@ void AnimTreePlugin::fillTreePanels(PropPanel::ContainerPropertyControl *panel) DataBlock::parseIncludesAsParams = curParseIncludesAsParams; - ctrlChildsDialog.setTreePanels(ctrlsTree, nodesTree, curAsset); + ctrlChildsDialog.setTreePanels(panel, curAsset, this); masksTree->setBool(masksRoot, /*open*/ true); nodesTree->setBool(nodesRoot, /*open*/ true); ctrlsTree->setBool(ctrlsRoot, /*open*/ true); diff --git a/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.cpp b/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.cpp index c7086683f..77595588d 100644 --- a/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.cpp +++ b/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.cpp @@ -3,6 +3,7 @@ #include "ctrlChildsDialog.h" #include "../animTreeUtils.h" #include "../animTreeIcons.h" +#include "../animTreePanelPids.h" #include "../blendNodes/blendNodeType.h" #include "hub.h" @@ -11,6 +12,7 @@ #include "linearPoly.h" #include +#include #include #include #include @@ -20,6 +22,14 @@ enum PID_CHILDS_TREE }; +namespace ContextMenu +{ +enum +{ + EDIT = 0, +}; +} + CtrlChildsDialog::CtrlChildsDialog(dag::Vector &controllers, dag::Vector &nodes, dag::Vector &paths) : controllers{controllers}, @@ -32,6 +42,32 @@ CtrlChildsDialog::CtrlChildsDialog(dag::Vector &controllers, dag:: initPanel(); } +bool CtrlChildsDialog::onTreeContextMenu(PropPanel::ContainerPropertyControl &tree, int pcb_id, + PropPanel::ITreeInterface &tree_interface) +{ + if (pcb_id == PID_CHILDS_TREE) + { + String name = tree.getCaption(tree.getSelLeaf()); + if (strstr(name.c_str(), "not found")) + return false; + + PropPanel::IMenu &menu = tree_interface.createContextMenu(); + menu.addItem(ROOT_MENU_ITEM, ContextMenu::EDIT, "Edit"); + menu.setEventHandler(this); + return true; + } + return false; +} + +int CtrlChildsDialog::onMenuItemClick(unsigned id) +{ + switch (id) + { + case ContextMenu::EDIT: editSelectedNode(); break; + } + return 0; +} + void CtrlChildsDialog::initPanel() { PropPanel::ContainerPropertyControl *panel = DialogWindow::getPanel(); @@ -45,14 +81,18 @@ void CtrlChildsDialog::clear() tree->clear(); ctrlsTree = nullptr; nodesTree = nullptr; + pluginPanel = nullptr; + pluginEventHandler = nullptr; asset = nullptr; } -void CtrlChildsDialog::setTreePanels(PropPanel::ContainerPropertyControl *ctrls_tree, PropPanel::ContainerPropertyControl *nodes_tree, - DagorAsset *cur_asset) +void CtrlChildsDialog::setTreePanels(PropPanel::ContainerPropertyControl *panel, DagorAsset *cur_asset, + PropPanel::ControlEventHandler *event_handler) { - ctrlsTree = ctrls_tree; - nodesTree = nodes_tree; + pluginPanel = panel; + pluginEventHandler = event_handler; + ctrlsTree = panel->getById(PID_ANIM_BLEND_CTRLS_TREE)->getContainer(); + nodesTree = panel->getById(PID_ANIM_BLEND_NODES_TREE)->getContainer(); asset = cur_asset; } @@ -61,9 +101,10 @@ void CtrlChildsDialog::fillChildsTree(PropPanel::TLeafHandle leaf) PropPanel::ContainerPropertyControl *panel = getPanel(); PropPanel::ContainerPropertyControl *tree = panel->getById(PID_CHILDS_TREE)->getContainer(); tree->clear(); + tree->setTreeEventHandler(this); AnimCtrlData *leafData = find_data_by_handle(controllers, leaf); if (leafData != controllers.end()) - fillChilds(tree, nullptr, *leafData); + fillChilds(tree, nullptr, *leafData, String("")); } static bool check_leaf_not_looping(PropPanel::ContainerPropertyControl *tree, PropPanel::TLeafHandle parent, const char *name) @@ -87,9 +128,28 @@ static bool check_leaf_not_looping(PropPanel::ContainerPropertyControl *tree, Pr return true; } -void CtrlChildsDialog::fillChilds(PropPanel::ContainerPropertyControl *tree, PropPanel::TLeafHandle parent, AnimCtrlData &leaf_data) +String CtrlChildsDialog::getImportantParamPrefixName(const DataBlock &settings, int child_idx, CtrlType type) { - String name = ctrlsTree->getCaption(leaf_data.handle); + String out; + switch (type) + { + case ctrl_type_randomSwitch: return random_switch_get_child_prefix_name(settings, child_idx); + case ctrl_type_paramSwitch: return param_switch_get_child_prefix_name(settings, child_idx); + case ctrl_type_linearPoly: return linear_poly_get_child_prefix_name(settings, child_idx); + } + + return out; +} + +static bool is_contain_important_param(CtrlType type) +{ + return type == ctrl_type_randomSwitch || type == ctrl_type_paramSwitch || type == ctrl_type_linearPoly; +} + +void CtrlChildsDialog::fillChilds(PropPanel::ContainerPropertyControl *tree, PropPanel::TLeafHandle parent, AnimCtrlData &leaf_data, + const String &prefix_name) +{ + String name = String(0, "%s%s", prefix_name, ctrlsTree->getCaption(leaf_data.handle)); PropPanel::TLeafHandle leaf = tree->createTreeLeaf(parent, name, get_ctrl_icon_name(leaf_data.type)); if (!check_leaf_not_looping(tree, parent, name)) { @@ -100,46 +160,53 @@ void CtrlChildsDialog::fillChilds(PropPanel::ContainerPropertyControl *tree, Pro return; } + PropPanel::TLeafHandle includeLeaf = ctrlsTree->getParentLeaf(leaf_data.handle); + DataBlock props; + DataBlock *settings = nullptr; + if (is_contain_important_param(leaf_data.type)) + { + String fullPath; + props = get_props_from_include_leaf(paths, *asset, ctrlsTree, includeLeaf, fullPath, /*only_includes*/ true); + DataBlock *ctrlProps = get_props_from_include_leaf_ctrl_node(controllers, paths, *asset, props, ctrlsTree, includeLeaf); + settings = find_block_by_name(ctrlProps, ctrlsTree->getCaption(leaf_data.handle)); + } tree->setBool(leaf, /*open*/ true); for (int i = 0; i < leaf_data.childs.size(); ++i) { + String prefixChildName; + if (settings) + prefixChildName = getImportantParamPrefixName(*settings, i, leaf_data.type); const int idx = leaf_data.childs[i]; AnimCtrlData *ctrlChild = eastl::find_if(controllers.begin(), controllers.end(), [idx](const AnimCtrlData &data) { return idx == data.id; }); if (ctrlChild != controllers.end()) - fillChilds(tree, leaf, *ctrlChild); + fillChilds(tree, leaf, *ctrlChild, prefixChildName); else { BlendNodeData *nodeChild = eastl::find_if(nodes.begin(), nodes.end(), [idx](const BlendNodeData &data) { return idx == data.id; }); if (nodeChild != nodes.end()) - tree->createTreeLeaf(leaf, nodesTree->getCaption(nodeChild->handle), get_blend_node_icon_name(nodes[idx].type)); + tree->createTreeLeaf(leaf, String(0, "%s%s", prefixChildName, nodesTree->getCaption(nodeChild->handle)), + get_blend_node_icon_name(nodeChild->type)); else { - PropPanel::TLeafHandle includeLeaf = ctrlsTree->getParentLeaf(leaf_data.handle); - String fullPath; - DataBlock props = get_props_from_include_leaf(paths, *asset, ctrlsTree, includeLeaf, fullPath, /*only_includes*/ true); - if (DataBlock *ctrlProps = get_props_from_include_leaf_ctrl_node(controllers, paths, *asset, props, ctrlsTree, includeLeaf)) + if (!settings) + { + String fullPath; + props = get_props_from_include_leaf(paths, *asset, ctrlsTree, includeLeaf, fullPath, /*only_includes*/ true); + DataBlock *ctrlProps = get_props_from_include_leaf_ctrl_node(controllers, paths, *asset, props, ctrlsTree, includeLeaf); + settings = find_block_by_name(ctrlProps, ctrlsTree->getCaption(leaf_data.handle)); + } + const char *childName = getChildNameFromSettings(*settings, leaf_data.type, i); + CtrlChildSearchResult result = + find_ctrl_child_idx_and_icon_by_name(ctrlsTree, nodesTree, leaf_data, controllers, nodes, childName); + if (result.id != -1) { - if (DataBlock *settings = find_block_by_name(ctrlProps, ctrlsTree->getCaption(leaf_data.handle))) - { - const char *childName = getChildNameFromSettings(*settings, leaf_data.type, i); - CtrlChildSearchResult result = - find_ctrl_child_idx_and_icon_by_name(ctrlsTree, nodesTree, leaf_data, controllers, nodes, childName); - if (result.id != -1) - { - tree->createTreeLeaf(leaf, childName, result.iconName); - leaf_data.childs[i] = result.id; - } - else - { - String leafName(0, "(not found) %s", childName); - tree->createTreeLeaf(leaf, leafName.c_str(), nullptr); - } - } - else - tree->createTreeLeaf(leaf, "not found", nullptr); + tree->createTreeLeaf(leaf, String(0, "%s%s", prefixChildName, childName), result.iconName); + leaf_data.childs[i] = result.id; } + else + tree->createTreeLeaf(leaf, String(0, "(not found) %s%s", prefixChildName, childName), nullptr); } } } @@ -166,3 +233,40 @@ void CtrlChildsDialog::updateImguiDialog() DialogWindow::updateImguiDialog(); } + +void CtrlChildsDialog::editSelectedNode() +{ + PropPanel::ContainerPropertyControl *tree = DialogWindow::getPanel()->getById(PID_CHILDS_TREE)->getContainer(); + String leafName = tree->getCaption(tree->getSelLeaf()); + const char *name = strstr(leafName.c_str(), ": "); + if (name) + name += 2; // Skip ": " part + else + name = leafName.c_str(); + + AnimCtrlData *ctrlData = eastl::find_if(controllers.begin(), controllers.end(), + [ctrlsTree = ctrlsTree, name](const AnimCtrlData &data) { return ctrlsTree->getCaption(data.handle) == name; }); + if (ctrlData != controllers.end()) + { + // Check if group minimized and open it + if (pluginPanel->getBool(PID_ANIM_BLEND_CTRLS_GROUP)) + pluginPanel->setBool(PID_ANIM_BLEND_CTRLS_GROUP, false); + ctrlsTree->setSelLeaf(ctrlData->handle); + PropPanel::focus_helper.requestFocus(pluginPanel->getById(PID_ANIM_BLEND_CTRLS_GROUP)->getContainer()); + pluginEventHandler->onChange(PID_ANIM_BLEND_CTRLS_TREE, pluginPanel); + } + else + { + BlendNodeData *nodeData = eastl::find_if(nodes.begin(), nodes.end(), + [nodesTree = nodesTree, name](const BlendNodeData &data) { return nodesTree->getCaption(data.handle) == name; }); + if (nodeData != nodes.end()) + { + // Check if group minimized and open it + if (pluginPanel->getBool(PID_ANIM_BLEND_NODES_GROUP)) + pluginPanel->setBool(PID_ANIM_BLEND_NODES_GROUP, false); + nodesTree->setSelLeaf(nodeData->handle); + PropPanel::focus_helper.requestFocus(pluginPanel->getById(PID_ANIM_BLEND_NODES_GROUP)->getContainer()); + pluginEventHandler->onChange(PID_ANIM_BLEND_NODES_TREE, pluginPanel); + } + } +} diff --git a/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.h b/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.h index 8b5c9c4b0..78bbc863d 100644 --- a/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.h +++ b/prog/tools/AssetViewer/animTree/controllers/ctrlChildsDialog.h @@ -4,24 +4,31 @@ #include "animCtrlData.h" #include "../blendNodes/blendNodeData.h" #include +#include +#include class DagorAsset; class DataBlock; -class CtrlChildsDialog : public PropPanel::DialogWindow +class CtrlChildsDialog : public PropPanel::DialogWindow, public PropPanel::ITreeControlEventHandler, public IMenuEventHandler { public: CtrlChildsDialog(dag::Vector &controllers, dag::Vector &nodes, dag::Vector &paths); + virtual bool onTreeContextMenu(PropPanel::ContainerPropertyControl &tree, int pcb_id, + PropPanel::ITreeInterface &tree_interface) override; + virtual int onMenuItemClick(unsigned id) override; void initPanel(); void clear(); - void setTreePanels(PropPanel::ContainerPropertyControl *ctrls_tree, PropPanel::ContainerPropertyControl *nodes_tree, - DagorAsset *cur_asset); + void setTreePanels(PropPanel::ContainerPropertyControl *panel, DagorAsset *cur_asset, PropPanel::ControlEventHandler *event_handler); void fillChildsTree(PropPanel::TLeafHandle leaf); - void fillChilds(PropPanel::ContainerPropertyControl *tree, PropPanel::TLeafHandle parent, AnimCtrlData &leaf_data); + void fillChilds(PropPanel::ContainerPropertyControl *tree, PropPanel::TLeafHandle parent, AnimCtrlData &leaf_data, + const String &prefix_name); const char *getChildNameFromSettings(const DataBlock &settings, CtrlType type, int idx); + String getImportantParamPrefixName(const DataBlock &settings, int child_idx, CtrlType type); private: virtual void updateImguiDialog() override; + void editSelectedNode(); static const int DEFAULT_MINIMUM_WIDTH = 250; static const int DEFAULT_MINIMUM_HEIGHT = 450; @@ -33,4 +40,7 @@ class CtrlChildsDialog : public PropPanel::DialogWindow // Used for get caption by handle PropPanel::ContainerPropertyControl *ctrlsTree = nullptr; PropPanel::ContainerPropertyControl *nodesTree = nullptr; + + PropPanel::ContainerPropertyControl *pluginPanel = nullptr; + PropPanel::ControlEventHandler *pluginEventHandler = nullptr; }; \ No newline at end of file diff --git a/prog/tools/AssetViewer/animTree/controllers/linearPoly.cpp b/prog/tools/AssetViewer/animTree/controllers/linearPoly.cpp index 746f59940..bb5c952c8 100644 --- a/prog/tools/AssetViewer/animTree/controllers/linearPoly.cpp +++ b/prog/tools/AssetViewer/animTree/controllers/linearPoly.cpp @@ -158,3 +158,8 @@ void AnimTreePlugin::linearPolyFindChilds(PropPanel::ContainerPropertyControl *p } const char *linear_poly_get_child_name_by_idx(const DataBlock &settings, int idx) { return settings.getBlock(idx)->getStr("name"); } + +String linear_poly_get_child_prefix_name(const DataBlock &settings, int idx) +{ + return String(0, "%d: ", settings.getBlock(idx)->getReal("val", 0.f)); +} diff --git a/prog/tools/AssetViewer/animTree/controllers/linearPoly.h b/prog/tools/AssetViewer/animTree/controllers/linearPoly.h index fe14fd965..5e455c099 100644 --- a/prog/tools/AssetViewer/animTree/controllers/linearPoly.h +++ b/prog/tools/AssetViewer/animTree/controllers/linearPoly.h @@ -3,6 +3,7 @@ #include #include +#include namespace PropPanel { @@ -20,3 +21,4 @@ void linear_poly_init_block_settings(PropPanel::ContainerPropertyControl *panel, void linear_poly_set_selected_node_list_settings(PropPanel::ContainerPropertyControl *panel, const DataBlock *settings); void linear_poly_remove_node_from_list(PropPanel::ContainerPropertyControl *panel, DataBlock *settings); const char *linear_poly_get_child_name_by_idx(const DataBlock &settings, int idx); +String linear_poly_get_child_prefix_name(const DataBlock &settings, int idx); diff --git a/prog/tools/AssetViewer/animTree/controllers/paramSwitch.cpp b/prog/tools/AssetViewer/animTree/controllers/paramSwitch.cpp index 4a602b6a9..39f9dc8af 100644 --- a/prog/tools/AssetViewer/animTree/controllers/paramSwitch.cpp +++ b/prog/tools/AssetViewer/animTree/controllers/paramSwitch.cpp @@ -63,6 +63,12 @@ const char *param_switch_get_child_name_by_idx(const DataBlock &settings, int id return nodes->getBlock(idx)->getStr("name"); } +String param_switch_get_child_prefix_name(const DataBlock &settings, int idx) +{ + const DataBlock *nodes = settings.getBlockByNameEx("nodes"); + return String(0, "%s: ", nodes->getBlock(idx)->getBlockName()); +} + static void fill_param_switch_enum_list(PropPanel::ContainerPropertyControl *panel, const DataBlock *nodes) { Tab nodeNames; diff --git a/prog/tools/AssetViewer/animTree/controllers/paramSwitch.h b/prog/tools/AssetViewer/animTree/controllers/paramSwitch.h index b70872fd3..2f2a72402 100644 --- a/prog/tools/AssetViewer/animTree/controllers/paramSwitch.h +++ b/prog/tools/AssetViewer/animTree/controllers/paramSwitch.h @@ -26,3 +26,4 @@ void param_switch_prepare_params(dag::Vector ¶ms, PropPanel:: void param_switch_set_selected_node_list_settings(PropPanel::ContainerPropertyControl *panel, const DataBlock *settings); void param_switch_remove_node_from_list(PropPanel::ContainerPropertyControl *panel, DataBlock *settings); const char *param_switch_get_child_name_by_idx(const DataBlock &settings, int idx); +String param_switch_get_child_prefix_name(const DataBlock &settings, int idx); diff --git a/prog/tools/AssetViewer/animTree/controllers/randomSwitch.cpp b/prog/tools/AssetViewer/animTree/controllers/randomSwitch.cpp index dec3232ad..fd20e62e5 100644 --- a/prog/tools/AssetViewer/animTree/controllers/randomSwitch.cpp +++ b/prog/tools/AssetViewer/animTree/controllers/randomSwitch.cpp @@ -131,3 +131,15 @@ const char *random_switch_get_child_name_by_idx(const DataBlock &settings, int i { return settings.getBlockByNameEx("weight")->getParamName(idx); } + +String random_switch_get_child_prefix_name(const DataBlock &settings, int idx) +{ + const DataBlock *weights = settings.getBlockByNameEx("weight"); + float sum = 0.f; + for (int i = 0; i < weights->paramCount(); ++i) + sum += weights->getReal(i); + + const float value = safediv(weights->getReal(idx), sum) * 100.f; + + return String(0, "%d%: ", value); +} diff --git a/prog/tools/AssetViewer/animTree/controllers/randomSwitch.h b/prog/tools/AssetViewer/animTree/controllers/randomSwitch.h index a77212186..22aefbda7 100644 --- a/prog/tools/AssetViewer/animTree/controllers/randomSwitch.h +++ b/prog/tools/AssetViewer/animTree/controllers/randomSwitch.h @@ -3,6 +3,7 @@ #include #include +#include namespace PropPanel { @@ -20,3 +21,4 @@ void random_switch_init_block_settings(PropPanel::ContainerPropertyControl *pane void random_switch_set_selected_node_list_settings(PropPanel::ContainerPropertyControl *panel, const DataBlock *settings); void random_switch_remove_node_from_list(PropPanel::ContainerPropertyControl *panel, DataBlock *settings); const char *random_switch_get_child_name_by_idx(const DataBlock &settings, int idx); +String random_switch_get_child_prefix_name(const DataBlock &settings, int idx); diff --git a/prog/tools/ShaderCompiler2/_colorer4/dshl.hrc b/prog/tools/ShaderCompiler2/_colorer4/dshl.hrc index a7554a42a..ada16ece8 100644 --- a/prog/tools/ShaderCompiler2/_colorer4/dshl.hrc +++ b/prog/tools/ShaderCompiler2/_colorer4/dshl.hrc @@ -517,6 +517,7 @@ + diff --git a/prog/tools/ShaderCompiler2/assemblyShader.cpp b/prog/tools/ShaderCompiler2/assemblyShader.cpp index fafb715ba..912111fbe 100644 --- a/prog/tools/ShaderCompiler2/assemblyShader.cpp +++ b/prog/tools/ShaderCompiler2/assemblyShader.cpp @@ -2348,6 +2348,7 @@ bool AssembleShaderEvalCB::compareHWToken(int hw_token, const ShHardwareOptions case SHADER_TOKENS::SHTOK_fsh_4_1: return opt.fshVersion >= 4.1_sm; case SHADER_TOKENS::SHTOK_fsh_5_0: return opt.fshVersion >= 5.0_sm; case SHADER_TOKENS::SHTOK_fsh_6_0: return opt.fshVersion >= 6.0_sm; + case SHADER_TOKENS::SHTOK_fsh_6_2: return opt.fshVersion >= 6.2_sm; case SHADER_TOKENS::SHTOK_fsh_6_6: return opt.fshVersion >= 6.6_sm; case SHADER_TOKENS::SHTOK_pc: // backward comp @@ -2458,6 +2459,7 @@ void AssembleShaderEvalCB::buildHwDefines(const ShHardwareOptions &opt) ADD_HW_MACRO(fsh_4_1); ADD_HW_MACRO(fsh_5_0); ADD_HW_MACRO(fsh_6_0); + ADD_HW_MACRO(fsh_6_2); ADD_HW_MACRO(fsh_6_6); #undef ADD_HW_MACRO } diff --git a/prog/tools/ShaderCompiler2/shlex.dlp b/prog/tools/ShaderCompiler2/shlex.dlp index 2fb0fbbd0..4d24cb7b8 100644 --- a/prog/tools/ShaderCompiler2/shlex.dlp +++ b/prog/tools/ShaderCompiler2/shlex.dlp @@ -168,6 +168,7 @@ string
==> string; 'fsh_4_0'
=> fsh_4_0; 'fsh_5_0'
=> fsh_5_0; 'fsh_6_0'
=> fsh_6_0; +'fsh_6_2'
=> fsh_6_2; 'fsh_6_6'
=> fsh_6_6; 'bindless'
=> bindless; 'globtm'
=> globtm; @@ -305,6 +306,7 @@ keyword -> 'fsh_4_0' | 'fsh_5_0' | 'fsh_6_0' | + 'fsh_6_2' | 'fsh_6_6' | 'bindless' | 'globtm' | diff --git a/prog/tools/ShaderCompiler2/shsyn.whl b/prog/tools/ShaderCompiler2/shsyn.whl index bda031bb8..fce9bd6af 100644 --- a/prog/tools/ShaderCompiler2/shsyn.whl +++ b/prog/tools/ShaderCompiler2/shsyn.whl @@ -93,6 +93,7 @@ terminal "fsh_4_1" (SHTOK_fsh_4_1), "fsh_5_0" (SHTOK_fsh_5_0), "fsh_6_0" (SHTOK_fsh_6_0), + "fsh_6_2" (SHTOK_fsh_6_2), "fsh_6_6" (SHTOK_fsh_6_6), "bindless" (SHTOK_bindless), "globtm" (SHTOK_globtm), @@ -402,7 +403,7 @@ equal-op(equal_op) -> ("=="|"!="|"<"|"<="|">"|">=")=op; hardware-support(hardware_support) -> - ("metal"|"metaliOS"|"vulkan"|"pc"|"dx11"|"dx12"|"xbox"|"scarlett"|"ps4"|"ps5"|"fsh_4_0"|"fsh_5_0"|"fsh_6_0"|"fsh_6_6"|"mesh"|"bindless")=var; + ("metal"|"metaliOS"|"vulkan"|"pc"|"dx11"|"dx12"|"xbox"|"scarlett"|"ps4"|"ps5"|"fsh_4_0"|"fsh_5_0"|"fsh_6_0"|"fsh_6_2"|"fsh_6_6"|"mesh"|"bindless")=var; bool-value(bool_value) -> ("shader"=nothing equal-op=cmpop ident=shader) | diff --git a/prog/tools/libTools/assetMgrHlp/texConvCache.cpp b/prog/tools/libTools/assetMgrHlp/texConvCache.cpp index eb5d93a2b..f08edec32 100644 --- a/prog/tools/libTools/assetMgrHlp/texConvCache.cpp +++ b/prog/tools/libTools/assetMgrHlp/texConvCache.cpp @@ -312,7 +312,7 @@ static bool checkCacheChanged(AssetExportCache &c4, DagorAsset &a, const DataBlo // A lot of assets add the asset itself to the list of src data files. // checkFileChanged is quite slow and we checked this asset already above. // Removing this asset from gather list is faster then calling checkFileChanged one extra time - if (a_files.size() > 0 && strcmp(a_files[0].c_str(), a.getTargetFilePath().c_str()) == 0) + if (a.isVirtual() && a_files.size() > 0 && strcmp(a_files[0].c_str(), a.getTargetFilePath().c_str()) == 0) a_files.erase(a_files.begin()); int cnt = a_files.size(); for (int j = 0; j < cnt; j++) diff --git a/prog/tools/libTools/assetsGui/av_assetTypeFilterControl.h b/prog/tools/libTools/assetsGui/av_assetTypeFilterControl.h new file mode 100644 index 000000000..e569c6574 --- /dev/null +++ b/prog/tools/libTools/assetsGui/av_assetTypeFilterControl.h @@ -0,0 +1,68 @@ +// Copyright (C) Gaijin Games KFT. All rights reserved. +#pragma once + +#include +#include +#include +#include +#include + +class AssetTypeFilterControl +{ +public: + bool updateImgui(const DagorAssetMgr &asset_mgr, dag::Span allowed_types, dag::Span shown_types) + { + // Size the two buttons to the same size to fill the available space. + // If there is not enough space then make some by using the larger button's size for both buttons. + const char *resetButtonLabel = "Reset"; + const char *invertButtonLabel = "Invert"; + const ImVec2 resetButtonSize = PropPanel::ImguiHelper::getButtonSize(resetButtonLabel); + const ImVec2 invertButtonSize = PropPanel::ImguiHelper::getButtonSize(invertButtonLabel); + const float availableWidth = ImGui::GetContentRegionAvail().x; + const float availableButtonWidth = (availableWidth - ImGui::GetStyle().ItemSpacing.x) / 2.0f; + const float buttonWidth = max(availableButtonWidth, max(resetButtonSize.x, invertButtonSize.x)); + bool filterChanged = false; + + if (ImGui::Button(resetButtonLabel, ImVec2(buttonWidth, 0.0f))) + { + for (bool &shownType : shown_types) + shownType = true; + + filterChanged = true; + } + + ImGui::SameLine(); + if (ImGui::Button(invertButtonLabel, ImVec2(buttonWidth, 0.0f))) + { + for (bool &shownType : shown_types) + shownType = !shownType; + + filterChanged = true; + } + + if (showShownTypeFilters(asset_mgr, allowed_types, shown_types)) + filterChanged = true; + + return filterChanged; + } + +private: + bool showShownTypeFilters(const DagorAssetMgr &asset_mgr, dag::Span allowed_types, dag::Span shown_types) + { + bool filterChanged = false; + + for (int i = 0; i < asset_mgr.getAssetTypesCount(); ++i) + { + if (!allowed_types[i]) + continue; + + typeLabelBuffer.printf(64, "%s##%d", asset_mgr.getAssetTypeName(i), i); + if (PropPanel::ImguiHelper::checkboxWithDragSelection(typeLabelBuffer, &shown_types[i])) + filterChanged |= true; + } + + return filterChanged; + } + + String typeLabelBuffer; +}; diff --git a/prog/tools/libTools/assetsGui/av_favoritesTab.h b/prog/tools/libTools/assetsGui/av_favoritesTab.h index ad37a44ff..de056090f 100644 --- a/prog/tools/libTools/assetsGui/av_favoritesTab.h +++ b/prog/tools/libTools/assetsGui/av_favoritesTab.h @@ -1,6 +1,7 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once +#include "av_assetTypeFilterControl.h" #include "av_favoritesTree.h" #include #include @@ -10,7 +11,8 @@ class FavoritesTab { public: - explicit FavoritesTab(SelectAssetDlg &select_asset_dlg) : favoritesTree(select_asset_dlg) + explicit FavoritesTab(SelectAssetDlg &select_asset_dlg, const DagorAssetMgr &asset_mgr) : + favoritesTree(select_asset_dlg), assetMgr(asset_mgr) { closeIcon = (ImTextureID)((unsigned)PropPanel::load_icon("close_editor")); searchIcon = (ImTextureID)((unsigned)PropPanel::load_icon("search")); @@ -22,6 +24,22 @@ class FavoritesTab DagorAsset *getSelectedAsset() { return favoritesTree.getSelectedAsset(); } + void onAllowedTypesChanged(dag::ConstSpan allowed_type_indexes) + { + allowedTypes.clear(); + shownTypes.clear(); + allowedTypes.resize(assetMgr.getAssetTypesCount()); + shownTypes.resize(assetMgr.getAssetTypesCount()); + + for (int i = 0; i < assetMgr.getAssetTypesCount(); ++i) + { + const bool allowed = eastl::find(allowed_type_indexes.begin(), allowed_type_indexes.end(), i) != allowed_type_indexes.end(); + allowedTypes[i] = shownTypes[i] = allowed; + } + + onShownTypeFilterChanged(); + } + void updateImgui() { const ImVec2 fontSizedIconSize = PropPanel::ImguiHelper::getFontSizedIconSize(); @@ -75,10 +93,16 @@ class FavoritesTab } private: + void onShownTypeFilterChanged() + { + favoritesTree.setShownTypes(shownTypes); + favoritesTree.fillTree(); + } + void showSettingsPanel(const char *popup_id) { ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg)); - const bool popupIsOpen = ImGui::BeginPopup(popup_id); + const bool popupIsOpen = ImGui::BeginPopup(popup_id, ImGuiWindowFlags_NoMove); ImGui::PopStyleColor(); if (!popupIsOpen) @@ -87,8 +111,17 @@ class FavoritesTab return; } + ImGui::TextUnformatted("Select filter"); + + if (assetTypeFilterControl.updateImgui(assetMgr, make_span(allowedTypes), make_span(shownTypes))) + onShownTypeFilterChanged(); + + ImGui::NewLine(); + ImGui::Separator(); + ImGui::Dummy(ImVec2(0.0f, 0.0f)); // Leave some space between the separator and the check box. + bool showHierarchy = favoritesTree.getShowHierarchy(); - const bool showHierarchyPressed = ImGui::Checkbox("Show hierarchy", &showHierarchy); + const bool showHierarchyPressed = PropPanel::ImguiHelper::checkboxWithDragSelection("Show hierarchy", &showHierarchy); PropPanel::set_previous_imgui_control_tooltip((const void *)ImGui::GetItemID(), "Show the favorite assets including their hierarchy."); @@ -98,7 +131,11 @@ class FavoritesTab ImGui::EndPopup(); } + const DagorAssetMgr &assetMgr; FavoritesTree favoritesTree; + AssetTypeFilterControl assetTypeFilterControl; + dag::Vector allowedTypes; + dag::Vector shownTypes; String textToSearch; ImTextureID closeIcon = nullptr; ImTextureID searchIcon = nullptr; diff --git a/prog/tools/libTools/assetsGui/av_favoritesTree.h b/prog/tools/libTools/assetsGui/av_favoritesTree.h index 123b0ea80..028bc3251 100644 --- a/prog/tools/libTools/assetsGui/av_favoritesTree.h +++ b/prog/tools/libTools/assetsGui/av_favoritesTree.h @@ -20,11 +20,13 @@ class FavoritesTree : public IMenuEventHandler, public PropPanel::ITreeViewEvent { tree = new PropPanel::TreeBaseWindow(this, nullptr, 0, 0, hdpi::_pxActual(0), hdpi::_pxActual(0), "", /*icons_show = */ true); + + shownTypes.resize(select_asset_dlg.getAssetMgr()->getAssetTypesCount(), false); } void fillTree() { - dag::ConstSpan allowedTypes = selectAssetDlg.getAllowedTypes(); + const dag::ConstSpan allowedTypeIndexes = selectAssetDlg.getAllowedTypes(); const DagorAsset *selectedAsset = getSelectedAsset(); closedFolders.clear(); @@ -37,9 +39,9 @@ class FavoritesTree : public IMenuEventHandler, public PropPanel::ITreeViewEvent const dag::Vector &favorites = AssetSelectorGlobalState::getFavorites(); for (const String &assetName : favorites) { - const DagorAsset *asset = selectAssetDlg.getAssetByName(assetName, allowedTypes); + const DagorAsset *asset = selectAssetDlg.getAssetByName(assetName, allowedTypeIndexes); - if (!asset || eastl::find(allowedTypes.begin(), allowedTypes.end(), asset->getType()) == allowedTypes.end()) + if (!asset || !shownTypes[asset->getType()]) continue; if (!SelectAssetDlg::matchesSearchText(asset->getName(), textToSearch)) @@ -95,6 +97,14 @@ class FavoritesTree : public IMenuEventHandler, public PropPanel::ITreeViewEvent AssetSelectorGlobalState::setShowHierarchyInFavorites(showHierarchy); } + void setShownTypes(dag::ConstSpan new_shown_types) + { + G_ASSERT(new_shown_types.size() == shownTypes.size()); + + for (int i = 0; i < new_shown_types.size(); ++i) + shownTypes[i] = new_shown_types[i]; + } + String &getTextToSearch() { return textToSearch; } void updateImgui() { tree->updateImgui(); } @@ -363,6 +373,7 @@ class FavoritesTree : public IMenuEventHandler, public PropPanel::ITreeViewEvent ska::flat_hash_map folderIndexToFavoriteTreeFolderMap; ska::flat_hash_set closedFolders; FavoriteTreeFolder rootFavoriteTreeFolder; + dag::Vector shownTypes; String textToSearch; bool showHierarchy = true; }; \ No newline at end of file diff --git a/prog/tools/libTools/assetsGui/av_recentlyUsedTab.h b/prog/tools/libTools/assetsGui/av_recentlyUsedTab.h index a3e7f5634..bbba5eb07 100644 --- a/prog/tools/libTools/assetsGui/av_recentlyUsedTab.h +++ b/prog/tools/libTools/assetsGui/av_recentlyUsedTab.h @@ -1,6 +1,7 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #pragma once +#include "av_assetTypeFilterControl.h" #include #include #include @@ -16,11 +17,31 @@ class RecentlyUsedTab : public IMenuEventHandler, public PropPanel::ITreeViewEve { closeIcon = (ImTextureID)((unsigned)PropPanel::load_icon("close_editor")); searchIcon = (ImTextureID)((unsigned)PropPanel::load_icon("search")); + settingsIcon = (ImTextureID)((unsigned)PropPanel::load_icon("filter_default")); + settingsOpenIcon = (ImTextureID)((unsigned)PropPanel::load_icon("filter_active")); + } + + void onAllowedTypesChanged(dag::ConstSpan allowed_type_indexes) + { + const int assetTypeCount = selectAssetDlg.getAssetMgr()->getAssetTypesCount(); + + allowedTypes.clear(); + shownTypes.clear(); + allowedTypes.resize(assetTypeCount); + shownTypes.resize(assetTypeCount); + + for (int i = 0; i < assetTypeCount; ++i) + { + const bool allowed = eastl::find(allowed_type_indexes.begin(), allowed_type_indexes.end(), i) != allowed_type_indexes.end(); + allowedTypes[i] = shownTypes[i] = allowed; + } + + onShownTypeFilterChanged(); } void fillTree() { - dag::ConstSpan allowedTypes = selectAssetDlg.getAllowedTypes(); + const dag::ConstSpan allowedTypeIndexes = selectAssetDlg.getAllowedTypes(); const DagorAsset *selectedAsset = getSelectedAsset(); PropPanel::TLeafHandle itemToSelect = nullptr; @@ -31,9 +52,9 @@ class RecentlyUsedTab : public IMenuEventHandler, public PropPanel::ITreeViewEve for (int i = recentlyUsedList.size() - 1; i >= 0; --i) { const String &assetName = recentlyUsedList[i]; - const DagorAsset *asset = selectAssetDlg.getAssetByName(assetName, allowedTypes); + const DagorAsset *asset = selectAssetDlg.getAssetByName(assetName, allowedTypeIndexes); - if (!asset || eastl::find(allowedTypes.begin(), allowedTypes.end(), asset->getType()) == allowedTypes.end()) + if (!asset || !shownTypes[asset->getType()]) continue; if (!SelectAssetDlg::matchesSearchText(asset->getName(), textToSearch)) @@ -64,11 +85,30 @@ class RecentlyUsedTab : public IMenuEventHandler, public PropPanel::ITreeViewEve void updateImgui() { - ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x); + const ImVec2 fontSizedIconSize = PropPanel::ImguiHelper::getFontSizedIconSize(); + const ImVec2 settingsButtonSize = PropPanel::ImguiHelper::getImageButtonWithDownArrowSize(fontSizedIconSize); + + ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x - (ImGui::GetStyle().ItemSpacing.x + settingsButtonSize.x)); if (PropPanel::ImguiHelper::searchInput(&searchInputFocusId, "##searchInput", "Search", textToSearch, searchIcon, closeIcon)) fillTree(); + ImGui::SameLine(); + + const char *popupId = "settingsPopup"; + const ImTextureID settingsButtonIcon = settingsPanelOpen ? settingsOpenIcon : settingsIcon; + const bool settingsButtonPressed = + PropPanel::ImguiHelper::imageButtonWithArrow("settingsButton", settingsButtonIcon, fontSizedIconSize, settingsPanelOpen); + PropPanel::set_previous_imgui_control_tooltip((const void *)ImGui::GetItemID(), "Settings"); + + if (settingsButtonPressed) + { + ImGui::OpenPopup(popupId); + settingsPanelOpen = true; + } + + if (settingsPanelOpen) + showSettingsPanel(popupId); - if (ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_F)) + if (!settingsPanelOpen && ImGui::Shortcut(ImGuiMod_Ctrl | ImGuiKey_F)) PropPanel::focus_helper.requestFocus(&searchInputFocusId); recentlyUsedTree.updateImgui(); @@ -138,10 +178,38 @@ class RecentlyUsedTab : public IMenuEventHandler, public PropPanel::ITreeViewEve return false; } + void onShownTypeFilterChanged() { fillTree(); } + + void showSettingsPanel(const char *popup_id) + { + ImGui::PushStyleColor(ImGuiCol_PopupBg, ImGui::GetStyleColorVec4(ImGuiCol_WindowBg)); + const bool popupIsOpen = ImGui::BeginPopup(popup_id, ImGuiWindowFlags_NoMove); + ImGui::PopStyleColor(); + + if (!popupIsOpen) + { + settingsPanelOpen = false; + return; + } + + ImGui::TextUnformatted("Select filter"); + + if (assetTypeFilterControl.updateImgui(*selectAssetDlg.getAssetMgr(), make_span(allowedTypes), make_span(shownTypes))) + onShownTypeFilterChanged(); + + ImGui::EndPopup(); + } + SelectAssetDlg &selectAssetDlg; PropPanel::TreeBaseWindow recentlyUsedTree; + AssetTypeFilterControl assetTypeFilterControl; + dag::Vector allowedTypes; + dag::Vector shownTypes; String textToSearch; ImTextureID closeIcon = nullptr; ImTextureID searchIcon = nullptr; + ImTextureID settingsIcon = nullptr; + ImTextureID settingsOpenIcon = nullptr; const bool searchInputFocusId = false; // Only the address of this member is used. + bool settingsPanelOpen = false; }; \ No newline at end of file diff --git a/prog/tools/libTools/assetsGui/av_selObjDlg.cpp b/prog/tools/libTools/assetsGui/av_selObjDlg.cpp index 670091190..84530d8cd 100644 --- a/prog/tools/libTools/assetsGui/av_selObjDlg.cpp +++ b/prog/tools/libTools/assetsGui/av_selObjDlg.cpp @@ -85,10 +85,7 @@ void SelectAssetDlg::commonConstructor(dag::ConstSpan filter) view = new AssetBaseView(client, this, allTabPage->getWindowHandle(), 0, 0, 0, hdpi::_px(tabPageHeight)); PropPanel::ContainerPropertyControl *favoritesTabPage = tabPanel->createTabPage(AssetsGuiIds::FavoritesPage, "Favorites"); - favoritesTab.reset(new FavoritesTab(*this)); - PropPanel::ContainerPropertyControl *recentlyUsedTabPage = tabPanel->createTabPage(AssetsGuiIds::RecentlyUsedPage, "Recently used"); - recentlyUsedTab.reset(new RecentlyUsedTab(*this)); G_ASSERT(view); @@ -125,8 +122,10 @@ bool SelectAssetDlg::changeFilters(DagorAssetMgr *_mgr, dag::ConstSpan type view->setFilter(type_filter); mgr = _mgr; view->connectToAssetBase(mgr); - fillFavoritesTree(); - fillRecentlyUsedTree(); + if (favoritesTab) + favoritesTab->onAllowedTypesChanged(type_filter); + if (recentlyUsedTab) + recentlyUsedTab->onAllowedTypesChanged(type_filter); return true; } @@ -222,24 +221,40 @@ void SelectAssetDlg::onChange(int pcb_id, PropPanel::ContainerPropertyControl *p { const int newPage = panel->getInt(pcb_id); if (newPage == AssetsGuiIds::FavoritesPage) - fillFavoritesTree(); + { + if (!favoritesTab) + { + favoritesTab.reset(new FavoritesTab(*this, *mgr)); + favoritesTab->onAllowedTypesChanged(view->getFilter()); + favoritesTabNeedsRefilling = false; + } + + if (favoritesTabNeedsRefilling) + { + favoritesTabNeedsRefilling = false; + favoritesTab->fillTree(); + } + } else if (newPage == AssetsGuiIds::RecentlyUsedPage) - fillRecentlyUsedTree(); + { + if (!recentlyUsedTab) + { + recentlyUsedTab.reset(new RecentlyUsedTab(*this)); + recentlyUsedTab->onAllowedTypesChanged(view->getFilter()); + recentlyUsedTabNeedsRefilling = false; + } + + if (recentlyUsedTabNeedsRefilling) + { + recentlyUsedTabNeedsRefilling = false; + recentlyUsedTab->fillTree(); + } + } client->onAvSelectAsset(getSelObjName()); } } -void SelectAssetDlg::fillFavoritesTree() -{ - dag::ConstSpan allowedTypes = view->getCurFilter(); - if (allowedTypes.size() == favoritesTreeAllowedTypes.size() && mem_eq(allowedTypes, favoritesTreeAllowedTypes.data())) - return; - - favoritesTreeAllowedTypes = allowedTypes; - favoritesTab->fillTree(); -} - String SelectAssetDlg::getSelectedFavorite() { const DagorAsset *asset = favoritesTab ? favoritesTab->getSelectedAsset() : nullptr; @@ -254,22 +269,10 @@ void SelectAssetDlg::getAssetImageName(String &image_name, const DagorAsset *ass image_name = "unknown"; } -void SelectAssetDlg::fillRecentlyUsedTree() -{ - dag::ConstSpan allowedTypes = view->getCurFilter(); - if (allowedTypes.size() == recentlyUsedTreeAllowedTypes.size() && mem_eq(allowedTypes, recentlyUsedTreeAllowedTypes.data())) - return; - - recentlyUsedTreeAllowedTypes = allowedTypes; - recentlyUsedTab->fillTree(); -} - void SelectAssetDlg::addAssetToFavorites(const DagorAsset &asset) { AssetSelectorGlobalState::addFavorite(asset.getNameTypified()); - - // Mark the favorites tree dirty. - favoritesTreeAllowedTypes.clear(); + favoritesTabNeedsRefilling = true; } void SelectAssetDlg::addAssetToRecentlyUsed(const char *asset_name) @@ -278,12 +281,11 @@ void SelectAssetDlg::addAssetToRecentlyUsed(const char *asset_name) if (!AssetSelectorGlobalState::addRecentlyUsed(assetName)) return; - // Mark the recently used tree dirty. - recentlyUsedTreeAllowedTypes.clear(); - const int currentPage = getPanel()->getInt(AssetsGuiIds::TabPanel); if (currentPage == AssetsGuiIds::RecentlyUsedPage) - fillRecentlyUsedTree(); + recentlyUsedTab->fillTree(); + else + recentlyUsedTabNeedsRefilling = true; } void SelectAssetDlg::goToAsset(const DagorAsset &asset) @@ -380,8 +382,8 @@ void SelectAssetDlg::customControlUpdate(int id) const int currentPage = getPanel()->getInt(AssetsGuiIds::TabPanel); if (currentPage == AssetsGuiIds::AllPage) view->updateImgui(regionAvailableY); - else if (currentPage == AssetsGuiIds::FavoritesPage) + else if (currentPage == AssetsGuiIds::FavoritesPage && favoritesTab) favoritesTab->updateImgui(); - else if (currentPage == AssetsGuiIds::RecentlyUsedPage) + else if (currentPage == AssetsGuiIds::RecentlyUsedPage && recentlyUsedTab) recentlyUsedTab->updateImgui(); } diff --git a/prog/tools/libTools/propPanel/imguiHelper.cpp b/prog/tools/libTools/propPanel/imguiHelper.cpp index 708304b8e..ef9a01335 100644 --- a/prog/tools/libTools/propPanel/imguiHelper.cpp +++ b/prog/tools/libTools/propPanel/imguiHelper.cpp @@ -16,6 +16,15 @@ using namespace ImGui; namespace PropPanel { +bool ImguiHelper::checkboxDragSelectionInProgress = false; +bool ImguiHelper::checkboxDragSelectionValue = false; + +void ImguiHelper::afterNewFrame() +{ + if (checkboxDragSelectionInProgress && !ImGui::IsMouseDown(ImGuiMouseButton_Left)) + checkboxDragSelectionInProgress = false; +} + float ImguiHelper::getDefaultRightSideEditWidth() { return hdpi::_pxS(DEFAULT_CONTROL_WIDTH) + SpinEditControlStandalone::getSpaceBeforeSpinButtons() + @@ -67,6 +76,33 @@ static bool IsRootOfOpenMenuSet() static float getMenuCheckmarkSize(const ImGuiContext &context) { return context.FontSize * 0.866f; } static float getMenuCheckmarkPadding(const ImGuiContext &context) { return context.FontSize * 0.40f; } +bool ImguiHelper::checkboxWithDragSelection(const char *label, bool *value) +{ + if (ImGui::GetCurrentWindow()->SkipItems) + return false; + + const bool oldValue = *value; + bool changed = ImGui::Checkbox(label, value); + + if (!checkboxDragSelectionInProgress && ImGui::IsItemActivated() && ImGui::IsItemClicked(ImGuiMouseButton_Left)) + { + checkboxDragSelectionInProgress = true; + checkboxDragSelectionValue = !oldValue; + + // Prevent double checking with drag selection. Without this dragging from checkbox A to B, and then back to A would + // toggle A twice (first by the drag selection, then by ImGui::Checkbox on mouse release). + ImGui::ClearActiveID(); + } + + if (checkboxDragSelectionInProgress && checkboxDragSelectionValue != *value && ImGui::IsItemHovered()) + { + *value = checkboxDragSelectionValue; + changed = true; + } + + return changed; +} + bool ImguiHelper::inputTextWithEnterWorkaround(const char *label, String *str, bool focused, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void *user_data) { diff --git a/prog/tools/libTools/propPanel/propPanel.cpp b/prog/tools/libTools/propPanel/propPanel.cpp index 9be2617a8..ba547f2c0 100644 --- a/prog/tools/libTools/propPanel/propPanel.cpp +++ b/prog/tools/libTools/propPanel/propPanel.cpp @@ -1,6 +1,7 @@ // Copyright (C) Gaijin Games KFT. All rights reserved. #include +#include #include "imageHelper.h" #include "messageQueueInternal.h" #include "tooltipHelper.h" @@ -14,7 +15,11 @@ void release() message_queue.release(); } -void after_new_frame() { tooltip_helper.afterNewFrame(); } +void after_new_frame() +{ + ImguiHelper::afterNewFrame(); + tooltip_helper.afterNewFrame(); +} void before_end_frame() { tooltip_helper.beforeEndFrame(); } diff --git a/prog/tools/sceneTools/assetExp/assetExport.cpp b/prog/tools/sceneTools/assetExp/assetExport.cpp index 0fe7a45c3..4ab26a485 100644 --- a/prog/tools/sceneTools/assetExp/assetExport.cpp +++ b/prog/tools/sceneTools/assetExp/assetExport.cpp @@ -59,7 +59,7 @@ static bool checkCacheChanged(AssetExportCache &c4, DagorAsset &a, IDagorAssetEx // A lot of assets add the asset itself to the list of src data files. // checkFileChanged is quite slow and we checked this asset already above. // Removing this asset from gather list is faster then calling checkFileChanged one extra time - if (a_files.size() > 0 && strcmp(a_files[0].c_str(), a.getTargetFilePath().c_str()) == 0) + if (a.isVirtual() && a_files.size() > 0 && strcmp(a_files[0].c_str(), a.getTargetFilePath().c_str()) == 0) a_files.erase(a_files.begin()); int cnt = a_files.size(); for (int j = 0; j < cnt; j++) diff --git a/prog/tools/sceneTools/assetExp/resExport.cpp b/prog/tools/sceneTools/assetExp/resExport.cpp index 241d4263d..9a412cf3a 100644 --- a/prog/tools/sceneTools/assetExp/resExport.cpp +++ b/prog/tools/sceneTools/assetExp/resExport.cpp @@ -699,7 +699,7 @@ bool checkGameResPackUpToDate(dag::ConstSpan assets, AssetExportCa // A lot of assets add the asset itself to the list of src data files. // checkFileChanged is quite slow and we checked this asset already above. // Removing this asset from gather list is faster then calling checkFileChanged one extra time - if (a_files.size() > 0 && strcmp(a_files[0].c_str(), assets[i]->getTargetFilePath().c_str()) == 0) + if (a.isVirtual() && a_files.size() > 0 && strcmp(a_files[0].c_str(), assets[i]->getTargetFilePath().c_str()) == 0) a_files.erase(a_files.begin()); for (int j = 0; j < a_files.size(); j++) if (c4.checkFileChanged(a_files[j])) diff --git a/prog/tools/sharedInclude/assetsGui/av_selObjDlg.h b/prog/tools/sharedInclude/assetsGui/av_selObjDlg.h index 0204b08f7..81ca99185 100644 --- a/prog/tools/sharedInclude/assetsGui/av_selObjDlg.h +++ b/prog/tools/sharedInclude/assetsGui/av_selObjDlg.h @@ -42,7 +42,7 @@ class SelectAssetDlg : public PropPanel::DialogWindow, void setTreeNodesExpand(dag::ConstSpan exps) { view->setTreeNodesExpand(exps); } void setFilterStr(const char *str) { view->setFilterStr(str); } SimpleString getFilterStr() const { return view->getFilterStr(); } - dag::ConstSpan getAllowedTypes() const { return view->getCurFilter(); } + dag::ConstSpan getAllowedTypes() const { return view->getFilter(); } bool changeFilters(DagorAssetMgr *_mgr, dag::ConstSpan type_filter); void addAssetToFavorites(const DagorAsset &asset); @@ -56,6 +56,8 @@ class SelectAssetDlg : public PropPanel::DialogWindow, const DagorAsset *getAssetByName(const char *_name, dag::ConstSpan asset_types) const; + const DagorAssetMgr *getAssetMgr() const { return mgr; } + // IAssetBaseViewClient virtual void onAvClose() override {} @@ -83,9 +85,7 @@ class SelectAssetDlg : public PropPanel::DialogWindow, virtual void customControlUpdate(int id) override; void commonConstructor(dag::ConstSpan filter); - void fillFavoritesTree(); String getSelectedFavorite(); - void fillRecentlyUsedTree(); String getSelectedRecentlyUsed(); String getAssetNameWithTypeIfNeeded(const DagorAsset &asset); @@ -99,9 +99,9 @@ class SelectAssetDlg : public PropPanel::DialogWindow, AssetBaseView *view; DagorAssetMgr *mgr; eastl::unique_ptr favoritesTab; - dag::Vector favoritesTreeAllowedTypes; eastl::unique_ptr recentlyUsedTab; - dag::Vector recentlyUsedTreeAllowedTypes; String selectionBuffer; TEXTUREID folderTextureId = BAD_TEXTUREID; + bool favoritesTabNeedsRefilling = true; + bool recentlyUsedTabNeedsRefilling = true; }; diff --git a/prog/tools/sharedInclude/assetsGui/av_view.h b/prog/tools/sharedInclude/assetsGui/av_view.h index 90a7c08c2..245eab124 100644 --- a/prog/tools/sharedInclude/assetsGui/av_view.h +++ b/prog/tools/sharedInclude/assetsGui/av_view.h @@ -55,6 +55,7 @@ class AssetBaseView : public PropPanel::ITreeViewEventHandler inline void showEmptyGroups(bool show = true) { doShowEmptyGroups = show; } void setFilterStr(const char *str) { mTreeList->setFilterStr(str); } SimpleString getFilterStr() const { return mTreeList->getFilterStr(); } + dag::ConstSpan getFilter() const { return filter; } dag::ConstSpan getCurFilter() const { return curFilter; } // ITreeViewEventHandler diff --git a/prog/tools/sharedInclude/propPanel/imguiHelper.h b/prog/tools/sharedInclude/propPanel/imguiHelper.h index aa546dfa8..7437e19d9 100644 --- a/prog/tools/sharedInclude/propPanel/imguiHelper.h +++ b/prog/tools/sharedInclude/propPanel/imguiHelper.h @@ -35,6 +35,9 @@ class ImguiHelper bool isOpen; //-V730_NOINIT }; + // Internal function for PropPanel. + static void afterNewFrame(); + // To help with implementing overrides for PropertyControlBase::getTextValue. static int getTextValueForString(const String &value, char *buffer, int buflen) { @@ -55,6 +58,10 @@ class ImguiHelper return -1; } + // Same as ImGui::Checkbox but supports changing multiple checkboxes at once by dragging the mouse cursor from the + // first checkbox while holding the left mouse button. + static bool checkboxWithDragSelection(const char *label, bool *value); + // The default ImGui text input control reacts to Enter by making it inactive, or if ConfigInputTextEnterKeepActive // is set to true then it keeps active but selects the whole text. // We prevent that behaviour by not letting it know about Enter presses... @@ -66,7 +73,7 @@ class ImguiHelper // Feature requests: https://github.com/ocornut/imgui/issues/6170 and https://github.com/ocornut/imgui/issues/1037. static bool collapsingHeaderWidth(const char *label, float width, ImGuiTreeNodeFlags flags = ImGuiTreeNodeFlags_None); - // Same LabelText but without the text. + // Same as LabelText but without the text. // (Almost the same as TextUnformatted but this sets the baseline, so it looks correct beside other controls.) // use_text_width: if true then the control will be as wide as required by the text static void labelOnly(const char *label, const char *label_end = nullptr, bool use_text_width = false); @@ -182,6 +189,9 @@ class ImguiHelper private: static ImVec2 getImageButtonWithDownArrowSizeInternal(const ImVec2 &image_size, float &default_height, ImVec2 &arrow_half_size); + + static bool checkboxDragSelectionInProgress; + static bool checkboxDragSelectionValue; }; } // namespace PropPanel \ No newline at end of file diff --git a/samples/skiesSample/prog/shaders/shaders_metal.blk b/samples/skiesSample/prog/shaders/shaders_metal.blk index 2f180ed7a..4562f61bf 100644 --- a/samples/skiesSample/prog/shaders/shaders_metal.blk +++ b/samples/skiesSample/prog/shaders/shaders_metal.blk @@ -6,6 +6,7 @@ source { includePath:t="./source" + file:t = "fft_cs.dshl" include "../../../../prog/samples/commonShaders/shadersList.blk" include fftWaterList.blk include shadersList.blk @@ -42,4 +43,4 @@ explicit_var_ref { include common_var_ref.blk include water_var_ref.blk -} \ No newline at end of file +}